Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:sparkles: Add isolated database map views https://github.com/siyuan-note/siyuan/issues/20129

Daniel304d2232f4a4
diff --git a/app/appearance/langs/ar.json b/app/appearance/langs/ar.json
index 287b4af500..74cf46d617 100644
--- a/app/appearance/langs/ar.json
+++ b/app/appearance/langs/ar.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "لا تتوفر الخرائط أثناء تفعيل تجاوز المصادقة. تظل السجلات متاحة",
+ "mapSettings": "الخريطة",
+ "mapServices": "خدمات الخرائط",
+ "mapServicesTip": "أضف خدمات لهذا الجهاز، ثم اختر خدمة بشكل منفصل في كل عرض خريطة لقاعدة البيانات",
+ "mapAddService": "إضافة خدمة",
+ "mapServiceName": "اسم الخدمة",
+ "mapServiceID": "معرّف الخدمة",
+ "mapServiceIDTip": "احتفظ بهذا المعرّف عند إعداد الخدمة نفسها على جهاز آخر؛ ستستمر العروض الحالية في الإشارة إليه",
+ "mapProvider": "مزوّد الخرائط",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "خرائط Tencent",
+ "mapProviderBaidu": "خرائط Baidu",
+ "mapSecurityCode": "رمز الأمان",
+ "mapCredentialsTip": "اترك الحقل فارغًا للاحتفاظ ببيانات الاعتماد المحفوظة، أو أدخل بديلًا، أو امسحها صراحةً",
+ "mapClearCredential": "مسح بيانات الاعتماد المحفوظة",
+ "mapCredentialSaved": "محفوظة؛ اتركه فارغًا للاحتفاظ بها",
+ "mapCredentialsPresent": "حُدّدت حقول الإعداد المطلوبة؛ لم يتم التحقق من الوصول إلى الخدمة",
+ "mapCredentialsMissing": "بيانات الاعتماد المطلوبة غير موجودة",
+ "mapNoServices": "لم يتم اختيار خدمة",
+ "mapRenderingTip": "تعرض الخرائط الإحداثيات الموجودة فقط. لا تتوفر ميزات البحث عن العناوين أو الترميز الجغرافي أو المسارات أو الكشف التلقائي عن الإحداثيات؛ وتبقى الإحداثيات المحفوظة ونظام الإحداثيات المعلن دون تغيير",
+ "mapProductionTip": "قبل الاستخدام، تحقّق من أهلية الحساب والتراخيص والحصص والنطاقات المسموح بها والمتطلبات الإقليمية السارية لدى المزوّد",
+ "mapMissingServiceTip": "يشير هذا العرض إلى خدمة غير موجودة. أضفها بالمعرّف نفسه لاستعادة المرجع",
+ "mapSettingsError": "تعذّر تحميل إعدادات الخريطة أو حفظها. يرجى المحاولة مجددًا",
+ "mapSettingsConflict": "تغيّرت خدمات الخرائط في مكان آخر. ألغِ هذه المسودة لإعادة التحميل قبل التحرير مجددًا",
+ "mapServiceIDInvalid": "استخدم معرّفًا فريدًا من 1 إلى 128 حرفًا لاتينيًا أو رقمًا أو شرطة سفلية أو شرطة، يبدأ بحرف أو رقم",
+ "mapServiceNameRequired": "أدخل اسم الخدمة",
+ "mapSaveOrCancel": "احفظ التغييرات الحالية أو ألغها أولًا",
+ "mapDeleteServiceTip": "هل تريد حذف هذه الخدمة؟ ستبقى العروض التي تشير إلى معرّفها غير مهيأة حتى تضيف المعرّف نفسه مجددًا أو تختار خدمة أخرى",
+ "mapView": "الخريطة",
+ "mapLocationField": "حقل الموقع",
+ "mapService": "خدمة الخرائط",
+ "mapShowRecordList": "عرض قائمة السجلات",
+ "mapSelectLocationField": "اختر حقل الموقع",
+ "mapSelectService": "اختر خدمة خرائط",
+ "mapMissingLocationField": "حقل الموقع المحفوظ غير متاح. اختر حقل موقع",
+ "mapMissingService": "لا تتوفر خدمة الخرائط المحفوظة على هذا الجهاز. أضف خدمة بالمعرّف نفسه في الإعدادات - الخريطة، أو اختر خدمة أخرى",
+ "mapPageScope": "تعرض الخريطة ${shown} سجلًا محمّلًا من أصل ${total} سجلًا تمت تصفيته",
+ "mapSkippedLocations": "المواقع المتخطاة: ${empty} بلا إحداثيات، و${invalid} غير صالحة، و${unknown} بنظام إحداثيات غير معروف، و${mismatch} بنظام إحداثيات غير متوافق، و${projection} بإسقاط غير مدعوم",
+ "mapNoMarkers": "لا توجد مواقع متوافقة في الصفحة المحمّلة",
+ "mapLoading": "جارٍ تحميل الخريطة...",
+ "mapLoadError": "تعذّر تحميل الخريطة. لا تزال سجلاتك متاحة",
+ "mapUnsupportedClient": "لا تتوفر بيئة معزولة للخرائط في هذا العميل. لا تزال سجلاتك متاحة",
+ "mapOffline": "الخريطة غير متصلة بالإنترنت. لا تزال سجلاتك متاحة",
+ "mapPublicFallback": "لا تُحمّل الخرائط في الصفحات المنشورة أو المحتوى المصدّر",
+ "mapConfigureServices": "إعداد خدمات الخرائط",
+ "mapFitMarkers": "ملاءمة العرض لجميع العلامات المحمّلة",
+ "mapTooManyMarkers": "تحتوي هذه الصفحة على أكثر من ${limit} موقعًا. استخدم عوامل التصفية أو قلّل حجم الصفحة لعرض الخريطة",
"defaultCoordinateSystem": "نظام الإحداثيات الافتراضي للإدخال الجديد",
"defaultCoordinateSystemTip": "ينطبق على الإدخال الجديد فقط؛ تحتفظ المواقع الحالية بأنظمة إحداثياتها",
"locationPasteInEditor": "الصق أزواج الإحداثيات في محرر الموقع، حيث يُوضَّح ترتيب خط العرض ثم خط الطول ونظام الإحداثيات",
@@ -2750,6 +2797,7 @@
"quit": "خروج من التطبيق"
},
"_attrView": {
+ "map": "الخريطة",
"dateCalendar": "التقويم",
"solarCalendar": "الميلادي",
"lunarCalendar": "القمري الصيني",
diff --git a/app/appearance/langs/de.json b/app/appearance/langs/de.json
index b7b755e378..654fcfa40d 100644
--- a/app/appearance/langs/de.json
+++ b/app/appearance/langs/de.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Karten sind bei aktivierter Umgehung der Authentifizierung nicht verfügbar. Datensätze bleiben verfügbar",
+ "mapSettings": "Karte",
+ "mapServices": "Kartendienste",
+ "mapServicesTip": "Dienste für dieses Gerät hinzufügen und dann in jeder Datenbank-Kartenansicht einzeln auswählen",
+ "mapAddService": "Dienst hinzufügen",
+ "mapServiceName": "Dienstname",
+ "mapServiceID": "Dienst-ID",
+ "mapServiceIDTip": "Diese ID beim Einrichten desselben Dienstes auf einem anderen Gerät beibehalten; bestehende Ansichten verweisen weiterhin darauf",
+ "mapProvider": "Kartenanbieter",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Sicherheitscode",
+ "mapCredentialsTip": "Leer lassen, um die gespeicherten Zugangsdaten beizubehalten, einen Ersatz eingeben oder sie ausdrücklich löschen",
+ "mapClearCredential": "Gespeicherte Zugangsdaten löschen",
+ "mapCredentialSaved": "Gespeichert; zum Beibehalten leer lassen",
+ "mapCredentialsPresent": "Die erforderlichen Konfigurationsfelder sind ausgefüllt; der Dienstzugriff wurde nicht geprüft",
+ "mapCredentialsMissing": "Erforderliche Zugangsdaten fehlen",
+ "mapNoServices": "Kein Dienst ausgewählt",
+ "mapRenderingTip": "Karten zeigen nur vorhandene Koordinaten an. Adresssuche, Geokodierung, Routen und automatische Koordinatenerkennung werden nicht angeboten; gespeicherte Koordinaten und ihr angegebenes Koordinatensystem bleiben unverändert",
+ "mapProductionTip": "Vor der Nutzung die Kontoberechtigung, Lizenzbedingungen, Kontingente, zulässigen Domains und geltenden regionalen Anforderungen des Anbieters prüfen",
+ "mapMissingServiceTip": "Diese Ansicht verweist auf einen fehlenden Dienst. Den Dienst mit derselben ID hinzufügen, um den Verweis wiederherzustellen",
+ "mapSettingsError": "Karteneinstellungen konnten nicht geladen oder gespeichert werden. Bitte erneut versuchen",
+ "mapSettingsConflict": "Kartendienste wurden andernorts geändert. Diesen Entwurf verwerfen, um die Daten vor dem erneuten Bearbeiten neu zu laden",
+ "mapServiceIDInvalid": "Eine eindeutige ID aus 1–128 Buchstaben, Ziffern, Unterstrichen oder Bindestrichen verwenden, beginnend mit einem Buchstaben oder einer Ziffer",
+ "mapServiceNameRequired": "Einen Dienstnamen eingeben",
+ "mapSaveOrCancel": "Aktuelle Änderungen zuerst speichern oder verwerfen",
+ "mapDeleteServiceTip": "Diesen Dienst löschen? Ansichten mit dieser ID bleiben unkonfiguriert, bis dieselbe ID erneut hinzugefügt oder ein anderer Dienst ausgewählt wird",
+ "mapView": "Karte",
+ "mapLocationField": "Standortfeld",
+ "mapService": "Kartendienst",
+ "mapShowRecordList": "Datensatzliste anzeigen",
+ "mapSelectLocationField": "Ein Standortfeld auswählen",
+ "mapSelectService": "Einen Kartendienst auswählen",
+ "mapMissingLocationField": "Das gespeicherte Standortfeld ist nicht verfügbar. Ein Standortfeld auswählen",
+ "mapMissingService": "Auf diesem Gerät fehlt der gespeicherte Kartendienst. Unter Einstellungen - Karte einen Dienst mit derselben ID hinzufügen oder einen anderen Dienst auswählen",
+ "mapPageScope": "Die Karte zeigt ${shown} geladene Datensätze von insgesamt ${total} gefilterten Datensätzen",
+ "mapSkippedLocations": "Übersprungene Standorte: ${empty} ohne Koordinaten, ${invalid} ungültig, ${unknown} mit unbekanntem Koordinatensystem, ${mismatch} mit inkompatiblem Koordinatensystem, ${projection} mit nicht unterstützter Projektion",
+ "mapNoMarkers": "Keine kompatiblen Standorte auf der geladenen Seite",
+ "mapLoading": "Karte wird geladen...",
+ "mapLoadError": "Die Karte konnte nicht geladen werden. Ihre Datensätze sind weiterhin verfügbar",
+ "mapUnsupportedClient": "Dieser Client bietet keine isolierte Kartenumgebung. Ihre Datensätze sind weiterhin verfügbar",
+ "mapOffline": "Die Karte ist offline. Ihre Datensätze sind weiterhin verfügbar",
+ "mapPublicFallback": "In veröffentlichten Seiten oder Exporten werden keine Karten geladen",
+ "mapConfigureServices": "Kartendienste konfigurieren",
+ "mapFitMarkers": "Alle geladenen Markierungen einpassen",
+ "mapTooManyMarkers": "Diese Seite enthält mehr als ${limit} Standorte. Filter verwenden oder die Seitengröße verkleinern, um die Karte anzuzeigen",
"defaultCoordinateSystem": "Standardkoordinatensystem für neue Eingaben",
"defaultCoordinateSystemTip": "Gilt nur für neue Eingaben; vorhandene Standorte behalten ihr Koordinatensystem",
"locationPasteInEditor": "Koordinatenpaare im Standorteditor einfügen, wo die Reihenfolge Breitengrad, Längengrad und das Koordinatensystem ausdrücklich angegeben sind",
@@ -2750,6 +2797,7 @@
"quit": "Anwendung beenden"
},
"_attrView": {
+ "map": "Karte",
"dateCalendar": "Kalender",
"solarCalendar": "Gregorianisch",
"lunarCalendar": "Chinesischer Mondkalender",
diff --git a/app/appearance/langs/en.json b/app/appearance/langs/en.json
index 47bc5d43ac..bf7145af0b 100644
--- a/app/appearance/langs/en.json
+++ b/app/appearance/langs/en.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Maps are unavailable while authentication bypass is enabled. Records remain available",
+ "mapSettings": "Map",
+ "mapServices": "Map services",
+ "mapServicesTip": "Add services for this device, then select a service separately in each database map view",
+ "mapAddService": "Add service",
+ "mapServiceName": "Service name",
+ "mapServiceID": "Service ID",
+ "mapServiceIDTip": "Keep this ID unchanged when configuring the same service on another device; existing views will keep referencing it",
+ "mapProvider": "Map provider",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Security code",
+ "mapCredentialsTip": "Leave blank to keep the saved credential, enter a replacement, or explicitly clear it",
+ "mapClearCredential": "Clear saved credential",
+ "mapCredentialSaved": "Saved; leave blank to keep",
+ "mapCredentialsPresent": "Required configuration fields are present; service access has not been verified",
+ "mapCredentialsMissing": "Required credentials are missing",
+ "mapNoServices": "No service selected",
+ "mapRenderingTip": "Maps only display existing coordinates. Address search, geocoding, routes, and automatic coordinate detection are not provided; stored coordinates and their declared coordinate system are unchanged",
+ "mapProductionTip": "Before use, check the provider's account eligibility, licensing, quotas, allowed domains, and applicable regional requirements",
+ "mapMissingServiceTip": "This view references a missing service. Add it with this same ID to restore the reference",
+ "mapSettingsError": "Could not load or save map settings. Please retry",
+ "mapSettingsConflict": "Map services changed elsewhere. Cancel this draft to reload before editing again",
+ "mapServiceIDInvalid": "Use a unique ID of 1–128 letters, digits, underscores, or hyphens, starting with a letter or digit",
+ "mapServiceNameRequired": "Enter a service name",
+ "mapSaveOrCancel": "Save or cancel the current changes first",
+ "mapDeleteServiceTip": "Delete this service? Views referencing its ID will remain unconfigured until you add that ID again or choose another service",
+ "mapView": "Map",
+ "mapLocationField": "Location field",
+ "mapService": "Map service",
+ "mapShowRecordList": "Show record list",
+ "mapSelectLocationField": "Select a location field",
+ "mapSelectService": "Select a map service",
+ "mapMissingLocationField": "The saved location field is unavailable. Select a location field",
+ "mapMissingService": "This device does not have the saved map service. Add a service with the same ID in Settings - Map, or select another service",
+ "mapPageScope": "Map shows the ${shown} loaded records of ${total} filtered records",
+ "mapSkippedLocations": "Skipped locations: ${empty} missing coordinates, ${invalid} invalid, ${unknown} unknown coordinate system, ${mismatch} incompatible coordinate system, ${projection} unsupported projection",
+ "mapNoMarkers": "No compatible locations on the loaded page",
+ "mapLoading": "Loading map...",
+ "mapLoadError": "The map could not load. Your records are still available",
+ "mapUnsupportedClient": "An isolated map host is not available in this client. Your records are still available",
+ "mapOffline": "Map is offline. Your records are still available",
+ "mapPublicFallback": "Maps are not loaded in published pages or exports",
+ "mapConfigureServices": "Configure map services",
+ "mapFitMarkers": "Fit all loaded markers",
+ "mapTooManyMarkers": "This page has more than ${limit} locations. Use filters or a smaller page size to display the map",
"defaultCoordinateSystem": "Default coordinate system for new input",
"defaultCoordinateSystemTip": "Applies only to new input; existing locations keep their coordinate systems",
"locationPasteInEditor": "Paste coordinate pairs in the location editor, where latitude, longitude order and the coordinate system are explicit",
@@ -2750,6 +2797,7 @@
"quit": "Quit application"
},
"_attrView": {
+ "map": "Map",
"dateCalendar": "Calendar",
"solarCalendar": "Gregorian",
"lunarCalendar": "Chinese lunar",
diff --git a/app/appearance/langs/es.json b/app/appearance/langs/es.json
index 1c8b7d838e..6eb06bdd67 100644
--- a/app/appearance/langs/es.json
+++ b/app/appearance/langs/es.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Los mapas no están disponibles mientras esté activada la omisión de autenticación. Los registros siguen disponibles",
+ "mapSettings": "Mapa",
+ "mapServices": "Servicios de mapas",
+ "mapServicesTip": "Añada servicios para este dispositivo y seleccione uno por separado en cada vista de mapa de la base de datos",
+ "mapAddService": "Añadir servicio",
+ "mapServiceName": "Nombre del servicio",
+ "mapServiceID": "ID del servicio",
+ "mapServiceIDTip": "Conserve este ID al configurar el mismo servicio en otro dispositivo; las vistas existentes seguirán haciendo referencia a él",
+ "mapProvider": "Proveedor de mapas",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Código de seguridad",
+ "mapCredentialsTip": "Déjelo vacío para conservar la credencial guardada, introduzca una nueva o elimínela expresamente",
+ "mapClearCredential": "Eliminar la credencial guardada",
+ "mapCredentialSaved": "Guardada; déjelo vacío para conservarla",
+ "mapCredentialsPresent": "Los campos de configuración necesarios están completos; no se ha verificado el acceso al servicio",
+ "mapCredentialsMissing": "Faltan credenciales necesarias",
+ "mapNoServices": "Ningún servicio seleccionado",
+ "mapRenderingTip": "Los mapas solo muestran coordenadas existentes. No se ofrecen búsqueda de direcciones, geocodificación, rutas ni detección automática de coordenadas; las coordenadas guardadas y su sistema declarado no cambian",
+ "mapProductionTip": "Antes de usarlo, compruebe los requisitos de la cuenta, las licencias, las cuotas, los dominios permitidos y los requisitos regionales aplicables del proveedor",
+ "mapMissingServiceTip": "Esta vista hace referencia a un servicio que falta. Añádalo con el mismo ID para restaurar la referencia",
+ "mapSettingsError": "No se pudieron cargar o guardar los ajustes del mapa. Inténtelo de nuevo",
+ "mapSettingsConflict": "Los servicios de mapas se modificaron en otro lugar. Cancele este borrador para recargar los datos antes de volver a editarlos",
+ "mapServiceIDInvalid": "Use un ID único de 1 a 128 letras, dígitos, guiones bajos o guiones, que empiece por una letra o un dígito",
+ "mapServiceNameRequired": "Introduzca un nombre para el servicio",
+ "mapSaveOrCancel": "Guarde o cancele primero los cambios actuales",
+ "mapDeleteServiceTip": "¿Eliminar este servicio? Las vistas que hacen referencia a su ID seguirán sin configurar hasta que añada de nuevo ese ID o elija otro servicio",
+ "mapView": "Mapa",
+ "mapLocationField": "Campo de ubicación",
+ "mapService": "Servicio de mapas",
+ "mapShowRecordList": "Mostrar lista de registros",
+ "mapSelectLocationField": "Seleccione un campo de ubicación",
+ "mapSelectService": "Seleccione un servicio de mapas",
+ "mapMissingLocationField": "El campo de ubicación guardado no está disponible. Seleccione un campo de ubicación",
+ "mapMissingService": "Este dispositivo no tiene el servicio de mapas guardado. Añada un servicio con el mismo ID en Ajustes - Mapa o seleccione otro servicio",
+ "mapPageScope": "El mapa muestra ${shown} registros cargados de ${total} registros filtrados",
+ "mapSkippedLocations": "Ubicaciones omitidas: ${empty} sin coordenadas, ${invalid} no válidas, ${unknown} con sistema de coordenadas desconocido, ${mismatch} con sistema incompatible, ${projection} con proyección no compatible",
+ "mapNoMarkers": "No hay ubicaciones compatibles en la página cargada",
+ "mapLoading": "Cargando mapa...",
+ "mapLoadError": "No se pudo cargar el mapa. Sus registros siguen disponibles",
+ "mapUnsupportedClient": "Este cliente no dispone de un entorno de mapas aislado. Sus registros siguen disponibles",
+ "mapOffline": "El mapa está sin conexión. Sus registros siguen disponibles",
+ "mapPublicFallback": "Los mapas no se cargan en páginas publicadas ni en exportaciones",
+ "mapConfigureServices": "Configurar servicios de mapas",
+ "mapFitMarkers": "Ajustar a todos los marcadores cargados",
+ "mapTooManyMarkers": "Esta página tiene más de ${limit} ubicaciones. Use filtros o reduzca el tamaño de página para mostrar el mapa",
"defaultCoordinateSystem": "Sistema de coordenadas predeterminado para nuevas entradas",
"defaultCoordinateSystemTip": "Solo se aplica a nuevas entradas; las ubicaciones existentes conservan su sistema de coordenadas",
"locationPasteInEditor": "Pega los pares de coordenadas en el editor de ubicación, donde se indican el orden latitud, longitud y el sistema de coordenadas",
@@ -2750,6 +2797,7 @@
"quit": "Salir de la aplicación"
},
"_attrView": {
+ "map": "Mapa",
"dateCalendar": "Calendario",
"solarCalendar": "Gregoriano",
"lunarCalendar": "Lunar chino",
diff --git a/app/appearance/langs/fr.json b/app/appearance/langs/fr.json
index be7fed72c9..775b408eba 100644
--- a/app/appearance/langs/fr.json
+++ b/app/appearance/langs/fr.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Les cartes sont indisponibles lorsque le contournement de l’authentification est activé. Les enregistrements restent disponibles",
+ "mapSettings": "Carte",
+ "mapServices": "Services cartographiques",
+ "mapServicesTip": "Ajoutez des services pour cet appareil, puis sélectionnez-en un séparément dans chaque vue cartographique de base de données",
+ "mapAddService": "Ajouter un service",
+ "mapServiceName": "Nom du service",
+ "mapServiceID": "ID du service",
+ "mapServiceIDTip": "Conservez cet ID lors de la configuration du même service sur un autre appareil ; les vues existantes continueront à le référencer",
+ "mapProvider": "Fournisseur de cartes",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Code de sécurité",
+ "mapCredentialsTip": "Laissez vide pour conserver l’identifiant enregistré, saisissez un remplacement ou effacez-le explicitement",
+ "mapClearCredential": "Effacer l’identifiant enregistré",
+ "mapCredentialSaved": "Enregistré ; laissez vide pour conserver",
+ "mapCredentialsPresent": "Les champs de configuration requis sont renseignés ; l’accès au service n’a pas été vérifié",
+ "mapCredentialsMissing": "Identifiants requis manquants",
+ "mapNoServices": "Aucun service sélectionné",
+ "mapRenderingTip": "Les cartes affichent uniquement les coordonnées existantes. La recherche d’adresses, le géocodage, les itinéraires et la détection automatique des coordonnées ne sont pas proposés ; les coordonnées enregistrées et leur système déclaré restent inchangés",
+ "mapProductionTip": "Avant utilisation, vérifiez l’éligibilité du compte, les licences, les quotas, les domaines autorisés et les exigences régionales applicables du fournisseur",
+ "mapMissingServiceTip": "Cette vue référence un service manquant. Ajoutez-le avec le même ID pour rétablir la référence",
+ "mapSettingsError": "Impossible de charger ou d’enregistrer les paramètres cartographiques. Veuillez réessayer",
+ "mapSettingsConflict": "Les services cartographiques ont été modifiés ailleurs. Annulez ce brouillon pour recharger les données avant de les modifier à nouveau",
+ "mapServiceIDInvalid": "Utilisez un ID unique de 1 à 128 lettres, chiffres, traits de soulignement ou traits d’union, commençant par une lettre ou un chiffre",
+ "mapServiceNameRequired": "Saisissez un nom de service",
+ "mapSaveOrCancel": "Enregistrez ou annulez d’abord les modifications en cours",
+ "mapDeleteServiceTip": "Supprimer ce service ? Les vues qui référencent son ID resteront non configurées jusqu’à ce que vous ajoutiez à nouveau cet ID ou choisissiez un autre service",
+ "mapView": "Carte",
+ "mapLocationField": "Champ de localisation",
+ "mapService": "Service cartographique",
+ "mapShowRecordList": "Afficher la liste des enregistrements",
+ "mapSelectLocationField": "Sélectionnez un champ de localisation",
+ "mapSelectService": "Sélectionnez un service cartographique",
+ "mapMissingLocationField": "Le champ de localisation enregistré est indisponible. Sélectionnez un champ de localisation",
+ "mapMissingService": "Cet appareil ne dispose pas du service cartographique enregistré. Ajoutez un service avec le même ID dans Paramètres - Carte ou sélectionnez un autre service",
+ "mapPageScope": "La carte affiche ${shown} enregistrements chargés sur ${total} enregistrements filtrés",
+ "mapSkippedLocations": "Localisations ignorées : ${empty} sans coordonnées, ${invalid} invalides, ${unknown} avec un système de coordonnées inconnu, ${mismatch} avec un système incompatible, ${projection} avec une projection non prise en charge",
+ "mapNoMarkers": "Aucune localisation compatible sur la page chargée",
+ "mapLoading": "Chargement de la carte...",
+ "mapLoadError": "La carte n’a pas pu être chargée. Vos enregistrements restent disponibles",
+ "mapUnsupportedClient": "Ce client ne dispose pas d’un environnement cartographique isolé. Vos enregistrements restent disponibles",
+ "mapOffline": "La carte est hors ligne. Vos enregistrements restent disponibles",
+ "mapPublicFallback": "Les cartes ne sont pas chargées dans les pages publiées ni dans les exports",
+ "mapConfigureServices": "Configurer les services cartographiques",
+ "mapFitMarkers": "Ajuster à tous les repères chargés",
+ "mapTooManyMarkers": "Cette page comporte plus de ${limit} localisations. Utilisez des filtres ou réduisez la taille des pages pour afficher la carte",
"defaultCoordinateSystem": "Système de coordonnées par défaut des nouvelles saisies",
"defaultCoordinateSystemTip": "S’applique uniquement aux nouvelles saisies ; les lieux existants conservent leur système de coordonnées",
"locationPasteInEditor": "Collez les paires de coordonnées dans l’éditeur de lieu, où l’ordre latitude, longitude et le système de coordonnées sont précisés",
@@ -2750,6 +2797,7 @@
"quit": "Quitter le programme"
},
"_attrView": {
+ "map": "Carte",
"dateCalendar": "Calendrier",
"solarCalendar": "Grégorien",
"lunarCalendar": "Lunaire chinois",
diff --git a/app/appearance/langs/he.json b/app/appearance/langs/he.json
index 8c8599e75b..5f1792ee5f 100644
--- a/app/appearance/langs/he.json
+++ b/app/appearance/langs/he.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "מפות אינן זמינות כאשר עקיפת האימות מופעלת. הרשומות נשארות זמינות",
+ "mapSettings": "מפה",
+ "mapServices": "שירותי מפות",
+ "mapServicesTip": "הוסף שירותים למכשיר זה, ואז בחר שירות בנפרד בכל תצוגת מפה של מסד הנתונים",
+ "mapAddService": "הוספת שירות",
+ "mapServiceName": "שם השירות",
+ "mapServiceID": "מזהה השירות",
+ "mapServiceIDTip": "שמור על מזהה זה בעת הגדרת אותו שירות במכשיר אחר; תצוגות קיימות ימשיכו להפנות אליו",
+ "mapProvider": "ספק מפות",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "קוד אבטחה",
+ "mapCredentialsTip": "השאר ריק כדי לשמור על פרטי האימות השמורים, הזן תחליף או מחק אותם במפורש",
+ "mapClearCredential": "מחיקת פרטי האימות השמורים",
+ "mapCredentialSaved": "נשמרו; השאר ריק כדי לשמור עליהם",
+ "mapCredentialsPresent": "שדות ההגדרה הנדרשים מולאו; הגישה לשירות טרם אומתה",
+ "mapCredentialsMissing": "חסרים פרטי אימות נדרשים",
+ "mapNoServices": "לא נבחר שירות",
+ "mapRenderingTip": "המפות מציגות רק קואורדינטות קיימות. חיפוש כתובות, קידוד גאוגרפי, מסלולים וזיהוי אוטומטי של קואורדינטות אינם זמינים; הקואורדינטות השמורות ומערכת הקואורדינטות המוצהרת שלהן נשארות ללא שינוי",
+ "mapProductionTip": "לפני השימוש, בדוק את זכאות החשבון, הרישיונות, המכסות, הדומיינים המורשים והדרישות האזוריות החלות של הספק",
+ "mapMissingServiceTip": "תצוגה זו מפנה לשירות חסר. הוסף אותו עם אותו מזהה כדי לשחזר את ההפניה",
+ "mapSettingsError": "לא ניתן לטעון או לשמור את הגדרות המפה. נסה שוב",
+ "mapSettingsConflict": "שירותי המפות השתנו במקום אחר. בטל טיוטה זו כדי לטעון מחדש לפני עריכה נוספת",
+ "mapServiceIDInvalid": "השתמש במזהה ייחודי באורך 1–128 אותיות לטיניות, ספרות, קווים תחתונים או מקפים, המתחיל באות או בספרה",
+ "mapServiceNameRequired": "הזן שם לשירות",
+ "mapSaveOrCancel": "שמור או בטל תחילה את השינויים הנוכחיים",
+ "mapDeleteServiceTip": "למחוק שירות זה? תצוגות המפנות למזהה שלו יישארו ללא הגדרה עד שתוסיף שוב את אותו מזהה או תבחר שירות אחר",
+ "mapView": "מפה",
+ "mapLocationField": "שדה מיקום",
+ "mapService": "שירות מפות",
+ "mapShowRecordList": "הצגת רשימת רשומות",
+ "mapSelectLocationField": "בחר שדה מיקום",
+ "mapSelectService": "בחר שירות מפות",
+ "mapMissingLocationField": "שדה המיקום השמור אינו זמין. בחר שדה מיקום",
+ "mapMissingService": "שירות המפות השמור אינו קיים במכשיר זה. הוסף שירות עם אותו מזהה בהגדרות - מפה, או בחר שירות אחר",
+ "mapPageScope": "המפה מציגה ${shown} רשומות שנטענו מתוך ${total} רשומות מסוננות",
+ "mapSkippedLocations": "מיקומים שדולגו: ${empty} ללא קואורדינטות, ${invalid} לא תקינים, ${unknown} עם מערכת קואורדינטות לא ידועה, ${mismatch} עם מערכת קואורדינטות לא תואמת, ${projection} עם היטל לא נתמך",
+ "mapNoMarkers": "אין מיקומים תואמים בדף שנטען",
+ "mapLoading": "טוען מפה...",
+ "mapLoadError": "לא ניתן לטעון את המפה. הרשומות שלך עדיין זמינות",
+ "mapUnsupportedClient": "סביבת מפות מבודדת אינה זמינה בלקוח זה. הרשומות שלך עדיין זמינות",
+ "mapOffline": "המפה אינה מחוברת לרשת. הרשומות שלך עדיין זמינות",
+ "mapPublicFallback": "מפות אינן נטענות בדפים שפורסמו או בתוכן שיוצא",
+ "mapConfigureServices": "הגדרת שירותי מפות",
+ "mapFitMarkers": "התאמת התצוגה לכל הסמנים שנטענו",
+ "mapTooManyMarkers": "בדף זה יש יותר מ-${limit} מיקומים. השתמש במסננים או הקטן את גודל הדף כדי להציג את המפה",
"defaultCoordinateSystem": "מערכת קואורדינטות כברירת מחדל לקלט חדש",
"defaultCoordinateSystemTip": "חל רק על קלט חדש; מיקומים קיימים שומרים על מערכת הקואורדינטות שלהם",
"locationPasteInEditor": "יש להדביק זוגות קואורדינטות בעורך המיקום, שבו סדר קו הרוחב וקו האורך ומערכת הקואורדינטות מצוינים במפורש",
@@ -2750,6 +2797,7 @@
"quit": "צא מהאפליקציה"
},
"_attrView": {
+ "map": "מפה",
"dateCalendar": "לוח שנה",
"solarCalendar": "גרגוריאני",
"lunarCalendar": "ירחי סיני",
diff --git a/app/appearance/langs/hi.json b/app/appearance/langs/hi.json
index a0f924a130..94ffd94848 100644
--- a/app/appearance/langs/hi.json
+++ b/app/appearance/langs/hi.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "प्रमाणीकरण बायपास सक्षम होने पर मानचित्र उपलब्ध नहीं हैं। रिकॉर्ड उपलब्ध रहते हैं",
+ "mapSettings": "मानचित्र",
+ "mapServices": "मानचित्र सेवाएँ",
+ "mapServicesTip": "इस डिवाइस के लिए सेवाएँ जोड़ें, फिर हर डेटाबेस मानचित्र दृश्य में अलग से सेवा चुनें",
+ "mapAddService": "सेवा जोड़ें",
+ "mapServiceName": "सेवा का नाम",
+ "mapServiceID": "सेवा ID",
+ "mapServiceIDTip": "किसी दूसरे डिवाइस पर यही सेवा कॉन्फ़िगर करते समय यह ID न बदलें; मौजूदा दृश्य इसी का संदर्भ देते रहेंगे",
+ "mapProvider": "मानचित्र प्रदाता",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "सुरक्षा कोड",
+ "mapCredentialsTip": "सहेजे गए क्रेडेंशियल को बनाए रखने के लिए खाली छोड़ें, बदलने के लिए नया मान दर्ज करें या स्पष्ट रूप से मिटाएँ",
+ "mapClearCredential": "सहेजा गया क्रेडेंशियल मिटाएँ",
+ "mapCredentialSaved": "सहेजा गया; बनाए रखने के लिए खाली छोड़ें",
+ "mapCredentialsPresent": "आवश्यक कॉन्फ़िगरेशन फ़ील्ड भरे गए हैं; सेवा तक पहुँच सत्यापित नहीं की गई है",
+ "mapCredentialsMissing": "आवश्यक क्रेडेंशियल मौजूद नहीं हैं",
+ "mapNoServices": "कोई सेवा नहीं चुनी गई",
+ "mapRenderingTip": "मानचित्र केवल मौजूदा निर्देशांक दिखाते हैं। पता खोजना, जियोकोडिंग, मार्ग और निर्देशांकों की स्वचालित पहचान उपलब्ध नहीं हैं; सहेजे गए निर्देशांक और उनकी घोषित निर्देशांक प्रणाली अपरिवर्तित रहती है",
+ "mapProductionTip": "उपयोग से पहले प्रदाता की खाता पात्रता, लाइसेंस, कोटा, अनुमत डोमेन और लागू क्षेत्रीय आवश्यकताएँ जाँचें",
+ "mapMissingServiceTip": "यह दृश्य एक अनुपलब्ध सेवा का संदर्भ देता है। संदर्भ बहाल करने के लिए उसी ID से सेवा जोड़ें",
+ "mapSettingsError": "मानचित्र सेटिंग लोड या सहेजी नहीं जा सकीं। फिर से कोशिश करें",
+ "mapSettingsConflict": "मानचित्र सेवाएँ किसी अन्य स्थान पर बदल गई हैं। फिर से संपादित करने से पहले दोबारा लोड करने के लिए यह ड्राफ़्ट रद्द करें",
+ "mapServiceIDInvalid": "1–128 लैटिन अक्षरों, अंकों, अंडरस्कोर या हाइफ़न से बनी अनोखी ID उपयोग करें, जो अक्षर या अंक से शुरू हो",
+ "mapServiceNameRequired": "सेवा का नाम दर्ज करें",
+ "mapSaveOrCancel": "पहले मौजूदा बदलाव सहेजें या रद्द करें",
+ "mapDeleteServiceTip": "यह सेवा मिटाएँ? इसकी ID का संदर्भ देने वाले दृश्य तब तक कॉन्फ़िगर नहीं होंगे, जब तक आप वही ID दोबारा न जोड़ें या दूसरी सेवा न चुनें",
+ "mapView": "मानचित्र",
+ "mapLocationField": "स्थान फ़ील्ड",
+ "mapService": "मानचित्र सेवा",
+ "mapShowRecordList": "रिकॉर्ड सूची दिखाएँ",
+ "mapSelectLocationField": "स्थान फ़ील्ड चुनें",
+ "mapSelectService": "मानचित्र सेवा चुनें",
+ "mapMissingLocationField": "सहेजा गया स्थान फ़ील्ड उपलब्ध नहीं है। स्थान फ़ील्ड चुनें",
+ "mapMissingService": "इस डिवाइस पर सहेजी गई मानचित्र सेवा नहीं है। सेटिंग - मानचित्र में उसी ID से सेवा जोड़ें या दूसरी सेवा चुनें",
+ "mapPageScope": "मानचित्र ${total} फ़िल्टर किए गए रिकॉर्ड में से ${shown} लोड किए गए रिकॉर्ड दिखाता है",
+ "mapSkippedLocations": "छोड़े गए स्थान: ${empty} में निर्देशांक नहीं हैं, ${invalid} अमान्य हैं, ${unknown} की निर्देशांक प्रणाली अज्ञात है, ${mismatch} की निर्देशांक प्रणाली असंगत है, ${projection} का मानचित्र प्रक्षेपण समर्थित नहीं है",
+ "mapNoMarkers": "लोड किए गए पृष्ठ पर कोई संगत स्थान नहीं है",
+ "mapLoading": "मानचित्र लोड हो रहा है...",
+ "mapLoadError": "मानचित्र लोड नहीं हो सका। आपके रिकॉर्ड अभी भी उपलब्ध हैं",
+ "mapUnsupportedClient": "इस क्लाइंट में अलग-थलग मानचित्र परिवेश उपलब्ध नहीं है। आपके रिकॉर्ड अभी भी उपलब्ध हैं",
+ "mapOffline": "मानचित्र ऑफ़लाइन है। आपके रिकॉर्ड अभी भी उपलब्ध हैं",
+ "mapPublicFallback": "प्रकाशित पृष्ठों या निर्यात में मानचित्र लोड नहीं किए जाते",
+ "mapConfigureServices": "मानचित्र सेवाएँ कॉन्फ़िगर करें",
+ "mapFitMarkers": "सभी लोड किए गए मार्कर दृश्य में समाएँ",
+ "mapTooManyMarkers": "इस पृष्ठ पर ${limit} से अधिक स्थान हैं। मानचित्र दिखाने के लिए फ़िल्टर उपयोग करें या पृष्ठ का आकार कम करें",
"defaultCoordinateSystem": "नए इनपुट के लिए डिफ़ॉल्ट निर्देशांक प्रणाली",
"defaultCoordinateSystemTip": "केवल नए इनपुट पर लागू होता है; मौजूदा स्थान अपनी निर्देशांक प्रणाली बनाए रखते हैं",
"locationPasteInEditor": "निर्देशांक जोड़े स्थान संपादक में पेस्ट करें, जहाँ अक्षांश, देशांतर का क्रम और निर्देशांक प्रणाली स्पष्ट हैं",
@@ -2750,6 +2797,7 @@
"quit": "एप्लिकेशन से बाहर निकलें"
},
"_attrView": {
+ "map": "मानचित्र",
"dateCalendar": "पंचांग",
"solarCalendar": "ग्रेगोरियन",
"lunarCalendar": "चीनी चंद्र पंचांग",
diff --git a/app/appearance/langs/id.json b/app/appearance/langs/id.json
index d391156267..eba636165f 100644
--- a/app/appearance/langs/id.json
+++ b/app/appearance/langs/id.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Peta tidak tersedia saat fitur melewati autentikasi diaktifkan. Rekaman tetap tersedia",
+ "mapSettings": "Peta",
+ "mapServices": "Layanan peta",
+ "mapServicesTip": "Tambahkan layanan untuk perangkat ini, lalu pilih layanan secara terpisah di setiap tampilan peta basis data",
+ "mapAddService": "Tambah layanan",
+ "mapServiceName": "Nama layanan",
+ "mapServiceID": "ID layanan",
+ "mapServiceIDTip": "Pertahankan ID ini saat mengonfigurasi layanan yang sama di perangkat lain; tampilan yang ada akan tetap merujuknya",
+ "mapProvider": "Penyedia peta",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Kode keamanan",
+ "mapCredentialsTip": "Biarkan kosong untuk mempertahankan kredensial tersimpan, masukkan pengganti, atau hapus secara eksplisit",
+ "mapClearCredential": "Hapus kredensial tersimpan",
+ "mapCredentialSaved": "Tersimpan; biarkan kosong untuk mempertahankan",
+ "mapCredentialsPresent": "Kolom konfigurasi yang diperlukan telah diisi; akses layanan belum diverifikasi",
+ "mapCredentialsMissing": "Kredensial yang diperlukan belum tersedia",
+ "mapNoServices": "Tidak ada layanan yang dipilih",
+ "mapRenderingTip": "Peta hanya menampilkan koordinat yang sudah ada. Pencarian alamat, geocoding, rute, dan deteksi koordinat otomatis tidak disediakan; koordinat tersimpan dan sistem koordinat yang dinyatakan tidak diubah",
+ "mapProductionTip": "Sebelum digunakan, periksa kelayakan akun, lisensi, kuota, domain yang diizinkan, dan persyaratan wilayah yang berlaku dari penyedia",
+ "mapMissingServiceTip": "Tampilan ini merujuk layanan yang tidak ada. Tambahkan layanan dengan ID yang sama untuk memulihkan rujukan",
+ "mapSettingsError": "Tidak dapat memuat atau menyimpan pengaturan peta. Coba lagi",
+ "mapSettingsConflict": "Layanan peta diubah di tempat lain. Batalkan draf ini untuk memuat ulang sebelum mengedit lagi",
+ "mapServiceIDInvalid": "Gunakan ID unik berisi 1–128 huruf Latin, angka, garis bawah, atau tanda hubung, diawali huruf atau angka",
+ "mapServiceNameRequired": "Masukkan nama layanan",
+ "mapSaveOrCancel": "Simpan atau batalkan perubahan saat ini terlebih dahulu",
+ "mapDeleteServiceTip": "Hapus layanan ini? Tampilan yang merujuk ID-nya akan tetap belum dikonfigurasi sampai Anda menambahkan kembali ID tersebut atau memilih layanan lain",
+ "mapView": "Peta",
+ "mapLocationField": "Kolom lokasi",
+ "mapService": "Layanan peta",
+ "mapShowRecordList": "Tampilkan daftar rekaman",
+ "mapSelectLocationField": "Pilih kolom lokasi",
+ "mapSelectService": "Pilih layanan peta",
+ "mapMissingLocationField": "Kolom lokasi yang disimpan tidak tersedia. Pilih kolom lokasi",
+ "mapMissingService": "Perangkat ini tidak memiliki layanan peta yang disimpan. Tambahkan layanan dengan ID yang sama di Pengaturan - Peta atau pilih layanan lain",
+ "mapPageScope": "Peta menampilkan ${shown} rekaman yang dimuat dari ${total} rekaman hasil penyaringan",
+ "mapSkippedLocations": "Lokasi yang dilewati: ${empty} tanpa koordinat, ${invalid} tidak valid, ${unknown} dengan sistem koordinat tidak diketahui, ${mismatch} dengan sistem koordinat tidak kompatibel, ${projection} dengan proyeksi tidak didukung",
+ "mapNoMarkers": "Tidak ada lokasi yang kompatibel pada halaman yang dimuat",
+ "mapLoading": "Memuat peta...",
+ "mapLoadError": "Peta tidak dapat dimuat. Rekaman Anda tetap tersedia",
+ "mapUnsupportedClient": "Lingkungan peta terisolasi tidak tersedia pada klien ini. Rekaman Anda tetap tersedia",
+ "mapOffline": "Peta sedang luring. Rekaman Anda tetap tersedia",
+ "mapPublicFallback": "Peta tidak dimuat pada halaman yang dipublikasikan atau hasil ekspor",
+ "mapConfigureServices": "Konfigurasi layanan peta",
+ "mapFitMarkers": "Sesuaikan tampilan dengan semua penanda yang dimuat",
+ "mapTooManyMarkers": "Halaman ini memiliki lebih dari ${limit} lokasi. Gunakan filter atau ukuran halaman yang lebih kecil untuk menampilkan peta",
"defaultCoordinateSystem": "Sistem koordinat bawaan untuk masukan baru",
"defaultCoordinateSystemTip": "Hanya berlaku untuk masukan baru; lokasi yang ada mempertahankan sistem koordinatnya",
"locationPasteInEditor": "Tempel pasangan koordinat di editor lokasi, tempat urutan lintang, bujur dan sistem koordinat ditentukan dengan jelas",
@@ -2750,6 +2797,7 @@
"quit": "Keluar aplikasi"
},
"_attrView": {
+ "map": "Peta",
"dateCalendar": "Kalender",
"solarCalendar": "Gregorian",
"lunarCalendar": "Lunar Tionghoa",
diff --git a/app/appearance/langs/it.json b/app/appearance/langs/it.json
index df9a8651f1..34a06d5b14 100644
--- a/app/appearance/langs/it.json
+++ b/app/appearance/langs/it.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Le mappe non sono disponibili quando è attivo il bypass dell’autenticazione. I record restano disponibili",
+ "mapSettings": "Mappa",
+ "mapServices": "Servizi cartografici",
+ "mapServicesTip": "Aggiungi servizi per questo dispositivo, poi selezionane uno separatamente in ogni vista mappa del database",
+ "mapAddService": "Aggiungi servizio",
+ "mapServiceName": "Nome del servizio",
+ "mapServiceID": "ID del servizio",
+ "mapServiceIDTip": "Mantieni questo ID quando configuri lo stesso servizio su un altro dispositivo; le viste esistenti continueranno a farvi riferimento",
+ "mapProvider": "Fornitore di mappe",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Codice di sicurezza",
+ "mapCredentialsTip": "Lascia vuoto per mantenere la credenziale salvata, inseriscine una sostitutiva o cancellala esplicitamente",
+ "mapClearCredential": "Cancella la credenziale salvata",
+ "mapCredentialSaved": "Salvata; lascia vuoto per mantenerla",
+ "mapCredentialsPresent": "I campi di configurazione richiesti sono compilati; l’accesso al servizio non è stato verificato",
+ "mapCredentialsMissing": "Mancano le credenziali richieste",
+ "mapNoServices": "Nessun servizio selezionato",
+ "mapRenderingTip": "Le mappe mostrano solo coordinate esistenti. Non sono disponibili ricerca di indirizzi, geocodifica, percorsi o rilevamento automatico delle coordinate; le coordinate salvate e il relativo sistema dichiarato restano invariati",
+ "mapProductionTip": "Prima dell’uso, verifica l’idoneità dell’account, le licenze, le quote, i domini consentiti e i requisiti regionali applicabili del fornitore",
+ "mapMissingServiceTip": "Questa vista fa riferimento a un servizio mancante. Aggiungilo con lo stesso ID per ripristinare il riferimento",
+ "mapSettingsError": "Impossibile caricare o salvare le impostazioni della mappa. Riprova",
+ "mapSettingsConflict": "I servizi cartografici sono stati modificati altrove. Annulla questa bozza per ricaricare i dati prima di modificarli nuovamente",
+ "mapServiceIDInvalid": "Usa un ID univoco di 1–128 lettere, cifre, trattini bassi o trattini, che inizi con una lettera o una cifra",
+ "mapServiceNameRequired": "Inserisci un nome per il servizio",
+ "mapSaveOrCancel": "Salva o annulla prima le modifiche correnti",
+ "mapDeleteServiceTip": "Eliminare questo servizio? Le viste che ne usano l’ID resteranno non configurate finché non aggiungerai nuovamente lo stesso ID o sceglierai un altro servizio",
+ "mapView": "Mappa",
+ "mapLocationField": "Campo posizione",
+ "mapService": "Servizio cartografico",
+ "mapShowRecordList": "Mostra elenco dei record",
+ "mapSelectLocationField": "Seleziona un campo posizione",
+ "mapSelectService": "Seleziona un servizio cartografico",
+ "mapMissingLocationField": "Il campo posizione salvato non è disponibile. Seleziona un campo posizione",
+ "mapMissingService": "Questo dispositivo non dispone del servizio cartografico salvato. Aggiungi un servizio con lo stesso ID in Impostazioni - Mappa oppure selezionane un altro",
+ "mapPageScope": "La mappa mostra ${shown} record caricati su ${total} record filtrati",
+ "mapSkippedLocations": "Posizioni ignorate: ${empty} senza coordinate, ${invalid} non valide, ${unknown} con sistema di coordinate sconosciuto, ${mismatch} con sistema incompatibile, ${projection} con proiezione non supportata",
+ "mapNoMarkers": "Nessuna posizione compatibile nella pagina caricata",
+ "mapLoading": "Caricamento della mappa...",
+ "mapLoadError": "Impossibile caricare la mappa. I tuoi record sono ancora disponibili",
+ "mapUnsupportedClient": "Questo client non dispone di un ambiente isolato per le mappe. I tuoi record sono ancora disponibili",
+ "mapOffline": "La mappa è offline. I tuoi record sono ancora disponibili",
+ "mapPublicFallback": "Le mappe non vengono caricate nelle pagine pubblicate o nelle esportazioni",
+ "mapConfigureServices": "Configura servizi cartografici",
+ "mapFitMarkers": "Inquadra tutti gli indicatori caricati",
+ "mapTooManyMarkers": "Questa pagina contiene più di ${limit} posizioni. Usa i filtri o riduci la dimensione della pagina per visualizzare la mappa",
"defaultCoordinateSystem": "Sistema di coordinate predefinito per nuovi inserimenti",
"defaultCoordinateSystemTip": "Si applica solo ai nuovi inserimenti; le posizioni esistenti mantengono il proprio sistema di coordinate",
"locationPasteInEditor": "Incolla le coppie di coordinate nell’editor della posizione, dove sono indicati l’ordine latitudine, longitudine e il sistema di coordinate",
@@ -2750,6 +2797,7 @@
"quit": "Esci dall'applicazione"
},
"_attrView": {
+ "map": "Mappa",
"dateCalendar": "Calendario",
"solarCalendar": "Gregoriano",
"lunarCalendar": "Lunare cinese",
diff --git a/app/appearance/langs/ja.json b/app/appearance/langs/ja.json
index faa27ed508..c1def47411 100644
--- a/app/appearance/langs/ja.json
+++ b/app/appearance/langs/ja.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "認証のバイパスが有効な間は地図を利用できません。レコードは引き続き利用できます",
+ "mapSettings": "地図",
+ "mapServices": "地図サービス",
+ "mapServicesTip": "このデバイスにサービスを追加し、各データベースの地図ビューで個別にサービスを選択します",
+ "mapAddService": "サービスを追加",
+ "mapServiceName": "サービス名",
+ "mapServiceID": "サービス ID",
+ "mapServiceIDTip": "別のデバイスで同じサービスを設定する際はこの ID を維持してください。既存のビューは引き続きこの ID を参照します",
+ "mapProvider": "地図プロバイダー",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "セキュリティコード",
+ "mapCredentialsTip": "空欄なら保存済みの認証情報を保持します。置き換える場合は新しい値を入力し、削除する場合は明示的に消去してください",
+ "mapClearCredential": "保存済みの認証情報を消去",
+ "mapCredentialSaved": "保存済み。保持する場合は空欄",
+ "mapCredentialsPresent": "必要な設定項目は入力済みです。サービスへのアクセスは未検証です",
+ "mapCredentialsMissing": "必要な認証情報がありません",
+ "mapNoServices": "サービス未選択",
+ "mapRenderingTip": "地図は既存の座標のみを表示します。住所検索、ジオコーディング、経路案内、座標の自動検出は提供しません。保存済みの座標と指定された座標系は変更されません",
+ "mapProductionTip": "利用前に、プロバイダーのアカウント利用資格、ライセンス、割り当て量、許可ドメイン、適用される地域要件を確認してください",
+ "mapMissingServiceTip": "このビューは存在しないサービスを参照しています。同じ ID でサービスを追加すると参照を復元できます",
+ "mapSettingsError": "地図設定を読み込みまたは保存できませんでした。再試行してください",
+ "mapSettingsConflict": "地図サービスが別の場所で変更されました。この下書きをキャンセルして再読み込みしてから、もう一度編集してください",
+ "mapServiceIDInvalid": "英字、数字、アンダースコア、ハイフンで構成される 1~128 文字の一意な ID を使用し、先頭を英字または数字にしてください",
+ "mapServiceNameRequired": "サービス名を入力してください",
+ "mapSaveOrCancel": "先に現在の変更を保存またはキャンセルしてください",
+ "mapDeleteServiceTip": "このサービスを削除しますか?その ID を参照するビューは、同じ ID を再追加するか別のサービスを選択するまで未設定のままになります",
+ "mapView": "地図",
+ "mapLocationField": "位置フィールド",
+ "mapService": "地図サービス",
+ "mapShowRecordList": "レコード一覧を表示",
+ "mapSelectLocationField": "位置フィールドを選択してください",
+ "mapSelectService": "地図サービスを選択してください",
+ "mapMissingLocationField": "保存された位置フィールドを利用できません。位置フィールドを選択してください",
+ "mapMissingService": "このデバイスには保存された地図サービスがありません。設定 - 地図で同じ ID のサービスを追加するか、別のサービスを選択してください",
+ "mapPageScope": "地図には絞り込み後の ${total} 件のうち、読み込み済みの ${shown} 件を表示しています",
+ "mapSkippedLocations": "スキップした位置:座標なし ${empty} 件、無効 ${invalid} 件、座標系不明 ${unknown} 件、座標系非互換 ${mismatch} 件、投影非対応 ${projection} 件",
+ "mapNoMarkers": "読み込み済みのページに互換性のある位置がありません",
+ "mapLoading": "地図を読み込み中...",
+ "mapLoadError": "地図を読み込めませんでした。レコードは引き続き利用できます",
+ "mapUnsupportedClient": "このクライアントでは分離された地図実行環境を利用できません。レコードは引き続き利用できます",
+ "mapOffline": "地図はオフラインです。レコードは引き続き利用できます",
+ "mapPublicFallback": "公開ページやエクスポートでは地図を読み込みません",
+ "mapConfigureServices": "地図サービスを設定",
+ "mapFitMarkers": "読み込み済みの全マーカーを表示範囲に収める",
+ "mapTooManyMarkers": "このページには ${limit} 件を超える位置があります。フィルターを使用するか、ページあたりの件数を減らして地図を表示してください",
"defaultCoordinateSystem": "新規入力の既定の座標系",
"defaultCoordinateSystemTip": "新規入力にのみ適用され、既存の位置の座標系は変わりません",
"locationPasteInEditor": "緯度、経度の順序と座標系を確認できる位置エディターで座標の組を貼り付けてください",
@@ -2750,6 +2797,7 @@
"quit": "アプリケーションを終了"
},
"_attrView": {
+ "map": "地図",
"dateCalendar": "暦",
"solarCalendar": "グレゴリオ暦",
"lunarCalendar": "旧暦(中国暦)",
diff --git a/app/appearance/langs/ko.json b/app/appearance/langs/ko.json
index c5714d90b0..87254dd0f7 100644
--- a/app/appearance/langs/ko.json
+++ b/app/appearance/langs/ko.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "인증 우회가 활성화된 동안에는 지도를 사용할 수 없습니다. 레코드는 계속 사용할 수 있습니다",
+ "mapSettings": "지도",
+ "mapServices": "지도 서비스",
+ "mapServicesTip": "이 기기에 서비스를 추가한 다음 각 데이터베이스 지도 보기에서 서비스를 개별적으로 선택하세요",
+ "mapAddService": "서비스 추가",
+ "mapServiceName": "서비스 이름",
+ "mapServiceID": "서비스 ID",
+ "mapServiceIDTip": "다른 기기에서 같은 서비스를 설정할 때 이 ID를 유지하세요. 기존 보기는 계속 이 ID를 참조합니다",
+ "mapProvider": "지도 제공업체",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "보안 코드",
+ "mapCredentialsTip": "저장된 인증 정보를 유지하려면 비워 두고, 바꾸려면 새 값을 입력하거나 명시적으로 지우세요",
+ "mapClearCredential": "저장된 인증 정보 지우기",
+ "mapCredentialSaved": "저장됨. 유지하려면 비워 두세요",
+ "mapCredentialsPresent": "필수 설정 항목이 입력되었습니다. 서비스 접근 여부는 확인되지 않았습니다",
+ "mapCredentialsMissing": "필수 인증 정보가 없습니다",
+ "mapNoServices": "선택한 서비스 없음",
+ "mapRenderingTip": "지도는 기존 좌표만 표시합니다. 주소 검색, 지오코딩, 경로 안내 및 자동 좌표 감지는 제공되지 않으며, 저장된 좌표와 지정된 좌표계는 변경되지 않습니다",
+ "mapProductionTip": "사용 전에 제공업체의 계정 자격, 라이선스, 할당량, 허용 도메인 및 적용되는 지역별 요건을 확인하세요",
+ "mapMissingServiceTip": "이 보기는 없는 서비스를 참조합니다. 참조를 복원하려면 같은 ID로 서비스를 추가하세요",
+ "mapSettingsError": "지도 설정을 불러오거나 저장할 수 없습니다. 다시 시도하세요",
+ "mapSettingsConflict": "지도 서비스가 다른 곳에서 변경되었습니다. 이 초안을 취소하여 다시 불러온 후 편집하세요",
+ "mapServiceIDInvalid": "영문자, 숫자, 밑줄 또는 하이픈으로 된 1~128자의 고유 ID를 사용하고 영문자나 숫자로 시작하세요",
+ "mapServiceNameRequired": "서비스 이름을 입력하세요",
+ "mapSaveOrCancel": "먼저 현재 변경 사항을 저장하거나 취소하세요",
+ "mapDeleteServiceTip": "이 서비스를 삭제할까요? 해당 ID를 참조하는 보기는 같은 ID를 다시 추가하거나 다른 서비스를 선택할 때까지 설정되지 않은 상태로 유지됩니다",
+ "mapView": "지도",
+ "mapLocationField": "위치 필드",
+ "mapService": "지도 서비스",
+ "mapShowRecordList": "레코드 목록 표시",
+ "mapSelectLocationField": "위치 필드를 선택하세요",
+ "mapSelectService": "지도 서비스를 선택하세요",
+ "mapMissingLocationField": "저장된 위치 필드를 사용할 수 없습니다. 위치 필드를 선택하세요",
+ "mapMissingService": "이 기기에 저장된 지도 서비스가 없습니다. 설정 - 지도에서 같은 ID의 서비스를 추가하거나 다른 서비스를 선택하세요",
+ "mapPageScope": "지도에는 필터링된 ${total}개 레코드 중 불러온 ${shown}개가 표시됩니다",
+ "mapSkippedLocations": "건너뛴 위치: 좌표 없음 ${empty}개, 유효하지 않음 ${invalid}개, 알 수 없는 좌표계 ${unknown}개, 호환되지 않는 좌표계 ${mismatch}개, 지원되지 않는 투영 ${projection}개",
+ "mapNoMarkers": "불러온 페이지에 호환되는 위치가 없습니다",
+ "mapLoading": "지도 불러오는 중...",
+ "mapLoadError": "지도를 불러올 수 없습니다. 레코드는 계속 사용할 수 있습니다",
+ "mapUnsupportedClient": "이 클라이언트에서는 격리된 지도 실행 환경을 사용할 수 없습니다. 레코드는 계속 사용할 수 있습니다",
+ "mapOffline": "지도가 오프라인 상태입니다. 레코드는 계속 사용할 수 있습니다",
+ "mapPublicFallback": "게시된 페이지나 내보낸 콘텐츠에서는 지도를 불러오지 않습니다",
+ "mapConfigureServices": "지도 서비스 설정",
+ "mapFitMarkers": "불러온 모든 마커에 맞추기",
+ "mapTooManyMarkers": "이 페이지의 위치가 ${limit}개를 초과합니다. 지도를 표시하려면 필터를 사용하거나 페이지 크기를 줄이세요",
"defaultCoordinateSystem": "새 입력의 기본 좌표계",
"defaultCoordinateSystemTip": "새 입력에만 적용되며 기존 위치는 각자의 좌표계를 유지합니다",
"locationPasteInEditor": "위도, 경도 순서와 좌표계가 명확하게 표시된 위치 편집기에 좌표 쌍을 붙여넣으세요",
@@ -2750,6 +2797,7 @@
"quit": "애플리케이션 종료"
},
"_attrView": {
+ "map": "지도",
"dateCalendar": "달력 체계",
"solarCalendar": "양력",
"lunarCalendar": "중국 음력",
diff --git a/app/appearance/langs/nl.json b/app/appearance/langs/nl.json
index 04f2bcb5e6..dc56dd3dcc 100644
--- a/app/appearance/langs/nl.json
+++ b/app/appearance/langs/nl.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Kaarten zijn niet beschikbaar wanneer het omzeilen van authenticatie is ingeschakeld. Records blijven beschikbaar",
+ "mapSettings": "Kaart",
+ "mapServices": "Kaartdiensten",
+ "mapServicesTip": "Voeg diensten voor dit apparaat toe en selecteer daarna in elke kaartweergave van een database afzonderlijk een dienst",
+ "mapAddService": "Dienst toevoegen",
+ "mapServiceName": "Dienstnaam",
+ "mapServiceID": "Dienst-ID",
+ "mapServiceIDTip": "Behoud deze ID bij het instellen van dezelfde dienst op een ander apparaat; bestaande weergaven blijven ernaar verwijzen",
+ "mapProvider": "Kaartaanbieder",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Beveiligingscode",
+ "mapCredentialsTip": "Laat leeg om de opgeslagen inloggegevens te behouden, voer vervangende gegevens in of wis ze expliciet",
+ "mapClearCredential": "Opgeslagen inloggegevens wissen",
+ "mapCredentialSaved": "Opgeslagen; laat leeg om te behouden",
+ "mapCredentialsPresent": "De vereiste configuratievelden zijn ingevuld; toegang tot de dienst is niet gecontroleerd",
+ "mapCredentialsMissing": "Vereiste inloggegevens ontbreken",
+ "mapNoServices": "Geen dienst geselecteerd",
+ "mapRenderingTip": "Kaarten tonen alleen bestaande coördinaten. Adreszoeken, geocodering, routes en automatische coördinatendetectie zijn niet beschikbaar; opgeslagen coördinaten en hun opgegeven coördinatenstelsel blijven ongewijzigd",
+ "mapProductionTip": "Controleer vóór gebruik de accountvereisten, licenties, quota, toegestane domeinen en toepasselijke regionale vereisten van de aanbieder",
+ "mapMissingServiceTip": "Deze weergave verwijst naar een ontbrekende dienst. Voeg deze met dezelfde ID toe om de verwijzing te herstellen",
+ "mapSettingsError": "Kaartinstellingen konden niet worden geladen of opgeslagen. Probeer het opnieuw",
+ "mapSettingsConflict": "Kaartdiensten zijn elders gewijzigd. Annuleer dit concept om de gegevens opnieuw te laden voordat u verder bewerkt",
+ "mapServiceIDInvalid": "Gebruik een unieke ID van 1–128 letters, cijfers, onderstrepingstekens of koppeltekens, beginnend met een letter of cijfer",
+ "mapServiceNameRequired": "Voer een dienstnaam in",
+ "mapSaveOrCancel": "Sla de huidige wijzigingen eerst op of annuleer ze",
+ "mapDeleteServiceTip": "Deze dienst verwijderen? Weergaven die naar deze ID verwijzen blijven ongeconfigureerd totdat u dezelfde ID opnieuw toevoegt of een andere dienst kiest",
+ "mapView": "Kaart",
+ "mapLocationField": "Locatieveld",
+ "mapService": "Kaartdienst",
+ "mapShowRecordList": "Recordlijst tonen",
+ "mapSelectLocationField": "Selecteer een locatieveld",
+ "mapSelectService": "Selecteer een kaartdienst",
+ "mapMissingLocationField": "Het opgeslagen locatieveld is niet beschikbaar. Selecteer een locatieveld",
+ "mapMissingService": "Dit apparaat heeft de opgeslagen kaartdienst niet. Voeg een dienst met dezelfde ID toe onder Instellingen - Kaart of selecteer een andere dienst",
+ "mapPageScope": "De kaart toont ${shown} geladen records van ${total} gefilterde records",
+ "mapSkippedLocations": "Overgeslagen locaties: ${empty} zonder coördinaten, ${invalid} ongeldig, ${unknown} met onbekend coördinatenstelsel, ${mismatch} met incompatibel coördinatenstelsel, ${projection} met niet-ondersteunde projectie",
+ "mapNoMarkers": "Geen compatibele locaties op de geladen pagina",
+ "mapLoading": "Kaart laden...",
+ "mapLoadError": "De kaart kon niet worden geladen. Uw records zijn nog beschikbaar",
+ "mapUnsupportedClient": "Deze client heeft geen geïsoleerde kaartomgeving. Uw records zijn nog beschikbaar",
+ "mapOffline": "De kaart is offline. Uw records zijn nog beschikbaar",
+ "mapPublicFallback": "Kaarten worden niet geladen in gepubliceerde pagina’s of exports",
+ "mapConfigureServices": "Kaartdiensten configureren",
+ "mapFitMarkers": "Alle geladen markeringen in beeld brengen",
+ "mapTooManyMarkers": "Deze pagina heeft meer dan ${limit} locaties. Gebruik filters of verklein de paginagrootte om de kaart weer te geven",
"defaultCoordinateSystem": "Standaardcoördinatenstelsel voor nieuwe invoer",
"defaultCoordinateSystemTip": "Geldt alleen voor nieuwe invoer; bestaande locaties behouden hun coördinatenstelsel",
"locationPasteInEditor": "Plak coördinatenparen in de locatie-editor, waar de volgorde breedtegraad, lengtegraad en het coördinatenstelsel expliciet zijn aangegeven",
@@ -2750,6 +2797,7 @@
"quit": "Applicatie afsluiten"
},
"_attrView": {
+ "map": "Kaart",
"dateCalendar": "Kalender",
"solarCalendar": "Gregoriaans",
"lunarCalendar": "Chinese maankalender",
diff --git a/app/appearance/langs/pl.json b/app/appearance/langs/pl.json
index 69028c9d65..a128e9c0e0 100644
--- a/app/appearance/langs/pl.json
+++ b/app/appearance/langs/pl.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Mapy są niedostępne, gdy pomijanie uwierzytelniania jest włączone. Rekordy pozostają dostępne",
+ "mapSettings": "Mapa",
+ "mapServices": "Usługi map",
+ "mapServicesTip": "Dodaj usługi dla tego urządzenia, a następnie wybierz usługę osobno w każdym widoku mapy bazy danych",
+ "mapAddService": "Dodaj usługę",
+ "mapServiceName": "Nazwa usługi",
+ "mapServiceID": "ID usługi",
+ "mapServiceIDTip": "Zachowaj ten ID podczas konfigurowania tej samej usługi na innym urządzeniu; istniejące widoki nadal będą się do niego odwoływać",
+ "mapProvider": "Dostawca map",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Kod zabezpieczający",
+ "mapCredentialsTip": "Pozostaw puste, aby zachować zapisane dane uwierzytelniające, wpisz nowe lub jawnie usuń zapisane",
+ "mapClearCredential": "Usuń zapisane dane uwierzytelniające",
+ "mapCredentialSaved": "Zapisano; pozostaw puste, aby zachować",
+ "mapCredentialsPresent": "Wymagane pola konfiguracji są wypełnione; dostęp do usługi nie został zweryfikowany",
+ "mapCredentialsMissing": "Brakuje wymaganych danych uwierzytelniających",
+ "mapNoServices": "Nie wybrano usługi",
+ "mapRenderingTip": "Mapy wyświetlają tylko istniejące współrzędne. Wyszukiwanie adresów, geokodowanie, trasy i automatyczne wykrywanie współrzędnych nie są dostępne; zapisane współrzędne i ich zadeklarowany układ pozostają bez zmian",
+ "mapProductionTip": "Przed użyciem sprawdź wymagania dotyczące konta, licencje, limity, dozwolone domeny oraz obowiązujące wymagania regionalne dostawcy",
+ "mapMissingServiceTip": "Ten widok odwołuje się do brakującej usługi. Dodaj ją z tym samym ID, aby przywrócić odwołanie",
+ "mapSettingsError": "Nie udało się wczytać lub zapisać ustawień mapy. Spróbuj ponownie",
+ "mapSettingsConflict": "Usługi map zmieniono w innym miejscu. Anuluj ten szkic, aby ponownie wczytać dane przed dalszą edycją",
+ "mapServiceIDInvalid": "Użyj unikalnego ID złożonego z 1–128 liter łacińskich, cyfr, podkreśleń lub łączników, zaczynającego się od litery lub cyfry",
+ "mapServiceNameRequired": "Wpisz nazwę usługi",
+ "mapSaveOrCancel": "Najpierw zapisz lub anuluj bieżące zmiany",
+ "mapDeleteServiceTip": "Usunąć tę usługę? Widoki odwołujące się do jej ID pozostaną nieskonfigurowane, dopóki nie dodasz ponownie tego ID lub nie wybierzesz innej usługi",
+ "mapView": "Mapa",
+ "mapLocationField": "Pole lokalizacji",
+ "mapService": "Usługa map",
+ "mapShowRecordList": "Pokaż listę rekordów",
+ "mapSelectLocationField": "Wybierz pole lokalizacji",
+ "mapSelectService": "Wybierz usługę map",
+ "mapMissingLocationField": "Zapisane pole lokalizacji jest niedostępne. Wybierz pole lokalizacji",
+ "mapMissingService": "Na tym urządzeniu nie ma zapisanej usługi map. Dodaj usługę z tym samym ID w Ustawienia - Mapa lub wybierz inną usługę",
+ "mapPageScope": "Mapa pokazuje ${shown} wczytanych rekordów z ${total} przefiltrowanych",
+ "mapSkippedLocations": "Pominięte lokalizacje: ${empty} bez współrzędnych, ${invalid} nieprawidłowych, ${unknown} z nieznanym układem współrzędnych, ${mismatch} z niezgodnym układem współrzędnych, ${projection} z nieobsługiwanym odwzorowaniem",
+ "mapNoMarkers": "Brak zgodnych lokalizacji na wczytanej stronie",
+ "mapLoading": "Wczytywanie mapy...",
+ "mapLoadError": "Nie udało się wczytać mapy. Twoje rekordy są nadal dostępne",
+ "mapUnsupportedClient": "Ten klient nie udostępnia izolowanego środowiska map. Twoje rekordy są nadal dostępne",
+ "mapOffline": "Mapa jest offline. Twoje rekordy są nadal dostępne",
+ "mapPublicFallback": "Mapy nie są wczytywane na opublikowanych stronach ani w eksportach",
+ "mapConfigureServices": "Konfiguruj usługi map",
+ "mapFitMarkers": "Dopasuj do wszystkich wczytanych znaczników",
+ "mapTooManyMarkers": "Ta strona zawiera więcej niż ${limit} lokalizacji. Użyj filtrów lub zmniejsz rozmiar strony, aby wyświetlić mapę",
"defaultCoordinateSystem": "Domyślny układ współrzędnych dla nowych wpisów",
"defaultCoordinateSystemTip": "Dotyczy tylko nowych wpisów; istniejące lokalizacje zachowują swoje układy współrzędnych",
"locationPasteInEditor": "Wklej pary współrzędnych w edytorze lokalizacji, w którym określono kolejność szerokość, długość geograficzna oraz układ współrzędnych",
@@ -2750,6 +2797,7 @@
"quit": "Zamknij aplikację"
},
"_attrView": {
+ "map": "Mapa",
"dateCalendar": "Kalendarz",
"solarCalendar": "Gregoriański",
"lunarCalendar": "Chiński księżycowy",
diff --git a/app/appearance/langs/pt-BR.json b/app/appearance/langs/pt-BR.json
index 3637476ed7..993d9b5552 100644
--- a/app/appearance/langs/pt-BR.json
+++ b/app/appearance/langs/pt-BR.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Os mapas ficam indisponíveis enquanto a opção de ignorar a autenticação está ativada. Os registros continuam disponíveis",
+ "mapSettings": "Mapa",
+ "mapServices": "Serviços de mapas",
+ "mapServicesTip": "Adicione serviços para este dispositivo e selecione um separadamente em cada visualização de mapa do banco de dados",
+ "mapAddService": "Adicionar serviço",
+ "mapServiceName": "Nome do serviço",
+ "mapServiceID": "ID do serviço",
+ "mapServiceIDTip": "Mantenha este ID ao configurar o mesmo serviço em outro dispositivo; as visualizações existentes continuarão a fazer referência a ele",
+ "mapProvider": "Provedor de mapas",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Código de segurança",
+ "mapCredentialsTip": "Deixe em branco para manter a credencial salva, digite uma substituta ou limpe-a explicitamente",
+ "mapClearCredential": "Limpar credencial salva",
+ "mapCredentialSaved": "Salva; deixe em branco para manter",
+ "mapCredentialsPresent": "Os campos de configuração obrigatórios estão preenchidos; o acesso ao serviço não foi verificado",
+ "mapCredentialsMissing": "Faltam credenciais obrigatórias",
+ "mapNoServices": "Nenhum serviço selecionado",
+ "mapRenderingTip": "Os mapas exibem apenas coordenadas existentes. Não há busca de endereços, geocodificação, rotas ou detecção automática de coordenadas; as coordenadas salvas e seu sistema declarado permanecem inalterados",
+ "mapProductionTip": "Antes de usar, confira a elegibilidade da conta, as licenças, as cotas, os domínios permitidos e os requisitos regionais aplicáveis do provedor",
+ "mapMissingServiceTip": "Esta visualização faz referência a um serviço ausente. Adicione-o com o mesmo ID para restaurar a referência",
+ "mapSettingsError": "Não foi possível carregar ou salvar as configurações do mapa. Tente novamente",
+ "mapSettingsConflict": "Os serviços de mapas foram alterados em outro lugar. Cancele este rascunho para recarregar os dados antes de editar novamente",
+ "mapServiceIDInvalid": "Use um ID exclusivo de 1 a 128 letras, dígitos, sublinhados ou hifens, começando com uma letra ou um dígito",
+ "mapServiceNameRequired": "Digite um nome para o serviço",
+ "mapSaveOrCancel": "Salve ou cancele as alterações atuais primeiro",
+ "mapDeleteServiceTip": "Excluir este serviço? As visualizações que fazem referência ao ID dele permanecerão sem configuração até que você adicione esse ID novamente ou escolha outro serviço",
+ "mapView": "Mapa",
+ "mapLocationField": "Campo de localização",
+ "mapService": "Serviço de mapas",
+ "mapShowRecordList": "Mostrar lista de registros",
+ "mapSelectLocationField": "Selecione um campo de localização",
+ "mapSelectService": "Selecione um serviço de mapas",
+ "mapMissingLocationField": "O campo de localização salvo não está disponível. Selecione um campo de localização",
+ "mapMissingService": "Este dispositivo não tem o serviço de mapas salvo. Adicione um serviço com o mesmo ID em Configurações - Mapa ou selecione outro serviço",
+ "mapPageScope": "O mapa mostra ${shown} registros carregados de ${total} registros filtrados",
+ "mapSkippedLocations": "Localizações ignoradas: ${empty} sem coordenadas, ${invalid} inválidas, ${unknown} com sistema de coordenadas desconhecido, ${mismatch} com sistema incompatível, ${projection} com projeção não compatível",
+ "mapNoMarkers": "Nenhuma localização compatível na página carregada",
+ "mapLoading": "Carregando mapa...",
+ "mapLoadError": "Não foi possível carregar o mapa. Seus registros continuam disponíveis",
+ "mapUnsupportedClient": "Este cliente não dispõe de um ambiente isolado para mapas. Seus registros continuam disponíveis",
+ "mapOffline": "O mapa está offline. Seus registros continuam disponíveis",
+ "mapPublicFallback": "Os mapas não são carregados em páginas publicadas nem em exportações",
+ "mapConfigureServices": "Configurar serviços de mapas",
+ "mapFitMarkers": "Ajustar a todos os marcadores carregados",
+ "mapTooManyMarkers": "Esta página tem mais de ${limit} localizações. Use filtros ou reduza o tamanho da página para exibir o mapa",
"defaultCoordinateSystem": "Sistema de coordenadas padrão para novas entradas",
"defaultCoordinateSystemTip": "Aplica-se apenas a novas entradas; as localizações existentes mantêm seus sistemas de coordenadas",
"locationPasteInEditor": "Cole os pares de coordenadas no editor de localização, onde a ordem latitude, longitude e o sistema de coordenadas são explícitos",
@@ -2750,6 +2797,7 @@
"quit": "Sair do aplicativo"
},
"_attrView": {
+ "map": "Mapa",
"dateCalendar": "Calendário",
"solarCalendar": "Gregoriano",
"lunarCalendar": "Lunar chinês",
diff --git a/app/appearance/langs/ru.json b/app/appearance/langs/ru.json
index e5aa95d34b..18be2d4995 100644
--- a/app/appearance/langs/ru.json
+++ b/app/appearance/langs/ru.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Карты недоступны, пока включён обход аутентификации. Записи остаются доступными",
+ "mapSettings": "Карта",
+ "mapServices": "Картографические сервисы",
+ "mapServicesTip": "Добавьте сервисы для этого устройства, затем отдельно выберите сервис в каждом представлении карты базы данных",
+ "mapAddService": "Добавить сервис",
+ "mapServiceName": "Название сервиса",
+ "mapServiceID": "ID сервиса",
+ "mapServiceIDTip": "Сохраните этот ID при настройке того же сервиса на другом устройстве; существующие представления продолжат на него ссылаться",
+ "mapProvider": "Поставщик карт",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Код безопасности",
+ "mapCredentialsTip": "Оставьте поле пустым, чтобы сохранить учётные данные, введите замену или явно удалите их",
+ "mapClearCredential": "Удалить сохранённые учётные данные",
+ "mapCredentialSaved": "Сохранено; оставьте пустым для сохранения",
+ "mapCredentialsPresent": "Обязательные поля настройки заполнены; доступ к сервису не проверен",
+ "mapCredentialsMissing": "Отсутствуют обязательные учётные данные",
+ "mapNoServices": "Сервис не выбран",
+ "mapRenderingTip": "Карты показывают только существующие координаты. Поиск адресов, геокодирование, маршруты и автоматическое определение координат не предоставляются; сохранённые координаты и указанная для них система координат не меняются",
+ "mapProductionTip": "Перед использованием проверьте требования к аккаунту, лицензии, квоты, разрешённые домены и применимые региональные требования поставщика",
+ "mapMissingServiceTip": "Это представление ссылается на отсутствующий сервис. Добавьте его с тем же ID, чтобы восстановить ссылку",
+ "mapSettingsError": "Не удалось загрузить или сохранить настройки карты. Повторите попытку",
+ "mapSettingsConflict": "Картографические сервисы изменены в другом месте. Отмените этот черновик, чтобы обновить данные перед повторным редактированием",
+ "mapServiceIDInvalid": "Используйте уникальный ID из 1–128 латинских букв, цифр, подчёркиваний или дефисов, начиная с буквы или цифры",
+ "mapServiceNameRequired": "Введите название сервиса",
+ "mapSaveOrCancel": "Сначала сохраните или отмените текущие изменения",
+ "mapDeleteServiceTip": "Удалить этот сервис? Представления, ссылающиеся на его ID, останутся ненастроенными, пока вы не добавите тот же ID снова или не выберете другой сервис",
+ "mapView": "Карта",
+ "mapLocationField": "Поле местоположения",
+ "mapService": "Картографический сервис",
+ "mapShowRecordList": "Показать список записей",
+ "mapSelectLocationField": "Выберите поле местоположения",
+ "mapSelectService": "Выберите картографический сервис",
+ "mapMissingLocationField": "Сохранённое поле местоположения недоступно. Выберите поле местоположения",
+ "mapMissingService": "На этом устройстве нет сохранённого картографического сервиса. Добавьте сервис с тем же ID в Настройки - Карта или выберите другой сервис",
+ "mapPageScope": "На карте показаны ${shown} загруженных записей из ${total} отфильтрованных",
+ "mapSkippedLocations": "Пропущенные местоположения: ${empty} без координат, ${invalid} некорректных, ${unknown} с неизвестной системой координат, ${mismatch} с несовместимой системой координат, ${projection} с неподдерживаемой проекцией",
+ "mapNoMarkers": "На загруженной странице нет совместимых местоположений",
+ "mapLoading": "Загрузка карты...",
+ "mapLoadError": "Не удалось загрузить карту. Ваши записи по-прежнему доступны",
+ "mapUnsupportedClient": "В этом клиенте нет изолированной среды для карт. Ваши записи по-прежнему доступны",
+ "mapOffline": "Карта недоступна без сети. Ваши записи по-прежнему доступны",
+ "mapPublicFallback": "Карты не загружаются на опубликованных страницах и в экспортированных материалах",
+ "mapConfigureServices": "Настроить картографические сервисы",
+ "mapFitMarkers": "Показать все загруженные маркеры",
+ "mapTooManyMarkers": "На этой странице больше ${limit} местоположений. Используйте фильтры или уменьшите размер страницы, чтобы отобразить карту",
"defaultCoordinateSystem": "Система координат по умолчанию для новых данных",
"defaultCoordinateSystemTip": "Применяется только к новым данным; существующие местоположения сохраняют свои системы координат",
"locationPasteInEditor": "Вставляйте пары координат в редакторе местоположения, где явно указаны порядок широта, долгота и система координат",
@@ -2750,6 +2797,7 @@
"quit": "Выйти из приложения"
},
"_attrView": {
+ "map": "Карта",
"dateCalendar": "Календарь",
"solarCalendar": "Григорианский",
"lunarCalendar": "Китайский лунный",
diff --git a/app/appearance/langs/sk.json b/app/appearance/langs/sk.json
index a25c0225eb..47ad2ca7dc 100644
--- a/app/appearance/langs/sk.json
+++ b/app/appearance/langs/sk.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Mapy nie sú dostupné, keď je zapnuté obchádzanie overenia totožnosti. Záznamy zostávajú dostupné",
+ "mapSettings": "Mapa",
+ "mapServices": "Mapové služby",
+ "mapServicesTip": "Pridajte služby pre toto zariadenie a potom vyberte službu samostatne v každom mapovom zobrazení databázy",
+ "mapAddService": "Pridať službu",
+ "mapServiceName": "Názov služby",
+ "mapServiceID": "ID služby",
+ "mapServiceIDTip": "Pri nastavovaní tej istej služby na inom zariadení zachovajte toto ID; existujúce zobrazenia naň budú naďalej odkazovať",
+ "mapProvider": "Poskytovateľ máp",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Bezpečnostný kód",
+ "mapCredentialsTip": "Nechajte prázdne na zachovanie uložených prihlasovacích údajov, zadajte náhradu alebo ich výslovne vymažte",
+ "mapClearCredential": "Vymazať uložené prihlasovacie údaje",
+ "mapCredentialSaved": "Uložené; na zachovanie nechajte prázdne",
+ "mapCredentialsPresent": "Požadované konfiguračné polia sú vyplnené; prístup k službe nebol overený",
+ "mapCredentialsMissing": "Chýbajú požadované prihlasovacie údaje",
+ "mapNoServices": "Nie je vybraná žiadna služba",
+ "mapRenderingTip": "Mapy zobrazujú iba existujúce súradnice. Vyhľadávanie adries, geokódovanie, trasy ani automatické zisťovanie súradníc nie sú dostupné; uložené súradnice a ich uvedený súradnicový systém zostávajú nezmenené",
+ "mapProductionTip": "Pred použitím overte oprávnenosť účtu, licencie, kvóty, povolené domény a príslušné regionálne požiadavky poskytovateľa",
+ "mapMissingServiceTip": "Toto zobrazenie odkazuje na chýbajúcu službu. Pridajte ju s rovnakým ID, aby sa odkaz obnovil",
+ "mapSettingsError": "Nastavenia mapy sa nepodarilo načítať alebo uložiť. Skúste to znova",
+ "mapSettingsConflict": "Mapové služby boli zmenené inde. Zrušte tento koncept, aby sa údaje pred ďalšou úpravou znovu načítali",
+ "mapServiceIDInvalid": "Použite jedinečné ID s 1–128 latinskými písmenami, číslicami, podčiarkovníkmi alebo spojovníkmi, začínajúce písmenom alebo číslicou",
+ "mapServiceNameRequired": "Zadajte názov služby",
+ "mapSaveOrCancel": "Najprv uložte alebo zrušte aktuálne zmeny",
+ "mapDeleteServiceTip": "Odstrániť túto službu? Zobrazenia odkazujúce na jej ID zostanú nenastavené, kým znova nepridáte toto ID alebo nevyberiete inú službu",
+ "mapView": "Mapa",
+ "mapLocationField": "Pole polohy",
+ "mapService": "Mapová služba",
+ "mapShowRecordList": "Zobraziť zoznam záznamov",
+ "mapSelectLocationField": "Vyberte pole polohy",
+ "mapSelectService": "Vyberte mapovú službu",
+ "mapMissingLocationField": "Uložené pole polohy nie je dostupné. Vyberte pole polohy",
+ "mapMissingService": "Toto zariadenie nemá uloženú mapovú službu. Pridajte službu s rovnakým ID v Nastavenia - Mapa alebo vyberte inú službu",
+ "mapPageScope": "Mapa zobrazuje ${shown} načítaných záznamov z ${total} filtrovaných záznamov",
+ "mapSkippedLocations": "Vynechané polohy: ${empty} bez súradníc, ${invalid} neplatných, ${unknown} s neznámym súradnicovým systémom, ${mismatch} s nekompatibilným súradnicovým systémom, ${projection} s nepodporovanou projekciou",
+ "mapNoMarkers": "Na načítanej stránke nie sú kompatibilné polohy",
+ "mapLoading": "Načítava sa mapa...",
+ "mapLoadError": "Mapu sa nepodarilo načítať. Vaše záznamy sú naďalej dostupné",
+ "mapUnsupportedClient": "V tomto klientovi nie je dostupné izolované mapové prostredie. Vaše záznamy sú naďalej dostupné",
+ "mapOffline": "Mapa je offline. Vaše záznamy sú naďalej dostupné",
+ "mapPublicFallback": "Mapy sa nenačítavajú na publikovaných stránkach ani v exportoch",
+ "mapConfigureServices": "Nastaviť mapové služby",
+ "mapFitMarkers": "Zobraziť všetky načítané značky",
+ "mapTooManyMarkers": "Táto stránka obsahuje viac ako ${limit} polôh. Na zobrazenie mapy použite filtre alebo menšiu veľkosť stránky",
"defaultCoordinateSystem": "Predvolený súradnicový systém pre nové údaje",
"defaultCoordinateSystemTip": "Platí iba pre nové údaje; existujúce polohy si zachovajú svoj súradnicový systém",
"locationPasteInEditor": "Dvojice súradníc vkladajte v editore polohy, kde je uvedené poradie šírka, dĺžka a súradnicový systém",
@@ -2750,6 +2797,7 @@
"quit": "Ukončiť aplikáciu"
},
"_attrView": {
+ "map": "Mapa",
"dateCalendar": "Kalendár",
"solarCalendar": "Gregoriánsky",
"lunarCalendar": "Čínsky lunárny",
diff --git a/app/appearance/langs/sr.json b/app/appearance/langs/sr.json
index 3f28f514b1..5086bbd137 100644
--- a/app/appearance/langs/sr.json
+++ b/app/appearance/langs/sr.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Мапе нису доступне док је укључено заобилажење аутентификације. Записи остају доступни",
+ "mapSettings": "Мапа",
+ "mapServices": "Услуге мапа",
+ "mapServicesTip": "Додајте услуге за овај уређај, а затим засебно изаберите услугу у сваком приказу мапе базе података",
+ "mapAddService": "Додај услугу",
+ "mapServiceName": "Назив услуге",
+ "mapServiceID": "ID услуге",
+ "mapServiceIDTip": "Задржите овај ID при подешавању исте услуге на другом уређају; постојећи прикази ће и даље упућивати на њега",
+ "mapProvider": "Добављач мапа",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Безбедносни код",
+ "mapCredentialsTip": "Оставите празно да бисте задржали сачуване приступне податке, унесите замену или их изричито обришите",
+ "mapClearCredential": "Обриши сачуване приступне податке",
+ "mapCredentialSaved": "Сачувано; оставите празно да задржите",
+ "mapCredentialsPresent": "Обавезна поља подешавања су попуњена; приступ услузи није проверен",
+ "mapCredentialsMissing": "Недостају обавезни приступни подаци",
+ "mapNoServices": "Ниједна услуга није изабрана",
+ "mapRenderingTip": "Мапе приказују само постојеће координате. Претрага адреса, геокодирање, руте и аутоматско откривање координата нису доступни; сачуване координате и њихов наведени координатни систем остају непромењени",
+ "mapProductionTip": "Пре употребе проверите услове за налог, лиценце, квоте, дозвољене домене и важеће регионалне захтеве добављача",
+ "mapMissingServiceTip": "Овај приказ упућује на услугу која недостаје. Додајте је са истим ID-ом да бисте обновили везу",
+ "mapSettingsError": "Није могуће учитати или сачувати подешавања мапе. Покушајте поново",
+ "mapSettingsConflict": "Услуге мапа су промењене на другом месту. Откажите овај нацрт да бисте поново учитали податке пре новог уређивања",
+ "mapServiceIDInvalid": "Користите јединствени ID од 1–128 латиничних слова, цифара, доњих црта или цртица, који почиње словом или цифром",
+ "mapServiceNameRequired": "Унесите назив услуге",
+ "mapSaveOrCancel": "Прво сачувајте или откажите тренутне измене",
+ "mapDeleteServiceTip": "Обрисати ову услугу? Прикази који упућују на њен ID остаће неподешени док поново не додате тај ID или не изаберете другу услугу",
+ "mapView": "Мапа",
+ "mapLocationField": "Поље локације",
+ "mapService": "Услуга мапа",
+ "mapShowRecordList": "Прикажи списак записа",
+ "mapSelectLocationField": "Изаберите поље локације",
+ "mapSelectService": "Изаберите услугу мапа",
+ "mapMissingLocationField": "Сачувано поље локације није доступно. Изаберите поље локације",
+ "mapMissingService": "Овај уређај нема сачувану услугу мапа. Додајте услугу са истим ID-ом у Подешавања - Мапа или изаберите другу услугу",
+ "mapPageScope": "Мапа приказује ${shown} учитаних записа од ${total} филтрираних записа",
+ "mapSkippedLocations": "Прескочене локације: ${empty} без координата, ${invalid} неисправних, ${unknown} са непознатим координатним системом, ${mismatch} са некомпатибилним координатним системом, ${projection} са неподржаном пројекцијом",
+ "mapNoMarkers": "Нема компатибилних локација на учитаној страници",
+ "mapLoading": "Учитавање мапе...",
+ "mapLoadError": "Мапа није могла да се учита. Ваши записи су и даље доступни",
+ "mapUnsupportedClient": "Овај клијент нема изоловано окружење за мапе. Ваши записи су и даље доступни",
+ "mapOffline": "Мапа је ван мреже. Ваши записи су и даље доступни",
+ "mapPublicFallback": "Мапе се не учитавају на објављеним страницама ни у извезеним садржајима",
+ "mapConfigureServices": "Подеси услуге мапа",
+ "mapFitMarkers": "Прикажи све учитане ознаке",
+ "mapTooManyMarkers": "Ова страница има више од ${limit} локација. Користите филтере или смањите величину странице да бисте приказали мапу",
"defaultCoordinateSystem": "Подразумевани координатни систем за нове уносе",
"defaultCoordinateSystemTip": "Примењује се само на нове уносе; постојеће локације задржавају своје координатне системе",
"locationPasteInEditor": "Налепите парове координата у уређивачу локације, где су јасно наведени редослед ширина, дужина и координатни систем",
@@ -2750,6 +2797,7 @@
"quit": "Ugasi aplikaciju"
},
"_attrView": {
+ "map": "Мапа",
"dateCalendar": "Календар",
"solarCalendar": "Грегоријански",
"lunarCalendar": "Кинески лунарни",
diff --git a/app/appearance/langs/th.json b/app/appearance/langs/th.json
index 43e5e3976c..4b5c516f17 100644
--- a/app/appearance/langs/th.json
+++ b/app/appearance/langs/th.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "แผนที่ไม่พร้อมใช้งานขณะเปิดใช้การข้ามการยืนยันตัวตน ระเบียนยังคงพร้อมใช้งาน",
+ "mapSettings": "แผนที่",
+ "mapServices": "บริการแผนที่",
+ "mapServicesTip": "เพิ่มบริการสำหรับอุปกรณ์นี้ แล้วเลือกบริการแยกกันในแต่ละมุมมองแผนที่ของฐานข้อมูล",
+ "mapAddService": "เพิ่มบริการ",
+ "mapServiceName": "ชื่อบริการ",
+ "mapServiceID": "ID บริการ",
+ "mapServiceIDTip": "ใช้ ID นี้เหมือนเดิมเมื่อตั้งค่าบริการเดียวกันบนอุปกรณ์อื่น มุมมองที่มีอยู่จะยังคงอ้างอิง ID นี้",
+ "mapProvider": "ผู้ให้บริการแผนที่",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "รหัสความปลอดภัย",
+ "mapCredentialsTip": "เว้นว่างเพื่อเก็บข้อมูลรับรองที่บันทึกไว้ ป้อนค่าใหม่เพื่อแทนที่ หรือเลือกล้างอย่างชัดเจน",
+ "mapClearCredential": "ล้างข้อมูลรับรองที่บันทึกไว้",
+ "mapCredentialSaved": "บันทึกแล้ว เว้นว่างเพื่อเก็บไว้",
+ "mapCredentialsPresent": "กรอกช่องการตั้งค่าที่จำเป็นแล้ว แต่ยังไม่ได้ตรวจสอบการเข้าถึงบริการ",
+ "mapCredentialsMissing": "ไม่มีข้อมูลรับรองที่จำเป็น",
+ "mapNoServices": "ยังไม่ได้เลือกบริการ",
+ "mapRenderingTip": "แผนที่แสดงเฉพาะพิกัดที่มีอยู่แล้ว ไม่ให้บริการค้นหาที่อยู่ แปลงที่อยู่เป็นพิกัด เส้นทาง หรือการตรวจหาพิกัดอัตโนมัติ พิกัดที่บันทึกไว้และระบบพิกัดที่ระบุจะไม่เปลี่ยนแปลง",
+ "mapProductionTip": "ก่อนใช้งาน โปรดตรวจสอบคุณสมบัติของบัญชี ใบอนุญาต โควตา โดเมนที่อนุญาต และข้อกำหนดของภูมิภาคที่เกี่ยวข้องของผู้ให้บริการ",
+ "mapMissingServiceTip": "มุมมองนี้อ้างอิงบริการที่ไม่มีอยู่ เพิ่มบริการด้วย ID เดิมเพื่อกู้คืนการอ้างอิง",
+ "mapSettingsError": "ไม่สามารถโหลดหรือบันทึกการตั้งค่าแผนที่ได้ โปรดลองอีกครั้ง",
+ "mapSettingsConflict": "บริการแผนที่ถูกเปลี่ยนแปลงจากที่อื่น ยกเลิกฉบับร่างนี้เพื่อโหลดใหม่ก่อนแก้ไขอีกครั้ง",
+ "mapServiceIDInvalid": "ใช้ ID ที่ไม่ซ้ำกัน ยาว 1–128 ตัว ประกอบด้วยอักษรละติน ตัวเลข ขีดล่าง หรือขีดกลาง และขึ้นต้นด้วยอักษรหรือตัวเลข",
+ "mapServiceNameRequired": "ป้อนชื่อบริการ",
+ "mapSaveOrCancel": "บันทึกหรือยกเลิกการเปลี่ยนแปลงปัจจุบันก่อน",
+ "mapDeleteServiceTip": "ลบบริการนี้หรือไม่? มุมมองที่อ้างอิง ID นี้จะยังไม่ได้รับการตั้งค่าจนกว่าคุณจะเพิ่ม ID เดิมอีกครั้งหรือเลือกบริการอื่น",
+ "mapView": "แผนที่",
+ "mapLocationField": "ฟิลด์ตำแหน่ง",
+ "mapService": "บริการแผนที่",
+ "mapShowRecordList": "แสดงรายการระเบียน",
+ "mapSelectLocationField": "เลือกฟิลด์ตำแหน่ง",
+ "mapSelectService": "เลือกบริการแผนที่",
+ "mapMissingLocationField": "ฟิลด์ตำแหน่งที่บันทึกไว้ไม่พร้อมใช้งาน โปรดเลือกฟิลด์ตำแหน่ง",
+ "mapMissingService": "อุปกรณ์นี้ไม่มีบริการแผนที่ที่บันทึกไว้ เพิ่มบริการด้วย ID เดิมใน การตั้งค่า - แผนที่ หรือเลือกบริการอื่น",
+ "mapPageScope": "แผนที่แสดงระเบียนที่โหลดแล้ว ${shown} รายการจากระเบียนที่กรองแล้วทั้งหมด ${total} รายการ",
+ "mapSkippedLocations": "ตำแหน่งที่ข้าม: ไม่มีพิกัด ${empty} รายการ ไม่ถูกต้อง ${invalid} รายการ ไม่ทราบระบบพิกัด ${unknown} รายการ ระบบพิกัดไม่เข้ากัน ${mismatch} รายการ ไม่รองรับการฉายแผนที่ ${projection} รายการ",
+ "mapNoMarkers": "ไม่มีตำแหน่งที่เข้ากันได้ในหน้าที่โหลดแล้ว",
+ "mapLoading": "กำลังโหลดแผนที่...",
+ "mapLoadError": "ไม่สามารถโหลดแผนที่ได้ ระเบียนของคุณยังคงพร้อมใช้งาน",
+ "mapUnsupportedClient": "ไคลเอนต์นี้ไม่มีสภาพแวดล้อมแผนที่แบบแยกส่วน ระเบียนของคุณยังคงพร้อมใช้งาน",
+ "mapOffline": "แผนที่ออฟไลน์ ระเบียนของคุณยังคงพร้อมใช้งาน",
+ "mapPublicFallback": "แผนที่จะไม่โหลดในหน้าที่เผยแพร่หรือเนื้อหาที่ส่งออก",
+ "mapConfigureServices": "ตั้งค่าบริการแผนที่",
+ "mapFitMarkers": "ปรับให้เห็นหมุดที่โหลดแล้วทั้งหมด",
+ "mapTooManyMarkers": "หน้านี้มีตำแหน่งมากกว่า ${limit} รายการ ใช้ตัวกรองหรือลดขนาดหน้าเพื่อแสดงแผนที่",
"defaultCoordinateSystem": "ระบบพิกัดเริ่มต้นสำหรับข้อมูลใหม่",
"defaultCoordinateSystemTip": "ใช้กับข้อมูลใหม่เท่านั้น ตำแหน่งเดิมจะคงระบบพิกัดของตนไว้",
"locationPasteInEditor": "วางคู่พิกัดในตัวแก้ไขตำแหน่ง ซึ่งระบุลำดับละติจูด ลองจิจูด และระบบพิกัดไว้อย่างชัดเจน",
@@ -2750,6 +2797,7 @@
"quit": "ออก"
},
"_attrView": {
+ "map": "แผนที่",
"dateCalendar": "ระบบปฏิทิน",
"solarCalendar": "เกรกอเรียน",
"lunarCalendar": "จันทรคติจีน",
diff --git a/app/appearance/langs/tr.json b/app/appearance/langs/tr.json
index 8652e30b60..a8de86e72d 100644
--- a/app/appearance/langs/tr.json
+++ b/app/appearance/langs/tr.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Kimlik doğrulamayı atlama etkinken haritalar kullanılamaz. Kayıtlar kullanılabilir durumda kalır",
+ "mapSettings": "Harita",
+ "mapServices": "Harita hizmetleri",
+ "mapServicesTip": "Bu cihaz için hizmetler ekleyin, ardından her veritabanı harita görünümünde ayrı ayrı bir hizmet seçin",
+ "mapAddService": "Hizmet ekle",
+ "mapServiceName": "Hizmet adı",
+ "mapServiceID": "Hizmet kimliği",
+ "mapServiceIDTip": "Aynı hizmeti başka bir cihazda yapılandırırken bu kimliği değiştirmeyin; mevcut görünümler bu kimliğe başvurmaya devam eder",
+ "mapProvider": "Harita sağlayıcısı",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Güvenlik kodu",
+ "mapCredentialsTip": "Kayıtlı kimlik bilgisini korumak için boş bırakın, değiştirmek için yeni bir değer girin veya açıkça temizleyin",
+ "mapClearCredential": "Kayıtlı kimlik bilgisini temizle",
+ "mapCredentialSaved": "Kaydedildi; korumak için boş bırakın",
+ "mapCredentialsPresent": "Gerekli yapılandırma alanları dolduruldu; hizmet erişimi doğrulanmadı",
+ "mapCredentialsMissing": "Gerekli kimlik bilgileri eksik",
+ "mapNoServices": "Hizmet seçilmedi",
+ "mapRenderingTip": "Haritalar yalnızca mevcut koordinatları gösterir. Adres arama, coğrafi kodlama, rota ve otomatik koordinat algılama sunulmaz; kayıtlı koordinatlar ve belirtilen koordinat sistemleri değişmez",
+ "mapProductionTip": "Kullanmadan önce sağlayıcının hesap uygunluğunu, lisanslarını, kotalarını, izin verilen alan adlarını ve geçerli bölgesel gerekliliklerini kontrol edin",
+ "mapMissingServiceTip": "Bu görünüm eksik bir hizmete başvuruyor. Başvuruyu geri yüklemek için aynı kimlikle hizmet ekleyin",
+ "mapSettingsError": "Harita ayarları yüklenemedi veya kaydedilemedi. Lütfen tekrar deneyin",
+ "mapSettingsConflict": "Harita hizmetleri başka bir yerde değiştirildi. Yeniden düzenlemeden önce verileri tekrar yüklemek için bu taslağı iptal edin",
+ "mapServiceIDInvalid": "Harf veya rakamla başlayan, 1–128 Latin harfi, rakam, alt çizgi veya kısa çizgiden oluşan benzersiz bir kimlik kullanın",
+ "mapServiceNameRequired": "Bir hizmet adı girin",
+ "mapSaveOrCancel": "Önce mevcut değişiklikleri kaydedin veya iptal edin",
+ "mapDeleteServiceTip": "Bu hizmet silinsin mi? Kimliğine başvuran görünümler, aynı kimliği yeniden ekleyene veya başka bir hizmet seçene kadar yapılandırılmamış kalır",
+ "mapView": "Harita",
+ "mapLocationField": "Konum alanı",
+ "mapService": "Harita hizmeti",
+ "mapShowRecordList": "Kayıt listesini göster",
+ "mapSelectLocationField": "Bir konum alanı seçin",
+ "mapSelectService": "Bir harita hizmeti seçin",
+ "mapMissingLocationField": "Kayıtlı konum alanı kullanılamıyor. Bir konum alanı seçin",
+ "mapMissingService": "Bu cihazda kayıtlı harita hizmeti yok. Ayarlar - Harita bölümünde aynı kimliğe sahip bir hizmet ekleyin veya başka bir hizmet seçin",
+ "mapPageScope": "Harita, filtrelenmiş ${total} kayıttan yüklenen ${shown} kaydı gösterir",
+ "mapSkippedLocations": "Atlanan konumlar: ${empty} koordinatsız, ${invalid} geçersiz, ${unknown} bilinmeyen koordinat sisteminde, ${mismatch} uyumsuz koordinat sisteminde, ${projection} desteklenmeyen izdüşümde",
+ "mapNoMarkers": "Yüklenen sayfada uyumlu konum yok",
+ "mapLoading": "Harita yükleniyor...",
+ "mapLoadError": "Harita yüklenemedi. Kayıtlarınız hâlâ kullanılabilir",
+ "mapUnsupportedClient": "Bu istemcide yalıtılmış bir harita ortamı bulunmuyor. Kayıtlarınız hâlâ kullanılabilir",
+ "mapOffline": "Harita çevrimdışı. Kayıtlarınız hâlâ kullanılabilir",
+ "mapPublicFallback": "Yayımlanan sayfalarda veya dışa aktarılan içerikte haritalar yüklenmez",
+ "mapConfigureServices": "Harita hizmetlerini yapılandır",
+ "mapFitMarkers": "Yüklenen tüm işaretleri görünüm içine sığdır",
+ "mapTooManyMarkers": "Bu sayfada ${limit} konumdan fazla konum var. Haritayı göstermek için filtreleri kullanın veya sayfa boyutunu küçültün",
"defaultCoordinateSystem": "Yeni girişler için varsayılan koordinat sistemi",
"defaultCoordinateSystemTip": "Yalnızca yeni girişlere uygulanır; mevcut konumlar kendi koordinat sistemlerini korur",
"locationPasteInEditor": "Koordinat çiftlerini enlem, boylam sırasının ve koordinat sisteminin açıkça belirtildiği konum düzenleyicisine yapıştırın",
@@ -2750,6 +2797,7 @@
"quit": "Uygulamadan çık"
},
"_attrView": {
+ "map": "Harita",
"dateCalendar": "Takvim",
"solarCalendar": "Miladi",
"lunarCalendar": "Çin ay takvimi",
diff --git a/app/appearance/langs/uk.json b/app/appearance/langs/uk.json
index 1016e9ebb9..4e248fa7b5 100644
--- a/app/appearance/langs/uk.json
+++ b/app/appearance/langs/uk.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "Мапи недоступні, доки ввімкнено обхід автентифікації. Записи залишаються доступними",
+ "mapSettings": "Мапа",
+ "mapServices": "Картографічні сервіси",
+ "mapServicesTip": "Додайте сервіси для цього пристрою, а потім окремо виберіть сервіс у кожному поданні мапи бази даних",
+ "mapAddService": "Додати сервіс",
+ "mapServiceName": "Назва сервісу",
+ "mapServiceID": "ID сервісу",
+ "mapServiceIDTip": "Збережіть цей ID під час налаштування того самого сервісу на іншому пристрої; наявні подання й надалі посилатимуться на нього",
+ "mapProvider": "Постачальник мап",
+ "mapProviderAMap": "AMap",
+ "mapProviderTencent": "Tencent Maps",
+ "mapProviderBaidu": "Baidu Maps",
+ "mapSecurityCode": "Код безпеки",
+ "mapCredentialsTip": "Залиште поле порожнім, щоб зберегти облікові дані, введіть заміну або явно видаліть їх",
+ "mapClearCredential": "Видалити збережені облікові дані",
+ "mapCredentialSaved": "Збережено; залиште порожнім, щоб зберегти",
+ "mapCredentialsPresent": "Обов’язкові поля налаштування заповнено; доступ до сервісу не перевірено",
+ "mapCredentialsMissing": "Відсутні обов’язкові облікові дані",
+ "mapNoServices": "Сервіс не вибрано",
+ "mapRenderingTip": "Мапи показують лише наявні координати. Пошук адрес, геокодування, маршрути й автоматичне визначення координат не надаються; збережені координати та вказана для них система координат залишаються незмінними",
+ "mapProductionTip": "Перед використанням перевірте вимоги до облікового запису, ліцензії, квоти, дозволені домени та чинні регіональні вимоги постачальника",
+ "mapMissingServiceTip": "Це подання посилається на відсутній сервіс. Додайте його з тим самим ID, щоб відновити посилання",
+ "mapSettingsError": "Не вдалося завантажити або зберегти налаштування мапи. Спробуйте ще раз",
+ "mapSettingsConflict": "Картографічні сервіси змінено в іншому місці. Скасуйте цю чернетку, щоб оновити дані перед повторним редагуванням",
+ "mapServiceIDInvalid": "Використовуйте унікальний ID із 1–128 латинських літер, цифр, підкреслень або дефісів, починаючи з літери чи цифри",
+ "mapServiceNameRequired": "Введіть назву сервісу",
+ "mapSaveOrCancel": "Спочатку збережіть або скасуйте поточні зміни",
+ "mapDeleteServiceTip": "Видалити цей сервіс? Подання, які посилаються на його ID, залишаться неналаштованими, доки ви не додасте цей ID знову або не виберете інший сервіс",
+ "mapView": "Мапа",
+ "mapLocationField": "Поле місцеположення",
+ "mapService": "Картографічний сервіс",
+ "mapShowRecordList": "Показати список записів",
+ "mapSelectLocationField": "Виберіть поле місцеположення",
+ "mapSelectService": "Виберіть картографічний сервіс",
+ "mapMissingLocationField": "Збережене поле місцеположення недоступне. Виберіть поле місцеположення",
+ "mapMissingService": "На цьому пристрої немає збереженого картографічного сервісу. Додайте сервіс із тим самим ID у Налаштування - Мапа або виберіть інший сервіс",
+ "mapPageScope": "Мапа показує ${shown} завантажених записів із ${total} відфільтрованих",
+ "mapSkippedLocations": "Пропущені місцеположення: ${empty} без координат, ${invalid} недійсних, ${unknown} з невідомою системою координат, ${mismatch} з несумісною системою координат, ${projection} з непідтримуваною проєкцією",
+ "mapNoMarkers": "На завантаженій сторінці немає сумісних місцеположень",
+ "mapLoading": "Завантаження мапи...",
+ "mapLoadError": "Не вдалося завантажити мапу. Ваші записи залишаються доступними",
+ "mapUnsupportedClient": "У цьому клієнті немає ізольованого середовища для мап. Ваші записи залишаються доступними",
+ "mapOffline": "Мапа недоступна без мережі. Ваші записи залишаються доступними",
+ "mapPublicFallback": "Мапи не завантажуються на опублікованих сторінках і в експортованих матеріалах",
+ "mapConfigureServices": "Налаштувати картографічні сервіси",
+ "mapFitMarkers": "Показати всі завантажені маркери",
+ "mapTooManyMarkers": "На цій сторінці понад ${limit} місцеположень. Використайте фільтри або зменште розмір сторінки, щоб показати мапу",
"defaultCoordinateSystem": "Типова система координат для нових даних",
"defaultCoordinateSystemTip": "Застосовується лише до нових даних; наявні розташування зберігають свої системи координат",
"locationPasteInEditor": "Вставляйте пари координат у редакторі розташування, де явно вказано порядок широта, довгота та систему координат",
@@ -2750,6 +2797,7 @@
"quit": "Вийти із застосунку"
},
"_attrView": {
+ "map": "Мапа",
"dateCalendar": "Календар",
"solarCalendar": "Григоріанський",
"lunarCalendar": "Китайський місячний",
diff --git a/app/appearance/langs/zh-CN.json b/app/appearance/langs/zh-CN.json
index ae8a294cd6..5360e259b4 100644
--- a/app/appearance/langs/zh-CN.json
+++ b/app/appearance/langs/zh-CN.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "启用鉴权绕过时无法使用地图,记录仍可访问",
+ "mapSettings": "地图",
+ "mapServices": "地图服务",
+ "mapServicesTip": "在当前设备添加服务,然后在每个数据库地图视图中单独选择服务",
+ "mapAddService": "添加服务",
+ "mapServiceName": "服务名称",
+ "mapServiceID": "服务 ID",
+ "mapServiceIDTip": "在其他设备配置同一服务时保留此 ID,已有视图会继续引用该 ID",
+ "mapProvider": "地图提供商",
+ "mapProviderAMap": "高德地图",
+ "mapProviderTencent": "腾讯地图",
+ "mapProviderBaidu": "百度地图",
+ "mapSecurityCode": "安全密钥",
+ "mapCredentialsTip": "留空以保留已保存的凭据,输入新值以替换,或明确选择清除",
+ "mapClearCredential": "清除已保存的凭据",
+ "mapCredentialSaved": "已保存,留空以保留",
+ "mapCredentialsPresent": "所需配置字段已填写,尚未验证服务访问",
+ "mapCredentialsMissing": "缺少所需凭据",
+ "mapNoServices": "未选择服务",
+ "mapRenderingTip": "地图仅显示已有坐标,不提供地址搜索、地理编码、路线规划或自动坐标识别,保存的坐标及其声明的坐标系保持不变",
+ "mapProductionTip": "使用前请确认提供商的账户资格、许可、配额、允许的域名及适用的地区要求",
+ "mapMissingServiceTip": "此视图引用的服务不存在,请使用同一 ID 添加服务以恢复引用",
+ "mapSettingsError": "无法加载或保存地图设置,请重试",
+ "mapSettingsConflict": "地图服务已在其他位置更改,请取消此草稿以重新加载后再编辑",
+ "mapServiceIDInvalid": "请使用 1 至 128 个字母、数字、下划线或连字符组成的唯一 ID,并以字母或数字开头",
+ "mapServiceNameRequired": "请输入服务名称",
+ "mapSaveOrCancel": "请先保存或取消当前更改",
+ "mapDeleteServiceTip": "删除此服务?引用该 ID 的视图将保持未配置状态,直到重新添加该 ID 或选择其他服务",
+ "mapView": "地图",
+ "mapLocationField": "位置字段",
+ "mapService": "地图服务",
+ "mapShowRecordList": "显示记录列表",
+ "mapSelectLocationField": "请选择位置字段",
+ "mapSelectService": "请选择地图服务",
+ "mapMissingLocationField": "保存的位置字段不可用,请选择位置字段",
+ "mapMissingService": "此设备没有保存的地图服务,请在设置 - 地图中添加相同 ID 的服务,或选择其他服务",
+ "mapPageScope": "地图范围为筛选结果中已加载的 ${shown} 条记录,共 ${total} 条",
+ "mapSkippedLocations": "已跳过的位置:${empty} 条缺少坐标,${invalid} 条无效,${unknown} 条坐标系未知,${mismatch} 条坐标系不兼容,${projection} 个投影不支持",
+ "mapNoMarkers": "已加载的记录中没有兼容的位置",
+ "mapLoading": "正在加载地图...",
+ "mapLoadError": "地图无法加载,记录仍然可用",
+ "mapUnsupportedClient": "此客户端尚不支持隔离的地图运行环境,记录仍然可用",
+ "mapOffline": "地图处于离线状态,记录仍然可用",
+ "mapPublicFallback": "发布页面和导出内容不加载地图",
+ "mapConfigureServices": "配置地图服务",
+ "mapFitMarkers": "显示全部已加载的标记",
+ "mapTooManyMarkers": "当前页面的位置超过 ${limit} 个,请使用筛选或减小每页记录数以显示地图",
"defaultCoordinateSystem": "新录入默认坐标系",
"defaultCoordinateSystemTip": "仅影响新录入,已有位置保留各自的坐标系",
"locationPasteInEditor": "请在位置编辑器中粘贴坐标对,明确纬度、经度顺序和坐标系",
@@ -2750,6 +2797,7 @@
"quit": "退出程序"
},
"_attrView": {
+ "map": "地图",
"dateCalendar": "历法",
"solarCalendar": "公历",
"lunarCalendar": "农历",
diff --git a/app/appearance/langs/zh-TW.json b/app/appearance/langs/zh-TW.json
index 42f6075bf2..b92c026e22 100644
--- a/app/appearance/langs/zh-TW.json
+++ b/app/appearance/langs/zh-TW.json
@@ -1,4 +1,51 @@
{
+ "mapAuthenticationBypass": "啟用驗證繞過時無法使用地圖,記錄仍可存取",
+ "mapSettings": "地圖",
+ "mapServices": "地圖服務",
+ "mapServicesTip": "在目前裝置新增服務,然後在每個資料庫地圖檢視中個別選擇服務",
+ "mapAddService": "新增服務",
+ "mapServiceName": "服務名稱",
+ "mapServiceID": "服務 ID",
+ "mapServiceIDTip": "在其他裝置設定同一服務時保留此 ID,既有檢視會繼續引用該 ID",
+ "mapProvider": "地圖提供者",
+ "mapProviderAMap": "高德地圖",
+ "mapProviderTencent": "騰訊地圖",
+ "mapProviderBaidu": "百度地圖",
+ "mapSecurityCode": "安全金鑰",
+ "mapCredentialsTip": "留空以保留已儲存的憑證,輸入新值以取代,或明確選擇清除",
+ "mapClearCredential": "清除已儲存的憑證",
+ "mapCredentialSaved": "已儲存,留空以保留",
+ "mapCredentialsPresent": "所需設定欄位已填寫,尚未驗證服務存取",
+ "mapCredentialsMissing": "缺少所需憑證",
+ "mapNoServices": "未選擇服務",
+ "mapRenderingTip": "地圖僅顯示既有座標,不提供地址搜尋、地理編碼、路線規劃或自動座標辨識,儲存的座標及其宣告的座標系保持不變",
+ "mapProductionTip": "使用前請確認提供者的帳戶資格、授權、配額、允許的網域及適用的地區要求",
+ "mapMissingServiceTip": "此檢視引用的服務不存在,請使用同一 ID 新增服務以恢復引用",
+ "mapSettingsError": "無法載入或儲存地圖設定,請重試",
+ "mapSettingsConflict": "地圖服務已在其他位置變更,請取消此草稿以重新載入後再編輯",
+ "mapServiceIDInvalid": "請使用 1 至 128 個英文字母、數字、底線或連字號組成的唯一 ID,並以字母或數字開頭",
+ "mapServiceNameRequired": "請輸入服務名稱",
+ "mapSaveOrCancel": "請先儲存或取消目前變更",
+ "mapDeleteServiceTip": "刪除此服務?引用該 ID 的檢視將保持未設定狀態,直到重新新增該 ID 或選擇其他服務",
+ "mapView": "地圖",
+ "mapLocationField": "位置欄位",
+ "mapService": "地圖服務",
+ "mapShowRecordList": "顯示記錄清單",
+ "mapSelectLocationField": "請選擇位置欄位",
+ "mapSelectService": "請選擇地圖服務",
+ "mapMissingLocationField": "儲存的位置欄位無法使用,請選擇位置欄位",
+ "mapMissingService": "此裝置沒有儲存的地圖服務,請在設定 - 地圖中新增相同 ID 的服務,或選擇其他服務",
+ "mapPageScope": "地圖範圍為篩選結果中已載入的 ${shown} 筆記錄,共 ${total} 筆",
+ "mapSkippedLocations": "已略過的位置:${empty} 筆缺少座標,${invalid} 筆無效,${unknown} 筆座標系未知,${mismatch} 筆座標系不相容,${projection} 個投影不支援",
+ "mapNoMarkers": "已載入的記錄中沒有相容的位置",
+ "mapLoading": "正在載入地圖...",
+ "mapLoadError": "地圖無法載入,記錄仍然可用",
+ "mapUnsupportedClient": "此用戶端尚不支援隔離的地圖執行環境,記錄仍然可用",
+ "mapOffline": "地圖處於離線狀態,記錄仍然可用",
+ "mapPublicFallback": "發佈頁面和匯出內容不載入地圖",
+ "mapConfigureServices": "設定地圖服務",
+ "mapFitMarkers": "顯示全部已載入的標記",
+ "mapTooManyMarkers": "目前頁面的位置超過 ${limit} 個,請使用篩選或減少每頁記錄數以顯示地圖",
"defaultCoordinateSystem": "新輸入預設座標系",
"defaultCoordinateSystemTip": "僅影響新輸入,既有位置保留各自的座標系",
"locationPasteInEditor": "請在位置編輯器中貼上座標對,明確緯度、經度順序和座標系",
@@ -2750,6 +2797,7 @@
"quit": "退出程序"
},
"_attrView": {
+ "map": "地圖",
"dateCalendar": "曆法",
"solarCalendar": "西曆",
"lunarCalendar": "農曆",
diff --git a/app/electron/main.js b/app/electron/main.js
index 8590a4165e..faab7e60c7 100644
--- a/app/electron/main.js
+++ b/app/electron/main.js
@@ -21,6 +21,8 @@ const {
net,
app,
BrowserWindow,
+ WebContentsView,
+ MessageChannelMain,
Notification,
shell,
session,
@@ -80,6 +82,7 @@ const {WindowWorkspaceRegistry, flushWindowWorkspaces} = require("./windowWorksp
const {captureWindowGeometry, normalizeWindowGeometry, restoreWindowGeometry} = require("./windowGeometry");
const {createSettingsWindows} = require("./settingsWindows");
const {createSettingsTaskBridge} = require("./settingsTasks");
+const {createMapHostManager} = require("./mapHostManager");
const windowWorkspaces = new WindowWorkspaceRegistry();
const {createNotebookSystemLock, prepareNotebookSystemLock} = require("./notebookSystemLock");
const {
@@ -753,7 +756,6 @@ if (isDevEnv && process.defaultApp && process.argv.length >= 2) {
app.commandLine.appendSwitch("auto-detect", "false");
if (!remoteKernelTarget) {
- app.commandLine.appendSwitch("disable-web-security");
app.commandLine.appendSwitch("no-proxy-server");
}
app.commandLine.appendSwitch("enable-features", "PlatformHEVCDecoderSupport");
@@ -2924,6 +2926,8 @@ const initRemoteKernel = async (target) => {
};
app.whenReady().then(() => {
+ createMapHostManager({app, ipcMain, session, BrowserWindow, WebContentsView, MessageChannelMain, appDir,
+ getTarget: id => getWindowKernelTarget(id), isInitialized: id => initializedWindowIds.has(id)});
const startupStartedAt = Date.now();
writeLog("app ready, preparing startup window");
const appCrashInfo = readAppCrashInfo();
diff --git a/app/electron/mapHostManager.js b/app/electron/mapHostManager.js
new file mode 100644
index 0000000000..7ec8a46710
--- /dev/null
+++ b/app/electron/mapHostManager.js
@@ -0,0 +1,368 @@
+// SiYuan - From thought to insight, with agents
+// Copyright (c) 2020-present, b3log.org
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+const path = require("node:path");
+const fs = require("node:fs/promises");
+const {randomBytes} = require("node:crypto");
+const {
+ hasUnsafeMapSwitches, normalizeMapOrigin, parseMapCreate, parseMapCommand, parseMapReply, parseMapGeometry,
+ isAllowedMapProviderURL, getMapRequestPolicy, createMapContentSecurityPolicy,
+} = require("./mapHostPolicy");
+
+const deniedResponse = () => new Response("Forbidden", {status: 403,
+ headers: {"Content-Type": "text/plain; charset=utf-8", "Cache-Control": "no-store"}});
+const withoutCredentials = (headers) => Object.fromEntries(Object.entries(headers || {})
+ .filter(([name]) => !["cookie", "authorization", "proxy-authorization"].includes(name.toLowerCase())));
+
+// 此会话从不向任何内核发送网络请求,包括未设置密码的本机内核。
+const createMapSessionRouter = ({ses, origin, provider, appDir, readFile = fs.readFile, trackFetch = () => {}}) => {
+ let destroyed = false;
+ let documentRequested = false;
+ const requests = new Set();
+ ses.setPermissionRequestHandler((_contents, _permission, callback) => callback(false));
+ ses.setPermissionCheckHandler(() => false);
+ ses.setDevicePermissionHandler(() => false);
+ ses.setDisplayMediaRequestHandler((_request, callback) => callback({}));
+ ses.setCertificateVerifyProc((_request, callback) => callback(-3));
+ ses.allowNTLMCredentialsForDomains("");
+ ses.on("will-download", event => event.preventDefault());
+ ses.webRequest.onBeforeRequest((details, callback) => {
+ const policy = getMapRequestPolicy(details.url, details.method, origin, provider);
+ let allowed = !destroyed && !!policy;
+ if (details.resourceType === "mainFrame") {
+ allowed = allowed && policy.type === "local" && policy.document && !documentRequested;
+ if (allowed) documentRequested = true;
+ } else if (details.resourceType === "subFrame" || details.resourceType === "webSocket") {
+ allowed = false;
+ } else if (!destroyed && /^(blob:|data:)/.test(details.url)) {
+ // 仅允许无网络权限的图片数据,以及本地预载后创建的 CSP worker。
+ allowed = ["image", "other"].includes(details.resourceType);
+ }
+ callback({cancel: !allowed});
+ });
+ ses.webRequest.onBeforeSendHeaders((details, callback) => {
+ callback({cancel: destroyed, requestHeaders: withoutCredentials(details.requestHeaders)});
+ });
+ ses.webRequest.onHeadersReceived((details, callback) => {
+ const responseHeaders = Object.fromEntries(Object.entries(details.responseHeaders || {})
+ .filter(([name]) => !["set-cookie", "set-cookie2"].includes(name.toLowerCase())));
+ callback({cancel: destroyed, responseHeaders});
+ });
+ const handle = async (request) => {
+ const policy = !destroyed && getMapRequestPolicy(request.url, request.method, origin, provider);
+ if (!policy || request.headers.get("service-worker")) return deniedResponse();
+ if (policy.type === "local") {
+ try {
+ const data = await readFile(path.join(appDir, policy.file[0]));
+ if (destroyed) return deniedResponse();
+ const headers = {"Content-Type": policy.file[1], "Cache-Control": "no-store",
+ "X-Content-Type-Options": "nosniff", "Access-Control-Allow-Origin": "*",
+ "Referrer-Policy": "strict-origin-when-cross-origin",
+ "Permissions-Policy": "geolocation=(), camera=(), microphone=(), payment=(), usb=(), serial=(), bluetooth=()"};
+ if (policy.document) headers["Content-Security-Policy"] = createMapContentSecurityPolicy(origin, provider);
+ return new Response(request.method === "HEAD" ? null : data, {headers});
+ } catch (_error) {
+ return new Response("Not Found", {status: 404});
+ }
+ }
+ const abort = new AbortController();
+ requests.add(abort);
+ const timer = setTimeout(() => abort.abort(), 30000);
+ timer.unref?.();
+ const abortRequest = () => abort.abort();
+ request.signal?.addEventListener("abort", abortRequest, {once: true});
+ if (request.signal?.aborted) abort.abort();
+ let activeURL;
+ let finished = false;
+ const finish = () => {
+ if (finished) return;
+ finished = true;
+ clearTimeout(timer);
+ request.signal?.removeEventListener("abort", abortRequest);
+ if (activeURL) trackFetch(activeURL, -1);
+ requests.delete(abort);
+ };
+ abort.signal.addEventListener("abort", finish, {once: true});
+ try {
+ let url = request.url;
+ for (let redirects = 0; redirects <= 5; redirects++) {
+ if (destroyed || abort.signal.aborted || !isAllowedMapProviderURL(url, provider)) break;
+ if (activeURL) trackFetch(activeURL, -1);
+ activeURL = url;
+ trackFetch(activeURL, 1);
+ // 不复制浏览器凭证或任意请求头;服务商的密钥来源校验仅使用内核来源,不携带笔记路径。
+ const headers = {"Referer": origin + "/"};
+ for (const name of ["accept", "accept-language", "range"]) {
+ const value = request.headers.get(name);
+ if (value && value.length <= 4096) headers[name] = value;
+ }
+ const response = await ses.fetch(url, {method: request.method, headers, credentials: "omit",
+ cache: "no-store", redirect: "manual", bypassCustomProtocolHandlers: true, signal: abort.signal});
+ if ([301, 302, 303, 307, 308].includes(response.status)) {
+ const location = response.headers.get("location");
+ await response.body?.cancel();
+ if (!location) break;
+ url = new URL(location, url).href;
+ continue;
+ }
+ if (destroyed || abort.signal.aborted) {
+ await response.body?.cancel();
+ break;
+ }
+ const responseHeaders = new Headers(response.headers);
+ for (const name of ["set-cookie", "set-cookie2", "www-authenticate", "proxy-authenticate", "refresh", "location"]) {
+ responseHeaders.delete(name);
+ }
+ responseHeaders.set("Cache-Control", "no-store");
+ if (!response.body || request.method === "HEAD") {
+ await response.body?.cancel();
+ finish();
+ return new Response(null, {status: response.status, headers: responseHeaders});
+ }
+ const reader = response.body.getReader();
+ const body = new ReadableStream({
+ async pull(controller) {
+ try {
+ const {done, value} = await reader.read();
+ if (destroyed || abort.signal.aborted) throw new Error("Map request closed");
+ if (done) { controller.close(); finish(); } else controller.enqueue(value);
+ } catch (error) { controller.error(error); finish(); }
+ },
+ async cancel() { abort.abort(); await reader.cancel().catch(() => {}); finish(); },
+ });
+ return new Response(body, {status: response.status, headers: responseHeaders});
+ }
+ } catch (_error) {
+ // 服务商地址可能包含密钥,不记录请求地址或异常文本。
+ }
+ finish();
+ return deniedResponse();
+ };
+ ses.protocol.handle("http", handle);
+ ses.protocol.handle("https", handle);
+ ses.protocol.handle("file", deniedResponse);
+ return {
+ destroy: () => {
+ if (destroyed) return;
+ destroyed = true;
+ for (const request of requests) request.abort();
+ requests.clear();
+ // Electron 没有 Session.destroy;清理状态后仍保留拒绝处理器,阻止残留请求恢复访问。
+ void Promise.allSettled([ses.closeAllConnections(), ses.clearStorageData(), ses.clearAuthCache(),
+ ses.clearCache(), ses.clearHostResolverCache()]);
+ },
+ };
+};
+
+const createMapHostManager = ({app, ipcMain, session, BrowserWindow, WebContentsView, MessageChannelMain,
+ getTarget, isInitialized, appDir, readFile, randomID = () => randomBytes(24).toString("hex")}) => {
+ const hosts = new Map();
+ const mapContents = new Set();
+ const activeFetchURLs = new Map();
+ const trackFetch = (url, delta) => {
+ const count = (activeFetchURLs.get(url) || 0) + delta;
+ if (count <= 0) activeFetchURLs.delete(url); else activeFetchURLs.set(url, count);
+ };
+ const isMapAuthentication = (contents, url) => contents ? mapContents.has(contents.id) : activeFetchURLs.has(String(url));
+ // Session.fetch 的客户端证书事件可能只在 app 触发,且 WebContents 为空。
+ app.on("select-client-certificate", (event, contents, url, _certificates, callback) => {
+ if (!contents && isMapAuthentication(contents, url)) { event.preventDefault(); callback(); }
+ });
+ app.on("login", (event, contents, details, _authInfo, callback) => {
+ if (!contents && isMapAuthentication(contents, details.url)) { event.preventDefault(); callback(); }
+ });
+ const trustedOwner = event => {
+ if (!event?.sender || event.sender.isDestroyed() || event.senderFrame !== event.sender.mainFrame ||
+ !isInitialized(event.sender.id)) return;
+ const target = getTarget(event.sender.id);
+ const origin = normalizeMapOrigin(target?.origin);
+ const win = BrowserWindow.fromWebContents(event.sender);
+ if (!origin || !win || win.isDestroyed()) return;
+ try {
+ const url = new URL(event.senderFrame.url);
+ if (url.origin !== origin || !["/stage/build/app/", "/stage/build/app/window.html"].includes(url.pathname)) return;
+ } catch (_error) { return; }
+ return {win, origin};
+ };
+ const getHost = (event, value) => {
+ const owner = trustedOwner(event);
+ if (!owner || value?.version !== 1 || typeof value.instanceID !== "string") return;
+ const host = hosts.get(event.sender.id + ":" + value.instanceID);
+ if (host && host.origin === owner.origin && host.frame === event.senderFrame) return host;
+ };
+ const sendOwner = (host, reply) => {
+ if (!host.destroyed && !host.owner.isDestroyed()) host.owner.send("siyuan-map-reply", reply);
+ };
+ const hide = host => {
+ host.geometry = undefined;
+ if (!host.view.webContents.isDestroyed()) host.view.setVisible(false);
+ };
+ const destroy = host => {
+ if (!host || host.destroyed) return;
+ host.destroyed = true;
+ clearTimeout(host.timer);
+ hosts.delete(host.key);
+ for (const [emitter, name, listener] of host.listeners) emitter.removeListener(name, listener);
+ host.ids.clear();
+ host.init.credentials = {};
+ host.points = undefined;
+ host.router.destroy();
+ for (const port of [host.port, host.transferredPort]) {
+ try { port?.close(); } catch (_error) { /* 端口已转移或关闭。 */ }
+ }
+ if (!host.win.isDestroyed()) host.win.contentView.removeChildView(host.view);
+ // 移除视图不会销毁 WebContents,必须实际关闭 SDK 渲染器。
+ if (!host.view.webContents.isDestroyed()) {
+ host.view.webContents.stop();
+ host.view.webContents.close({waitForBeforeUnload: false});
+ }
+ mapContents.delete(host.view.webContents.id);
+ };
+ const fail = (host, code) => {
+ sendOwner(host, {version: 1, instanceID: host.init.instanceID, type: "error", code});
+ destroy(host);
+ };
+ const listen = (host, emitter, name, listener) => {
+ emitter.on(name, listener);
+ host.listeners.push([emitter, name, listener]);
+ };
+ const post = (host, message) => {
+ if (!host.destroyed && host.port) host.port.postMessage(message);
+ };
+ const applyGeometry = host => {
+ const geometry = host.geometry;
+ if (!geometry?.visible || !host.ready || host.destroyed) return;
+ if (!host.win.isFocused() || !host.win.isVisible() || host.win.isMinimized()) {
+ host.view.setVisible(false);
+ return;
+ }
+ host.view.webContents.setZoomFactor(geometry.zoom);
+ host.view.setBounds(geometry.bounds);
+ host.view.webContents.send("siyuan-map-viewport", {logicalSize: geometry.logicalSize, crop: geometry.crop});
+ host.view.setVisible(true);
+ post(host, {version: 1, instanceID: host.init.instanceID, type: "resize"});
+ };
+ ipcMain.handle("siyuan-map-capability", event => ({version: 1,
+ supported: !!trustedOwner(event) && !hasUnsafeMapSwitches(app.commandLine)}));
+ ipcMain.handle("siyuan-map-create", (event, value) => {
+ const owner = trustedOwner(event);
+ const init = parseMapCreate(value);
+ if (!owner || !init) throw new Error("Invalid map host owner or configuration");
+ if (hasUnsafeMapSwitches(app.commandLine)) return {version: 1, instanceID: init.instanceID, error: "unsupportedEnvironment"};
+ const key = event.sender.id + ":" + init.instanceID;
+ if (hosts.has(key) || hosts.size >= 32 || [...hosts.values()].filter(host => host.owner === event.sender).length >= 8) {
+ return {version: 1, instanceID: init.instanceID, error: "hostUnavailable"};
+ }
+ const ses = session.fromPartition("siyuan-map-" + randomID(), {cache: false});
+ const router = createMapSessionRouter({ses, origin: owner.origin, provider: init.provider, appDir, readFile, trackFetch});
+ let view;
+ try {
+ view = new WebContentsView({webPreferences: {session: ses, sandbox: true, contextIsolation: true,
+ webSecurity: true, nodeIntegration: false, nodeIntegrationInSubFrames: false,
+ nodeIntegrationInWorker: false, webviewTag: false, allowRunningInsecureContent: false,
+ navigateOnDragDrop: false, safeDialogs: true, disableDialogs: true, devTools: false,
+ spellcheck: false, preload: path.join(__dirname, "mapHostPreload.js")}});
+ } catch (_error) {
+ router.destroy();
+ return {version: 1, instanceID: init.instanceID, error: "hostUnavailable"};
+ }
+ const contents = view.webContents;
+ // 全局 web-contents-created 会安装外部打开链接处理器,必须在加载前替换为拒绝。
+ contents.setWindowOpenHandler(() => ({action: "deny"}));
+ mapContents.add(contents.id);
+ const host = {key, init, owner: event.sender, frame: event.senderFrame, win: owner.win, origin: owner.origin,
+ view, router, listeners: [], ids: new Set(), revision: -1, ready: false, bootstrapped: false, destroyed: false};
+ hosts.set(key, host);
+ const denyNavigation = event => event.preventDefault();
+ for (const name of ["will-navigate", "will-frame-navigate", "will-redirect", "will-attach-webview"]) {
+ listen(host, contents, name, denyNavigation);
+ }
+ listen(host, contents, "select-client-certificate", (event, _url, _certificates, callback) => { event.preventDefault(); callback(); });
+ listen(host, contents, "login", (event, _details, _auth, callback) => { event.preventDefault(); callback(); });
+ listen(host, contents, "certificate-error", (_event, _url, _error, _certificate, callback) => callback(false));
+ listen(host, contents, "render-process-gone", () => fail(host, "hostUnavailable"));
+ listen(host, contents, "destroyed", () => destroy(host));
+ listen(host, event.sender, "destroyed", () => destroy(host));
+ listen(host, event.sender, "render-process-gone", () => destroy(host));
+ listen(host, event.sender, "did-start-navigation", details => {
+ if (details.isMainFrame && !details.isSameDocument) destroy(host);
+ });
+ for (const name of ["resize", "hide", "minimize", "enter-full-screen", "leave-full-screen"]) {
+ listen(host, owner.win, name, () => hide(host));
+ }
+ listen(host, owner.win, "blur", () => view.setVisible(false));
+ for (const name of ["focus", "show", "restore"]) listen(host, owner.win, name, () => applyGeometry(host));
+ listen(host, event.sender, "zoom-changed", () => hide(host));
+ const nonce = randomID();
+ const entryURL = owner.origin + "/stage/map/index.html?provider=" + init.provider + "#" + init.instanceID + ":" + nonce;
+ let loaded = false;
+ listen(host, contents, "did-finish-load", () => {
+ if (host.destroyed) return;
+ if (loaded || contents.getURL() !== entryURL) { fail(host, "hostUnavailable"); return; }
+ loaded = true;
+ const {port1, port2} = new MessageChannelMain();
+ host.port = port1;
+ host.transferredPort = port2;
+ port1.on("message", ({data}) => {
+ if (host.destroyed) return;
+ const reply = parseMapReply(data, init.instanceID);
+ if (!reply) return;
+ if (reply.type === "bootstrapReady" && !host.bootstrapped) {
+ host.bootstrapped = true;
+ post(host, init);
+ init.credentials = {};
+ } else if (reply.type === "ready" && host.bootstrapped && !host.ready) {
+ host.ready = true;
+ clearTimeout(host.timer);
+ if (host.points) post(host, host.points);
+ post(host, {version: 1, instanceID: init.instanceID, type: "theme", theme: init.theme});
+ if (host.pendingFit) post(host, {version: 1, instanceID: init.instanceID, type: "fit"});
+ applyGeometry(host);
+ sendOwner(host, reply);
+ } else if (reply.type === "markerClick" && host.ready && reply.revision === host.revision && host.ids.has(reply.id)) {
+ sendOwner(host, reply);
+ } else if (reply.type === "error") fail(host, reply.code);
+ });
+ port1.on("close", () => fail(host, "hostUnavailable"));
+ port1.start();
+ contents.postMessage("siyuan-map-port", {version: 1, instanceID: init.instanceID, nonce, provider: init.provider}, [port2]);
+ });
+ host.timer = setTimeout(() => fail(host, "hostUnavailable"), 30000);
+ host.timer.unref?.();
+ try {
+ view.setVisible(false);
+ owner.win.contentView.addChildView(view);
+ void contents.loadURL(entryURL).catch(() => fail(host, "hostUnavailable"));
+ } catch (_error) { fail(host, "hostUnavailable"); }
+ return {version: 1, instanceID: init.instanceID};
+ });
+ ipcMain.on("siyuan-map-command", (event, value) => {
+ const host = getHost(event, value);
+ if (!host) return;
+ const command = parseMapCommand(value, host.init.instanceID, host.init.provider);
+ if (!command) return;
+ if (command.type === "destroy") { destroy(host); return; }
+ if (command.type === "setPoints") {
+ if (command.revision <= host.revision) return;
+ host.revision = command.revision;
+ host.points = command;
+ host.ids = new Set(command.points.map(point => point.id));
+ } else if (command.type === "theme") host.init.theme = command.theme;
+ else if (command.type === "fit") host.pendingFit = true;
+ if (host.ready) post(host, command);
+ });
+ ipcMain.on("siyuan-map-geometry", (event, value) => {
+ const host = getHost(event, value);
+ if (!host) return;
+ const geometry = parseMapGeometry(value, host.owner.getZoomFactor(), host.win.getContentBounds());
+ if (!geometry?.visible) { hide(host); return; }
+ host.geometry = geometry;
+ applyGeometry(host);
+ });
+ ipcMain.on("siyuan-map-destroy", (event, value) => destroy(getHost(event, value)));
+ app.on("before-quit", () => [...hosts.values()].forEach(destroy));
+ return {destroyAll: () => [...hosts.values()].forEach(destroy)};
+};
+
+module.exports = {createMapSessionRouter, createMapHostManager};
diff --git a/app/electron/mapHostManager.test.js b/app/electron/mapHostManager.test.js
new file mode 100644
index 0000000000..a5bccc4ad8
--- /dev/null
+++ b/app/electron/mapHostManager.test.js
@@ -0,0 +1,370 @@
+const assert = require("node:assert/strict");
+const {EventEmitter} = require("node:events");
+const {test} = require("node:test");
+const fs = require("node:fs");
+const path = require("node:path");
+const {createMapSessionRouter, createMapHostManager} = require("./mapHostManager");
+
+const origin = "http://127.0.0.1:6806";
+const instanceID = "a".repeat(48);
+const envelope = {version: 1, instanceID};
+const createSession = () => {
+ const ses = Object.assign(new EventEmitter(), {handlers: {}, protocols: {}, cleanup: [], fetches: []});
+ for (const method of ["setPermissionRequestHandler", "setPermissionCheckHandler", "setDevicePermissionHandler",
+ "setDisplayMediaRequestHandler", "setCertificateVerifyProc", "allowNTLMCredentialsForDomains"]) {
+ ses[method] = value => { ses.handlers[method] = value; };
+ }
+ for (const method of ["closeAllConnections", "clearStorageData", "clearAuthCache", "clearCache", "clearHostResolverCache"]) {
+ ses[method] = async () => { ses.cleanup.push(method); };
+ }
+ ses.webRequest = {};
+ for (const method of ["onBeforeRequest", "onBeforeSendHeaders", "onHeadersReceived"]) {
+ ses.webRequest[method] = handler => { ses.handlers[method] = handler; };
+ }
+ ses.protocol = {handle(scheme, handler) { ses.protocols[scheme] = handler; }};
+ ses.fetch = async (url, options) => {
+ ses.fetches.push({url, options});
+ return new Response("tile", {headers: {"Content-Type": "application/octet-stream"}});
+ };
+ ses.before = details => {
+ let result;
+ ses.handlers.onBeforeRequest({method: "GET", resourceType: "xhr", ...details}, value => { result = value; });
+ return result;
+ };
+ return ses;
+};
+const setupRouter = (options = {}) => {
+ const ses = createSession();
+ const files = [];
+ const router = createMapSessionRouter({ses, origin, provider: "openfreemap", appDir: "/app", readFile: async file => {
+ files.push(file); return Buffer.from("asset");
+ }, ...options});
+ return {ses, router, files};
+};
+
+test("anonymous map session blocks permissions, downloads, credentials and all non-manifest kernel traffic", async () => {
+ const {ses, router, files} = setupRouter();
+ let permission;
+ ses.handlers.setPermissionRequestHandler({}, "geolocation", result => { permission = result; });
+ assert.equal(permission, false);
+ assert.equal(ses.handlers.setPermissionCheckHandler(), false);
+ assert.equal(ses.handlers.setDevicePermissionHandler(), false);
+ let download = false;
+ ses.emit("will-download", {preventDefault() { download = true; }});
+ assert.equal(download, true);
+ for (const url of [origin + "/api/system/getConf", origin + "/api/network/proxy", "http://127.0.0.1:6807/api/sql",
+ "file:///etc/passwd", "ws://127.0.0.1:6806/ws", "https://webapi.amap.com/maps"]) {
+ assert.equal(ses.before({url}).cancel, true, url);
+ assert.equal((await ses.protocols.http(new Request(url.replace(/^ws:/, "http:")))).status, 403);
+ }
+ const response = await ses.protocols.http(new Request(origin + "/stage/map/index.html?provider=openfreemap"));
+ assert.equal(await response.text(), "asset");
+ assert.equal(files.length, 1);
+ assert.equal(files[0], "/app/stage/map/index.html");
+ assert.match(response.headers.get("content-security-policy"), /sandbox allow-scripts/);
+ assert.equal(ses.fetches.length, 0);
+ let headers;
+ ses.handlers.onBeforeSendHeaders({requestHeaders: {Cookie: "secret", Authorization: "secret", "Proxy-Authorization": "secret", Accept: "*/*"}}, value => { headers = value; });
+ assert.deepEqual(headers.requestHeaders, {Accept: "*/*"});
+ ses.handlers.onHeadersReceived({responseHeaders: {"Set-Cookie": ["secret"], "Content-Type": ["image/png"]}}, value => { headers = value; });
+ assert.deepEqual(headers.responseHeaders, {"Content-Type": ["image/png"]});
+ router.destroy();
+});
+
+test("session allows only one exact initial document and no subframe, websocket or service worker", async () => {
+ const {ses, router} = setupRouter();
+ const url = origin + "/stage/map/index.html?provider=openfreemap";
+ assert.equal(ses.before({url, resourceType: "mainFrame"}).cancel, false);
+ assert.equal(ses.before({url, resourceType: "mainFrame"}).cancel, true);
+ for (const resourceType of ["subFrame", "webSocket"]) {
+ assert.equal(ses.before({url: "https://tiles.openfreemap.org/a", resourceType}).cancel, true);
+ }
+ assert.equal(ses.before({url: "blob:" + origin + "/worker", resourceType: "other"}).cancel, false);
+ assert.equal(ses.before({url: "data:text/html,evil", resourceType: "mainFrame"}).cancel, true);
+ assert.equal((await ses.protocols.http(new Request(origin + "/stage/build/map/host.js", {headers: {"Service-Worker": "script"}}))).status, 403);
+ router.destroy();
+});
+
+test("provider forwarding uses its own session with no browser secrets and validates every redirect", async () => {
+ const {ses, router} = setupRouter();
+ ses.fetch = async (url, options) => {
+ ses.fetches.push({url, options});
+ return new Response(null, {status: 302, headers: {Location: origin + "/api/system/getConf"}});
+ };
+ const request = new Request("https://tiles.openfreemap.org/start", {headers: {
+ Cookie: "secret", Authorization: "Bearer secret", "X-User-Token": "secret", Referer: origin + "/private-note", Accept: "application/json",
+ }});
+ assert.equal((await ses.protocols.https(request)).status, 403);
+ assert.equal(ses.fetches.length, 1);
+ assert.equal(ses.fetches[0].options.credentials, "omit");
+ assert.equal(ses.fetches[0].options.bypassCustomProtocolHandlers, true);
+ assert.equal(ses.fetches[0].options.redirect, "manual");
+ assert.deepEqual(ses.fetches[0].options.headers, {Referer: origin + "/", accept: "application/json"});
+ router.destroy();
+});
+
+test("same-provider redirects work without leaking redirect headers or provider cookies", async () => {
+ const tracked = [];
+ const {ses, router} = setupRouter({trackFetch: (url, delta) => tracked.push([url, delta])});
+ ses.fetch = async (url, options) => {
+ ses.fetches.push({url, options});
+ return url.endsWith("/start") ? new Response(null, {status: 307, headers: {Location: "/end"}}) :
+ new Response("tile", {headers: {"Set-Cookie": "secret", Refresh: "0;url=http://localhost", "Content-Type": "image/png"}});
+ };
+ const response = await ses.protocols.https(new Request("https://tiles.openfreemap.org/start"));
+ assert.equal(await response.text(), "tile");
+ assert.equal(ses.fetches.length, 2);
+ assert.equal(response.headers.get("set-cookie"), null);
+ assert.equal(response.headers.get("refresh"), null);
+ assert.equal(tracked.reduce((total, entry) => total + entry[1], 0), 0);
+ router.destroy();
+});
+
+test("destroy aborts in-flight provider requests, clears session state and leaves orphan traffic denied", async () => {
+ const {ses, router} = setupRouter();
+ let signal;
+ ses.fetch = async (_url, options) => {
+ signal = options.signal;
+ return new Promise((_resolve, reject) => signal.addEventListener("abort", () => reject(new Error("aborted"))));
+ };
+ const pending = ses.protocols.https(new Request("https://tiles.openfreemap.org/tile"));
+ router.destroy();
+ assert.equal(signal.aborted, true);
+ assert.equal((await pending).status, 403);
+ assert.equal(ses.before({url: "https://tiles.openfreemap.org/tile"}).cancel, true);
+ assert.equal((await ses.protocols.http(new Request(origin + "/stage/map/host.css"))).status, 403);
+ assert.deepEqual(ses.cleanup.sort(), ["clearAuthCache", "clearCache", "clearHostResolverCache", "clearStorageData", "closeAllConnections"].sort());
+ router.destroy();
+ assert.equal(ses.cleanup.length, 5);
+});
+
+const setup = () => {
+ let sequence = 0;
+ const handlers = {}, sessions = [], views = [], channels = [], order = [], switches = new Map();
+ const app = Object.assign(new EventEmitter(), {commandLine: {
+ hasSwitch: name => switches.has(name), getSwitchValue: name => switches.get(name),
+ }});
+ const contents = id => Object.assign(new EventEmitter(), {id, mainFrame: {url: origin + "/stage/build/app/"}, sent: [], destroyed: false, zoom: 1,
+ isDestroyed() { return this.destroyed; }, getZoomFactor() { return this.zoom; },
+ send(...args) { this.sent.push(structuredClone(args)); }});
+ const owner = contents(1);
+ const win = Object.assign(new EventEmitter(), {webContents: owner, destroyed: false, focused: true, children: [],
+ isDestroyed() { return this.destroyed; }, isFocused() { return this.focused; },
+ isVisible: () => true, isMinimized: () => false, getContentBounds: () => ({width: 1000, height: 800})});
+ win.contentView = {addChildView: view => win.children.push(view), removeChildView: view => { win.children = win.children.filter(item => item !== view); }};
+ const target = {origin};
+ let initialized = true;
+ const manager = createMapHostManager({app, appDir: "/app", getTarget: id => id === 1 ? target : undefined,
+ isInitialized: () => initialized, readFile: async () => Buffer.from("asset"), randomID: () => (++sequence).toString(16).padStart(48, "0"),
+ ipcMain: {handle: (name, handler) => { handlers[name] = handler; }, on: (name, handler) => { handlers[name] = handler; }},
+ BrowserWindow: {fromWebContents: value => value === owner ? win : undefined},
+ session: {fromPartition(partition, options) { const ses = createSession(); Object.assign(ses, {partition, options}); sessions.push(ses); return ses; }},
+ WebContentsView: class {
+ constructor(options) {
+ this.options = options;
+ this.webContents = contents(100 + views.length);
+ Object.assign(this.webContents, {
+ setWindowOpenHandler(handler) { this.openHandler = handler; order.push("openHandler"); },
+ getURL() { return this.url; },
+ async loadURL(url) { this.url = url; order.push("load"); },
+ postMessage(...args) { this.transferred = args; },
+ setZoomFactor(zoom) { this.zoom = zoom; },
+ stop() { this.stopped = true; },
+ close(options) { this.closeOptions = options; this.destroyed = true; this.emit("destroyed"); },
+ });
+ views.push(this);
+ }
+ setVisible(value) { this.visible = value; }
+ setBounds(value) { this.bounds = value; }
+ },
+ MessageChannelMain: class {
+ constructor() {
+ const port = () => Object.assign(new EventEmitter(), {sent: [], postMessage(value) { this.sent.push(structuredClone(value)); },
+ start() { this.started = true; }, close() { this.closed = true; }});
+ this.port1 = port(); this.port2 = port(); channels.push(this);
+ }
+ },
+ });
+ const event = () => ({sender: owner, senderFrame: owner.mainFrame});
+ const create = (data = {}) => handlers["siyuan-map-create"](event(), {...envelope, provider: "openfreemap", theme: "light", ...data});
+ const command = data => handlers["siyuan-map-command"](event(), {...envelope, ...data});
+ const reply = data => channels.at(-1).port1.emit("message", {data: {...envelope, ...data}});
+ const load = () => views.at(-1).webContents.emit("did-finish-load");
+ return {manager, app, handlers, sessions, views, channels, order, switches, owner, win, target, event, create, command, reply, load,
+ setInitialized(value) { initialized = value; }};
+};
+
+test("WCV has a unique memory session, secure preferences, no external-open handler and no credentials before bootstrap", () => {
+ const s = setup();
+ assert.deepEqual(s.create({provider: "amap", credentials: {apiKey: "test-key", securityCode: "test-code"}}), envelope);
+ const prefs = s.views[0].options.webPreferences;
+ assert.equal(prefs.sandbox, true); assert.equal(prefs.webSecurity, true); assert.equal(prefs.contextIsolation, true);
+ for (const key of ["nodeIntegration", "nodeIntegrationInSubFrames", "nodeIntegrationInWorker", "webviewTag", "allowRunningInsecureContent"]) {
+ assert.equal(prefs[key], false);
+ }
+ assert.equal(s.sessions[0].partition.startsWith("persist:"), false);
+ assert.deepEqual(s.sessions[0].options, {cache: false});
+ assert.deepEqual(s.order, ["openHandler", "load"]);
+ assert.deepEqual(s.views[0].webContents.openHandler({url: "file:///etc/passwd"}), {action: "deny"});
+ assert.equal(s.views[0].visible, false);
+ assert.equal(s.views[0].webContents.url.includes("test-key"), false);
+ s.load();
+ assert.equal(s.channels[0].port1.sent.length, 0);
+ s.reply({type: "ready"});
+ assert.equal(s.owner.sent.length, 0);
+ s.reply({type: "bootstrapReady"});
+ assert.equal(s.channels[0].port1.sent[0].credentials.apiKey, "test-key");
+ s.reply({type: "bootstrapReady"});
+ assert.equal(s.channels[0].port1.sent.length, 1);
+ s.manager.destroyAll();
+});
+
+test("only initialized registered owner main frame may create, update or destroy a map", () => {
+ const s = setup();
+ const create = s.handlers["siyuan-map-create"];
+ const config = {...envelope, provider: "openfreemap", theme: "light"};
+ assert.throws(() => create({...s.event(), senderFrame: {}}, config));
+ s.setInitialized(false); assert.throws(() => create(s.event(), config)); s.setInitialized(true);
+ s.owner.mainFrame.url = "http://evil.example/stage/build/app/"; assert.throws(() => create(s.event(), config));
+ s.owner.mainFrame.url = origin + "/stage/build/app/";
+ s.create();
+ s.handlers["siyuan-map-destroy"]({...s.event(), senderFrame: {}}, envelope);
+ assert.equal(s.views[0].webContents.destroyed, false);
+ s.target.origin = "http://127.0.0.1:6807";
+ s.handlers["siyuan-map-destroy"](s.event(), envelope);
+ assert.equal(s.views[0].webContents.destroyed, false);
+ s.manager.destroyAll();
+});
+
+test("points and clicks are bounded by current revision and membership; ready is one-shot", () => {
+ const s = setup(); s.create(); s.load();
+ s.command({type: "setPoints", revision: 2, points: [{id: "row", longitude: 10, latitude: 20, coordinateSystem: "wgs84", secret: "never"}]});
+ s.reply({type: "bootstrapReady"}); s.reply({type: "ready"}); s.reply({type: "ready"});
+ assert.equal(s.owner.sent.filter(entry => entry[1].type === "ready").length, 1);
+ assert.equal(s.channels[0].port1.sent.find(entry => entry.type === "setPoints").points[0].secret, undefined);
+ s.reply({type: "markerClick", id: "row", revision: 1});
+ s.reply({type: "markerClick", id: "unknown", revision: 2});
+ s.reply({type: "markerClick", id: "row", revision: 2, url: "https://evil.example"});
+ assert.deepEqual(s.owner.sent.filter(entry => entry[1].type === "markerClick").map(entry => entry[1]),
+ [{...envelope, type: "markerClick", id: "row", revision: 2}]);
+ s.command({type: "setPoints", revision: 3, points: []});
+ s.reply({type: "markerClick", id: "row", revision: 2});
+ assert.equal(s.owner.sent.filter(entry => entry[1].type === "markerClick").length, 1);
+ s.manager.destroyAll();
+});
+
+test("geometry is invisible before ready, uses owner zoom, and hides on invalid geometry or window transitions", () => {
+ const s = setup(); s.create(); s.load(); s.owner.zoom = 1.25;
+ const geometry = {...envelope, visible: true, bounds: {x: 10, y: 20, width: 200, height: 100},
+ logicalSize: {width: 400, height: 300}, crop: {x: 30, y: 40}};
+ s.handlers["siyuan-map-geometry"](s.event(), geometry);
+ assert.equal(s.views[0].visible, false);
+ s.reply({type: "bootstrapReady"}); s.reply({type: "ready"});
+ assert.equal(s.views[0].visible, true);
+ assert.deepEqual(s.views[0].bounds, {x: 13, y: 25, width: 249, height: 125});
+ assert.equal(s.views[0].webContents.zoom, 1.25);
+ s.win.emit("resize"); assert.equal(s.views[0].visible, false);
+ s.handlers["siyuan-map-geometry"](s.event(), geometry); assert.equal(s.views[0].visible, true);
+ s.handlers["siyuan-map-geometry"](s.event(), {...geometry, bounds: {...geometry.bounds, width: 10000}});
+ assert.equal(s.views[0].visible, false);
+ s.manager.destroyAll();
+});
+
+test("destroy and owner navigation close real contents, ports, requests and session; stale events cannot resurrect", () => {
+ const s = setup(); s.create(); s.load(); s.reply({type: "bootstrapReady"});
+ s.owner.emit("did-start-navigation", {isMainFrame: true, isSameDocument: false});
+ assert.equal(s.views[0].webContents.destroyed, true);
+ assert.deepEqual(s.views[0].webContents.closeOptions, {waitForBeforeUnload: false});
+ assert.equal(s.channels[0].port1.closed, true); assert.equal(s.channels[0].port2.closed, true);
+ assert.equal(s.win.children.length, 0); assert.equal(s.sessions[0].cleanup.length, 5);
+ s.reply({type: "ready"}); assert.equal(s.owner.sent.length, 0);
+ s.manager.destroyAll(); assert.equal(s.sessions[0].cleanup.length, 5);
+ s.create({instanceID: "b".repeat(48)});
+ assert.notEqual(s.sessions[0].partition, s.sessions[1].partition);
+ s.manager.destroyAll();
+});
+
+test("unsafe effective switches reject creation and duplicate instance IDs cannot replace a running host", () => {
+ const s = setup(); s.switches.set("disable-web-security", "");
+ assert.equal(s.create().error, "unsupportedEnvironment"); assert.equal(s.views.length, 0);
+ s.switches.clear(); s.create(); assert.equal(s.create().error, "hostUnavailable"); assert.equal(s.views.length, 1);
+ s.manager.destroyAll();
+});
+
+test("capability is credential-free and only supports trusted owners with safe process switches", () => {
+ const s = setup();
+ const capability = s.handlers["siyuan-map-capability"];
+ assert.deepEqual(capability(s.event()), {version: 1, supported: true});
+ assert.deepEqual(capability({...s.event(), senderFrame: {}}), {version: 1, supported: false});
+ s.switches.set("no-sandbox", "");
+ assert.deepEqual(capability(s.event()), {version: 1, supported: false});
+ assert.equal(s.views.length, 0);
+});
+
+test("geometry updates cannot show a map in an unfocused window and focus restores fresh geometry", () => {
+ const s = setup(); s.create(); s.load(); s.reply({type: "bootstrapReady"}); s.reply({type: "ready"});
+ s.win.focused = false; s.win.emit("blur");
+ s.handlers["siyuan-map-geometry"](s.event(), {...envelope, visible: true,
+ bounds: {x: 10, y: 20, width: 200, height: 100}, logicalSize: {width: 200, height: 100}, crop: {x: 0, y: 0}});
+ assert.equal(s.views[0].visible, false);
+ s.win.focused = true; s.win.emit("focus");
+ assert.equal(s.views[0].visible, true);
+ s.win.focused = false; s.win.emit("blur");
+ assert.equal(s.views[0].visible, false);
+ s.win.focused = true; s.win.emit("focus");
+ assert.equal(s.views[0].visible, true);
+ s.manager.destroyAll();
+});
+
+test("navigation, redirects, client certificates, login and renderer failure are blocked", () => {
+ const s = setup(); s.create(); const wc = s.views[0].webContents;
+ for (const name of ["will-navigate", "will-frame-navigate", "will-redirect", "will-attach-webview"]) {
+ let prevented = false; wc.emit(name, {preventDefault() { prevented = true; }}); assert.equal(prevented, true, name);
+ }
+ for (const name of ["select-client-certificate", "login"]) {
+ let prevented = false, answered = false;
+ wc.emit(name, {preventDefault() { prevented = true; }}, {}, {}, (...args) => { answered = true; assert.equal(args.length, 0); });
+ assert.equal(prevented, true); assert.equal(answered, true);
+ }
+ wc.emit("render-process-gone"); assert.equal(wc.destroyed, true);
+ assert.equal(s.owner.sent[0][1].code, "hostUnavailable");
+});
+
+test("main-process provider fetch cannot select client certificates or authenticate, including null WebContents", async () => {
+ const s = setup(); s.create();
+ let finish;
+ s.sessions[0].fetch = () => new Promise(resolve => { finish = resolve; });
+ const url = "https://tiles.openfreemap.org/tile";
+ const pending = s.sessions[0].protocols.https(new Request(url));
+ for (const name of ["select-client-certificate", "login"]) {
+ let prevented = false, answered = false;
+ s.app.emit(name, {preventDefault() { prevented = true; }}, null,
+ name === "login" ? {url} : url, {}, (...args) => { answered = true; assert.equal(args.length, 0); });
+ assert.equal(prevented, true); assert.equal(answered, true);
+ }
+ let affectedOtherURL = false;
+ s.app.emit("select-client-certificate", {preventDefault() { affectedOtherURL = true; }}, null,
+ "https://example.com/", [], () => {});
+ assert.equal(affectedOtherURL, false);
+ finish(new Response("tile"));
+ assert.equal(await (await pending).text(), "tile");
+ s.manager.destroyAll();
+});
+
+test("a closed runtime port destroys the map instead of retaining a live orphan renderer", () => {
+ const s = setup(); s.create(); s.load();
+ s.channels[0].port1.emit("close");
+ assert.equal(s.views[0].webContents.destroyed, true);
+ assert.equal(s.owner.sent[0][1].code, "hostUnavailable");
+});
+
+test("main wiring removes only the process security bypass and never enables remote on map contents", () => {
+ const source = fs.readFileSync(path.join(__dirname, "main.js"), "utf8");
+ assert.ok(!source.includes('appendSwitch("disable-web-security")'));
+ assert.match(source, /createMapHostManager\(/);
+ assert.match(source, /webSecurity: kernelTarget.mode === "remote"/);
+ const manager = fs.readFileSync(path.join(__dirname, "mapHostManager.js"), "utf8");
+ assert.ok(!manager.includes("remote.enable"));
+ assert.ok(!manager.includes("executeJavaScript"));
+ assert.ok(!manager.includes("session.defaultSession"));
+});
diff --git a/app/electron/mapHostPolicy.js b/app/electron/mapHostPolicy.js
new file mode 100644
index 0000000000..2dd2bf0381
--- /dev/null
+++ b/app/electron/mapHostPolicy.js
@@ -0,0 +1,187 @@
+// SiYuan - From thought to insight, with agents
+// Copyright (c) 2020-present, b3log.org
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+// 只读取固定打包资源,不解析渲染器提供的文件路径,也不代理任何内核请求。
+const mapHostFiles = Object.freeze({
+ "/stage/map/index.html": ["stage/map/index.html", "text/html; charset=utf-8"],
+ "/stage/map/host.css": ["stage/map/host.css", "text/css; charset=utf-8"],
+ "/stage/build/map/host.js": ["stage/build/map/host.js", "text/javascript; charset=utf-8"],
+ "/stage/build/map/maplibre-gl.js": ["stage/build/map/maplibre-gl.js", "text/javascript; charset=utf-8"],
+ "/stage/build/map/maplibre-gl.css": ["stage/build/map/maplibre-gl.css", "text/css; charset=utf-8"],
+ "/stage/build/map/maplibre-gl-csp-worker.js": ["stage/build/map/maplibre-gl-csp-worker.js", "text/javascript; charset=utf-8"],
+ "/stage/build/map/maplibre-LICENSE.txt": ["stage/build/map/maplibre-LICENSE.txt", "text/plain; charset=utf-8"],
+});
+
+const providerHosts = Object.freeze({
+ openfreemap: ["tiles.openfreemap.org"],
+ amap: ["webapi.amap.com", "restapi.amap.com", "vdata.amap.com", "a.amap.com", "*.is.autonavi.com"],
+ tencent: ["map.qq.com", "apis.map.qq.com", "*.map.qq.com"],
+ baidu: ["api.map.baidu.com", "*.map.bdimg.com", "*.bdimg.com", "*.map.baidu.com"],
+});
+const unsafeMapSwitches = Object.freeze([
+ "disable-web-security", "allow-running-insecure-content", "disable-site-isolation-for-policy",
+ "disable-site-isolation-trials", "no-sandbox", "disable-setuid-sandbox", "disable-seccomp-filter-sandbox",
+ "single-process", "allow-file-access-from-files", "allow-universal-access-from-files",
+ "ignore-certificate-errors", "ignore-certificate-errors-spki-list", "ignore-ssl-errors",
+ "ignore-ssl-errors-with-hosts", "allow-insecure-localhost",
+]);
+const unsafeDisabledFeatures = new Set(["isolateorigins", "site-per-process", "siteperprocess", "outofblinkcors"]);
+const hasUnsafeMapSwitches = (commandLine) => unsafeMapSwitches.some(name => commandLine.hasSwitch(name)) ||
+ (commandLine.getSwitchValue("disable-features") || "").toLowerCase().split(",")
+ .some(name => unsafeDisabledFeatures.has(name.trim().split(/[<:]/, 1)[0]));
+
+const isRecord = value => !!value && typeof value === "object" && !Array.isArray(value);
+const isMapInstanceID = value => typeof value === "string" && /^[a-f0-9]{48}$/.test(value);
+const isMapProvider = value => typeof value === "string" && Object.hasOwn(providerHosts, value);
+const isMapTheme = value => value === "light" || value === "dark";
+const isMapRevision = value => Number.isSafeInteger(value) && value >= 0;
+const isMapIdentifier = value => typeof value === "string" && /^[a-zA-Z0-9_-]{1,128}$/.test(value);
+const normalizeMapOrigin = value => {
+ try {
+ const url = new URL(value);
+ if (!["http:", "https:"].includes(url.protocol) || url.username || url.password || url.origin !== value) return;
+ return url.origin;
+ } catch (_error) {
+ return;
+ }
+};
+const sanitizeMapCredentials = (value, provider) => {
+ const result = {};
+ if (!isRecord(value) || provider === "openfreemap") return result;
+ for (const key of provider === "amap" ? ["apiKey", "securityCode"] : ["apiKey"]) {
+ const text = typeof value[key] === "string" ? value[key].trim() : "";
+ if (text && Buffer.byteLength(text, "utf8") <= 4096) result[key] = text;
+ }
+ return result;
+};
+const sanitizeMapPoints = (value, provider) => {
+ if (!Array.isArray(value)) return [];
+ const ids = new Set();
+ const points = [];
+ for (const point of value.slice(0, 10000)) {
+ if (!isRecord(point) || !isMapIdentifier(point.id) || ids.has(point.id) ||
+ !Number.isFinite(point.longitude) || Math.abs(point.longitude) > 180 ||
+ !Number.isFinite(point.latitude) || Math.abs(point.latitude) > 90 ||
+ (["openfreemap", "amap"].includes(provider) && Math.abs(point.latitude) > 85.0511287798066)) continue;
+ const systems = provider === "openfreemap" ? ["wgs84"] : provider === "baidu" ? ["bd09", "gcj02"] : ["gcj02"];
+ if (!systems.includes(point.coordinateSystem)) continue;
+ ids.add(point.id);
+ points.push({id: point.id, longitude: point.longitude, latitude: point.latitude, coordinateSystem: point.coordinateSystem});
+ }
+ return points;
+};
+const parseMapCreate = value => {
+ if (!isRecord(value) || value.version !== 1 || !isMapInstanceID(value.instanceID) ||
+ !isMapProvider(value.provider) || !isMapTheme(value.theme)) return;
+ return {version: 1, instanceID: value.instanceID, type: "init", provider: value.provider,
+ credentials: sanitizeMapCredentials(value.credentials, value.provider), theme: value.theme};
+};
+const parseMapCommand = (value, instanceID, provider) => {
+ if (!isRecord(value) || value.version !== 1 || value.instanceID !== instanceID) return;
+ const base = {version: 1, instanceID};
+ if (value.type === "setPoints" && isMapRevision(value.revision) && Array.isArray(value.points)) {
+ return {...base, type: value.type, revision: value.revision, points: sanitizeMapPoints(value.points, provider)};
+ }
+ if (value.type === "theme" && isMapTheme(value.theme)) return {...base, type: value.type, theme: value.theme};
+ if (["fit", "resize", "destroy"].includes(value.type)) return {...base, type: value.type};
+};
+const parseMapReply = (value, instanceID) => {
+ if (!isRecord(value) || value.version !== 1 || value.instanceID !== instanceID) return;
+ const base = {version: 1, instanceID};
+ if (["ready", "bootstrapReady"].includes(value.type)) return {...base, type: value.type};
+ if (value.type === "markerClick" && isMapIdentifier(value.id) && isMapRevision(value.revision)) {
+ return {...base, type: value.type, id: value.id, revision: value.revision};
+ }
+ if (value.type === "error" && ["unsupportedEnvironment", "missingCredentials", "invalidConfiguration",
+ "hostUnavailable", "sdkUnavailable", "mapUnavailable"].includes(value.code)) {
+ return {...base, type: "error", code: value.code};
+ }
+};
+
+const isAllowedMapProviderURL = (value, provider) => {
+ try {
+ const url = new URL(value);
+ return isMapProvider(provider) && url.protocol === "https:" && !url.username && !url.password &&
+ !url.port && !url.hash && providerHosts[provider].some(host => host.startsWith("*.")
+ ? url.hostname.endsWith(host.slice(1)) && url.hostname !== host.slice(2) : url.hostname === host);
+ } catch (_error) {
+ return false;
+ }
+};
+const getMapRequestPolicy = (value, method, origin, provider) => {
+ try {
+ if (!["GET", "HEAD"].includes(method) || typeof value !== "string" || value.length > 16384) return;
+ const url = new URL(value);
+ if (url.username || url.password) return;
+ if (url.origin === origin) {
+ if (!Object.hasOwn(mapHostFiles, url.pathname)) return;
+ if (url.pathname === "/stage/map/index.html") {
+ if (url.search !== "?provider=" + provider) return;
+ } else if (url.search) return;
+ return {type: "local", file: mapHostFiles[url.pathname], document: url.pathname === "/stage/map/index.html"};
+ }
+ if (isAllowedMapProviderURL(value, provider)) return {type: "provider"};
+ } catch (_error) {
+ return;
+ }
+};
+
+const createMapContentSecurityPolicy = (origin, provider) => {
+ if (!normalizeMapOrigin(origin) || !isMapProvider(provider)) throw new Error("Invalid map origin or provider");
+ const assets = origin + "/stage/build/map/";
+ let scripts = assets + "host.js";
+ let connect = "'none'";
+ let images = "data: blob:";
+ let styles = "'unsafe-inline' " + origin + "/stage/map/host.css";
+ let workers = "'none'";
+ if (provider === "openfreemap") {
+ scripts += " " + assets + "maplibre-gl.js";
+ connect = "https://tiles.openfreemap.org " + assets + "maplibre-gl-csp-worker.js";
+ images += " https://tiles.openfreemap.org";
+ styles += " " + assets + "maplibre-gl.css";
+ workers = "blob:";
+ } else if (provider === "amap") {
+ scripts += " https://webapi.amap.com";
+ connect = "https://webapi.amap.com https://restapi.amap.com https://vdata.amap.com";
+ images += " https://webapi.amap.com https://a.amap.com https://*.is.autonavi.com";
+ } else if (provider === "tencent") {
+ scripts += " https://map.qq.com";
+ connect = "https://map.qq.com https://apis.map.qq.com https://*.map.qq.com";
+ images += " https://map.qq.com https://*.map.qq.com";
+ } else {
+ scripts += " https://api.map.baidu.com";
+ connect = "https://api.map.baidu.com https://*.map.bdimg.com https://*.bdimg.com";
+ images += " https://api.map.baidu.com https://*.map.bdimg.com https://*.bdimg.com https://*.map.baidu.com";
+ }
+ return "default-src 'none'; sandbox allow-scripts; script-src " + scripts + "; connect-src " + connect +
+ "; img-src " + images + "; style-src " + styles + "; font-src 'none'; worker-src " + workers +
+ "; frame-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'";
+};
+
+// 渲染器传入 CSS 像素,原生视图使用设备无关像素,不能再乘屏幕像素密度。
+const parseMapGeometry = (value, zoom, contentBounds) => {
+ if (!isRecord(value) || typeof value.visible !== "boolean") return;
+ if (!value.visible) return {visible: false};
+ if (!Number.isFinite(zoom) || zoom < 0.25 || zoom > 5 || !isRecord(value.bounds) ||
+ !isRecord(value.logicalSize) || !isRecord(value.crop)) return;
+ const {x, y, width, height} = value.bounds;
+ const full = value.logicalSize;
+ const crop = value.crop;
+ const numbers = [x, y, width, height, full.width, full.height, crop.x, crop.y];
+ if (!numbers.every(Number.isFinite) || numbers.some(number => number < 0 || number > 32768) ||
+ width < 1 || height < 1 || full.width < width || full.height < height ||
+ crop.x + width > full.width + 1 || crop.y + height > full.height + 1 ||
+ (x + width) * zoom > contentBounds.width + 1 || (y + height) * zoom > contentBounds.height + 1) return;
+ // 向内取整,避免原生视图绘制到可见 DOM 矩形之外。
+ const left = Math.ceil(x * zoom), top = Math.ceil(y * zoom);
+ const right = Math.floor((x + width) * zoom), bottom = Math.floor((y + height) * zoom);
+ if (right <= left || bottom <= top) return {visible: false};
+ return {visible: true, zoom, bounds: {x: left, y: top, width: right - left, height: bottom - top},
+ logicalSize: {width: full.width, height: full.height},
+ crop: {x: crop.x + left / zoom - x, y: crop.y + top / zoom - y}};
+};
+
+module.exports = {mapHostFiles, providerHosts, unsafeMapSwitches, hasUnsafeMapSwitches, normalizeMapOrigin,
+ isMapInstanceID, parseMapCreate, parseMapCommand, parseMapReply, parseMapGeometry,
+ isAllowedMapProviderURL, getMapRequestPolicy, createMapContentSecurityPolicy};
diff --git a/app/electron/mapHostPolicy.test.js b/app/electron/mapHostPolicy.test.js
new file mode 100644
index 0000000000..b500ce49e4
--- /dev/null
+++ b/app/electron/mapHostPolicy.test.js
@@ -0,0 +1,105 @@
+const assert = require("node:assert/strict");
+const {test} = require("node:test");
+const {
+ mapHostFiles, unsafeMapSwitches, hasUnsafeMapSwitches, normalizeMapOrigin, parseMapCreate, parseMapCommand,
+ parseMapReply, parseMapGeometry, isAllowedMapProviderURL, getMapRequestPolicy, createMapContentSecurityPolicy,
+} = require("./mapHostPolicy");
+
+const instanceID = "a".repeat(48);
+const origin = "http://127.0.0.1:6806";
+const envelope = {version: 1, instanceID};
+
+test("map origin accepts only the exact registered HTTP(S) origin", () => {
+ assert.equal(normalizeMapOrigin(origin), origin);
+ for (const invalid of [origin + "/", origin + "/api", "file:///tmp", "https://user:[email protected]", "null", undefined]) {
+ assert.equal(normalizeMapOrigin(invalid), undefined);
+ }
+});
+
+test("only fixed local assets are available; another kernel, APIs, methods and path aliases are denied", () => {
+ for (const file of Object.keys(mapHostFiles)) {
+ const query = file.endsWith("index.html") ? "?provider=openfreemap" : "";
+ assert.equal(getMapRequestPolicy(origin + file + query, "GET", origin, "openfreemap").type, "local");
+ }
+ for (const url of [origin + "/api/system/getConf", origin + "/stage/build/app/index.js", origin + "/stage/map/",
+ origin + "/stage/map/index.html?provider=amap", origin + "/stage/map/index.html?provider=openfreemap&extra=1",
+ origin + "/stage/map/%69ndex.html?provider=openfreemap", origin + "/stage/map/host.css?api=1",
+ "http://127.0.0.1:6807/stage/map/host.css", "file:///etc/passwd", "https://evil.example/", "ws://127.0.0.1:6806/ws"]) {
+ assert.equal(getMapRequestPolicy(url, "GET", origin, "openfreemap"), undefined, url);
+ }
+ assert.equal(getMapRequestPolicy(origin + "/stage/map/host.css", "POST", origin, "openfreemap"), undefined);
+});
+
+test("provider routing rejects other providers, insecure schemes, ports, credentials and suffix tricks", () => {
+ assert.equal(isAllowedMapProviderURL("https://tiles.openfreemap.org/planet/a", "openfreemap"), true);
+ assert.equal(isAllowedMapProviderURL("https://webrd01.is.autonavi.com/a", "amap"), true);
+ for (const url of ["http://tiles.openfreemap.org/a", "https://tiles.openfreemap.org:444/a",
+ "https://key:[email protected]/a", "https://tiles.openfreemap.org.evil.example/a",
+ "https://eviltiles.openfreemap.org/a", "https://tiles.openfreemap.org./a", "https://tiles.openfreemap.org/a#fragment",
+ "https://webapi.amap.com/maps", "https://127.0.0.1/api", "data:text/plain,a", "file:///tmp/a"]) {
+ assert.equal(isAllowedMapProviderURL(url, "openfreemap"), false, url);
+ }
+ assert.equal(isAllowedMapProviderURL("https://map.qq.com/", "__proto__"), false);
+});
+
+test("credentials, point metadata and commands are bounded whitelist copies", () => {
+ const init = parseMapCreate({...envelope, provider: "amap", theme: "dark", credentials: {
+ apiKey: " key ", securityCode: " code ", userToken: "never", url: origin,
+ }, executeJavaScript: "never"});
+ assert.deepEqual(init.credentials, {apiKey: "key", securityCode: "code"});
+ assert.equal(init.executeJavaScript, undefined);
+ assert.deepEqual(parseMapCreate({...envelope, provider: "openfreemap", theme: "light", credentials: {apiKey: "secret"}}).credentials, {});
+ assert.deepEqual(parseMapCreate({...envelope, provider: "tencent", theme: "light", credentials: {apiKey: "a".repeat(4097), securityCode: "never"}}).credentials, {});
+ assert.equal(parseMapCreate({...envelope, provider: "evil", theme: "light"}), undefined);
+ const point = {id: "row-1", longitude: 120, latitude: 30, coordinateSystem: "wgs84", title: "private", content: "private"};
+ const command = parseMapCommand({...envelope, type: "setPoints", revision: 1, points: [point, point,
+ {...point, id: "bad-lat", latitude: 90}, {...point, id: "bad-crs", coordinateSystem: "gcj02"}]}, instanceID, "openfreemap");
+ assert.deepEqual(command.points, [{id: "row-1", longitude: 120, latitude: 30, coordinateSystem: "wgs84"}]);
+ assert.equal(parseMapCommand({...envelope, type: "init"}, instanceID, "amap"), undefined);
+ assert.equal(parseMapCommand({...envelope, type: "navigate", url: "https://example.com"}, instanceID, "amap"), undefined);
+ assert.equal(parseMapCommand({...envelope, type: "setPoints", revision: -1, points: []}, instanceID, "amap"), undefined);
+ assert.equal(parseMapReply({...envelope, type: "error", code: "readFile"}, instanceID), undefined);
+ assert.deepEqual(parseMapReply({...envelope, type: "bootstrapReady", url: "bad"}, instanceID), {...envelope, type: "bootstrapReady"});
+});
+
+test("point count is bounded and provider coordinate systems remain consistent", () => {
+ const points = Array.from({length: 10010}, (_, index) => ({id: "row-" + index, longitude: 10, latitude: 20, coordinateSystem: "bd09"}));
+ assert.equal(parseMapCommand({...envelope, type: "setPoints", revision: 0, points}, instanceID, "baidu").points.length, 10000);
+ assert.equal(parseMapCommand({...envelope, type: "setPoints", revision: 0, points}, instanceID, "amap").points.length, 0);
+});
+
+test("map creation fails closed for effective process security bypasses", () => {
+ const commandLine = switches => ({hasSwitch: name => switches.has(name), getSwitchValue: name => switches.get(name)});
+ assert.equal(hasUnsafeMapSwitches(commandLine(new Map())), false);
+ for (const name of unsafeMapSwitches) assert.equal(hasUnsafeMapSwitches(commandLine(new Map([[name, ""]]))), true, name);
+ for (const value of ["IsolateOrigins", "Other, SitePerProcess", "OutOfBlinkCors:trial", "SitePerProcess<Experiment"]) {
+ assert.equal(hasUnsafeMapSwitches(commandLine(new Map([["disable-features", value]]))), true);
+ }
+ assert.equal(hasUnsafeMapSwitches(commandLine(new Map([["disable-features", "AutoupgradeMixedContent"]]))), false);
+});
+
+test("bootstrap CSP has sandbox isolation and only fixed local assets plus the selected provider", () => {
+ const csp = createMapContentSecurityPolicy(origin, "openfreemap");
+ assert.match(csp, /sandbox allow-scripts;/);
+ assert.match(csp, /frame-src 'none'/);
+ assert.match(csp, /form-action 'none'/);
+ assert.match(csp, /frame-ancestors 'none'/);
+ assert.ok(!csp.includes("allow-same-origin"));
+ assert.ok(!csp.includes("unsafe-eval"));
+ assert.ok(!csp.includes("amap.com"));
+ assert.throws(() => createMapContentSecurityPolicy("http://example.com/a", "openfreemap"));
+});
+
+test("native geometry converts CSS to DIP, crops inward, and denies off-window or malformed bounds", () => {
+ const value = {visible: true, bounds: {x: 10.2, y: 20, width: 200, height: 100},
+ logicalSize: {width: 400, height: 200}, crop: {x: 40, y: 30}};
+ const geometry = parseMapGeometry(value, 1.25, {width: 800, height: 600});
+ assert.deepEqual(geometry.bounds, {x: 13, y: 25, width: 249, height: 125});
+ assert.equal(geometry.logicalSize.width, 400);
+ assert.ok(Math.abs(geometry.crop.x - 40.2) < 1e-9);
+ assert.equal(parseMapGeometry(value, 0, {width: 800, height: 600}), undefined);
+ assert.equal(parseMapGeometry(value, 1.25, {width: 100, height: 100}), undefined);
+ assert.equal(parseMapGeometry({...value, crop: {x: 300, y: 0}}, 1, {width: 800, height: 600}), undefined);
+ assert.equal(parseMapGeometry({...value, bounds: {...value.bounds, x: NaN}}, 1, {width: 800, height: 600}), undefined);
+ assert.deepEqual(parseMapGeometry({visible: false}, 1, {}), {visible: false});
+});
diff --git a/app/electron/mapHostPreload.js b/app/electron/mapHostPreload.js
new file mode 100644
index 0000000000..68fc8549e7
--- /dev/null
+++ b/app/electron/mapHostPreload.js
@@ -0,0 +1,30 @@
+// SiYuan - From thought to insight, with agents
+// Copyright (c) 2020-present, b3log.org
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+const {contextBridge, ipcRenderer} = require("electron");
+
+// 预载脚本不暴露 IPC 方法、Node 对象、文件路径或导航能力。
+if (process.isMainFrame) {
+ contextBridge.exposeInMainWorld("siyuanMapDesktop", Object.freeze({version: 1}));
+ ipcRenderer.once("siyuan-map-port", (event, data) => {
+ if (data?.version !== 1 || !/^[a-f0-9]{48}$/.test(data.instanceID || "") ||
+ !/^[a-f0-9]{48}$/.test(data.nonce || "") || event.ports.length !== 1 ||
+ !["openfreemap", "amap", "tencent", "baidu"].includes(data.provider)) {
+ event.ports.forEach(port => port.close());
+ return;
+ }
+ window.postMessage({type: "siyuan-map-desktop-connect", version: 1, instanceID: data.instanceID,
+ nonce: data.nonce, provider: data.provider}, "*", [event.ports[0]]);
+ });
+ ipcRenderer.on("siyuan-map-viewport", (_event, data) => {
+ const map = document.getElementById("map");
+ const size = data?.logicalSize;
+ const crop = data?.crop;
+ if (!map || !size || !crop || ![size.width, size.height, crop.x, crop.y]
+ .every(value => Number.isFinite(value) && value >= 0 && value <= 32768)) return;
+ map.style.width = size.width + "px";
+ map.style.height = size.height + "px";
+ map.style.transform = "translate(" + -crop.x + "px," + -crop.y + "px)";
+ });
+}
diff --git a/app/electron/mapHostPreload.test.js b/app/electron/mapHostPreload.test.js
new file mode 100644
index 0000000000..6f93aae424
--- /dev/null
+++ b/app/electron/mapHostPreload.test.js
@@ -0,0 +1,51 @@
+const assert = require("node:assert/strict");
+const {test} = require("node:test");
+const fs = require("node:fs");
+const path = require("node:path");
+const vm = require("node:vm");
+
+const setup = (isMainFrame = true) => {
+ const listeners = {}, exposed = {}, posted = [], map = {style: {}};
+ vm.runInNewContext(fs.readFileSync(path.join(__dirname, "mapHostPreload.js"), "utf8"), {
+ require: name => {
+ assert.equal(name, "electron");
+ return {contextBridge: {exposeInMainWorld: (name, value) => { exposed[name] = value; }}, ipcRenderer: {
+ once: (name, listener) => { listeners[name] = (...args) => { delete listeners[name]; listener(...args); }; },
+ on: (name, listener) => { listeners[name] = listener; },
+ }};
+ },
+ process: {isMainFrame}, window: {postMessage: (...args) => posted.push(args)}, document: {getElementById: () => map},
+ });
+ return {listeners, exposed, posted, map};
+};
+
+test("sandbox preload exposes only a frozen version capability and one transferred map port", () => {
+ const s = setup();
+ assert.deepEqual(Object.keys(s.exposed), ["siyuanMapDesktop"]);
+ assert.deepEqual(Object.keys(s.exposed.siyuanMapDesktop), ["version"]);
+ assert.equal(Object.isFrozen(s.exposed.siyuanMapDesktop), true);
+ const data = {version: 1, instanceID: "a".repeat(48), nonce: "b".repeat(48), provider: "openfreemap", secret: "never"};
+ const port = {};
+ s.listeners["siyuan-map-port"]({ports: [port]}, data);
+ assert.equal(s.listeners["siyuan-map-port"], undefined);
+ assert.equal(s.posted[0][0].type, "siyuan-map-desktop-connect");
+ assert.equal(s.posted[0][0].secret, undefined);
+ assert.equal(s.posted[0][2][0], port);
+});
+
+test("invalid port metadata closes the port and subframes receive no capability", () => {
+ const s = setup(); let closed = false;
+ s.listeners["siyuan-map-port"]({ports: [{close() { closed = true; }}]}, {version: 2});
+ assert.equal(closed, true); assert.equal(s.posted.length, 0);
+ const subframe = setup(false);
+ assert.deepEqual(subframe.exposed, {}); assert.deepEqual(subframe.listeners, {});
+});
+
+test("viewport accepts only bounded numeric dimensions and crop, without exposing IPC", () => {
+ const s = setup();
+ s.listeners["siyuan-map-viewport"]({}, {logicalSize: {width: 500, height: 400}, crop: {x: 20, y: 40}});
+ assert.equal(s.map.style.width, "500px"); assert.equal(s.map.style.height, "400px");
+ assert.equal(s.map.style.transform, "translate(-20px,-40px)");
+ s.listeners["siyuan-map-viewport"]({}, {logicalSize: {width: "url(secret)", height: 400}, crop: {x: 0, y: 0}});
+ assert.equal(s.map.style.width, "500px");
+});
diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20240208172514-9dsv6na.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20240208172514-9dsv6na.sy
index 9a013f425e..87610a1530 100644
--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20240208172514-9dsv6na.sy
+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20240208172514-9dsv6na.sy
@@ -7,7 +7,7 @@
"id": "20240208172514-9dsv6na",
"title": "Database",
"type": "doc",
- "updated": "20261009040533"
+ "updated": "20261009075700"
},
"Children": [
{
@@ -3942,6 +3942,123 @@
}
]
},
+ {
+ "ID": "20261009050034-byowtq3",
+ "Type": "NodeHeading",
+ "HeadingLevel": 2,
+ "Properties": {
+ "id": "20261009050034-byowtq3",
+ "updated": "20261009075700"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "Map view"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-yqulacv",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-yqulacv",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "Add a map service in "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "Settings"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "Map"
+ },
+ {
+ "Type": "NodeText",
+ "Data": ", then create a Map view and select a service and a Location field. Services are stored on the current device; each view saves only a service ID. On another device, explicitly add the same ID to restore the reference, or choose another service"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-2ja6x7k",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-2ja6x7k",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "AMap requires a Web JS API key and security code, Tencent Maps requires a key, and Baidu Maps requires a browser AK with JS API access. OpenFreeMap requires no key. Filled configuration fields do not prove service access, commercial eligibility, quotas, domain restrictions, or regional availability. Confirm these with the provider before use"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-w0l8ys9",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-w0l8ys9",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "The map uses the original coordinates and their declared coordinate system: OpenFreeMap uses WGS84, AMap and Tencent Maps use GCJ-02, and Baidu Maps uses BD-09 or its supported GCJ-02 marker option. Unknown or incompatible systems are counted and skipped; the map never guesses, converts, or overwrites the saved values. OpenFreeMap and AMap use Web Mercator: latitudes beyond ±85.0511287798066° are valid stored coordinates but are skipped with a separate unsupported-projection count rather than silently clamped"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-kpnifml",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-kpnifml",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "Filters and sorting also apply to the map. Markers represent only the loaded records, not the entire database. The displayed counts identify the loaded scope and skipped locations. If there are too many markers, use filters or a smaller page size. Click a marker to open its record; map clicks do not save coordinates"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-x0kdedj",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-x0kdedj",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "Map services use an external network connection. Only the selected service receives its runtime credentials, coordinates, and opaque record IDs; record titles and full contents are not passed to the map host. Browser SDK credentials are visible to the authorized browser and provider. Configuration exports omit map services and credentials; published pages and document exports retain records without a live map"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-wflckkb",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-wflckkb",
+ "updated": "20261009075700"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "The host follows the app theme. AMap also switches its basemap theme, and Baidu switches control appearance; OpenFreeMap and Tencent Maps currently retain their default basemap styles. Maps run in isolated Web pages. Desktop clients use a separate secure host; mobile clients require a matching app shell that restricts native bridges and navigation to trusted documents. Older shells or clients unable to establish these boundaries retain the record list. Desktop maps may hide briefly while scrolling or when menus and dialogs overlap them. When offline, unconfigured, incompatible with WebGL, or unable to load a provider, records remain available. Address search, geocoding, route planning, and clicking the map to write a location are not provided. Maps are also unavailable when authentication bypass is enabled; the record list remains accessible"
+ }
+ ]
+ },
{
"ID": "20240818174922-r0eubvc",
"Type": "NodeHeading",
diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20240208113259-nykkvaq.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20240208113259-nykkvaq.sy
index 8acab904b4..9dc09c66e7 100644
--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20240208113259-nykkvaq.sy
+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20240208113259-nykkvaq.sy
@@ -7,7 +7,7 @@
"id": "20240208113259-nykkvaq",
"title": "数据库",
"type": "doc",
- "updated": "20261009040533"
+ "updated": "20261009075700"
},
"Children": [
{
@@ -3942,6 +3942,123 @@
}
]
},
+ {
+ "ID": "20261009050034-dfwj4cb",
+ "Type": "NodeHeading",
+ "HeadingLevel": 2,
+ "Properties": {
+ "id": "20261009050034-dfwj4cb",
+ "updated": "20261009075700"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "地图视图"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-dz1fw4j",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-dz1fw4j",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "在 "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "设置"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "地图"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " 中添加地图服务,再创建地图视图并选择服务和位置字段。服务保存在当前设备,每个视图仅保存服务 ID;在其他设备上使用时,需明确添加相同 ID 恢复引用,或选择另一项服务"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-f3814by",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-f3814by",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "高德地图需要 Web JS API Key 和安全密钥,腾讯地图需要 Key,百度地图需要开通 JS API 权限的浏览器 AK,OpenFreeMap 不需要 Key。配置字段已填写不代表服务访问、商业资格、配额、域名限制或地区可用性已经验证,使用前请向提供商确认"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-lipfkdw",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-lipfkdw",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "地图使用保存的原始坐标及其声明的坐标系:OpenFreeMap 使用 WGS84,高德和腾讯使用 GCJ-02,百度使用 BD-09 或其支持的 GCJ-02 标记选项。未知或不兼容的坐标系会计数并跳过,不猜测、不转换,也不覆盖已保存的值。OpenFreeMap 和高德地图使用墨卡托投影,纬度超出 ±85.0511287798066° 的合法位置会保留原值并单独计入投影不支持数量,不会静默裁切"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-ughi4hh",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-ughi4hh",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "筛选和排序同样作用于地图。标记只代表已加载的记录,不代表整个数据库;界面会说明已加载范围及跳过的位置数量。标记过多时请缩小分页或使用筛选。点击标记打开对应记录,点击地图不会保存坐标"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-rrjk1eg",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-rrjk1eg",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "地图服务需要外部网络连接。隔离的地图页面只获得选中服务的运行时凭据、坐标和不含正文的记录 ID,不接收记录标题或完整内容。浏览器 SDK 凭据对获授权的浏览器和提供商可见。配置导出不包含地图服务和凭据,发布页面和文档导出保留记录展示,不加载实时地图"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-wy69fcu",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-wy69fcu",
+ "updated": "20261009075700"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "宿主配色跟随应用主题;高德同时切换底图主题,百度切换控件主题,OpenFreeMap 和腾讯目前保留默认底图样式。地图通过隔离的 Web 页面运行;桌面客户端使用独立的安全宿主,移动客户端需配套支持可信主文档桥接和导航限制的外壳。旧版外壳或无法建立隔离边界时保留记录列表。桌面地图在滚动或菜单、对话框遮挡时可能短暂隐藏。离线、未配置、WebGL 不兼容或服务加载失败时仍可访问记录。本功能不提供地址搜索、地理编码、路线规划或点击地图写入位置。启用鉴权绕过模式时也无法使用地图,记录列表仍可访问"
+ }
+ ]
+ },
{
"ID": "20240818174119-3zag9wr",
"Type": "NodeHeading",
diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20240208171522-y7dxcno.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20240208171522-y7dxcno.sy
index 863b288b09..5c98d0d4b1 100644
--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20240208171522-y7dxcno.sy
+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20240208171522-y7dxcno.sy
@@ -7,7 +7,7 @@
"id": "20240208171522-y7dxcno",
"title": "資料庫",
"type": "doc",
- "updated": "20261009040533"
+ "updated": "20261009075700"
},
"Children": [
{
@@ -3942,6 +3942,123 @@
}
]
},
+ {
+ "ID": "20261009050034-7n1yzkx",
+ "Type": "NodeHeading",
+ "HeadingLevel": 2,
+ "Properties": {
+ "id": "20261009050034-7n1yzkx",
+ "updated": "20261009075700"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "地圖檢視"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-ctek3na",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-ctek3na",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "在 "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "設定"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "地圖"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " 中新增地圖服務,再建立地圖檢視並選擇服務和位置欄位。服務儲存在目前裝置,每個檢視僅儲存服務 ID;在其他裝置使用時,需明確新增相同 ID 恢復引用,或選擇另一項服務"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-ezfsjzw",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-ezfsjzw",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "高德地圖需要 Web JS API Key 和安全金鑰,騰訊地圖需要 Key,百度地圖需要開通 JS API 權限的瀏覽器 AK,OpenFreeMap 不需要 Key。配置欄位已填寫不代表服務存取、商業資格、配額、網域限制或地區可用性已經驗證,使用前請向提供商確認"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-0pe5w4a",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-0pe5w4a",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "地圖使用儲存的原始座標及其宣告的座標系:OpenFreeMap 使用 WGS84,高德和騰訊使用 GCJ-02,百度使用 BD-09 或其支援的 GCJ-02 標記選項。未知或不相容的座標系會計數並跳過,不猜測、不轉換,也不覆寫已儲存的值。OpenFreeMap 和高德地圖使用麥卡托投影,緯度超出 ±85.0511287798066° 的合法位置會保留原值並單獨計入投影不支援數量,不會靜默裁切"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-3r0lsdq",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-3r0lsdq",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "篩選和排序同樣作用於地圖。標記只代表已載入的記錄,不代表整個資料庫;介面會說明已載入範圍及跳過的位置數量。標記過多時請縮小分頁或使用篩選。點擊標記開啟對應記錄,點擊地圖不會儲存座標"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-fadq3xu",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-fadq3xu",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "地圖服務需要外部網路連線。隔離的地圖頁面只取得所選服務的執行階段憑據、座標和不含正文的記錄 ID,不接收記錄標題或完整內容。瀏覽器 SDK 憑據對獲授權的瀏覽器和提供商可見。配置匯出不包含地圖服務和憑據,發佈頁面和文件匯出保留記錄展示,不載入即時地圖"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-8jfc6yh",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-8jfc6yh",
+ "updated": "20261009075700"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "宿主配色跟隨應用程式主題;高德同時切換底圖主題,百度切換控制項主題,OpenFreeMap 和騰訊目前保留預設底圖樣式。地圖透過隔離的 Web 頁面執行;桌面客戶端使用獨立的安全宿主,行動客戶端需搭配支援可信主文件橋接與導覽限制的外殼。舊版外殼或無法建立隔離邊界時保留記錄清單。桌面地圖在捲動或選單、對話方塊遮擋時可能短暫隱藏。離線、未配置、WebGL 不相容或服務載入失敗時仍可存取記錄。本功能不提供地址搜尋、地理編碼、路線規劃或點擊地圖寫入位置。啟用鑑權繞過模式時也無法使用地圖,記錄清單仍可存取"
+ }
+ ]
+ },
{
"ID": "20240818174403-xnbqd38",
"Type": "NodeHeading",
diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-3eaevtp.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-3eaevtp.sy
index 9e3a660d14..a13ec24534 100644
--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-3eaevtp.sy
+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-3eaevtp.sy
@@ -8,7 +8,7 @@
"id": "20240530101000-3eaevtp",
"title": "データベース",
"type": "doc",
- "updated": "20261009040533"
+ "updated": "20261009075700"
},
"Children": [
{
@@ -3952,6 +3952,119 @@
}
]
},
+ {
+ "ID": "20261009050034-lzsqdz2",
+ "Type": "NodeHeading",
+ "HeadingLevel": 2,
+ "Properties": {
+ "id": "20261009050034-lzsqdz2",
+ "updated": "20261009075700"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "マップビュー"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-xn4up1k",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-xn4up1k",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "設定"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "マップ"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " で地図サービスを追加してから、マップビューを作成し、サービスと位置フィールドを選択します。サービスは現在の端末に保存され、各ビューにはサービス ID だけが保存されます。別の端末では同じ ID を明示的に追加して参照を復元するか、別のサービスを選択します"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-5nmyptf",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-5nmyptf",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "AMap には Web JS API キーとセキュリティコード、Tencent Maps にはキー、Baidu Maps には JS API 権限のあるブラウザー AK が必要です。OpenFreeMap はキー不要です。設定項目の入力完了は、アクセス、商用利用資格、割り当て、ドメイン制限、地域での利用可否の検証を意味しません。使用前に提供元へ確認してください"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-m26635d",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-m26635d",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "地図は元の座標と宣言された座標系を使用します。OpenFreeMap は WGS84、AMap と Tencent Maps は GCJ-02、Baidu Maps は BD-09 または対応する GCJ-02 マーカーオプションを使用します。不明または非対応の座標系は件数を示して除外し、推測、変換、保存値の上書きは行いません。OpenFreeMap と高徳地図は Web Mercator を使用します。緯度が ±85.0511287798066° を超える位置は有効な保存値ですが、無断で補正せず、投影非対応として別に件数を示して除外します"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-e6lcmxa",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-e6lcmxa",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "フィルターと並べ替えは地図にも適用されます。マーカーは読み込み済みのレコードだけを表し、データベース全体ではありません。読み込み範囲と除外件数を画面に表示します。マーカーが多すぎる場合はフィルターや小さいページサイズを使用してください。マーカーをクリックするとレコードを開きます。地図のクリックでは座標を保存しません"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-b9sfeey",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-b9sfeey",
+ "updated": "20261009050034"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "地図サービスは外部ネットワークを使用します。隔離された地図ページに渡すのは、選択したサービスの実行時認証情報、座標、本文を含まないレコード ID だけです。タイトルやレコード全体は渡しません。ブラウザー SDK の認証情報は、許可されたブラウザーと提供元から見えます。設定のエクスポートに地図サービスと認証情報は含まれず、公開ページと文書のエクスポートではレコードだけを表示します"
+ }
+ ]
+ },
+ {
+ "ID": "20261009050034-5qz3tt7",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261009050034-5qz3tt7",
+ "updated": "20261009075700"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "ホストの配色はアプリのテーマに従います。AMap はベースマップのテーマも切り替え、Baidu Maps は操作部のテーマを切り替えます。OpenFreeMap と Tencent Maps は現在、既定のベースマップスタイルを維持します。地図は隔離された Web ページで動作します。デスクトップ版は独立した安全なホストを使用し、モバイル版には信頼された主文書だけにネイティブブリッジと画面遷移を許可する対応アプリが必要です。古いアプリや隔離を確立できない環境ではレコード一覧を表示します。デスクトップではスクロール中やメニュー、ダイアログが重なる間、地図が一時的に非表示になる場合があります。オフライン、未設定、WebGL 非対応、サービスの読み込み失敗時もレコードは利用できます。住所検索、ジオコーディング、経路案内、地図クリックによる位置の書き込みは提供しません。認証バイパスが有効な場合も地図は利用できませんが、レコード一覧は引き続き利用できます"
+ }
+ ]
+ },
{
"ID": "20240818180118-fq3wqdb",
"Type": "NodeHeading",
diff --git a/app/package.json b/app/package.json
index 7b0b5285f0..32a8aa1b19 100644
--- a/app/package.json
+++ b/app/package.json
@@ -14,14 +14,14 @@
"api:generate": "node scripts/api-contracts.mjs",
"api:check": "node scripts/api-contracts.mjs --check",
"test": "node --import tsx --test --test-concurrency=1 \"src/**/*.test.ts\" \"tests/**/*.test.js\" \"electron/**/*.test.js\" \"scripts/**/*.test.js\"",
- "dev": "webpack --mode development",
- "dev:mobile": "webpack --mode development --config webpack.mobile.js",
- "dev:desktop": "webpack --mode development --config webpack.desktop.js",
+ "dev": "webpack --mode development --config webpack.config.js --config webpack.map.js",
+ "dev:mobile": "webpack --mode development --config webpack.mobile.js --config webpack.map.js",
+ "dev:desktop": "webpack --mode development --config webpack.desktop.js --config webpack.map.js",
"dev:export": "webpack --mode development --config webpack.export.js",
"build": "pnpm run /build:.*/",
- "build:app": "webpack --mode production",
- "build:mobile": "webpack --mode production --config webpack.mobile.js",
- "build:desktop": "webpack --mode production --config webpack.desktop.js",
+ "build:app": "webpack --mode production --config webpack.config.js --config webpack.map.js",
+ "build:mobile": "webpack --mode production --config webpack.mobile.js --config webpack.map.js",
+ "build:desktop": "webpack --mode production --config webpack.desktop.js --config webpack.map.js",
"build:export": "webpack --mode production --config webpack.export.js",
"gen:types": "tsc -d",
"gen:arch": "node ../scripts/generate-arch-svg.js",
@@ -83,6 +83,7 @@
"html-webpack-plugin": "^5.5.0",
"iconv-lite": "^0.6.3",
"ifdef-loader": "^2.3.2",
+ "maplibre-gl": "5.21.1",
"mini-css-extract-plugin": "2.9.2",
"path-browserify": "^1.0.1",
"postcss": "^8.5.29",
diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yaml
index 99ce2b77f6..c33fb5fd11 100644
--- a/app/pnpm-lock.yaml
+++ b/app/pnpm-lock.yaml
@@ -248,6 +248,9 @@ importers:
ifdef-loader:
specifier: ^2.3.2
version: 2.3.2
+ maplibre-gl:
+ specifier: 5.21.1
+ version: 5.21.1
mini-css-extract-plugin:
specifier: 2.9.2
version: 2.9.2([email protected])
@@ -964,6 +967,42 @@ packages:
resolution: {integrity: sha512-9QOtNffcOF/c1seMCDnjckb3R9WHcG34tky+FHpNKKCW0wc/scYLwMtO+ptyGUfMW0/b/n4qRiALlaFHc9Oj7Q==}
engines: {node: '>= 10.0.0'}
+ '@mapbox/[email protected]':
+ resolution: {integrity: sha512-0SElaV0uMxEnxzBhhX9WTuPyUeMsAN/SS0i16tjuba4/mio63MG9khjC1a0JAiPGXAwvwm4UfHJURCN7nyudQg==}
+ engines: {node: '>= 22'}
+
+ '@mapbox/[email protected]':
+ resolution: {integrity: sha512-YGcBz1cg4ATXDCM/71L9xveh4dynfGmcLDqufR+nQQy3fKwsAZsWd/x4621/6uJaeB9mwOHE6hPeDgXz9uViUQ==}
+
+ '@mapbox/[email protected]':
+ resolution: {integrity: sha512-LVL4wgI9YAum5V+LNVQO6QgFBPw7/MIIY4XJPNsPDMrjEwcE+JfKk1LuIl8GnF197ejVdC9QdPaxrx5gfgdGXg==}
+
+ '@mapbox/[email protected]':
+ resolution: {integrity: sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw==}
+
+ '@mapbox/[email protected]':
+ resolution: {integrity: sha512-fqd515fjBmANKGGsQ286E2Wvj/XvDFpGzwJxq4CI6jMQue6Oy04uCKp+JWKF00xRTmk6cEu1jPJ9p3xqH8YWqQ==}
+
+ '@mapbox/[email protected]':
+ resolution: {integrity: sha512-pXj8m7KTsqZt+1jsE0xIpGvqTSbblfkuEJL/NJmNePMtEwxO8V3XMDo9WMSfDeqHvCtBI9Lmt4mGcGR10zecmw==}
+
+ '@mapbox/[email protected]':
+ resolution: {integrity: sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==}
+ engines: {node: '>=6.0.0'}
+
+ '@maplibre/[email protected]':
+ resolution: {integrity: sha512-2ZYhobdAY+y4/P/z1xe0698165LywD0yDdWugdu3NRUrajgVWut+tLkcz7i/RJguMTURwK7gxwmwYMFJbgbQFw==}
+
+ '@maplibre/[email protected]':
+ resolution: {integrity: sha512-lichxSiagMEBBrqHF0trtMQH9RKh+9jUlIJl0qW0QHvt2H/tbvUWdE+ZzI2Jd0/pT7j/iavLonlPu7EQ/ixTOw==}
+ hasBin: true
+
+ '@maplibre/[email protected]':
+ resolution: {integrity: sha512-7M2O7ABM80Oi8XPkfkrjKB8mOBIxGoVgkA52Mu4RMWoBvvMdagQ522+WxVYujZsMpqIr3BpzrTbXrm4k8lCzCQ==}
+
+ '@maplibre/[email protected]':
+ resolution: {integrity: sha512-j6p0AdjvAR19Z3XaCysle7A4ZSo08tYOzxD0Y9NQylwPAkwJJeYub5b2eVucdeDh7erhv69DahoLOevDRERRUw==}
+
resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==}
engines: {node: '>= 16'}
@@ -1119,6 +1158,9 @@ packages:
resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==}
+
resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==}
@@ -1746,6 +1788,9 @@ packages:
resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
+ resolution: {integrity: sha512-FHc6yNpnTORB0tM5kmZ03iD2mDuNakDE2lvf4Hw1XkfxtEHIGVi01B/GqUSwx+NcC1WGjidAfpTXzeALtPtfpg==}
+
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
@@ -1892,6 +1937,7 @@ packages:
resolution: {integrity: sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options.
hasBin: true
peerDependencies:
jiti: '*'
@@ -2078,6 +2124,9 @@ packages:
resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==}
+ resolution: {integrity: sha512-latSnyDNt/8zYUB6VIJ6PCh2jBjJX6gnDsoCZ7LyW7GkqrD51EWwa9qCoGixj8YqBtETQK/xY7OmpTF8xz1DdQ==}
+
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
engines: {node: '>= 6'}
@@ -2421,6 +2470,9 @@ packages:
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
+ resolution: {integrity: sha512-3CNZ2DnrpByG9Nqj6Xo8vqbjT4F6N+tb4Gb28ESAZjYZ5yqvmc56J+/kuIwkaAMOyblTQhUW7PxMkUb8Q36N3Q==}
+
resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==}
@@ -2439,6 +2491,9 @@ packages:
resolution: {integrity: sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==}
+ resolution: {integrity: sha512-e9vurzrXJQrFX6ckpHP3bvj5l+9CnYzkxDNnNQ1h2QTqdWsUAJgXiKdGNcOa1EY85dU8KbQ+z/FdQdB7P+9yfQ==}
+
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
@@ -2503,6 +2558,10 @@ packages:
resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
engines: {node: '>=10'}
+ resolution: {integrity: sha512-zto1RTnFkOpOO1bm93ElCXF1huey2N4LvXaGLMFcYAu9txh0OhGIdX1q3LZLkrMKgMxMeYduaQo+DVNzg098fg==}
+ engines: {node: '>=16.14.0', npm: '>=8.1.0'}
+
resolution: {integrity: sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==}
engines: {node: '>=10'}
@@ -2596,6 +2655,9 @@ packages:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
+ resolution: {integrity: sha512-TvmkNhkv8yct0SVBSy+o8wYzXjE4Zz3PCesbfs8HiCXXdcTuocApFv11UWlNFWKYsP2okqrhb7JNlSm9InBhIw==}
+
resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
@@ -2743,6 +2805,14 @@ packages:
resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
engines: {node: '>=16 || 14 >=14.18'}
+ resolution: {integrity: sha512-J0ajxARhZfpUEebxYs1vhMGMuLSXtBe1e+fFPDrf2uA2hgo+UshKfNUWOz92HJNz6/NFEXseQPddnHkTreWRqg==}
+ hasBin: true
+
+ resolution: {integrity: sha512-mnvGdvOrIvJOBGUEdGkrVXjN8E/VkIJCkf2eS1DH2yv82ORUlLttmDt0rWY38yYZmVwciZwBUvHM20qxBZf40w==}
+ hasBin: true
+
resolution: {integrity: sha512-eRWB5LBz7PpDu4PUlwT0PhnQfTQJlDDdPa35urV4Osrm0t0AqQFGn+UIkU3klZvwJ8KPO3VbBFsXquA6p6kqZw==}
engines: {node: '>=12', npm: '>=6'}
@@ -2842,6 +2912,9 @@ packages:
engines: {node: '>=14.0.0'}
hasBin: true
+ resolution: {integrity: sha512-pcaShQc1Shq0y+E7GqJqvZj8DTthWV1KeHGdi0Z6IAin2Oi3JnLCOfwnCo84qc+HAp52wT9nK9H7FAJp5a44GQ==}
+
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
@@ -2867,6 +2940,9 @@ packages:
resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==}
+ resolution: {integrity: sha512-VG2K63Igkiv9p76tk1lilczEK1cT+kCjKtkdhw1dQZV3k3IXJbd3o6Ho8b9zJZaHSnT2hKe4I+ObmX9w6m5SmQ==}
+
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
@@ -2889,6 +2965,9 @@ packages:
resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==}
engines: {node: '>=10'}
+ resolution: {integrity: sha512-XdjUArbK4Bm5fLLvlm5KpTFOiOThgfWWI4axAZDWg4E/0mKdZyI9tNEfds27qCi1ze/vwTR16kvmmGhRra3c2g==}
+
resolution: {integrity: sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg==}
hasBin: true
@@ -2941,6 +3020,9 @@ packages:
resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
+ resolution: {integrity: sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==}
+
resolution: {integrity: sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==}
engines: {node: '>= 0.4'}
@@ -3263,6 +3345,9 @@ packages:
resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==}
engines: {node: '>=12.0.0'}
+ resolution: {integrity: sha512-gRa9gwYU3ECmQYv3lslts5hxuIa90veaEcxDYuu3QGOIAEM2mOZkVHp48ANJuu1CURtRdHKUBY5Lm1tHV+sD4g==}
+
resolution: {integrity: sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==}
@@ -4003,6 +4088,47 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ '@mapbox/[email protected]': {}
+
+ '@mapbox/[email protected]': {}
+
+ '@mapbox/[email protected]': {}
+
+ '@mapbox/[email protected]': {}
+
+ '@mapbox/[email protected]': {}
+
+ '@mapbox/[email protected]':
+ dependencies:
+ '@mapbox/point-geometry': 1.1.0
+ '@types/geojson': 7946.0.16
+ pbf: 4.0.2
+
+ '@mapbox/[email protected]': {}
+
+ '@maplibre/[email protected]':
+ dependencies:
+ kdbush: 4.1.0
+
+ '@maplibre/[email protected]':
+ dependencies:
+ '@mapbox/jsonlint-lines-primitives': 2.0.3
+ '@mapbox/unitbezier': 1.0.0
+ json-stringify-pretty-compact: 4.0.0
+ minimist: 1.2.8
+ quickselect: 3.0.0
+ tinyqueue: 3.0.0
+
+ '@maplibre/[email protected]':
+ dependencies:
+ '@mapbox/point-geometry': 1.1.0
+
+ '@maplibre/[email protected]':
+ dependencies:
+ '@mapbox/point-geometry': 1.1.0
+ '@types/geojson': 7946.0.16
+ pbf: 5.1.2
+
'@noble/[email protected]': {}
'@noble/[email protected]': {}
@@ -4133,6 +4259,8 @@ snapshots:
dependencies:
'@types/node': 18.13.0
+ '@types/[email protected]': {}
+
dependencies:
'@types/minimatch': 6.0.0
@@ -4847,6 +4975,8 @@ snapshots:
+
@@ -5280,6 +5410,8 @@ snapshots:
dependencies:
resolve-pkg-maps: 1.0.0
+
dependencies:
is-glob: 4.0.3
@@ -5623,6 +5755,8 @@ snapshots:
+
optional: true
@@ -5642,6 +5776,8 @@ snapshots:
optionalDependencies:
graceful-fs: 4.2.11
+
dependencies:
json-buffer: 3.0.1
@@ -5701,6 +5837,28 @@ snapshots:
dependencies:
yallist: 4.0.0
+ dependencies:
+ '@mapbox/jsonlint-lines-primitives': 2.0.3
+ '@mapbox/point-geometry': 1.1.0
+ '@mapbox/tiny-sdf': 2.2.0
+ '@mapbox/unitbezier': 0.0.1
+ '@mapbox/vector-tile': 2.0.5
+ '@mapbox/whoots-js': 3.1.0
+ '@maplibre/geojson-vt': 6.1.2
+ '@maplibre/maplibre-gl-style-spec': 24.10.0
+ '@maplibre/mlt': 1.3.0
+ '@maplibre/vt-pbf': 4.3.2
+ '@types/geojson': 7946.0.16
+ earcut: 3.2.4
+ gl-matrix: 3.4.4
+ kdbush: 4.1.0
+ murmurhash-js: 1.0.0
+ pbf: 4.0.2
+ potpack: 2.1.0
+ quickselect: 3.0.0
+ tinyqueue: 3.0.0
+
dependencies:
escape-string-regexp: 4.0.0
@@ -5773,6 +5931,8 @@ snapshots:
+
@@ -5912,6 +6072,14 @@ snapshots:
lru-cache: 10.2.0
minipass: 7.1.3
+ dependencies:
+ resolve-protobuf-schema: 2.1.0
+
+ dependencies:
+ resolve-protobuf-schema: 2.1.0
+
@@ -6002,6 +6170,8 @@ snapshots:
commander: 9.4.0
optional: true
+
@@ -6026,6 +6196,8 @@ snapshots:
retry: 0.12.0
signal-exit: 3.0.7
+
@@ -6042,6 +6214,8 @@ snapshots:
+
dependencies:
debug: 4.4.3([email protected])
@@ -6094,6 +6268,10 @@ snapshots:
+ dependencies:
+ protocol-buffers-schema: 3.6.1
+
dependencies:
es-errors: 1.3.0
@@ -6439,6 +6617,8 @@ snapshots:
fdir: 6.5.0([email protected])
picomatch: 4.0.4
+
dependencies:
tmp: 0.2.7
diff --git a/app/src/assets/scss/business/_av.scss b/app/src/assets/scss/business/_av.scss
index 2e06b3d620..5ba76e63b9 100644
--- a/app/src/assets/scss/business/_av.scss
+++ b/app/src/assets/scss/business/_av.scss
@@ -1,3 +1,50 @@
+.av__map {
+ width: 100%;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+ margin: 8px 0;
+}
+
+.av__map-settings,
+.av__map-actions {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: 8px;
+}
+
+.av__map-setting {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ max-width: 100%;
+
+ .b3-select {
+ min-width: 0;
+ max-width: min(240px, 50vw);
+ }
+}
+
+.av__map-status,
+.av__map-skipped,
+.av__map-summary {
+ overflow-wrap: anywhere;
+}
+
+.av__map-canvas {
+ width: 100%;
+ height: clamp(240px, 50vh, 480px);
+}
+
+.av__map-records--hidden {
+ .av__row[data-id],
+ .av__spacer {
+ display: none;
+ }
+}
+
.av__lunar-editor {
width: 340px;
max-width: 100%;
@@ -364,7 +411,8 @@
margin-top: 4px !important;
margin-bottom: 4px !important;
- &[data-av-type="list"] {
+ &[data-av-type="list"],
+ &[data-av-type="map"] {
width: 100%;
> .av__container,
@@ -1496,6 +1544,7 @@
&__layout {
display: flex;
+ flex-wrap: wrap;
gap: 8px;
width: 100%;
margin: 8px 0;
diff --git a/app/src/config/index.ts b/app/src/config/index.ts
index c28f81b2b1..c09f12a44e 100644
--- a/app/src/config/index.ts
+++ b/app/src/config/index.ts
@@ -22,6 +22,7 @@ import type {TSettingTab} from "./setting/tabs";
import type {App} from "../index";
import {unmountAssetsTab} from "./assets";
import {unmountOCRTab} from "./ocr";
+import {requestMapServiceConfiguration, unmountMapTab} from "./map";
import {getHostCapabilities} from "../util/hostCapabilities";
import {unmountWorkspaceStorage} from "./tabs/workspaceStorage";
/// #if !MOBILE
@@ -77,6 +78,8 @@ export const openSettingDialog = (app: App, initialTab: TSettingTab = "editor")
}
const ocrRoot = settingDialogRef.element?.querySelector<HTMLElement>('.config__tab-container[data-name="ocr"]');
if (ocrRoot) unmountOCRTab(ocrRoot);
+ const mapRoot = settingDialogRef.element?.querySelector<HTMLElement>('.config__tab-container[data-name="map"]');
+ if (mapRoot) unmountMapTab(mapRoot);
clearSyncTabElement();
clearAccessTabElement();
const appRoot = settingDialogRef.element?.querySelector<HTMLElement>('.config__tab-container[data-name="app"]');
@@ -129,7 +132,7 @@ export const openPluginSetting = (app: App) => {
/// #endif
};
-export const openSetting = (app: App, tab?: TSettingTab, options?: {aiProvider?: "chatgpt"}) => {
+export const openSetting = (app: App, tab?: TSettingTab, options?: {aiProvider?: "chatgpt"; missingMapServiceID?: string}) => {
const aiProvider = options?.aiProvider;
if (tab === "bazaar" && !isBazaarAvailable()) {
return;
@@ -138,13 +141,13 @@ export const openSetting = (app: App, tab?: TSettingTab, options?: {aiProvider?:
return;
}
/// #if MOBILE
- openMobileSetting(app, tab);
+ openMobileSetting(app, tab, undefined, options?.missingMapServiceID);
if (aiProvider === "chatgpt") { openChatGPTProvider(); }
/// #else
/// #if !BROWSER
// 是否在独立窗口中打开设置界面,仅桌面端 Electron 客户端生效
if (!isSettingsWindow() && window.siyuan.config.system.settingsWindow) {
- void openNativeSettings(app, aiProvider ? {tab, aiProvider} : {tab});
+ void openNativeSettings(app, {tab, ...options});
return;
}
/// #endif
@@ -152,16 +155,25 @@ export const openSetting = (app: App, tab?: TSettingTab, options?: {aiProvider?:
const dialog = window.siyuan.dialogs.find(item => item.element.getAttribute("data-key") === Constants.DIALOG_SETTING);
if (dialog) {
switchSettingTab(dialog.element, app, tab || "editor");
+ if (tab === "map" && options?.missingMapServiceID) {
+ requestMapServiceConfiguration(dialog.element.querySelector('.config__tab-container[data-name="map"]'), options.missingMapServiceID);
+ }
if (aiProvider === "chatgpt") { openChatGPTProvider(); }
return dialog;
}
}
const dialog = openSettingDialog(app, tab);
+ if (tab === "map" && options?.missingMapServiceID) {
+ requestMapServiceConfiguration(dialog.element.querySelector('.config__tab-container[data-name="map"]'), options.missingMapServiceID);
+ }
if (aiProvider === "chatgpt") { openChatGPTProvider(); }
return dialog;
/// #endif
};
+export const openMapSettings = (app: App, missingServiceID?: string) =>
+ openSetting(app, "map", {missingMapServiceID: missingServiceID});
+
export const openBazaarReadme = async (app: App, bazaarType: TBazaarType, itemName: string, from: "bazaar" | "downloaded") => {
if (!isBazaarAvailable()) {
return;
diff --git a/app/src/config/map.test.ts b/app/src/config/map.test.ts
new file mode 100644
index 0000000000..a289a74236
--- /dev/null
+++ b/app/src/config/map.test.ts
@@ -0,0 +1,341 @@
+import * as assert from "node:assert/strict";
+import {readFileSync} from "node:fs";
+import {test} from "node:test";
+import {runInNewContext} from "node:vm";
+import {ModuleKind, ScriptTarget, transpileModule} from "typescript";
+
+const compile = () => transpileModule(readFileSync("src/config/map.ts", "utf8"), {
+ compilerOptions: {module: ModuleKind.CommonJS, target: ScriptTarget.ES2021},
+}).outputText;
+const tick = () => new Promise(setImmediate);
+const language = new Proxy({}, {get: (_target, key) => String(key)});
+const service = (id = "one", provider = "amap") => ({id, name: id, provider,
+ hasAPIKey: provider !== "openfreemap", hasSecurityCode: provider === "amap", configured: true});
+type Service = ReturnType<typeof service>;
+type Write = Pick<Service, "id" | "name" | "provider"> & {apiKey?: string; securityCode?: string};
+type Backend = {services: Service[]; version: number};
+
+const createPanel = async (initial: Service[] = [service()], missingID?: string, deferInitial = false,
+ backend: Backend = {services: initial, version: 0}) => {
+ let deferRead = deferInitial;
+ let reads = 0;
+ const readRequests: Array<(response: unknown) => void> = [];
+ const writes: Array<{services: Write[]; expectedRevision: string;
+ resolve: (response: unknown) => void; reject: (error: Error) => void}> = [];
+ const messages: string[] = [];
+ const confirmations: Array<() => void> = [];
+ const listeners = new Map<string, (event: unknown) => Promise<void> | void>();
+ const notifications = new Map<string, () => void>();
+ const fields = ["mapServiceName", "mapServiceID", "mapAPIKey", "mapSecurityCode", "mapClearAPIKey", "mapClearSecurityCode"];
+ const buttons = ["mapServiceAdd", "mapServiceSave", "mapServiceCancel", "mapServiceDelete", "mapServiceRetry"];
+ const selects = ["mapServiceSelect", "mapServiceProvider"];
+ const controls = Object.fromEntries([...fields, ...buttons, ...selects,
+ "mapServiceEditor", "mapAPIKeyRow", "mapSecurityCodeRow", "mapServiceStatus"].map(id => {
+ const classes = new Set<string>();
+ return [id, {id, value: "", checked: false, disabled: true, readOnly: false, placeholder: "", innerHTML: "",
+ textContent: "", validationMessage: "", focus() {},
+ setCustomValidity(message: string) { this.validationMessage = message; },
+ reportValidity() { return !this.validationMessage; },
+ closest() { return this; },
+ classList: {toggle: (name: string, force: boolean) => force ? classes.add(name) : classes.delete(name),
+ add: (name: string) => classes.add(name), remove: (name: string) => classes.delete(name),
+ contains: (name: string) => classes.has(name)},
+ }];
+ }));
+ const root = {
+ dataset: missingID ? {mapServiceID: missingID} : {} as {mapServiceID?: string},
+ querySelector: (selector: string) => controls[selector.slice(1)],
+ querySelectorAll: () => [...fields, ...buttons, ...selects].map(id => controls[id]),
+ addEventListener: (name: string, callback: (event: unknown) => Promise<void>, options: {signal: AbortSignal}) => {
+ listeners.set(name, callback);
+ options.signal.addEventListener("abort", () => listeners.delete(name));
+ },
+ dispatchEvent: (event: {type: string}) => listeners.get(event.type)?.(event),
+ };
+ const config = {readonly: false};
+ const exports = {} as {mountMapSettings: (root: unknown) => () => void;
+ requestMapServiceConfiguration: (root: unknown, id: string) => void};
+ runInNewContext(compile(), {exports, AbortController, CustomEvent: class {constructor(public type: string) {}},
+ window: {siyuan: {languages: language, config},
+ addEventListener: (name: string, callback: () => void, options: {signal: AbortSignal}) => {
+ notifications.set(name, callback);
+ options.signal.addEventListener("abort", () => notifications.delete(name));
+ }},
+ require: () => ({
+ escapeAttr: (value: string) => value.replace(/"/g, "&quot;"), escapeHtml: (value: string) => value.replace(/</g, "&lt;"),
+ genUUID: () => "new-stable-id", trackSettingSave: (task: Promise<unknown>) => task,
+ MAP_CONFIG_CHANGED_EVENT: "map-change", notifyMapConfigChanged: () => notifications.get("map-change")?.(),
+ showMessage: (message: string) => messages.push(message),
+ confirmDialog: (_title: string, _text: string, confirm: () => void) => confirmations.push(confirm),
+ fetchSyncPost: (url: string, data: {services: Write[]; expectedRevision: string}) => {
+ if (url === "/api/map/getConf") {
+ reads++;
+ if (deferRead) {
+ deferRead = false;
+ return new Promise(resolve => readRequests.push(resolve));
+ }
+ return Promise.resolve({code: 0, data: {services: backend.services.map(item => ({...item})), revision: `revision-${backend.version}`}});
+ }
+ assert.equal(url, "/api/map/setConf");
+ return new Promise((resolve, reject) => writes.push({services: data.services, expectedRevision: data.expectedRevision, resolve, reject}));
+ },
+ }),
+ });
+ const close = exports.mountMapSettings(root);
+ await tick();
+ const event = (id: string) => ({target: controls[id], stopPropagation() {}});
+ return {
+ controls, writes, readRequests, messages, confirmations, close, config,
+ reads: () => reads, notify: () => notifications.get("map-change")?.(),
+ deferRead: () => { deferRead = true; },
+ updateServer: (services: Service[]) => { backend.services = services; backend.version++; },
+ request: (id: string) => exports.requestMapServiceConfiguration(root, id),
+ input: (id: string, value: string) => { controls[id].value = value; return listeners.get("input")?.(event(id)); },
+ change: (id: string, value: string | boolean) => {
+ if (typeof value === "boolean") controls[id].checked = value;
+ else controls[id].value = value;
+ return listeners.get("change")?.(event(id));
+ },
+ click: (id: string) => listeners.get("click")?.(event(id)),
+ finishWrite: async (index = 0) => {
+ if (writes[index].expectedRevision !== `revision-${backend.version}`) {
+ writes[index].resolve({code: -1, msg: "mapSettingsConflict"});
+ } else {
+ backend.services = writes[index].services.map(item => ({...service(item.id, item.provider), name: item.name}));
+ backend.version++;
+ writes[index].resolve({code: 0, data: {services: backend.services, revision: `revision-${backend.version}`}});
+ }
+ await tick();
+ },
+ };
+};
+
+test("Map settings share desktop/mobile order, existing icon, searchable controls, and teardown", () => {
+ const rows: Array<{key: string; keywords: string[]; html: () => string}> = [];
+ const tab = {group: () => tab, slot: (row: typeof rows[number]) => { rows.push(row); return tab; }};
+ const exports = {} as {registerMapTab: (tab: unknown) => void};
+ runInNewContext(compile(), {exports, window: {siyuan: {languages: language}}, require: () => ({
+ escapeHtml: (value: string) => value, escapeAttr: (value: string) => value,
+ genConfigItemMainHtml: (title: string, desc: string) => `${title} ${desc}`,
+ })});
+ exports.registerMapTab(tab);
+ assert.ok(rows[0].keywords.includes("mapServiceIDTip"));
+ assert.ok(rows[0].keywords.includes("mapProductionTip"));
+ const html = rows[0].html();
+ assert.equal((html.match(/type="password" autocomplete="off"/g) || []).length, 2);
+ assert.doesNotMatch(html, /value=".*apiKey/i);
+ const tabs = readFileSync("src/config/setting/tabs.ts", "utf8");
+ assert.match(tabs, /ocr: setting\.tab\([\s\S]*?map: setting\.tab\([\s\S]*?icon: "iconPin"[\s\S]*?registerMapTab\),\s*export:/);
+ assert.match(readFileSync("src/mobile/menu/settingPanel.ts", "utf8"), /tabId === "map"[\s\S]*?unmountMapTab\(root\)/);
+ assert.match(readFileSync("src/config/index.ts", "utf8"), /if \(mapRoot\) unmountMapTab\(mapRoot\)/);
+});
+
+test("redacted credentials stay empty, edits need explicit save, and sibling credentials are omitted", async () => {
+ const p = await createPanel([service(), service("two", "tencent")]);
+ assert.equal(p.controls.mapAPIKey.value, "");
+ assert.equal(p.controls.mapAPIKey.placeholder, "mapCredentialSaved");
+ p.input("mapServiceName", "Renamed");
+ assert.equal(p.writes.length, 0);
+ const saving = p.click("mapServiceSave");
+ await tick();
+ assert.equal(p.writes.length, 1);
+ assert.equal(p.writes[0].expectedRevision, "revision-0");
+ assert.equal(JSON.stringify(p.writes[0].services), JSON.stringify([
+ {id: "one", name: "Renamed", provider: "amap"}, {id: "two", name: "two", provider: "tencent"},
+ ]));
+ await p.finishWrite();
+ await saving;
+ assert.equal(p.controls.mapAPIKey.value, "");
+ p.close();
+});
+
+test("explicit clearing sends empty credentials; changing provider never reuses credentials", async () => {
+ const p = await createPanel();
+ p.change("mapClearAPIKey", true);
+ const saving = p.click("mapServiceSave");
+ await tick();
+ assert.equal(p.writes[0].services[0].apiKey, "");
+ assert.equal(p.writes[0].services[0].securityCode, undefined);
+ await p.finishWrite(); await saving;
+ p.input("mapAPIKey", "typed-key");
+ p.input("mapSecurityCode", "typed-code");
+ p.change("mapServiceProvider", "tencent");
+ assert.equal(p.controls.mapAPIKey.value, "");
+ assert.equal(p.controls.mapSecurityCode.value, "");
+ const changed = p.click("mapServiceSave");
+ await tick();
+ assert.equal(p.writes[1].services[0].apiKey, "");
+ assert.equal(p.writes[1].services[0].securityCode, undefined);
+ await p.finishWrite(1); await changed;
+ p.close();
+});
+
+test("changing providers away and back clears both old AMap credentials", async () => {
+ const p = await createPanel();
+ p.change("mapServiceProvider", "tencent");
+ p.change("mapServiceProvider", "amap");
+ const saving = p.click("mapServiceSave"); await tick();
+ assert.equal(p.writes[0].services[0].apiKey, "");
+ assert.equal(p.writes[0].services[0].securityCode, "");
+ await p.finishWrite(); await saving; p.close();
+});
+
+test("OpenFreeMap writes no credentials and missing IDs are explicitly preserved", async () => {
+ const p = await createPanel([service()], "other-device-id");
+ assert.equal(p.controls.mapServiceID.value, "other-device-id");
+ assert.equal(p.controls.mapServiceID.readOnly, false);
+ assert.equal(p.controls.mapServiceProvider.value, "openfreemap");
+ assert.equal(p.controls.mapServiceStatus.textContent, "mapMissingServiceTip");
+ assert.equal(p.writes.length, 0);
+ p.input("mapServiceName", "Other device service");
+ const saving = p.click("mapServiceSave"); await tick();
+ assert.equal(JSON.stringify(p.writes[0].services[1]), JSON.stringify({id: "other-device-id", name: "Other device service", provider: "openfreemap"}));
+ await p.finishWrite(); await saving; p.close();
+});
+
+test("service ID validation rejects duplicates, unsafe characters, and overlong IDs", async () => {
+ const p = await createPanel();
+ p.click("mapServiceAdd"); p.input("mapServiceName", "New");
+ for (const id of ["one", "bad id", "-bad", "<unsafe>", "a".repeat(129), ""]) {
+ p.input("mapServiceID", id); await p.click("mapServiceSave");
+ assert.equal(p.controls.mapServiceID.validationMessage, "mapServiceIDInvalid");
+ }
+ assert.equal(p.writes.length, 0);
+ p.close();
+});
+
+test("Cancel and close clear typed secrets without sending writes", async () => {
+ const p = await createPanel();
+ p.input("mapAPIKey", "draft-secret"); p.input("mapServiceName", "Draft");
+ assert.equal(p.controls.mapServiceSelect.disabled, true);
+ await p.click("mapServiceCancel");
+ assert.equal(p.controls.mapAPIKey.value, "");
+ assert.equal(p.controls.mapServiceName.value, "one");
+ p.input("mapAPIKey", "another-secret"); p.close();
+ assert.equal(p.controls.mapAPIKey.value, ""); assert.equal(p.writes.length, 0);
+});
+
+test("notifications preserve dirty drafts and conflicts prevent stale list replacement", async () => {
+ const p = await createPanel();
+ p.input("mapServiceName", "Draft");
+ p.updateServer([service(), service("remote", "openfreemap")]);
+ p.notify(); await tick();
+ assert.equal(p.reads(), 1); assert.equal(p.controls.mapServiceName.value, "Draft");
+ await p.click("mapServiceSave");
+ assert.equal(p.writes.length, 0);
+ assert.equal(p.controls.mapServiceStatus.textContent, "mapSettingsConflict");
+ await p.click("mapServiceCancel");
+ assert.match(p.controls.mapServiceSelect.innerHTML, /remote/);
+ assert.equal(p.controls.mapServiceName.value, "one"); p.close();
+});
+
+test("two concurrent saves retain the original revision and preserve the rejected draft", async () => {
+ const backend: Backend = {services: [service()], version: 0};
+ const first = await createPanel(backend.services, undefined, false, backend);
+ const second = await createPanel(backend.services, undefined, false, backend);
+ await first.click("mapServiceAdd");
+ first.input("mapServiceName", "Added in another window");
+ second.input("mapServiceName", "Unsaved rename");
+ second.input("mapAPIKey", "unsaved-replacement-key");
+ const firstSave = first.click("mapServiceSave");
+ const secondSave = second.click("mapServiceSave");
+ await tick();
+ assert.equal(first.writes[0].expectedRevision, "revision-0");
+ assert.equal(second.writes[0].expectedRevision, "revision-0");
+ await first.finishWrite(); await firstSave;
+ await second.finishWrite(); await secondSave;
+ assert.equal(backend.services.length, 2, "a stale replacement must not delete the newly added service");
+ assert.equal(backend.services[0].name, "one");
+ assert.equal(second.controls.mapServiceName.value, "Unsaved rename");
+ assert.equal(second.controls.mapAPIKey.value, "unsaved-replacement-key");
+ assert.equal(second.controls.mapServiceStatus.textContent, "mapSettingsConflict");
+ assert.equal(second.controls.mapServiceSave.disabled, false);
+ await second.click("mapServiceCancel");
+ assert.equal(second.controls.mapAPIKey.value, "");
+ assert.match(second.controls.mapServiceSelect.innerHTML, /Added in another window/);
+ second.input("mapServiceName", "Rebased rename");
+ const rebasedSave = second.click("mapServiceSave"); await tick();
+ assert.equal(second.writes[1].expectedRevision, "revision-1");
+ await second.finishWrite(1); await rebasedSave;
+ assert.equal(backend.services.length, 2);
+ assert.equal(backend.services[0].name, "Rebased rename");
+ first.close(); second.close();
+});
+
+test("preflight detects credential-only revision changes without rebasing a dirty draft", async () => {
+ const p = await createPanel();
+ p.input("mapAPIKey", "draft-key");
+ p.updateServer([service()]);
+ await p.click("mapServiceSave");
+ assert.equal(p.writes.length, 0);
+ assert.equal(p.controls.mapAPIKey.value, "draft-key");
+ assert.equal(p.controls.mapServiceStatus.textContent, "mapSettingsConflict");
+ p.close();
+});
+
+test("deletion uses the draft revision and preserves a concurrent addition", async () => {
+ const backend: Backend = {services: [service()], version: 0};
+ const p = await createPanel(backend.services, undefined, false, backend);
+ await p.click("mapServiceDelete"); p.confirmations[0](); await tick();
+ assert.equal(p.writes[0].expectedRevision, "revision-0");
+ p.updateServer([service(), service("new-service", "openfreemap")]);
+ await p.finishWrite();
+ assert.equal(backend.services.length, 2);
+ assert.equal(p.controls.mapServiceStatus.textContent, "mapSettingsConflict");
+ await p.click("mapServiceCancel");
+ assert.match(p.controls.mapServiceSelect.innerHTML, /new-service/);
+ p.close();
+});
+
+test("repeated Save is ignored and failed saves retain the draft for retry", async () => {
+ const p = await createPanel();
+ p.input("mapServiceName", "Draft");
+ const saving = p.click("mapServiceSave"); await tick();
+ await p.click("mapServiceSave"); assert.equal(p.writes.length, 1);
+ p.writes[0].resolve({code: -1, msg: "private server error"}); await saving;
+ assert.equal(p.controls.mapServiceName.value, "Draft");
+ assert.equal(p.controls.mapServiceSave.disabled, false);
+ assert.equal(p.controls.mapServiceStatus.textContent, "mapSettingsError"); p.close();
+});
+
+test("closing during preflight prevents a write, and late reads do not resurrect the panel", async () => {
+ const p = await createPanel();
+ p.input("mapServiceName", "Draft"); p.deferRead();
+ const saving = p.click("mapServiceSave"); await tick(); p.close();
+ p.readRequests[0]({code: 0, data: {services: [service()]}}); await saving;
+ assert.equal(p.writes.length, 0);
+ const initial = await createPanel([service()], "wanted", true);
+ initial.close(); initial.readRequests[0]({code: 0, data: {services: [service()]}}); await tick();
+ assert.equal(initial.controls.mapServiceName.value, "");
+});
+
+test("closing during submitted save clears secrets and ignores the late UI result", async () => {
+ const p = await createPanel(); p.input("mapAPIKey", "new-secret");
+ const saving = p.click("mapServiceSave"); await tick(); p.close();
+ const status = p.controls.mapServiceStatus.textContent;
+ await p.finishWrite(); await saving;
+ assert.equal(p.controls.mapAPIKey.value, ""); assert.equal(p.controls.mapServiceStatus.textContent, status);
+});
+
+test("newer missing-service requests survive loading and never overwrite a dirty draft", async () => {
+ const p = await createPanel([service()], "old-id", true);
+ p.request("latest-id"); p.readRequests[0]({code: 0, data: {services: [service()]}}); await tick();
+ assert.equal(p.controls.mapServiceID.value, "latest-id");
+ p.input("mapServiceName", "Draft"); p.request("third-id");
+ assert.equal(p.controls.mapServiceName.value, "Draft");
+ assert.deepEqual(p.messages, ["mapSaveOrCancel"]);
+ await p.click("mapServiceCancel"); assert.equal(p.controls.mapServiceID.value, "third-id"); p.close();
+});
+
+test("delete confirmation is invalidated by closing or newer edits", async () => {
+ const p = await createPanel(); await p.click("mapServiceDelete");
+ p.input("mapServiceName", "Draft"); p.confirmations[0](); await tick();
+ assert.equal(p.writes.length, 0);
+ await p.click("mapServiceCancel"); await p.click("mapServiceDelete"); p.close();
+ p.confirmations[1](); await tick(); assert.equal(p.writes.length, 0);
+});
+
+test("read-only settings cannot send a write", async () => {
+ const p = await createPanel(); p.input("mapServiceName", "Draft"); p.config.readonly = true;
+ await p.click("mapServiceSave"); assert.equal(p.writes.length, 0); p.close();
+});
diff --git a/app/src/config/map.ts b/app/src/config/map.ts
new file mode 100644
index 0000000000..a8475392ed
--- /dev/null
+++ b/app/src/config/map.ts
@@ -0,0 +1,323 @@
+import type {MapConfig, MapService} from "../types/api";
+import type {SettingTabBuilder} from "./setting/builder";
+import {fetchSyncPost} from "../util/fetch";
+import {escapeAttr, escapeHtml} from "../util/escape";
+import {genUUID} from "../util/genID";
+import {showMessage} from "../dialog/message";
+import {confirmDialog} from "../dialog/confirmDialog";
+import {genConfigItemMainHtml} from "./render/fragments";
+import {trackSettingSave} from "./setting/pending";
+import {MAP_CONFIG_CHANGED_EVENT, notifyMapConfigChanged} from "./mapRuntime";
+
+type MapServiceWrite = Pick<MapService, "id" | "name" | "provider"> & {apiKey?: string; securityCode?: string};
+const mounts = new WeakMap<HTMLElement, () => void>();
+const configureServiceEvent = "siyuan-configure-map-service";
+const providers = ["amap", "tencent", "baidu", "openfreemap"] as const;
+
+const providerName = (provider: string) => {
+ const names: Record<string, string> = {
+ amap: window.siyuan.languages.mapProviderAMap,
+ tencent: window.siyuan.languages.mapProviderTencent,
+ baidu: window.siyuan.languages.mapProviderBaidu,
+ openfreemap: "OpenFreeMap",
+ };
+ return names[provider] || provider;
+};
+
+export const requestMapServiceConfiguration = (root: HTMLElement, missingServiceID: string) => {
+ if (!root || !missingServiceID) return;
+ root.dataset.mapServiceID = missingServiceID;
+ root.dispatchEvent(new CustomEvent(configureServiceEvent));
+};
+
+export const unmountMapTab = (root: HTMLElement) => {
+ mounts.get(root)?.();
+ mounts.delete(root);
+ delete root.dataset.mapServiceID;
+};
+
+export const mountMapTab = (root: HTMLElement) => {
+ mounts.get(root)?.();
+ mounts.set(root, mountMapSettings(root));
+};
+
+export const registerMapTab = (tab: SettingTabBuilder) => {
+ const lang = window.siyuan.languages;
+ const field = (id: string, title: string, control: string, description?: string) =>
+ `<div class="b3-label config-item">${genConfigItemMainHtml(`<label for="${id}">${title}</label>`, description)}
+<div class="fn__hr--small"></div>${control}</div>`;
+ const input = (id: string, password = false) =>
+ `<input id="${id}" class="b3-text-field fn__block" type="${password ? "password" : "text"}" autocomplete="off" spellcheck="false"${password ? "" : ' maxlength="128"'} disabled>`;
+ tab.group("services", lang.mapServices).slot({
+ key: "mapServices",
+ keywords: [lang.mapSettings, lang.mapServices, lang.mapServiceID, lang.mapServiceIDTip, lang.mapServiceName,
+ lang.mapProvider, lang.mapSecurityCode, lang.apiKey, lang.mapCredentialsTip, lang.mapRenderingTip,
+ lang.mapProductionTip, ...providers.map(providerName)],
+ html: () => `<div id="mapSettings" class="b3-label config-item">
+${genConfigItemMainHtml(lang.mapServices, lang.mapServicesTip)}
+<div class="fn__hr"></div><div class="fn__flex">
+<select id="mapServiceSelect" aria-label="${escapeAttr(lang.mapServices)}" class="b3-select fn__flex-1" disabled></select>
+<span class="fn__space"></span><button id="mapServiceAdd" class="b3-button b3-button--outline" disabled>${lang.mapAddService}</button>
+</div><div class="fn__hr--small"></div><div id="mapServiceStatus" class="b3-label__text" role="status"></div>
+<div id="mapServiceEditor" class="fn__none">
+${field("mapServiceName", lang.mapServiceName, input("mapServiceName"))}
+${field("mapServiceID", lang.mapServiceID, input("mapServiceID"), lang.mapServiceIDTip)}
+${field("mapServiceProvider", lang.mapProvider, `<select id="mapServiceProvider" class="b3-select fn__block" disabled>${providers.map(provider => `<option value="${provider}">${escapeHtml(providerName(provider))}</option>`).join("")}</select>`)}
+<div id="mapAPIKeyRow">${field("mapAPIKey", lang.apiKey, `${input("mapAPIKey", true)}<div class="fn__hr--small"></div><label class="fn__flex"><span class="fn__flex-1">${lang.mapClearCredential}</span><input id="mapClearAPIKey" type="checkbox" class="b3-switch" disabled></label>`, lang.mapCredentialsTip)}</div>
+<div id="mapSecurityCodeRow">${field("mapSecurityCode", lang.mapSecurityCode, `${input("mapSecurityCode", true)}<div class="fn__hr--small"></div><label class="fn__flex"><span class="fn__flex-1">${lang.mapClearCredential}</span><input id="mapClearSecurityCode" type="checkbox" class="b3-switch" disabled></label>`, lang.mapCredentialsTip)}</div>
+<div class="fn__hr"></div><div class="fn__flex">
+<button id="mapServiceSave" class="b3-button b3-button--text" disabled>${lang.save}</button><span class="fn__space"></span>
+<button id="mapServiceCancel" class="b3-button b3-button--cancel" disabled>${lang.cancel}</button><span class="fn__flex-1"></span>
+<button id="mapServiceDelete" class="b3-button b3-button--remove" disabled>${lang.delete}</button>
+</div></div><div class="fn__hr"></div>
+<div class="b3-label__text">${lang.mapRenderingTip}</div><div class="fn__hr--small"></div>
+<div class="b3-label__text">${lang.mapProductionTip}</div><div class="fn__hr--small"></div>
+<button id="mapServiceRetry" class="b3-button b3-button--outline fn__none">${lang.retry}</button>
+</div>`,
+ });
+};
+
+export const mountMapSettings = (root: HTMLElement): (() => void) => {
+ const controller = new AbortController();
+ const lang = window.siyuan.languages;
+ const get = <T extends HTMLElement = HTMLInputElement>(id: string) => root.querySelector<T>(`#${id}`);
+ let closed = false;
+ let data: MapConfig;
+ let selectedID = "";
+ let creating = false;
+ let dirty = false;
+ let busy = false;
+ let loading = false;
+ let revision = 0;
+ let refreshPending = false;
+ let providerChanged = false;
+ const clearCredentials = () => {
+ ["mapAPIKey", "mapSecurityCode"].forEach(id => {
+ const input = get<HTMLInputElement>(id);
+ if (input) input.value = "";
+ });
+ ["mapClearAPIKey", "mapClearSecurityCode"].forEach(id => {
+ const input = get<HTMLInputElement>(id);
+ if (input) input.checked = false;
+ });
+ };
+ const current = () => data?.services.find(service => service.id === selectedID);
+ const updateControls = () => {
+ const provider = providers.find(item => item === get<HTMLSelectElement>("mapServiceProvider").value);
+ const locked = busy || loading || !data || window.siyuan.config.readonly;
+ root.querySelectorAll<HTMLInputElement | HTMLSelectElement | HTMLButtonElement>("input, select, button")
+ .forEach(element => { element.disabled = locked; });
+ get<HTMLSelectElement>("mapServiceSelect").disabled = busy || loading || !data || dirty;
+ get<HTMLButtonElement>("mapServiceAdd").disabled = locked || dirty;
+ get<HTMLButtonElement>("mapServiceSave").disabled = locked || !dirty;
+ get<HTMLButtonElement>("mapServiceCancel").disabled = busy || loading || !dirty;
+ get<HTMLButtonElement>("mapServiceDelete").disabled = locked || dirty || creating || !current();
+ get<HTMLButtonElement>("mapServiceRetry").disabled = busy || loading;
+ get<HTMLInputElement>("mapServiceID").readOnly = !creating;
+ get("mapServiceEditor").classList.toggle("fn__none", !creating && !current());
+ get("mapAPIKeyRow").classList.toggle("fn__none", provider === "openfreemap");
+ get("mapSecurityCodeRow").classList.toggle("fn__none", provider !== "amap");
+ get<HTMLInputElement>("mapAPIKey").disabled = locked || provider === "openfreemap" || get<HTMLInputElement>("mapClearAPIKey").checked;
+ get<HTMLInputElement>("mapSecurityCode").disabled = locked || provider !== "amap" || get<HTMLInputElement>("mapClearSecurityCode").checked;
+ };
+ const renderDraft = (service?: MapService, missingID?: string) => {
+ revision++;
+ selectedID = service?.id || "";
+ creating = !service && missingID !== undefined;
+ dirty = creating;
+ providerChanged = false;
+ clearCredentials();
+ get<HTMLInputElement>("mapServiceName").value = service?.name || "";
+ get<HTMLInputElement>("mapServiceID").value = service?.id || missingID || "";
+ get<HTMLSelectElement>("mapServiceProvider").value = service?.provider || "openfreemap";
+ ["mapServiceName", "mapServiceID"].forEach(id => get<HTMLInputElement>(id).setCustomValidity(""));
+ get<HTMLInputElement>("mapAPIKey").placeholder = service?.hasAPIKey ? lang.mapCredentialSaved : "";
+ get<HTMLInputElement>("mapSecurityCode").placeholder = service?.hasSecurityCode ? lang.mapCredentialSaved : "";
+ const select = get<HTMLSelectElement>("mapServiceSelect");
+ select.innerHTML = `<option value="">${escapeHtml(creating ? lang.mapAddService : lang.mapNoServices)}</option>` +
+ data.services.map(item => `<option value="${escapeAttr(item.id)}">${escapeHtml(item.name)} (${escapeHtml(providerName(item.provider))})</option>`).join("");
+ select.value = selectedID;
+ get("mapServiceStatus").textContent = creating && root.dataset.mapServiceID ? lang.mapMissingServiceTip :
+ service ? service.configured ? lang.mapCredentialsPresent : lang.mapCredentialsMissing : lang.mapNoServices;
+ updateControls();
+ };
+ const openRequestedService = () => {
+ const requestedID = root.dataset.mapServiceID;
+ if (!requestedID || !data || busy || loading || dirty) return false;
+ const service = data.services.find(item => item.id === requestedID);
+ renderDraft(service, requestedID);
+ delete root.dataset.mapServiceID;
+ get<HTMLInputElement>("mapServiceName").focus();
+ return true;
+ };
+ const reportFailure = () => {
+ if (!closed) {
+ get("mapServiceStatus").textContent = lang.mapSettingsError;
+ get("mapServiceRetry").classList.remove("fn__none");
+ }
+ };
+ const load = async () => {
+ if (closed) return;
+ if (busy || loading || dirty) {
+ refreshPending = true;
+ return;
+ }
+ refreshPending = false;
+ loading = true;
+ const readRevision = revision;
+ updateControls();
+ try {
+ const response = await fetchSyncPost("/api/map/getConf", {}, undefined, true, controller.signal);
+ if (closed || readRevision !== revision) return;
+ if (response.code !== 0) { reportFailure(); return; }
+ data = response.data;
+ window.siyuan.config.map = data;
+ get("mapServiceRetry").classList.add("fn__none");
+ loading = false;
+ if (!openRequestedService()) renderDraft(current() || data.services[0]);
+ } catch (error) {
+ if (!controller.signal.aborted) reportFailure();
+ } finally {
+ loading = false;
+ if (!closed) {
+ updateControls();
+ if (refreshPending && !dirty) void load();
+ }
+ }
+ };
+ const writeService = (service: MapService): MapServiceWrite => ({id: service.id, name: service.name, provider: service.provider});
+ const persist = async (services: MapServiceWrite[], nextID: string) => {
+ if (closed || busy || loading || !data || window.siyuan.config.readonly) return;
+ const expectedRevision = data.revision || "";
+ busy = true;
+ revision++;
+ updateControls();
+ try {
+ // 替换列表前检查外部改动,冲突时保留草稿,由用户取消后重新编辑。
+ const latest = await fetchSyncPost("/api/map/getConf", {}, undefined, true, controller.signal);
+ if (closed) return;
+ if (latest.code !== 0) { reportFailure(); return; }
+ if ((latest.data.revision || "") !== expectedRevision ||
+ JSON.stringify(latest.data.services) !== JSON.stringify(data.services)) {
+ refreshPending = true;
+ get("mapServiceStatus").textContent = lang.mapSettingsConflict;
+ dirty = true;
+ return;
+ }
+ // 提交后关闭界面只销毁界面状态,不把已发送的写入伪装成取消。
+ const response = await trackSettingSave(fetchSyncPost("/api/map/setConf", {services, expectedRevision}, undefined, true));
+ if (closed) return;
+ if (response.code !== 0 && response.msg === "mapSettingsConflict") {
+ refreshPending = true;
+ dirty = true;
+ get("mapServiceStatus").textContent = lang.mapSettingsConflict;
+ return;
+ }
+ if (response.code !== 0) { reportFailure(); return; }
+ data = response.data;
+ window.siyuan.config.map = data;
+ dirty = false;
+ renderDraft(data.services.find(service => service.id === nextID) || data.services[0]);
+ get("mapServiceRetry").classList.add("fn__none");
+ notifyMapConfigChanged();
+ } catch (error) {
+ if (!controller.signal.aborted) reportFailure();
+ } finally {
+ busy = false;
+ if (!closed) {
+ updateControls();
+ if (!dirty) {
+ openRequestedService();
+ if (refreshPending) void load();
+ }
+ }
+ }
+ };
+ const save = async () => {
+ const id = get<HTMLInputElement>("mapServiceID");
+ const name = get<HTMLInputElement>("mapServiceName");
+ const provider = providers.find(item => item === get<HTMLSelectElement>("mapServiceProvider").value);
+ id.setCustomValidity(!/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/.test(id.value) ||
+ creating && data.services.some(service => service.id === id.value) ? lang.mapServiceIDInvalid : "");
+ name.setCustomValidity(name.value.trim() ? "" : lang.mapServiceNameRequired);
+ if (!id.reportValidity() || !name.reportValidity() || !provider) return;
+ const service: MapServiceWrite = {id: id.value, name: name.value.trim(), provider};
+ if (provider !== "openfreemap") {
+ const apiKey = get<HTMLInputElement>("mapAPIKey").value;
+ if (get<HTMLInputElement>("mapClearAPIKey").checked) service.apiKey = "";
+ else if (apiKey || providerChanged) service.apiKey = apiKey;
+ }
+ if (provider === "amap") {
+ const securityCode = get<HTMLInputElement>("mapSecurityCode").value;
+ if (get<HTMLInputElement>("mapClearSecurityCode").checked) service.securityCode = "";
+ else if (securityCode || providerChanged) service.securityCode = securityCode;
+ }
+ const services = data.services.map(item => item.id === selectedID ? service : writeService(item));
+ if (creating) services.push(service);
+ await persist(services, service.id);
+ };
+ root.addEventListener("input", event => {
+ if (closed || busy || loading || !data || window.siyuan.config.readonly) return;
+ const target = event.target as HTMLInputElement;
+ if (!["mapServiceID", "mapServiceName", "mapAPIKey", "mapSecurityCode"].includes(target.id)) return;
+ target.setCustomValidity("");
+ dirty = true;
+ updateControls();
+ }, {signal: controller.signal});
+ root.addEventListener("change", event => {
+ event.stopPropagation();
+ if (closed || busy || loading || !data) return;
+ const target = event.target as HTMLInputElement;
+ if (target.id === "mapServiceSelect" && !dirty) {
+ renderDraft(data.services.find(service => service.id === target.value));
+ } else if (!window.siyuan.config.readonly) {
+ if (target.id === "mapServiceProvider") {
+ clearCredentials();
+ providerChanged = true;
+ get<HTMLInputElement>("mapAPIKey").placeholder = "";
+ get<HTMLInputElement>("mapSecurityCode").placeholder = "";
+ } else if (target.id === "mapClearAPIKey" && target.checked) get<HTMLInputElement>("mapAPIKey").value = "";
+ else if (target.id === "mapClearSecurityCode" && target.checked) get<HTMLInputElement>("mapSecurityCode").value = "";
+ dirty = true;
+ updateControls();
+ }
+ }, {signal: controller.signal});
+ root.addEventListener("click", async event => {
+ const button = (event.target as HTMLElement).closest<HTMLButtonElement>("button");
+ if (!button || button.disabled || closed || busy || loading) return;
+ event.stopPropagation();
+ if (button.id === "mapServiceRetry") {
+ if (!dirty) await load();
+ else get("mapServiceStatus").textContent = lang.mapSaveOrCancel;
+ } else if (button.id === "mapServiceCancel") {
+ dirty = false;
+ clearCredentials();
+ if (refreshPending) {
+ renderDraft(current() || data.services[0]);
+ await load();
+ } else if (!openRequestedService()) renderDraft(current() || data.services[0]);
+ } else if (!data || window.siyuan.config.readonly) return;
+ else if (button.id === "mapServiceAdd" && !dirty) renderDraft(undefined, genUUID());
+ else if (button.id === "mapServiceSave" && dirty) await trackSettingSave(save());
+ else if (button.id === "mapServiceDelete" && current() && !dirty) {
+ const deleteID = selectedID;
+ const deleteRevision = revision;
+ confirmDialog(lang.delete, lang.mapDeleteServiceTip, () => {
+ if (closed || dirty || busy || revision !== deleteRevision) return;
+ void trackSettingSave(persist(data.services.filter(service => service.id !== deleteID).map(writeService), ""));
+ }, undefined, true);
+ }
+ }, {signal: controller.signal});
+ root.addEventListener(configureServiceEvent, () => {
+ if (!openRequestedService() && dirty) showMessage(lang.mapSaveOrCancel);
+ }, {signal: controller.signal});
+ window.addEventListener(MAP_CONFIG_CHANGED_EVENT, () => { void load(); }, {signal: controller.signal});
+ get("mapServiceStatus").textContent = lang.loading;
+ void load();
+ return () => {
+ closed = true;
+ revision++;
+ controller.abort();
+ clearCredentials();
+ };
+};
diff --git a/app/src/config/mapRuntime.ts b/app/src/config/mapRuntime.ts
new file mode 100644
index 0000000000..a4a4564535
--- /dev/null
+++ b/app/src/config/mapRuntime.ts
@@ -0,0 +1,5 @@
+export const MAP_CONFIG_CHANGED_EVENT = "siyuan-map-config-changed";
+
+export const notifyMapConfigChanged = () => {
+ window.dispatchEvent(new CustomEvent(MAP_CONFIG_CHANGED_EVENT));
+};
diff --git a/app/src/config/openSetting.test.ts b/app/src/config/openSetting.test.ts
index 05be02cdca..678e01b56c 100644
--- a/app/src/config/openSetting.test.ts
+++ b/app/src/config/openSetting.test.ts
@@ -16,18 +16,21 @@ const fixture = (browser = false, mobile = false) => {
{BROWSER: browser, MOBILE: mobile}, false, true), ScriptTarget.ES2021, true);
const declarations = index.statements.filter(statement => isVariableStatement(statement) &&
statement.declarationList.declarations.some(item => ["openSetting", "openBazaarReadme"].includes(item.name.getText(index))));
- const entry = {} as {openSetting: (app: unknown, tab?: string, options?: {aiProvider?: "chatgpt"}) => void;
+ const entry = {} as {openSetting: (app: unknown, tab?: string, options?: {aiProvider?: "chatgpt"; missingMapServiceID?: string}) => void;
openBazaarReadme: (app: unknown, type: string, name: string, from: string) => Promise<void>};
let native = false;
+ const root = {};
+ const dialog = {element: {getAttribute: () => "settings", querySelector: () => root}};
runInNewContext(transpileModule(declarations.map(item => item.getText(index)).join("\n"),
{compilerOptions: {module: ModuleKind.CommonJS, target: ScriptTarget.ES2021}}).outputText, {
exports: entry, isSettingsWindow: () => native,
isBazaarAvailable: () => true, getHostCapabilities: () => ({documentImportExport: true}),
openNativeSettings: (...args: unknown[]) => calls.push(["native", ...args]),
- openSettingDialog: (...args: unknown[]) => calls.push(["dialog", ...args]),
+ openSettingDialog: (...args: unknown[]) => { calls.push(["dialog", ...args]); return dialog; },
openMobileSetting: (...args: unknown[]) => calls.push(["mobile", ...args]),
openChatGPTProvider: () => calls.push(["chatgpt"]),
- window: {siyuan: {dialogs: [{element: {getAttribute: () => "settings"}}], config}},
+ requestMapServiceConfiguration: (...args: unknown[]) => calls.push(["map", ...args]),
+ window: {siyuan: {dialogs: [dialog], config}},
Constants: {DIALOG_SETTING: "settings"}, switchSettingTab: (...args: unknown[]) => calls.push(["switch", ...args]),
fetchSyncPost: async () => ({code: 0, data: {packages: [{name: "plugin"}]}}),
getFrontend: () => "desktop", withMountedBazaar: async () => calls.push(["readme"]),
@@ -54,6 +57,23 @@ test("settings and marketplace readmes follow the current workspace preference",
assert.deepEqual(f.calls.map(item => item[0]), ["switch"]);
});
+test("missing map service navigation preserves the ID in native, browser, and mobile settings", () => {
+ const f = fixture();
+ f.setPreference(true);
+ f.entry.openSetting({}, "map", {missingMapServiceID: "other-device"});
+ assert.equal(JSON.stringify(f.calls[0][2]), JSON.stringify({tab: "map", missingMapServiceID: "other-device"}));
+ f.calls.length = 0;
+ f.setPreference(false);
+ f.entry.openSetting({}, "map", {missingMapServiceID: "other-device"});
+ assert.deepEqual(f.calls.map(item => item[0]), ["dialog", "map"]);
+ assert.equal(f.calls[1][2], "other-device");
+ const mobile = fixture(true, true);
+ mobile.entry.openSetting({}, "map", {missingMapServiceID: "other-device"});
+ assert.equal(mobile.calls[0][4], "other-device");
+ const windowSource = readFileSync("src/config/setting/window.ts", "utf8");
+ assert.match(windowSource, /revision === commandRevision[\s\S]*?requestMapServiceConfiguration/);
+});
+
test("only a truthy workspace preference opens the independent settings window", () => {
for (const [stored, expected] of [[false, "dialog"], [0, "dialog"], ["", "dialog"],
[true, "native"], [1, "native"]] as const) {
diff --git a/app/src/config/setting/nativeWindow.ts b/app/src/config/setting/nativeWindow.ts
index 822df3fc57..2b936a6e34 100644
--- a/app/src/config/setting/nativeWindow.ts
+++ b/app/src/config/setting/nativeWindow.ts
@@ -22,6 +22,7 @@ import type {TSettingTab} from "./tabs";
export interface ISettingsCommand {
tab?: TSettingTab;
aiProvider?: "chatgpt";
+ missingMapServiceID?: string;
readme?: {type: TBazaarType; from: "bazaar" | "downloaded"; resource: IBazaarItem};
}
diff --git a/app/src/config/setting/sync.test.ts b/app/src/config/setting/sync.test.ts
index 0ea04eca80..45e25cd65b 100644
--- a/app/src/config/setting/sync.test.ts
+++ b/app/src/config/setting/sync.test.ts
@@ -7,6 +7,25 @@ import {getAgentDefaultModelID, getUsableAgentModels} from "../../layout/dock/ag
import {createNamespacePatchQueue} from "../util/namespacePatchQueue";
import {mergeRecordByDottedPath} from "../util/dotPath";
+test("map notifications apply redacted services without replacing active drafts", async () => {
+ let notified = 0;
+ const config = {map: {services: [] as {id: string}[]}};
+ const next = {services: [{id: "other-device"}]};
+ const exports = {} as {refreshSettingConfig: (namespace: string) => Promise<void>};
+ runInNewContext(transpileModule(readFileSync("src/config/setting/sync.ts", "utf8"), {
+ compilerOptions: {module: ModuleKind.CommonJS, target: ScriptTarget.ES2021},
+ }).outputText, {exports, window: {siyuan: {config}}, console, require: () => ({
+ notifyMapConfigChanged: () => { notified++; },
+ fetchSyncPost: async () => ({code: 0, data: {conf: {map: next}}}),
+ systemConfig: (value: unknown) => value, syncSettingTasks() {},
+ getSettingTabDefs: () => [{id: "map"}],
+ remountOpenSettingTab: () => assert.fail("map settings drafts must not be remounted"),
+ })});
+ await exports.refreshSettingConfig("map");
+ assert.equal(notified, 1);
+ assert.equal(config.map, next);
+});
+
for (const mobile of [false, true]) {
test(`namespace patch and its push read confirmed configuration once (mobile=${mobile})`, async () => {
const {parse} = require("ifdef-loader/preprocessor");
@@ -32,7 +51,7 @@ for (const mobile of [false, true]) {
require: () => ({fetchSyncPost, systemConfig: (value: unknown) => value,
objEquals: (left: unknown, right: unknown) => JSON.stringify(left) === JSON.stringify(right),
editorConfigApi: {apply: (value: typeof config.editor) => { config.editor = value; }},
- syncSettingTasks() {}, getSettingTabDefs: () => [{id: "editor"}], remountOpenSettingTab: async () => {},
+ syncSettingTasks() {}, notifyMapConfigChanged() {}, getSettingTabDefs: () => [{id: "editor"}], remountOpenSettingTab: async () => {},
})});
const api = {} as {createConfigNamespaceApi: (options: {
namespace: string; getConfig: () => typeof config.editor;
@@ -70,7 +89,7 @@ for (const mobile of [false, true]) {
systemConfig: (value: unknown) => value,
objEquals: (left: unknown, right: unknown) => JSON.stringify(left) === JSON.stringify(right),
editorConfigApi: {apply: (value: typeof config.editor) => { config.editor = value; }},
- syncSettingTasks() {}, getSettingTabDefs: () => [{id: "editor"}], remountOpenSettingTab: async () => {},
+ syncSettingTasks() {}, notifyMapConfigChanged() {}, getSettingTabDefs: () => [{id: "editor"}], remountOpenSettingTab: async () => {},
})});
const saving = exports.refreshSettingConfigAfter("editor", async () => {
await new Promise<void>(resolve => { finishSave = resolve; });
@@ -103,7 +122,7 @@ test("settings notifications update runtime configuration and refresh the regist
fetchSyncPost: async () => ({code: 0, data: {conf: {editor: {fontSize: 18}, keymap: {}, appearance: {}}}}),
systemConfig: (value: unknown) => value, objEquals: (left: unknown, right: unknown) => JSON.stringify(left) === JSON.stringify(right),
editorConfigApi: {apply: (value: {fontSize: number}) => { config.editor = value; }}, appearanceConfigApi: {},
- syncSettingTasks() {}, remountOpenSettingTab: async (tab: string) => { remounted.push(tab); },
+ syncSettingTasks() {}, notifyMapConfigChanged() {}, remountOpenSettingTab: async (tab: string) => { remounted.push(tab); },
getSettingTabDefs: () => [{id: "editor"}],
};
const exports = {} as {refreshSettingConfig: (namespace: string) => Promise<void>};
@@ -127,7 +146,7 @@ for (const mobile of [false, true]) {
fetchSyncPost: async () => ({code: 0, data: {conf: config}}),
systemConfig: (value: unknown) => value,
objEquals: (left: unknown, right: unknown) => JSON.stringify(left) === JSON.stringify(right),
- syncSettingTasks() {}, getSettingTabDefs: (): {id: string}[] => [],
+ syncSettingTasks() {}, notifyMapConfigChanged() {}, getSettingTabDefs: (): {id: string}[] => [],
refreshMountedBazaar: () => { refreshed++; },
})});
await exports.refreshSettingConfig("editor");
@@ -158,7 +177,7 @@ for (const mobile of [false, true]) {
objEquals: (left: unknown, right: unknown) => JSON.stringify(left) === JSON.stringify(right),
editorConfigApi: {apply: () => assert.fail("OCR must not apply editor settings")},
appearanceConfigApi: {apply: () => assert.fail("OCR must not apply appearance settings")},
- syncSettingTasks() {}, getSettingTabDefs: () => [{id: "assets"}, {id: "ocr"}, {id: "appearance"}, {id: "editor"}],
+ syncSettingTasks() {}, notifyMapConfigChanged() {}, getSettingTabDefs: () => [{id: "assets"}, {id: "ocr"}, {id: "appearance"}, {id: "editor"}],
notifyOCRChanged: () => { notifications++; },
remountOpenSettingTab: async (tab: string) => { remounted.push(tab); },
})});
@@ -222,7 +241,7 @@ for (const mobile of [false, true]) {
fetchSyncPost: async () => ({code: 0, data: {conf: JSON.parse(JSON.stringify({...config, ai: next}))}}),
systemConfig: (value: unknown) => value,
objEquals: (left: unknown, right: unknown) => JSON.stringify(left) === JSON.stringify(right),
- ...aiExports, syncSettingTasks() {}, refreshMountedBazaar() {}, remountOpenSettingTab: async () => {}, getSettingTabDefs: () => [{id: "ai"}],
+ ...aiExports, syncSettingTasks() {}, notifyMapConfigChanged() {}, refreshMountedBazaar() {}, remountOpenSettingTab: async () => {}, getSettingTabDefs: () => [{id: "ai"}],
};
const exports = {} as {refreshSettingConfig: (namespace?: string) => Promise<void>};
runInNewContext(compile("src/config/setting/sync.ts"), {exports, require: () => dependencies, window: windowContext, console});
@@ -260,7 +279,7 @@ for (const mobile of [false, true]) {
fetchSyncPost: async () => failed ? {code: -1} : {code: 0, data: {conf: JSON.parse(JSON.stringify(next))}},
systemConfig: (value: unknown) => value,
objEquals: (left: unknown, right: unknown) => JSON.stringify(left) === JSON.stringify(right),
- syncSettingTasks() {}, refreshMountedBazaar() {}, processSync() {}, getSettingTabDefs: () => [{id: "app"}, {id: "access"}],
+ syncSettingTasks() {}, notifyMapConfigChanged() {}, refreshMountedBazaar() {}, processSync() {}, getSettingTabDefs: () => [{id: "app"}, {id: "access"}],
remountOpenSettingTab: async (tab: string) => { remounted.push(tab); },
})});
await exports.refreshSettingConfig("system");
@@ -311,7 +330,7 @@ for (const mobile of [false, true]) {
exports, window, console, require: () => ({
fetchSyncPost: async () => ({code: 0, data: {conf: {sync: {...next}}}}), systemConfig: (value: unknown) => value,
objEquals: (left: unknown, right: unknown) => JSON.stringify(left) === JSON.stringify(right),
- syncSettingTasks() {}, processSync: () => { refreshes++; runtime.processSync(); },
+ syncSettingTasks() {}, notifyMapConfigChanged() {}, processSync: () => { refreshes++; runtime.processSync(); },
getSettingTabDefs: () => [{id: "sync"}], remountOpenSettingTab: async () => {},
}),
});
diff --git a/app/src/config/setting/sync.ts b/app/src/config/setting/sync.ts
index cbe71eee2b..378d2dffc5 100644
--- a/app/src/config/setting/sync.ts
+++ b/app/src/config/setting/sync.ts
@@ -7,6 +7,7 @@ import {objEquals} from "../../util/functions";
import {syncSettingTasks} from "./taskBlocker";
import {processSync} from "../../dialog/processSystem";
import {notifyOCRChanged} from "../ocrRuntime";
+import {notifyMapConfigChanged} from "../mapRuntime";
import {refreshMountedBazaar} from "../bazaarTab";
/// #if !MOBILE
import {applyKeymap} from "../tabs/keymapRuntime";
@@ -83,7 +84,7 @@ export const refreshSettingConfig = (namespace = "*"): Promise<void> => {
window.siyuan.config.keymap = next.keymap;
}
/// #endif
- const simple = ["export", "fileTree", "search", "flashcard", "secrets", "variables", "repo", "system", "bazaar", "publish", "ocr"] as const;
+ const simple = ["export", "fileTree", "search", "flashcard", "secrets", "variables", "repo", "system", "bazaar", "publish", "ocr", "map"] as const;
for (const key of simple) {
if (includes(key)) {
Object.assign(window.siyuan.config, {[key]: next[key]});
@@ -92,6 +93,7 @@ export const refreshSettingConfig = (namespace = "*"): Promise<void> => {
if (includes("ocr") && next.ocr) {
notifyOCRChanged();
}
+ if (includes("map")) notifyMapConfigChanged();
if (includes("bazaar")) {
void refreshMountedBazaar();
}
@@ -100,7 +102,7 @@ export const refreshSettingConfig = (namespace = "*"): Promise<void> => {
const remountTabs = new Set<TSettingTab>();
for (const namespace of namespaces.has("*") ? [...simple, "editor", "keymap", "appearance", "ai", "sync"] : namespaces) {
const tab = getSettingTabDefs().find(definition => definition.id === (tabs[namespace] || namespace));
- if (tab && tab.id !== "ocr") remountTabs.add(tab.id);
+ if (tab && tab.id !== "ocr" && tab.id !== "map") remountTabs.add(tab.id);
}
if (accessChanged) remountTabs.add("access");
remountTabs.forEach(tab => { void remountOpenSettingTab(tab); });
diff --git a/app/src/config/setting/tabs.ts b/app/src/config/setting/tabs.ts
index ce743b885f..976c4e2d37 100644
--- a/app/src/config/setting/tabs.ts
+++ b/app/src/config/setting/tabs.ts
@@ -10,6 +10,7 @@ import {mountSyncTabExtras, patchSyncConfig} from "../tabs/syncRuntime";
import {mountAccessTab} from "../tabs/accessRuntime";
import {collectAssetsTabSearchStrings, mountAssetsTab} from "../assets";
import {mountOCRTab, registerOCRTab} from "../ocr";
+import {mountMapTab, registerMapTab} from "../map";
import {collectBazaarTabSearchStrings, mountBazaarTab} from "../bazaarTab";
/// #if !MOBILE
import {collectKeymapTabSearchStrings, mountKeymapTab} from "../tabs/keymapUi";
@@ -92,6 +93,12 @@ const createSettingTabs = () => {
title: () => "OCR",
afterMount: mountOCRTab,
}, registerOCRTab),
+ map: setting.tab({
+ id: "map",
+ icon: "iconPin",
+ title: () => window.siyuan.languages.mapSettings,
+ afterMount: mountMapTab,
+ }, registerMapTab),
export: setting.tab({
id: "export",
icon: "iconUpload",
diff --git a/app/src/config/setting/window.ts b/app/src/config/setting/window.ts
index 8c0b8412f0..e47a2e714f 100644
--- a/app/src/config/setting/window.ts
+++ b/app/src/config/setting/window.ts
@@ -95,9 +95,11 @@ const initialize = async () => {
});
let dialog: Dialog;
let command: ISettingsCommand;
+ let commandRevision = 0;
const applyCommand = async () => {
if (!isActive() || !dialog || !command || host.plugin) return;
const next = command;
+ const revision = ++commandRevision;
command = undefined;
if (next.tab) {
const mounted = switchSettingTab(dialog.element, host.app, next.tab);
@@ -113,6 +115,12 @@ const initialize = async () => {
const {openChatGPTProvider} = await import("../tabs/ai/aiProviderUi");
if (isActive()) { openChatGPTProvider(); }
}
+ if (next.tab === "map" && next.missingMapServiceID) {
+ const {requestMapServiceConfiguration} = await import("../map");
+ if (isActive() && revision === commandRevision) {
+ requestMapServiceConfiguration(dialog.element.querySelector('.config__tab-container[data-name="map"]'), next.missingMapServiceID);
+ }
+ }
if (next.readme) {
const {type, from, resource} = next.readme;
await withMountedBazaar(({bazaar, renderReadme}) => {
diff --git a/app/src/config/systemConfig.ts b/app/src/config/systemConfig.ts
index 95f8cc807e..0bc496aa4c 100644
--- a/app/src/config/systemConfig.ts
+++ b/app/src/config/systemConfig.ts
@@ -166,4 +166,4 @@ export const systemConfigCollections = (value: Pick<SystemAppConf, "keymap" | "u
};
export const systemConfig = (value: SystemAppConf, defaultLayout?: () => Config.IUiLayout): Config.IConf =>
- ({...value, ...systemConfigCollections(value, defaultLayout)});
+ ({...value, map: value.map || {services: [], revision: ""}, ...systemConfigCollections(value, defaultLayout)});
diff --git a/app/src/mobile/index.ts b/app/src/mobile/index.ts
index c81916baa7..b795e3bc1d 100644
--- a/app/src/mobile/index.ts
+++ b/app/src/mobile/index.ts
@@ -206,6 +206,14 @@ class App {
activeBlur();
});
fetchPost("/api/system/getConf", {}, async (confResponse) => {
+ try {
+ // 现代 Android 壳先完成可信主文档握手,再开放保持同步语义的原生接口。
+ await window.JSAndroid?.ready;
+ } catch (_error) {
+ console.error("Android native bridge initialization failed");
+ finishMobileStartup();
+ return;
+ }
await addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript");
addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript");
window.siyuan.config = systemConfig(confResponse.data.conf);
diff --git a/app/src/mobile/menu/index.ts b/app/src/mobile/menu/index.ts
index 8ca78d99a9..bb1a896a42 100644
--- a/app/src/mobile/menu/index.ts
+++ b/app/src/mobile/menu/index.ts
@@ -20,7 +20,7 @@ const takeMobileMenuReturnCallback = () => {
return callback;
};
-export const openMobileSetting = (app: App, tab?: TSettingTab, returnCallback?: () => void) => {
+export const openMobileSetting = (app: App, tab?: TSettingTab, returnCallback?: () => void, missingMapServiceID?: string) => {
if (!tab) {
popMenu();
if (document.getElementById("menu")?.style.transform === "translateX(0px)") {
@@ -35,7 +35,7 @@ export const openMobileSetting = (app: App, tab?: TSettingTab, returnCallback?:
if (!settingTabDef || settingTabDef.hidden) {
return;
}
- openSettingTab(app, settingTabDef, callback);
+ openSettingTab(app, settingTabDef, callback, missingMapServiceID);
};
export const popMenu = () => {
diff --git a/app/src/mobile/menu/settingPanel.ts b/app/src/mobile/menu/settingPanel.ts
index b2ae20fcae..3d4d9a0178 100644
--- a/app/src/mobile/menu/settingPanel.ts
+++ b/app/src/mobile/menu/settingPanel.ts
@@ -9,6 +9,7 @@ import {clearSyncTabElement} from "../../config/tabs/syncRuntime";
import {clearAccessTabElement} from "../../config/tabs/accessRuntime";
import {unmountAssetsTab} from "../../config/assets";
import {unmountOCRTab} from "../../config/ocr";
+import {unmountMapTab} from "../../config/map";
import {unmountWorkspaceStorage} from "../../config/tabs/workspaceStorage";
/** 卸载设置页中持有全局状态的模块,避免容器被替换后残留副作用 */
@@ -19,6 +20,8 @@ export const unmountSettingTab = (root: HTMLElement, tabId: TSettingTab) => {
unmountAssetsTab(root);
} else if (tabId === "ocr") {
unmountOCRTab(root);
+ } else if (tabId === "map") {
+ unmountMapTab(root);
} else if (tabId === "app") {
unmountWorkspaceStorage(root);
} else if (tabId === "sync") {
@@ -30,7 +33,7 @@ export const unmountSettingTab = (root: HTMLElement, tabId: TSettingTab) => {
/** 以全屏面板打开单个设置页,`returnCallback` 用于接管面板返回按钮的行为 */
export const openSettingTab = (app: App, settingTabDef: ISettingTabShell<TSettingTab>,
- returnCallback?: () => void) => {
+ returnCallback?: () => void, missingMapServiceID?: string) => {
let root: HTMLElement | undefined;
openModel({
title: settingTabDef.title,
@@ -39,6 +42,7 @@ export const openSettingTab = (app: App, settingTabDef: ISettingTabShell<TSettin
html: `<div class="config${isMobile() ? " config--mobile" : ""}"></div>`,
bindEvent(modelMainElement: HTMLElement) {
root = modelMainElement.firstElementChild as HTMLElement;
+ if (settingTabDef.id === "map" && missingMapServiceID) root.dataset.mapServiceID = missingMapServiceID;
bindSettingSaveDelegation(root);
const mountedRoot = root;
void getSettingTab(settingTabDef.id).mount(mountedRoot, undefined, app).then(() => {
diff --git a/app/src/mobile/util/androidBridgeStartup.test.ts b/app/src/mobile/util/androidBridgeStartup.test.ts
new file mode 100644
index 0000000000..9ab66afbcf
--- /dev/null
+++ b/app/src/mobile/util/androidBridgeStartup.test.ts
@@ -0,0 +1,81 @@
+import * as assert from "node:assert/strict";
+import {readFileSync} from "node:fs";
+import {test} from "node:test";
+import {runInNewContext} from "node:vm";
+import {createSourceFile, isCallExpression, ModuleKind, ScriptTarget, transpileModule} from "typescript";
+
+const source = createSourceFile("mobile.ts", readFileSync("src/mobile/index.ts", "utf8"), ScriptTarget.ES2022, true);
+let callback: string;
+const visit = (node: import("typescript").Node) => {
+ if (isCallExpression(node) && node.expression.getText(source) === "fetchPost" &&
+ node.arguments[0]?.getText(source) === '"/api/system/getConf"') {
+ callback = node.arguments[2].getText(source);
+ }
+ node.forEachChild(visit);
+};
+visit(source);
+
+const startup = (ready?: Promise<void>) => {
+ const calls: string[] = [];
+ const stop = new Error("script boundary");
+ const module = {exports: undefined as (response: unknown) => Promise<void>};
+ const scope = {
+ module, exports: module.exports,
+ window: {JSAndroid: ready ? {ready} : {}},
+ Constants: {PROTYLE_CDN: "/protyle", SIYUAN_VERSION: "test"},
+ console: {error: () => calls.push("error")},
+ finishMobileStartup: () => calls.push("finish"),
+ addScriptSync: () => { calls.push("script"); throw stop; },
+ };
+ runInNewContext(transpileModule(`module.exports = ${callback}`, {
+ compilerOptions: {module: ModuleKind.CommonJS, target: ScriptTarget.ES2022},
+ }).outputText, scope);
+ return {calls, stop, run: () => module.exports({})};
+};
+
+test("Android startup waits for the trusted document grant before plugins and native reads", async () => {
+ let grant: () => void;
+ const scenario = startup(new Promise<void>(resolve => { grant = resolve; }));
+ const pending = scenario.run();
+ await Promise.resolve();
+ assert.deepEqual(scenario.calls, []);
+ grant();
+ await assert.rejects(pending, error => error === scenario.stop);
+ assert.deepEqual(scenario.calls, ["script"]);
+});
+
+test("failed Android grants abort initialization without calling native readers", async () => {
+ const scenario = startup(Promise.reject(new Error("expired document")));
+ await scenario.run();
+ assert.deepEqual(scenario.calls, ["error", "finish"]);
+});
+
+test("legacy Android and browser startup do not require a new bridge", async () => {
+ const scenario = startup();
+ await assert.rejects(scenario.run(), error => error === scenario.stop);
+ assert.deepEqual(scenario.calls, ["script"]);
+});
+
+test("authentication callbacks preserve their synchronous result after the trusted bridge grant", async () => {
+ const html = readFileSync("stage/auth.html", "utf8");
+ const start = html.indexOf(" let androidBridgeReady = true");
+ const end = html.indexOf(" if (window.JSHarmony && window.JSHarmony.getOIDCCallback)", start);
+ assert.ok(start > 0 && end > start);
+ let grant: () => void;
+ const calls: string[] = [];
+ const scope = {window: {JSAndroid: {
+ ready: new Promise<void>(resolve => { grant = resolve; }),
+ getOIDCCallback: () => { calls.push("read"); return "siyuan://callback"; },
+ }}, handleOIDCCallback: (value: string) => calls.push(value), console: {error: () => calls.push("error")}};
+ const run = runInNewContext(`(async () => {${html.substring(start, end)}})`, scope) as () => Promise<void>;
+ const pending = run();
+ await Promise.resolve();
+ assert.deepEqual(calls, []);
+ grant();
+ await pending;
+ assert.deepEqual(calls, ["read", "siyuan://callback"]);
+ calls.length = 0;
+ scope.window.JSAndroid.ready = Promise.reject(new Error("expired document"));
+ await run();
+ assert.deepEqual(calls, ["error"]);
+});
diff --git a/app/src/protyle/render/av/calendar/render.test.ts b/app/src/protyle/render/av/calendar/render.test.ts
index 410c966b9c..c8e2b5a366 100644
--- a/app/src/protyle/render/av/calendar/render.test.ts
+++ b/app/src/protyle/render/av/calendar/render.test.ts
@@ -393,6 +393,7 @@ test("calendar edit-mode changes refresh controls and stale actions cannot creat
"../richText": {renderAVRichTextElements() {}},
"../locate": {finishAVLocate() {}},
"../render/av/calendar/render": calendar,
+ "../render/av/map/render": {refreshMapReadonly() {}},
"../../util/functions": {isMobile: () => mobile},
"../ui/hideElements": {hideElements() {}},
"./disabledWYSIWYG": {disabledWYSIWYG() {}},
diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts
index 9a50ce1984..ef5fc35af4 100644
--- a/app/src/protyle/render/av/cell.ts
+++ b/app/src/protyle/render/av/cell.ts
@@ -550,7 +550,7 @@ export const cellScrollIntoView = (blockElement: HTMLElement, cellElement: Eleme
if (!bodyElement) {
return;
}
- const isList = blockElement.getAttribute("data-av-type") === "list";
+ const isList = ["list", "map"].includes(blockElement.getAttribute("data-av-type"));
const avHeaderRect = (isList ? blockElement.querySelector(".av__views") :
bodyElement.querySelector(".av__row--header")).getBoundingClientRect();
if (avHeaderRect.bottom > cellRect.top) {
diff --git a/app/src/protyle/render/av/container.ts b/app/src/protyle/render/av/container.ts
index d37b91a323..138511996a 100644
--- a/app/src/protyle/render/av/container.ts
+++ b/app/src/protyle/render/av/container.ts
@@ -1,5 +1,8 @@
+import {destroyMap} from "./map/state";
+
// 重建数据库容器时保留标签栏位置,仅在首次渲染或切换视图时滚动到目标标签。
export const replaceAVContainer = (blockElement: HTMLElement, html: string) => {
+ destroyMap(blockElement);
const selector = ":scope > .av__container > .av__header > .av__views > .layout-tab-bar";
const previousTabBar = blockElement.querySelector<HTMLElement>(selector);
const scrollLeft = previousTabBar?.scrollLeft || 0;
diff --git a/app/src/protyle/render/av/fieldVisibility.ts b/app/src/protyle/render/av/fieldVisibility.ts
index 685fa26599..cddfa348f5 100644
--- a/app/src/protyle/render/av/fieldVisibility.ts
+++ b/app/src/protyle/render/av/fieldVisibility.ts
@@ -7,6 +7,8 @@ import {setPosition} from "../../../util/setPosition";
const getViewIcon = (type: TAVView) => {
switch (type) {
+ case "map":
+ return "iconGlobe";
case "calendar":
return "iconCalendar";
case "list":
diff --git a/app/src/protyle/render/av/layout.ts b/app/src/protyle/render/av/layout.ts
index a91a88f77d..0536f644b5 100644
--- a/app/src/protyle/render/av/layout.ts
+++ b/app/src/protyle/render/av/layout.ts
@@ -1,5 +1,6 @@
import {isAVSelectType} from "./capabilities";
import {bindCalendarSettings, getCalendarSettingsHTML} from "./calendar/settings";
+import {bindMapSettings, getMapSettingsHTML} from "./map/settings";
import {isTableLikeView} from "./viewType";
import {isAVRenderData} from "./renderData";
import {transaction} from "../../wysiwyg/transaction";
@@ -146,6 +147,11 @@ export const getLayoutHTML = (data: IAV) => {
<div class="fn__hr"></div>
<div>${window.siyuan.languages.calendarView}</div>
</div>
+ <div data-type="set-layout" data-view-type="map" class="av__layout-item${data.viewType === "map" ? " av__layout-item--select" : ""}">
+ <svg><use xlink:href="#iconGlobe"></use></svg>
+ <div class="fn__hr"></div>
+ <div>${window.siyuan.languages.mapView}</div>
+ </div>
</div>
</button>
<label class="b3-menu__item">
@@ -174,6 +180,9 @@ export const getLayoutHTML = (data: IAV) => {
if (data.viewType === "calendar") {
return html + getCalendarSettingsHTML(data.view as IAVTable, true) + "</div>";
}
+ if (data.viewType === "map") {
+ html += getMapSettingsHTML(data.view as IAVTable, true);
+ }
return html + `<button class="b3-menu__item" data-type="set-page-size" data-size="${view.pageSize}">
<span class="fn__flex-center">${window.siyuan.languages.entryNum}</span>
<span class="fn__flex-1"></span>
@@ -290,6 +299,10 @@ export const bindLayoutEvent = (options: {
bindCalendarSettings({...options, onChange: rerender});
return;
}
+ if (options.data.viewType === "map") {
+ bindMapSettings({...options, onChange: rerender});
+ return;
+ }
if (isTableLikeView(options.data.viewType)) {
return;
}
diff --git a/app/src/protyle/render/av/listView.test.ts b/app/src/protyle/render/av/listView.test.ts
index 8115559301..d7f236e442 100644
--- a/app/src/protyle/render/av/listView.test.ts
+++ b/app/src/protyle/render/av/listView.test.ts
@@ -46,6 +46,15 @@ const createView = () => ({
}) as IAVTable;
describe("database list view", () => {
+ it("map record lists use list rendering and the same field selection plumbing", () => {
+ const data = createView();
+ const options = {data, row: data.rows[0], rowIndex: 0, pinIndex: 0};
+ assert.equal(getRowHTML({...options, type: "map"}), getRowHTML({...options, type: "list"}));
+ assert.equal(viewType.isTableLikeView("map"), true);
+ const selected = resolveAVSelectedCell({view: data, viewType: "map"} as IAV,
+ {groupID: "", rowID: "row", colID: "title"});
+ assert.equal(selected.cell.id, "title-value");
+ });
it("renders the primary field without column widths or freezing and reveals selected properties", () => {
const data = createView();
const options = {data, row: data.rows[0], rowIndex: 0, pinIndex: 0, type: "list" as TAVView};
diff --git a/app/src/protyle/render/av/map/bootstrap.ts b/app/src/protyle/render/av/map/bootstrap.ts
new file mode 100644
index 0000000000..77e096dd2f
--- /dev/null
+++ b/app/src/protyle/render/av/map/bootstrap.ts
@@ -0,0 +1,55 @@
+import {AVMapProvider} from "./protocol";
+import {prepareAVMapAssets} from "./providersLoader";
+
+// 第二阶段策略与响应头相交;不保留本地来源、nonce 或可重用的脚本 hash。
+// 删除 meta 不能撤回已经施加的策略。外层 wrapper 另行约束跨文档导航。
+export const getAVMapLockedPolicy = (provider: AVMapProvider): string => {
+ let scripts = "'none'";
+ let connect = "'none'";
+ let images = "data: blob:";
+ let workers = "'none'";
+ switch (provider) {
+ case "openfreemap":
+ connect = "https://tiles.openfreemap.org";
+ images += " https://tiles.openfreemap.org";
+ workers = "blob:";
+ break;
+ case "amap":
+ scripts = "https://webapi.amap.com";
+ connect = "https://webapi.amap.com https://restapi.amap.com https://vdata.amap.com";
+ images += " https://webapi.amap.com https://a.amap.com https://*.is.autonavi.com";
+ break;
+ case "tencent":
+ scripts = "https://map.qq.com";
+ connect = "https://map.qq.com https://apis.map.qq.com https://*.map.qq.com";
+ images += " https://map.qq.com https://*.map.qq.com";
+ break;
+ case "baidu":
+ scripts = "https://api.map.baidu.com";
+ connect = "https://api.map.baidu.com https://*.map.bdimg.com https://*.bdimg.com";
+ images += " https://api.map.baidu.com https://*.map.bdimg.com https://*.bdimg.com https://*.map.baidu.com";
+ break;
+ }
+ return `default-src 'none'; script-src ${scripts}; connect-src ${connect}; img-src ${images}; ` +
+ `style-src 'unsafe-inline'; font-src 'none'; worker-src ${workers}; child-src ${workers}; ` +
+ "frame-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'";
+};
+
+export const prepareAVMapBootstrap = async (scope: Window, provider: AVMapProvider, signal: AbortSignal): Promise<() => void> => {
+ const assets = await prepareAVMapAssets(scope, provider, signal);
+ try {
+ if (signal.aborted) {
+ throw new Error("hostUnavailable");
+ }
+ const policy = scope.document.createElement("meta");
+ policy.httpEquiv = "Content-Security-Policy";
+ policy.content = getAVMapLockedPolicy(provider);
+ scope.document.head.appendChild(policy);
+ // 此时尚未构造任何 Map、Worker 或 Worker blob。后续创建继承收紧后的策略。
+ assets.lock();
+ return assets.destroy;
+ } catch (_error) {
+ assets.destroy();
+ throw new Error("hostUnavailable");
+ }
+};
diff --git a/app/src/protyle/render/av/map/desktopTransport.test.ts b/app/src/protyle/render/av/map/desktopTransport.test.ts
new file mode 100644
index 0000000000..0c0173c57e
--- /dev/null
+++ b/app/src/protyle/render/av/map/desktopTransport.test.ts
@@ -0,0 +1,186 @@
+import * as assert from "node:assert/strict";
+import {readFileSync} from "node:fs";
+import {webcrypto} from "node:crypto";
+import {describe, it} from "node:test";
+import * as ts from "typescript";
+import * as protocol from "./protocol";
+
+const source = readFileSync(__dirname + "/desktopTransport.ts", "utf8");
+const load = (ipc: unknown, browser = false) => {
+ // Exercise the same compile-time branches as webpack without importing Electron into Node.
+ let keep = true;
+ const code = source.split("\n").filter((line) => {
+ if (line.includes("/// #if !BROWSER")) { keep = !browser; return false; }
+ if (line.includes("/// #else")) { keep = browser; return false; }
+ if (line.includes("/// #endif")) { keep = true; return false; }
+ return keep;
+ }).join("\n");
+ const result: any = {};
+ const requireModule = (name: string) => {
+ if (name === "./protocol") { return protocol; }
+ assert.equal(name, "electron");
+ assert.equal(browser, false, "browser must not import Electron");
+ return {ipcRenderer: ipc};
+ };
+ new Function("require", "exports", ts.transpileModule(code, {
+ compilerOptions: {module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2021},
+ }).outputText)(requireModule, result);
+ return result;
+};
+
+const fixture = () => {
+ const calls: Array<[string, any]> = [];
+ const listeners = new Map<string, (...args: any[]) => void>();
+ const domListeners = new Map<string, () => void>();
+ const frames = new Map<number, () => void>();
+ let resolveCreate: (value: unknown) => void;
+ let now = 0, nextFrame = 0;
+ const ipc = {
+ invoke: (name: string, value: unknown) => {
+ calls.push([name, value]);
+ return new Promise((resolve) => { resolveCreate = resolve; });
+ },
+ send: (name: string, value: unknown) => calls.push([name, value]),
+ on: (name: string, fn: (...args: any[]) => void) => listeners.set(name, fn),
+ removeListener: (name: string) => listeners.delete(name),
+ };
+ const rect = {x: 10, y: 20, width: 400, height: 300};
+ const doc: any = {hidden: false, documentElement: {}, querySelectorAll: (): HTMLElement[] => [],
+ elementFromPoint: () => container,
+ addEventListener: (name: string, fn: () => void) => domListeners.set(name, fn),
+ removeEventListener: (name: string) => domListeners.delete(name)};
+ const scope = {crypto: webcrypto, innerWidth: 1000, innerHeight: 800, performance: {now: () => now},
+ setTimeout: () => 1, clearTimeout() {},
+ requestAnimationFrame: (fn: () => void) => { frames.set(++nextFrame, fn); return nextFrame; },
+ cancelAnimationFrame: (id: number) => frames.delete(id),
+ addEventListener: (name: string, fn: () => void) => domListeners.set(name, fn),
+ removeEventListener: (name: string) => domListeners.delete(name),
+ getComputedStyle: () => ({display: "block", visibility: "visible", opacity: "1", overflowX: "visible", overflowY: "visible",
+ getPropertyValue: () => ""})};
+ doc.defaultView = scope;
+ const container: any = {ownerDocument: doc, isConnected: true, parentElement: null,
+ getClientRects: () => [rect], getBoundingClientRect: () => rect, contains: (target: unknown) => target === container};
+ const errors: string[] = [], clicks: unknown[] = [];
+ let ready = 0;
+ const api = load(ipc);
+ const host = api.createDesktopAVMapHost(container, {provider: "openfreemap", theme: "light",
+ credentials: {apiKey: "do-not-send", extra: "private"}, onError: (value: string) => errors.push(value),
+ onMarkerClick: (...args: unknown[]) => clicks.push(args), onReady: () => ready++});
+ const instanceID = calls[0][1].instanceID;
+ return {host, calls, listeners, domListeners, frames, errors, clicks, doc, container, rect,
+ ready: () => ready,
+ reply: (value: object) => listeners.get("siyuan-map-reply")?.({}, {version: 1, instanceID, ...value}),
+ created: async () => {
+ resolveCreate({version: 1, instanceID});
+ await new Promise<void>((resolve) => setImmediate(resolve));
+ },
+ advance: () => {
+ now += 150;
+ const pending = [...frames.values()];
+ frames.clear();
+ pending.forEach((fn) => fn());
+ }};
+};
+
+describe("desktop map transport", () => {
+ it("clips CSS rectangles, preserves full logical size and never multiplies by display scale", () => {
+ const compute = load({}).computeDesktopAVMapGeometry;
+ assert.deepEqual(compute({x: -20.5, y: 30, width: 200, height: 100},
+ [{x: 0, y: 0, width: 1000, height: 800}, {x: 10, y: 40, width: 100, height: 60}]),
+ {visible: true, bounds: {x: 10, y: 40, width: 100, height: 60},
+ logicalSize: {width: 200, height: 100}, crop: {x: 30.5, y: 10}});
+ const rect = {x: 0, y: 0, width: 100, height: 100};
+ assert.deepEqual(compute(rect, [{...rect, x: 200}]), {visible: false});
+ assert.deepEqual(compute(rect, [], [{x: 30, y: 40, width: 5, height: 5}]), {visible: false});
+ assert.equal(compute(rect, [], [{...rect, x: 100}]).visible, true);
+ assert.deepEqual(compute({...rect, width: NaN}, []), {visible: false});
+ });
+ it("fails closed for missing capability and omits Electron from browser compilation", async () => {
+ assert.equal(await load(undefined, true).isDesktopAVMapHostSupported(), false);
+ assert.equal(await load({invoke: async () => ({version: 1, supported: true})}).isDesktopAVMapHostSupported(), true);
+ assert.equal(await load({invoke: async () => ({version: 2, supported: true})}).isDesktopAVMapHostSupported(), false);
+ assert.equal(await load({invoke: async () => { throw new Error("old main"); }}).isDesktopAVMapHostSupported(), false);
+ });
+ it("caches ready commands, validates replies and recovers from scroll, occlusion and visibility changes", async () => {
+ const oldMutation = globalThis.MutationObserver, oldResize = globalThis.ResizeObserver;
+ let disconnects = 0;
+ class Observer { observe() {} disconnect() { disconnects++; } }
+ globalThis.MutationObserver = Observer as any;
+ globalThis.ResizeObserver = Observer as any;
+ const f = fixture();
+ try {
+ const point = {id: "row", longitude: 1, latitude: 2, coordinateSystem: "wgs84", name: "private"};
+ f.host.setPoints([point], 1);
+ f.host.setTheme("dark");
+ f.host.fit();
+ assert.deepEqual(f.calls[0][1].credentials, {});
+ assert.match(f.calls[0][1].instanceID, /^[a-f0-9]{48}$/);
+ await f.created();
+ f.reply({type: "ready", instanceID: "old"});
+ assert.equal(f.ready(), 0);
+ f.reply({type: "ready"});
+ f.reply({type: "ready"});
+ assert.equal(f.ready(), 1);
+ const commands = f.calls.filter(([name]) => name === "siyuan-map-command").map(([, value]) => value);
+ assert.deepEqual(commands.map((value) => value.type), ["setPoints", "theme", "fit"]);
+ assert.equal(commands[0].points[0].name, undefined);
+ assert.equal(commands[1].theme, "dark");
+ f.reply({type: "markerClick", id: "row", revision: 0});
+ f.reply({type: "markerClick", id: "missing", revision: 1});
+ f.reply({type: "markerClick", id: "row", revision: 1});
+ assert.deepEqual(f.clicks, [["row", 1]]);
+ f.host.setPoints([], 2);
+ f.reply({type: "markerClick", id: "row", revision: 2});
+ assert.equal(f.clicks.length, 1);
+ const lastGeometry = () => {
+ const entries = f.calls.filter(([name]) => name === "siyuan-map-geometry");
+ return entries[entries.length - 1][1];
+ };
+ f.advance();
+ assert.equal(lastGeometry().visible, true);
+ assert.equal(f.domListeners.has("blur"), false, "focusing the native map must not hide it");
+ f.domListeners.get("focus")();
+ assert.equal(lastGeometry().visible, false);
+ f.advance();
+ assert.equal(lastGeometry().visible, true);
+ f.domListeners.get("scroll")();
+ assert.equal(lastGeometry().visible, false);
+ f.advance();
+ assert.equal(lastGeometry().visible, true);
+ f.doc.elementFromPoint = () => ({});
+ f.advance();
+ assert.equal(lastGeometry().visible, false);
+ f.doc.elementFromPoint = () => f.container;
+ f.advance(); f.advance();
+ assert.equal(lastGeometry().visible, true);
+ f.doc.hidden = true;
+ f.domListeners.get("visibilitychange")();
+ assert.equal(lastGeometry().visible, false);
+ f.doc.hidden = false;
+ f.advance(); f.advance();
+ assert.equal(lastGeometry().visible, true);
+ f.container.isConnected = false;
+ f.advance();
+ assert.equal(lastGeometry().visible, false);
+ f.host.destroy();
+ assert.equal(f.listeners.size, 0);
+ assert.equal(f.frames.size, 0);
+ assert.equal(f.domListeners.size, 0);
+ assert.equal(disconnects, 2);
+ assert.deepEqual(f.errors, []);
+ } finally {
+ f.host.destroy();
+ globalThis.MutationObserver = oldMutation;
+ globalThis.ResizeObserver = oldResize;
+ }
+ });
+ it("destroys a create that resolves after disposal and never recreates listeners", async () => {
+ const f = fixture();
+ f.host.destroy();
+ await f.created();
+ assert.equal(f.calls.filter(([name]) => name === "siyuan-map-destroy").length, 2);
+ assert.equal(f.listeners.size, 0);
+ assert.equal(f.frames.size, 0);
+ assert.deepEqual(f.errors, []);
+ });
+});
diff --git a/app/src/protyle/render/av/map/desktopTransport.ts b/app/src/protyle/render/av/map/desktopTransport.ts
new file mode 100644
index 0000000000..802a430449
--- /dev/null
+++ b/app/src/protyle/render/av/map/desktopTransport.ts
@@ -0,0 +1,274 @@
+/// #if !BROWSER
+import {ipcRenderer} from "electron";
+/// #endif
+import type {AVMapHost, AVMapHostOptions} from "./host";
+import {
+ AV_MAP_PROTOCOL_VERSION, AVMapCommand, AVMapErrorCode, AVMapPoint, isAVMapProvider, isAVMapRevision,
+ isAVMapTheme, parseAVMapReply, sanitizeAVMapCredentials, sanitizeAVMapPoints,
+} from "./protocol";
+
+interface MapRect { x: number; y: number; width: number; height: number; }
+type MapGeometry = {visible: false} | {
+ visible: true; bounds: MapRect; logicalSize: {width: number; height: number}; crop: {x: number; y: number};
+};
+
+const intersects = (a: MapRect, b: MapRect) => a.x < b.x + b.width && b.x < a.x + a.width &&
+ a.y < b.y + b.height && b.y < a.y + a.height;
+
+// All coordinates stay in owner CSS pixels. Only the main process applies the owner zoom factor.
+export const computeDesktopAVMapGeometry = (rect: MapRect, clips: MapRect[], occluders: MapRect[] = []): MapGeometry => {
+ if (![rect, ...clips, ...occluders].every((item) => [item.x, item.y, item.width, item.height].every(Number.isFinite) &&
+ item.width >= 0 && item.height >= 0) || rect.width < 1 || rect.height < 1) {
+ return {visible: false};
+ }
+ let left = rect.x, top = rect.y, right = rect.x + rect.width, bottom = rect.y + rect.height;
+ clips.forEach((clip) => {
+ left = Math.max(left, clip.x);
+ top = Math.max(top, clip.y);
+ right = Math.min(right, clip.x + clip.width);
+ bottom = Math.min(bottom, clip.y + clip.height);
+ });
+ const bounds = {x: left, y: top, width: right - left, height: bottom - top};
+ if (left < 0 || top < 0 || bounds.width < 1 || bounds.height < 1 ||
+ occluders.some((item) => item.width > 0 && item.height > 0 && intersects(bounds, item))) {
+ return {visible: false};
+ }
+ return {visible: true, bounds, logicalSize: {width: rect.width, height: rect.height},
+ crop: {x: left - rect.x, y: top - rect.y}};
+};
+
+const getIPC = () => {
+ /// #if !BROWSER
+ return ipcRenderer;
+ /// #else
+ return undefined;
+ /// #endif
+};
+
+export const isDesktopAVMapHostSupported = async (): Promise<boolean> => {
+ try {
+ const reply = await getIPC()?.invoke("siyuan-map-capability");
+ return reply?.version === AV_MAP_PROTOCOL_VERSION && reply.supported === true;
+ } catch (_error) {
+ return false;
+ }
+};
+
+const readGeometry = (container: HTMLElement): MapGeometry => {
+ const doc = container.ownerDocument;
+ const scope = doc.defaultView;
+ if (!scope || doc.hidden || !container.isConnected || !container.getClientRects().length) {
+ return {visible: false};
+ }
+ const rect = container.getBoundingClientRect();
+ const clips: MapRect[] = [{x: 0, y: 0, width: scope.innerWidth, height: scope.innerHeight}];
+ for (let element: HTMLElement = container; element; element = element.parentElement) {
+ const style = scope.getComputedStyle(element);
+ if (style.display === "none" || style.visibility !== "visible" || Number(style.opacity) === 0 ||
+ style.getPropertyValue("content-visibility") === "hidden") {
+ return {visible: false};
+ }
+ if (element !== container && /hidden|clip|scroll|auto/.test(style.overflowX + style.overflowY)) {
+ const bounds = element.getBoundingClientRect();
+ const clipX = /hidden|clip|scroll|auto/.test(style.overflowX);
+ const clipY = /hidden|clip|scroll|auto/.test(style.overflowY);
+ const scaleX = element.offsetWidth ? bounds.width / element.offsetWidth : 1;
+ const scaleY = element.offsetHeight ? bounds.height / element.offsetHeight : 1;
+ clips.push({x: clipX ? bounds.x + element.clientLeft * scaleX : 0,
+ y: clipY ? bounds.y + element.clientTop * scaleY : 0,
+ width: clipX ? element.clientWidth * scaleX : scope.innerWidth,
+ height: clipY ? element.clientHeight * scaleY : scope.innerHeight});
+ }
+ }
+ const occluders: MapRect[] = [];
+ // These are actual application overlay roots, not guesses based on arbitrary z-index values.
+ doc.querySelectorAll<HTMLElement>(".b3-menu, .b3-dialog, .av__panel, .protyle-util, .protyle-toolbar, .block__popover, [popover]")
+ .forEach((element) => {
+ if (element.contains(container) || !element.getClientRects().length) {
+ return;
+ }
+ const style = scope.getComputedStyle(element);
+ if (style.display !== "none" && style.visibility === "visible" && Number(style.opacity) !== 0) {
+ occluders.push(element.getBoundingClientRect());
+ }
+ });
+ const geometry = computeDesktopAVMapGeometry(rect, clips, occluders);
+ if (geometry.visible) {
+ const bounds = geometry.bounds;
+ // Hit-test the owner's DOM (native child views are not in this tree), including sticky toolbars.
+ for (const x of [bounds.x + 0.5, bounds.x + bounds.width / 2, bounds.x + bounds.width - 0.5]) {
+ for (const y of [bounds.y + 0.5, bounds.y + bounds.height / 2, bounds.y + bounds.height - 0.5]) {
+ const top = doc.elementFromPoint(x, y);
+ if (!top || !container.contains(top)) {
+ return {visible: false};
+ }
+ }
+ }
+ }
+ return geometry;
+};
+
+export const createDesktopAVMapHost = (container: HTMLElement, options: AVMapHostOptions): AVMapHost => {
+ const scope = container.ownerDocument.defaultView;
+ const ipc = getIPC();
+ let destroyed = false, ready = false, created = false, pendingFit = false;
+ let instanceID = "", revision = -1, theme = options.theme;
+ let points: AVMapPoint[] = [];
+ let ids = new Set<string>();
+ let frame = 0, timeout = 0, stableAfter = 0;
+ let lastGeometry = "", sentGeometry = "";
+ let observer: MutationObserver;
+ let resizeObserver: ResizeObserver;
+ const envelope = () => ({version: AV_MAP_PROTOCOL_VERSION, instanceID} as const);
+ const send = (command: AVMapCommand) => {
+ if (!destroyed && ready) {
+ ipc.send("siyuan-map-command", command);
+ }
+ };
+ const geometry = (value: MapGeometry) => {
+ const key = JSON.stringify(value);
+ if (created && key !== sentGeometry) {
+ ipc.send("siyuan-map-geometry", {...envelope(), ...value});
+ sentGeometry = key;
+ }
+ };
+ const invalidate = () => {
+ if (!destroyed && scope) {
+ stableAfter = scope.performance.now() + 120;
+ geometry({visible: false});
+ }
+ };
+ const tick = () => {
+ if (destroyed) {
+ return;
+ }
+ const next = readGeometry(container);
+ const key = JSON.stringify(next);
+ if (key !== lastGeometry) {
+ lastGeometry = key;
+ invalidate();
+ }
+ if (!next.visible || scope.performance.now() >= stableAfter) {
+ geometry(next);
+ }
+ frame = scope.requestAnimationFrame(tick);
+ };
+ const destroy = () => {
+ if (destroyed) {
+ return;
+ }
+ destroyed = true;
+ ready = false;
+ if (instanceID) {
+ ipc?.send("siyuan-map-destroy", envelope());
+ }
+ ipc?.removeListener("siyuan-map-reply", onReply);
+ scope?.clearTimeout(timeout);
+ scope?.cancelAnimationFrame(frame);
+ scope?.removeEventListener("pagehide", destroy);
+ scope?.removeEventListener("scroll", invalidate, true);
+ scope?.removeEventListener("resize", invalidate);
+ scope?.removeEventListener("focus", invalidate);
+ container.ownerDocument.removeEventListener("visibilitychange", invalidate);
+ observer?.disconnect();
+ resizeObserver?.disconnect();
+ points = [];
+ ids.clear();
+ };
+ const fail = (code: AVMapErrorCode) => {
+ if (!destroyed) {
+ destroy();
+ options.onError(code);
+ }
+ };
+ const postPoints = () => {
+ if (revision >= 0) {
+ send({...envelope(), type: "setPoints", points, revision});
+ }
+ };
+ const onReply = (_event: unknown, value: unknown) => {
+ if (destroyed) {
+ return;
+ }
+ const reply = parseAVMapReply(value, instanceID);
+ if (reply?.type === "ready" && !ready) {
+ ready = true;
+ scope.clearTimeout(timeout);
+ postPoints();
+ send({...envelope(), type: "theme", theme});
+ if (pendingFit) {
+ send({...envelope(), type: "fit"});
+ pendingFit = false;
+ }
+ options.onReady?.();
+ } else if (reply?.type === "markerClick" && ready && reply.revision === revision && ids.has(reply.id)) {
+ options.onMarkerClick(reply.id, reply.revision);
+ } else if (reply?.type === "error") {
+ fail(reply.code);
+ }
+ };
+ const host: AVMapHost = {
+ setPoints: (input, nextRevision) => {
+ if (!destroyed && isAVMapRevision(nextRevision) && nextRevision > revision) {
+ revision = nextRevision;
+ points = sanitizeAVMapPoints(input, options.provider);
+ ids = new Set(points.map((point) => point.id));
+ postPoints();
+ }
+ },
+ fit: () => {
+ if (!destroyed) {
+ if (ready) { send({...envelope(), type: "fit"}); } else { pendingFit = true; }
+ }
+ },
+ resize: invalidate,
+ setTheme: (nextTheme) => {
+ if (!destroyed && isAVMapTheme(nextTheme)) {
+ theme = nextTheme;
+ send({...envelope(), type: "theme", theme});
+ }
+ },
+ destroy,
+ };
+ if (!scope || !ipc) {
+ queueMicrotask(() => fail("unsupportedEnvironment"));
+ return host;
+ }
+ if (!isAVMapProvider(options.provider) || !isAVMapTheme(options.theme)) {
+ queueMicrotask(() => fail("invalidConfiguration"));
+ return host;
+ }
+ const start = async () => {
+ const bytes = new Uint8Array(24);
+ scope.crypto.getRandomValues(bytes);
+ instanceID = Array.from(bytes, (value) => value.toString(16).padStart(2, "0")).join("");
+ ipc.on("siyuan-map-reply", onReply);
+ scope.addEventListener("pagehide", destroy, {once: true});
+ timeout = scope.setTimeout(() => fail("hostUnavailable"), 30000);
+ const reply = await ipc.invoke("siyuan-map-create", {...envelope(), provider: options.provider,
+ credentials: sanitizeAVMapCredentials(options.credentials, options.provider), theme});
+ // Creation can finish after disposal. Tell main again, even if the first destroy arrived too early.
+ if (destroyed) {
+ ipc.send("siyuan-map-destroy", envelope());
+ return;
+ }
+ if (reply?.version !== AV_MAP_PROTOCOL_VERSION || reply.instanceID !== instanceID || reply.error) {
+ fail(reply?.error === "unsupportedEnvironment" ? "unsupportedEnvironment" : "hostUnavailable");
+ return;
+ }
+ created = true;
+ scope.addEventListener("scroll", invalidate, true);
+ scope.addEventListener("resize", invalidate);
+ // BrowserWindow focus is enforced in main. DOM blur also fires when the map view gains focus.
+ scope.addEventListener("focus", invalidate);
+ container.ownerDocument.addEventListener("visibilitychange", invalidate);
+ observer = new MutationObserver(invalidate);
+ observer.observe(container.ownerDocument.documentElement, {childList: true, subtree: true,
+ attributes: true, attributeFilter: ["class", "style", "hidden", "open"]});
+ resizeObserver = new ResizeObserver(invalidate);
+ resizeObserver.observe(container);
+ tick();
+ };
+ void start().catch(() => fail("hostUnavailable"));
+ return host;
+};
diff --git a/app/src/protyle/render/av/map/host.test.ts b/app/src/protyle/render/av/map/host.test.ts
new file mode 100644
index 0000000000..9ca5b8c359
--- /dev/null
+++ b/app/src/protyle/render/av/map/host.test.ts
@@ -0,0 +1,141 @@
+import * as assert from "node:assert/strict";
+import {webcrypto} from "node:crypto";
+import {afterEach, describe, it} from "node:test";
+import {createAVMapHost, isAVMapHostEnvironmentSupported} from "./host";
+import {isAVMapRuntimeIsolated} from "./hostRuntime";
+
+describe("map host boundary", () => {
+ const cleanups: Array<() => void> = [];
+ afterEach(() => { cleanups.splice(0).reverse().forEach((cleanup) => cleanup()); });
+ it("fails closed for Electron and unguarded native bridges but does not require credentialless", async () => {
+ const browser = {location: {protocol: "http:"}, navigator: {userAgent: "Chromium"},
+ HTMLIFrameElement: {prototype: {credentialless: false}}};
+ assert.equal(await isAVMapHostEnvironmentSupported(browser as unknown as Window), true);
+ for (const unsafe of [{require() {}}, {process: {}}, {webkit: {messageHandlers: {}}}, {JSAndroid: {}},
+ {Android: {}}, {Harmony: {}}, {JSHarmony: {}}, {location: {protocol: "file:"}}, {navigator: {userAgent: "Electron/44"}},
+ {HTMLIFrameElement: undefined as unknown}]) {
+ assert.equal(await isAVMapHostEnvironmentSupported({...browser, ...unsafe,
+ setTimeout, clearTimeout} as unknown as Window), false);
+ }
+ assert.equal(await isAVMapHostEnvironmentSupported({...browser,
+ HTMLIFrameElement: {prototype: {}}} as unknown as Window), true);
+ assert.equal(isAVMapRuntimeIsolated({parent: {document: {}}} as Window), false);
+ const isolated = {origin: "null", credentialless: true,
+ parent: Object.defineProperty({}, "document", {get() { throw new Error("sandbox"); }})};
+ assert.equal(isAVMapRuntimeIsolated(isolated as unknown as Window), true);
+ assert.equal(isAVMapRuntimeIsolated({...isolated, require() {}} as unknown as Window), false);
+ assert.equal(isAVMapRuntimeIsolated({...isolated, JSAndroid: {}} as unknown as Window), false);
+ assert.equal(isAVMapRuntimeIsolated({...isolated, JSHarmony: {}} as unknown as Window), false);
+ assert.equal(isAVMapRuntimeIsolated({...isolated, origin: "https://app.invalid"} as unknown as Window), false);
+ assert.equal(isAVMapRuntimeIsolated({...isolated, credentialless: false} as unknown as Window), true);
+ assert.equal(isAVMapRuntimeIsolated({...isolated, credentialless: undefined} as unknown as Window), true);
+ assert.equal(isAVMapRuntimeIsolated({...isolated, JSHarmony: {}} as unknown as Window, true), true);
+ });
+ it("binds one exact wrapper and nonce, waits for locked bootstrap, and discards stale replies", async () => {
+ const channels: any[] = [];
+ const original = globalThis.MessageChannel;
+ class Port {
+ onmessage: (event: {data: unknown}) => void;
+ messages: any[] = [];
+ closed = false;
+ postMessage(data: unknown) { this.messages.push(data); }
+ start() {}
+ close() { this.closed = true; }
+ }
+ globalThis.MessageChannel = class {
+ port1 = new Port();
+ port2 = new Port();
+ constructor() { channels.push(this); }
+ } as any;
+ cleanups.push(() => { globalThis.MessageChannel = original; });
+ const attributes: Record<string, string> = {};
+ const listeners = new Map<string, (event?: unknown) => void>();
+ const transfers: any[] = [];
+ const iframe = {
+ src: "", style: {}, removed: false, credentialless: false,
+ contentWindow: {postMessage: (...args: any[]) => transfers.push(args)},
+ setAttribute: (name: string, value: string) => { attributes[name] = value; },
+ addEventListener() {}, remove() { iframe.removed = true; },
+ };
+ const scope = {
+ location: {protocol: "https:", origin: "https://fixture.invalid"}, navigator: {userAgent: "Chromium"}, crypto: webcrypto,
+ HTMLIFrameElement: {prototype: {credentialless: false}},
+ clearTimeout() {}, setTimeout() { return 1; },
+ addEventListener: (name: string, listener: (event?: unknown) => void) => listeners.set(name, listener),
+ removeEventListener: (name: string) => listeners.delete(name),
+ };
+ const container = {ownerDocument: {defaultView: scope, createElement: () => iframe}, appendChild() {}};
+ let ready = 0;
+ const clicked: any[] = [];
+ const host = createAVMapHost(container as unknown as HTMLElement, {
+ provider: "openfreemap", theme: "light", credentials: {apiKey: "fixture-key", token: "secret"} as any,
+ onReady: () => ready++, onMarkerClick: (...args) => clicked.push(args), onError: () => assert.fail("unexpected error"),
+ });
+ cleanups.push(host.destroy);
+ await new Promise<void>((resolve) => setImmediate(resolve));
+ assert.equal(attributes.sandbox, "allow-scripts allow-same-origin");
+ assert.equal(iframe.credentialless, true);
+ assert.equal(iframe.src.split("#")[0], "/stage/map/wrapper.html?provider=openfreemap");
+ const [instanceID, nonce] = iframe.src.split("#")[1].split(":");
+ const onMessage = listeners.get("message");
+ const handshake = {source: iframe.contentWindow, origin: scope.location.origin, ports: [] as unknown[],
+ data: {version: 1, type: "wrapperHello", instanceID, nonce}};
+ const point = {id: "row-1", longitude: 0, latitude: 0, coordinateSystem: "wgs84" as const};
+ host.setPoints([{...point, title: "private"} as any], 1);
+ host.fit();
+ onMessage({...handshake, source: {}});
+ onMessage({...handshake, origin: "https://attacker.invalid"});
+ onMessage({...handshake, data: {...handshake.data, nonce: "old"}});
+ assert.equal(channels.length, 0);
+ onMessage({...handshake, data: {...handshake.data, type: "bootstrapReady"}});
+ assert.equal(channels.length, 0);
+ onMessage(handshake);
+ assert.equal(channels.length, 0);
+ assert.deepEqual(transfers[0][0], {version: 1, instanceID, nonce, type: "prepare", nativeBoundary: false});
+ onMessage({...handshake, data: {...handshake.data, type: "bootstrapReady"}});
+ assert.equal(channels.length, 1);
+ assert.equal(listeners.has("message"), false);
+ onMessage(handshake);
+ assert.equal(channels.length, 1);
+ assert.equal(transfers.length, 2);
+ const port = channels[0].port1 as Port;
+ assert.deepEqual(port.messages[0], {version: 1, instanceID, type: "init", provider: "openfreemap",
+ credentials: {}, theme: "light"});
+ const reply = (data: Record<string, unknown>) => port.onmessage({data: {version: 1, instanceID, ...data}});
+ reply({type: "ready", instanceID: "old"});
+ assert.equal(ready, 0);
+ reply({type: "ready"});
+ reply({type: "ready"});
+ assert.equal(ready, 1);
+ assert.deepEqual(port.messages.find((message) => message.type === "setPoints").points, [point]);
+ assert.equal(port.messages.filter((message) => message.type === "fit").length, 1);
+ reply({type: "markerClick", id: "row-1", revision: 0});
+ reply({type: "markerClick", id: "missing", revision: 1});
+ reply({type: "markerClick", id: "row-1", revision: 1});
+ assert.deepEqual(clicked, [["row-1", 1]]);
+ host.setPoints([], 2);
+ reply({type: "markerClick", id: "row-1", revision: 1});
+ reply({type: "markerClick", id: "row-1", revision: 2});
+ assert.equal(clicked.length, 1);
+ const lateReply = port.onmessage;
+ host.destroy();
+ assert.equal(iframe.removed, true);
+ assert.equal(port.closed, true);
+ lateReply({data: {version: 1, instanceID, type: "markerClick", id: "row-1", revision: 2}});
+ assert.equal(clicked.length, 1);
+ });
+ it("does not create a frame after destruction while an asynchronous native report is pending", async () => {
+ let finish: (value: unknown) => void;
+ const scope = {location: {protocol: "http:"}, navigator: {userAgent: "SiYuanAndroid"}, JSAndroid: {},
+ HTMLIFrameElement: {prototype: {}}, setTimeout, clearTimeout, removeEventListener() {},
+ getAVMapNativeBoundary: () => new Promise((resolve) => { finish = resolve; })};
+ const container = {ownerDocument: {defaultView: scope,
+ createElement: () => assert.fail("late native response must not create an iframe")}};
+ const host = createAVMapHost(container as unknown as HTMLElement, {provider: "openfreemap", theme: "light",
+ onMarkerClick() {}, onError: () => assert.fail("destroyed host must not emit errors")});
+ await Promise.resolve();
+ host.destroy();
+ finish({version: 1, enabled: true});
+ await new Promise<void>((resolve) => setImmediate(resolve));
+ });
+});
diff --git a/app/src/protyle/render/av/map/host.ts b/app/src/protyle/render/av/map/host.ts
new file mode 100644
index 0000000000..8b5d7cdc50
--- /dev/null
+++ b/app/src/protyle/render/av/map/host.ts
@@ -0,0 +1,214 @@
+import {
+ AV_MAP_PROTOCOL_VERSION, AVMapCommand, AVMapCredentials, AVMapErrorCode, AVMapPoint, AVMapProvider, AVMapTheme,
+ isAVMapProvider, isAVMapRevision, isAVMapTheme, parseAVMapReply,
+ sanitizeAVMapCredentials, sanitizeAVMapPoints,
+} from "./protocol";
+import {getAVMapHostCapabilities, isAVMapBootstrapMessage} from "./hostCapabilities";
+
+export interface AVMapHostOptions {
+ provider: AVMapProvider;
+ credentials?: AVMapCredentials;
+ theme: AVMapTheme;
+ title?: string;
+ onReady?: () => void;
+ onMarkerClick: (id: string, revision: number) => void;
+ onError: (code: AVMapErrorCode) => void;
+}
+
+export interface AVMapHost {
+ setPoints: (points: AVMapPoint[], revision: number) => void;
+ fit: () => void;
+ resize: () => void;
+ setTheme: (theme: AVMapTheme) => void;
+ destroy: () => void;
+}
+
+export const isAVMapHostEnvironmentSupported = async (scope: Window = window): Promise<boolean> =>
+ (await getAVMapHostCapabilities(scope)).supported;
+
+const randomID = (scope: Window): string => {
+ const bytes = new Uint8Array(24);
+ scope.crypto.getRandomValues(bytes);
+ return Array.from(bytes, (value) => value.toString(16).padStart(2, "0")).join("");
+};
+
+export const createAVMapHost = (container: HTMLElement, options: AVMapHostOptions): AVMapHost => {
+ const scope = container.ownerDocument.defaultView;
+ let destroyed = false;
+ let ready = false;
+ let port: MessagePort;
+ let iframe: HTMLIFrameElement;
+ let timeout: number;
+ let observer: ResizeObserver;
+ let revision = -1;
+ let points: AVMapPoint[] = [];
+ let ids = new Set<string>();
+ let theme = options.theme;
+ let pendingFit = false;
+ let instanceID = "";
+ let nonce = "";
+ let nativeBoundary = false;
+ let preparing = false;
+
+ const send = (command: AVMapCommand) => {
+ if (!destroyed && port) {
+ port.postMessage(command);
+ }
+ };
+ const envelope = () => ({version: AV_MAP_PROTOCOL_VERSION, instanceID} as const);
+ const destroy = () => {
+ if (destroyed) {
+ return;
+ }
+ send({...envelope(), type: "destroy"});
+ destroyed = true;
+ ready = false;
+ scope?.clearTimeout(timeout);
+ scope?.removeEventListener("message", onMessage);
+ scope?.removeEventListener("pagehide", destroy);
+ observer?.disconnect();
+ if (port) {
+ port.onmessage = null;
+ port.close();
+ }
+ iframe?.remove();
+ points = [];
+ ids.clear();
+ };
+ const fail = (code: AVMapErrorCode) => {
+ if (destroyed) {
+ return;
+ }
+ destroy();
+ options.onError(code);
+ };
+ const postPoints = () => {
+ if (ready && revision >= 0) {
+ send({...envelope(), type: "setPoints", points, revision});
+ }
+ };
+ const onMessage = (event: MessageEvent) => {
+ if (destroyed || port || event.source !== iframe?.contentWindow || event.origin !== scope.location.origin ||
+ event.ports.length !== 0) {
+ return;
+ }
+ if (!preparing && isAVMapBootstrapMessage(event.data, "wrapperHello", instanceID, nonce)) {
+ preparing = true;
+ iframe.contentWindow.postMessage({...envelope(), type: "prepare", nonce, nativeBoundary}, scope.location.origin);
+ return;
+ }
+ if (preparing && isAVMapBootstrapMessage(event.data, "bootstrapError", instanceID, nonce)) {
+ fail("hostUnavailable");
+ return;
+ }
+ if (!preparing || !isAVMapBootstrapMessage(event.data, "bootstrapReady", instanceID, nonce)) {
+ return;
+ }
+ scope.removeEventListener("message", onMessage);
+ const channel = new MessageChannel();
+ port = channel.port1;
+ port.onmessage = (replyEvent) => {
+ if (destroyed) {
+ return;
+ }
+ const reply = parseAVMapReply(replyEvent.data, instanceID);
+ if (reply?.type === "ready" && !ready) {
+ ready = true;
+ scope.clearTimeout(timeout);
+ postPoints();
+ send({...envelope(), type: "theme", theme});
+ if (pendingFit) {
+ send({...envelope(), type: "fit"});
+ pendingFit = false;
+ }
+ options.onReady?.();
+ } else if (reply?.type === "markerClick" && ready && reply.revision === revision && ids.has(reply.id)) {
+ options.onMarkerClick(reply.id, reply.revision);
+ } else if (reply?.type === "error") {
+ fail(reply.code);
+ }
+ };
+ port.start();
+ iframe.contentWindow.postMessage({...envelope(), type: "connect", nonce}, scope.location.origin, [channel.port2]);
+ // 端口建立后清除全局监听;外部 SDK 加载期间不再接受窗口消息。
+ send({...envelope(), type: "init", provider: options.provider,
+ credentials: sanitizeAVMapCredentials(options.credentials, options.provider), theme});
+ };
+
+ const host: AVMapHost = {
+ setPoints: (input, nextRevision) => {
+ if (destroyed || !isAVMapRevision(nextRevision) || nextRevision <= revision) {
+ return;
+ }
+ revision = nextRevision;
+ points = sanitizeAVMapPoints(input, options.provider);
+ ids = new Set(points.map((point) => point.id));
+ postPoints();
+ },
+ fit: () => {
+ if (ready) {
+ send({...envelope(), type: "fit"});
+ } else {
+ pendingFit = true;
+ }
+ },
+ resize: () => {
+ if (ready) {
+ send({...envelope(), type: "resize"});
+ }
+ },
+ setTheme: (nextTheme) => {
+ if (!isAVMapTheme(nextTheme)) {
+ return;
+ }
+ theme = nextTheme;
+ if (ready) {
+ send({...envelope(), type: "theme", theme});
+ }
+ },
+ destroy,
+ };
+ if (!scope) {
+ queueMicrotask(() => fail("unsupportedEnvironment"));
+ return host;
+ }
+ if (!isAVMapProvider(options.provider) || !isAVMapTheme(options.theme)) {
+ queueMicrotask(() => fail("invalidConfiguration"));
+ return host;
+ }
+ const start = async () => {
+ const capabilities = await getAVMapHostCapabilities(scope);
+ if (destroyed) {
+ return;
+ }
+ if (!capabilities.supported) {
+ fail("unsupportedEnvironment");
+ return;
+ }
+ nativeBoundary = capabilities.nativeBoundary;
+ instanceID = randomID(scope);
+ nonce = randomID(scope);
+ iframe = container.ownerDocument.createElement("iframe");
+ if (capabilities.credentialless) {
+ (iframe as HTMLIFrameElement & {credentialless: boolean}).credentialless = true;
+ }
+ // 此层只包含固定的可信本地代码;加载 SDK 的内层绝不获得 allow-same-origin。
+ iframe.setAttribute("sandbox", "allow-scripts allow-same-origin");
+ iframe.setAttribute("allow", "geolocation 'none'; camera 'none'; microphone 'none'; clipboard-read 'none'; clipboard-write 'none'");
+ iframe.referrerPolicy = "no-referrer";
+ iframe.title = options.title || "";
+ iframe.style.cssText = "width:100%;height:100%;border:0;display:block";
+ iframe.src = `/stage/map/wrapper.html?provider=${options.provider}#${instanceID}:${nonce}`;
+ iframe.addEventListener("error", () => fail("hostUnavailable"), {once: true});
+ scope.addEventListener("message", onMessage);
+ scope.addEventListener("pagehide", destroy, {once: true});
+ timeout = scope.setTimeout(() => fail("hostUnavailable"), 30000);
+ container.appendChild(iframe);
+ if (typeof ResizeObserver !== "undefined") {
+ observer = new ResizeObserver(host.resize);
+ observer.observe(container);
+ }
+ };
+ void start().catch(() => fail("hostUnavailable"));
+ return host;
+};
diff --git a/app/src/protyle/render/av/map/hostCapabilities.test.ts b/app/src/protyle/render/av/map/hostCapabilities.test.ts
new file mode 100644
index 0000000000..7c1f7e1b74
--- /dev/null
+++ b/app/src/protyle/render/av/map/hostCapabilities.test.ts
@@ -0,0 +1,43 @@
+import * as assert from "node:assert/strict";
+import {describe, it} from "node:test";
+import {getAVMapHostCapabilities} from "./hostCapabilities";
+
+const browser = () => ({location: {protocol: "https:"}, navigator: {userAgent: "WebKit"},
+ HTMLIFrameElement: {prototype: {}}, setTimeout, clearTimeout});
+
+describe("shared map host capabilities", () => {
+ it("supports a plain HTTP browser without requiring credentialless", async () => {
+ assert.deepEqual(await getAVMapHostCapabilities(browser() as unknown as Window),
+ {supported: true, nativeBoundary: false, credentialless: false});
+ });
+ it("requires an exact successful native boundary report and accepts asynchronous Android replies", async () => {
+ for (const report of [undefined, {enabled: true}, {version: 2, enabled: true}, {version: 1, enabled: false}, true]) {
+ const scope = {...browser(), JSAndroid: {}, getAVMapNativeBoundary: async () => report};
+ assert.equal((await getAVMapHostCapabilities(scope as unknown as Window)).supported, false);
+ }
+ const scope = {...browser(), JSAndroid: {}, getAVMapNativeBoundary: async () => ({version: 1, enabled: true})};
+ assert.deepEqual(await getAVMapHostCapabilities(scope as unknown as Window),
+ {supported: true, nativeBoundary: true, credentialless: false});
+ });
+ it("uses only the dedicated iOS capability receiver and fails closed on rejection", async () => {
+ let calls = 0;
+ const receiver = {postMessage: async (input: unknown) => {
+ assert.equal(input, null);
+ calls++;
+ return {version: 1, enabled: true};
+ }};
+ const scope = {...browser(), webkit: {messageHandlers: {getAVMapNativeBoundary: receiver}}};
+ assert.equal((await getAVMapHostCapabilities(scope as unknown as Window)).nativeBoundary, true);
+ assert.equal(calls, 1);
+ receiver.postMessage = async () => { throw new Error("untrusted frame"); };
+ assert.equal((await getAVMapHostCapabilities(scope as unknown as Window)).supported, false);
+ });
+ it("does not let a reported native capability override Electron, Node or file restrictions", async () => {
+ for (const override of [{process: {}}, {require() {}}, {navigator: {userAgent: "Electron/44"}},
+ {location: {protocol: "file:"}}]) {
+ const scope = {...browser(), JSAndroid: {}, ...override,
+ getAVMapNativeBoundary: () => assert.fail("must not call native capability")};
+ assert.equal((await getAVMapHostCapabilities(scope as unknown as Window)).supported, false);
+ }
+ });
+});
diff --git a/app/src/protyle/render/av/map/hostCapabilities.ts b/app/src/protyle/render/av/map/hostCapabilities.ts
new file mode 100644
index 0000000000..e5ad476608
--- /dev/null
+++ b/app/src/protyle/render/av/map/hostCapabilities.ts
@@ -0,0 +1,44 @@
+export interface AVMapHostCapabilities {
+ supported: boolean;
+ nativeBoundary: boolean;
+ credentialless: boolean;
+}
+
+// 此报告仅代表壳已经安装桥接和导航防护,不代表 Cookie、网络或 DOM 隔离。
+export const getAVMapHostCapabilities = async (scope: Window): Promise<AVMapHostCapabilities> => {
+ const environment = scope as unknown as Record<string, any>;
+ const credentialless = !!environment.HTMLIFrameElement &&
+ "credentialless" in environment.HTMLIFrameElement.prototype;
+ const unsupported = {supported: false, nativeBoundary: false, credentialless};
+ if (!/^https?:$/.test(scope.location.protocol) || environment.require || environment.process ||
+ /Electron/i.test(scope.navigator.userAgent) || !environment.HTMLIFrameElement) {
+ return unsupported;
+ }
+ const native = !!(environment.webkit?.messageHandlers || environment.Android || environment.JSAndroid ||
+ environment.Harmony || environment.JSHarmony || /SiYuan\/|SiYuanAndroid|SiYuanIOS|SiYuanHarmony/i.test(scope.navigator.userAgent));
+ if (!native) {
+ return {supported: true, nativeBoundary: false, credentialless};
+ }
+ let timer: number;
+ try {
+ // 原生壳只在可信主文档安装该只读方法;不能用 URL 参数或可见桥名称替代。
+ const read = () => typeof environment.getAVMapNativeBoundary === "function" ?
+ environment.getAVMapNativeBoundary() :
+ environment.webkit?.messageHandlers?.getAVMapNativeBoundary?.postMessage(null);
+ const report = await Promise.race([Promise.resolve().then(read), new Promise<undefined>((resolve) => {
+ timer = scope.setTimeout(() => resolve(undefined), 3000);
+ })]);
+ return {supported: report?.version === 1 && report.enabled === true,
+ nativeBoundary: report?.version === 1 && report.enabled === true, credentialless};
+ } catch (_error) {
+ return unsupported;
+ } finally {
+ scope.clearTimeout(timer);
+ }
+};
+
+export const isAVMapBootstrapMessage = (value: unknown, type: string, instanceID: string, nonce: string): boolean => {
+ const input = value as Record<string, unknown>;
+ return !!input && typeof input === "object" && input.version === 1 && input.type === type &&
+ input.instanceID === instanceID && input.nonce === nonce;
+};
diff --git a/app/src/protyle/render/av/map/hostEntry.ts b/app/src/protyle/render/av/map/hostEntry.ts
new file mode 100644
index 0000000000..bac729f126
--- /dev/null
+++ b/app/src/protyle/render/av/map/hostEntry.ts
@@ -0,0 +1,3 @@
+import {connectAVMapRuntime} from "./hostRuntime";
+
+connectAVMapRuntime(window);
diff --git a/app/src/protyle/render/av/map/hostRuntime.test.ts b/app/src/protyle/render/av/map/hostRuntime.test.ts
new file mode 100644
index 0000000000..dbf8ec5c83
--- /dev/null
+++ b/app/src/protyle/render/av/map/hostRuntime.test.ts
@@ -0,0 +1,174 @@
+import * as assert from "node:assert/strict";
+import {describe, it} from "node:test";
+import {connectAVMapRuntime, startAVMapRuntime} from "./hostRuntime";
+import {AVMapAdapter, AVMapAdapterCallbacks} from "./providers";
+
+const tick = () => new Promise<void>((resolve) => setImmediate(resolve));
+const fixture = () => {
+ const replies: any[] = [];
+ const calls: Array<[string, ...any[]]> = [];
+ const port = {onmessage: null as any, postMessage: (data: unknown) => replies.push(data),
+ start() {}, close: () => calls.push(["close"])};
+ const adapter: AVMapAdapter = {
+ setPoints: (...args) => { calls.push(["setPoints", ...args]); },
+ fit: () => { calls.push(["fit"]); }, resize: () => { calls.push(["resize"]); },
+ setTheme: (...args) => { calls.push(["theme", ...args]); }, destroy: () => { calls.push(["destroy"]); },
+ };
+ const send = (data: Record<string, unknown>) => port.onmessage?.({data: {version: 1, instanceID: "one", ...data}});
+ return {replies, calls, port, adapter, send};
+};
+
+describe("isolated map runtime lifecycle", () => {
+ it("rejects duplicate init, other providers, old revisions and nonmember marker clicks", async () => {
+ const {port, adapter, replies, calls, send} = fixture();
+ let callbacks: AVMapAdapterCallbacks;
+ let starts = 0;
+ const stop = startAVMapRuntime(port as unknown as MessagePort, "one", "openfreemap", {} as HTMLElement,
+ async (_init, _container, value) => { starts++; callbacks = value; return adapter; });
+ await send({type: "init", provider: "amap", credentials: {}, theme: "light"});
+ assert.equal(starts, 0);
+ await send({type: "init", provider: "openfreemap", credentials: {}, theme: "light"});
+ await send({type: "init", provider: "openfreemap", credentials: {}, theme: "dark"});
+ assert.equal(starts, 1);
+ assert.deepEqual(replies, [{version: 1, instanceID: "one", type: "ready"}]);
+ const point = {id: "row-1", longitude: 0, latitude: 0, coordinateSystem: "wgs84"};
+ await send({type: "setPoints", revision: 2, points: [{...point, title: "private"},
+ {...point, id: "invalid", coordinateSystem: "unknown"}]});
+ assert.deepEqual(calls.find((call) => call[0] === "setPoints"), ["setPoints", [point], 2]);
+ assert.equal(calls.filter((call) => call[0] === "fit").length, 1);
+ await send({type: "setPoints", revision: 1, points: []});
+ await send({type: "setPoints", revision: 2, points: []});
+ await send({type: "setPoints", instanceID: "old", revision: 3, points: []});
+ callbacks.onMarkerClick("row-1", 1);
+ callbacks.onMarkerClick("not-present", 2);
+ callbacks.onMarkerClick("row-1", 2);
+ assert.equal(replies.length, 2);
+ assert.deepEqual(replies[1], {version: 1, instanceID: "one", type: "markerClick", id: "row-1", revision: 2});
+ await send({type: "setPoints", revision: 3, points: []});
+ assert.equal(calls.filter((call) => call[0] === "fit").length, 1);
+ callbacks.onMarkerClick("row-1", 2);
+ callbacks.onMarkerClick("row-1", 3);
+ assert.equal(replies.length, 2);
+ stop();
+ callbacks.onMarkerClick("row-1", 3);
+ callbacks.onError("mapUnavailable");
+ stop();
+ assert.equal(calls.filter((call) => call[0] === "destroy").length, 1);
+ assert.equal(replies.length, 2);
+ });
+ it("destroys a provider that finishes loading after teardown", async () => {
+ const {port, adapter, replies, calls, send} = fixture();
+ let finish: (value: AVMapAdapter) => void;
+ let signal: AbortSignal;
+ startAVMapRuntime(port as unknown as MessagePort, "one", "openfreemap", {} as HTMLElement,
+ async (_init, _container, _callbacks, value) => {
+ signal = value;
+ return new Promise<AVMapAdapter>((resolve) => { finish = resolve; });
+ });
+ const pending = send({type: "init", provider: "openfreemap", credentials: {}, theme: "light"});
+ await send({type: "destroy"});
+ assert.equal(signal.aborted, true);
+ finish(adapter);
+ await pending;
+ await tick();
+ assert.equal(replies.length, 0);
+ assert.equal(calls.filter((call) => call[0] === "destroy").length, 1);
+ });
+ it("does not initialize a key-backed provider without its required credentials", async () => {
+ for (const provider of ["amap", "tencent", "baidu"] as const) {
+ const {port, replies, send} = fixture();
+ startAVMapRuntime(port as unknown as MessagePort, "one", provider, {} as HTMLElement,
+ async () => assert.fail("must not load an SDK"));
+ await send({type: "init", provider, credentials: {}, theme: "light"});
+ assert.deepEqual(replies, [{version: 1, instanceID: "one", type: "error", code: "missingCredentials"}]);
+ }
+ });
+ it("returns only a stable code when SDK loading fails with a secret-bearing exception", async () => {
+ const {port, replies, send} = fixture();
+ startAVMapRuntime(port as unknown as MessagePort, "one", "openfreemap", {} as HTMLElement,
+ async () => { throw new Error("https://sdk.invalid?key=secret"); });
+ await send({type: "init", provider: "openfreemap", credentials: {}, theme: "light"});
+ assert.deepEqual(replies, [{version: 1, instanceID: "one", type: "error", code: "sdkUnavailable"}]);
+ });
+});
+
+describe("isolated map bootstrap ordering", () => {
+ const bootstrapFixture = (desktop = false, native = false) => {
+ const instanceID = "a".repeat(48);
+ const nonce = "b".repeat(48);
+ const events: any[] = [];
+ const listeners = new Map<string, (event?: any) => void>();
+ const parent = Object.defineProperty({postMessage: (message: unknown) => events.push(message)},
+ "document", {get() { throw new Error("opaque sandbox"); }});
+ const scope: any = {
+ origin: "null", location: {hash: `#${instanceID}:${nonce}`, search: "?provider=amap"},
+ parent, setTimeout, clearTimeout,
+ addEventListener: (name: string, callback: (event?: any) => void) => listeners.set(name, callback),
+ removeEventListener: (name: string) => listeners.delete(name),
+ document: {createElement: (tag: string) => ({tag}),
+ head: {appendChild: (element: any) => events.push({type: "policy", content: element.content})},
+ getElementById: () => ({})},
+ };
+ if (desktop) {
+ scope.parent = scope;
+ scope.siyuanMapDesktop = {version: 1};
+ }
+ if (native) {
+ scope.JSAndroid = {};
+ }
+ const port = {onmessage: null as any, start() {}, close() {}, postMessage: (message: unknown) => events.push(message)};
+ connectAVMapRuntime(scope);
+ const message = (type: string, values: Record<string, unknown> = {}, ports: unknown[] = []) => ({
+ source: desktop ? scope : parent, origin: "https://fixture.invalid", ports,
+ data: {version: 1, instanceID, nonce, type, ...values},
+ });
+ return {scope, events, listeners, port, message};
+ };
+ it("rejects early ports and locks CSP before exposing bootstrap readiness", async () => {
+ const {events, listeners, port, message} = bootstrapFixture();
+ const receive = listeners.get("message");
+ assert.equal(events[0].type, "hello");
+ receive(message("connect", {}, [port]));
+ assert.equal(port.onmessage, null);
+ receive({...message("prepare"), source: {}});
+ assert.equal(events.length, 1);
+ receive(message("prepare"));
+ await tick();
+ assert.deepEqual(events.map((event) => event.type), ["hello", "policy", "bootstrapReady"]);
+ receive(message("connect", {}, [port]));
+ assert.equal(typeof port.onmessage, "function");
+ const handler = port.onmessage;
+ receive(message("connect", {}, [port]));
+ assert.equal(port.onmessage, handler);
+ listeners.get("pagehide")();
+ assert.equal(port.onmessage, null);
+ });
+ it("requires the verified native boundary before permitting preparation in a native frame", async () => {
+ const denied = bootstrapFixture(false, true);
+ denied.listeners.get("message")(denied.message("prepare", {nativeBoundary: false}));
+ await tick();
+ assert.deepEqual(denied.events.map((event) => event.type), ["hello", "bootstrapError"]);
+ const allowed = bootstrapFixture(false, true);
+ allowed.listeners.get("message")(allowed.message("prepare", {nativeBoundary: true}));
+ await tick();
+ assert.deepEqual(allowed.events.map((event) => event.type), ["hello", "policy", "bootstrapReady"]);
+ allowed.listeners.get("pagehide")();
+ });
+ it("accepts a desktop preload port once and returns readiness only after the same CSP lock", async () => {
+ const {events, listeners, port, message} = bootstrapFixture(true);
+ const receive = listeners.get("message");
+ const valid = message("siyuan-map-desktop-connect", {provider: "amap"}, [port]);
+ receive({...valid, source: {}});
+ receive({...valid, data: {...valid.data, provider: "baidu"}});
+ receive({...valid, data: {...valid.data, nonce: "old"}});
+ assert.equal(events.length, 0);
+ receive(valid);
+ receive(valid);
+ await tick();
+ assert.deepEqual(events.map((event) => event.type), ["policy", "bootstrapReady"]);
+ assert.equal(events[1].nonce, undefined);
+ assert.equal(typeof port.onmessage, "function");
+ assert.equal(listeners.has("message"), false);
+ listeners.get("pagehide")();
+ });
+});
diff --git a/app/src/protyle/render/av/map/hostRuntime.ts b/app/src/protyle/render/av/map/hostRuntime.ts
new file mode 100644
index 0000000000..b333519f1b
--- /dev/null
+++ b/app/src/protyle/render/av/map/hostRuntime.ts
@@ -0,0 +1,223 @@
+import {
+ AV_MAP_PROTOCOL_VERSION, AVMapErrorCode, AVMapInit, AVMapReply, isAVMapHandshake, isAVMapProvider, parseAVMapCommand,
+} from "./protocol";
+import {AVMapAdapter, AVMapAdapterCallbacks} from "./providers";
+import {loadAVMapAdapter} from "./providersLoader";
+import {prepareAVMapBootstrap} from "./bootstrap";
+import {isAVMapBootstrapMessage} from "./hostCapabilities";
+
+export type AVMapAdapterFactory = (init: AVMapInit, container: HTMLElement,
+ callbacks: AVMapAdapterCallbacks, signal: AbortSignal) => Promise<AVMapAdapter>;
+
+export const isAVMapRuntimeIsolated = (scope: Window, nativeBoundary = false): boolean => {
+ const environment = scope as unknown as Record<string, any>;
+ if (scope.origin !== "null" || environment.require || environment.process || (!nativeBoundary &&
+ (environment.JSAndroid || environment.Android || environment.JSHarmony || environment.Harmony ||
+ environment.webkit?.messageHandlers))) {
+ return false;
+ }
+ try {
+ // 无法读取父文档是最低运行门槛;桌面关闭 webSecurity 的环境不会获准加载 SDK。
+ void scope.parent.document;
+ return false;
+ } catch (_error) {
+ return true;
+ }
+};
+
+export const startAVMapRuntime = (port: MessagePort, instanceID: string, provider: AVMapInit["provider"],
+ container: HTMLElement, factory: AVMapAdapterFactory = loadAVMapAdapter) => {
+ let destroyed = false;
+ let initializing = false;
+ let adapter: AVMapAdapter;
+ let revision = -1;
+ let initiallyFitted = false;
+ let ids = new Set<string>();
+ const abort = new AbortController();
+ const envelope = {version: AV_MAP_PROTOCOL_VERSION, instanceID} as const;
+ const send = (reply: AVMapReply) => {
+ if (!destroyed) {
+ port.postMessage(reply);
+ }
+ };
+ const destroy = () => {
+ if (destroyed) {
+ return;
+ }
+ destroyed = true;
+ abort.abort();
+ ids.clear();
+ port.onmessage = null;
+ port.close();
+ adapter?.destroy();
+ };
+ const fail = (code: AVMapErrorCode) => {
+ send({...envelope, type: "error", code});
+ destroy();
+ };
+ port.onmessage = async (event) => {
+ if (destroyed) {
+ return;
+ }
+ const command = parseAVMapCommand(event.data, instanceID, provider);
+ if (!command) {
+ return;
+ }
+ if (command.type === "destroy") {
+ destroy();
+ return;
+ }
+ try {
+ if (command.type === "init") {
+ if (initializing || adapter || command.provider !== provider) {
+ return;
+ }
+ initializing = true;
+ if (provider !== "openfreemap" && !command.credentials.apiKey ||
+ provider === "amap" && !command.credentials.securityCode) {
+ fail("missingCredentials");
+ return;
+ }
+ const next = await factory(command, container, {
+ onMarkerClick: (id, clickedRevision) => {
+ if (clickedRevision === revision && ids.has(id)) {
+ send({...envelope, type: "markerClick", id, revision});
+ }
+ },
+ onError: fail,
+ }, abort.signal);
+ if (destroyed) {
+ next.destroy();
+ return;
+ }
+ adapter = next;
+ adapter.setTheme(command.theme);
+ send({...envelope, type: "ready"});
+ } else if (adapter && command.type === "setPoints" && command.revision > revision) {
+ revision = command.revision;
+ ids = new Set(command.points.map((point) => point.id));
+ adapter.setPoints(command.points, revision);
+ if (!initiallyFitted && command.points.length > 0) {
+ adapter.fit();
+ initiallyFitted = true;
+ }
+ } else if (adapter && command.type === "theme") {
+ adapter.setTheme(command.theme);
+ } else if (adapter && command.type === "fit") {
+ adapter.fit();
+ } else if (adapter && command.type === "resize") {
+ adapter.resize();
+ }
+ } catch (_error) {
+ fail(adapter ? "mapUnavailable" : "sdkUnavailable");
+ }
+ };
+ port.start();
+ return destroy;
+};
+
+export const connectAVMapRuntime = (scope: Window) => {
+ const [instanceID, nonce] = scope.location.hash.slice(1).split(":");
+ const provider = new URLSearchParams(scope.location.search).get("provider");
+ if (!/^[a-f0-9]{48}$/.test(instanceID || "") || !/^[a-f0-9]{48}$/.test(nonce || "") ||
+ !isAVMapProvider(provider)) {
+ return;
+ }
+ const environment = scope as unknown as Record<string, any>;
+ const desktop = scope.parent === scope && environment.siyuanMapDesktop?.version === 1 &&
+ !environment.require && !environment.process;
+ // 此检查仅准许等待可信 wrapper 的无秘密 prepare,尚未准许加载 SDK。
+ if (!desktop && (scope.parent === scope || !isAVMapRuntimeIsolated(scope, true))) {
+ return;
+ }
+ let destroy: () => void;
+ let destroyAssets: () => void;
+ let preparing = false;
+ let locked = false;
+ let connected = false;
+ let closed = false;
+ let desktopPort: MessagePort;
+ const abort = new AbortController();
+ const envelope = {version: AV_MAP_PROTOCOL_VERSION, instanceID, nonce};
+ const cleanup = () => {
+ if (closed) {
+ return;
+ }
+ closed = true;
+ abort.abort();
+ scope.removeEventListener("message", onConnect);
+ scope.clearTimeout(timer);
+ destroy?.();
+ desktopPort?.close();
+ destroyAssets?.();
+ };
+ const prepare = async () => {
+ preparing = true;
+ try {
+ const dispose = await prepareAVMapBootstrap(scope, provider, abort.signal);
+ if (closed) {
+ dispose();
+ return;
+ }
+ destroyAssets = dispose;
+ locked = true;
+ if (desktop) {
+ scope.removeEventListener("message", onConnect);
+ scope.clearTimeout(timer);
+ destroy = startAVMapRuntime(desktopPort, instanceID, provider, scope.document.getElementById("map"));
+ desktopPort.postMessage({version: AV_MAP_PROTOCOL_VERSION, type: "bootstrapReady", instanceID});
+ } else {
+ scope.parent.postMessage({...envelope, type: "bootstrapReady"}, "*");
+ }
+ } catch (_error) {
+ if (!closed) {
+ if (desktop) {
+ desktopPort?.postMessage({version: AV_MAP_PROTOCOL_VERSION, type: "error", instanceID, code: "hostUnavailable"});
+ } else {
+ scope.parent.postMessage({...envelope, type: "bootstrapError"}, "*");
+ }
+ }
+ cleanup();
+ }
+ };
+ const onConnect = (event: MessageEvent) => {
+ if (closed || connected) {
+ return;
+ }
+ if (desktop) {
+ if (!preparing && event.source === scope && event.ports.length === 1 && event.data?.provider === provider &&
+ isAVMapBootstrapMessage(event.data, "siyuan-map-desktop-connect", instanceID, nonce)) {
+ desktopPort = event.ports[0];
+ connected = true;
+ void prepare();
+ }
+ return;
+ }
+ if (event.source !== scope.parent) {
+ return;
+ }
+ if (!preparing && event.ports.length === 0 &&
+ isAVMapBootstrapMessage(event.data, "prepare", instanceID, nonce)) {
+ if (!isAVMapRuntimeIsolated(scope, event.data.nativeBoundary === true)) {
+ scope.parent.postMessage({...envelope, type: "bootstrapError"}, "*");
+ cleanup();
+ return;
+ }
+ void prepare();
+ return;
+ }
+ if (!locked || event.ports.length !== 1 || !isAVMapHandshake(event.data, "connect", instanceID, nonce)) {
+ return;
+ }
+ connected = true;
+ scope.removeEventListener("message", onConnect);
+ scope.clearTimeout(timer);
+ destroy = startAVMapRuntime(event.ports[0], instanceID, provider, scope.document.getElementById("map"));
+ };
+ const timer = scope.setTimeout(cleanup, 30000);
+ scope.addEventListener("message", onConnect);
+ scope.addEventListener("pagehide", cleanup, {once: true});
+ if (!desktop) {
+ scope.parent.postMessage({...envelope, type: "hello"}, "*");
+ }
+};
diff --git a/app/src/protyle/render/av/map/protocol.test.ts b/app/src/protyle/render/av/map/protocol.test.ts
new file mode 100644
index 0000000000..7b516fda83
--- /dev/null
+++ b/app/src/protyle/render/av/map/protocol.test.ts
@@ -0,0 +1,94 @@
+import * as assert from "node:assert/strict";
+import {describe, it} from "node:test";
+import {
+ AV_MAP_ATTRIBUTION_LINKS, AV_MAP_MERCATOR_MAX_LATITUDE, AVMapProvider, isAVMapHandshake, isAVMapProjectionSupported,
+ parseAVMapCommand, parseAVMapReply, sanitizeAVMapCredentials, sanitizeAVMapPoints,
+} from "./protocol";
+
+describe("isolated map protocol", () => {
+ const point = {id: "row-1", longitude: 0, latitude: 0, coordinateSystem: "wgs84"};
+ it("keeps attribution destinations in a fixed official allowlist", () => {
+ assert.deepEqual(AV_MAP_ATTRIBUTION_LINKS.openfreemap.map((link) => link.href), [
+ "https://openfreemap.org", "https://www.openmaptiles.org/", "https://www.openstreetmap.org/copyright",
+ ]);
+ assert.deepEqual(Object.keys(AV_MAP_ATTRIBUTION_LINKS), ["openfreemap", "amap", "tencent", "baidu"]);
+ Object.values(AV_MAP_ATTRIBUTION_LINKS).flat().forEach((link) => {
+ assert.equal(new URL(link.href).protocol, "https:");
+ assert.equal(/[<>]/.test(link.label), false);
+ });
+ });
+ it("copies only identifiers and coordinates and drops unknown systems without conversion", () => {
+ const input = {...point, name: "Private place", title: "Private record", document: "secret", token: "secret",
+ originalInput: "sensitive source"};
+ assert.deepEqual(sanitizeAVMapPoints([input], "openfreemap"), [point]);
+ const systems = {openfreemap: ["wgs84"], amap: ["gcj02"], tencent: ["gcj02"], baidu: ["bd09", "gcj02"]};
+ for (const provider of Object.keys(systems) as AVMapProvider[]) {
+ for (const system of ["wgs84", "gcj02", "bd09", "unknown", "", undefined]) {
+ const result = sanitizeAVMapPoints([{...point, coordinateSystem: system}], provider);
+ assert.equal(result.length, systems[provider].includes(system) ? 1 : 0, `${provider}:${system}`);
+ }
+ }
+ });
+ it("accepts zero and coordinate boundaries, rejects malformed numbers, ranges, ids and duplicates", () => {
+ assert.equal(sanitizeAVMapPoints([{...point, longitude: -180, latitude: -AV_MAP_MERCATOR_MAX_LATITUDE}], "openfreemap").length, 1);
+ assert.equal(sanitizeAVMapPoints([{...point, longitude: 180, latitude: AV_MAP_MERCATOR_MAX_LATITUDE}], "openfreemap").length, 1);
+ for (const invalid of [{longitude: 181}, {latitude: -91}, {longitude: NaN}, {latitude: Infinity},
+ {latitude: "0"}, {longitude: null}, {id: ""}, {id: "<script>"}, {id: "x".repeat(129)}]) {
+ assert.deepEqual(sanitizeAVMapPoints([{...point, ...invalid}], "openfreemap"), []);
+ }
+ assert.deepEqual(sanitizeAVMapPoints([point, point, null, 1], "openfreemap"), [point]);
+ });
+ it("preserves polar coordinates but refuses Web Mercator points that would be silently clamped", () => {
+ for (const provider of ["openfreemap", "amap"] as const) {
+ const base = {...point, coordinateSystem: provider === "amap" ? "gcj02" : "wgs84"};
+ for (const latitude of [-90, 90, -85.052, 85.052, -Infinity, Infinity, NaN]) {
+ assert.equal(isAVMapProjectionSupported(provider, latitude), false);
+ const input = {...base, latitude};
+ assert.deepEqual(sanitizeAVMapPoints([input], provider), []);
+ assert.equal(Object.is(input.latitude, latitude), true);
+ }
+ for (const latitude of [0, -AV_MAP_MERCATOR_MAX_LATITUDE, AV_MAP_MERCATOR_MAX_LATITUDE]) {
+ assert.equal(isAVMapProjectionSupported(provider, latitude), true);
+ assert.deepEqual(sanitizeAVMapPoints([{...base, latitude}], provider), [{...base, latitude}]);
+ }
+ }
+ });
+ it("limits credentials to explicit bounded strings", () => {
+ assert.deepEqual(sanitizeAVMapCredentials({apiKey: "fixture-key", securityCode: "fixture-code", token: "private"}),
+ {apiKey: "fixture-key", securityCode: "fixture-code"});
+ assert.deepEqual(sanitizeAVMapCredentials({apiKey: "fixture-key", securityCode: "fixture-code"}, "openfreemap"), {});
+ for (const provider of ["tencent", "baidu"] as const) {
+ assert.deepEqual(sanitizeAVMapCredentials({apiKey: "fixture-key", securityCode: "fixture-code"}, provider),
+ {apiKey: "fixture-key"});
+ }
+ assert.deepEqual(sanitizeAVMapCredentials({apiKey: " fixture-key "}), {apiKey: "fixture-key"});
+ assert.deepEqual(sanitizeAVMapCredentials({apiKey: "x".repeat(4096)}), {apiKey: "x".repeat(4096)});
+ for (const apiKey of ["", "x".repeat(4097), " ", "\n", "\u4e00".repeat(1366), null, 42]) {
+ assert.deepEqual(sanitizeAVMapCredentials({apiKey}), {});
+ }
+ });
+ it("rejects wrong instances, versions, commands and invalid revisions", () => {
+ const input = {version: 1, instanceID: "one", type: "setPoints", revision: 2, points: [point]};
+ assert.deepEqual(parseAVMapCommand(input, "one", "openfreemap"), input);
+ for (const invalid of [{version: 2}, {instanceID: "old"}, {type: "setLocation"}, {revision: -1},
+ {revision: 1.1}, {revision: Infinity}, {revision: Number.MAX_SAFE_INTEGER + 1}, {points: {}}]) {
+ assert.equal(parseAVMapCommand({...input, ...invalid}, "one", "openfreemap"), undefined);
+ }
+ assert.equal(parseAVMapCommand(input, "one"), undefined);
+ });
+ it("does not expose arbitrary SDK errors, URLs, credentials or extra reply fields", () => {
+ const reply = {version: 1, instanceID: "one", type: "error", code: "sdkUnavailable"};
+ assert.deepEqual(parseAVMapReply({...reply, message: "https://sdk.example/?key=secret"}, "one"), reply);
+ assert.equal(parseAVMapReply({...reply, code: "https://sdk.example/?key=secret"}, "one"), undefined);
+ assert.equal(parseAVMapReply({...reply, version: 2}, "one"), undefined);
+ assert.equal(parseAVMapReply({...reply, instanceID: "old"}, "one"), undefined);
+ assert.equal(parseAVMapReply({...reply, type: "updateRow"}, "one"), undefined);
+ });
+ it("requires the exact nonce and instance during its one-time handshake", () => {
+ const handshake = {version: 1, type: "hello", instanceID: "instance", nonce: "nonce"};
+ assert.equal(isAVMapHandshake(handshake, "hello", "instance", "nonce"), true);
+ for (const invalid of [{nonce: "old"}, {instanceID: "other"}, {version: 0}, {type: "connect"}]) {
+ assert.equal(isAVMapHandshake({...handshake, ...invalid}, "hello", "instance", "nonce"), false);
+ }
+ });
+});
diff --git a/app/src/protyle/render/av/map/protocol.ts b/app/src/protyle/render/av/map/protocol.ts
new file mode 100644
index 0000000000..b55f18e879
--- /dev/null
+++ b/app/src/protyle/render/av/map/protocol.ts
@@ -0,0 +1,176 @@
+export const AV_MAP_PROTOCOL_VERSION = 1;
+export const AV_MAP_MAX_POINTS = 10000;
+export const AV_MAP_MERCATOR_MAX_LATITUDE = 85.0511287798066;
+
+export type AVMapProvider = "openfreemap" | "amap" | "tencent" | "baidu";
+export type AVMapTheme = "light" | "dark";
+export type AVMapCoordinateSystem = "wgs84" | "gcj02" | "bd09";
+export type AVMapErrorCode = "unsupportedEnvironment" | "missingCredentials" | "invalidConfiguration" |
+ "hostUnavailable" | "sdkUnavailable" | "mapUnavailable";
+
+// 父页面仅展示固定官方署名链接,不接受隔离框架返回的 URL 或 HTML。
+export const AV_MAP_ATTRIBUTION_LINKS: Readonly<Record<AVMapProvider, ReadonlyArray<{label: string; href: string}>>> = {
+ openfreemap: [
+ {label: "OpenFreeMap", href: "https://openfreemap.org"},
+ {label: "© OpenMapTiles", href: "https://www.openmaptiles.org/"},
+ {label: "© OpenStreetMap", href: "https://www.openstreetmap.org/copyright"},
+ ],
+ amap: [{label: "AMap", href: "https://lbs.amap.com/"}],
+ tencent: [{label: "Tencent Maps", href: "https://lbs.qq.com/"}],
+ baidu: [{label: "Baidu Maps", href: "https://lbs.baidu.com/"}],
+};
+
+export interface AVMapCredentials {
+ apiKey?: string;
+ securityCode?: string;
+}
+
+export interface AVMapPoint {
+ id: string;
+ longitude: number;
+ latitude: number;
+ coordinateSystem: AVMapCoordinateSystem;
+}
+
+interface AVMapEnvelope {
+ version: 1;
+ instanceID: string;
+}
+
+export interface AVMapInit extends AVMapEnvelope {
+ type: "init";
+ provider: AVMapProvider;
+ credentials: AVMapCredentials;
+ theme: AVMapTheme;
+}
+
+export type AVMapCommand = AVMapInit |
+ (AVMapEnvelope & {type: "setPoints"; revision: number; points: AVMapPoint[]}) |
+ (AVMapEnvelope & {type: "theme"; theme: AVMapTheme}) |
+ (AVMapEnvelope & {type: "fit" | "resize" | "destroy"});
+
+export type AVMapReply = (AVMapEnvelope & {type: "ready"}) |
+ (AVMapEnvelope & {type: "markerClick"; id: string; revision: number}) |
+ (AVMapEnvelope & {type: "error"; code: AVMapErrorCode});
+
+export const isAVMapProvider = (value: unknown): value is AVMapProvider =>
+ value === "openfreemap" || value === "amap" || value === "tencent" || value === "baidu";
+
+export const isAVMapTheme = (value: unknown): value is AVMapTheme => value === "light" || value === "dark";
+
+export const isAVMapIdentifier = (value: unknown): value is string =>
+ typeof value === "string" && /^[a-zA-Z0-9_-]{1,128}$/.test(value);
+
+export const isAVMapRevision = (value: unknown): value is number =>
+ typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
+
+export const supportsAVMapCoordinateSystem = (provider: AVMapProvider, system: unknown): boolean => {
+ if (provider === "openfreemap") {
+ return system === "wgs84";
+ }
+ if (provider === "baidu") {
+ return system === "bd09" || system === "gcj02";
+ }
+ return (provider === "amap" || provider === "tencent") && system === "gcj02";
+};
+
+export const isAVMapProjectionSupported = (provider: AVMapProvider, latitude: number): boolean =>
+ Number.isFinite(latitude) && ((provider !== "openfreemap" && provider !== "amap") ||
+ Math.abs(latitude) <= AV_MAP_MERCATOR_MAX_LATITUDE);
+
+// 主界面和隔离宿主分别调用白名单复制,不传输名称、原始输入或完整记录。
+export const sanitizeAVMapPoints = (input: unknown, provider: AVMapProvider): AVMapPoint[] => {
+ if (!Array.isArray(input)) {
+ return [];
+ }
+ const ids = new Set<string>();
+ const result: AVMapPoint[] = [];
+ input.slice(0, AV_MAP_MAX_POINTS).forEach((point) => {
+ if (!point || typeof point !== "object" || !isAVMapIdentifier(point.id) || ids.has(point.id) ||
+ typeof point.longitude !== "number" || !Number.isFinite(point.longitude) ||
+ point.longitude < -180 || point.longitude > 180 ||
+ typeof point.latitude !== "number" || !Number.isFinite(point.latitude) ||
+ point.latitude < -90 || point.latitude > 90 ||
+ !isAVMapProjectionSupported(provider, point.latitude) ||
+ !supportsAVMapCoordinateSystem(provider, point.coordinateSystem)) {
+ return;
+ }
+ ids.add(point.id);
+ result.push({id: point.id, longitude: point.longitude, latitude: point.latitude,
+ coordinateSystem: point.coordinateSystem});
+ });
+ return result;
+};
+
+const asRecord = (value: unknown): Record<string, unknown> | undefined =>
+ value && typeof value === "object" && !Array.isArray(value) ? value as Record<string, unknown> : undefined;
+
+export const sanitizeAVMapCredentials = (value: unknown, provider?: AVMapProvider): AVMapCredentials => {
+ const input = asRecord(value);
+ const result: AVMapCredentials = {};
+ if (provider === "openfreemap") {
+ return result;
+ }
+ for (const key of ["apiKey", "securityCode"] as const) {
+ if (key === "securityCode" && provider && provider !== "amap") {
+ continue;
+ }
+ const text = typeof input?.[key] === "string" ? (input[key] as string).trim() : "";
+ if (text.length > 0 && new TextEncoder().encode(text).length <= 4096) {
+ result[key] = text;
+ }
+ }
+ return result;
+};
+
+export const parseAVMapCommand = (value: unknown, instanceID: string, provider?: AVMapProvider): AVMapCommand | undefined => {
+ const input = asRecord(value);
+ if (!input || input.version !== AV_MAP_PROTOCOL_VERSION || input.instanceID !== instanceID) {
+ return;
+ }
+ const envelope = {version: AV_MAP_PROTOCOL_VERSION, instanceID} as const;
+ switch (input.type) {
+ case "init":
+ if (!isAVMapProvider(input.provider) || !isAVMapTheme(input.theme)) {
+ return;
+ }
+ return {...envelope, type: "init", provider: input.provider,
+ credentials: sanitizeAVMapCredentials(input.credentials, input.provider), theme: input.theme};
+ case "setPoints":
+ if (!provider || !isAVMapRevision(input.revision) || !Array.isArray(input.points)) {
+ return;
+ }
+ return {...envelope, type: "setPoints", revision: input.revision,
+ points: sanitizeAVMapPoints(input.points, provider)};
+ case "theme":
+ return isAVMapTheme(input.theme) ? {...envelope, type: "theme", theme: input.theme} : undefined;
+ case "fit":
+ case "resize":
+ case "destroy":
+ return {...envelope, type: input.type};
+ }
+};
+
+export const parseAVMapReply = (value: unknown, instanceID: string): AVMapReply | undefined => {
+ const input = asRecord(value);
+ if (!input || input.version !== AV_MAP_PROTOCOL_VERSION || input.instanceID !== instanceID) {
+ return;
+ }
+ const envelope = {version: AV_MAP_PROTOCOL_VERSION, instanceID} as const;
+ if (input.type === "ready") {
+ return {...envelope, type: "ready"};
+ }
+ if (input.type === "markerClick" && isAVMapIdentifier(input.id) && isAVMapRevision(input.revision)) {
+ return {...envelope, type: "markerClick", id: input.id, revision: input.revision};
+ }
+ if (input.type === "error" && ["unsupportedEnvironment", "missingCredentials", "invalidConfiguration",
+ "hostUnavailable", "sdkUnavailable", "mapUnavailable"].includes(input.code as string)) {
+ return {...envelope, type: "error", code: input.code as AVMapErrorCode};
+ }
+};
+
+export const isAVMapHandshake = (value: unknown, type: "hello" | "connect", instanceID: string, nonce: string): boolean => {
+ const input = asRecord(value);
+ return !!input && input.type === type && input.version === AV_MAP_PROTOCOL_VERSION &&
+ input.instanceID === instanceID && input.nonce === nonce;
+};
diff --git a/app/src/protyle/render/av/map/providers.test.ts b/app/src/protyle/render/av/map/providers.test.ts
new file mode 100644
index 0000000000..51c5d9b32f
--- /dev/null
+++ b/app/src/protyle/render/av/map/providers.test.ts
@@ -0,0 +1,139 @@
+import * as assert from "node:assert/strict";
+import {describe, it} from "node:test";
+import {AVMapProvider} from "./protocol";
+import {AV_MAP_OPENFREEMAP_STYLE, createAVMapAdapter} from "./providers";
+
+const fixture = () => {
+ const instances: any[] = [];
+ const calls: Array<[string, ...any[]]> = [];
+ class SDKObject {
+ callbacks = new Map<string, (...args: any[]) => void>();
+ constructor(...args: any[]) {
+ calls.push([new.target.name, ...args]);
+ instances.push(this);
+ }
+ on(event: string, callback: (...args: any[]) => void) { this.callbacks.set(event, callback); }
+ off(event: string) { this.callbacks.delete(event); }
+ addEventListener(event: string, callback: (...args: any[]) => void) { this.on(event, callback); }
+ removeEventListener(event: string) { this.off(event); }
+ remove() { calls.push(["remove"]); }
+ destroy() { calls.push(["destroy"]); }
+ dispose() { calls.push(["dispose"]); }
+ setMap(...args: any[]) { calls.push(["setMap", ...args]); }
+ setLngLat(...args: any[]) { calls.push(["setLngLat", ...args]); return this; }
+ addTo() { return this; }
+ getElement() { return this; }
+ setGeometries(...args: any[]) { calls.push(["setGeometries", ...args]); }
+ fitBounds(...args: any[]) { calls.push(["fitBounds", ...args]); }
+ setFitView(...args: any[]) { calls.push(["setFitView", ...args]); }
+ setViewport(...args: any[]) { calls.push(["setViewport", ...args]); }
+ setMapStyle(...args: any[]) { calls.push(["setMapStyle", ...args]); }
+ setTheme(...args: any[]) { calls.push(["setTheme", ...args]); }
+ centerAndZoom(...args: any[]) { calls.push(["centerAndZoom", ...args]); }
+ enableScrollWheelZoom() {}
+ disableMapClick() {}
+ disableIconInfoWindow() {}
+ addOverlay() {}
+ removeOverlay() {}
+ clearOverlays() {}
+ getPosition() { return "sdk-position"; }
+ resize() { calls.push(["resize"]); }
+ checkResize() { calls.push(["checkResize"]); }
+ extend(...args: any[]) { calls.push(["extend", ...args]); }
+ }
+ const sdk = {
+ Map: class Map extends SDKObject {}, Marker: class Marker extends SDKObject {},
+ MarkerStyle: class MarkerStyle extends SDKObject {},
+ MultiMarker: class MultiMarker extends SDKObject {}, LatLng: class LatLng extends SDKObject {},
+ Point: class Point extends SDKObject {}, LngLatBounds: class LngLatBounds extends SDKObject {},
+ LatLngBounds: class LatLngBounds extends SDKObject {},
+ };
+ const container = {ownerDocument: {documentElement: {dataset: {}}}, replaceChildren() { calls.push(["clear"]); }};
+ return {sdk, calls, instances, container: container as unknown as HTMLElement};
+};
+
+describe("official map provider adapters", () => {
+ for (const provider of ["openfreemap", "amap", "tencent", "baidu"] as AVMapProvider[]) {
+ it(`${provider} preserves coordinate order, filters systems and cleans stale callbacks`, () => {
+ const {sdk, calls, instances, container} = fixture();
+ const clicked: Array<[string, number]> = [];
+ const adapter = createAVMapAdapter(provider, sdk, container, {
+ onMarkerClick: (id, revision) => clicked.push([id, revision]), onError: () => assert.fail("SDK error"),
+ }, {bd09: "official-bd09", gcj02: "official-gcj02"});
+ const coordinateSystem = provider === "openfreemap" ? "wgs84" : provider === "baidu" ? "bd09" : "gcj02";
+ const point = {id: "row-1", longitude: 121, latitude: 31, coordinateSystem} as const;
+ adapter.setPoints([point, {...point, id: "unknown", coordinateSystem: "unknown" as any}], 1);
+ const marker = instances.find((instance) => instance.callbacks.has("click"));
+ const oldClick = marker.callbacks.get("click");
+ oldClick({geometry: {id: "row-1"}});
+ assert.deepEqual(clicked, [["row-1", 1]]);
+ if (provider === "openfreemap") {
+ assert.equal(calls.find((call) => call[0] === "Map")[1].style, AV_MAP_OPENFREEMAP_STYLE);
+ assert.equal(calls.find((call) => call[0] === "Map")[1].attributionControl, true);
+ assert.deepEqual(calls.find((call) => call[0] === "setLngLat"), ["setLngLat", [121, 31]]);
+ } else if (provider === "amap") {
+ assert.deepEqual(calls.find((call) => call[0] === "Marker")[1].position, [121, 31]);
+ } else if (provider === "tencent") {
+ assert.ok(calls.some((call) => call[0] === "LatLng" && call[1] === 31 && call[2] === 121));
+ assert.deepEqual(calls.find((call) => call[0] === "MarkerStyle")[1],
+ {width: 20, height: 30, anchor: {x: 10, y: 30}});
+ } else {
+ assert.ok(calls.some((call) => call[0] === "Point" && call[1] === 121 && call[2] === 31));
+ assert.deepEqual(calls.find((call) => call[0] === "Marker")[2],
+ {enableDragging: false, coordType: "official-bd09"});
+ }
+ adapter.fit();
+ adapter.resize();
+ adapter.setTheme("dark");
+ adapter.setPoints([{...point, id: "row-2"}], 2);
+ oldClick({geometry: {id: "row-1"}});
+ assert.equal(clicked.length, 1);
+ adapter.setPoints([point], 1);
+ adapter.setPoints([], 3);
+ adapter.fit();
+ adapter.destroy();
+ const count = calls.length;
+ adapter.destroy();
+ adapter.setPoints([point], 4);
+ adapter.fit();
+ adapter.resize();
+ adapter.setTheme("light");
+ oldClick({geometry: {id: "row-1"}});
+ assert.equal(calls.length, count);
+ assert.equal(clicked.length, 1);
+ assert.equal(calls.filter((call) => call[0] === "clear").length, 1);
+ });
+ }
+ it("declares each Baidu marker's BD09 or GCJ02 system without changing global defaults or coordinates", () => {
+ const {sdk, calls, container} = fixture();
+ Object.defineProperty(sdk, "coordType", {value: "global-default", writable: false});
+ const adapter = createAVMapAdapter("baidu", sdk, container, {onMarkerClick() {}, onError() {}},
+ {bd09: "official-bd09", gcj02: "official-gcj02"});
+ const points = [
+ {id: "one", longitude: 121, latitude: 31, coordinateSystem: "gcj02" as const},
+ {id: "abroad", longitude: -73, latitude: 40, coordinateSystem: "bd09" as const},
+ ];
+ adapter.setPoints(points, 1);
+ assert.deepEqual(calls.filter((call) => call[0] === "Marker").map((call) => call[2]), [
+ {enableDragging: false, coordType: "official-gcj02"},
+ {enableDragging: false, coordType: "official-bd09"},
+ ]);
+ assert.ok(calls.some((call) => call[0] === "Point" && call[1] === -73 && call[2] === 40));
+ assert.deepEqual(points[1], {id: "abroad", longitude: -73, latitude: 40, coordinateSystem: "bd09"});
+ adapter.fit();
+ assert.deepEqual(calls.find((call) => call[0] === "setViewport")[1], ["sdk-position", "sdk-position"]);
+ adapter.destroy();
+ });
+ it("does not silently fall back to Baidu defaults when an explicit coordinate constant is unavailable", () => {
+ for (const coordinateSystem of ["bd09", "gcj02"] as const) {
+ const {sdk, calls, container} = fixture();
+ const errors: string[] = [];
+ const adapter = createAVMapAdapter("baidu", sdk, container,
+ {onMarkerClick() {}, onError: (code) => errors.push(code)});
+ adapter.setPoints([{id: "one", longitude: 121, latitude: 31, coordinateSystem}], 1);
+ assert.deepEqual(errors, ["mapUnavailable"]);
+ assert.equal(calls.some((call) => call[0] === "Marker"), false);
+ adapter.destroy();
+ }
+ });
+});
diff --git a/app/src/protyle/render/av/map/providers.ts b/app/src/protyle/render/av/map/providers.ts
new file mode 100644
index 0000000000..24dfd5cca1
--- /dev/null
+++ b/app/src/protyle/render/av/map/providers.ts
@@ -0,0 +1,214 @@
+import {AVMapErrorCode, AVMapPoint, AVMapProvider, AVMapTheme, sanitizeAVMapPoints} from "./protocol";
+
+export const AV_MAP_OPENFREEMAP_STYLE = "https://tiles.openfreemap.org/styles/liberty";
+
+export interface AVMapAdapter {
+ setPoints: (points: AVMapPoint[], revision: number) => void;
+ fit: () => void;
+ resize: () => void;
+ setTheme: (theme: AVMapTheme) => void;
+ destroy: () => void;
+}
+
+export interface AVMapAdapterCallbacks {
+ onMarkerClick: (id: string, revision: number) => void;
+ onError: (code: AVMapErrorCode) => void;
+ onReady?: () => void;
+}
+
+// SDK 仅由独立 web 入口加载,主界面不得导入此模块或任何外部 SDK。
+export const createAVMapAdapter = (provider: AVMapProvider, sdk: any, container: HTMLElement,
+ callbacks: AVMapAdapterCallbacks,
+ baiduCoordinateTypes?: {bd09?: unknown; gcj02?: unknown}): AVMapAdapter => {
+ let destroyed = false;
+ let revision = -1;
+ let points: AVMapPoint[] = [];
+ let removeMarkers: Array<() => void> = [];
+ let map: any;
+ let tencentLayer: any;
+ let markers: any[] = [];
+ let removeReadyListener = () => {};
+ const cleanMarkers = () => {
+ removeMarkers.forEach((remove) => remove());
+ removeMarkers = [];
+ markers = [];
+ tencentLayer?.setGeometries([]);
+ };
+ const error = () => {
+ if (!destroyed) {
+ callbacks.onError("mapUnavailable");
+ }
+ };
+ const click = (id: string, renderedRevision: number) => {
+ if (!destroyed && renderedRevision === revision && points.some((point) => point.id === id)) {
+ callbacks.onMarkerClick(id, renderedRevision);
+ }
+ };
+ if (provider === "openfreemap") {
+ map = new sdk.Map({container, style: AV_MAP_OPENFREEMAP_STYLE, center: [0, 0], zoom: 1,
+ attributionControl: true, trackResize: false});
+ map.on("error", error);
+ } else if (provider === "amap") {
+ map = new sdk.Map(container, {zoom: 3, center: [105, 35], resizeEnable: false,
+ viewMode: "2D", showIndoorMap: false});
+ map.on("error", error);
+ } else if (provider === "tencent") {
+ map = new sdk.Map(container, {center: new sdk.LatLng(35, 105), zoom: 3, pitch: 0, rotation: 0});
+ tencentLayer = new sdk.MultiMarker({map, geometries: [],
+ styles: {marker: new sdk.MarkerStyle({width: 20, height: 30, anchor: {x: 10, y: 30}})}});
+ } else if (provider === "baidu") {
+ map = new sdk.Map(container);
+ map.centerAndZoom(new sdk.Point(105, 35), 3);
+ map.enableScrollWheelZoom();
+ map.disableMapClick();
+ map.disableIconInfoWindow();
+ } else {
+ throw new Error("invalidConfiguration");
+ }
+ const onReady = () => {
+ if (!destroyed) {
+ callbacks.onReady?.();
+ }
+ };
+ const readyEvent = provider === "openfreemap" ? "load" : provider === "amap" ? "complete" : "tilesloaded";
+ if (provider === "baidu") {
+ map.addEventListener(readyEvent, onReady);
+ removeReadyListener = () => map.removeEventListener(readyEvent, onReady);
+ } else {
+ map.on(readyEvent, onReady);
+ removeReadyListener = () => map.off(readyEvent, onReady);
+ }
+
+ const adapter: AVMapAdapter = {
+ setPoints: (input, nextRevision) => {
+ if (destroyed || nextRevision <= revision) {
+ return;
+ }
+ revision = nextRevision;
+ cleanMarkers();
+ points = sanitizeAVMapPoints(input, provider);
+ if (provider === "tencent") {
+ // 经纬度顺序由腾讯的 LatLng 定义为纬度在前。
+ tencentLayer.setGeometries(points.map((point) => ({
+ id: point.id, position: new sdk.LatLng(point.latitude, point.longitude),
+ })));
+ const onClick = (event: {geometry?: {id?: unknown}}) => {
+ if (typeof event.geometry?.id === "string") {
+ click(event.geometry.id, nextRevision);
+ }
+ };
+ tencentLayer.on("click", onClick);
+ removeMarkers.push(() => tencentLayer.off("click", onClick));
+ return;
+ }
+ points.forEach((point) => {
+ const onClick = () => click(point.id, nextRevision);
+ if (provider === "openfreemap") {
+ const marker = new sdk.Marker().setLngLat([point.longitude, point.latitude]).addTo(map);
+ const element = marker.getElement();
+ element.addEventListener("click", onClick);
+ markers.push(marker);
+ removeMarkers.push(() => {
+ element.removeEventListener("click", onClick);
+ marker.remove();
+ });
+ } else if (provider === "amap") {
+ const marker = new sdk.Marker({map, position: [point.longitude, point.latitude], draggable: false});
+ marker.on("click", onClick);
+ markers.push(marker);
+ removeMarkers.push(() => {
+ marker.off("click", onClick);
+ marker.setMap(null);
+ });
+ } else {
+ const coordType = point.coordinateSystem === "gcj02" ?
+ baiduCoordinateTypes?.gcj02 : baiduCoordinateTypes?.bd09;
+ if (coordType === undefined) {
+ error();
+ return;
+ }
+ // 每个 Marker 显式声明坐标系,不依赖全局或地域默认值;不自行换算。
+ // https://lbs.baidu.com/jsapi/refdoc/v4/enums/BMap.CoordType.html
+ const options = {enableDragging: false, coordType};
+ const marker = new sdk.Marker(new sdk.Point(point.longitude, point.latitude), options);
+ map.addOverlay(marker);
+ marker.addEventListener("click", onClick);
+ markers.push(marker);
+ removeMarkers.push(() => {
+ marker.removeEventListener("click", onClick);
+ map.removeOverlay(marker);
+ marker.dispose?.();
+ });
+ }
+ });
+ },
+ fit: () => {
+ if (destroyed || points.length === 0) {
+ return;
+ }
+ if (provider === "openfreemap") {
+ const bounds = new sdk.LngLatBounds();
+ points.forEach((point) => bounds.extend([point.longitude, point.latitude]));
+ map.fitBounds(bounds, {padding: 40, maxZoom: 15, duration: 0});
+ } else if (provider === "amap") {
+ map.setFitView(markers, true, [40, 40, 40, 40], 15);
+ } else if (provider === "tencent") {
+ const first = new sdk.LatLng(points[0].latitude, points[0].longitude);
+ const bounds = new sdk.LatLngBounds(first, first);
+ points.forEach((point) => bounds.extend(new sdk.LatLng(point.latitude, point.longitude)));
+ map.fitBounds(bounds, {padding: 40, maxZoom: 15, ease: {duration: 0}});
+ } else {
+ // SDK 返回实际标注位置,混合输入坐标系不会被应用自行重新解释。
+ map.setViewport(markers.map((marker) => marker.getPosition()),
+ {margins: [40, 40, 40, 40], enableAnimation: false});
+ }
+ },
+ resize: () => {
+ if (destroyed) {
+ return;
+ }
+ if (provider === "openfreemap" || provider === "amap") {
+ map.resize();
+ } else if (provider === "baidu") {
+ map.checkResize();
+ }
+ // 腾讯 SDK 自动响应容器尺寸变化,没有公开的 resize 方法。
+ },
+ setTheme: (theme) => {
+ if (destroyed) {
+ return;
+ }
+ container.ownerDocument.documentElement.dataset.theme = theme;
+ if (provider === "amap") {
+ map.setMapStyle(`amap://styles/${theme === "dark" ? "dark" : "normal"}`);
+ } else if (provider === "baidu") {
+ // 官方 4.0 的 setTheme 仅设置控件界面主题,底图仍使用服务默认样式。
+ map.setTheme(theme);
+ }
+ },
+ destroy: () => {
+ if (destroyed) {
+ return;
+ }
+ destroyed = true;
+ removeReadyListener();
+ cleanMarkers();
+ points = [];
+ if (provider === "openfreemap") {
+ map.off("error", error);
+ map.remove();
+ } else if (provider === "amap") {
+ map.off("error", error);
+ map.destroy();
+ } else if (provider === "tencent") {
+ tencentLayer.setMap(null);
+ map.destroy();
+ } else {
+ map.clearOverlays();
+ map.destroy();
+ }
+ container.replaceChildren();
+ },
+ };
+ return adapter;
+};
diff --git a/app/src/protyle/render/av/map/providersLoader.test.ts b/app/src/protyle/render/av/map/providersLoader.test.ts
new file mode 100644
index 0000000000..19601d9680
--- /dev/null
+++ b/app/src/protyle/render/av/map/providersLoader.test.ts
@@ -0,0 +1,193 @@
+import * as assert from "node:assert/strict";
+import {describe, it} from "node:test";
+import {AVMapInit, AVMapProvider} from "./protocol";
+import {loadAVMapAdapter} from "./providersLoader";
+import {getAVMapLockedPolicy, prepareAVMapBootstrap} from "./bootstrap";
+
+const fixture = (ready = true, scriptError = false) => {
+ const requested: any[] = [];
+ let destroyed = 0;
+ class FakeMap {
+ constructor() { requested.push({mapCreated: true}); }
+ on(type: string, callback: () => void) {
+ if (ready && ["load", "complete", "tilesloaded"].includes(type)) {
+ queueMicrotask(callback);
+ }
+ }
+ off() {}
+ addEventListener(type: string, callback: () => void) { this.on(type, callback); }
+ removeEventListener() {}
+ remove() { destroyed++; }
+ destroy() { destroyed++; }
+ centerAndZoom() {}
+ enableScrollWheelZoom() {}
+ disableMapClick() {}
+ disableIconInfoWindow() {}
+ addOverlay() {}
+ removeOverlay() {}
+ clearOverlays() {}
+ }
+ const sdk = {Map: FakeMap, MultiMarker: class {
+ setGeometries() {}
+ setMap() {}
+ }, Marker: class {
+ constructor(_point: unknown, options: unknown) { requested.push({markerOptions: options}); }
+ addEventListener() {}
+ removeEventListener() {}
+ }, MarkerStyle: class {}, LatLng: class {}, Point: class {}, setWorkerUrl: (url: string) => requested.push({worker: url})};
+ const scope: any = {
+ setTimeout, clearTimeout, AMap: sdk, TMap: sdk, BMap: sdk, maplibregl: sdk,
+ BMAP_COORD_BD09: "official-bd09", BMAP_COORD_GCJ02: "official-gcj02",
+ fetch: async (url: string, options: unknown) => {
+ requested.push({url, options});
+ return {ok: true, text: async () => "/* fixture worker */"};
+ },
+ };
+ const document: any = {
+ defaultView: scope, documentElement: {dataset: {}},
+ createElement: (tag: string) => ({tag, remove() {}}),
+ head: {appendChild: (element: any) => {
+ requested.push({tag: element.tag, src: element.src, href: element.href, referrerPolicy: element.referrerPolicy,
+ policy: element.content});
+ if (element.tag === "link") {
+ queueMicrotask(() => element.onload?.());
+ }
+ if (element.tag === "script") {
+ queueMicrotask(() => {
+ if (scriptError) {
+ element.onerror?.(new Error("https://fixture.invalid?key=private"));
+ return;
+ }
+ const callback = new URL(element.src, "https://fixture.invalid").searchParams.get("callback");
+ if (callback) {
+ scope[callback]?.();
+ } else {
+ element.onload?.();
+ }
+ });
+ }
+ }},
+ };
+ scope.document = document;
+ const container = {ownerDocument: document, replaceChildren() {}} as unknown as HTMLElement;
+ return {scope, requested, container, destroyed: () => destroyed};
+};
+
+const init = (provider: AVMapProvider, key = "fixture-key"): AVMapInit => ({
+ version: 1, instanceID: "fixture", type: "init", provider, theme: "light",
+ credentials: {apiKey: key, securityCode: "fixture-security-code"},
+});
+
+describe("isolated provider loading", () => {
+ for (const provider of ["openfreemap", "amap", "tencent", "baidu"] as AVMapProvider[]) {
+ it(`${provider} loads only its fixed SDK and waits for its documented ready event`, async () => {
+ const {scope, requested, container, destroyed} = fixture();
+ await prepareAVMapBootstrap(scope, provider, new AbortController().signal);
+ const adapter = await loadAVMapAdapter(init(provider), container,
+ {onMarkerClick() {}, onError: () => assert.fail("unexpected provider error")}, new AbortController().signal);
+ const scripts = requested.filter((request) => request.tag === "script");
+ assert.equal(scripts.length, 1);
+ assert.equal(scripts[0].referrerPolicy, "strict-origin-when-cross-origin");
+ if (provider === "openfreemap") {
+ assert.equal(scripts[0].src, "/stage/build/map/maplibre-gl.js");
+ assert.equal(requested.find((request) => request.tag === "link").href, "/stage/build/map/maplibre-gl.css");
+ const worker = requested.find((request) => request.url);
+ assert.equal(worker.url, "/stage/build/map/maplibre-gl-csp-worker.js");
+ assert.equal(worker.options.credentials, "omit");
+ assert.equal(worker.options.cache, "no-store");
+ assert.equal(worker.options.mode, "cors");
+ assert.match(requested.find((request) => request.worker).worker, /^blob:/);
+ } else {
+ const url = new URL(scripts[0].src);
+ assert.equal(url.origin, {amap: "https://webapi.amap.com", tencent: "https://map.qq.com",
+ baidu: "https://api.map.baidu.com"}[provider]);
+ assert.equal(url.searchParams.get(provider === "baidu" ? "ak" : "key"), "fixture-key");
+ assert.equal(url.searchParams.get("v"), {amap: "2.0", tencent: "1.exp", baidu: "4.0"}[provider]);
+ assert.equal(url.searchParams.has("libraries"), false);
+ assert.equal(url.searchParams.has("plugin"), false);
+ assert.equal(requested.filter((request) => request.tag === "link").length, 0);
+ if (provider === "amap") {
+ assert.deepEqual(scope._AMapSecurityConfig, {securityJsCode: "fixture-security-code"});
+ }
+ }
+ assert.equal(scope.__siyuanMapSDKReady, undefined);
+ adapter.destroy();
+ adapter.destroy();
+ assert.equal(destroyed(), 1);
+ });
+ }
+ it("passes both documented Baidu coordinate constants from the isolated SDK to individual markers", async () => {
+ const {requested, container} = fixture();
+ await prepareAVMapBootstrap(container.ownerDocument.defaultView, "baidu", new AbortController().signal);
+ const adapter = await loadAVMapAdapter(init("baidu"), container,
+ {onMarkerClick() {}, onError: () => assert.fail("unexpected provider error")}, new AbortController().signal);
+ adapter.setPoints([
+ {id: "bd", longitude: -73, latitude: 40, coordinateSystem: "bd09"},
+ {id: "gcj", longitude: 121, latitude: 31, coordinateSystem: "gcj02"},
+ ], 1);
+ assert.deepEqual(requested.filter((request) => request.markerOptions).map((request) => request.markerOptions), [
+ {enableDragging: false, coordType: "official-bd09"},
+ {enableDragging: false, coordType: "official-gcj02"},
+ ]);
+ adapter.destroy();
+ });
+ it("does not cache SDK credentials between isolated frames", async () => {
+ const first = fixture();
+ const second = fixture();
+ const callbacks = {onMarkerClick() {}, onError() {}};
+ await prepareAVMapBootstrap(first.scope, "amap", new AbortController().signal);
+ await prepareAVMapBootstrap(second.scope, "amap", new AbortController().signal);
+ const one = await loadAVMapAdapter(init("amap", "first-fixture-key"), first.container, callbacks, new AbortController().signal);
+ const two = await loadAVMapAdapter(init("amap", "second-fixture-key"), second.container, callbacks, new AbortController().signal);
+ assert.match(first.requested.find((request) => request.tag === "script").src, /first-fixture-key/);
+ assert.match(second.requested.find((request) => request.tag === "script").src, /second-fixture-key/);
+ one.destroy();
+ two.destroy();
+ });
+ it("aborts an SDK that never completes map loading and destroys its instance", async () => {
+ const {container, destroyed} = fixture(false);
+ const abort = new AbortController();
+ await prepareAVMapBootstrap(container.ownerDocument.defaultView, "amap", abort.signal);
+ const pending = loadAVMapAdapter(init("amap"), container, {onMarkerClick() {}, onError() {}}, abort.signal);
+ await new Promise<void>((resolve) => setImmediate(resolve));
+ abort.abort();
+ await assert.rejects(pending, {message: "sdkUnavailable"});
+ assert.equal(destroyed(), 1);
+ });
+ it("sanitizes secret-bearing network failures and does not instantiate the map", async () => {
+ const {container, destroyed} = fixture(true, true);
+ await prepareAVMapBootstrap(container.ownerDocument.defaultView, "amap", new AbortController().signal);
+ await assert.rejects(loadAVMapAdapter(init("amap"), container, {onMarkerClick() {}, onError() {}},
+ new AbortController().signal), {message: "sdkUnavailable"});
+ assert.equal(destroyed(), 0);
+ });
+ it("prepares local files before locking and only creates a worker blob/map after locking", async () => {
+ const {scope, requested, container} = fixture();
+ const signal = new AbortController().signal;
+ await assert.rejects(loadAVMapAdapter(init("openfreemap"), container, {onMarkerClick() {}, onError() {}}, signal),
+ {message: "hostUnavailable"});
+ assert.equal(requested.length, 0);
+ const dispose = await prepareAVMapBootstrap(scope, "openfreemap", signal);
+ assert.equal(requested.some((request) => request.worker || request.mapCreated), false);
+ assert.equal(requested[requested.length - 1].tag, "meta");
+ const lockedAt = requested.length - 1;
+ const adapter = await loadAVMapAdapter(init("openfreemap"), container, {onMarkerClick() {}, onError() {}}, signal);
+ assert.ok(requested.findIndex((request) => request.worker) > lockedAt);
+ assert.ok(requested.findIndex((request) => request.mapCreated) > lockedAt);
+ assert.equal(requested.slice(lockedAt + 1).some((request) => request.url || request.tag === "script"), false);
+ adapter.destroy();
+ dispose();
+ });
+ it("never loads a remote SDK during bootstrap and removes every local source from its locked policy", async () => {
+ for (const provider of ["openfreemap", "amap", "tencent", "baidu"] as AVMapProvider[]) {
+ const {scope, requested} = fixture();
+ const dispose = await prepareAVMapBootstrap(scope, provider, new AbortController().signal);
+ assert.equal(requested.some((request) => /^https?:/.test(request.src || request.url || "")), false);
+ const policy = getAVMapLockedPolicy(provider);
+ assert.equal(/localhost|127\.0\.0\.1|stage\/|nonce-|sha256-|\bself\b|unsafe-eval/.test(policy), false);
+ assert.match(policy, /frame-src 'none'/);
+ assert.match(policy, /form-action 'none'/);
+ dispose();
+ }
+ });
+});
diff --git a/app/src/protyle/render/av/map/providersLoader.ts b/app/src/protyle/render/av/map/providersLoader.ts
new file mode 100644
index 0000000000..80063672eb
--- /dev/null
+++ b/app/src/protyle/render/av/map/providersLoader.ts
@@ -0,0 +1,217 @@
+import {AVMapInit, AVMapProvider} from "./protocol";
+import {AVMapAdapter, AVMapAdapterCallbacks, createAVMapAdapter} from "./providers";
+
+const SDK_CALLBACK = "__siyuanMapSDKReady";
+
+interface AVMapPreparedAssets {
+ provider: AVMapProvider;
+ locked: boolean;
+ sdk?: any;
+ workerSource?: string;
+ workerURL?: string;
+ destroy: () => void;
+}
+
+const preparedAssets = new WeakMap<Window, AVMapPreparedAssets>();
+
+const loadScript = (scope: Window, source: string, signal: AbortSignal, callback = false): Promise<void> => {
+ return new Promise((resolve, reject) => {
+ const script = scope.document.createElement("script");
+ const globals = scope as unknown as Record<string, any>;
+ let settled = false;
+ const finish = (success: boolean) => {
+ if (settled) {
+ return;
+ }
+ settled = true;
+ scope.clearTimeout(timer);
+ script.onload = null;
+ script.onerror = null;
+ signal.removeEventListener("abort", abort);
+ if (callback) {
+ delete globals[SDK_CALLBACK];
+ }
+ if (success) {
+ resolve();
+ } else {
+ script.remove();
+ reject(new Error("sdkUnavailable"));
+ }
+ };
+ const abort = () => finish(false);
+ const timer = scope.setTimeout(() => finish(false), 20000);
+ signal.addEventListener("abort", abort, {once: true});
+ if (callback) {
+ globals[SDK_CALLBACK] = () => finish(true);
+ } else {
+ script.onload = () => finish(true);
+ }
+ script.onerror = () => finish(false);
+ script.src = source;
+ script.referrerPolicy = "strict-origin-when-cross-origin";
+ script.async = true;
+ if (signal.aborted) {
+ finish(false);
+ } else {
+ scope.document.head.appendChild(script);
+ }
+ });
+};
+
+// 只准备固定无凭据资产,不构造 Map、Worker 或 blob;只有 bootstrap 可以推进锁定阶段。
+export const prepareAVMapAssets = async (scope: Window, provider: AVMapProvider, signal: AbortSignal) => {
+ if (preparedAssets.has(scope) || signal.aborted) {
+ throw new Error("hostUnavailable");
+ }
+ const assets: AVMapPreparedAssets = {provider, locked: false, destroy: () => {
+ if (assets.workerURL) {
+ URL.revokeObjectURL(assets.workerURL);
+ assets.workerURL = undefined;
+ }
+ assets.workerSource = undefined;
+ if (preparedAssets.get(scope) === assets) {
+ preparedAssets.delete(scope);
+ }
+ }};
+ preparedAssets.set(scope, assets);
+ try {
+ if (provider === "openfreemap") {
+ await new Promise<void>((resolve, reject) => {
+ const stylesheet = scope.document.createElement("link");
+ stylesheet.rel = "stylesheet";
+ stylesheet.href = "/stage/build/map/maplibre-gl.css";
+ let settled = false;
+ const finish = (success: boolean) => {
+ if (settled) {
+ return;
+ }
+ settled = true;
+ scope.clearTimeout(timer);
+ signal.removeEventListener("abort", abort);
+ stylesheet.onload = null;
+ stylesheet.onerror = null;
+ if (success) {
+ resolve();
+ } else {
+ stylesheet.remove();
+ reject(new Error("hostUnavailable"));
+ }
+ };
+ const abort = () => finish(false);
+ const timer = scope.setTimeout(abort, 20000);
+ signal.addEventListener("abort", abort, {once: true});
+ stylesheet.onload = () => finish(true);
+ stylesheet.onerror = abort;
+ scope.document.head.appendChild(stylesheet);
+ if (signal.aborted) {
+ finish(false);
+ }
+ });
+ await loadScript(scope, "/stage/build/map/maplibre-gl.js", signal);
+ const response = await scope.fetch("/stage/build/map/maplibre-gl-csp-worker.js", {
+ credentials: "omit", mode: "cors", cache: "no-store", referrerPolicy: "no-referrer", signal,
+ });
+ if (!response.ok) {
+ throw new Error("hostUnavailable");
+ }
+ assets.workerSource = await response.text();
+ assets.sdk = (scope as unknown as Record<string, any>).maplibregl;
+ if (!assets.sdk) {
+ throw new Error("hostUnavailable");
+ }
+ }
+ if (signal.aborted) {
+ throw new Error("hostUnavailable");
+ }
+ return {lock: () => { assets.locked = true; }, destroy: assets.destroy};
+ } catch (_error) {
+ assets.destroy();
+ throw new Error("hostUnavailable");
+ }
+};
+
+export const loadAVMapAdapter = async (init: AVMapInit, container: HTMLElement,
+ callbacks: AVMapAdapterCallbacks, signal: AbortSignal): Promise<AVMapAdapter> => {
+ const scope = container.ownerDocument.defaultView;
+ const globals = scope as unknown as Record<string, any>;
+ const {provider, credentials} = init;
+ const assets = preparedAssets.get(scope);
+ if (!assets?.locked || assets.provider !== provider || signal.aborted) {
+ throw new Error("hostUnavailable");
+ }
+ if (provider !== "openfreemap" && !credentials.apiKey || provider === "amap" && !credentials.securityCode) {
+ throw new Error("missingCredentials");
+ }
+ try {
+ let sdk: any;
+ if (provider === "openfreemap") {
+ // blob 与 Worker 的创建都晚于 CSP 锁定,不继承启动阶段的本地网络权限。
+ assets.workerURL = URL.createObjectURL(new Blob([assets.workerSource], {type: "text/javascript"}));
+ assets.workerSource = undefined;
+ sdk = assets.sdk;
+ sdk.setWorkerUrl(assets.workerURL);
+ } else {
+ const scriptURL = new URL(provider === "amap" ? "https://webapi.amap.com/maps" :
+ provider === "tencent" ? "https://map.qq.com/api/gljs" : "https://api.map.baidu.com/api");
+ scriptURL.searchParams.set("v", provider === "amap" ? "2.0" : provider === "tencent" ? "1.exp" : "4.0");
+ scriptURL.searchParams.set(provider === "baidu" ? "ak" : "key", credentials.apiKey);
+ scriptURL.searchParams.set("callback", SDK_CALLBACK);
+ if (provider === "amap") {
+ globals._AMapSecurityConfig = {securityJsCode: credentials.securityCode};
+ }
+ await loadScript(scope, scriptURL.href, signal, true);
+ sdk = globals[provider === "amap" ? "AMap" : provider === "tencent" ? "TMap" : "BMap"];
+ }
+ if (signal.aborted || !sdk) {
+ throw new Error("sdkUnavailable");
+ }
+ let adapter: AVMapAdapter;
+ await new Promise<void>((resolve, reject) => {
+ let settled = false;
+ const finish = (success: boolean) => {
+ if (settled) {
+ return;
+ }
+ settled = true;
+ scope.clearTimeout(timer);
+ signal.removeEventListener("abort", abort);
+ if (success) {
+ resolve();
+ } else {
+ try {
+ adapter?.destroy();
+ } finally {
+ reject(new Error("mapUnavailable"));
+ }
+ }
+ };
+ const abort = () => finish(false);
+ const timer = scope.setTimeout(abort, 20000);
+ signal.addEventListener("abort", abort, {once: true});
+ try {
+ adapter = createAVMapAdapter(provider, sdk, container, {...callbacks,
+ onReady: () => finish(true), onError: (code) => {
+ callbacks.onError(code);
+ finish(false);
+ }}, {bd09: globals.BMAP_COORD_BD09, gcj02: globals.BMAP_COORD_GCJ02});
+ if (signal.aborted) {
+ finish(false);
+ }
+ } catch (_error) {
+ finish(false);
+ }
+ });
+ const destroy = adapter.destroy;
+ adapter.destroy = () => {
+ try {
+ destroy();
+ } finally {
+ assets.destroy();
+ }
+ };
+ return adapter;
+ } catch (_error) {
+ assets.destroy();
+ throw new Error("sdkUnavailable");
+ }
+};
diff --git a/app/src/protyle/render/av/map/render.test.ts b/app/src/protyle/render/av/map/render.test.ts
new file mode 100644
index 0000000000..31476ed28a
--- /dev/null
+++ b/app/src/protyle/render/av/map/render.test.ts
@@ -0,0 +1,234 @@
+import * as assert from "node:assert/strict";
+import {readFileSync} from "node:fs";
+import {test} from "node:test";
+import {runInNewContext} from "node:vm";
+import {ModuleKind, ScriptTarget, transpileModule} from "typescript";
+import * as state from "./state";
+import * as protocol from "./protocol";
+import * as escape from "../../../../util/escape";
+import type {AVMapHost, AVMapHostOptions} from "./host";
+
+class ElementStub {
+ className = "";
+ innerHTML = "";
+ textContent = "";
+ isConnected = true;
+ readonly children = new Map<string, ElementStub>();
+ readonly events = new Map<string, () => void>();
+ readonly classes = new Set<string>();
+ readonly classList = {add: (...names: string[]) => names.forEach(name => this.classes.add(name)),
+ remove: (...names: string[]) => names.forEach(name => this.classes.delete(name)),
+ toggle: (name: string, enabled: boolean) => enabled ? this.classes.add(name) : this.classes.delete(name)};
+ setAttribute() {}
+ remove() { this.isConnected = false; }
+ addEventListener(type: string, callback: () => void) { this.events.set(type, callback); }
+ querySelector(selector: string) {
+ if (!this.children.has(selector)) this.children.set(selector, new ElementStub());
+ return this.children.get(selector);
+ }
+}
+
+const setup = (options: {published?: boolean; desktop?: boolean; hostSupported?: boolean | Promise<boolean>;
+ online?: boolean; runtime?: () => Promise<unknown>} = {}) => {
+ const roots: ElementStub[] = [];
+ const records = new ElementStub();
+ let root: ElementStub;
+ let lifecycle: {root: ElementStub; destroy: () => void};
+ const block = {dataset: {avId: "database", nodeId: "carrier"}, querySelector: (selector: string) =>
+ selector.endsWith(".av__map") ? root : records};
+ Object.assign(records, {before: (element: ElementStub) => { root = element; roots.push(root); }});
+ const languages = new Proxy<Record<string, string>>({mapPageScope: "${shown}/${total}",
+ mapSkippedLocations: "${empty}/${invalid}/${unknown}/${mismatch}"}, {get: (target, key: string) => target[key] || key});
+ const events = new Map<string, () => void>();
+ const observers: Array<{disconnected: boolean}> = [];
+ class Observer {
+ disconnected = false;
+ constructor() { observers.push(this); }
+ observe() {}
+ disconnect() { this.disconnected = true; }
+ }
+ const hosts: Array<{options: AVMapHostOptions; points: protocol.AVMapPoint[]; revision: number;
+ destroyed: boolean; fitted: boolean}> = [];
+ const opened: unknown[] = [];
+ const calls: string[] = [];
+ const data = {id: "database", name: "Database", views: [], viewID: "map-view", viewType: "map", view: {
+ columns: [{id: "location", type: "location", hidden: true}], rowCount: 12,
+ map: {serviceID: "service", locationKeyID: "location", showRecordList: false},
+ rows: [{id: "row", cells: [{id: "location-value", value: {type: "location", keyID: "location",
+ location: {latitude: 0, longitude: 0, coordinateSystem: "wgs84", name: "Private name", originalInput: "Private input"}}},
+ {id: "primary-value", valueType: "block", value: {type: "block", isDetached: true,
+ block: {content: "Private title"}}}]}],
+ }} as IAV;
+ const protyle = {options: {}, app: {}, notebookId: "notebook"} as IProtyle;
+ const destroyMap = () => {
+ lifecycle?.destroy();
+ lifecycle = undefined;
+ };
+ const methods = {} as typeof import("./render");
+ const modules: Record<string, unknown> = {
+ "./state": {...state, destroyMap, registerMap: (_block: unknown, next: typeof lifecycle) => {
+ destroyMap(); lifecycle = next;
+ return () => lifecycle === next && next.root.isConnected;
+ }},
+ "../../../../util/escape": escape,
+ "../../../../util/fetch": {fetchSyncPost: async (url: string) => {
+ calls.push(url);
+ return options.runtime ? options.runtime() : {code: 0, data: {provider: "openfreemap"}};
+ }},
+ "./settings": {getMapSettingsHTML: () => "settings", bindMapSettings() {}, loadMapServices: async () => {
+ calls.push("/api/map/getConf");
+ return [{id: "service", provider: "openfreemap", configured: true}];
+ }},
+ "./protocol": protocol,
+ "../../../../config/mapRuntime": {MAP_CONFIG_CHANGED_EVENT: "map-config-change"},
+ "../openDatabaseRow": {openDatabaseRowByData: (_protyle: unknown, row: unknown) => opened.push(row)},
+ "./host": {isAVMapHostEnvironmentSupported: () => options.hostSupported ?? true,
+ createAVMapHost: (_container: unknown, configuration: AVMapHostOptions) => {
+ const host = {options: configuration, points: [] as protocol.AVMapPoint[], revision: -1,
+ destroyed: false, fitted: false};
+ hosts.push(host);
+ return {destroy: () => { host.destroyed = true; },
+ setPoints: (points: protocol.AVMapPoint[], revision: number) => { host.points = points; host.revision = revision; },
+ fit: () => { host.fitted = true; }, resize() {}, setTheme() {}};
+ }},
+ };
+ modules["./desktopTransport"] = {
+ isDesktopAVMapHostSupported: async () => options.desktop === true,
+ createDesktopAVMapHost: (container: unknown, configuration: AVMapHostOptions) => {
+ calls.push("desktop-host");
+ return (modules["./host"] as {createAVMapHost: (container: unknown, options: AVMapHostOptions) => AVMapHost})
+ .createAVMapHost(container, configuration);
+ },
+ };
+ runInNewContext(transpileModule(readFileSync("src/protyle/render/av/map/render.ts", "utf8"), {
+ compilerOptions: {module: ModuleKind.CommonJS, target: ScriptTarget.ES2022},
+ }).outputText, {exports: methods, require: (id: string) => modules[id] || {},
+ window: {siyuan: {languages, isPublish: options.published === true}, location: {protocol: "https:"},
+ addEventListener: (type: string, callback: () => void) => events.set(type, callback),
+ removeEventListener: (type: string) => events.delete(type)},
+ navigator: {userAgent: "Mozilla/5.0", onLine: options.online !== false},
+ document: {createElement: () => new ElementStub(), documentElement: {getAttribute: () => "light"}},
+ MutationObserver: Observer, ResizeObserver: Observer});
+ return {data, protyle, calls, hosts, roots, records, opened, events, observers, destroyMap,
+ render: () => methods.renderMap(block as unknown as HTMLElement, protyle, data),
+ status: () => root.querySelector(".av__map-status").textContent};
+};
+
+test("published maps render records without metadata, runtime credentials, or SDK calls", async () => {
+ const scenario = setup({published: true});
+ await scenario.render();
+ assert.deepEqual(scenario.calls, []);
+ assert.equal(scenario.hosts.length, 0);
+ assert.equal(scenario.status(), "mapPublicFallback");
+ assert.equal(scenario.records.classes.has("av__map-records--hidden"), false);
+});
+
+test("unconfigured, unavailable host, offline and incompatible maps never request runtime credentials", async () => {
+ for (const option of [{hostSupported: false}, {online: false}, {}]) {
+ const scenario = setup(option);
+ if (!Object.keys(option).length) (scenario.data.view as IAVTable).map.serviceID = "";
+ await scenario.render();
+ assert.deepEqual(scenario.calls, ["/api/map/getConf"]);
+ assert.equal(scenario.hosts.length, 0);
+ assert.equal(scenario.records.classes.has("av__map-records--hidden"), false);
+ }
+ const incompatible = setup();
+ (incompatible.data.view as IAVTable).rows[0].cells[0].value.location.coordinateSystem = "unknown";
+ await incompatible.render();
+ assert.deepEqual(incompatible.calls, ["/api/map/getConf"]);
+ assert.equal(incompatible.status(), "mapNoMarkers");
+});
+
+test("map sends only IDs and coordinates and opens the existing row detail for a current marker", async () => {
+ const scenario = setup();
+ await scenario.render();
+ assert.deepEqual(scenario.calls, ["/api/map/getConf", "/api/map/getRuntime"]);
+ const host = scenario.hosts[0];
+ assert.equal(JSON.stringify(host.points), JSON.stringify([{id: "row", longitude: 0, latitude: 0, coordinateSystem: "wgs84"}]));
+ assert.doesNotMatch(JSON.stringify(host.options), /Private|primary-value|notebook/);
+ host.options.onReady();
+ assert.equal(scenario.records.classes.has("av__map-records--hidden"), true);
+ host.options.onMarkerClick("other", host.revision);
+ host.options.onMarkerClick("row", host.revision - 1);
+ assert.equal(scenario.opened.length, 0);
+ host.options.onMarkerClick("row", host.revision);
+ assert.equal((scenario.opened[0] as {itemID: string}).itemID, "row");
+ scenario.events.get("offline")();
+ assert.equal(host.destroyed, true);
+ assert.equal(scenario.status(), "mapOffline");
+ assert.equal(scenario.records.classes.has("av__map-records--hidden"), false);
+ host.options.onMarkerClick("row", host.revision);
+ assert.equal(scenario.opened.length, 1);
+ scenario.destroyMap();
+ assert.equal(scenario.observers.every(observer => observer.disconnected), true);
+ assert.equal(scenario.events.size, 0);
+});
+
+test("an independently secured desktop host is selected instead of a renderer iframe", async () => {
+ const scenario = setup({desktop: true, hostSupported: false});
+ await scenario.render();
+ assert.deepEqual(scenario.calls, ["/api/map/getConf", "/api/map/getRuntime", "desktop-host"]);
+ assert.equal(scenario.hosts.length, 1);
+});
+
+test("late native capability replies cannot initialize a removed map", async () => {
+ let report: (supported: boolean) => void;
+ const scenario = setup({hostSupported: new Promise<boolean>(resolve => { report = resolve; })});
+ const pending = scenario.render();
+ await new Promise(resolve => setImmediate(resolve));
+ scenario.destroyMap();
+ report(true);
+ await pending;
+ assert.deepEqual(scenario.calls, ["/api/map/getConf"]);
+ assert.equal(scenario.hosts.length, 0);
+});
+
+test("stale runtime responses cannot mount a map after the view is removed", async () => {
+ let respond: (value: unknown) => void;
+ const scenario = setup({runtime: () => new Promise(resolve => { respond = resolve; })});
+ const rendering = scenario.render();
+ await new Promise(resolve => setImmediate(resolve));
+ scenario.roots[0].remove();
+ respond({code: 0, data: {provider: "openfreemap"}});
+ await rendering;
+ assert.equal(scenario.hosts.length, 0);
+});
+
+test("history and oversized loaded pages retain the list without fetching runtime credentials", async () => {
+ const history = setup();
+ history.protyle.options.history = {created: "version"};
+ await history.render();
+ assert.deepEqual(history.calls, []);
+ const scenario = setup();
+ const view = scenario.data.view as IAVTable;
+ view.rows = Array.from({length: protocol.AV_MAP_MAX_POINTS + 1}, (_, index) => ({...view.rows[0], id: `row-${index}`}));
+ await scenario.render();
+ assert.deepEqual(scenario.calls, ["/api/map/getConf"]);
+ assert.equal(scenario.status(), "mapTooManyMarkers");
+ assert.equal(scenario.hosts.length, 0);
+ assert.equal(scenario.records.classes.has("av__map-records--hidden"), false);
+});
+
+test("rerendering a map destroys the old host and invalidates its callbacks", async () => {
+ const scenario = setup();
+ await scenario.render();
+ const previous = scenario.hosts[0];
+ previous.options.onReady();
+ await scenario.render();
+ assert.equal(previous.destroyed, true);
+ previous.options.onMarkerClick("row", previous.revision);
+ assert.equal(scenario.opened.length, 0);
+ const next = scenario.hosts[1];
+ next.options.onReady();
+ next.options.onMarkerClick("row", next.revision);
+ assert.equal(scenario.opened.length, 1);
+ scenario.destroyMap();
+});
+
+test("authentication bypass reports its specific safe fallback without mounting the host", async () => {
+ const scenario = setup({runtime: async () => ({code: -1, msg: "mapAuthenticationBypass", data: null})});
+ await scenario.render();
+ assert.equal(scenario.status(), "mapAuthenticationBypass");
+ assert.equal(scenario.hosts.length, 0);
+ assert.equal(scenario.records.classes.has("av__map-records--hidden"), false);
+});
diff --git a/app/src/protyle/render/av/map/render.ts b/app/src/protyle/render/av/map/render.ts
new file mode 100644
index 0000000000..cbd9dc81a6
--- /dev/null
+++ b/app/src/protyle/render/av/map/render.ts
@@ -0,0 +1,215 @@
+import {escapeAttr, escapeHtml} from "../../../../util/escape";
+import {fetchSyncPost} from "../../../../util/fetch";
+import {openDatabaseRowByData} from "../openDatabaseRow";
+import {getAVData} from "../virtualScroll";
+import {bindMapSettings, getMapSettingsHTML, loadMapServices} from "./settings";
+import {canLoadMapHost, destroyMap, getMapPoints, getMapSettings, registerMap} from "./state";
+import {createAVMapHost, isAVMapHostEnvironmentSupported} from "./host";
+import {createDesktopAVMapHost, isDesktopAVMapHostSupported} from "./desktopTransport";
+import type {AVMapHost} from "./host";
+import {AV_MAP_ATTRIBUTION_LINKS, AV_MAP_MAX_POINTS} from "./protocol";
+import {MAP_CONFIG_CHANGED_EVENT} from "../../../../config/mapRuntime";
+
+const getTheme = () => document.documentElement.getAttribute("data-theme-mode") === "dark" ? "dark" : "light";
+
+const openMapRecord = (protyle: IProtyle, blockElement: HTMLElement, row: IAVRow) => {
+ const primary = row.cells.find(cell => cell.valueType === "block" || cell.value?.type === "block");
+ if (!primary?.value) {
+ return;
+ }
+ return openDatabaseRowByData(protyle, {
+ avID: blockElement.dataset.avId, databaseBlockID: blockElement.dataset.nodeId, notebookID: protyle.notebookId,
+ itemID: row.id, valueID: primary.id || primary.value.id,
+ title: primary.value.block?.content || window.siyuan.languages.untitled,
+ boundBlockID: primary.value.block?.id, isDetached: !!primary.value.isDetached, focusPrimary: true,
+ });
+};
+
+export const refreshMapReadonly = (protyle: IProtyle) => {
+ protyle.wysiwyg.element.querySelectorAll<HTMLElement>('.av[data-av-type="map"]').forEach(block => {
+ const data = getAVData(block);
+ if (data?.viewType === "map") {
+ void renderMap(block, protyle, data);
+ }
+ });
+};
+
+export const renderMap = async (blockElement: HTMLElement, protyle: IProtyle, data: IAV) => {
+ destroyMap(blockElement);
+ blockElement.querySelector(":scope > .av__container > .av__map")?.remove();
+ const records = blockElement.querySelector<HTMLElement>(":scope > .av__container > .av__scroll");
+ if (!records) {
+ return;
+ }
+ records.classList.remove("av__map-records--hidden");
+ const view = data.view as IAVTable;
+ const settings = getMapSettings(view);
+ const root = document.createElement("div");
+ root.className = "av__map";
+ root.setAttribute("contenteditable", "false");
+ root.setAttribute("aria-label", window.siyuan.languages.mapView);
+ const pageText = window.siyuan.languages.mapPageScope.replace("${shown}", view.rows.length.toString())
+ .replace("${total}", view.rowCount.toString());
+ root.innerHTML = `<div class="av__map-settings"></div>
+<div class="av__map-summary ft__smaller ft__on-surface">${escapeHtml(pageText)}</div>
+<div class="av__map-skipped ft__smaller ft__on-surface"></div>
+<div class="av__map-status ft__on-surface" role="status"></div>
+<div class="av__map-canvas fn__none"></div>
+<div class="ft__smaller fn__none" data-map-attribution></div>
+<div class="av__map-actions">
+ <button type="button" class="b3-button b3-button--outline fn__none" data-map-fit>${window.siyuan.languages.mapFitMarkers}</button>
+ <button type="button" class="block__icon block__icon--show ariaLabel" data-map-retry aria-label="${escapeAttr(window.siyuan.languages.refresh)}"><svg><use xlink:href="#iconRefresh"></use></svg></button>
+</div>`;
+ records.before(root);
+ ["click", "keydown", "pointerdown"].forEach(type => root.addEventListener(type, event => event.stopPropagation()));
+ const status = root.querySelector<HTMLElement>(".av__map-status");
+ const canvas = root.querySelector<HTMLElement>(".av__map-canvas");
+ const attribution = root.querySelector<HTMLElement>("[data-map-attribution]");
+ const fitButton = root.querySelector<HTMLButtonElement>("[data-map-fit]");
+ const retryButton = root.querySelector<HTMLButtonElement>("[data-map-retry]");
+ let host: AVMapHost;
+ let themeObserver: MutationObserver;
+ let resizeObserver: ResizeObserver;
+ let revision = 0;
+ const offline = () => fallback(window.siyuan.languages.mapOffline);
+ const configChanged = () => { void renderMap(blockElement, protyle, data); };
+ const current = registerMap(blockElement, {root, destroy: () => {
+ revision++;
+ host?.destroy();
+ themeObserver?.disconnect();
+ resizeObserver?.disconnect();
+ window.removeEventListener("offline", offline);
+ window.removeEventListener(MAP_CONFIG_CHANGED_EVENT, configChanged);
+ }});
+ const fallback = (message: string) => {
+ if (!current()) {
+ return;
+ }
+ revision++;
+ host?.destroy();
+ host = undefined;
+ attribution.classList.add("fn__none");
+ status.textContent = message;
+ canvas.classList.add("fn__none");
+ fitButton.classList.add("fn__none");
+ records.classList.remove("av__map-records--hidden");
+ };
+ retryButton.addEventListener("click", () => { void renderMap(blockElement, protyle, data); });
+ if (window.siyuan.isPublish) {
+ retryButton.classList.add("fn__none");
+ fallback(window.siyuan.languages.mapPublicFallback);
+ return;
+ }
+ if (protyle.options.history?.created || protyle.options.history?.snapshot) {
+ retryButton.classList.add("fn__none");
+ fallback(window.siyuan.languages.mapUnsupportedClient);
+ return;
+ }
+ window.addEventListener(MAP_CONFIG_CHANGED_EVENT, configChanged);
+ try {
+ const services = await loadMapServices();
+ if (!current()) {
+ return;
+ }
+ const settingsElement = root.querySelector<HTMLElement>(".av__map-settings");
+ settingsElement.innerHTML = getMapSettingsHTML(view, false, services);
+ bindMapSettings({protyle, blockElement, data, menuElement: settingsElement, services,
+ onChange: () => { void renderMap(blockElement, protyle, data); }});
+ if (!settings.locationKeyID) {
+ fallback(window.siyuan.languages.mapSelectLocationField);
+ return;
+ }
+ if (!view.columns.some(column => column.id === settings.locationKeyID && column.type === "location")) {
+ fallback(window.siyuan.languages.mapMissingLocationField);
+ return;
+ }
+ if (!settings.serviceID) {
+ fallback(window.siyuan.languages.mapSelectService);
+ return;
+ }
+ const service = services.find(service => service.id === settings.serviceID);
+ if (!service) {
+ fallback(window.siyuan.languages.mapMissingService);
+ return;
+ }
+ const {points, skipped} = getMapPoints(view, service.provider);
+ root.querySelector(".av__map-skipped").textContent = Object.entries(skipped).reduce((text, [key, value]) =>
+ text.replace("${" + key + "}", value.toString()), window.siyuan.languages.mapSkippedLocations);
+ if (!canLoadMapHost({published: false, history: false, protocol: window.location.protocol})) {
+ fallback(window.siyuan.languages.mapUnsupportedClient);
+ return;
+ }
+ const desktopHost = await isDesktopAVMapHostSupported();
+ const hostSupported = desktopHost || await isAVMapHostEnvironmentSupported();
+ if (!current()) {
+ return;
+ }
+ if (!hostSupported) {
+ fallback(window.siyuan.languages.mapUnsupportedClient);
+ return;
+ }
+ if (!points.length) {
+ fallback(window.siyuan.languages.mapNoMarkers);
+ return;
+ }
+ if (points.length > AV_MAP_MAX_POINTS) {
+ fallback(window.siyuan.languages.mapTooManyMarkers.replace("${limit}", AV_MAP_MAX_POINTS.toString()));
+ return;
+ }
+ if (!navigator.onLine) {
+ fallback(window.siyuan.languages.mapOffline);
+ return;
+ }
+ if (!service.configured) {
+ fallback(window.siyuan.languages.mapCredentialsMissing);
+ return;
+ }
+ status.textContent = window.siyuan.languages.mapLoading;
+ const response = await fetchSyncPost("/api/map/getRuntime", {serviceID: settings.serviceID});
+ if (!current()) {
+ return;
+ }
+ if (response.code !== 0 || response.data.provider !== service.provider) {
+ fallback(response.msg === "mapAuthenticationBypass" ? window.siyuan.languages.mapAuthenticationBypass :
+ window.siyuan.languages.mapLoadError);
+ return;
+ }
+ const rowByID = new Map(view.rows.map(row => [row.id, row]));
+ const pointIDs = new Set(points.map(point => point.id));
+ const activeRevision = ++revision;
+ // 固定官方署名链接留在父页,避免为第三方 SDK 放宽沙箱弹窗权限。
+ attribution.innerHTML = AV_MAP_ATTRIBUTION_LINKS[service.provider].map(link =>
+ `<a href="${escapeAttr(link.href)}" target="_blank" rel="noopener noreferrer">${escapeHtml(link.label)}</a>`).join(" · ");
+ canvas.classList.remove("fn__none");
+ host = (desktopHost ? createDesktopAVMapHost : createAVMapHost)(canvas, {
+ provider: response.data.provider,
+ credentials: {apiKey: response.data.apiKey, securityCode: response.data.securityCode},
+ theme: getTheme(),
+ title: window.siyuan.languages.mapView,
+ onReady: () => {
+ if (!current() || revision !== activeRevision) {
+ return;
+ }
+ status.textContent = "";
+ attribution.classList.remove("fn__none");
+ fitButton.classList.remove("fn__none");
+ records.classList.toggle("av__map-records--hidden", !settings.showRecordList && data.target?.status !== "visible");
+ },
+ onError: () => fallback(navigator.onLine ? window.siyuan.languages.mapLoadError : window.siyuan.languages.mapOffline),
+ onMarkerClick: (id, markerRevision) => {
+ if (current() && markerRevision === activeRevision && revision === activeRevision && pointIDs.has(id)) {
+ void openMapRecord(protyle, blockElement, rowByID.get(id));
+ }
+ },
+ });
+ host.setPoints(points, activeRevision);
+ fitButton.addEventListener("click", () => host?.fit());
+ themeObserver = new MutationObserver(() => host?.setTheme(getTheme()));
+ themeObserver.observe(document.documentElement, {attributes: true, attributeFilter: ["data-theme-mode"]});
+ resizeObserver = new ResizeObserver(() => host?.resize());
+ resizeObserver.observe(canvas);
+ window.addEventListener("offline", offline);
+ } catch (_error) {
+ fallback(window.siyuan.languages.mapLoadError);
+ }
+};
diff --git a/app/src/protyle/render/av/map/settings.test.ts b/app/src/protyle/render/av/map/settings.test.ts
new file mode 100644
index 0000000000..d6e6aa6b3c
--- /dev/null
+++ b/app/src/protyle/render/av/map/settings.test.ts
@@ -0,0 +1,114 @@
+import * as assert from "node:assert/strict";
+import {readFileSync} from "node:fs";
+import {test} from "node:test";
+import {runInNewContext} from "node:vm";
+import {ModuleKind, ScriptTarget, transpileModule} from "typescript";
+import * as escape from "../../../../util/escape";
+import * as state from "./state";
+
+const setup = () => {
+ const operations: Array<{perform: IOperation[]; undo: IOperation[]}> = [];
+ const menus: Array<Array<{label: string; checked: boolean; click: () => void}>> = [];
+ const opened: string[] = [];
+ const languages = {mapService: "Service", mapLocationField: "Location", mapSelectService: "Select service",
+ mapSelectLocationField: "Select field", mapShowRecordList: "Show records", mapConfigureServices: "Configure"};
+ const methods = {} as typeof import("./settings");
+ const context = {siyuan: {isPublish: false, languages}};
+ runInNewContext(transpileModule(readFileSync("src/protyle/render/av/map/settings.ts", "utf8"), {
+ compilerOptions: {module: ModuleKind.CommonJS, target: ScriptTarget.ES2022},
+ }).outputText, {exports: methods, window: context, require: (id: string) => ({
+ "./state": state,
+ "../../../../util/escape": escape,
+ "../../../wysiwyg/transaction": {transaction: (_protyle: IProtyle, perform: IOperation[], undo: IOperation[]) =>
+ operations.push({perform, undo})},
+ "../../../../config": {openMapSettings: (_app: unknown, missing: string) => opened.push(missing)},
+ "../../../../util/fetch": {fetchSyncPost: async () => ({code: 0, data: {services: [] as import("./settings").IMapServiceChoice[]}})},
+ "../viewSettingMenu": {openViewSettingMenu() {}},
+ "../../../../plugin/Menu": {Menu: class {
+ items: Array<{label: string; checked: boolean; click: () => void}> = [];
+ constructor() { menus.push(this.items); }
+ addItem(item: {label: string; checked: boolean; click: () => void}) { this.items.push(item); }
+ }},
+ })[id] || {}});
+ return {methods, operations, menus, opened, context};
+};
+
+const data = () => ({id: "database", viewID: "map-view", view: {
+ map: {serviceID: "missing-service", locationKeyID: "missing-field", showRecordList: true},
+ columns: [{id: "location", type: "location", name: "<Location>"}, {id: "text", type: "text", name: "Text"}],
+}}) as IAV;
+
+const control = (key: string, tagName = "BUTTON") => {
+ const handlers: Record<string, (event?: {preventDefault: () => void; stopPropagation: () => void}) => void> = {};
+ return {tagName, dataset: {mapSetting: key}, disabled: false, isConnected: true, value: "", checked: false,
+ hasAttribute: (name: string) => name === "data-map-configure" && key === "configure",
+ addEventListener: (type: string, handler: typeof handlers[string]) => { handlers[type] = handler; }, handlers};
+};
+
+test("map settings preserve missing IDs, escape labels, and never automatically select a service or field", () => {
+ const {methods, operations} = setup();
+ const current = data();
+ const view = current.view as IAVTable;
+ const before = JSON.stringify(view);
+ const html = methods.getMapSettingsHTML(view, false, [{id: "service", name: "<Service>", provider: "openfreemap", configured: true}]);
+ assert.match(html, /value="missing-service" selected/);
+ assert.match(html, /value="missing-field" selected/);
+ assert.match(html, /&lt;Service>/);
+ assert.match(html, /&lt;Location>/);
+ assert.doesNotMatch(html, /value="text"/);
+ assert.doesNotMatch(methods.getMapSettingsHTML(view, true), /<select/);
+ assert.equal(JSON.stringify(view), before);
+ assert.equal(operations.length, 0);
+});
+
+test("map selection uses an undoable full-settings transaction without changing cells", async () => {
+ const {methods, operations, menus} = setup();
+ const current = data();
+ const field = control("locationKeyID");
+ let updated = 0;
+ methods.bindMapSettings({data: current, protyle: {options: {}} as IProtyle,
+ blockElement: {getAttribute: () => "carrier"} as unknown as Element,
+ menuElement: {querySelectorAll: () => [field]} as unknown as Element,
+ services: [], onChange: () => updated++});
+ await field.handlers.click({preventDefault() {}, stopPropagation() {}});
+ assert.equal(menus[0].filter(item => item.checked).length, 1);
+ menus[0].find(item => item.checked).click();
+ assert.equal(operations.length, 0);
+ menus[0].find(item => item.label === "&lt;Location>").click();
+ assert.equal(updated, 1);
+ const perform = operations[0].perform[0];
+ const undo = operations[0].undo[0];
+ assert.equal(perform.action, "setAttrViewMap");
+ assert.equal(perform.avID, "database");
+ assert.equal(perform.viewID, "map-view");
+ assert.equal(perform.blockID, "carrier");
+ assert.equal(JSON.stringify(perform.data), JSON.stringify({serviceID: "missing-service", locationKeyID: "location", showRecordList: true}));
+ assert.equal(JSON.stringify(undo.data), JSON.stringify({serviceID: "missing-service", locationKeyID: "missing-field", showRecordList: true}));
+});
+
+test("readonly, history, and published maps cannot change settings or open configuration", () => {
+ for (const mode of ["disabled", "history", "published"]) {
+ const {methods, operations, opened, context} = setup();
+ const field = control("serviceID");
+ const configure = control("configure");
+ context.siyuan.isPublish = mode === "published";
+ methods.bindMapSettings({data: data(), protyle: {disabled: mode === "disabled",
+ options: {history: mode === "history" ? {created: "version"} : undefined}} as IProtyle,
+ blockElement: {} as Element, menuElement: {querySelectorAll: () => [field, configure]} as unknown as Element});
+ assert.equal(field.disabled, true);
+ assert.equal(configure.disabled, true);
+ assert.equal(Object.keys(field.handlers).length, 0);
+ assert.equal(operations.length, 0);
+ assert.equal(opened.length, 0);
+ }
+});
+
+test("map configuration forwards the preserved missing service ID for explicit device-local setup", () => {
+ const {methods, opened} = setup();
+ const configure = control("configure");
+ methods.bindMapSettings({data: data(), protyle: {options: {}} as IProtyle,
+ blockElement: {} as Element, menuElement: {querySelectorAll: () => [configure]} as unknown as Element,
+ services: []});
+ configure.handlers.click();
+ assert.deepEqual(opened, ["missing-service"]);
+});
diff --git a/app/src/protyle/render/av/map/settings.ts b/app/src/protyle/render/av/map/settings.ts
new file mode 100644
index 0000000000..77605828d6
--- /dev/null
+++ b/app/src/protyle/render/av/map/settings.ts
@@ -0,0 +1,136 @@
+import {transaction} from "../../../wysiwyg/transaction";
+import {escapeAttr, escapeHtml} from "../../../../util/escape";
+import {fetchSyncPost} from "../../../../util/fetch";
+import {Menu} from "../../../../plugin/Menu";
+import {openMapSettings} from "../../../../config";
+import {openViewSettingMenu} from "../viewSettingMenu";
+import {getMapSettings} from "./state";
+import type {AVMapProvider} from "./protocol";
+
+export interface IMapServiceChoice {
+ id: string;
+ name: string;
+ provider: AVMapProvider;
+ configured: boolean;
+}
+
+export const canEditMapSettings = (protyle: IProtyle) => !protyle.disabled && !window.siyuan.isPublish &&
+ !protyle.options.history?.created && !protyle.options.history?.snapshot;
+
+export const loadMapServices = async (): Promise<IMapServiceChoice[]> => {
+ const response = await fetchSyncPost("/api/map/getConf", {});
+ if (response.code !== 0) {
+ throw new Error("Map configuration is unavailable");
+ }
+ return response.data.services;
+};
+
+const getItems = (view: IAVTable, services: IMapServiceChoice[]) => {
+ const settings = getMapSettings(view);
+ const fields = view.columns.filter(column => column.type === "location");
+ const items: Array<{key: "serviceID" | "locationKeyID"; label: string;
+ choices: Array<{value: string; label: string}>}> = [{
+ key: "serviceID", label: window.siyuan.languages.mapService,
+ choices: [{value: "", label: window.siyuan.languages.mapSelectService},
+ ...services.map(service => ({value: service.id, label: service.name}))],
+ }, {
+ key: "locationKeyID", label: window.siyuan.languages.mapLocationField,
+ choices: [{value: "", label: window.siyuan.languages.mapSelectLocationField},
+ ...fields.map(column => ({value: column.id, label: column.name}))],
+ }];
+ items.forEach(item => {
+ const saved = settings[item.key];
+ if (saved && !item.choices.some(choice => choice.value === saved)) {
+ item.choices.push({value: saved, label: saved});
+ }
+ });
+ return items;
+};
+
+export const getMapSettingsHTML = (view: IAVTable, asMenu = false, services: IMapServiceChoice[] = []) => {
+ const settings = getMapSettings(view);
+ return getItems(view, services).map(item => {
+ const value = settings[item.key];
+ const label = item.choices.find(choice => choice.value === value)?.label || value;
+ if (asMenu) {
+ return `<button class="b3-menu__item" data-map-setting="${item.key}">
+ <span class="fn__flex-center">${item.label}</span><span class="fn__flex-1"></span>
+ <span class="b3-menu__accelerator">${escapeHtml(label)}</span>
+ <svg class="b3-menu__icon b3-menu__icon--small"><use xlink:href="#iconRight"></use></svg>
+</button>`;
+ }
+ return `<label class="av__map-setting"><span>${item.label}</span>
+ <select class="b3-select" data-map-setting="${item.key}" aria-label="${escapeAttr(item.label)}">
+ ${item.choices.map(choice => `<option value="${escapeAttr(choice.value)}"${choice.value === value ? " selected" : ""}>${escapeHtml(choice.label)}</option>`).join("")}
+ </select></label>`;
+ }).join("") + `<label class="${asMenu ? "b3-menu__item" : "av__map-setting"}">
+ <span class="fn__flex-center">${window.siyuan.languages.mapShowRecordList}</span>
+ ${asMenu ? '<span class="fn__space fn__flex-1"></span>' : ""}
+ <input data-map-setting="showRecordList" type="checkbox" class="b3-switch${asMenu ? " b3-switch--menu" : ""}"${settings.showRecordList ? " checked" : ""}>
+</label>
+<button type="button" class="${asMenu ? "b3-menu__item" : "b3-button b3-button--outline"}" data-map-configure>${window.siyuan.languages.mapConfigureServices}</button>`;
+};
+
+export const bindMapSettings = (options: {
+ protyle: IProtyle;
+ blockElement: Element;
+ data: IAV;
+ menuElement: Element;
+ services?: IMapServiceChoice[];
+ onChange?: () => void;
+}) => {
+ const controls = options.menuElement.querySelectorAll<HTMLSelectElement | HTMLButtonElement | HTMLInputElement>("[data-map-setting], [data-map-configure]");
+ if (!canEditMapSettings(options.protyle)) {
+ controls.forEach(control => { control.disabled = true; });
+ return;
+ }
+ const view = options.data.view as IAVTable;
+ const update = (key: keyof IAVMapSettings, value: string | boolean) => {
+ if (!canEditMapSettings(options.protyle)) {
+ return;
+ }
+ const previous = getMapSettings(view);
+ if (previous[key] === value) {
+ return;
+ }
+ const next = {...previous, [key]: value};
+ const operation = {action: "setAttrViewMap" as const, avID: options.data.id,
+ blockID: options.blockElement.getAttribute("data-node-id"), viewID: options.data.viewID};
+ transaction(options.protyle, [{...operation, data: next}], [{...operation, data: previous}]);
+ view.map = next;
+ options.onChange?.();
+ };
+ controls.forEach(control => {
+ if (control.hasAttribute("data-map-configure")) {
+ control.addEventListener("click", async () => {
+ const services = options.services || await loadMapServices().catch((): IMapServiceChoice[] => undefined);
+ if (!control.isConnected) {
+ return;
+ }
+ const saved = getMapSettings(view).serviceID;
+ const missing = saved && services && !services.some(service => service.id === saved) ? saved : undefined;
+ openMapSettings(options.protyle.app, missing);
+ });
+ return;
+ }
+ const key = control.dataset.mapSetting as keyof IAVMapSettings;
+ if (control.tagName === "BUTTON") {
+ control.addEventListener("click", async event => {
+ event.preventDefault();
+ event.stopPropagation();
+ const services = options.services || await loadMapServices().catch(() => [] as IMapServiceChoice[]);
+ if (!control.isConnected) {
+ return;
+ }
+ const item = getItems(view, services).find(item => item.key === key);
+ const menu = new Menu();
+ item.choices.forEach(choice => menu.addItem({iconHTML: "", label: escapeHtml(choice.label),
+ checked: getMapSettings(view)[key] === choice.value, click: () => update(key, choice.value)}));
+ openViewSettingMenu(menu, control);
+ });
+ } else {
+ control.addEventListener("change", () => update(key, key === "showRecordList" ?
+ (control as HTMLInputElement).checked : control.value));
+ }
+ });
+};
diff --git a/app/src/protyle/render/av/map/state.test.ts b/app/src/protyle/render/av/map/state.test.ts
new file mode 100644
index 0000000000..047b4cca80
--- /dev/null
+++ b/app/src/protyle/render/av/map/state.test.ts
@@ -0,0 +1,119 @@
+import * as assert from "node:assert/strict";
+import {test} from "node:test";
+import {canLoadMapHost, destroyMap, getMapPoints, getMapSettings, registerMap} from "./state";
+import {AV_MAP_MAX_POINTS} from "./protocol";
+
+const table = (locations: IAVCellLocationValue[]) => ({
+ rowCount: locations.length,
+ map: {serviceID: "saved-service", locationKeyID: "location", showRecordList: false},
+ columns: [{id: "primary", type: "block"}, {id: "location", type: "location", hidden: true}],
+ rows: locations.map((location, index) => ({id: `row-${index}`, cells: [
+ {value: {type: "block", block: {content: "Private title"}}},
+ {value: {type: "location", keyID: "location", location}},
+ ]})),
+}) as IAVTable;
+
+test("map uses hidden selected fields and copies only valid compatible IDs and coordinates", () => {
+ const view = table([
+ {latitude: 0, longitude: 0, coordinateSystem: "wgs84", name: "Private", originalInput: "Private source"},
+ {name: "No coordinates"},
+ {latitude: 91, longitude: 0, coordinateSystem: "wgs84"},
+ {latitude: 0, longitude: 0, coordinateSystem: "unknown"},
+ {latitude: 0, longitude: 0},
+ {latitude: 0, longitude: 0, coordinateSystem: "gcj02"},
+ {latitude: 0, longitude: 0, coordinateSystem: "bd09"},
+ {latitude: 0, longitude: null, coordinateSystem: "wgs84"},
+ ]);
+ const before = JSON.stringify(view);
+ const result = getMapPoints(view, "openfreemap");
+ assert.deepEqual(result.points, [{id: "row-0", longitude: 0, latitude: 0, coordinateSystem: "wgs84"}]);
+ assert.deepEqual(result.skipped, {empty: 1, invalid: 2, unknown: 2, mismatch: 2, projection: 0});
+ assert.equal(JSON.stringify(view), before);
+ assert.equal(getMapPoints(view, "amap").points[0].id, "row-5");
+ assert.equal(getMapPoints(view, "tencent").points[0].id, "row-5");
+ assert.deepEqual(getMapPoints(view, "baidu").points.map(point => point.id), ["row-5", "row-6"]);
+});
+
+test("map preserves valid polar coordinates but counts unsupported projection separately", () => {
+ const view = table([
+ {latitude: 90, longitude: 0, coordinateSystem: "wgs84"},
+ {latitude: -90, longitude: 0, coordinateSystem: "wgs84"},
+ {latitude: 85.0511287798066, longitude: 180, coordinateSystem: "wgs84"},
+ ]);
+ const original = JSON.stringify(view);
+ const result = getMapPoints(view, "openfreemap");
+ assert.equal(result.skipped.projection, 2);
+ assert.equal(result.skipped.invalid, 0);
+ assert.equal(result.points.length, 1);
+ assert.equal(JSON.stringify(view), original);
+});
+
+test("missing or changed location fields retain their saved identifiers and do not fall back", () => {
+ const view = table([{latitude: 0, longitude: 0, coordinateSystem: "wgs84"}]);
+ view.map.locationKeyID = "removed";
+ assert.equal(getMapPoints(view, "openfreemap").missingField, true);
+ assert.equal(getMapSettings(view).locationKeyID, "removed");
+ view.map.locationKeyID = "primary";
+ assert.equal(getMapPoints(view, "openfreemap").missingField, true);
+ assert.deepEqual(getMapSettings(view), {serviceID: "saved-service", locationKeyID: "primary", showRecordList: false});
+ assert.deepEqual(getMapSettings({} as IAVTable), {serviceID: "", locationKeyID: "", showRecordList: true});
+});
+
+test("map does not silently truncate the loaded page before the explicit rendering limit", () => {
+ const view = table(Array.from({length: AV_MAP_MAX_POINTS + 1}, () => ({
+ latitude: 0, longitude: 0, coordinateSystem: "wgs84" as const,
+ })));
+ assert.equal(getMapPoints(view, "openfreemap").points.length, AV_MAP_MAX_POINTS + 1);
+});
+
+test("map document eligibility excludes public, history and non-HTTP contexts before host capability checks", () => {
+ const context = {published: false, history: false, protocol: "https:"};
+ assert.equal(canLoadMapHost(context), true);
+ assert.equal(canLoadMapHost({...context, protocol: "http:"}), true);
+ for (const change of [{published: true}, {history: true}, {protocol: "file:"}]) {
+ assert.equal(canLoadMapHost({...context, ...change}), false);
+ }
+});
+
+test("map lifecycle is independent per editor and releases removed or replaced hosts", () => {
+ const previousObserver = Object.getOwnPropertyDescriptor(globalThis, "MutationObserver");
+ const previousDocument = Object.getOwnPropertyDescriptor(globalThis, "document");
+ let removal: () => void;
+ let disconnected = 0;
+ Object.assign(globalThis, {document: {body: {}}, MutationObserver: class {
+ constructor(callback: () => void) { removal = callback; }
+ observe() {}
+ disconnect() { disconnected++; }
+ }});
+ const rootA = {isConnected: true} as HTMLElement;
+ const rootB = {isConnected: true} as HTMLElement;
+ const blockA = {isConnected: true, contains: (root: HTMLElement) => root === rootA} as HTMLElement;
+ const blockB = {isConnected: true, contains: (root: HTMLElement) => root === rootB} as HTMLElement;
+ let disposedA = 0;
+ let disposedB = 0;
+ try {
+ const first = registerMap(blockA, {root: rootA, destroy: () => disposedA++});
+ const second = registerMap(blockB, {root: rootB, destroy: () => disposedB++});
+ assert.equal(first(), true);
+ assert.equal(second(), true);
+ const replacement = registerMap(blockA, {root: rootA, destroy: () => disposedA++});
+ assert.equal(disposedA, 1);
+ assert.equal(first(), false);
+ assert.equal(replacement(), true);
+ Object.assign(rootA, {isConnected: false});
+ removal();
+ assert.equal(disposedA, 2);
+ assert.equal(second(), true);
+ assert.equal(disposedB, 0);
+ destroyMap(blockB);
+ assert.equal(disposedB, 1);
+ assert.equal(disconnected, 1);
+ } finally {
+ destroyMap(blockA);
+ destroyMap(blockB);
+ if (previousObserver) Object.defineProperty(globalThis, "MutationObserver", previousObserver);
+ else Reflect.deleteProperty(globalThis, "MutationObserver");
+ if (previousDocument) Object.defineProperty(globalThis, "document", previousDocument);
+ else Reflect.deleteProperty(globalThis, "document");
+ }
+});
diff --git a/app/src/protyle/render/av/map/state.ts b/app/src/protyle/render/av/map/state.ts
new file mode 100644
index 0000000000..15bc7bbcd4
--- /dev/null
+++ b/app/src/protyle/render/av/map/state.ts
@@ -0,0 +1,85 @@
+import {hasAVLocationCoordinates, validateAVLocation} from "../locationValue";
+import type {AVMapPoint, AVMapProvider} from "./protocol";
+import {isAVMapIdentifier, isAVMapProjectionSupported, supportsAVMapCoordinateSystem} from "./protocol";
+
+export const getMapSettings = (view: IAVTable): IAVMapSettings => ({
+ serviceID: view.map?.serviceID || "",
+ locationKeyID: view.map?.locationKeyID || "",
+ showRecordList: view.map?.showRecordList !== false,
+});
+
+// 只使用选定字段的已加载行,缺失或不兼容的来源坐标不会被猜测或改写。
+export const getMapPoints = (view: IAVTable, provider: AVMapProvider) => {
+ const points: AVMapPoint[] = [];
+ const skipped = {empty: 0, invalid: 0, unknown: 0, mismatch: 0, projection: 0};
+ const fieldID = getMapSettings(view).locationKeyID;
+ const fieldIndex = view.columns.findIndex(column => column.id === fieldID && column.type === "location");
+ if (fieldIndex < 0) {
+ return {points, skipped, missingField: true};
+ }
+ const used = new Set<string>();
+ view.rows.forEach(row => {
+ const cell = row.cells.find(item => item.value?.keyID === fieldID) || row.cells[fieldIndex];
+ const location = cell?.value?.type === "location" ? cell.value.location : undefined;
+ if (!location || location.latitude == null && location.longitude == null) {
+ skipped.empty++;
+ } else if (!validateAVLocation(location) || !hasAVLocationCoordinates(location) || !isAVMapIdentifier(row.id) || used.has(row.id)) {
+ skipped.invalid++;
+ } else if (!location.coordinateSystem || location.coordinateSystem === "unknown") {
+ skipped.unknown++;
+ } else if (!supportsAVMapCoordinateSystem(provider, location.coordinateSystem)) {
+ skipped.mismatch++;
+ } else if (!isAVMapProjectionSupported(provider, location.latitude)) {
+ skipped.projection++;
+ } else {
+ used.add(row.id);
+ points.push({id: row.id, longitude: location.longitude, latitude: location.latitude,
+ coordinateSystem: location.coordinateSystem});
+ }
+ });
+ return {points, skipped, missingField: false};
+};
+
+export const canLoadMapHost = (context: {
+ published: boolean;
+ history: boolean;
+ protocol: string;
+}) => !context.published && !context.history && ["http:", "https:"].includes(context.protocol);
+
+interface IMapLifecycle {
+ root: HTMLElement;
+ destroy: () => void;
+}
+
+const lifecycles = new WeakMap<HTMLElement, IMapLifecycle>();
+const mountedBlocks = new Set<HTMLElement>();
+let removalObserver: MutationObserver;
+
+export const destroyMap = (blockElement: HTMLElement) => {
+ const state = lifecycles.get(blockElement);
+ lifecycles.delete(blockElement);
+ mountedBlocks.delete(blockElement);
+ state?.destroy();
+ if (mountedBlocks.size === 0) {
+ removalObserver?.disconnect();
+ removalObserver = undefined;
+ }
+};
+
+export const registerMap = (blockElement: HTMLElement, state: IMapLifecycle) => {
+ destroyMap(blockElement);
+ lifecycles.set(blockElement, state);
+ mountedBlocks.add(blockElement);
+ if (!removalObserver) {
+ removalObserver = new MutationObserver(() => {
+ mountedBlocks.forEach(block => {
+ const current = lifecycles.get(block);
+ if (!block.isConnected || !current?.root.isConnected || !block.contains(current.root)) {
+ destroyMap(block);
+ }
+ });
+ });
+ removalObserver.observe(document.body, {childList: true, subtree: true});
+ }
+ return () => lifecycles.get(blockElement) === state && state.root.isConnected && blockElement.contains(state.root);
+};
diff --git a/app/src/protyle/render/av/map/wrapperEntry.test.ts b/app/src/protyle/render/av/map/wrapperEntry.test.ts
new file mode 100644
index 0000000000..d1f714e23b
--- /dev/null
+++ b/app/src/protyle/render/av/map/wrapperEntry.test.ts
@@ -0,0 +1,65 @@
+import * as assert from "node:assert/strict";
+import {describe, it} from "node:test";
+import {connectAVMapWrapper} from "./wrapperEntry";
+
+describe("trusted map navigation wrapper", () => {
+ it("authenticates both sides, preserves the opaque sandbox, and transfers only one port after bootstrap", () => {
+ const instanceID = "a".repeat(48);
+ const nonce = "b".repeat(48);
+ const origin = "https://fixture.invalid";
+ const attributes: Record<string, string> = {};
+ const parentMessages: any[] = [];
+ const childMessages: any[] = [];
+ const listeners = new Map<string, (event?: any) => void>();
+ let appended = 0;
+ let removed = 0;
+ const child = {src: "", style: {}, credentialless: false,
+ setAttribute: (key: string, value: string) => { attributes[key] = value; },
+ contentWindow: {postMessage: (...args: any[]) => childMessages.push(args)}, remove() { removed++; }};
+ const scope = {
+ location: {hash: `#${instanceID}:${nonce}`, search: "?provider=amap", protocol: "https:", origin},
+ parent: {postMessage: (...args: any[]) => parentMessages.push(args)},
+ document: {createElement: () => child, body: {appendChild() { appended++; }}},
+ setTimeout() { return 1; }, clearTimeout() {},
+ addEventListener: (type: string, callback: (event?: any) => void) => listeners.set(type, callback),
+ removeEventListener: (type: string) => listeners.delete(type),
+ };
+ connectAVMapWrapper(scope as unknown as Window);
+ const onMessage = listeners.get("message");
+ assert.equal(parentMessages[0][0].type, "wrapperHello");
+ const fromParent = {source: scope.parent, origin, ports: [] as unknown[],
+ data: {version: 1, instanceID, nonce, type: "prepare", nativeBoundary: true}};
+ onMessage({...fromParent, origin: "null"});
+ onMessage({...fromParent, source: {}});
+ onMessage({...fromParent, data: {...fromParent.data, nonce: "old"}});
+ assert.equal(appended, 0);
+ onMessage(fromParent);
+ onMessage(fromParent);
+ assert.equal(appended, 1);
+ assert.equal(attributes.sandbox, "allow-scripts");
+ assert.equal(child.credentialless, true);
+ assert.equal(child.src, `/stage/map/index.html?provider=amap#${instanceID}:${nonce}`);
+ const port = {};
+ const connect = {...fromParent, ports: [port], data: {...fromParent.data, type: "connect"}};
+ onMessage(connect);
+ assert.equal(childMessages.length, 0);
+ const fromChild = {source: child.contentWindow, origin: "null", ports: [] as unknown[],
+ data: {version: 1, instanceID, nonce, type: "hello"}};
+ onMessage({...fromChild, origin});
+ onMessage({...fromChild, source: {}});
+ assert.equal(childMessages.length, 0);
+ onMessage(fromChild);
+ assert.deepEqual(childMessages[0][0], {version: 1, instanceID, nonce, type: "prepare", nativeBoundary: true});
+ onMessage({...fromChild, data: {...fromChild.data, type: "bootstrapReady"}});
+ assert.equal(parentMessages[parentMessages.length - 1][0].type, "bootstrapReady");
+ onMessage(connect);
+ onMessage(connect);
+ assert.equal(childMessages.length, 2);
+ assert.equal(childMessages[1][2][0], port);
+ assert.equal(listeners.has("message"), false);
+ listeners.get("pagehide")();
+ assert.equal(removed, 1);
+ onMessage(fromParent);
+ assert.equal(appended, 1);
+ });
+});
diff --git a/app/src/protyle/render/av/map/wrapperEntry.ts b/app/src/protyle/render/av/map/wrapperEntry.ts
new file mode 100644
index 0000000000..b3c1f16aa0
--- /dev/null
+++ b/app/src/protyle/render/av/map/wrapperEntry.ts
@@ -0,0 +1,73 @@
+import {isAVMapProvider} from "./protocol";
+import {isAVMapBootstrapMessage} from "./hostCapabilities";
+
+// 可信 wrapper 不加载 SDK、不处理记录或凭证,只把一次业务端口交给固定 opaque 子框架。
+export const connectAVMapWrapper = (scope: Window) => {
+ const [instanceID, nonce] = scope.location.hash.slice(1).split(":");
+ const provider = new URLSearchParams(scope.location.search).get("provider");
+ if (scope.parent === scope || !/^https?:$/.test(scope.location.protocol) ||
+ !/^[a-f0-9]{48}$/.test(instanceID || "") || !/^[a-f0-9]{48}$/.test(nonce || "") || !isAVMapProvider(provider)) {
+ return;
+ }
+ const envelope = {version: 1, instanceID, nonce};
+ let child: HTMLIFrameElement;
+ let nativeBoundary = false;
+ let booted = false;
+ let ready = false;
+ let connected = false;
+ let closed = false;
+ const cleanup = () => {
+ closed = true;
+ scope.clearTimeout(timer);
+ scope.removeEventListener("message", onMessage);
+ child?.remove();
+ };
+ const onMessage = (event: MessageEvent) => {
+ if (closed) {
+ return;
+ }
+ if (event.source === scope.parent && event.origin === scope.location.origin) {
+ if (!child && event.ports.length === 0 && isAVMapBootstrapMessage(event.data, "prepare", instanceID, nonce)) {
+ nativeBoundary = event.data.nativeBoundary === true;
+ child = scope.document.createElement("iframe");
+ child.setAttribute("sandbox", "allow-scripts");
+ child.setAttribute("allow", "geolocation 'none'; camera 'none'; microphone 'none'; clipboard-read 'none'; clipboard-write 'none'");
+ if ("credentialless" in child) {
+ (child as HTMLIFrameElement & {credentialless: boolean}).credentialless = true;
+ }
+ child.referrerPolicy = "strict-origin-when-cross-origin";
+ child.style.cssText = "width:100%;height:100%;border:0;display:block";
+ child.src = `/stage/map/index.html?provider=${provider}#${instanceID}:${nonce}`;
+ scope.document.body.appendChild(child);
+ } else if (ready && !connected && event.ports.length === 1 &&
+ isAVMapBootstrapMessage(event.data, "connect", instanceID, nonce)) {
+ connected = true;
+ child.contentWindow.postMessage({...envelope, type: "connect"}, "*", [event.ports[0]]);
+ scope.removeEventListener("message", onMessage);
+ scope.clearTimeout(timer);
+ }
+ return;
+ }
+ if (!child || event.source !== child.contentWindow || event.origin !== "null" || event.ports.length !== 0) {
+ return;
+ }
+ if (!booted && isAVMapBootstrapMessage(event.data, "hello", instanceID, nonce)) {
+ booted = true;
+ child.contentWindow.postMessage({...envelope, type: "prepare", nativeBoundary}, "*");
+ } else if (booted && !ready && isAVMapBootstrapMessage(event.data, "bootstrapReady", instanceID, nonce)) {
+ ready = true;
+ scope.parent.postMessage({...envelope, type: "bootstrapReady"}, scope.location.origin);
+ } else if (booted && isAVMapBootstrapMessage(event.data, "bootstrapError", instanceID, nonce)) {
+ scope.parent.postMessage({...envelope, type: "bootstrapError"}, scope.location.origin);
+ cleanup();
+ }
+ };
+ const timer = scope.setTimeout(cleanup, 30000);
+ scope.addEventListener("message", onMessage);
+ scope.addEventListener("pagehide", cleanup, {once: true});
+ scope.parent.postMessage({...envelope, type: "wrapperHello"}, scope.location.origin);
+};
+
+if (typeof window !== "undefined") {
+ connectAVMapWrapper(window);
+}
diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts
index 08335132cd..db4623a639 100644
--- a/app/src/protyle/render/av/render.ts
+++ b/app/src/protyle/render/av/render.ts
@@ -1,5 +1,7 @@
import {isAVSelectType} from "./capabilities";
import {renderCalendar} from "./calendar/render";
+import {renderMap} from "./map/render";
+import {destroyMap} from "./map/state";
import {isFoldedRenderContent} from "../foldedContent";
import {getCalendarRequestRange} from "./calendar/state";
import {isTableLikeView} from "./viewType";
@@ -206,7 +208,7 @@ export const genTabHeaderHTML = (data: IAV, showSearch: boolean, editable: boole
const getTableHTMLs = (data: IAVTable, e: HTMLElement, virtualData: IAVVirtualData,
reserveVirtualHeight = false) => {
- const viewType = e.dataset.avType === "list" ? "list" : "table";
+ const viewType = e.dataset.avType === "list" || e.dataset.avType === "map" ? "list" : "table";
let calcHTML = "";
let contentHTML = '<div class="av__row av__row--header"><div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div></div>';
let freezeIndex = -1;
@@ -734,6 +736,7 @@ export const avRender = async (element: Element, protyle: IProtyle, cb?: (data:
setAVVisibleViewIDs(e, getAVVisibleViewIDs(e, data.views));
}
prepareAVLocate(e, data, resetData);
+ destroyMap(e);
if (data.viewType === "calendar") {
await renderCalendar(e, protyle, data, cb);
continue;
@@ -773,6 +776,9 @@ export const avRender = async (element: Element, protyle: IProtyle, cb?: (data:
blockElement: e,
resetData
});
+ if (data.viewType === "map") {
+ await renderMap(e, protyle, data);
+ }
// 历史兼容
e.style.margin = "";
}
diff --git a/app/src/protyle/render/av/row.ts b/app/src/protyle/render/av/row.ts
index 042badb732..96fd3e8c64 100644
--- a/app/src/protyle/render/av/row.ts
+++ b/app/src/protyle/render/av/row.ts
@@ -206,7 +206,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, options.ro
}
const tableRow = options.row as IAVRow;
const tableData = options.data as IAVTable;
- const isList = options.type === "list";
+ const isList = options.type === "list" || options.type === "map";
const pinIndex = isList ? -1 : options.pinIndex;
html = `<div class="av__row${tableRow.conditionalColors ? " av__row--conditional" : ""}" data-index="${options.rowIndex}" data-id="${tableRow.id}" style="${getConditionalItemStyle(tableRow)}">`;
@@ -425,7 +425,7 @@ export const insertAttrViewBlockAnimation = (options: {
return previousElement;
};
options.blockElement.querySelector('[data-type="av-search"]').textContent = "";
- const isList = options.blockElement.getAttribute("data-av-type") === "list";
+ const isList = ["list", "map"].includes(options.blockElement.getAttribute("data-av-type"));
const groupQuery = options.groupID ? `.av__body[data-group-id="${options.groupID}"] ` : "";
let previousElement = options.blockElement.querySelector(groupQuery + `.av__row[data-id="${options.previousId}"]`) || options.blockElement.querySelector(groupQuery + ".av__row--header");
// 有排序需要加入最后一行
diff --git a/app/src/protyle/render/av/view.ts b/app/src/protyle/render/av/view.ts
index 69c39f202c..0321e4f769 100644
--- a/app/src/protyle/render/av/view.ts
+++ b/app/src/protyle/render/av/view.ts
@@ -320,10 +320,10 @@ export const getViewHTML = (data: IAV) => {
<span class="b3-menu__accelerator">${view.sorts.length}</span>
<svg class="b3-menu__icon b3-menu__icon--small"><use xlink:href="#iconRight"></use></svg>
</button>
-<button class="b3-menu__item${data.viewType === "calendar" ? " fn__none" : ""}" data-type="goGroups">
+<button class="b3-menu__item${["calendar", "map"].includes(data.viewType) ? " fn__none" : ""}" data-type="goGroups">
<svg class="b3-menu__icon"><use xlink:href="#iconGroups"></use></svg>
<span class="b3-menu__label">${window.siyuan.languages.group}</span>
- <span class="b3-menu__accelerator">${escapeHtml((data.view.group && data.view.group.field) ? fields.filter((item: IAVColumn) => item.id === data.view.group.field)[0].name : "")}</span>
+ <span class="b3-menu__accelerator">${escapeHtml((data.view.group && data.view.group.field) ? fields.find((item: IAVColumn) => item.id === data.view.group.field)?.name || "" : "")}</span>
<svg class="b3-menu__icon b3-menu__icon--small"><use xlink:href="#iconRight"></use></svg>
</button>
<button class="b3-menu__separator"></button>
@@ -570,6 +570,15 @@ export const addView = (protyle: IProtyle, blockElement: Element) => {
transaction(protyle, [{...context, action: "addAttrViewView"}], [{...context, action: "removeAttrViewView"}]);
}
});
+ addMenu.addItem({
+ icon: "iconGlobe",
+ label: window.siyuan.languages.mapView,
+ click() {
+ addVisibleView();
+ const context = {avID, id, blockID: blockElement.getAttribute("data-node-id"), layout: "map"};
+ transaction(protyle, [{...context, action: "addAttrViewView"}], [{...context, action: "removeAttrViewView"}]);
+ }
+ });
viewElement.classList.add("av__views--show");
const addRect = viewElement.querySelector('.block__icon[data-type="av-add"]')?.getBoundingClientRect();
addMenu.open({
@@ -581,6 +590,8 @@ export const addView = (protyle: IProtyle, blockElement: Element) => {
export const getViewIcon = (type: string) => {
switch (type) {
+ case "map":
+ return "iconGlobe";
case "calendar":
return "iconCalendar";
case "table":
@@ -596,6 +607,8 @@ export const getViewIcon = (type: string) => {
export const getViewName = (type: string) => {
switch (type) {
+ case "map":
+ return window.siyuan.languages.mapView;
case "calendar":
return window.siyuan.languages.calendarView;
case "table":
diff --git a/app/src/protyle/render/av/viewType.ts b/app/src/protyle/render/av/viewType.ts
index 0471dcf7eb..67c17d20ac 100644
--- a/app/src/protyle/render/av/viewType.ts
+++ b/app/src/protyle/render/av/viewType.ts
@@ -1,2 +1,2 @@
-// 表格和列表共享行列数据及单元格交互,布局选项仍由各视图独立处理。
-export const isTableLikeView = (type: string | undefined | null) => type === "table" || type === "list";
+// 表格、列表和地图记录列表共享行列数据及单元格交互,布局选项仍由各视图独立处理。
+export const isTableLikeView = (type: string | undefined | null) => type === "table" || type === "list" || type === "map";
diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.ts
index 8cd280b018..7a109ab159 100644
--- a/app/src/protyle/util/insertHTML.ts
+++ b/app/src/protyle/util/insertHTML.ts
@@ -168,7 +168,7 @@ const insertAVPastePlaceholder = (bodyElement: HTMLElement, view: IAVTable, row:
row,
rowIndex,
pinIndex: getAVPastePinIndex(bodyElement),
- type: bodyElement.closest<HTMLElement>(".av")?.dataset.avType === "list" ? "list" : "table",
+ type: ["list", "map"].includes(bodyElement.closest<HTMLElement>(".av")?.dataset.avType) ? "list" : "table",
}));
const rowElement = bottomElement.previousElementSibling as HTMLElement;
rowElement.classList.add(PLACEHOLDER_ROW_CLASS);
@@ -213,7 +213,7 @@ const syncAVPasteRowCells = (options: {
row: options.row,
rowIndex: options.rowIndex,
pinIndex: getAVPastePinIndex(options.bodyElement),
- type: options.bodyElement.closest<HTMLElement>(".av")?.dataset.avType === "list" ? "list" : "table",
+ type: ["list", "map"].includes(options.bodyElement.closest<HTMLElement>(".av")?.dataset.avType) ? "list" : "table",
});
options.columnIDs.forEach(columnID => {
const nextCell = template.content.querySelector(`.av__cell[data-col-id="${columnID}"]`) as HTMLElement;
diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts
index fbd7682f1c..9dc6b8442d 100644
--- a/app/src/protyle/util/onGet.ts
+++ b/app/src/protyle/util/onGet.ts
@@ -23,6 +23,7 @@ import {showMessage} from "../../dialog/message";
import {avRender} from "../render/av/render";
import {clearReadonlyAVState} from "../render/av/readonlyState";
import {refreshCalendarReadonly} from "../render/av/calendar/render";
+import {refreshMapReadonly} from "../render/av/map/render";
import {hideTooltip} from "../../dialog/tooltip";
import {stickyRow} from "../render/av/row";
import {getContenteditableElement} from "../wysiwyg/getBlock";
@@ -570,6 +571,7 @@ export const disabledProtyle = (protyle: IProtyle) => {
disabledWYSIWYG(protyle.wysiwyg.element);
if (!wasDisabled) {
refreshCalendarReadonly(protyle);
+ refreshMapReadonly(protyle);
}
if (protyle.breadcrumb) {
const readonlyButton = protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"]');
@@ -640,6 +642,7 @@ export const enableProtyle = (protyle: IProtyle) => {
}
});
refreshCalendarReadonly(protyle);
+ refreshMapReadonly(protyle);
}
if (protyle.breadcrumb) {
const readonlyButton = protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"]');
diff --git a/app/src/protyle/util/onGetReadonlyBars.test.ts b/app/src/protyle/util/onGetReadonlyBars.test.ts
index 2d4f709739..8f21cffd96 100644
--- a/app/src/protyle/util/onGetReadonlyBars.test.ts
+++ b/app/src/protyle/util/onGetReadonlyBars.test.ts
@@ -35,7 +35,7 @@ for (const enable of [false, true]) {
state = reduceMobileBarsState(state, {type: "set-programmatic-scrolling", active: true});
},
hideElements() {}, updateMobileTitleReadonly() {}, disabledWYSIWYG() {},
- refreshCalendarReadonly() {}, hideTooltip() {}, isMobile: () => true,
+ refreshCalendarReadonly() {}, refreshMapReadonly() {}, hideTooltip() {}, isMobile: () => true,
isIPhone: () => false, isAndroid: () => true,
});
(enable ? exports.enable : exports.disable)();
diff --git a/app/src/protyle/util/transactionContract.ts b/app/src/protyle/util/transactionContract.ts
index 80f77f5eec..5f7e68e1f8 100644
--- a/app/src/protyle/util/transactionContract.ts
+++ b/app/src/protyle/util/transactionContract.ts
@@ -42,6 +42,7 @@ const transactionActions: Record<IOperation["action"], true> = {
"setAttrViewColDesc": true,
"setAttrViewColAttributePanelVisibility": true,
"setAttrViewColLocationDefaultCoordinateSystem": true,
+ "setAttrViewMap": true,
"insertAttrViewBlock": true,
"removeAttrViewBlock": true,
"addAttrViewCol": true,
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts
index 7f5cc1725d..8a31123d52 100644
--- a/app/src/protyle/wysiwyg/transaction.ts
+++ b/app/src/protyle/wysiwyg/transaction.ts
@@ -1493,7 +1493,7 @@ export const onTransaction = (protyle: IProtyle, operations: IOperation[], isUnd
"setAttrViewColRollupFilters", "sortAttrViewKey", "setAttrViewColDesc", "setAttrViewColAttributePanelVisibility", "setAttrViewColLocationDefaultCoordinateSystem",
"duplicateAttrViewKey", "setAttrViewViewDesc", "setAttrViewCoverFrom", "setAttrViewCoverFromAssetKeyID", "setAttrViewCardCoverPosition",
"setAttrViewBlockView", "setAttrViewBlockVisibleViews", "setAttrViewContextFilter", "setAttrViewCardSize", "setAttrViewCardWidth", "setAttrViewCardAspectRatio",
- "setAttrViewConditionalColors", "setAttrViewCalendar", "setAttrViewCardAspectRatioValue", "setAttrViewCardLayout", "setAttrViewColFullRow", "hideAttrViewName", "setAttrViewShowIcon",
+ "setAttrViewConditionalColors", "setAttrViewCalendar", "setAttrViewMap", "setAttrViewCardAspectRatioValue", "setAttrViewCardLayout", "setAttrViewColFullRow", "hideAttrViewName", "setAttrViewShowIcon",
"setAttrViewWrapField", "setAttrViewGroup", "removeAttrViewGroup", "hideAttrViewGroup", "sortAttrViewGroup",
"foldAttrViewGroup", "foldAttrViewGroups", "hideAttrViewAllGroups", "setAttrViewFitImage", "setAttrViewDisplayFieldName", "setAttrViewDisplayEmptyFields",
"insertAttrViewBlock", "setAttrViewColDateFillSpecificTime", "setAttrViewFillColBackgroundColor", "setAttrViewUpdatedIncludeTime",
diff --git a/app/src/types/api/index.d.ts b/app/src/types/api/index.d.ts
index 4776be0317..e2915c33e0 100644
--- a/app/src/types/api/index.d.ts
+++ b/app/src/types/api/index.d.ts
@@ -212,7 +212,7 @@ export type AIToolEffectsInput = { "dataEgress"?: boolean | null; "externalCost"
export type AIUserSkillInfo = { "description": string; "enabled": boolean; "id": string; "name": string; "shadowed": boolean; };
-export type AVArchiveRenderData = { "colorOrder": Array<string> | null; "customColors": Array<AVAttributeViewCustomColor | null> | null; "defaultTemplateID": string; "id": string; "isMirror": boolean; "name": string; "newItemTemplates": Array<AVNewItemTemplate | null> | null; "usedCustomColorIndexes": Array<number> | null; "view": AVViewInstance; "viewID": string; "viewType": "table" | "list" | "gallery" | "kanban" | "calendar"; "views": Array<AVViewData | null> | null; };
+export type AVArchiveRenderData = { "colorOrder": Array<string> | null; "customColors": Array<AVAttributeViewCustomColor | null> | null; "defaultTemplateID": string; "id": string; "isMirror": boolean; "name": string; "newItemTemplates": Array<AVNewItemTemplate | null> | null; "usedCustomColorIndexes": Array<number> | null; "view": AVViewInstance; "viewID": string; "viewType": "table" | "list" | "gallery" | "kanban" | "calendar" | "map"; "views": Array<AVViewData | null> | null; };
export type AVAttributeViewBacklink = { "avID": string; "avName": string; "blockIDs": Array<string> | null; "boundBlockID": string; "boxID": string; "databaseBlockID": string; "databasePath": string; "icon": string; "isDetached": boolean; "itemID": string; "relations": Array<AVAttributeViewBacklinkRelation | null> | null; "title": string; "valueID": string; };
@@ -238,7 +238,7 @@ export type AVAttributeViewCustomColorInput = { "dark"?: AVAttributeViewColorThe
export type AVAttributeViewData = { "automations"?: AVAutomationConfig; "cardCoverPositions"?: Record<string, Record<string, AVCardCoverPosition | null> | null>; "customColors": Array<AVAttributeViewCustomColor | null> | null; "defaultTemplateID"?: string; "id": string; "keyIDs": Array<string> | null; "keyValues": Array<AVKeyValues | null> | null; "name": string; "newItemTemplates"?: Array<AVNewItemTemplate | null>; "spec": number; "viewID": string; "views": Array<AVView | null> | null; };
-export type AVAttributeViewFieldView = { "hidden": boolean; "icon": string; "id": string; "name": string; "type": "table" | "list" | "gallery" | "kanban" | "calendar"; };
+export type AVAttributeViewFieldView = { "hidden": boolean; "icon": string; "id": string; "name": string; "type": "table" | "list" | "gallery" | "kanban" | "calendar" | "map"; };
export type AVAttributeViewGroupItemPosition = { "groupID": string; "previousID": string; };
@@ -264,7 +264,7 @@ export type AVAutomationValue = { "keyID"?: string; "mode": "static" | "source"
export type AVAutomationValueInput = { "keyID"?: string; "mode": "static" | "source" | "currentTime" | "triggerItem"; "value"?: AVValueInput | null; };
-export type AVAvSearchResult = { "avID": string; "avName": string; "blockID": string; "children"?: Array<AVAvSearchResult | null>; "hPath": string; "matched"?: boolean; "viewID": string; "viewLayout": "" | "table" | "list" | "gallery" | "kanban" | "calendar"; "viewName": string; };
+export type AVAvSearchResult = { "avID": string; "avName": string; "blockID": string; "children"?: Array<AVAvSearchResult | null>; "hPath": string; "matched"?: boolean; "viewID": string; "viewLayout": "" | "table" | "list" | "gallery" | "kanban" | "calendar" | "map"; "viewName": string; };
export type AVBlockAttributeViewKeys = { "avID": string; "avName": string; "blockIDs": Array<string> | null; "customColors": Array<AVAttributeViewCustomColor | null> | null; "itemPositions": Array<AVAttributeViewItemPosition | null> | null; "keyValues": Array<AVKeyValues | null> | null; };
@@ -358,10 +358,16 @@ export type AVLayoutGallery = { "cardAspectRatio": number; "cardAspectRatioValue
export type AVLayoutKanban = { "cardAspectRatio": number; "cardAspectRatioValue": number; "cardLayout": number; "cardSize": number; "cardWidth": number; "coverFrom": number; "coverFromAssetKeyID"?: string; "displayEmptyFields": boolean; "displayFieldName": boolean; "fields": Array<AVViewKanbanField | null> | null; "fillColBackgroundColor": boolean; "filters"?: Array<AVViewFilter | null>; "fitImage": boolean; "id": string; "pageSize"?: number; "showIcon": boolean; "sorts"?: Array<AVViewSort | null>; "spec": number; "wrapField": boolean; } | ({ "cardAspectRatio": number; "cardAspectRatioValue": number; "cardLayout": number; "cardSize": number; "cardWidth": number; "coverFrom": number; "coverFromAssetKeyID"?: string; "displayEmptyFields": boolean; "displayFieldName": boolean; "fields": Array<AVViewKanbanField | null> | null; "fillColBackgroundColor": boolean; "fitImage": boolean; } & { "filters"?: never; "id"?: never; "pageSize"?: never; "showIcon"?: never; "sorts"?: never; "spec"?: never; "wrapField"?: never; });
+export type AVLayoutMap = { "columns": Array<AVViewTableColumn | null> | null; "filters"?: Array<AVViewFilter | null>; "id": string; "pageSize"?: number; "rowIds": Array<string> | null; "settings": AVMapSettings; "showIcon": boolean; "sorts"?: Array<AVViewSort | null>; "spec": number; "wrapField": boolean; } | ({ "columns": Array<AVViewTableColumn | null> | null; "rowIds": Array<string> | null; "settings": AVMapSettings; } & { "filters"?: never; "id"?: never; "pageSize"?: never; "showIcon"?: never; "sorts"?: never; "spec"?: never; "wrapField"?: never; });
+
export type AVLayoutTable = { "columns": Array<AVViewTableColumn | null> | null; "filters"?: Array<AVViewFilter | null>; "id": string; "pageSize"?: number; "rowIds": Array<string> | null; "showIcon": boolean; "sorts"?: Array<AVViewSort | null>; "spec": number; "wrapField": boolean; } | ({ "columns": Array<AVViewTableColumn | null> | null; "rowIds": Array<string> | null; } & { "filters"?: never; "id"?: never; "pageSize"?: never; "showIcon"?: never; "sorts"?: never; "spec"?: never; "wrapField"?: never; });
export type AVLocation = { "defaultCoordinateSystem"?: "" | "unknown" | "wgs84" | "gcj02" | "bd09"; };
+export type AVMapSettings = { "locationKeyID": string; "serviceID": string; "showRecordList": boolean; };
+
+export type AVMapSettingsInput = { "locationKeyID": string; "serviceID": string; "showRecordList": boolean; };
+
export type AVNewItemFieldValue = { "mode": "static" | "currentTime"; "value"?: AVValue; };
export type AVNewItemFieldValueInput = { "mode"?: "static" | "currentTime"; "value"?: AVValueInput | null; };
@@ -396,7 +402,7 @@ export type AVRelativeDate = { "count": number; "direction": number; "unit": num
export type AVRelativeDateInput = { "count"?: number | null; "direction"?: number | null; "unit"?: number | null; };
-export type AVRenderData = { "colorOrder": Array<string> | null; "contextFilter": AVAttributeViewContextFilter | null; "contextFilterFields": Array<AVAttributeViewContextFilterField | null> | null; "customColors": Array<AVAttributeViewCustomColor | null> | null; "defaultTemplateID": string; "id": string; "isMirror": boolean; "name": string; "newItemTemplates": Array<AVNewItemTemplate | null> | null; "target"?: AVAttributeViewRenderTarget; "usedCustomColorIndexes": Array<number> | null; "view": AVViewInstance; "viewID": string; "viewType": "table" | "list" | "gallery" | "kanban" | "calendar"; "views": Array<AVViewData | null> | null; };
+export type AVRenderData = { "colorOrder": Array<string> | null; "contextFilter": AVAttributeViewContextFilter | null; "contextFilterFields": Array<AVAttributeViewContextFilterField | null> | null; "customColors": Array<AVAttributeViewCustomColor | null> | null; "defaultTemplateID": string; "id": string; "isMirror": boolean; "name": string; "newItemTemplates": Array<AVNewItemTemplate | null> | null; "target"?: AVAttributeViewRenderTarget; "usedCustomColorIndexes": Array<number> | null; "view": AVViewInstance; "viewID": string; "viewType": "table" | "list" | "gallery" | "kanban" | "calendar" | "map"; "views": Array<AVViewData | null> | null; };
export type AVRenderResult = (AVRenderData & { "error"?: never; }) | (AVViewNotFound & { "colorOrder"?: never; "contextFilter"?: never; "contextFilterFields"?: never; "customColors"?: never; "defaultTemplateID"?: never; "id"?: never; "isMirror"?: never; "name"?: never; "newItemTemplates"?: never; "target"?: never; "usedCustomColorIndexes"?: never; "view"?: never; "viewID"?: never; "viewType"?: never; "views"?: never; });
@@ -424,7 +430,7 @@ export type AVSelectOption = { "color": string; "desc": string; "name": string;
export type AVSelectOptionInput = { "color"?: string | null; "desc"?: string | null; "name"?: string | null; "resolvedColor"?: AVAttributeViewColorInput | null; };
-export type AVTable = { "calendar"?: AVCalendarSettings; "calendarRange"?: AVCalendarRange; "calendarTargetDate"?: number; "columns": Array<AVTableColumn | null> | null; "conditionalColors": Array<AVConditionalColorRule | null> | null; "desc": string; "filters": Array<AVViewFilter | null> | null; "group": AVViewGroup | null; "groupCalc"?: AVGroupCalc; "groupFolded": boolean; "groupHidden": number; "groupKey"?: AVKey; "groupValue"?: AVValue; "groups"?: Array<AVViewInstance>; "hideAttrViewName": boolean; "icon": string; "id": string; "name": string; "pageSize": number; "rowCount": number; "rows": Array<AVTableRow | null> | null; "showIcon": boolean; "sorts": Array<AVViewSort | null> | null; "wrapField": boolean; } | ({ "calendar"?: AVCalendarSettings; "calendarRange"?: AVCalendarRange; "calendarTargetDate"?: number; "columns": Array<AVTableColumn | null> | null; "rowCount": number; "rows": Array<AVTableRow | null> | null; } & { "conditionalColors"?: never; "desc"?: never; "filters"?: never; "group"?: never; "groupCalc"?: never; "groupFolded"?: never; "groupHidden"?: never; "groupKey"?: never; "groupValue"?: never; "groups"?: never; "hideAttrViewName"?: never; "icon"?: never; "id"?: never; "name"?: never; "pageSize"?: never; "showIcon"?: never; "sorts"?: never; "wrapField"?: never; });
+export type AVTable = { "calendar"?: AVCalendarSettings; "calendarRange"?: AVCalendarRange; "calendarTargetDate"?: number; "columns": Array<AVTableColumn | null> | null; "conditionalColors": Array<AVConditionalColorRule | null> | null; "desc": string; "filters": Array<AVViewFilter | null> | null; "group": AVViewGroup | null; "groupCalc"?: AVGroupCalc; "groupFolded": boolean; "groupHidden": number; "groupKey"?: AVKey; "groupValue"?: AVValue; "groups"?: Array<AVViewInstance>; "hideAttrViewName": boolean; "icon": string; "id": string; "map"?: AVMapSettings; "mapMarkerScope"?: "page"; "name": string; "pageSize": number; "rowCount": number; "rows": Array<AVTableRow | null> | null; "showIcon": boolean; "sorts": Array<AVViewSort | null> | null; "wrapField": boolean; } | ({ "calendar"?: AVCalendarSettings; "calendarRange"?: AVCalendarRange; "calendarTargetDate"?: number; "columns": Array<AVTableColumn | null> | null; "map"?: AVMapSettings; "mapMarkerScope"?: "page"; "rowCount": number; "rows": Array<AVTableRow | null> | null; } & { "conditionalColors"?: never; "desc"?: never; "filters"?: never; "group"?: never; "groupCalc"?: never; "groupFolded"?: never; "groupHidden"?: never; "groupKey"?: never; "groupValue"?: never; "groups"?: never; "hideAttrViewName"?: never; "icon"?: never; "id"?: never; "name"?: never; "pageSize"?: never; "showIcon"?: never; "sorts"?: never; "wrapField"?: never; });
export type AVTableCell = { "bgColor": string; "color": string; "id": string; "value": AVValue | null; "valueType": "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; } | ({ "bgColor": string; "color": string; } & { "id"?: never; "value"?: never; "valueType"?: never; });
@@ -512,9 +518,9 @@ export type AVValueUpdatedInput = { "content"?: number | null; "content2"?: numb
export type AVValuesData = { "values": Record<string, AVValue | null> | null; };
-export type AVView = { "calendar"?: AVLayoutCalendar; "conditionalColors": Array<AVConditionalColorRule | null> | null; "desc": string; "filters"?: Array<AVViewFilter | null>; "gallery"?: AVLayoutGallery; "group"?: AVViewGroup; "groupCalc"?: AVGroupCalc; "groupCreated": number; "groupFolded": boolean; "groupHidden": number; "groupItemIds": Array<string> | null; "groupKey"?: AVKey; "groupSort": number; "groupVal"?: AVValue; "groups"?: Array<AVView | null>; "hideAttrViewName": boolean; "icon": string; "id": string; "itemIds"?: Array<string>; "kanban"?: AVLayoutKanban; "list"?: AVLayoutTable; "name": string; "pageSize": number; "sorts"?: Array<AVViewSort | null>; "table"?: AVLayoutTable; "type": "table" | "list" | "gallery" | "kanban" | "calendar"; };
+export type AVView = { "calendar"?: AVLayoutCalendar; "conditionalColors": Array<AVConditionalColorRule | null> | null; "desc": string; "filters"?: Array<AVViewFilter | null>; "gallery"?: AVLayoutGallery; "group"?: AVViewGroup; "groupCalc"?: AVGroupCalc; "groupCreated": number; "groupFolded": boolean; "groupHidden": number; "groupItemIds": Array<string> | null; "groupKey"?: AVKey; "groupSort": number; "groupVal"?: AVValue; "groups"?: Array<AVView | null>; "hideAttrViewName": boolean; "icon": string; "id": string; "itemIds"?: Array<string>; "kanban"?: AVLayoutKanban; "list"?: AVLayoutTable; "map"?: AVLayoutMap; "name": string; "pageSize": number; "sorts"?: Array<AVViewSort | null>; "table"?: AVLayoutTable; "type": "table" | "list" | "gallery" | "kanban" | "calendar" | "map"; };
-export type AVViewData = { "desc": string; "hideAttrViewName": boolean; "icon": string; "id": string; "name": string; "pageSize": number; "type": "table" | "list" | "gallery" | "kanban" | "calendar"; };
+export type AVViewData = { "desc": string; "hideAttrViewName": boolean; "icon": string; "id": string; "name": string; "pageSize": number; "type": "table" | "list" | "gallery" | "kanban" | "calendar" | "map"; };
export type AVViewFilter = { "column": string; "combination"?: "and" | "or"; "dateEndpoint"?: "start" | "end"; "filters"?: Array<AVViewFilter | null>; "operator": "" | "=" | "!=" | "\u003e" | "\u003e=" | "\u003c" | "\u003c=" | "Contains" | "Does not contains" | "Contains any item" | "Does not contain any item" | "Is empty" | "Is not empty" | "Starts with" | "Ends with" | "Is between" | "Is true" | "Is false"; "quantifier"?: string; "relativeDate"?: AVRelativeDate; "relativeDate2"?: AVRelativeDate; "value": AVValue | null; "valueSource"?: "stored" | "rendered"; };
@@ -1396,6 +1402,18 @@ export type MCPOAuthStatus = { "clients": Array<MCPOAuthClient> | null; "enabled
export type MCPOAuthTokenRequestInput = { "client_id"?: string; "client_secret"?: string; "code"?: string; "code_verifier"?: string; "grant_type"?: string; "redirect_uri"?: string; "refresh_token"?: string; "resource"?: string; "scope"?: string; "token"?: string; "token_type_hint"?: string; };
+export type MapConfig = { "revision": string; "services": Array<MapService | null> | null; };
+
+export type MapRuntime = { "apiKey"?: string; "provider": "amap" | "tencent" | "baidu" | "openfreemap"; "securityCode"?: string; };
+
+export type MapRuntimeRequestInput = { "serviceID": string; };
+
+export type MapService = { "configured": boolean; "hasAPIKey": boolean; "hasSecurityCode": boolean; "id": string; "name": string; "provider": "amap" | "tencent" | "baidu" | "openfreemap"; };
+
+export type MapServiceInputInput = { "apiKey"?: string; "id"?: string; "name": string; "provider": "amap" | "tencent" | "baidu" | "openfreemap"; "securityCode"?: string; };
+
+export type MapSetConfRequestInput = { "expectedRevision": string; "services": Array<MapServiceInputInput>; };
+
export type MarkdownHTMLRequestInput = { "markdown": string; "mode"?: string | null; };
export type MigrateLegacyMindmapsData = { "blocks": Array<BlockDOMData> | null; "converted": number; };
@@ -2184,7 +2202,7 @@ export type SystemAPITokenRequestInput = { "token": string; };
export type SystemAccessAuthCodeRequestInput = { "accessAuthCode": string; };
-export type SystemAppConf = { "accessAuthCode": string; "ai": SettingAI | null; "api": SystemAPI | null; "appearance": SettingAppearance | null; "bazaar": SettingBazaar | null; "cloudRegion": number; "cookieKey": string; "dataIndexState": number; "editor": SettingEditor | null; "export": SettingExport | null; "fileTree": SettingFileTree | null; "flashcard": SettingFlashcard | null; "graph": SystemGraph | null; "keymap": { [key: string]: JSONValue } | null; "lang": string; "langs": Array<SystemLang | null> | null; "logLevel": string; "mcpOAuth": string; "notebookCrypto": SystemNotebookCrypto | null; "ocr": SettingOCR | null; "oidc": SystemOIDC | null; "onboarding": SystemOnboarding | null; "publish": SettingPublish | null; "readonly": boolean; "repo": SystemRepo | null; "search": SettingSearch | null; "secrets": SettingSecrets | null; "serverAddrs": Array<string> | null; "showChangelog": boolean; "snippet": SettingSnpt | null; "stat": SystemStat | null; "sync": SystemSync | null; "system": SystemSystem | null; "tag": SystemTag | null; "uiLayout": { [key: string]: JSONValue } | null; "userData": string; "variables": SettingVariables | null; };
+export type SystemAppConf = { "accessAuthCode": string; "ai": SettingAI | null; "api": SystemAPI | null; "appearance": SettingAppearance | null; "bazaar": SettingBazaar | null; "cloudRegion": number; "cookieKey": string; "dataIndexState": number; "editor": SettingEditor | null; "export": SettingExport | null; "fileTree": SettingFileTree | null; "flashcard": SettingFlashcard | null; "graph": SystemGraph | null; "keymap": { [key: string]: JSONValue } | null; "lang": string; "langs": Array<SystemLang | null> | null; "logLevel": string; "map": MapConfig | null; "mcpOAuth": string; "notebookCrypto": SystemNotebookCrypto | null; "ocr": SettingOCR | null; "oidc": SystemOIDC | null; "onboarding": SystemOnboarding | null; "publish": SettingPublish | null; "readonly": boolean; "repo": SystemRepo | null; "search": SettingSearch | null; "secrets": SettingSecrets | null; "serverAddrs": Array<string> | null; "showChangelog": boolean; "snippet": SettingSnpt | null; "stat": SystemStat | null; "sync": SystemSync | null; "system": SystemSystem | null; "tag": SystemTag | null; "uiLayout": { [key: string]: JSONValue } | null; "userData": string; "variables": SettingVariables | null; };
export type SystemAppearanceData = { "appearance": SettingAppearance | null; };
@@ -2386,9 +2404,9 @@ export type TransactionListConversionResultInput = { "focusID": string; "removed
export type TransactionNewItemTemplatesInput = { "defaultTemplateID"?: string | null; "templates"?: Array<AVNewItemTemplateInput | null> | null; };
-export type TransactionOperation = { "action": "updateAttrs"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionAttributeChangeInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "create"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "restoreCreatedDoc"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeCreatedDoc"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "update"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "insert"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "delete"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": BlockDeleteDataInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "move"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "swapBlockRef"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionBlockSwapInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": Array<string> | null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "convertList"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionListConversionInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": TransactionListConversionResult | null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "moveOutlineHeading"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "append"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "appendInsert"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "prependInsert"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "foldHeading"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "unfoldHeading"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrs"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "doUpdateUpdated"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "addFlashcards"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeFlashcards"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewName"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewNewItemTemplates"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionNewItemTemplatesInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewAutomations"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": AVAutomationConfigInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewConditionalColors"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Array<AVConditionalColorRuleInput | null> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewFilters"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Array<AVViewFilterInput | null> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewContextFilter"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColRelationFilters"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Array<AVViewFilterInput | null> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColRollupFilters"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Array<AVViewFilterInput | null> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewSorts"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Array<AVViewSortInput | null> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewPageSize"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColWidth"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColsWidth"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Record<string, string> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColAlign"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColWrap"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColHidden"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColPin"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColIcon"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColDesc"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColAttributePanelVisibility"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColLocationDefaultCoordinateSystem"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "insertAttrViewBlock"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": TransactionInsertedItems | null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeAttrViewBlock"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "addAttrViewCol"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewCol"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeAttrViewCol"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "sortAttrViewRow"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": AVRowOrderChangeInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "sortAttrViewCol"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "sortAttrViewKey"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "sortAttrViewBinding"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewCell"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": AVValueInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewCells"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewColOptions"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Array<AVSelectOptionInput | null> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeAttrViewColOption"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewColOption"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionOptionChangeInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColOptionDesc"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionOptionDescriptionInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCustomColors"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionCustomColorsInput | Array<AVAttributeViewCustomColorInput | null> | null | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColCalc"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": AVFieldCalcInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewColNumberFormat"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColDateFormat"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "replaceAttrViewBlock"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": TransactionReplacedItem | null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewColTemplate"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "addAttrViewView"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeAttrViewView"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": string | null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewViewName"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewViewIcon"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewViewDesc"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "duplicateAttrViewView"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "duplicateAttrViewRow"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "sortAttrViewView"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewColRelation"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewColRollup"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionRollupInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "hideAttrViewName"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColDateFillCreated"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColDateFillSpecificTime"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCreatedIncludeTime"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewUpdatedIncludeTime"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "duplicateAttrViewKey"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCoverFrom"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCoverFromAssetKeyID"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCardCoverPosition"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionCardCoverPositionInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCardSize"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCardWidth"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCalendar"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": AVCalendarSettingsInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCardLayout"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColFullRow"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewFitImage"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewDisplayFieldName"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewDisplayEmptyFields"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewFillColBackgroundColor"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewShowIcon"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewWrapField"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "changeAttrViewLayout"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewBlockView"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewBlockVisibleViews"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCardAspectRatio"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCardAspectRatioValue"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewGroup"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": AVViewGroupInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "hideAttrViewGroup"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "hideAttrViewAllGroups"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "foldAttrViewGroup"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "foldAttrViewGroups"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Record<string, boolean> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "syncAttrViewTableColWidth"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeAttrViewGroup"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "sortAttrViewGroup"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": UnknownTransactionAction; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": JSONValue; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": JSONValue; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; };
+export type TransactionOperation = { "action": "updateAttrs"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionAttributeChangeInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "create"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "restoreCreatedDoc"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeCreatedDoc"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "update"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "insert"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "delete"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": BlockDeleteDataInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "move"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "swapBlockRef"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionBlockSwapInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": Array<string> | null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "convertList"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionListConversionInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": TransactionListConversionResult | null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "moveOutlineHeading"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "append"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "appendInsert"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "prependInsert"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "foldHeading"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "unfoldHeading"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrs"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null | string | Array<string>; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "doUpdateUpdated"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "addFlashcards"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeFlashcards"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewName"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewNewItemTemplates"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionNewItemTemplatesInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewAutomations"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": AVAutomationConfigInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewConditionalColors"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Array<AVConditionalColorRuleInput | null> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewFilters"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Array<AVViewFilterInput | null> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewContextFilter"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColRelationFilters"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Array<AVViewFilterInput | null> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColRollupFilters"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Array<AVViewFilterInput | null> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewSorts"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Array<AVViewSortInput | null> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewPageSize"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColWidth"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColsWidth"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Record<string, string> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColAlign"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColWrap"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColHidden"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColPin"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColIcon"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColDesc"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColAttributePanelVisibility"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColLocationDefaultCoordinateSystem"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "insertAttrViewBlock"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": TransactionInsertedItems | null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeAttrViewBlock"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "addAttrViewCol"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewCol"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeAttrViewCol"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "sortAttrViewRow"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": AVRowOrderChangeInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "sortAttrViewCol"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "sortAttrViewKey"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "sortAttrViewBinding"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewCell"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": AVValueInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewCells"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewColOptions"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Array<AVSelectOptionInput | null> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeAttrViewColOption"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewColOption"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionOptionChangeInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColOptionDesc"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionOptionDescriptionInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCustomColors"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionCustomColorsInput | Array<AVAttributeViewCustomColorInput | null> | null | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColCalc"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": AVFieldCalcInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewColNumberFormat"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColDateFormat"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "replaceAttrViewBlock"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": TransactionReplacedItem | null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewColTemplate"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "addAttrViewView"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeAttrViewView"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": string | null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewViewName"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewViewIcon"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewViewDesc"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "duplicateAttrViewView"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "duplicateAttrViewRow"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "sortAttrViewView"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": string | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewColRelation"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "updateAttrViewColRollup"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionRollupInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "hideAttrViewName"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColDateFillCreated"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColDateFillSpecificTime"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCreatedIncludeTime"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewUpdatedIncludeTime"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "duplicateAttrViewKey"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCoverFrom"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCoverFromAssetKeyID"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCardCoverPosition"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": TransactionCardCoverPositionInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCardSize"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCardWidth"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewMap"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": AVMapSettingsInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCalendar"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": AVCalendarSettingsInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCardLayout"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewColFullRow"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewFitImage"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewDisplayFieldName"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewDisplayEmptyFields"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewFillColBackgroundColor"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewShowIcon"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewWrapField"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "changeAttrViewLayout"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewBlockView"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewBlockVisibleViews"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCardAspectRatio"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewCardAspectRatioValue"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "setAttrViewGroup"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": AVViewGroupInput | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "hideAttrViewGroup"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": number | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "hideAttrViewAllGroups"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "foldAttrViewGroup"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": boolean | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "foldAttrViewGroups"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": Record<string, boolean> | null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "syncAttrViewTableColWidth"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "removeAttrViewGroup"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": "sortAttrViewGroup"; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": null; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": null; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; } | { "action": UnknownTransactionAction; "avID": string; "backRelationKeyID": string; "blockID": string; "blockIDs": Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdate | null>; "context": TransactionContext; "data": JSONValue; "deckID": string; "format": string; "groupID": string; "id": string; "ignoreDefaultFill": boolean; "isDetached": boolean; "isTwoWay": boolean; "keyID": string; "layout": string; "name": string; "nextID": string; "parentID": string; "previousID": string; "removeDest": boolean; "retData": JSONValue; "rootID": string; "rowID": string; "srcIDs": Array<string> | null; "srcs": Array<TransactionSourceFieldsInput | null> | null; "targetGroupID": string; "type": "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID": string; "viewIDs"?: Array<string>; };
-export type TransactionOperationRequest = { "action": "updateAttrs"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionAttributeChangeInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "create"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "restoreCreatedDoc"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeCreatedDoc"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "update"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "insert"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "delete"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: BlockDeleteDataInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "move"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "swapBlockRef"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionBlockSwapInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: Array<string> | null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "convertList"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionListConversionInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: TransactionListConversionResultInput | null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "moveOutlineHeading"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "append"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "appendInsert"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "prependInsert"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "foldHeading"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "unfoldHeading"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrs"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "doUpdateUpdated"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "addFlashcards"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeFlashcards"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewName"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewNewItemTemplates"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionNewItemTemplatesInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewAutomations"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: AVAutomationConfigInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewConditionalColors"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Array<AVConditionalColorRuleInput | null> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewFilters"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Array<AVViewFilterInput | null> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewContextFilter"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColRelationFilters"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Array<AVViewFilterInput | null> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColRollupFilters"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Array<AVViewFilterInput | null> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewSorts"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Array<AVViewSortInput | null> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewPageSize"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColWidth"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColsWidth"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Record<string, string> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColAlign"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColWrap"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColHidden"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColPin"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColIcon"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColDesc"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColAttributePanelVisibility"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColLocationDefaultCoordinateSystem"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "insertAttrViewBlock"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: TransactionInsertedItemsInput | null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeAttrViewBlock"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "addAttrViewCol"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewCol"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeAttrViewCol"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "sortAttrViewRow"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: AVRowOrderChangeInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "sortAttrViewCol"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "sortAttrViewKey"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "sortAttrViewBinding"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewCell"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: AVValueInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewCells"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewColOptions"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Array<AVSelectOptionInput | null> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeAttrViewColOption"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewColOption"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionOptionChangeInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColOptionDesc"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionOptionDescriptionInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCustomColors"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionCustomColorsInput | Array<AVAttributeViewCustomColorInput | null> | null | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColCalc"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: AVFieldCalcInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewColNumberFormat"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColDateFormat"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "replaceAttrViewBlock"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: TransactionReplacedItemInput | null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewColTemplate"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "addAttrViewView"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeAttrViewView"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: string | null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewViewName"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewViewIcon"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewViewDesc"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "duplicateAttrViewView"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "duplicateAttrViewRow"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "sortAttrViewView"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewColRelation"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewColRollup"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionRollupInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "hideAttrViewName"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColDateFillCreated"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColDateFillSpecificTime"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCreatedIncludeTime"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewUpdatedIncludeTime"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "duplicateAttrViewKey"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCoverFrom"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCoverFromAssetKeyID"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCardCoverPosition"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionCardCoverPositionInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCardSize"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCardWidth"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCalendar"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: AVCalendarSettingsInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCardLayout"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColFullRow"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewFitImage"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewDisplayFieldName"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewDisplayEmptyFields"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewFillColBackgroundColor"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewShowIcon"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewWrapField"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "changeAttrViewLayout"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewBlockView"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewBlockVisibleViews"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCardAspectRatio"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCardAspectRatioValue"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewGroup"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: AVViewGroupInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "hideAttrViewGroup"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "hideAttrViewAllGroups"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "foldAttrViewGroup"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "foldAttrViewGroups"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Record<string, boolean> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "syncAttrViewTableColWidth"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeAttrViewGroup"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "sortAttrViewGroup"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": UnknownTransactionAction; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: JSONValue; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: JSONValue; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; };
+export type TransactionOperationRequest = { "action": "updateAttrs"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionAttributeChangeInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "create"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "restoreCreatedDoc"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeCreatedDoc"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "update"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "insert"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "delete"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: BlockDeleteDataInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "move"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "swapBlockRef"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionBlockSwapInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: Array<string> | null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "convertList"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionListConversionInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: TransactionListConversionResultInput | null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "moveOutlineHeading"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "append"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "appendInsert"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "prependInsert"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "foldHeading"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "unfoldHeading"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrs"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null | string | Array<string>; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "doUpdateUpdated"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "addFlashcards"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeFlashcards"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewName"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewNewItemTemplates"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionNewItemTemplatesInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewAutomations"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: AVAutomationConfigInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewConditionalColors"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Array<AVConditionalColorRuleInput | null> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewFilters"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Array<AVViewFilterInput | null> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewContextFilter"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColRelationFilters"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Array<AVViewFilterInput | null> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColRollupFilters"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Array<AVViewFilterInput | null> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewSorts"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Array<AVViewSortInput | null> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewPageSize"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColWidth"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColsWidth"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Record<string, string> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColAlign"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColWrap"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColHidden"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColPin"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColIcon"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColDesc"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColAttributePanelVisibility"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColLocationDefaultCoordinateSystem"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "insertAttrViewBlock"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: TransactionInsertedItemsInput | null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeAttrViewBlock"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "addAttrViewCol"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewCol"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeAttrViewCol"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "sortAttrViewRow"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: AVRowOrderChangeInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "sortAttrViewCol"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "sortAttrViewKey"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "sortAttrViewBinding"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewCell"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: AVValueInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewCells"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewColOptions"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Array<AVSelectOptionInput | null> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeAttrViewColOption"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewColOption"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionOptionChangeInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColOptionDesc"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionOptionDescriptionInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCustomColors"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionCustomColorsInput | Array<AVAttributeViewCustomColorInput | null> | null | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColCalc"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: AVFieldCalcInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewColNumberFormat"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColDateFormat"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "replaceAttrViewBlock"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: TransactionReplacedItemInput | null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewColTemplate"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "addAttrViewView"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeAttrViewView"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: string | null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewViewName"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewViewIcon"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewViewDesc"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "duplicateAttrViewView"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "duplicateAttrViewRow"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "sortAttrViewView"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: string | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewColRelation"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "updateAttrViewColRollup"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionRollupInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "hideAttrViewName"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColDateFillCreated"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColDateFillSpecificTime"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCreatedIncludeTime"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewUpdatedIncludeTime"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "duplicateAttrViewKey"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCoverFrom"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCoverFromAssetKeyID"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCardCoverPosition"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: TransactionCardCoverPositionInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCardSize"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCardWidth"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewMap"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: AVMapSettingsInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCalendar"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: AVCalendarSettingsInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCardLayout"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewColFullRow"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewFitImage"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewDisplayFieldName"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewDisplayEmptyFields"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewFillColBackgroundColor"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewShowIcon"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewWrapField"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "changeAttrViewLayout"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewBlockView"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewBlockVisibleViews"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCardAspectRatio"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewCardAspectRatioValue"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "setAttrViewGroup"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: AVViewGroupInput | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "hideAttrViewGroup"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: number | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "hideAttrViewAllGroups"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "foldAttrViewGroup"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: boolean | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "foldAttrViewGroups"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: Record<string, boolean> | null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "syncAttrViewTableColWidth"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "removeAttrViewGroup"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": "sortAttrViewGroup"; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: null; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: null; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; } | { "action": UnknownTransactionAction; "avID"?: string | null; "backRelationKeyID"?: string | null; "blockID"?: string | null; "blockIDs"?: Array<string> | null; "cellUpdates"?: Array<TransactionCellUpdateInput | null> | null; "context"?: TransactionContext | null; "data"?: JSONValue; "deckID"?: string | null; "format"?: string | null; "groupID"?: string | null; "id"?: string | null; "ignoreDefaultFill"?: boolean | null; "isDetached"?: boolean | null; "isTwoWay"?: boolean | null; "keyID"?: string | null; "layout"?: string | null; "name"?: string | null; "nextID"?: string | null; "parentID"?: string | null; "previousID"?: string | null; "removeDest"?: boolean | null; "retData"?: JSONValue; "rootID"?: string | null; "rowID"?: string | null; "srcIDs"?: Array<string> | null; "srcs"?: Array<TransactionSourceFieldsInput | null> | null; "targetGroupID"?: string | null; "type"?: "" | "block" | "text" | "number" | "date" | "select" | "mSelect" | "url" | "email" | "phone" | "location" | "mAsset" | "template" | "created" | "updated" | "checkbox" | "relation" | "rollup" | "lineNumber"; "viewID"?: string | null; "viewIDs"?: Array<string> | null; };
export type TransactionOptionChangeInput = { "newColor": string; "newDesc": string; "newName": string; "oldColor"?: string | null; "oldName": string; };
@@ -5309,6 +5327,27 @@ export interface APIPOSTRoutes {
/** 服务器路由要求;资源权限与笔记本租约仍由内核校验 */
authorization?: readonly ["authenticated","admin","writable"];
};
+ "/api/map/getConf": {
+ request: EmptyRequestInput;
+ response: { "code": 0; "data": MapConfig | null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };
+ body: "none";
+ /** 服务器路由要求;资源权限与笔记本租约仍由内核校验 */
+ authorization?: readonly ["authenticated","admin"];
+ };
+ "/api/map/getRuntime": {
+ request: MapRuntimeRequestInput;
+ response: { "code": 0; "data": MapRuntime | null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };
+ body: "json";
+ /** 服务器路由要求;资源权限与笔记本租约仍由内核校验 */
+ authorization?: readonly ["authenticated","admin"];
+ };
+ "/api/map/setConf": {
+ request: MapSetConfRequestInput;
+ response: { "code": 0; "data": MapConfig | null; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };
+ body: "json";
+ /** 服务器路由要求;资源权限与笔记本租约仍由内核校验 */
+ authorization?: readonly ["authenticated","admin","writable"];
+ };
"/api/mcp/addOAuthClient": {
request: MCPOAuthClientRequestInput;
response: { "code": 0; "data": MCPOAuthClientSecret; "msg": string; } | { "code": -1; "data": { "closeTimeout": number; } | null; "msg": string; };
diff --git a/app/src/types/config.d.ts b/app/src/types/config.d.ts
index 707044ea6b..92ac5674cc 100644
--- a/app/src/types/config.d.ts
+++ b/app/src/types/config.d.ts
@@ -34,6 +34,8 @@ declare namespace Config {
* reasoningEffort 独立控制手动和自动 AI OCR,空字符串沿用模型默认。
*/
ocr: import("./api").SettingOCR;
+ /** 当前设备的地图服务摘要,不包含密钥;视图仅保存服务 ID。 */
+ map: import("./api").MapConfig;
api: IAPI;
appearance: IAppearance;
bazaar: IBazaar;
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index 29c57884ab..fdb1f66229 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -25,7 +25,7 @@ type TEventBus = "ws-main" | "sync-start" | "sync-end" | "sync-fail" |
"kernel-plugin-state-change" |
"before-show-tooltip" | "before-hide-tooltip" |
"common-menu-open" | "common-menu-closed"
-type TAVView = "table" | "list" | "gallery" | "kanban" | "calendar";
+type TAVView = "table" | "list" | "gallery" | "kanban" | "calendar" | "map";
type TAVAlign = "" | "left" | "center" | "right"
type TAVDateFormat = "" | "full" | "month-day-year" | "day-month-year" | "year-month-day" | "lunar"
type TAVCol = import("./av").AVKeyType;
@@ -182,6 +182,7 @@ interface Window {
};
siyuan: ISiyuan;
JSAndroid: {
+ ready?: Promise<void>
openAuthURL(url: string): void
returnDesktop(): void
openExternal(url: string): void
@@ -1264,7 +1265,18 @@ interface IAVCalendarRange {
}
// 表格、列表和日历共用行列结构,布局由 viewType 区分。
+interface IAVMapSettings {
+ /** 设备本地地图服务的稳定引用;缺失时保留,不自动替换。 */
+ serviceID: string;
+ /** 位置字段引用;缺失或类型变化时保留,不自动改绑。 */
+ locationKeyID: string;
+ showRecordList: boolean;
+}
+
interface IAVTable extends IAVView {
+ /** 地图只渲染当前加载页中匹配服务坐标系的原始坐标。 */
+ map?: IAVMapSettings;
+ mapMarkerScope?: "page";
/** 仅日历布局返回的持久化字段设置。 */
calendar?: IAVCalendarSettings;
/** 回显本次请求的日期范围,省略范围的请求不返回此字段。 */
diff --git a/app/stage/auth.html b/app/stage/auth.html
index 18c31cd46c..8868df6998 100644
--- a/app/stage/auth.html
+++ b/app/stage/auth.html
@@ -698,7 +698,14 @@
} catch (e) {
// console.log(e)
}
- if (window.JSAndroid && window.JSAndroid.getOIDCCallback) {
+ let androidBridgeReady = true
+ try {
+ await window.JSAndroid?.ready
+ } catch (_error) {
+ androidBridgeReady = false
+ console.error('Android native bridge initialization failed')
+ }
+ if (androidBridgeReady && window.JSAndroid && window.JSAndroid.getOIDCCallback) {
const callbackURL = window.JSAndroid.getOIDCCallback()
if (callbackURL) {
handleOIDCCallback(callbackURL)
diff --git a/app/stage/map/host.css b/app/stage/map/host.css
new file mode 100644
index 0000000000..ead4c2acea
--- /dev/null
+++ b/app/stage/map/host.css
@@ -0,0 +1,14 @@
+html, body, #map {
+ width: 100%;
+ height: 100%;
+ margin: 0;
+ overflow: hidden;
+}
+
+html {
+ color-scheme: light;
+}
+
+html[data-theme="dark"] {
+ color-scheme: dark;
+}
diff --git a/app/stage/map/index.html b/app/stage/map/index.html
new file mode 100644
index 0000000000..6abf4567ec
--- /dev/null
+++ b/app/stage/map/index.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+ <meta name="referrer" content="strict-origin-when-cross-origin">
+ <link rel="stylesheet" href="/stage/map/host.css">
+ <script defer src="/stage/build/map/host.js"></script>
+</head>
+<body><div id="map"></div></body>
+</html>
diff --git a/app/stage/map/wrapper.html b/app/stage/map/wrapper.html
new file mode 100644
index 0000000000..631c5729d2
--- /dev/null
+++ b/app/stage/map/wrapper.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+ <meta name="referrer" content="strict-origin-when-cross-origin">
+ <link rel="stylesheet" href="/stage/map/host.css">
+ <script defer src="/stage/build/map/wrapper.js"></script>
+</head>
+<body></body>
+</html>
diff --git a/app/tests/settingsTabs.test.js b/app/tests/settingsTabs.test.js
index e9106acdfc..a76ef5cc21 100644
--- a/app/tests/settingsTabs.test.js
+++ b/app/tests/settingsTabs.test.js
@@ -59,7 +59,7 @@ for (const mobile of [false, true]) {
const shells = exports.getSettingTabDefs();
assert.deepEqual(Array.from(shells, shell => shell.id), [
"editor", "file", "appearance", "bazaar", "flashcard", "ai", "secretsVariables", "assets",
- "ocr", "export", "search", ...(mobile ? [] : ["keymap"]), "sync", "access", "app", "about",
+ "ocr", "map", "export", "search", ...(mobile ? [] : ["keymap"]), "sync", "access", "app", "about",
]);
assert.equal(exports.getSettingTab("appearance"), appearance);
assert.equal(exports.getSettingTabDefs(), shells);
diff --git a/app/webpack.map.js b/app/webpack.map.js
new file mode 100644
index 0000000000..f7a95a982e
--- /dev/null
+++ b/app/webpack.map.js
@@ -0,0 +1,52 @@
+const fs = require("fs");
+const path = require("path");
+const webpack = require("webpack");
+const {EsbuildPlugin} = require("esbuild-loader");
+
+// 地图代码独立使用 web 目标,不共享 electron-renderer 的运行时或依赖包。
+class MapLibreAssetsPlugin {
+ apply(compiler) {
+ compiler.hooks.thisCompilation.tap("MapLibreAssetsPlugin", (compilation) => {
+ compilation.hooks.processAssets.tap({name: "MapLibreAssetsPlugin",
+ stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL}, () => {
+ const files = {
+ "maplibre-gl.js": "maplibre-gl/dist/maplibre-gl-csp.js",
+ "maplibre-gl-csp-worker.js": "maplibre-gl/dist/maplibre-gl-csp-worker.js",
+ "maplibre-gl.css": "maplibre-gl/dist/maplibre-gl.css",
+ "maplibre-LICENSE.txt": "maplibre-gl/dist/LICENSE.txt",
+ };
+ for (const [name, source] of Object.entries(files)) {
+ const resolved = require.resolve(source);
+ compilation.fileDependencies.add(resolved);
+ compilation.emitAsset(name, new webpack.sources.RawSource(fs.readFileSync(resolved)));
+ }
+ });
+ });
+ }
+}
+
+module.exports = (_env, argv = {}) => ({
+ name: "map-host",
+ mode: argv.mode || "development",
+ watch: argv.mode !== "production",
+ target: "web",
+ devtool: false,
+ entry: {host: "./src/protyle/render/av/map/hostEntry.ts", wrapper: "./src/protyle/render/av/map/wrapperEntry.ts"},
+ output: {
+ path: path.resolve(__dirname, "stage/build/map"),
+ filename: "[name].js",
+ publicPath: "/stage/build/map/",
+ globalObject: "globalThis",
+ clean: true,
+ },
+ resolve: {extensions: [".ts", ".js"]},
+ module: {rules: [{test: /\.ts$/, include: path.resolve(__dirname, "src/protyle/render/av/map"),
+ loader: "esbuild-loader", options: {target: "es2021"}}]},
+ optimization: {
+ minimize: argv.mode === "production",
+ minimizer: [new EsbuildPlugin({target: "es2021"})],
+ splitChunks: false,
+ runtimeChunk: false,
+ },
+ plugins: [new MapLibreAssetsPlugin()],
+});
diff --git a/kernel/api/av_contract_map.go b/kernel/api/av_contract_map.go
new file mode 100644
index 0000000000..838adcfd74
--- /dev/null
+++ b/kernel/api/av_contract_map.go
@@ -0,0 +1,26 @@
+package api
+
+import (
+ "github.com/siyuan-note/siyuan/kernel/apicontract"
+ "github.com/siyuan-note/siyuan/kernel/av"
+)
+
+func toContractAVMapSettings(value *av.MapSettings) *apicontract.AVMapSettings {
+ if value == nil {
+ return nil
+ }
+ return &apicontract.AVMapSettings{ServiceID: value.ServiceID, LocationKeyID: value.LocationKeyID,
+ ShowRecordList: value.ShowRecordList}
+}
+
+func toContractAVLayoutMap(value *av.LayoutMap) *apicontract.AVLayoutMap {
+ if value == nil {
+ return nil
+ }
+ return &apicontract.AVLayoutMap{
+ AVBaseLayout: toContractAVBaseLayout(value.BaseLayout),
+ Columns: avContractSlice(value.Columns, toContractAVViewTableColumn),
+ RowIDs: value.RowIDs,
+ Settings: *toContractAVMapSettings(&value.Settings),
+ }
+}
diff --git a/kernel/api/av_contract_mapping.go b/kernel/api/av_contract_mapping.go
index 5073113590..bd2e6c0eaa 100644
--- a/kernel/api/av_contract_mapping.go
+++ b/kernel/api/av_contract_mapping.go
@@ -30,6 +30,8 @@ func avContractView(value av.Viewable) apicontract.AVViewInstance {
switch view := value.(type) {
case *av.Table:
return apicontract.NewAVTableInstance(toContractAVTable(view))
+ case *av.Map:
+ return apicontract.NewAVTableInstance(toContractAVTable(view.Table))
case *av.Calendar:
return apicontract.NewAVTableInstance(toContractAVTable(view.Table))
case *av.List:
@@ -48,6 +50,8 @@ func toContractAVTable(value *av.Table) *apicontract.AVTable {
}
return &apicontract.AVTable{
AVBaseInstance: toContractAVBaseInstance(value.BaseInstance),
+ Map: toContractAVMapSettings(value.Map),
+ MapMarkerScope: value.MapMarkerScope,
Calendar: toContractAVCalendarSettings(value.Calendar),
CalendarRange: toContractAVCalendarRange(value.CalendarRange),
CalendarTargetDate: value.CalendarTargetDate,
@@ -1027,6 +1031,7 @@ func toContractAVView(value *av.View) *apicontract.AVView {
LayoutType: string(value.LayoutType),
Table: toContractAVLayoutTable(value.Table),
List: toContractAVLayoutTable(value.List),
+ Map: toContractAVLayoutMap(value.Map),
Calendar: toContractAVLayoutCalendar(value.Calendar),
Gallery: toContractAVLayoutGallery(value.Gallery),
Kanban: toContractAVLayoutKanban(value.Kanban),
diff --git a/kernel/api/av_contract_render.go b/kernel/api/av_contract_render.go
index 8f61fa09d9..80af4f79f3 100644
--- a/kernel/api/av_contract_render.go
+++ b/kernel/api/av_contract_render.go
@@ -56,7 +56,12 @@ func renderAttrView(blockID, avID, viewID, query string, page, pageSize int, gro
}
data := apicontract.AVRenderData{AVArchiveRenderData: avArchiveRenderData(attrView, view), ContextFilter: toContractAVAttributeViewContextFilter(contextFilter), ContextFilterFields: avContractSlice(model.GetAttributeViewContextFilterFields(attrView, blockID), toContractAVAttributeViewContextFilterField), Target: toContractAVAttributeViewRenderTarget(target)}
if filter != nil {
- view = filter(view)
+ if mapped, ok := view.(*av.Map); ok {
+ view, target = model.FilterAttributeViewMapForPublish(mapped, page, pageSize, target, filter)
+ data.Target = toContractAVAttributeViewRenderTarget(target)
+ } else {
+ view = filter(view)
+ }
if calendar, ok := view.(*av.Calendar); ok {
// 发布过滤后重新计算定位,避免返回不可访问条目的日期和行位置。
visibleTargetID := ""
diff --git a/kernel/api/contract_av_map_test.go b/kernel/api/contract_av_map_test.go
new file mode 100644
index 0000000000..674eae0cd6
--- /dev/null
+++ b/kernel/api/contract_av_map_test.go
@@ -0,0 +1,358 @@
+package api
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "net/http"
+ "net/http/httptest"
+ "os"
+ "reflect"
+ "testing"
+
+ "github.com/88250/lute/ast"
+ "github.com/gin-gonic/gin"
+ "github.com/siyuan-note/siyuan/kernel/apicontract"
+ "github.com/siyuan-note/siyuan/kernel/av"
+ "github.com/siyuan-note/siyuan/kernel/model"
+ "github.com/siyuan-note/siyuan/kernel/treenode"
+)
+
+func TestAVContractMapMapping(t *testing.T) {
+ table := &av.Table{Map: &av.MapSettings{ServiceID: "local-service", LocationKeyID: "20261009000000-abcdefg", ShowRecordList: true},
+ MapMarkerScope: "page", Columns: []*av.TableColumn{}, Rows: []*av.TableRow{}, RowCount: 120}
+ assertAVContractJSONEqual(t, &av.Map{Table: table}, avContractView(&av.Map{Table: table}))
+ layout := &av.LayoutMap{LayoutTable: av.NewLayoutTable(), Settings: *table.Map}
+ assertAVContractJSONEqual(t, layout, toContractAVLayoutMap(layout))
+ view := &av.View{ID: "view", LayoutType: av.LayoutTypeMap, Map: layout}
+ assertAVContractJSONEqual(t, view, toContractAVView(view))
+ bundle, err := apicontract.BuildBundle()
+ if err != nil {
+ t.Fatal(err)
+ }
+ response := apicontract.Success(apicontract.NewAVRenderResult(apicontract.AVRenderData{
+ AVArchiveRenderData: apicontract.AVArchiveRenderData{ViewType: "map", View: avContractView(&av.Map{Table: table})},
+ }))
+ payload, err := json.Marshal(response)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err = bundle.ValidateResponse("POST", "/api/av/renderAttributeView", payload); err != nil {
+ t.Fatal(err)
+ }
+}
+
+func TestAVContractMapPublishRedactsPrivateTemplateDependencies(t *testing.T) {
+ fixture := setupAttributeViewContextFilterAPITest(t)
+ database, view := fixture.attrView, fixture.attrView.Views[0]
+ primary := database.GetBlockKeyValues()
+ sourceID, publicID, privateID, privateDocID := ast.NewNodeID(), ast.NewNodeID(), ast.NewNodeID(), ast.NewNodeID()
+ privateTree := treenode.NewTree(ast.NewNodeID(), "/"+privateDocID+".sy", "/Private", "Private")
+ treenode.UpsertBlockTree(privateTree)
+ av.UpsertBlockRel(database.ID, fixture.databaseID)
+ const privateContent = "private-template-target"
+ primary.Values = []*av.Value{
+ {ID: ast.NewNodeID(), KeyID: primary.Key.ID, BlockID: sourceID, Type: av.KeyTypeBlock, IsDetached: true, Block: &av.ValueBlock{Content: "Source"}},
+ {ID: ast.NewNodeID(), KeyID: primary.Key.ID, BlockID: publicID, Type: av.KeyTypeBlock, IsDetached: true, Block: &av.ValueBlock{Content: "Public"}},
+ {ID: ast.NewNodeID(), KeyID: primary.Key.ID, BlockID: privateID, Type: av.KeyTypeBlock, Block: &av.ValueBlock{ID: privateDocID, Content: privateContent}},
+ }
+ secretKey := av.NewKey(ast.NewNodeID(), "Secret", "", av.KeyTypeRelation)
+ secretKey.Relation = &av.Relation{AvID: database.ID}
+ publicKey := av.NewKey(ast.NewNodeID(), "Public", "", av.KeyTypeRelation)
+ publicKey.Relation = &av.Relation{AvID: database.ID}
+ labelKey := av.NewKey(ast.NewNodeID(), "Label", "", av.KeyTypeText)
+ selectorKey := av.NewKey(ast.NewNodeID(), "Selector", "", av.KeyTypeText)
+ displayKey := av.NewKey(ast.NewNodeID(), "Display", "", av.KeyTypeText)
+ displayKey.RenderTemplate = fmt.Sprintf(`.action{getHPathByID %q}`, privateDocID)
+ database.KeyValues = []*av.KeyValues{primary,
+ {Key: secretKey, Values: []*av.Value{{ID: ast.NewNodeID(), KeyID: secretKey.ID, BlockID: sourceID, Type: av.KeyTypeRelation,
+ Relation: &av.ValueRelation{BlockIDs: []string{privateID}}}}},
+ {Key: publicKey, Values: []*av.Value{{ID: ast.NewNodeID(), KeyID: publicKey.ID, BlockID: sourceID, Type: av.KeyTypeRelation,
+ Relation: &av.ValueRelation{BlockIDs: []string{publicID}}}}},
+ {Key: labelKey, Values: []*av.Value{{ID: ast.NewNodeID(), KeyID: labelKey.ID, BlockID: sourceID, Type: av.KeyTypeText, Text: &av.ValueText{Content: "public label"}}}},
+ {Key: selectorKey, Values: []*av.Value{{ID: ast.NewNodeID(), KeyID: selectorKey.ID, BlockID: sourceID, Type: av.KeyTypeText, Text: &av.ValueText{Content: secretKey.ID}}}},
+ {Key: displayKey, Values: []*av.Value{{ID: ast.NewNodeID(), KeyID: displayKey.ID, BlockID: sourceID, Type: av.KeyTypeText, Text: &av.ValueText{Content: "public scalar"}}}},
+ }
+ templates := []struct {
+ name, content, publicContent, privateMarker string
+ key *av.Key
+ }{
+ {name: "ByName", content: ".action{.Secret_raw.Relation.BlockIDs}", privateMarker: privateID},
+ {name: "ByID", content: fmt.Sprintf(`.action{$value := index .id_mod_raw %q}.action{$value.Relation.BlockIDs}`, secretKey.ID), privateMarker: privateID},
+ {name: "Indirect", content: ".action{.ByName}", privateMarker: privateID},
+ {name: "Range", content: ".action{range .Secret_raw.Relation.BlockIDs}.action{.}.action{end}", privateMarker: privateID},
+ {name: "Dynamic", content: ".action{index .id_mod .Selector}", privateMarker: privateContent},
+ {name: "Chain", content: fmt.Sprintf(`.action{(index .id_mod_raw %q).Relation.BlockIDs}`, secretKey.ID), privateMarker: privateID},
+ {name: "Constant", content: "constant result", publicContent: "constant result"},
+ {name: "Local", content: ".action{.Label}", publicContent: "public label"},
+ {name: "PublicRelation", content: ".action{.Public_raw.Relation.BlockIDs}", publicContent: "[" + publicID + "]"},
+ {name: "StaticID", content: fmt.Sprintf(`.action{index .id_mod %q}`, labelKey.ID), publicContent: "public label"},
+ }
+ view.LayoutType = av.LayoutTypeMap
+ view.Map = &av.LayoutMap{LayoutTable: view.Table}
+ view.Table = nil
+ view.Map.Columns = nil
+ for _, keyValues := range database.KeyValues {
+ view.Map.Columns = append(view.Map.Columns, &av.ViewTableColumn{BaseField: &av.BaseField{ID: keyValues.Key.ID}})
+ }
+ for i := range templates {
+ test := &templates[i]
+ test.key = av.NewKey(ast.NewNodeID(), test.name, "", av.KeyTypeTemplate)
+ test.key.Template = test.content
+ database.KeyValues = append(database.KeyValues, &av.KeyValues{Key: test.key})
+ view.Map.Columns = append(view.Map.Columns, &av.ViewTableColumn{BaseField: &av.BaseField{ID: test.key.ID}})
+ }
+ view.ItemIDs = []string{sourceID, publicID, privateID}
+ view.Filters = []*av.ViewFilter{{Column: labelKey.ID, Operator: av.FilterOperatorIsEqual,
+ Value: &av.Value{Type: av.KeyTypeText, Text: &av.ValueText{Content: "public label"}}}}
+ if err := av.SaveAttributeView(database); err != nil {
+ t.Fatal(err)
+ }
+ path := av.GetAttributeViewDataPath(database.ID)
+ before, _ := os.ReadFile(path)
+ context, _ := gin.CreateTestContext(httptest.NewRecorder())
+ context.Request = httptest.NewRequest(http.MethodPost, "/api/av/renderAttributeView", nil)
+ filter := func(viewable av.Viewable) av.Viewable {
+ return model.FilterAttributeViewByPublishAccess(context, model.PublishAccess{{ID: privateDocID, Disable: true}}, database.ID, "", viewable)
+ }
+ for _, published := range []bool{false, true} {
+ responseFilter := func(viewable av.Viewable) av.Viewable { return viewable }
+ if published {
+ responseFilter = filter
+ }
+ response := renderAttrView("", database.ID, view.ID, "", 1, 50, nil, av.LayoutTypeMap, false, false, "", "", responseFilter, true)
+ body, err := json.Marshal(response)
+ if err != nil {
+ t.Fatal(err)
+ }
+ var result struct {
+ Code int
+ Data struct{ View *av.Table }
+ }
+ if err = json.Unmarshal(body, &result); err != nil || result.Code != 0 || result.Data.View == nil || len(result.Data.View.Rows) != 1 {
+ t.Fatalf("map template render failed: %s (%v)", body, err)
+ }
+ row := result.Data.View.Rows[0]
+ displayValue := row.GetValue(displayKey.ID)
+ if displayValue == nil || displayValue.Text == nil || displayValue.Text.Content != "public scalar" ||
+ (published && displayValue.RenderedContent != "") || (!published && displayValue.RenderedContent == "") {
+ t.Fatal("map display-template redaction failed or changed the stored scalar")
+ }
+ for _, test := range templates {
+ value := row.GetValue(test.key.ID)
+ if value == nil || value.Template == nil {
+ t.Fatalf("missing template %s", test.name)
+ }
+ if !published && test.privateMarker != "" {
+ if !bytes.Contains([]byte(value.Template.Content), []byte(test.privateMarker)) {
+ t.Fatalf("fixture template %s did not expose its private dependency: %q", test.name, value.Template.Content)
+ }
+ } else if value.Template.Content != test.publicContent {
+ t.Fatalf("template %s published=%t content=%q, want %q", test.name, published, value.Template.Content, test.publicContent)
+ }
+ }
+ if published && (len(row.GetValue(secretKey.ID).Relation.BlockIDs) != 0 || bytes.Contains(body, []byte(privateID)) || bytes.Contains(body, []byte(privateContent))) {
+ t.Fatal("map response retained a private relation or derived template value")
+ }
+ }
+ after, _ := os.ReadFile(path)
+ if !bytes.Equal(before, after) {
+ t.Fatal("map template redaction changed source storage")
+ }
+}
+
+func TestAVContractMapPublishPagesAccessibleResult(t *testing.T) {
+ for _, scenario := range []struct {
+ name string
+ count int
+ denyEvery int
+ }{{"all 120 records accessible", 120, 0}, {"240 accessible records with 120 denied", 360, 3}} {
+ t.Run(scenario.name, func(t *testing.T) {
+ fixture := setupAttributeViewContextFilterAPITest(t)
+ database, view := fixture.attrView, fixture.attrView.Views[0]
+ primary := database.GetBlockKeyValues()
+ privateID, boxID := ast.NewNodeID(), ast.NewNodeID()
+ privateTree := treenode.NewTree(boxID, "/"+privateID+".sy", "/Private", "Private")
+ treenode.UpsertBlockTree(privateTree)
+ filterKey := av.NewKey(ast.NewNodeID(), "Keep", "", av.KeyTypeText)
+ templateKey := av.NewKey(ast.NewNodeID(), "Rendered", "", av.KeyTypeTemplate)
+ templateKey.Template = "Rendered record"
+ filterValues := &av.KeyValues{Key: filterKey}
+ database.KeyValues = append(database.KeyValues, filterValues, &av.KeyValues{Key: templateKey})
+ primary.Values = nil
+ view.ItemIDs = nil
+ visibleIDs := []string{}
+ hiddenID := ""
+ for i := 0; i <= scenario.count; i++ {
+ id := ast.NewNodeID()
+ denied := scenario.denyEvery > 0 && i%scenario.denyEvery == 0
+ value := &av.Value{ID: ast.NewNodeID(), KeyID: primary.Key.ID, BlockID: id,
+ Type: av.KeyTypeBlock, IsDetached: !denied, Block: &av.ValueBlock{Content: fmt.Sprintf("Record %03d", i)}}
+ if denied {
+ value.Block.ID = privateID
+ if i < scenario.count {
+ hiddenID = id
+ }
+ }
+ filterText := "keep"
+ if i == scenario.count {
+ filterText = "skip"
+ } else if !denied {
+ visibleIDs = append(visibleIDs, id)
+ }
+ primary.Values = append(primary.Values, value)
+ filterValues.Values = append(filterValues.Values, &av.Value{ID: ast.NewNodeID(), KeyID: filterKey.ID, BlockID: id,
+ Type: av.KeyTypeText, Text: &av.ValueText{Content: filterText}})
+ view.ItemIDs = append(view.ItemIDs, id)
+ }
+ view.PageSize = 50
+ view.Filters = []*av.ViewFilter{{Column: filterKey.ID, Operator: av.FilterOperatorIsEqual,
+ Value: &av.Value{Type: av.KeyTypeText, Text: &av.ValueText{Content: "keep"}}}}
+ view.LayoutType = av.LayoutTypeMap
+ view.Map = &av.LayoutMap{LayoutTable: view.Table, Settings: av.MapSettings{ShowRecordList: true}}
+ view.Table = nil
+ view.Map.Columns = []*av.ViewTableColumn{
+ {BaseField: &av.BaseField{ID: primary.Key.ID}, Calc: &av.FieldCalc{Operator: av.CalcOperatorCountAll}},
+ {BaseField: &av.BaseField{ID: filterKey.ID}},
+ {BaseField: &av.BaseField{ID: templateKey.ID}},
+ }
+ view.GroupCalc = &av.GroupCalc{Field: primary.Key.ID, FieldCalc: &av.FieldCalc{Operator: av.CalcOperatorCountAll}}
+ if err := av.SaveAttributeView(database); err != nil {
+ t.Fatal(err)
+ }
+ path := av.GetAttributeViewDataPath(database.ID)
+ before, _ := os.ReadFile(path)
+ context, _ := gin.CreateTestContext(httptest.NewRecorder())
+ context.Request = httptest.NewRequest(http.MethodPost, "/api/av/renderAttributeView", nil)
+ filter := func(viewable av.Viewable) av.Viewable {
+ return model.FilterAttributeViewByPublishAccess(context, model.PublishAccess{{ID: privateID, Disable: true}}, database.ID, "", viewable)
+ }
+ render := func(page int, targetID string) (*av.Table, *model.AttributeViewRenderTarget) {
+ t.Helper()
+ response := renderAttrView("", database.ID, view.ID, "", page, 50, nil, av.LayoutTypeMap, false, false,
+ targetID, "", filter, true)
+ body, err := json.Marshal(response)
+ if err != nil {
+ t.Fatal(err)
+ }
+ var result struct {
+ Code int
+ Data struct {
+ View *av.Table
+ Target *model.AttributeViewRenderTarget
+ }
+ }
+ if err = json.Unmarshal(body, &result); err != nil || result.Code != 0 || result.Data.View == nil {
+ t.Fatalf("map render failed: %s, %v", body, err)
+ }
+ mapped := result.Data.View
+ if mapped.RowCount != len(visibleIDs) || mapped.GroupCalc != nil || mapped.Columns[0].Calc != nil {
+ t.Fatalf("public count or aggregates include denied rows: %s", body)
+ }
+ for _, row := range mapped.Rows {
+ value := row.GetValue(templateKey.ID)
+ if value == nil || value.Template == nil || value.Template.Content != "Rendered record" {
+ t.Fatal("re-paginated row lost its deferred template value")
+ }
+ }
+ if bytes.Contains(body, []byte("RowsBeforePagination")) {
+ t.Fatal("private full row buffer was serialized")
+ }
+ return mapped, result.Data.Target
+ }
+ var returnedIDs []string
+ for page := 1; page <= (len(visibleIDs)+49)/50+1; page++ {
+ mapped, _ := render(page, "")
+ start := min(len(visibleIDs), (page-1)*50)
+ end := min(len(visibleIDs), start+50)
+ if len(mapped.Rows) != end-start {
+ t.Fatalf("page %d returned %d rows, want %d", page, len(mapped.Rows), end-start)
+ }
+ for _, row := range mapped.Rows {
+ returnedIDs = append(returnedIDs, row.ID)
+ }
+ }
+ if !reflect.DeepEqual(returnedIDs, visibleIDs) {
+ t.Fatal("public pagination skipped or repeated accessible records")
+ }
+ mapped, target := render(1, visibleIDs[len(visibleIDs)-1])
+ if target == nil || target.Status != "visible" || target.Index != len(visibleIDs)-1 ||
+ target.Offset != max(0, len(visibleIDs)-av.ViewDefaultPageSize*4) || len(mapped.Rows) > av.ViewDefaultPageSize*4 {
+ t.Fatal("public target window used unauthorized row positions or exceeded the ordinary bound")
+ }
+ if hiddenID != "" {
+ mapped, target = render(1, hiddenID)
+ if target == nil || target.Status != "itemNotFound" || target.Index != 0 || target.Offset != 0 || len(mapped.Rows) != 50 {
+ t.Fatal("denied target exposed its original position or bypassed paging")
+ }
+ }
+ after, _ := os.ReadFile(path)
+ if !bytes.Equal(before, after) {
+ t.Fatal("public map re-pagination changed source storage")
+ }
+ })
+ }
+}
+
+func TestAVContractMapPublishFiltersTargetsAndPreservesSource(t *testing.T) {
+ fixture := setupAttributeViewContextFilterAPITest(t)
+ database := fixture.attrView
+ view := database.Views[0]
+ primary := database.GetBlockKeyValues()
+ visibleID, hiddenID := ast.NewNodeID(), ast.NewNodeID()
+ primary.Values = nil
+ for _, id := range []string{hiddenID, visibleID} {
+ primary.Values = append(primary.Values, &av.Value{ID: ast.NewNodeID(), KeyID: primary.Key.ID, BlockID: id,
+ Type: av.KeyTypeBlock, IsDetached: true, Block: &av.ValueBlock{Content: id}})
+ }
+ view.ItemIDs = []string{hiddenID, visibleID}
+ view.LayoutType = av.LayoutTypeMap
+ view.Map = &av.LayoutMap{LayoutTable: view.Table, Settings: av.MapSettings{ServiceID: "missing", LocationKeyID: ast.NewNodeID()}}
+ view.Table = nil
+ if err := av.SaveAttributeView(database); err != nil {
+ t.Fatal(err)
+ }
+ path := av.GetAttributeViewDataPath(database.ID)
+ before, _ := os.ReadFile(path)
+ filter := func(viewable av.Viewable) av.Viewable {
+ mapped := viewable.(*av.Map)
+ rows := []*av.TableRow{}
+ for _, row := range mapped.Rows {
+ if row.ID != hiddenID {
+ rows = append(rows, row)
+ }
+ }
+ mapped.Rows = rows
+ return mapped
+ }
+ for _, targetID := range []string{hiddenID, visibleID} {
+ response := renderAttrView("", database.ID, view.ID, "", 1, 1, nil, av.LayoutTypeMap, false, false,
+ targetID, "", filter, true)
+ body, err := json.Marshal(response)
+ if err != nil {
+ t.Fatal(err)
+ }
+ var result struct {
+ Code int
+ Data struct {
+ View *av.Table
+ Target *model.AttributeViewRenderTarget
+ }
+ }
+ if err = json.Unmarshal(body, &result); err != nil {
+ t.Fatal(err)
+ }
+ want := "visible"
+ if targetID == hiddenID {
+ want = "itemNotFound"
+ }
+ if result.Code != 0 || result.Data.View.RowCount != 1 || len(result.Data.View.Rows) != 1 ||
+ result.Data.Target.Status != want || result.Data.Target.Index != 0 || result.Data.Target.Offset != 0 {
+ t.Fatalf("publish leaked map count or target: %s", body)
+ }
+ }
+ after, _ := os.ReadFile(path)
+ if !bytes.Equal(before, after) {
+ t.Fatal("read-only map render changed its source")
+ }
+}
diff --git a/kernel/api/contract_system_test.go b/kernel/api/contract_system_test.go
index a8735edeb1..a5597f0ac6 100644
--- a/kernel/api/contract_system_test.go
+++ b/kernel/api/contract_system_test.go
@@ -60,6 +60,18 @@ func TestAPIContractSystemCompleteConfiguration(t *testing.T) {
if err := decoder.Decode(&sourceJSON); err != nil {
t.Fatal(err)
}
+ // 地图配置只返回元数据和凭据存在状态。
+ if source.Map != nil {
+ masked, marshalErr := json.Marshal(mapConfPayload(source.Map))
+ if marshalErr != nil {
+ t.Fatal(marshalErr)
+ }
+ var mapJSON any
+ if err := json.Unmarshal(masked, &mapJSON); err != nil {
+ t.Fatal(err)
+ }
+ sourceJSON.(map[string]any)["map"] = mapJSON
+ }
decoder = json.NewDecoder(bytes.NewReader(after))
decoder.UseNumber()
if err := decoder.Decode(&payloadJSON); err != nil {
diff --git a/kernel/api/map.go b/kernel/api/map.go
new file mode 100644
index 0000000000..6760975df5
--- /dev/null
+++ b/kernel/api/map.go
@@ -0,0 +1,73 @@
+package api
+
+import (
+ "github.com/gin-gonic/gin"
+ "github.com/siyuan-note/siyuan/kernel/apicontract"
+ "github.com/siyuan-note/siyuan/kernel/conf"
+ "github.com/siyuan-note/siyuan/kernel/model"
+ "github.com/siyuan-note/siyuan/kernel/util"
+)
+
+func mapConfPayload(config *conf.Map) *apicontract.MapConfig {
+ ret := &apicontract.MapConfig{Services: []*apicontract.MapService{}}
+ if config != nil {
+ ret.Revision = config.Revision
+ for _, service := range config.Services {
+ if service != nil && conf.IsMapProvider(service.Provider) {
+ ret.Services = append(ret.Services, &apicontract.MapService{
+ ID: service.ID, Name: service.Name, Provider: service.Provider,
+ HasAPIKey: service.HasAPIKey(), HasSecurityCode: service.HasSecurityCode(), Configured: service.Configured(),
+ })
+ }
+ }
+ }
+ return ret
+}
+
+// 路由中间件之外保留处理器内的权限检查,拒绝发布上下文和非管理员内部调用,并禁止缓存响应。
+func mapAdminAdmission[Data any](c *gin.Context) *apicontract.Response[Data] {
+ c.Header("Cache-Control", "no-store")
+ c.Header("Pragma", "no-cache")
+ if !model.IsAdminRoleContext(c) {
+ response := apicontract.Failure[Data](-1, "administrator access required")
+ return &response
+ }
+ return nil
+}
+
+var getMapConf = contractHandler(apicontract.MapGetConf, func(c *gin.Context, request apicontract.EmptyRequest) apicontract.Response[*apicontract.MapConfig] {
+ return apicontract.Success(mapConfPayload(model.Conf.GetMap()))
+}, mapAdminAdmission[*apicontract.MapConfig])
+
+var setMapConf = contractHandler(apicontract.MapSetConf, serializeSetting("map", func(c *gin.Context, request apicontract.MapSetConfRequest) apicontract.Response[*apicontract.MapConfig] {
+ inputs := make([]model.MapServiceInput, len(request.Services))
+ for i, service := range request.Services {
+ inputs[i] = model.MapServiceInput{ID: service.ID, Name: service.Name, Provider: service.Provider, APIKey: service.APIKey, SecurityCode: service.SecurityCode}
+ }
+ config, err := model.Conf.SetMap(inputs, request.ExpectedRevision)
+ if err != nil {
+ return apicontract.Failure[*apicontract.MapConfig](-1, err.Error())
+ }
+ return apicontract.Success(mapConfPayload(config))
+}), mapAdminAdmission[*apicontract.MapConfig])
+
+var getMapRuntime = contractHandler(apicontract.MapGetRuntime, func(c *gin.Context, request apicontract.MapRuntimeRequest) apicontract.Response[*apicontract.MapRuntime] {
+ service, err := model.Conf.GetMapRuntime(request.ServiceID)
+ if err != nil {
+ return apicontract.Failure[*apicontract.MapRuntime](-1, err.Error())
+ }
+ return apicontract.Success(&apicontract.MapRuntime{Provider: service.Provider, APIKey: service.APIKey, SecurityCode: service.SecurityCode})
+}, mapRuntimeAdmission)
+
+func mapRuntimeAdmission(c *gin.Context) *apicontract.Response[*apicontract.MapRuntime] {
+ if denied := mapAdminAdmission[*apicontract.MapRuntime](c); denied != nil {
+ return denied
+ }
+ // 沙箱自身导航后不再继承初始 CSP,必须由内核鉴权拒绝 opaque-origin 请求。
+ // 跳过空口令检查的启动模式不保证该边界,即使当前设置了口令也不启用 SDK。
+ if util.SiYuanAccessAuthCodeBypass {
+ response := apicontract.Failure[*apicontract.MapRuntime](-1, "mapAuthenticationBypass")
+ return &response
+ }
+ return nil
+}
diff --git a/kernel/api/map_test.go b/kernel/api/map_test.go
new file mode 100644
index 0000000000..ad57ec3b2d
--- /dev/null
+++ b/kernel/api/map_test.go
@@ -0,0 +1,446 @@
+package api
+
+import (
+ archivezip "archive/zip"
+ "bytes"
+ "encoding/json"
+ "io"
+ "mime/multipart"
+ "net/http"
+ "net/http/httptest"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+
+ ginSessions "github.com/gin-contrib/sessions"
+ "github.com/gin-contrib/sessions/cookie"
+ "github.com/gin-gonic/gin"
+ "github.com/siyuan-note/siyuan/kernel/apicontract"
+ "github.com/siyuan-note/siyuan/kernel/conf"
+ "github.com/siyuan-note/siyuan/kernel/model"
+ "github.com/siyuan-note/siyuan/kernel/util"
+)
+
+func setupMapAPI(t *testing.T, role model.Role, guard bool) *gin.Engine {
+ t.Helper()
+ oldConf, oldConfDir, oldReadonly, oldTemp := model.Conf, util.ConfDir, util.ReadOnly, util.TempDir
+ oldBypass := util.SiYuanAccessAuthCodeBypass
+ util.SiYuanAccessAuthCodeBypass = false
+ model.Conf = model.NewAppConf()
+ model.Conf.AccessAuthCode = "test-password"
+ model.Conf.Api = &conf.API{Token: "map-test-api-token"}
+ model.Conf.Sync = &conf.Sync{Enabled: true, Provider: 1}
+ model.Conf.System = &conf.System{}
+ model.Conf.Map = &conf.Map{Services: []*conf.MapService{
+ {ID: "amap", Name: "AMap", Provider: conf.MapProviderAMap, APIKey: "map-api-private-key", SecurityCode: "map-api-private-code"},
+ {ID: "tencent", Name: "Tencent", Provider: conf.MapProviderTencent, APIKey: "map-api-other-key"},
+ {ID: "free", Name: "Free", Provider: conf.MapProviderOpenFreeMap},
+ {ID: "incomplete", Name: "Incomplete", Provider: conf.MapProviderAMap, APIKey: "map-api-incomplete-key"},
+ }}
+ util.ConfDir, util.ReadOnly, util.TempDir = t.TempDir(), false, t.TempDir()
+ t.Cleanup(func() {
+ model.Conf, util.ConfDir, util.ReadOnly, util.TempDir = oldConf, oldConfDir, oldReadonly, oldTemp
+ util.SiYuanAccessAuthCodeBypass = oldBypass
+ })
+ gin.SetMode(gin.TestMode)
+ engine := gin.New()
+ engine.Use(ginSessions.Sessions("map-api-test", cookie.NewStore([]byte("map-api-test-session-key"))))
+ engine.Use(func(c *gin.Context) { c.Set(model.RoleContextKey, role); c.Next() })
+ if guard {
+ engine.POST("/api/map/getConf", contractRouteHandlers(apicontract.MapGetConf, getMapConf)...)
+ engine.POST("/api/map/setConf", contractRouteHandlers(apicontract.MapSetConf, setMapConf)...)
+ engine.POST("/api/map/getRuntime", contractRouteHandlers(apicontract.MapGetRuntime, getMapRuntime)...)
+ } else {
+ engine.POST("/api/map/getConf", getMapConf)
+ engine.POST("/api/map/setConf", setMapConf)
+ engine.POST("/api/map/getRuntime", getMapRuntime)
+ }
+ engine.POST("/api/system/getConf", getConf)
+ engine.POST("/api/system/exportConf", exportConf)
+ return engine
+}
+
+func callMapAPI(t *testing.T, engine *gin.Engine, path, body string) *httptest.ResponseRecorder {
+ t.Helper()
+ // 普通写入使用当前版本;并发测试显式提供旧版本,不被此辅助方法覆盖。
+ if path == "/api/map/setConf" {
+ var fields map[string]json.RawMessage
+ if json.Unmarshal([]byte(body), &fields) == nil && fields != nil && fields["expectedRevision"] == nil {
+ fields["expectedRevision"], _ = json.Marshal(model.Conf.Map.Revision)
+ encoded, err := json.Marshal(fields)
+ if err != nil {
+ t.Fatal(err)
+ }
+ body = string(encoded)
+ }
+ }
+ request := httptest.NewRequest(http.MethodPost, "https://notes.example.com"+path, strings.NewReader(body))
+ request.Header.Set("Content-Type", "application/json")
+ request.RemoteAddr = "192.0.2.30:12345"
+ response := httptest.NewRecorder()
+ engine.ServeHTTP(response, request)
+ if response.Code == http.StatusOK {
+ requireAPIContract(t, http.MethodPost, path, response)
+ }
+ return response
+}
+
+func mapResponseCode(t *testing.T, response *httptest.ResponseRecorder) int {
+ t.Helper()
+ var result struct{ Code int }
+ if err := json.Unmarshal(response.Body.Bytes(), &result); err != nil {
+ t.Fatal(err)
+ }
+ return result.Code
+}
+
+func TestAPIContractMapConfigurationAndSelectedRuntime(t *testing.T) {
+ engine := setupMapAPI(t, model.RoleAdministrator, true)
+ model.Conf.Map.Services = append(model.Conf.Map.Services,
+ &conf.MapService{ID: "unsupported", Name: "Unsupported", Provider: "custom", APIKey: "map-api-unsupported-key"})
+ response := callMapAPI(t, engine, "/api/map/getConf", `{}`)
+ if mapResponseCode(t, response) != 0 || strings.Contains(response.Body.String(), "map-api-") || strings.Contains(response.Body.String(), `"apiKey"`) || strings.Contains(response.Body.String(), `"securityCode"`) {
+ t.Fatalf("getConf leaked credentials or failed: %s", response.Body.String())
+ }
+ var list struct{ Data apicontract.MapConfig }
+ if err := json.Unmarshal(response.Body.Bytes(), &list); err != nil || len(list.Data.Services) != 4 || !list.Data.Services[0].Configured || !list.Data.Services[0].HasSecurityCode || list.Data.Services[3].Configured {
+ t.Fatal("incorrect configured/presence metadata")
+ }
+ for _, test := range []struct{ id, key, code string }{
+ {"amap", "map-api-private-key", "map-api-private-code"},
+ {"tencent", "map-api-other-key", ""},
+ {"free", "", ""},
+ } {
+ response = callMapAPI(t, engine, "/api/map/getRuntime", `{"serviceID":"`+test.id+`"}`)
+ if mapResponseCode(t, response) != 0 || response.Header().Get("Cache-Control") != "no-store" {
+ t.Fatal("runtime failed or was cacheable")
+ }
+ var runtime struct{ Data map[string]string }
+ if err := json.Unmarshal(response.Body.Bytes(), &runtime); err != nil || runtime.Data["provider"] == "" || runtime.Data["apiKey"] != test.key || runtime.Data["securityCode"] != test.code {
+ t.Fatal("runtime returned the wrong provider credentials")
+ }
+ for key := range runtime.Data {
+ if key != "provider" && key != "apiKey" && key != "securityCode" {
+ t.Fatalf("runtime included unrelated field %q", key)
+ }
+ }
+ }
+ for _, body := range []string{`{}`, `{"serviceID":"missing"}`, `{"serviceID":"incomplete"}`, `{"serviceID":"unsupported"}`, `{"serviceID":""}`, `{"serviceID":null}`} {
+ response = callMapAPI(t, engine, "/api/map/getRuntime", body)
+ if mapResponseCode(t, response) == 0 || strings.Contains(response.Body.String(), "map-api-") || response.Header().Get("Cache-Control") != "no-store" {
+ t.Fatal("unavailable runtime fell back or leaked credentials")
+ }
+ }
+ if len(model.Conf.Map.Services) != 5 || model.Conf.Map.Services[4].Provider != "custom" {
+ t.Fatal("safe configuration reads rewrote unrecognized persisted data")
+ }
+}
+
+func TestAPIContractMapWholeListSecretWrites(t *testing.T) {
+ engine := setupMapAPI(t, model.RoleAdministrator, true)
+ response := callMapAPI(t, engine, "/api/map/setConf", `{"services":[{"id":"amap","name":"Rename","provider":"amap"}]}`)
+ if mapResponseCode(t, response) != 0 || model.Conf.Map.Services[0].APIKey != "map-api-private-key" || model.Conf.Map.Services[0].SecurityCode != "map-api-private-code" || len(model.Conf.Map.Services) != 1 || strings.Contains(response.Body.String(), "map-api-") {
+ t.Fatal("full-list update leaked or replaced omitted credentials")
+ }
+ for _, body := range []string{
+ `{}`, `{"services":null}`, `{"services":[null]}`,
+ `{"services":[{"id":"amap","name":"Rename","provider":"amap","apiKey":null}]}`,
+ `{"services":[{"id":"amap","name":"Rename","provider":"amap","hasAPIKey":true}]}`,
+ `{"services":[{"name":"Remote","provider":"amap","remoteURL":"https://unknown.example"}]}`,
+ `{"services":[],"unknown":true}`, `{"services":[]} {"services":[]}`,
+ `{"services":[{"name":"Bad","provider":"custom"}]}`,
+ } {
+ response = callMapAPI(t, engine, "/api/map/setConf", body)
+ if mapResponseCode(t, response) == 0 || len(model.Conf.Map.Services) != 1 || model.Conf.Map.Services[0].APIKey != "map-api-private-key" {
+ t.Fatalf("invalid request altered map configuration: %s", body)
+ }
+ }
+ response = callMapAPI(t, engine, "/api/map/setConf", `{"services":[{"id":"amap","name":"Cleared","provider":"amap","apiKey":""}]}`)
+ if mapResponseCode(t, response) != 0 || model.Conf.Map.Services[0].APIKey != "" || model.Conf.Map.Services[0].SecurityCode != "map-api-private-code" {
+ t.Fatal("explicit credential clear semantics changed")
+ }
+ response = callMapAPI(t, engine, "/api/map/setConf", `{"services":[{"id":"amap","name":"New provider","provider":"baidu","apiKey":"new-test-key"}]}`)
+ if mapResponseCode(t, response) != 0 || model.Conf.Map.Services[0].SecurityCode != "" || model.Conf.Map.Services[0].APIKey != "new-test-key" {
+ t.Fatal("provider change retained previous credentials")
+ }
+ stored, err := os.ReadFile(filepath.Join(util.ConfDir, "conf.json"))
+ if err != nil || bytes.Contains(stored, []byte("new-test-key")) {
+ t.Fatal("API stored plaintext credentials")
+ }
+}
+
+func TestAPIContractMapDeniesReadersAndPublish(t *testing.T) {
+ for _, role := range []model.Role{model.RoleEditor, model.RoleReader, model.RoleVisitor} {
+ for _, guard := range []bool{false, true} {
+ t.Run(string(rune('0'+role))+"/"+map[bool]string{true: "route", false: "handler"}[guard], func(t *testing.T) {
+ engine := setupMapAPI(t, role, guard)
+ before, _ := json.Marshal(model.Conf.Map)
+ for _, path := range []string{"/api/map/getConf", "/api/map/setConf", "/api/map/getRuntime"} {
+ response := callMapAPI(t, engine, path, `{"serviceID":"amap","services":[]}`)
+ if response.Code == http.StatusOK && mapResponseCode(t, response) == 0 || strings.Contains(response.Body.String(), "map-api-") {
+ t.Fatalf("non-administrator accessed %s", path)
+ }
+ if guard && role != model.RoleVisitor && response.Code != http.StatusForbidden {
+ t.Fatalf("route did not enforce administrator middleware: %d", response.Code)
+ }
+ }
+ after, _ := json.Marshal(model.Conf.Map)
+ if !bytes.Equal(before, after) {
+ t.Fatal("denied caller changed services")
+ }
+ })
+ }
+ }
+}
+
+func TestAPIContractMapGetConfAndExportNeverExposeCredentials(t *testing.T) {
+ for _, role := range []model.Role{model.RoleAdministrator, model.RoleReader} {
+ engine := setupMapAPI(t, role, true)
+ response := callMapAPI(t, engine, "/api/system/getConf", `{}`)
+ if mapResponseCode(t, response) != 0 || strings.Contains(response.Body.String(), "map-api-") {
+ t.Fatal("system getConf leaked map credentials")
+ }
+ var result struct {
+ Data struct{ Conf apicontract.SystemAppConf }
+ }
+ if err := json.Unmarshal(response.Body.Bytes(), &result); err != nil || result.Data.Conf.Map == nil {
+ t.Fatal("missing safe map configuration")
+ }
+ if role == model.RoleReader && len(result.Data.Conf.Map.Services) != 0 {
+ t.Fatal("publish getConf exposed local service metadata")
+ }
+ if role == model.RoleAdministrator && (len(result.Data.Conf.Map.Services) != 4 || !result.Data.Conf.Map.Services[0].Configured) {
+ t.Fatal("administrator lost redacted configuration metadata")
+ }
+ }
+ engine := setupMapAPI(t, model.RoleAdministrator, true)
+ model.Conf.UserData = "export-map-private-user"
+ model.Conf.CookieKey = "export-map-private-cookie"
+ model.Conf.MCPOAuth = "export-map-private-oauth"
+ before, _ := json.Marshal(model.Conf)
+ response := callMapAPI(t, engine, "/api/system/exportConf", `{}`)
+ var result struct {
+ Data apicontract.SystemExportConfData
+ }
+ if mapResponseCode(t, response) != 0 || json.Unmarshal(response.Body.Bytes(), &result) != nil {
+ t.Fatal("configuration export failed")
+ }
+ archive, err := archivezip.OpenReader(filepath.Join(util.TempDir, "export", result.Data.Name+".zip"))
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer archive.Close()
+ for _, entry := range archive.File {
+ file, err := entry.Open()
+ if err != nil {
+ t.Fatal(err)
+ }
+ data, err := io.ReadAll(file)
+ file.Close()
+ if err != nil || bytes.Contains(data, []byte("map-api-")) || bytes.Contains(data, []byte("export-map-private-")) {
+ t.Fatal("exported configuration contains map credentials")
+ }
+ var exported model.AppConf
+ if err = json.Unmarshal(data, &exported); err != nil || exported.Map != nil || exported.UserData != "" || exported.CookieKey != "" || exported.MCPOAuth != "" || exported.AccessAuthCode != "" {
+ t.Fatal("device-local map services were included in portable configuration")
+ }
+ }
+ after, _ := json.Marshal(model.Conf)
+ if !bytes.Equal(before, after) {
+ t.Fatal("export altered active map credentials")
+ }
+}
+
+func TestAPIContractMapImportPreservesDeviceConfiguration(t *testing.T) {
+ engine := setupMapAPI(t, model.RoleAdministrator, true)
+ engine.POST("/api/system/importConf", importConf)
+ before, _ := json.Marshal(model.Conf.Map)
+ for _, payload := range []string{
+ `{}`, `{"map":null}`, `{"map":{"services":[]}}`,
+ `{"map":{"services":[{"id":"amap","name":"Other device","provider":"tencent","apiKey":"untrusted-import-key"}]}}`,
+ } {
+ var body bytes.Buffer
+ writer := multipart.NewWriter(&body)
+ part, err := writer.CreateFormFile("file", "settings.json")
+ if err != nil {
+ t.Fatal(err)
+ }
+ if _, err = io.WriteString(part, payload); err != nil {
+ t.Fatal(err)
+ }
+ if err = writer.Close(); err != nil {
+ t.Fatal(err)
+ }
+ request := httptest.NewRequest(http.MethodPost, "/api/system/importConf", &body)
+ request.Header.Set("Content-Type", writer.FormDataContentType())
+ response := httptest.NewRecorder()
+ engine.ServeHTTP(response, request)
+ if mapResponseCode(t, response) != 0 {
+ t.Fatal("configuration import failed")
+ }
+ after, _ := json.Marshal(model.Conf.Map)
+ if !bytes.Equal(before, after) {
+ t.Fatal("portable configuration replaced device-local services or credentials")
+ }
+ }
+}
+
+func TestAPIContractMapRuntimeDisabledWithAuthBypass(t *testing.T) {
+ engine := setupMapAPI(t, model.RoleAdministrator, true)
+ util.SiYuanAccessAuthCodeBypass = true
+ for _, password := range []string{"", "test-password"} {
+ model.Conf.AccessAuthCode = password
+ for _, serviceID := range []string{"amap", "free"} {
+ response := callMapAPI(t, engine, "/api/map/getRuntime", `{"serviceID":"`+serviceID+`"}`)
+ if mapResponseCode(t, response) == 0 || !strings.Contains(response.Body.String(), "mapAuthenticationBypass") || strings.Contains(response.Body.String(), "map-api-") || response.Header().Get("Cache-Control") != "no-store" {
+ t.Fatal("auth bypass mode enabled a map SDK or exposed runtime credentials")
+ }
+ }
+ }
+ response := callMapAPI(t, engine, "/api/map/getConf", `{}`)
+ if mapResponseCode(t, response) != 0 {
+ t.Fatal("SDK safety gate unnecessarily disabled local configuration management")
+ }
+}
+
+func TestAPIContractMapOpaqueOriginCannotReadKernelData(t *testing.T) {
+ engine := setupMapAPI(t, model.RoleVisitor, true)
+ engine.POST("/test-private-data", model.CheckAuth, func(c *gin.Context) { c.String(200, "private-note-fixture") })
+ engine.GET("/test-login", func(c *gin.Context) {
+ session := util.GetSession(c)
+ util.GetWorkspaceSession(session).AccessAuthCode = "test-password"
+ if err := session.Save(c); err != nil {
+ t.Error(err)
+ }
+ c.Status(200)
+ })
+ login := httptest.NewRecorder()
+ engine.ServeHTTP(login, httptest.NewRequest(http.MethodGet, "http://localhost:6806/test-login", nil))
+ for _, password := range []string{"", "test-password"} {
+ model.Conf.AccessAuthCode = password
+ for _, site := range []string{"", "cross-site", "same-site"} {
+ for _, path := range []string{"/test-private-data", "/api/map/getRuntime"} {
+ request := httptest.NewRequest(http.MethodPost, "http://localhost:6806"+path, strings.NewReader(`{"serviceID":"amap"}`))
+ request.RemoteAddr = "127.0.0.1:12345"
+ request.Header.Set("Content-Type", "application/json")
+ request.Header.Set("Origin", "null")
+ request.Header.Set("Sec-Fetch-Site", site)
+ if util.IsSessionOriginAllowedRequest(request) {
+ t.Fatal("WebSocket/session origin validator admitted an opaque origin")
+ }
+ // 即使浏览器附带已有登录 Cookie,也不能越过 Origin 校验。
+ for _, cookie := range login.Result().Cookies() {
+ request.AddCookie(cookie)
+ }
+ response := httptest.NewRecorder()
+ engine.ServeHTTP(response, request)
+ if response.Code != http.StatusUnauthorized || strings.Contains(response.Body.String(), "private-note-fixture") || strings.Contains(response.Body.String(), "map-api-") {
+ t.Fatalf("opaque-origin request read kernel data: passworded=%t, fetch-site=%q, path=%s", password != "", site, path)
+ }
+ }
+ }
+ }
+}
+
+func TestAPIContractMapRejectsStaleOrMissingRevision(t *testing.T) {
+ engine := setupMapAPI(t, model.RoleAdministrator, true)
+ initialRevision := model.Conf.Map.Revision
+ body, _ := json.Marshal(map[string]any{"expectedRevision": initialRevision, "services": []map[string]string{
+ {"id": "created-in-first-window", "name": "First", "provider": "tencent", "apiKey": "concurrent-private-key"},
+ }})
+ response := callMapAPI(t, engine, "/api/map/setConf", string(body))
+ var first struct{ Data apicontract.MapConfig }
+ if mapResponseCode(t, response) != 0 || json.Unmarshal(response.Body.Bytes(), &first) != nil || first.Data.Revision == initialRevision || first.Data.Revision == "" {
+ t.Fatal("map API did not return the saved revision")
+ }
+ before, err := os.ReadFile(filepath.Join(util.ConfDir, "conf.json"))
+ if err != nil {
+ t.Fatal(err)
+ }
+ body, _ = json.Marshal(map[string]any{"expectedRevision": initialRevision, "services": []any{}})
+ response = callMapAPI(t, engine, "/api/map/setConf", string(body))
+ if mapResponseCode(t, response) == 0 || !strings.Contains(response.Body.String(), "mapSettingsConflict") {
+ t.Fatal("stale map list did not return the stable conflict message")
+ }
+ for _, invalid := range []string{`{"services":[]}`, `{"services":[],"expectedRevision":null}`, `{"services":[],"expectedRevision":false}`} {
+ // 直接构造请求,验证未携带版本号时不会被测试辅助方法补齐。
+ request := httptest.NewRequest(http.MethodPost, "/api/map/setConf", strings.NewReader(invalid))
+ response = httptest.NewRecorder()
+ engine.ServeHTTP(response, request)
+ requireAPIContract(t, http.MethodPost, "/api/map/setConf", response)
+ if mapResponseCode(t, response) == 0 {
+ t.Fatal("missing or invalid revision was accepted")
+ }
+ }
+ after, err := os.ReadFile(filepath.Join(util.ConfDir, "conf.json"))
+ if err != nil || !bytes.Equal(before, after) || len(model.Conf.Map.Services) != 1 || model.Conf.Map.Services[0].APIKey != "concurrent-private-key" || model.Conf.Map.Revision != first.Data.Revision {
+ t.Fatal("conflicting window overwrote a new service or credential")
+ }
+}
+
+func TestAPIContractMapRemoteBasicOriginBoundary(t *testing.T) {
+ engine := setupMapAPI(t, model.RoleVisitor, true)
+ previousName := util.WorkspaceName
+ util.WorkspaceName = "map-origin-test"
+ t.Cleanup(func() { util.WorkspaceName = previousName })
+ mutations := 0
+ engine.POST("/test-private-basic", model.CheckAuth, func(c *gin.Context) {
+ mutations++
+ c.String(http.StatusOK, "private-data-fixture")
+ })
+ engine.GET("/stage/build/desktop/", model.CheckAuth, func(c *gin.Context) { c.Status(http.StatusOK) })
+ for _, test := range []struct {
+ name string
+ origin string
+ site string
+ token bool
+ status int
+ }{
+ {name: "opaque remote browser with Basic credentials", origin: "null", site: "cross-site", status: http.StatusUnauthorized},
+ {name: "opaque origin without fetch metadata", origin: "null", status: http.StatusUnauthorized},
+ {name: "opaque origin with same-origin metadata", origin: "null", site: "same-origin", status: http.StatusUnauthorized},
+ {name: "opaque origin with direct-navigation metadata", origin: "null", site: "none", status: http.StatusUnauthorized},
+ {name: "ordinary non-browser Basic client", status: http.StatusOK},
+ {name: "missing origin same-origin fetch", site: "same-origin", status: http.StatusOK},
+ {name: "missing origin cross-site fetch", site: "cross-site", status: http.StatusUnauthorized},
+ {name: "missing origin same-site fetch", site: "same-site", status: http.StatusUnauthorized},
+ {name: "same-origin browser", origin: "https://notes.example.com", site: "same-origin", status: http.StatusOK},
+ {name: "same-origin without fetch metadata", origin: "https://notes.example.com", status: http.StatusOK},
+ {name: "same-origin header with cross-site fetch", origin: "https://notes.example.com", site: "cross-site", status: http.StatusUnauthorized},
+ {name: "foreign origin without fetch metadata", origin: "https://foreign.example.com", status: http.StatusUnauthorized},
+ {name: "foreign origin with same-origin metadata", origin: "https://foreign.example.com", site: "same-origin", status: http.StatusUnauthorized},
+ {name: "foreign origin with cross-site metadata", origin: "https://foreign.example.com", site: "cross-site", status: http.StatusUnauthorized},
+ {name: "explicit API token stays authorized", origin: "null", site: "cross-site", token: true, status: http.StatusOK},
+ } {
+ t.Run(test.name, func(t *testing.T) {
+ request := httptest.NewRequest(http.MethodPost, "https://notes.example.com/test-private-basic", strings.NewReader(`{}`))
+ request.RemoteAddr = "198.51.100.7:23456"
+ request.Header.Set("Origin", test.origin)
+ request.Header.Set("Sec-Fetch-Site", test.site)
+ if test.token {
+ request.Header.Set("Authorization", "Token "+model.Conf.Api.Token)
+ } else {
+ request.SetBasicAuth(util.WorkspaceName, model.Conf.AccessAuthCode)
+ }
+ before := mutations
+ response := httptest.NewRecorder()
+ engine.ServeHTTP(response, request)
+ if response.Code != test.status || test.status == http.StatusUnauthorized && mutations != before {
+ t.Fatalf("remote Basic origin boundary: status=%d, want=%d, protected-handler-ran=%t", response.Code, test.status, mutations != before)
+ }
+ })
+ }
+ // 已登录用户从外部链接进入应用主页面,仍沿用会话来源策略中的顶层导航例外。
+ request := httptest.NewRequest(http.MethodGet, "https://notes.example.com/stage/build/desktop/", nil)
+ request.RemoteAddr = "198.51.100.7:23456"
+ request.Header.Set("Sec-Fetch-Site", "cross-site")
+ request.Header.Set("Sec-Fetch-Mode", "navigate")
+ request.Header.Set("Sec-Fetch-Dest", "document")
+ request.SetBasicAuth(util.WorkspaceName, model.Conf.AccessAuthCode)
+ response := httptest.NewRecorder()
+ engine.ServeHTTP(response, request)
+ if response.Code != http.StatusOK {
+ t.Fatal("legitimate top-level application navigation lost Basic authentication")
+ }
+}
diff --git a/kernel/api/router.go b/kernel/api/router.go
index e9b9450703..0d26160039 100644
--- a/kernel/api/router.go
+++ b/kernel/api/router.go
@@ -25,6 +25,9 @@ import (
)
func ServeAPI(ginServer *gin.Engine) {
+ ginServer.Handle("POST", "/api/map/getConf", contractRouteHandlers(apicontract.MapGetConf, getMapConf)...)
+ ginServer.Handle("POST", "/api/map/setConf", contractRouteHandlers(apicontract.MapSetConf, setMapConf)...)
+ ginServer.Handle("POST", "/api/map/getRuntime", contractRouteHandlers(apicontract.MapGetRuntime, getMapRuntime)...)
ginServer.Use(boxLeaseMiddleware)
registerOauthRoutes(ginServer)
registerMcpRoutes(ginServer)
diff --git a/kernel/api/system.go b/kernel/api/system.go
index d8d387f23c..a2540e68ba 100644
--- a/kernel/api/system.go
+++ b/kernel/api/system.go
@@ -452,18 +452,12 @@ var exportConf = contractHandler(apicontract.SystemExportConf, func(c *gin.Conte
return
}
- data, err := gulu.JSON.MarshalJSON(model.Conf)
+ clonedConf, err := model.GetMaskedConf()
if err != nil {
logging.LogErrorf("export conf failed: %s", err)
ret = apicontract.Failure[apicontract.SystemExportConfData](-1, err.Error())
return
}
- clonedConf := &model.AppConf{}
- if err = gulu.JSON.UnmarshalJSON(data, clonedConf); err != nil {
- logging.LogErrorf("export conf failed: %s", err)
- ret = apicontract.Failure[apicontract.SystemExportConfData](-1, err.Error())
- return
- }
if nil != clonedConf.Appearance {
clonedConf.Appearance.DarkThemes = nil
@@ -518,6 +512,8 @@ var exportConf = contractHandler(apicontract.SystemExportConf, func(c *gin.Conte
clonedConf.Api = nil
clonedConf.Repo = nil
clonedConf.Secrets = nil
+ // 地图服务是本机配置;导入设置时保留本机服务列表,不随配置包迁移。
+ clonedConf.Map = nil
clonedConf.NotebookCrypto = nil
clonedConf.Onboarding = nil
clonedConf.Publish = nil
@@ -551,7 +547,7 @@ var exportConf = contractHandler(apicontract.SystemExportConf, func(c *gin.Conte
clonedConf.AI.MCP = nil
}
- data, err = gulu.JSON.MarshalIndentJSON(clonedConf, "", " ")
+ data, err := gulu.JSON.MarshalIndentJSON(clonedConf, "", " ")
if err != nil {
logging.LogErrorf("export conf failed: %s", err)
ret = apicontract.Failure[apicontract.SystemExportConfData](-1, err.Error())
diff --git a/kernel/api/system_contract.go b/kernel/api/system_contract.go
index 90d264121f..0789dbef7f 100644
--- a/kernel/api/system_contract.go
+++ b/kernel/api/system_contract.go
@@ -20,6 +20,9 @@ func systemConfPayload(value *model.AppConf) (result *apicontract.SystemAppConf,
if err == nil && result != nil && value.AI != nil && result.AI != nil {
result.AI.Decision = settingDecisionPayload(value.AI.Decision)
}
+ if err == nil && result != nil && value.Map != nil {
+ result.Map = mapConfPayload(value.Map)
+ }
return
}
diff --git a/kernel/apicontract/av_map.go b/kernel/apicontract/av_map.go
new file mode 100644
index 0000000000..4dbf4e4f4e
--- /dev/null
+++ b/kernel/apicontract/av_map.go
@@ -0,0 +1,22 @@
+package apicontract
+
+// AVMapSettings 是 setAttrViewMap 事务的完整设置和地图渲染响应中的设置。
+// 地图只显示本次返回行页的标记,沿用普通视图的筛选、排序和分页。
+// 分组设置保留但不参与地图渲染;普通导出和发布展示记录,不加载地图服务。
+type AVMapSettings struct {
+ // 本机全局地图服务 ID;空字符串表示未选择。数据库不保存或返回提供商凭据。
+ // 缺失或删除服务时保留此 ID,不自动绑定其他服务。
+ ServiceID string `json:"serviceID"`
+ // 位置字段 ID;空字符串表示未选择。字段缺失或类型变化时保留绑定,记录仍然返回。
+ // 隐藏的字段仍包含在 columns 和 rows.cells 中,客户端仅为有效且坐标系匹配的值绘制标记。
+ LocationKeyID string `json:"locationKeyID"`
+ // 是否显示记录列表。新地图默认显示;禁用时分页和标记范围仍然有效。
+ ShowRecordList bool `json:"showRecordList"`
+}
+
+type AVLayoutMap struct {
+ *AVBaseLayout
+ Columns []*AVViewTableColumn `json:"columns" api:"optional,nullable"`
+ RowIDs []string `json:"rowIds" api:"optional,nullable"`
+ Settings AVMapSettings `json:"settings"`
+}
diff --git a/kernel/apicontract/av_map_test.go b/kernel/apicontract/av_map_test.go
new file mode 100644
index 0000000000..b156985210
--- /dev/null
+++ b/kernel/apicontract/av_map_test.go
@@ -0,0 +1,35 @@
+package apicontract
+
+import (
+ "encoding/json"
+ "testing"
+)
+
+func TestAVMapTransactionContract(t *testing.T) {
+ bundle, err := BuildBundle()
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, test := range []struct {
+ data string
+ valid bool
+ }{
+ {`{"serviceID":"local-service","locationKeyID":"20261009000000-abcdefg","showRecordList":true}`, true},
+ {`{"serviceID":"","locationKeyID":"","showRecordList":false}`, true},
+ {`{"serviceID":"","locationKeyID":""}`, false},
+ {`{"serviceID":"","locationKeyID":"","showRecordList":"true"}`, false},
+ {`{"serviceID":"","locationKeyID":"","showRecordList":true,"apiKey":"secret"}`, false},
+ } {
+ var operation TransactionOperation
+ if err := json.Unmarshal([]byte(`{"action":"setAttrViewMap","data":`+test.data+`}`), &operation); err != nil {
+ t.Fatal(err)
+ }
+ payload, err := json.Marshal(Success([]*Transaction{{DoOperations: []*TransactionOperation{&operation}}}))
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err = bundle.ValidateResponse("POST", "/api/transactions", payload); (err == nil) != test.valid {
+ t.Fatalf("map transaction data %s, error %v", test.data, err)
+ }
+ }
+}
diff --git a/kernel/apicontract/av_response.go b/kernel/apicontract/av_response.go
index 3dbb84c578..4ee7822a4e 100644
--- a/kernel/apicontract/av_response.go
+++ b/kernel/apicontract/av_response.go
@@ -62,7 +62,7 @@ type AVArchiveRenderData struct {
CustomColors []*AVAttributeViewCustomColor `json:"customColors"`
ColorOrder []string `json:"colorOrder"`
UsedCustomColorIndexes []int `json:"usedCustomColorIndexes"`
- ViewType string `json:"viewType" api:"enum=table|list|gallery|kanban|calendar"`
+ ViewType string `json:"viewType" api:"enum=table|list|gallery|kanban|calendar|map"`
ViewID string `json:"viewID"`
Views []*AVViewData `json:"views"`
View AVViewInstance `json:"view"`
diff --git a/kernel/apicontract/av_types.go b/kernel/apicontract/av_types.go
index ead7ee9909..1f4a6dcf4a 100644
--- a/kernel/apicontract/av_types.go
+++ b/kernel/apicontract/av_types.go
@@ -1,6 +1,10 @@
package apicontract
type AVTable struct {
+ Map *AVMapSettings `json:"map,omitempty" api:"optional"`
+ // 标记仅覆盖本次返回的行页;rowCount 为筛选后总数,不表示标记数量。
+ // 发布响应先对完整结果过滤访问权限,再计算可访问总数和分页,不返回过滤前的聚合结果。
+ MapMarkerScope string `json:"mapMarkerScope,omitempty" api:"optional,enum=page"`
// 仅日历布局返回字段绑定及一周起始日;创建、更新系统时间作为只读日期源。
Calendar *AVCalendarSettings `json:"calendar,omitempty" api:"optional"`
// 回显本次请求的日期范围,省略范围的请求不返回此字段。
@@ -442,7 +446,7 @@ type AVViewData struct {
Name string `json:"name" api:"optional,nullable"`
Desc string `json:"desc" api:"optional,nullable"`
HideAttrViewName bool `json:"hideAttrViewName" api:"optional,nullable"`
- Type string `json:"type" api:"optional,nullable,enum=table|list|gallery|kanban|calendar"`
+ Type string `json:"type" api:"optional,nullable,enum=table|list|gallery|kanban|calendar|map"`
PageSize int `json:"pageSize" api:"optional,nullable"`
}
@@ -512,8 +516,9 @@ type AVView struct {
Filters []*AVViewFilter `json:"filters,omitempty" api:"optional,nullable"`
Sorts []*AVViewSort `json:"sorts,omitempty" api:"optional,nullable"`
PageSize int `json:"pageSize" api:"optional,nullable"`
- LayoutType string `json:"type" api:"optional,nullable,enum=table|list|gallery|kanban|calendar"`
+ LayoutType string `json:"type" api:"optional,nullable,enum=table|list|gallery|kanban|calendar|map"`
Table *AVLayoutTable `json:"table,omitempty" api:"optional,nullable"`
+ Map *AVLayoutMap `json:"map,omitempty" api:"optional,nullable"`
Calendar *AVLayoutCalendar `json:"calendar,omitempty" api:"optional,nullable"`
List *AVLayoutTable `json:"list,omitempty" api:"optional,nullable"`
Gallery *AVLayoutGallery `json:"gallery,omitempty" api:"optional,nullable"`
@@ -609,7 +614,7 @@ type AVAttributeViewFieldView struct {
ID string `json:"id" api:"optional,nullable"`
Icon string `json:"icon" api:"optional,nullable"`
Name string `json:"name" api:"optional,nullable"`
- Type string `json:"type" api:"optional,nullable,enum=table|list|gallery|kanban|calendar"`
+ Type string `json:"type" api:"optional,nullable,enum=table|list|gallery|kanban|calendar|map"`
Hidden bool `json:"hidden" api:"optional,nullable"`
}
@@ -618,7 +623,7 @@ type AVAvSearchResult struct {
AvName string `json:"avName" api:"optional,nullable"`
ViewName string `json:"viewName" api:"optional,nullable"`
ViewID string `json:"viewID" api:"optional,nullable"`
- ViewLayout string `json:"viewLayout" api:"optional,nullable,enum=|table|list|gallery|kanban|calendar"`
+ ViewLayout string `json:"viewLayout" api:"optional,nullable,enum=|table|list|gallery|kanban|calendar|map"`
BlockID string `json:"blockID" api:"optional,nullable"`
HPath string `json:"hPath" api:"optional,nullable"`
Matched bool `json:"matched,omitempty" api:"optional,nullable"`
diff --git a/kernel/apicontract/av_union.go b/kernel/apicontract/av_union.go
index 9c34630bda..0145f53295 100644
--- a/kernel/apicontract/av_union.go
+++ b/kernel/apicontract/av_union.go
@@ -6,7 +6,7 @@ import (
"reflect"
)
-// AVViewInstance 表示表格、列表、画廊或看板及其递归分组实例,列表复用表格的行列结构。
+// AVViewInstance 表示各布局及其递归分组实例,列表、日历和地图复用表格的行列结构。
type AVViewInstance struct {
table *AVTable
gallery *AVGallery
@@ -42,7 +42,7 @@ func avPayloadSchema(b *schemaBuilder, t reflect.Type, input bool) (*Schema, err
case reflect.TypeFor[AVTable](), reflect.TypeFor[AVTableColumn](), reflect.TypeFor[AVTableCell](),
reflect.TypeFor[AVGallery](), reflect.TypeFor[AVGalleryField](), reflect.TypeFor[AVGalleryFieldValue](),
reflect.TypeFor[AVKanban](), reflect.TypeFor[AVKanbanField](), reflect.TypeFor[AVKanbanFieldValue](),
- reflect.TypeFor[AVLayoutCalendar](), reflect.TypeFor[AVLayoutTable](), reflect.TypeFor[AVViewTableColumn](), reflect.TypeFor[AVLayoutGallery](),
+ reflect.TypeFor[AVLayoutMap](), reflect.TypeFor[AVLayoutCalendar](), reflect.TypeFor[AVLayoutTable](), reflect.TypeFor[AVViewTableColumn](), reflect.TypeFor[AVLayoutGallery](),
reflect.TypeFor[AVViewGalleryCardField](), reflect.TypeFor[AVLayoutKanban](), reflect.TypeFor[AVViewKanbanField]():
return avEmbeddedPayloadSchema(b, t, input)
}
diff --git a/kernel/apicontract/contracts.go b/kernel/apicontract/contracts.go
index 605a197692..5d03780e9b 100644
--- a/kernel/apicontract/contracts.go
+++ b/kernel/apicontract/contracts.go
@@ -76,6 +76,10 @@ type ResponseOptions struct {
var definitions []Definition
+var MapGetConf = define[EmptyRequest, *MapConfig]("getMapConf", "/api/map/getConf", AuthenticatedAccess|AdminAccess, NoBody, ResponseOptions{}, "POST")
+var MapSetConf = define[MapSetConfRequest, *MapConfig]("setMapConf", "/api/map/setConf", AuthenticatedAccess|AdminAccess|WritableAccess, JSONBody, ResponseOptions{}, "POST")
+var MapGetRuntime = define[MapRuntimeRequest, *MapRuntime]("getMapRuntime", "/api/map/getRuntime", AuthenticatedAccess|AdminAccess, JSONBody, ResponseOptions{}, "POST")
+
// MCP OAuth 协议入口返回标准 OAuth JSON 或授权页面,不使用内核结果信封。
var MCPOAuthResource = define[EmptyRequest, BinaryContent]("mcpOAuthResource", "/.well-known/oauth-protected-resource/mcp", PublicAccess, NoBody, mcpOAuthContentOptions(), "GET")
var MCPOAuthResourceRoot = define[EmptyRequest, BinaryContent]("mcpOAuthResourceRoot", "/.well-known/oauth-protected-resource", PublicAccess, NoBody, mcpOAuthContentOptions(), "GET")
diff --git a/kernel/apicontract/map.go b/kernel/apicontract/map.go
new file mode 100644
index 0000000000..1d0032d2d4
--- /dev/null
+++ b/kernel/apicontract/map.go
@@ -0,0 +1,95 @@
+package apicontract
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "io"
+ "reflect"
+)
+
+// MapConfig 为脱敏配置,只提供服务标识、供应商和凭据存在状态,不返回凭据内容。
+type MapConfig struct {
+ Services []*MapService `json:"services"`
+ Revision string `json:"revision"`
+}
+
+type MapService struct {
+ ID string `json:"id"`
+ Name string `json:"name"`
+ Provider string `json:"provider" api:"enum=amap|tencent|baidu|openfreemap"`
+ HasAPIKey bool `json:"hasAPIKey"`
+ HasSecurityCode bool `json:"hasSecurityCode"`
+ Configured bool `json:"configured"`
+}
+
+// MapSetConfRequest 整体替换最多 100 个本机服务,要求管理员和可写工作空间。
+// 空列表删除全部服务;不接受未知字段、null 或任意远程服务地址。
+// expectedRevision 必须与读取的 revision 一致;旧配置初始为空字符串。
+// 冲突返回 code=-1、msg=mapSettingsConflict,不修改服务和凭据;成功后生成新的独立版本号。
+type MapSetConfRequest struct {
+ Services []MapServiceInput `json:"services"`
+ ExpectedRevision string `json:"expectedRevision"`
+}
+
+// MapServiceInput 的凭据省略时保留相同供应商的值,显式空字符串清除,切换供应商清除旧凭据。
+// ID 省略或为空时生成;非空 ID 须匹配 [A-Za-z0-9][A-Za-z0-9_-]{0,127},本机缺失时按原 ID 创建。
+// 名称去除首尾空白后为 1 至 256 字节,凭据最多 4096 字节。
+// AMap 需要 APIKey 和 SecurityCode,腾讯及百度需要 APIKey,OpenFreeMap 不使用凭据。
+type MapServiceInput struct {
+ ID string `json:"id" api:"optional"`
+ Name string `json:"name" api:"trim"`
+ Provider string `json:"provider" api:"enum=amap|tencent|baidu|openfreemap"`
+ APIKey *string `json:"apiKey,omitempty" api:"optional,nonnullable"`
+ SecurityCode *string `json:"securityCode,omitempty" api:"optional,nonnullable"`
+}
+
+type MapRuntimeRequest struct {
+ ServiceID string `json:"serviceID" api:"trim"`
+}
+
+// MapRuntime 只向管理员返回指定服务的运行凭据,响应禁止缓存;服务缺失或未配置时返回错误。
+// 浏览器 SDK 凭据对当前浏览器和选中的地图供应商可见,不通过发布页或配置导出提供。
+// 启用 SIYUAN_ACCESS_AUTH_CODE_BYPASS 的进程返回 code=-1、msg=mapAuthenticationBypass,
+// 不提供运行凭据,避免沙箱导航后绕过内核鉴权。
+type MapRuntime struct {
+ Provider string `json:"provider" api:"enum=amap|tencent|baidu|openfreemap"`
+ APIKey string `json:"apiKey,omitempty"`
+ SecurityCode string `json:"securityCode,omitempty"`
+}
+
+func init() {
+ MapSetConf.decodeRequest = decodeMapSetConf
+}
+
+func decodeMapSetConf(reader io.Reader) (request MapSetConfRequest, err error) {
+ var fields map[string]json.RawMessage
+ decoder := json.NewDecoder(reader)
+ if err = decoder.Decode(&fields); err != nil {
+ return request, errors.New("invalid map configuration request")
+ }
+ if decoder.Decode(new(json.RawMessage)) != io.EOF {
+ return request, errors.New("unexpected data after map configuration")
+ }
+ if len(fields) != 2 || fields["services"] == nil || fields["expectedRevision"] == nil {
+ return request, errors.New("map configuration must contain services and expectedRevision")
+ }
+ var services []map[string]json.RawMessage
+ if err = json.Unmarshal(fields["services"], &services); err != nil || services == nil {
+ return request, errors.New("map services must be an array")
+ }
+ for _, service := range services {
+ for key, value := range service {
+ switch key {
+ case "id", "name", "provider", "apiKey", "securityCode":
+ default:
+ return request, errors.New("unknown map service field")
+ }
+ if bytes.Equal(bytes.TrimSpace(value), []byte("null")) {
+ return request, errors.New("map service fields must not be null")
+ }
+ }
+ }
+ err = decodeRequestFields(reflect.ValueOf(&request).Elem(), fields)
+ return
+}
diff --git a/kernel/apicontract/schema.json b/kernel/apicontract/schema.json
index 457b45317b..4944bf6d53 100644
--- a/kernel/apicontract/schema.json
+++ b/kernel/apicontract/schema.json
@@ -5759,7 +5759,8 @@
"list",
"gallery",
"kanban",
- "calendar"
+ "calendar",
+ "map"
]
},
"views": {
@@ -6304,7 +6305,8 @@
"list",
"gallery",
"kanban",
- "calendar"
+ "calendar",
+ "map"
]
}
},
@@ -6883,7 +6885,8 @@
"list",
"gallery",
"kanban",
- "calendar"
+ "calendar",
+ "map"
]
},
"viewName": {
@@ -9721,6 +9724,149 @@
}
]
},
+ "AVLayoutMap": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "columns": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVViewTableColumn"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "filters": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVViewFilter"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "id": {
+ "type": "string"
+ },
+ "pageSize": {
+ "type": "integer"
+ },
+ "rowIds": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "settings": {
+ "$ref": "#/$defs/AVMapSettings"
+ },
+ "showIcon": {
+ "type": "boolean"
+ },
+ "sorts": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVViewSort"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "spec": {
+ "type": "integer"
+ },
+ "wrapField": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "columns",
+ "rowIds",
+ "settings",
+ "spec",
+ "id",
+ "showIcon",
+ "wrapField"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "columns": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVViewTableColumn"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "rowIds": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "settings": {
+ "$ref": "#/$defs/AVMapSettings"
+ }
+ },
+ "required": [
+ "columns",
+ "rowIds",
+ "settings"
+ ],
+ "additionalProperties": false
+ }
+ ]
+ },
"AVLayoutTable": {
"anyOf": [
{
@@ -9872,6 +10018,46 @@
},
"additionalProperties": false
},
+ "AVMapSettings": {
+ "type": "object",
+ "properties": {
+ "locationKeyID": {
+ "type": "string"
+ },
+ "serviceID": {
+ "type": "string"
+ },
+ "showRecordList": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "locationKeyID",
+ "serviceID",
+ "showRecordList"
+ ],
+ "additionalProperties": false
+ },
+ "AVMapSettingsInput": {
+ "type": "object",
+ "properties": {
+ "locationKeyID": {
+ "type": "string"
+ },
+ "serviceID": {
+ "type": "string"
+ },
+ "showRecordList": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "locationKeyID",
+ "serviceID",
+ "showRecordList"
+ ],
+ "additionalProperties": false
+ },
"AVNewItemFieldValue": {
"type": "object",
"properties": {
@@ -10672,7 +10858,8 @@
"list",
"gallery",
"kanban",
- "calendar"
+ "calendar",
+ "map"
]
},
"views": {
@@ -11442,6 +11629,15 @@
"id": {
"type": "string"
},
+ "map": {
+ "$ref": "#/$defs/AVMapSettings"
+ },
+ "mapMarkerScope": {
+ "type": "string",
+ "enum": [
+ "page"
+ ]
+ },
"name": {
"type": "string"
},
@@ -11551,6 +11747,15 @@
}
]
},
+ "map": {
+ "$ref": "#/$defs/AVMapSettings"
+ },
+ "mapMarkerScope": {
+ "type": "string",
+ "enum": [
+ "page"
+ ]
+ },
"rowCount": {
"type": "integer"
},
@@ -13518,6 +13723,9 @@
"list": {
"$ref": "#/$defs/AVLayoutTable"
},
+ "map": {
+ "$ref": "#/$defs/AVLayoutMap"
+ },
"name": {
"type": "string"
},
@@ -13547,7 +13755,8 @@
"list",
"gallery",
"kanban",
- "calendar"
+ "calendar",
+ "map"
]
}
},
@@ -13596,7 +13805,8 @@
"list",
"gallery",
"kanban",
- "calendar"
+ "calendar",
+ "map"
]
}
},
@@ -30913,6 +31123,163 @@
},
"additionalProperties": false
},
+ "MapConfig": {
+ "type": "object",
+ "properties": {
+ "revision": {
+ "type": "string"
+ },
+ "services": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/MapService"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "revision",
+ "services"
+ ],
+ "additionalProperties": false
+ },
+ "MapRuntime": {
+ "type": "object",
+ "properties": {
+ "apiKey": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string",
+ "enum": [
+ "amap",
+ "tencent",
+ "baidu",
+ "openfreemap"
+ ]
+ },
+ "securityCode": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "provider"
+ ],
+ "additionalProperties": false
+ },
+ "MapRuntimeRequestInput": {
+ "type": "object",
+ "properties": {
+ "serviceID": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "serviceID"
+ ],
+ "additionalProperties": false
+ },
+ "MapService": {
+ "type": "object",
+ "properties": {
+ "configured": {
+ "type": "boolean"
+ },
+ "hasAPIKey": {
+ "type": "boolean"
+ },
+ "hasSecurityCode": {
+ "type": "boolean"
+ },
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string",
+ "enum": [
+ "amap",
+ "tencent",
+ "baidu",
+ "openfreemap"
+ ]
+ }
+ },
+ "required": [
+ "configured",
+ "hasAPIKey",
+ "hasSecurityCode",
+ "id",
+ "name",
+ "provider"
+ ],
+ "additionalProperties": false
+ },
+ "MapServiceInputInput": {
+ "type": "object",
+ "properties": {
+ "apiKey": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string",
+ "enum": [
+ "amap",
+ "tencent",
+ "baidu",
+ "openfreemap"
+ ]
+ },
+ "securityCode": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "provider"
+ ],
+ "additionalProperties": false
+ },
+ "MapSetConfRequestInput": {
+ "type": "object",
+ "properties": {
+ "expectedRevision": {
+ "type": "string"
+ },
+ "services": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/MapServiceInputInput"
+ }
+ }
+ },
+ "required": [
+ "expectedRevision",
+ "services"
+ ],
+ "additionalProperties": false
+ },
"MarkdownHTMLRequestInput": {
"type": "object",
"properties": {
@@ -49876,6 +50243,16 @@
"logLevel": {
"type": "string"
},
+ "map": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/MapConfig"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
"mcpOAuth": {
"type": "string"
},
@@ -50073,6 +50450,7 @@
"lang",
"langs",
"logLevel",
+ "map",
"mcpOAuth",
"notebookCrypto",
"ocr",
@@ -53662,7 +54040,435 @@
"type": "boolean"
},
"retData": {
- "type": "null"
+ "type": "null"
+ },
+ "rootID": {
+ "type": "string"
+ },
+ "rowID": {
+ "type": "string"
+ },
+ "srcIDs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "srcs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionSourceFieldsInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "targetGroupID": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "",
+ "block",
+ "text",
+ "number",
+ "date",
+ "select",
+ "mSelect",
+ "url",
+ "email",
+ "phone",
+ "location",
+ "mAsset",
+ "template",
+ "created",
+ "updated",
+ "checkbox",
+ "relation",
+ "rollup",
+ "lineNumber"
+ ]
+ },
+ "viewID": {
+ "type": "string"
+ },
+ "viewIDs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "action",
+ "id",
+ "rootID",
+ "parentID",
+ "previousID",
+ "nextID",
+ "blockIDs",
+ "blockID",
+ "deckID",
+ "avID",
+ "srcIDs",
+ "srcs",
+ "isDetached",
+ "name",
+ "type",
+ "format",
+ "keyID",
+ "rowID",
+ "isTwoWay",
+ "backRelationKeyID",
+ "removeDest",
+ "layout",
+ "groupID",
+ "targetGroupID",
+ "viewID",
+ "ignoreDefaultFill",
+ "context",
+ "data",
+ "retData"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "action": {
+ "type": "string",
+ "enum": [
+ "removeCreatedDoc"
+ ]
+ },
+ "avID": {
+ "type": "string"
+ },
+ "backRelationKeyID": {
+ "type": "string"
+ },
+ "blockID": {
+ "type": "string"
+ },
+ "blockIDs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cellUpdates": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionCellUpdate"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "context": {
+ "$ref": "#/$defs/TransactionContext"
+ },
+ "data": {
+ "type": "null"
+ },
+ "deckID": {
+ "type": "string"
+ },
+ "format": {
+ "type": "string"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "ignoreDefaultFill": {
+ "type": "boolean"
+ },
+ "isDetached": {
+ "type": "boolean"
+ },
+ "isTwoWay": {
+ "type": "boolean"
+ },
+ "keyID": {
+ "type": "string"
+ },
+ "layout": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "nextID": {
+ "type": "string"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "previousID": {
+ "type": "string"
+ },
+ "removeDest": {
+ "type": "boolean"
+ },
+ "retData": {
+ "type": "null"
+ },
+ "rootID": {
+ "type": "string"
+ },
+ "rowID": {
+ "type": "string"
+ },
+ "srcIDs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "srcs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionSourceFieldsInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "targetGroupID": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "",
+ "block",
+ "text",
+ "number",
+ "date",
+ "select",
+ "mSelect",
+ "url",
+ "email",
+ "phone",
+ "location",
+ "mAsset",
+ "template",
+ "created",
+ "updated",
+ "checkbox",
+ "relation",
+ "rollup",
+ "lineNumber"
+ ]
+ },
+ "viewID": {
+ "type": "string"
+ },
+ "viewIDs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "action",
+ "id",
+ "rootID",
+ "parentID",
+ "previousID",
+ "nextID",
+ "blockIDs",
+ "blockID",
+ "deckID",
+ "avID",
+ "srcIDs",
+ "srcs",
+ "isDetached",
+ "name",
+ "type",
+ "format",
+ "keyID",
+ "rowID",
+ "isTwoWay",
+ "backRelationKeyID",
+ "removeDest",
+ "layout",
+ "groupID",
+ "targetGroupID",
+ "viewID",
+ "ignoreDefaultFill",
+ "context",
+ "data",
+ "retData"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "action": {
+ "type": "string",
+ "enum": [
+ "update"
+ ]
+ },
+ "avID": {
+ "type": "string"
+ },
+ "backRelationKeyID": {
+ "type": "string"
+ },
+ "blockID": {
+ "type": "string"
+ },
+ "blockIDs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cellUpdates": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionCellUpdate"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "context": {
+ "$ref": "#/$defs/TransactionContext"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "deckID": {
+ "type": "string"
+ },
+ "format": {
+ "type": "string"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "ignoreDefaultFill": {
+ "type": "boolean"
+ },
+ "isDetached": {
+ "type": "boolean"
+ },
+ "isTwoWay": {
+ "type": "boolean"
+ },
+ "keyID": {
+ "type": "string"
+ },
+ "layout": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "nextID": {
+ "type": "string"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "previousID": {
+ "type": "string"
+ },
+ "removeDest": {
+ "type": "boolean"
+ },
+ "retData": {
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
},
"rootID": {
"type": "string"
@@ -53779,7 +54585,7 @@
"action": {
"type": "string",
"enum": [
- "removeCreatedDoc"
+ "insert"
]
},
"avID": {
@@ -53821,7 +54627,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -53866,7 +54679,20 @@
"type": "boolean"
},
"retData": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
},
"rootID": {
"type": "string"
@@ -53983,7 +54809,7 @@
"action": {
"type": "string",
"enum": [
- "update"
+ "delete"
]
},
"avID": {
@@ -54027,7 +54853,7 @@
"data": {
"anyOf": [
{
- "type": "string"
+ "$ref": "#/$defs/BlockDeleteDataInput"
},
{
"type": "null"
@@ -54207,7 +55033,7 @@
"action": {
"type": "string",
"enum": [
- "insert"
+ "move"
]
},
"avID": {
@@ -54301,18 +55127,226 @@
"type": "boolean"
},
"retData": {
+ "type": "null"
+ },
+ "rootID": {
+ "type": "string"
+ },
+ "rowID": {
+ "type": "string"
+ },
+ "srcIDs": {
"anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
{
"type": "null"
+ }
+ ]
+ },
+ "srcs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionSourceFieldsInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
},
{
- "type": "string"
+ "type": "null"
+ }
+ ]
+ },
+ "targetGroupID": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "",
+ "block",
+ "text",
+ "number",
+ "date",
+ "select",
+ "mSelect",
+ "url",
+ "email",
+ "phone",
+ "location",
+ "mAsset",
+ "template",
+ "created",
+ "updated",
+ "checkbox",
+ "relation",
+ "rollup",
+ "lineNumber"
+ ]
+ },
+ "viewID": {
+ "type": "string"
+ },
+ "viewIDs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "action",
+ "id",
+ "rootID",
+ "parentID",
+ "previousID",
+ "nextID",
+ "blockIDs",
+ "blockID",
+ "deckID",
+ "avID",
+ "srcIDs",
+ "srcs",
+ "isDetached",
+ "name",
+ "type",
+ "format",
+ "keyID",
+ "rowID",
+ "isTwoWay",
+ "backRelationKeyID",
+ "removeDest",
+ "layout",
+ "groupID",
+ "targetGroupID",
+ "viewID",
+ "ignoreDefaultFill",
+ "context",
+ "data",
+ "retData"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "action": {
+ "type": "string",
+ "enum": [
+ "swapBlockRef"
+ ]
+ },
+ "avID": {
+ "type": "string"
+ },
+ "backRelationKeyID": {
+ "type": "string"
+ },
+ "blockID": {
+ "type": "string"
+ },
+ "blockIDs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cellUpdates": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionCellUpdate"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "context": {
+ "$ref": "#/$defs/TransactionContext"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionBlockSwapInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "deckID": {
+ "type": "string"
+ },
+ "format": {
+ "type": "string"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "ignoreDefaultFill": {
+ "type": "boolean"
+ },
+ "isDetached": {
+ "type": "boolean"
+ },
+ "isTwoWay": {
+ "type": "boolean"
+ },
+ "keyID": {
+ "type": "string"
+ },
+ "layout": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "nextID": {
+ "type": "string"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "previousID": {
+ "type": "string"
+ },
+ "removeDest": {
+ "type": "boolean"
+ },
+ "retData": {
+ "anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
+ },
+ {
+ "type": "null"
}
]
},
@@ -54431,7 +55465,7 @@
"action": {
"type": "string",
"enum": [
- "delete"
+ "convertList"
]
},
"avID": {
@@ -54475,7 +55509,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/BlockDeleteDataInput"
+ "$ref": "#/$defs/TransactionListConversionInput"
},
{
"type": "null"
@@ -54527,16 +55561,10 @@
"retData": {
"anyOf": [
{
- "type": "null"
- },
- {
- "type": "string"
+ "$ref": "#/$defs/TransactionListConversionResult"
},
{
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "null"
}
]
},
@@ -54655,7 +55683,7 @@
"action": {
"type": "string",
"enum": [
- "move"
+ "moveOutlineHeading"
]
},
"avID": {
@@ -54697,14 +55725,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -54749,7 +55770,20 @@
"type": "boolean"
},
"retData": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
},
"rootID": {
"type": "string"
@@ -54866,7 +55900,7 @@
"action": {
"type": "string",
"enum": [
- "swapBlockRef"
+ "append"
]
},
"avID": {
@@ -54910,7 +55944,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/TransactionBlockSwapInput"
+ "type": "string"
},
{
"type": "null"
@@ -54960,17 +55994,7 @@
"type": "boolean"
},
"retData": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"rootID": {
"type": "string"
@@ -55087,7 +56111,7 @@
"action": {
"type": "string",
"enum": [
- "convertList"
+ "appendInsert"
]
},
"avID": {
@@ -55131,7 +56155,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/TransactionListConversionInput"
+ "type": "string"
},
{
"type": "null"
@@ -55183,10 +56207,16 @@
"retData": {
"anyOf": [
{
- "$ref": "#/$defs/TransactionListConversionResult"
+ "type": "null"
},
{
- "type": "null"
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
]
},
@@ -55305,7 +56335,7 @@
"action": {
"type": "string",
"enum": [
- "moveOutlineHeading"
+ "prependInsert"
]
},
"avID": {
@@ -55347,7 +56377,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -55522,7 +56559,7 @@
"action": {
"type": "string",
"enum": [
- "append"
+ "foldHeading"
]
},
"avID": {
@@ -55564,14 +56601,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -55616,7 +56646,20 @@
"type": "boolean"
},
"retData": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
},
"rootID": {
"type": "string"
@@ -55733,7 +56776,7 @@
"action": {
"type": "string",
"enum": [
- "appendInsert"
+ "unfoldHeading"
]
},
"avID": {
@@ -55957,7 +57000,7 @@
"action": {
"type": "string",
"enum": [
- "prependInsert"
+ "setAttrs"
]
},
"avID": {
@@ -56181,7 +57224,7 @@
"action": {
"type": "string",
"enum": [
- "foldHeading"
+ "doUpdateUpdated"
]
},
"avID": {
@@ -56223,7 +57266,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -56268,20 +57318,7 @@
"type": "boolean"
},
"retData": {
- "anyOf": [
- {
- "type": "null"
- },
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- ]
+ "type": "null"
},
"rootID": {
"type": "string"
@@ -56398,7 +57435,7 @@
"action": {
"type": "string",
"enum": [
- "unfoldHeading"
+ "addFlashcards"
]
},
"avID": {
@@ -56440,14 +57477,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -56492,20 +57522,7 @@
"type": "boolean"
},
"retData": {
- "anyOf": [
- {
- "type": "null"
- },
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- ]
+ "type": "null"
},
"rootID": {
"type": "string"
@@ -56622,7 +57639,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrs"
+ "removeFlashcards"
]
},
"avID": {
@@ -56664,14 +57681,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -56716,20 +57726,7 @@
"type": "boolean"
},
"retData": {
- "anyOf": [
- {
- "type": "null"
- },
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- ]
+ "type": "null"
},
"rootID": {
"type": "string"
@@ -56846,7 +57843,7 @@
"action": {
"type": "string",
"enum": [
- "doUpdateUpdated"
+ "setAttrViewName"
]
},
"avID": {
@@ -57057,7 +58054,7 @@
"action": {
"type": "string",
"enum": [
- "addFlashcards"
+ "setAttrViewNewItemTemplates"
]
},
"avID": {
@@ -57099,7 +58096,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionNewItemTemplatesInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -57261,7 +58265,7 @@
"action": {
"type": "string",
"enum": [
- "removeFlashcards"
+ "setAttrViewAutomations"
]
},
"avID": {
@@ -57303,7 +58307,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVAutomationConfigInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -57465,7 +58476,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewName"
+ "setAttrViewConditionalColors"
]
},
"avID": {
@@ -57509,7 +58520,17 @@
"data": {
"anyOf": [
{
- "type": "string"
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVConditionalColorRuleInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
},
{
"type": "null"
@@ -57676,7 +58697,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewNewItemTemplates"
+ "setAttrViewFilters"
]
},
"avID": {
@@ -57720,7 +58741,17 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/TransactionNewItemTemplatesInput"
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVViewFilterInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
},
{
"type": "null"
@@ -57887,7 +58918,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewAutomations"
+ "setAttrViewContextFilter"
]
},
"avID": {
@@ -57929,14 +58960,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVAutomationConfigInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -58098,7 +59122,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewConditionalColors"
+ "setAttrViewColRelationFilters"
]
},
"avID": {
@@ -58146,7 +59170,7 @@
"items": {
"anyOf": [
{
- "$ref": "#/$defs/AVConditionalColorRuleInput"
+ "$ref": "#/$defs/AVViewFilterInput"
},
{
"type": "null"
@@ -58319,7 +59343,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewFilters"
+ "setAttrViewColRollupFilters"
]
},
"avID": {
@@ -58540,7 +59564,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewContextFilter"
+ "setAttrViewSorts"
]
},
"avID": {
@@ -58582,7 +59606,24 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVViewSortInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -58744,7 +59785,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColRelationFilters"
+ "setAttrViewPageSize"
]
},
"avID": {
@@ -58786,13 +59827,87 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "deckID": {
+ "type": "string"
+ },
+ "format": {
+ "type": "string"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "ignoreDefaultFill": {
+ "type": "boolean"
+ },
+ "isDetached": {
+ "type": "boolean"
+ },
+ "isTwoWay": {
+ "type": "boolean"
+ },
+ "keyID": {
+ "type": "string"
+ },
+ "layout": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "nextID": {
+ "type": "string"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "previousID": {
+ "type": "string"
+ },
+ "removeDest": {
+ "type": "boolean"
+ },
+ "retData": {
+ "type": "null"
+ },
+ "rootID": {
+ "type": "string"
+ },
+ "rowID": {
+ "type": "string"
+ },
+ "srcIDs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "srcs": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
- "$ref": "#/$defs/AVViewFilterInput"
+ "$ref": "#/$defs/TransactionSourceFieldsInput"
},
{
"type": "null"
@@ -58805,6 +59920,133 @@
}
]
},
+ "targetGroupID": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "",
+ "block",
+ "text",
+ "number",
+ "date",
+ "select",
+ "mSelect",
+ "url",
+ "email",
+ "phone",
+ "location",
+ "mAsset",
+ "template",
+ "created",
+ "updated",
+ "checkbox",
+ "relation",
+ "rollup",
+ "lineNumber"
+ ]
+ },
+ "viewID": {
+ "type": "string"
+ },
+ "viewIDs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "action",
+ "id",
+ "rootID",
+ "parentID",
+ "previousID",
+ "nextID",
+ "blockIDs",
+ "blockID",
+ "deckID",
+ "avID",
+ "srcIDs",
+ "srcs",
+ "isDetached",
+ "name",
+ "type",
+ "format",
+ "keyID",
+ "rowID",
+ "isTwoWay",
+ "backRelationKeyID",
+ "removeDest",
+ "layout",
+ "groupID",
+ "targetGroupID",
+ "viewID",
+ "ignoreDefaultFill",
+ "context",
+ "data",
+ "retData"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "action": {
+ "type": "string",
+ "enum": [
+ "setAttrViewColWidth"
+ ]
+ },
+ "avID": {
+ "type": "string"
+ },
+ "backRelationKeyID": {
+ "type": "string"
+ },
+ "blockID": {
+ "type": "string"
+ },
+ "blockIDs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cellUpdates": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionCellUpdate"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "context": {
+ "$ref": "#/$defs/TransactionContext"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
"deckID": {
"type": "string"
},
@@ -58965,7 +60207,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColRollupFilters"
+ "setAttrViewColsWidth"
]
},
"avID": {
@@ -59009,16 +60251,9 @@
"data": {
"anyOf": [
{
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVViewFilterInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
}
},
{
@@ -59186,7 +60421,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewSorts"
+ "setAttrViewColAlign"
]
},
"avID": {
@@ -59230,17 +60465,7 @@
"data": {
"anyOf": [
{
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVViewSortInput"
- },
- {
- "type": "null"
- }
- ]
- }
+ "type": "string"
},
{
"type": "null"
@@ -59407,7 +60632,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewPageSize"
+ "setAttrViewColWrap"
]
},
"avID": {
@@ -59451,7 +60676,7 @@
"data": {
"anyOf": [
{
- "type": "number"
+ "type": "boolean"
},
{
"type": "null"
@@ -59618,7 +60843,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColWidth"
+ "setAttrViewColHidden"
]
},
"avID": {
@@ -59662,7 +60887,7 @@
"data": {
"anyOf": [
{
- "type": "string"
+ "type": "boolean"
},
{
"type": "null"
@@ -59829,7 +61054,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColsWidth"
+ "setAttrViewColPin"
]
},
"avID": {
@@ -59873,10 +61098,7 @@
"data": {
"anyOf": [
{
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
+ "type": "boolean"
},
{
"type": "null"
@@ -60043,7 +61265,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColAlign"
+ "setAttrViewColIcon"
]
},
"avID": {
@@ -60254,7 +61476,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColWrap"
+ "setAttrViewColDesc"
]
},
"avID": {
@@ -60298,7 +61520,7 @@
"data": {
"anyOf": [
{
- "type": "boolean"
+ "type": "string"
},
{
"type": "null"
@@ -60465,7 +61687,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColHidden"
+ "setAttrViewColAttributePanelVisibility"
]
},
"avID": {
@@ -60509,7 +61731,7 @@
"data": {
"anyOf": [
{
- "type": "boolean"
+ "type": "string"
},
{
"type": "null"
@@ -60676,7 +61898,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColPin"
+ "setAttrViewColLocationDefaultCoordinateSystem"
]
},
"avID": {
@@ -60720,7 +61942,7 @@
"data": {
"anyOf": [
{
- "type": "boolean"
+ "type": "string"
},
{
"type": "null"
@@ -60887,7 +62109,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColIcon"
+ "insertAttrViewBlock"
]
},
"avID": {
@@ -60929,15 +62151,219 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
+ "type": "null"
+ },
+ "deckID": {
+ "type": "string"
+ },
+ "format": {
+ "type": "string"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "ignoreDefaultFill": {
+ "type": "boolean"
+ },
+ "isDetached": {
+ "type": "boolean"
+ },
+ "isTwoWay": {
+ "type": "boolean"
+ },
+ "keyID": {
+ "type": "string"
+ },
+ "layout": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "nextID": {
+ "type": "string"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "previousID": {
+ "type": "string"
+ },
+ "removeDest": {
+ "type": "boolean"
+ },
+ "retData": {
"anyOf": [
{
- "type": "string"
+ "$ref": "#/$defs/TransactionInsertedItems"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "rootID": {
+ "type": "string"
+ },
+ "rowID": {
+ "type": "string"
+ },
+ "srcIDs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "srcs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionSourceFieldsInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
},
{
"type": "null"
}
]
},
+ "targetGroupID": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "",
+ "block",
+ "text",
+ "number",
+ "date",
+ "select",
+ "mSelect",
+ "url",
+ "email",
+ "phone",
+ "location",
+ "mAsset",
+ "template",
+ "created",
+ "updated",
+ "checkbox",
+ "relation",
+ "rollup",
+ "lineNumber"
+ ]
+ },
+ "viewID": {
+ "type": "string"
+ },
+ "viewIDs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "action",
+ "id",
+ "rootID",
+ "parentID",
+ "previousID",
+ "nextID",
+ "blockIDs",
+ "blockID",
+ "deckID",
+ "avID",
+ "srcIDs",
+ "srcs",
+ "isDetached",
+ "name",
+ "type",
+ "format",
+ "keyID",
+ "rowID",
+ "isTwoWay",
+ "backRelationKeyID",
+ "removeDest",
+ "layout",
+ "groupID",
+ "targetGroupID",
+ "viewID",
+ "ignoreDefaultFill",
+ "context",
+ "data",
+ "retData"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "action": {
+ "type": "string",
+ "enum": [
+ "removeAttrViewBlock"
+ ]
+ },
+ "avID": {
+ "type": "string"
+ },
+ "backRelationKeyID": {
+ "type": "string"
+ },
+ "blockID": {
+ "type": "string"
+ },
+ "blockIDs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cellUpdates": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionCellUpdate"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "context": {
+ "$ref": "#/$defs/TransactionContext"
+ },
+ "data": {
+ "type": "null"
+ },
"deckID": {
"type": "string"
},
@@ -61098,7 +62524,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColDesc"
+ "addAttrViewCol"
]
},
"avID": {
@@ -61309,7 +62735,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColAttributePanelVisibility"
+ "updateAttrViewCol"
]
},
"avID": {
@@ -61351,14 +62777,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -61520,7 +62939,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColLocationDefaultCoordinateSystem"
+ "removeAttrViewCol"
]
},
"avID": {
@@ -61562,14 +62981,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -61731,7 +63143,7 @@
"action": {
"type": "string",
"enum": [
- "insertAttrViewBlock"
+ "sortAttrViewRow"
]
},
"avID": {
@@ -61773,7 +63185,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVRowOrderChangeInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -61818,14 +63237,7 @@
"type": "boolean"
},
"retData": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionInsertedItems"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"rootID": {
"type": "string"
@@ -61942,7 +63354,7 @@
"action": {
"type": "string",
"enum": [
- "removeAttrViewBlock"
+ "sortAttrViewCol"
]
},
"avID": {
@@ -62146,7 +63558,7 @@
"action": {
"type": "string",
"enum": [
- "addAttrViewCol"
+ "sortAttrViewKey"
]
},
"avID": {
@@ -62188,14 +63600,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -62357,7 +63762,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewCol"
+ "sortAttrViewBinding"
]
},
"avID": {
@@ -62561,7 +63966,7 @@
"action": {
"type": "string",
"enum": [
- "removeAttrViewCol"
+ "updateAttrViewCell"
]
},
"avID": {
@@ -62603,7 +64008,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVValueInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -62765,7 +64177,7 @@
"action": {
"type": "string",
"enum": [
- "sortAttrViewRow"
+ "updateAttrViewCells"
]
},
"avID": {
@@ -62807,14 +64219,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVRowOrderChangeInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -62976,7 +64381,7 @@
"action": {
"type": "string",
"enum": [
- "sortAttrViewCol"
+ "updateAttrViewColOptions"
]
},
"avID": {
@@ -63018,7 +64423,24 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVSelectOptionInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -63180,7 +64602,7 @@
"action": {
"type": "string",
"enum": [
- "sortAttrViewKey"
+ "removeAttrViewColOption"
]
},
"avID": {
@@ -63222,7 +64644,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -63384,7 +64813,7 @@
"action": {
"type": "string",
"enum": [
- "sortAttrViewBinding"
+ "updateAttrViewColOption"
]
},
"avID": {
@@ -63426,7 +64855,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionOptionChangeInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -63588,7 +65024,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewCell"
+ "setAttrViewColOptionDesc"
]
},
"avID": {
@@ -63632,7 +65068,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/AVValueInput"
+ "$ref": "#/$defs/TransactionOptionDescriptionInput"
},
{
"type": "null"
@@ -63799,7 +65235,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewCells"
+ "setAttrViewCustomColors"
]
},
"avID": {
@@ -63841,7 +65277,38 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionCustomColorsInput"
+ },
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVAttributeViewCustomColorInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -64003,7 +65470,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewColOptions"
+ "setAttrViewColCalc"
]
},
"avID": {
@@ -64047,17 +65514,7 @@
"data": {
"anyOf": [
{
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVSelectOptionInput"
- },
- {
- "type": "null"
- }
- ]
- }
+ "$ref": "#/$defs/AVFieldCalcInput"
},
{
"type": "null"
@@ -64224,7 +65681,7 @@
"action": {
"type": "string",
"enum": [
- "removeAttrViewColOption"
+ "updateAttrViewColNumberFormat"
]
},
"avID": {
@@ -64266,14 +65723,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -64435,7 +65885,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewColOption"
+ "setAttrViewColDateFormat"
]
},
"avID": {
@@ -64477,14 +65927,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionOptionChangeInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -64646,7 +66089,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColOptionDesc"
+ "replaceAttrViewBlock"
]
},
"avID": {
@@ -64688,14 +66131,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionOptionDescriptionInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -64740,7 +66176,14 @@
"type": "boolean"
},
"retData": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionReplacedItem"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"rootID": {
"type": "string"
@@ -64857,7 +66300,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCustomColors"
+ "updateAttrViewColTemplate"
]
},
"avID": {
@@ -64901,31 +66344,7 @@
"data": {
"anyOf": [
{
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionCustomColorsInput"
- },
- {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVAttributeViewCustomColorInput"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
- }
- ]
+ "type": "string"
},
{
"type": "null"
@@ -65092,7 +66511,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColCalc"
+ "addAttrViewView"
]
},
"avID": {
@@ -65134,14 +66553,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVFieldCalcInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -65303,7 +66715,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewColNumberFormat"
+ "removeAttrViewView"
]
},
"avID": {
@@ -65390,7 +66802,14 @@
"type": "boolean"
},
"retData": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"rootID": {
"type": "string"
@@ -65507,7 +66926,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColDateFormat"
+ "setAttrViewViewName"
]
},
"avID": {
@@ -65549,7 +66968,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -65711,7 +67137,7 @@
"action": {
"type": "string",
"enum": [
- "replaceAttrViewBlock"
+ "setAttrViewViewIcon"
]
},
"avID": {
@@ -65753,7 +67179,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -65798,14 +67231,7 @@
"type": "boolean"
},
"retData": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionReplacedItem"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"rootID": {
"type": "string"
@@ -65922,7 +67348,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewColTemplate"
+ "setAttrViewViewDesc"
]
},
"avID": {
@@ -66133,7 +67559,7 @@
"action": {
"type": "string",
"enum": [
- "addAttrViewView"
+ "duplicateAttrViewView"
]
},
"avID": {
@@ -66337,7 +67763,7 @@
"action": {
"type": "string",
"enum": [
- "removeAttrViewView"
+ "duplicateAttrViewRow"
]
},
"avID": {
@@ -66423,224 +67849,6 @@
"removeDest": {
"type": "boolean"
},
- "retData": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "rootID": {
- "type": "string"
- },
- "rowID": {
- "type": "string"
- },
- "srcIDs": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "srcs": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionSourceFieldsInput"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "targetGroupID": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "enum": [
- "",
- "block",
- "text",
- "number",
- "date",
- "select",
- "mSelect",
- "url",
- "email",
- "phone",
- "location",
- "mAsset",
- "template",
- "created",
- "updated",
- "checkbox",
- "relation",
- "rollup",
- "lineNumber"
- ]
- },
- "viewID": {
- "type": "string"
- },
- "viewIDs": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "action",
- "id",
- "rootID",
- "parentID",
- "previousID",
- "nextID",
- "blockIDs",
- "blockID",
- "deckID",
- "avID",
- "srcIDs",
- "srcs",
- "isDetached",
- "name",
- "type",
- "format",
- "keyID",
- "rowID",
- "isTwoWay",
- "backRelationKeyID",
- "removeDest",
- "layout",
- "groupID",
- "targetGroupID",
- "viewID",
- "ignoreDefaultFill",
- "context",
- "data",
- "retData"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "action": {
- "type": "string",
- "enum": [
- "setAttrViewViewName"
- ]
- },
- "avID": {
- "type": "string"
- },
- "backRelationKeyID": {
- "type": "string"
- },
- "blockID": {
- "type": "string"
- },
- "blockIDs": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "cellUpdates": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionCellUpdate"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "context": {
- "$ref": "#/$defs/TransactionContext"
- },
- "data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "deckID": {
- "type": "string"
- },
- "format": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "ignoreDefaultFill": {
- "type": "boolean"
- },
- "isDetached": {
- "type": "boolean"
- },
- "isTwoWay": {
- "type": "boolean"
- },
- "keyID": {
- "type": "string"
- },
- "layout": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "nextID": {
- "type": "string"
- },
- "parentID": {
- "type": "string"
- },
- "previousID": {
- "type": "string"
- },
- "removeDest": {
- "type": "boolean"
- },
"retData": {
"type": "null"
},
@@ -66759,7 +67967,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewViewIcon"
+ "sortAttrViewView"
]
},
"avID": {
@@ -66970,7 +68178,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewViewDesc"
+ "updateAttrViewColRelation"
]
},
"avID": {
@@ -67012,14 +68220,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -67181,7 +68382,7 @@
"action": {
"type": "string",
"enum": [
- "duplicateAttrViewView"
+ "updateAttrViewColRollup"
]
},
"avID": {
@@ -67223,7 +68424,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionRollupInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -67385,7 +68593,7 @@
"action": {
"type": "string",
"enum": [
- "duplicateAttrViewRow"
+ "hideAttrViewName"
]
},
"avID": {
@@ -67427,7 +68635,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -67589,7 +68804,7 @@
"action": {
"type": "string",
"enum": [
- "sortAttrViewView"
+ "setAttrViewColDateFillCreated"
]
},
"avID": {
@@ -67633,7 +68848,7 @@
"data": {
"anyOf": [
{
- "type": "string"
+ "type": "boolean"
},
{
"type": "null"
@@ -67800,7 +69015,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewColRelation"
+ "setAttrViewColDateFillSpecificTime"
]
},
"avID": {
@@ -67842,7 +69057,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -68004,7 +69226,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewColRollup"
+ "setAttrViewCreatedIncludeTime"
]
},
"avID": {
@@ -68048,7 +69270,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/TransactionRollupInput"
+ "type": "boolean"
},
{
"type": "null"
@@ -68215,7 +69437,7 @@
"action": {
"type": "string",
"enum": [
- "hideAttrViewName"
+ "setAttrViewUpdatedIncludeTime"
]
},
"avID": {
@@ -68426,7 +69648,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColDateFillCreated"
+ "duplicateAttrViewKey"
]
},
"avID": {
@@ -68468,14 +69690,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -68637,7 +69852,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColDateFillSpecificTime"
+ "setAttrViewCoverFrom"
]
},
"avID": {
@@ -68681,7 +69896,7 @@
"data": {
"anyOf": [
{
- "type": "boolean"
+ "type": "number"
},
{
"type": "null"
@@ -68848,7 +70063,211 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCreatedIncludeTime"
+ "setAttrViewCoverFromAssetKeyID"
+ ]
+ },
+ "avID": {
+ "type": "string"
+ },
+ "backRelationKeyID": {
+ "type": "string"
+ },
+ "blockID": {
+ "type": "string"
+ },
+ "blockIDs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "cellUpdates": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionCellUpdate"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "context": {
+ "$ref": "#/$defs/TransactionContext"
+ },
+ "data": {
+ "type": "null"
+ },
+ "deckID": {
+ "type": "string"
+ },
+ "format": {
+ "type": "string"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "ignoreDefaultFill": {
+ "type": "boolean"
+ },
+ "isDetached": {
+ "type": "boolean"
+ },
+ "isTwoWay": {
+ "type": "boolean"
+ },
+ "keyID": {
+ "type": "string"
+ },
+ "layout": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "nextID": {
+ "type": "string"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "previousID": {
+ "type": "string"
+ },
+ "removeDest": {
+ "type": "boolean"
+ },
+ "retData": {
+ "type": "null"
+ },
+ "rootID": {
+ "type": "string"
+ },
+ "rowID": {
+ "type": "string"
+ },
+ "srcIDs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "srcs": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionSourceFieldsInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "targetGroupID": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "",
+ "block",
+ "text",
+ "number",
+ "date",
+ "select",
+ "mSelect",
+ "url",
+ "email",
+ "phone",
+ "location",
+ "mAsset",
+ "template",
+ "created",
+ "updated",
+ "checkbox",
+ "relation",
+ "rollup",
+ "lineNumber"
+ ]
+ },
+ "viewID": {
+ "type": "string"
+ },
+ "viewIDs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "action",
+ "id",
+ "rootID",
+ "parentID",
+ "previousID",
+ "nextID",
+ "blockIDs",
+ "blockID",
+ "deckID",
+ "avID",
+ "srcIDs",
+ "srcs",
+ "isDetached",
+ "name",
+ "type",
+ "format",
+ "keyID",
+ "rowID",
+ "isTwoWay",
+ "backRelationKeyID",
+ "removeDest",
+ "layout",
+ "groupID",
+ "targetGroupID",
+ "viewID",
+ "ignoreDefaultFill",
+ "context",
+ "data",
+ "retData"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "action": {
+ "type": "string",
+ "enum": [
+ "setAttrViewCardCoverPosition"
]
},
"avID": {
@@ -68892,7 +70311,7 @@
"data": {
"anyOf": [
{
- "type": "boolean"
+ "$ref": "#/$defs/TransactionCardCoverPositionInput"
},
{
"type": "null"
@@ -69059,7 +70478,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewUpdatedIncludeTime"
+ "setAttrViewCardSize"
]
},
"avID": {
@@ -69103,217 +70522,13 @@
"data": {
"anyOf": [
{
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ]
- },
- "deckID": {
- "type": "string"
- },
- "format": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "ignoreDefaultFill": {
- "type": "boolean"
- },
- "isDetached": {
- "type": "boolean"
- },
- "isTwoWay": {
- "type": "boolean"
- },
- "keyID": {
- "type": "string"
- },
- "layout": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "nextID": {
- "type": "string"
- },
- "parentID": {
- "type": "string"
- },
- "previousID": {
- "type": "string"
- },
- "removeDest": {
- "type": "boolean"
- },
- "retData": {
- "type": "null"
- },
- "rootID": {
- "type": "string"
- },
- "rowID": {
- "type": "string"
- },
- "srcIDs": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "srcs": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionSourceFieldsInput"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "targetGroupID": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "enum": [
- "",
- "block",
- "text",
- "number",
- "date",
- "select",
- "mSelect",
- "url",
- "email",
- "phone",
- "location",
- "mAsset",
- "template",
- "created",
- "updated",
- "checkbox",
- "relation",
- "rollup",
- "lineNumber"
- ]
- },
- "viewID": {
- "type": "string"
- },
- "viewIDs": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "action",
- "id",
- "rootID",
- "parentID",
- "previousID",
- "nextID",
- "blockIDs",
- "blockID",
- "deckID",
- "avID",
- "srcIDs",
- "srcs",
- "isDetached",
- "name",
- "type",
- "format",
- "keyID",
- "rowID",
- "isTwoWay",
- "backRelationKeyID",
- "removeDest",
- "layout",
- "groupID",
- "targetGroupID",
- "viewID",
- "ignoreDefaultFill",
- "context",
- "data",
- "retData"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "action": {
- "type": "string",
- "enum": [
- "duplicateAttrViewKey"
- ]
- },
- "avID": {
- "type": "string"
- },
- "backRelationKeyID": {
- "type": "string"
- },
- "blockID": {
- "type": "string"
- },
- "blockIDs": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "number"
},
{
"type": "null"
}
]
},
- "cellUpdates": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionCellUpdate"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "context": {
- "$ref": "#/$defs/TransactionContext"
- },
- "data": {
- "type": "null"
- },
"deckID": {
"type": "string"
},
@@ -69474,7 +70689,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCoverFrom"
+ "setAttrViewCardWidth"
]
},
"avID": {
@@ -69685,7 +70900,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCoverFromAssetKeyID"
+ "setAttrViewMap"
]
},
"avID": {
@@ -69727,7 +70942,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVMapSettingsInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -69889,7 +71111,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCardCoverPosition"
+ "setAttrViewCalendar"
]
},
"avID": {
@@ -69933,7 +71155,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/TransactionCardCoverPositionInput"
+ "$ref": "#/$defs/AVCalendarSettingsInput"
},
{
"type": "null"
@@ -70100,7 +71322,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCardSize"
+ "setAttrViewCardLayout"
]
},
"avID": {
@@ -70311,7 +71533,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCardWidth"
+ "setAttrViewColFullRow"
]
},
"avID": {
@@ -70355,7 +71577,7 @@
"data": {
"anyOf": [
{
- "type": "number"
+ "type": "boolean"
},
{
"type": "null"
@@ -70522,7 +71744,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCalendar"
+ "setAttrViewFitImage"
]
},
"avID": {
@@ -70566,7 +71788,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/AVCalendarSettingsInput"
+ "type": "boolean"
},
{
"type": "null"
@@ -70733,7 +71955,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCardLayout"
+ "setAttrViewDisplayFieldName"
]
},
"avID": {
@@ -70777,7 +71999,7 @@
"data": {
"anyOf": [
{
- "type": "number"
+ "type": "boolean"
},
{
"type": "null"
@@ -70944,7 +72166,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColFullRow"
+ "setAttrViewDisplayEmptyFields"
]
},
"avID": {
@@ -71155,7 +72377,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewFitImage"
+ "setAttrViewFillColBackgroundColor"
]
},
"avID": {
@@ -71366,7 +72588,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewDisplayFieldName"
+ "setAttrViewShowIcon"
]
},
"avID": {
@@ -71577,7 +72799,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewDisplayEmptyFields"
+ "setAttrViewWrapField"
]
},
"avID": {
@@ -71788,7 +73010,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewFillColBackgroundColor"
+ "changeAttrViewLayout"
]
},
"avID": {
@@ -71830,14 +73052,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -71999,7 +73214,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewShowIcon"
+ "setAttrViewBlockView"
]
},
"avID": {
@@ -72041,14 +73256,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -72210,7 +73418,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewWrapField"
+ "setAttrViewBlockVisibleViews"
]
},
"avID": {
@@ -72252,14 +73460,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -72421,7 +73622,7 @@
"action": {
"type": "string",
"enum": [
- "changeAttrViewLayout"
+ "setAttrViewCardAspectRatio"
]
},
"avID": {
@@ -72463,212 +73664,15 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
- },
- "deckID": {
- "type": "string"
- },
- "format": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "ignoreDefaultFill": {
- "type": "boolean"
- },
- "isDetached": {
- "type": "boolean"
- },
- "isTwoWay": {
- "type": "boolean"
- },
- "keyID": {
- "type": "string"
- },
- "layout": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "nextID": {
- "type": "string"
- },
- "parentID": {
- "type": "string"
- },
- "previousID": {
- "type": "string"
- },
- "removeDest": {
- "type": "boolean"
- },
- "retData": {
- "type": "null"
- },
- "rootID": {
- "type": "string"
- },
- "rowID": {
- "type": "string"
- },
- "srcIDs": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "srcs": {
"anyOf": [
{
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionSourceFieldsInput"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "targetGroupID": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "enum": [
- "",
- "block",
- "text",
- "number",
- "date",
- "select",
- "mSelect",
- "url",
- "email",
- "phone",
- "location",
- "mAsset",
- "template",
- "created",
- "updated",
- "checkbox",
- "relation",
- "rollup",
- "lineNumber"
- ]
- },
- "viewID": {
- "type": "string"
- },
- "viewIDs": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "action",
- "id",
- "rootID",
- "parentID",
- "previousID",
- "nextID",
- "blockIDs",
- "blockID",
- "deckID",
- "avID",
- "srcIDs",
- "srcs",
- "isDetached",
- "name",
- "type",
- "format",
- "keyID",
- "rowID",
- "isTwoWay",
- "backRelationKeyID",
- "removeDest",
- "layout",
- "groupID",
- "targetGroupID",
- "viewID",
- "ignoreDefaultFill",
- "context",
- "data",
- "retData"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "action": {
- "type": "string",
- "enum": [
- "setAttrViewBlockView"
- ]
- },
- "avID": {
- "type": "string"
- },
- "backRelationKeyID": {
- "type": "string"
- },
- "blockID": {
- "type": "string"
- },
- "blockIDs": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "number"
},
{
"type": "null"
}
]
},
- "cellUpdates": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionCellUpdate"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "context": {
- "$ref": "#/$defs/TransactionContext"
- },
- "data": {
- "type": "null"
- },
"deckID": {
"type": "string"
},
@@ -72829,7 +73833,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewBlockVisibleViews"
+ "setAttrViewCardAspectRatioValue"
]
},
"avID": {
@@ -72871,7 +73875,14 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"type": "string"
@@ -73033,7 +74044,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCardAspectRatio"
+ "setAttrViewGroup"
]
},
"avID": {
@@ -73077,7 +74088,7 @@
"data": {
"anyOf": [
{
- "type": "number"
+ "$ref": "#/$defs/AVViewGroupInput"
},
{
"type": "null"
@@ -73244,7 +74255,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCardAspectRatioValue"
+ "hideAttrViewGroup"
]
},
"avID": {
@@ -73455,7 +74466,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewGroup"
+ "hideAttrViewAllGroups"
]
},
"avID": {
@@ -73499,7 +74510,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/AVViewGroupInput"
+ "type": "boolean"
},
{
"type": "null"
@@ -73666,7 +74677,7 @@
"action": {
"type": "string",
"enum": [
- "hideAttrViewGroup"
+ "foldAttrViewGroup"
]
},
"avID": {
@@ -73710,7 +74721,7 @@
"data": {
"anyOf": [
{
- "type": "number"
+ "type": "boolean"
},
{
"type": "null"
@@ -73877,7 +74888,7 @@
"action": {
"type": "string",
"enum": [
- "hideAttrViewAllGroups"
+ "foldAttrViewGroups"
]
},
"avID": {
@@ -73921,7 +74932,10 @@
"data": {
"anyOf": [
{
- "type": "boolean"
+ "type": "object",
+ "additionalProperties": {
+ "type": "boolean"
+ }
},
{
"type": "null"
@@ -74088,7 +75102,7 @@
"action": {
"type": "string",
"enum": [
- "foldAttrViewGroup"
+ "syncAttrViewTableColWidth"
]
},
"avID": {
@@ -74130,14 +75144,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -74299,7 +75306,7 @@
"action": {
"type": "string",
"enum": [
- "foldAttrViewGroups"
+ "removeAttrViewGroup"
]
},
"avID": {
@@ -74341,17 +75348,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "anyOf": [
- {
- "type": "object",
- "additionalProperties": {
- "type": "boolean"
- }
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"type": "string"
@@ -74513,7 +75510,7 @@
"action": {
"type": "string",
"enum": [
- "syncAttrViewTableColWidth"
+ "sortAttrViewGroup"
]
},
"avID": {
@@ -74715,10 +75712,7 @@
"type": "object",
"properties": {
"action": {
- "type": "string",
- "enum": [
- "removeAttrViewGroup"
- ]
+ "$ref": "#/$defs/UnknownTransactionAction"
},
"avID": {
"type": "string"
@@ -74759,7 +75753,7 @@
"$ref": "#/$defs/TransactionContext"
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/JSONValue"
},
"deckID": {
"type": "string"
@@ -74804,7 +75798,7 @@
"type": "boolean"
},
"retData": {
- "type": "null"
+ "$ref": "#/$defs/JSONValue"
},
"rootID": {
"type": "string"
@@ -74914,24 +75908,49 @@
"retData"
],
"additionalProperties": false
- },
+ }
+ ]
+ },
+ "TransactionOperationRequest": {
+ "anyOf": [
{
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
- "sortAttrViewGroup"
+ "updateAttrs"
]
},
"avID": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"backRelationKeyID": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"blockID": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"blockIDs": {
"anyOf": [
@@ -74947,74 +75966,207 @@
]
},
"cellUpdates": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionCellUpdate"
- },
- {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionCellUpdateInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
- ]
- }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"context": {
- "$ref": "#/$defs/TransactionContext"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionContext"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionAttributeChangeInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"format": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"groupID": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"id": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"ignoreDefaultFill": {
- "type": "boolean"
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"isDetached": {
- "type": "boolean"
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"isTwoWay": {
- "type": "boolean"
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"keyID": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"layout": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"name": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"nextID": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"parentID": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"previousID": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"removeDest": {
- "type": "boolean"
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"retData": {
"type": "null"
},
"rootID": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"rowID": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"srcIDs": {
"anyOf": [
@@ -75050,10 +76202,16 @@
]
},
"targetGroupID": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"type": {
- "type": "string",
"enum": [
"",
"block",
@@ -75074,263 +76232,52 @@
"relation",
"rollup",
"lineNumber"
- ]
- },
- "viewID": {
- "type": "string"
- },
- "viewIDs": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "action",
- "id",
- "rootID",
- "parentID",
- "previousID",
- "nextID",
- "blockIDs",
- "blockID",
- "deckID",
- "avID",
- "srcIDs",
- "srcs",
- "isDetached",
- "name",
- "type",
- "format",
- "keyID",
- "rowID",
- "isTwoWay",
- "backRelationKeyID",
- "removeDest",
- "layout",
- "groupID",
- "targetGroupID",
- "viewID",
- "ignoreDefaultFill",
- "context",
- "data",
- "retData"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "action": {
- "$ref": "#/$defs/UnknownTransactionAction"
- },
- "avID": {
- "type": "string"
- },
- "backRelationKeyID": {
- "type": "string"
- },
- "blockID": {
- "type": "string"
- },
- "blockIDs": {
+ ],
"anyOf": [
{
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "string"
},
{
"type": "null"
}
]
},
- "cellUpdates": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionCellUpdate"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "context": {
- "$ref": "#/$defs/TransactionContext"
- },
- "data": {
- "$ref": "#/$defs/JSONValue"
- },
- "deckID": {
- "type": "string"
- },
- "format": {
- "type": "string"
- },
- "groupID": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "ignoreDefaultFill": {
- "type": "boolean"
- },
- "isDetached": {
- "type": "boolean"
- },
- "isTwoWay": {
- "type": "boolean"
- },
- "keyID": {
- "type": "string"
- },
- "layout": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "nextID": {
- "type": "string"
- },
- "parentID": {
- "type": "string"
- },
- "previousID": {
- "type": "string"
- },
- "removeDest": {
- "type": "boolean"
- },
- "retData": {
- "$ref": "#/$defs/JSONValue"
- },
- "rootID": {
- "type": "string"
- },
- "rowID": {
- "type": "string"
- },
- "srcIDs": {
+ "viewID": {
"anyOf": [
{
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "string"
},
{
"type": "null"
}
]
},
- "srcs": {
+ "viewIDs": {
"anyOf": [
{
"type": "array",
"items": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionSourceFieldsInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "string"
}
},
{
"type": "null"
}
]
- },
- "targetGroupID": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "enum": [
- "",
- "block",
- "text",
- "number",
- "date",
- "select",
- "mSelect",
- "url",
- "email",
- "phone",
- "location",
- "mAsset",
- "template",
- "created",
- "updated",
- "checkbox",
- "relation",
- "rollup",
- "lineNumber"
- ]
- },
- "viewID": {
- "type": "string"
- },
- "viewIDs": {
- "type": "array",
- "items": {
- "type": "string"
- }
}
},
"required": [
- "action",
- "id",
- "rootID",
- "parentID",
- "previousID",
- "nextID",
- "blockIDs",
- "blockID",
- "deckID",
- "avID",
- "srcIDs",
- "srcs",
- "isDetached",
- "name",
- "type",
- "format",
- "keyID",
- "rowID",
- "isTwoWay",
- "backRelationKeyID",
- "removeDest",
- "layout",
- "groupID",
- "targetGroupID",
- "viewID",
- "ignoreDefaultFill",
- "context",
- "data",
- "retData"
+ "action"
],
"additionalProperties": false
- }
- ]
- },
- "TransactionOperationRequest": {
- "anyOf": [
+ },
{
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
- "updateAttrs"
+ "create"
]
},
"avID": {
@@ -75407,14 +76354,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionAttributeChangeInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -75688,7 +76628,7 @@
"action": {
"type": "string",
"enum": [
- "create"
+ "restoreCreatedDoc"
]
},
"avID": {
@@ -76039,7 +76979,7 @@
"action": {
"type": "string",
"enum": [
- "restoreCreatedDoc"
+ "removeCreatedDoc"
]
},
"avID": {
@@ -76390,7 +77330,7 @@
"action": {
"type": "string",
"enum": [
- "removeCreatedDoc"
+ "update"
]
},
"avID": {
@@ -76467,7 +77407,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -76610,7 +77557,20 @@
]
},
"retData": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
},
"rootID": {
"anyOf": [
@@ -76741,7 +77701,7 @@
"action": {
"type": "string",
"enum": [
- "update"
+ "insert"
]
},
"avID": {
@@ -77112,7 +78072,7 @@
"action": {
"type": "string",
"enum": [
- "insert"
+ "delete"
]
},
"avID": {
@@ -77191,7 +78151,7 @@
"data": {
"anyOf": [
{
- "type": "string"
+ "$ref": "#/$defs/BlockDeleteDataInput"
},
{
"type": "null"
@@ -77483,7 +78443,7 @@
"action": {
"type": "string",
"enum": [
- "delete"
+ "move"
]
},
"avID": {
@@ -77562,7 +78522,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/BlockDeleteDataInput"
+ "type": "string"
},
{
"type": "null"
@@ -77710,20 +78670,7 @@
]
},
"retData": {
- "anyOf": [
- {
- "type": "null"
- },
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- ]
+ "type": "null"
},
"rootID": {
"anyOf": [
@@ -77854,7 +78801,7 @@
"action": {
"type": "string",
"enum": [
- "move"
+ "swapBlockRef"
]
},
"avID": {
@@ -77933,7 +78880,7 @@
"data": {
"anyOf": [
{
- "type": "string"
+ "$ref": "#/$defs/TransactionBlockSwapInput"
},
{
"type": "null"
@@ -78081,7 +79028,17 @@
]
},
"retData": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"rootID": {
"anyOf": [
@@ -78212,7 +79169,7 @@
"action": {
"type": "string",
"enum": [
- "swapBlockRef"
+ "convertList"
]
},
"avID": {
@@ -78291,7 +79248,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/TransactionBlockSwapInput"
+ "$ref": "#/$defs/TransactionListConversionInput"
},
{
"type": "null"
@@ -78441,10 +79398,7 @@
"retData": {
"anyOf": [
{
- "type": "array",
- "items": {
- "type": "string"
- }
+ "$ref": "#/$defs/TransactionListConversionResultInput"
},
{
"type": "null"
@@ -78580,7 +79534,7 @@
"action": {
"type": "string",
"enum": [
- "convertList"
+ "moveOutlineHeading"
]
},
"avID": {
@@ -78657,14 +79611,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionListConversionInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -78809,10 +79756,16 @@
"retData": {
"anyOf": [
{
- "$ref": "#/$defs/TransactionListConversionResultInput"
+ "type": "null"
},
{
- "type": "null"
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
]
},
@@ -78945,7 +79898,7 @@
"action": {
"type": "string",
"enum": [
- "moveOutlineHeading"
+ "append"
]
},
"avID": {
@@ -79022,7 +79975,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -79165,20 +80125,7 @@
]
},
"retData": {
- "anyOf": [
- {
- "type": "null"
- },
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- ]
+ "type": "null"
},
"rootID": {
"anyOf": [
@@ -79309,7 +80256,7 @@
"action": {
"type": "string",
"enum": [
- "append"
+ "appendInsert"
]
},
"avID": {
@@ -79536,7 +80483,20 @@
]
},
"retData": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
},
"rootID": {
"anyOf": [
@@ -79667,7 +80627,7 @@
"action": {
"type": "string",
"enum": [
- "appendInsert"
+ "prependInsert"
]
},
"avID": {
@@ -80038,7 +80998,7 @@
"action": {
"type": "string",
"enum": [
- "prependInsert"
+ "foldHeading"
]
},
"avID": {
@@ -80115,14 +81075,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -80409,7 +81362,7 @@
"action": {
"type": "string",
"enum": [
- "foldHeading"
+ "unfoldHeading"
]
},
"avID": {
@@ -80486,7 +81439,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -80773,7 +81733,7 @@
"action": {
"type": "string",
"enum": [
- "unfoldHeading"
+ "setAttrs"
]
},
"avID": {
@@ -81144,7 +82104,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrs"
+ "doUpdateUpdated"
]
},
"avID": {
@@ -81371,20 +82331,7 @@
]
},
"retData": {
- "anyOf": [
- {
- "type": "null"
- },
- {
- "type": "string"
- },
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- ]
+ "type": "null"
},
"rootID": {
"anyOf": [
@@ -81515,7 +82462,7 @@
"action": {
"type": "string",
"enum": [
- "doUpdateUpdated"
+ "addFlashcards"
]
},
"avID": {
@@ -81592,14 +82539,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -81873,7 +82813,7 @@
"action": {
"type": "string",
"enum": [
- "addFlashcards"
+ "removeFlashcards"
]
},
"avID": {
@@ -82224,7 +83164,7 @@
"action": {
"type": "string",
"enum": [
- "removeFlashcards"
+ "setAttrViewName"
]
},
"avID": {
@@ -82301,7 +83241,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -82575,7 +83522,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewName"
+ "setAttrViewNewItemTemplates"
]
},
"avID": {
@@ -82654,7 +83601,7 @@
"data": {
"anyOf": [
{
- "type": "string"
+ "$ref": "#/$defs/TransactionNewItemTemplatesInput"
},
{
"type": "null"
@@ -82933,7 +83880,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewNewItemTemplates"
+ "setAttrViewAutomations"
]
},
"avID": {
@@ -83012,7 +83959,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/TransactionNewItemTemplatesInput"
+ "$ref": "#/$defs/AVAutomationConfigInput"
},
{
"type": "null"
@@ -83291,7 +84238,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewAutomations"
+ "setAttrViewConditionalColors"
]
},
"avID": {
@@ -83370,7 +84317,17 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/AVAutomationConfigInput"
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVConditionalColorRuleInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
},
{
"type": "null"
@@ -83649,7 +84606,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewConditionalColors"
+ "setAttrViewFilters"
]
},
"avID": {
@@ -83732,7 +84689,7 @@
"items": {
"anyOf": [
{
- "$ref": "#/$defs/AVConditionalColorRuleInput"
+ "$ref": "#/$defs/AVViewFilterInput"
},
{
"type": "null"
@@ -84017,7 +84974,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewFilters"
+ "setAttrViewContextFilter"
]
},
"avID": {
@@ -84094,24 +85051,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVViewFilterInput"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -84385,7 +85325,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewContextFilter"
+ "setAttrViewColRelationFilters"
]
},
"avID": {
@@ -84462,7 +85402,24 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVViewFilterInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -84736,7 +85693,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColRelationFilters"
+ "setAttrViewColRollupFilters"
]
},
"avID": {
@@ -85104,7 +86061,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColRollupFilters"
+ "setAttrViewSorts"
]
},
"avID": {
@@ -85187,7 +86144,7 @@
"items": {
"anyOf": [
{
- "$ref": "#/$defs/AVViewFilterInput"
+ "$ref": "#/$defs/AVViewSortInput"
},
{
"type": "null"
@@ -85472,7 +86429,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewSorts"
+ "setAttrViewPageSize"
]
},
"avID": {
@@ -85551,17 +86508,7 @@
"data": {
"anyOf": [
{
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVViewSortInput"
- },
- {
- "type": "null"
- }
- ]
- }
+ "type": "number"
},
{
"type": "null"
@@ -85840,7 +86787,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewPageSize"
+ "setAttrViewColWidth"
]
},
"avID": {
@@ -85919,7 +86866,7 @@
"data": {
"anyOf": [
{
- "type": "number"
+ "type": "string"
},
{
"type": "null"
@@ -86198,7 +87145,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColWidth"
+ "setAttrViewColsWidth"
]
},
"avID": {
@@ -86277,7 +87224,10 @@
"data": {
"anyOf": [
{
- "type": "string"
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
},
{
"type": "null"
@@ -86556,7 +87506,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColsWidth"
+ "setAttrViewColAlign"
]
},
"avID": {
@@ -86635,10 +87585,7 @@
"data": {
"anyOf": [
{
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
+ "type": "string"
},
{
"type": "null"
@@ -86917,7 +87864,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColAlign"
+ "setAttrViewColWrap"
]
},
"avID": {
@@ -86996,7 +87943,7 @@
"data": {
"anyOf": [
{
- "type": "string"
+ "type": "boolean"
},
{
"type": "null"
@@ -87275,7 +88222,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColWrap"
+ "setAttrViewColHidden"
]
},
"avID": {
@@ -87633,7 +88580,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColHidden"
+ "setAttrViewColPin"
]
},
"avID": {
@@ -87991,7 +88938,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColPin"
+ "setAttrViewColIcon"
]
},
"avID": {
@@ -88070,7 +89017,7 @@
"data": {
"anyOf": [
{
- "type": "boolean"
+ "type": "string"
},
{
"type": "null"
@@ -88349,7 +89296,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColIcon"
+ "setAttrViewColDesc"
]
},
"avID": {
@@ -88707,7 +89654,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColDesc"
+ "setAttrViewColAttributePanelVisibility"
]
},
"avID": {
@@ -89065,7 +90012,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColAttributePanelVisibility"
+ "setAttrViewColLocationDefaultCoordinateSystem"
]
},
"avID": {
@@ -89423,7 +90370,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColLocationDefaultCoordinateSystem"
+ "insertAttrViewBlock"
]
},
"avID": {
@@ -89500,14 +90447,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -89650,7 +90590,14 @@
]
},
"retData": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionInsertedItemsInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"rootID": {
"anyOf": [
@@ -89781,7 +90728,7 @@
"action": {
"type": "string",
"enum": [
- "insertAttrViewBlock"
+ "removeAttrViewBlock"
]
},
"avID": {
@@ -90001,14 +90948,7 @@
]
},
"retData": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionInsertedItemsInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"rootID": {
"anyOf": [
@@ -90139,7 +91079,7 @@
"action": {
"type": "string",
"enum": [
- "removeAttrViewBlock"
+ "addAttrViewCol"
]
},
"avID": {
@@ -90216,7 +91156,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -90490,7 +91437,7 @@
"action": {
"type": "string",
"enum": [
- "addAttrViewCol"
+ "updateAttrViewCol"
]
},
"avID": {
@@ -90567,14 +91514,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -90848,7 +91788,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewCol"
+ "removeAttrViewCol"
]
},
"avID": {
@@ -91199,7 +92139,7 @@
"action": {
"type": "string",
"enum": [
- "removeAttrViewCol"
+ "sortAttrViewRow"
]
},
"avID": {
@@ -91276,7 +92216,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVRowOrderChangeInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -91550,7 +92497,7 @@
"action": {
"type": "string",
"enum": [
- "sortAttrViewRow"
+ "sortAttrViewCol"
]
},
"avID": {
@@ -91627,14 +92574,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVRowOrderChangeInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -91908,7 +92848,7 @@
"action": {
"type": "string",
"enum": [
- "sortAttrViewCol"
+ "sortAttrViewKey"
]
},
"avID": {
@@ -92259,7 +93199,7 @@
"action": {
"type": "string",
"enum": [
- "sortAttrViewKey"
+ "sortAttrViewBinding"
]
},
"avID": {
@@ -92610,7 +93550,7 @@
"action": {
"type": "string",
"enum": [
- "sortAttrViewBinding"
+ "updateAttrViewCell"
]
},
"avID": {
@@ -92687,7 +93627,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVValueInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -92961,7 +93908,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewCell"
+ "updateAttrViewCells"
]
},
"avID": {
@@ -93038,14 +93985,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVValueInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -93319,7 +94259,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewCells"
+ "updateAttrViewColOptions"
]
},
"avID": {
@@ -93396,7 +94336,24 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVSelectOptionInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -93670,7 +94627,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewColOptions"
+ "removeAttrViewColOption"
]
},
"avID": {
@@ -93749,17 +94706,7 @@
"data": {
"anyOf": [
{
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVSelectOptionInput"
- },
- {
- "type": "null"
- }
- ]
- }
+ "type": "string"
},
{
"type": "null"
@@ -94038,7 +94985,7 @@
"action": {
"type": "string",
"enum": [
- "removeAttrViewColOption"
+ "updateAttrViewColOption"
]
},
"avID": {
@@ -94117,7 +95064,7 @@
"data": {
"anyOf": [
{
- "type": "string"
+ "$ref": "#/$defs/TransactionOptionChangeInput"
},
{
"type": "null"
@@ -94396,7 +95343,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewColOption"
+ "setAttrViewColOptionDesc"
]
},
"avID": {
@@ -94475,7 +95422,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/TransactionOptionChangeInput"
+ "$ref": "#/$defs/TransactionOptionDescriptionInput"
},
{
"type": "null"
@@ -94754,7 +95701,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColOptionDesc"
+ "setAttrViewCustomColors"
]
},
"avID": {
@@ -94833,7 +95780,31 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/TransactionOptionDescriptionInput"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionCustomColorsInput"
+ },
+ {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/AVAttributeViewCustomColorInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ ]
},
{
"type": "null"
@@ -95112,7 +96083,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCustomColors"
+ "setAttrViewColCalc"
]
},
"avID": {
@@ -95191,31 +96162,7 @@
"data": {
"anyOf": [
{
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionCustomColorsInput"
- },
- {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVAttributeViewCustomColorInput"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- {
- "type": "null"
- }
- ]
- }
- ]
+ "$ref": "#/$defs/AVFieldCalcInput"
},
{
"type": "null"
@@ -95494,7 +96441,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColCalc"
+ "updateAttrViewColNumberFormat"
]
},
"avID": {
@@ -95571,14 +96518,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/AVFieldCalcInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -95852,7 +96792,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewColNumberFormat"
+ "setAttrViewColDateFormat"
]
},
"avID": {
@@ -96203,7 +97143,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColDateFormat"
+ "replaceAttrViewBlock"
]
},
"avID": {
@@ -96423,7 +97363,14 @@
]
},
"retData": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionReplacedItemInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"rootID": {
"anyOf": [
@@ -96554,7 +97501,7 @@
"action": {
"type": "string",
"enum": [
- "replaceAttrViewBlock"
+ "updateAttrViewColTemplate"
]
},
"avID": {
@@ -96631,7 +97578,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -96774,14 +97728,7 @@
]
},
"retData": {
- "anyOf": [
- {
- "$ref": "#/$defs/TransactionReplacedItemInput"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"rootID": {
"anyOf": [
@@ -96912,7 +97859,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewColTemplate"
+ "addAttrViewView"
]
},
"avID": {
@@ -96989,14 +97936,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -97270,7 +98210,7 @@
"action": {
"type": "string",
"enum": [
- "addAttrViewView"
+ "removeAttrViewView"
]
},
"avID": {
@@ -97490,7 +98430,14 @@
]
},
"retData": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"rootID": {
"anyOf": [
@@ -97621,7 +98568,7 @@
"action": {
"type": "string",
"enum": [
- "removeAttrViewView"
+ "setAttrViewViewName"
]
},
"avID": {
@@ -97698,7 +98645,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -97841,14 +98795,7 @@
]
},
"retData": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"rootID": {
"anyOf": [
@@ -97979,7 +98926,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewViewName"
+ "setAttrViewViewIcon"
]
},
"avID": {
@@ -98337,7 +99284,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewViewIcon"
+ "setAttrViewViewDesc"
]
},
"avID": {
@@ -98695,7 +99642,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewViewDesc"
+ "duplicateAttrViewView"
]
},
"avID": {
@@ -98772,14 +99719,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -99053,7 +99993,7 @@
"action": {
"type": "string",
"enum": [
- "duplicateAttrViewView"
+ "duplicateAttrViewRow"
]
},
"avID": {
@@ -99404,7 +100344,7 @@
"action": {
"type": "string",
"enum": [
- "duplicateAttrViewRow"
+ "sortAttrViewView"
]
},
"avID": {
@@ -99481,7 +100421,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -99755,7 +100702,7 @@
"action": {
"type": "string",
"enum": [
- "sortAttrViewView"
+ "updateAttrViewColRelation"
]
},
"avID": {
@@ -99832,14 +100779,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -100113,7 +101053,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewColRelation"
+ "updateAttrViewColRollup"
]
},
"avID": {
@@ -100190,7 +101130,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionRollupInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -100464,7 +101411,7 @@
"action": {
"type": "string",
"enum": [
- "updateAttrViewColRollup"
+ "hideAttrViewName"
]
},
"avID": {
@@ -100543,7 +101490,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/TransactionRollupInput"
+ "type": "boolean"
},
{
"type": "null"
@@ -100822,7 +101769,7 @@
"action": {
"type": "string",
"enum": [
- "hideAttrViewName"
+ "setAttrViewColDateFillCreated"
]
},
"avID": {
@@ -101180,7 +102127,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColDateFillCreated"
+ "setAttrViewColDateFillSpecificTime"
]
},
"avID": {
@@ -101538,7 +102485,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewColDateFillSpecificTime"
+ "setAttrViewCreatedIncludeTime"
]
},
"avID": {
@@ -101896,7 +102843,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCreatedIncludeTime"
+ "setAttrViewUpdatedIncludeTime"
]
},
"avID": {
@@ -102254,7 +103201,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewUpdatedIncludeTime"
+ "duplicateAttrViewKey"
]
},
"avID": {
@@ -102331,14 +103278,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -102612,7 +103552,7 @@
"action": {
"type": "string",
"enum": [
- "duplicateAttrViewKey"
+ "setAttrViewCoverFrom"
]
},
"avID": {
@@ -102689,7 +103629,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -102963,7 +103910,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCoverFrom"
+ "setAttrViewCoverFromAssetKeyID"
]
},
"avID": {
@@ -103040,14 +103987,7 @@
]
},
"data": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ]
+ "type": "null"
},
"deckID": {
"anyOf": [
@@ -103321,7 +104261,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCoverFromAssetKeyID"
+ "setAttrViewCardCoverPosition"
]
},
"avID": {
@@ -103398,7 +104338,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/TransactionCardCoverPositionInput"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"deckID": {
"anyOf": [
@@ -103672,7 +104619,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCardCoverPosition"
+ "setAttrViewCardSize"
]
},
"avID": {
@@ -103751,7 +104698,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/TransactionCardCoverPositionInput"
+ "type": "number"
},
{
"type": "null"
@@ -104030,7 +104977,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCardSize"
+ "setAttrViewCardWidth"
]
},
"avID": {
@@ -104388,7 +105335,7 @@
"action": {
"type": "string",
"enum": [
- "setAttrViewCardWidth"
+ "setAttrViewMap"
]
},
"avID": {
@@ -104467,7 +105414,7 @@
"data": {
"anyOf": [
{
- "type": "number"
+ "$ref": "#/$defs/AVMapSettingsInput"
},
{
"type": "null"
@@ -113533,6 +114480,7 @@
"setAttrViewCardCoverPosition",
"setAttrViewCardSize",
"setAttrViewCardWidth",
+ "setAttrViewMap",
"setAttrViewCalendar",
"setAttrViewCardLayout",
"setAttrViewColFullRow",
@@ -147369,15 +148317,94 @@
},
{
"method": "POST",
- "path": "/api/history/getHistoryItems",
- "handler": "getHistoryItems",
+ "path": "/api/history/getHistoryItems",
+ "handler": "getHistoryItems",
+ "authorization": [
+ "authenticated",
+ "admin"
+ ],
+ "body": "json",
+ "request": {
+ "$ref": "#/$defs/HistoryItemsRequestInput"
+ },
+ "response": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "enum": [
+ 0
+ ]
+ },
+ "data": {
+ "$ref": "#/$defs/HistoryItemsData"
+ },
+ "msg": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "msg",
+ "data"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "enum": [
+ -1
+ ]
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "closeTimeout": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "closeTimeout"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "msg": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "msg",
+ "data"
+ ],
+ "additionalProperties": true
+ }
+ ]
+ }
+ },
+ {
+ "method": "POST",
+ "path": "/api/history/getNotebookHistory",
+ "handler": "getNotebookHistory",
"authorization": [
"authenticated",
"admin"
],
- "body": "json",
+ "body": "none",
"request": {
- "$ref": "#/$defs/HistoryItemsRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -147391,7 +148418,7 @@
]
},
"data": {
- "$ref": "#/$defs/HistoryItemsData"
+ "$ref": "#/$defs/NotebookHistoryData"
},
"msg": {
"type": "string"
@@ -147448,11 +148475,12 @@
},
{
"method": "POST",
- "path": "/api/history/getNotebookHistory",
- "handler": "getNotebookHistory",
+ "path": "/api/history/reindexHistory",
+ "handler": "reindexHistory",
"authorization": [
"authenticated",
- "admin"
+ "admin",
+ "writable"
],
"body": "none",
"request": {
@@ -147470,7 +148498,7 @@
]
},
"data": {
- "$ref": "#/$defs/NotebookHistoryData"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -147527,16 +148555,16 @@
},
{
"method": "POST",
- "path": "/api/history/reindexHistory",
- "handler": "reindexHistory",
+ "path": "/api/history/rollbackAssetsHistory",
+ "handler": "rollbackAssetsHistory",
"authorization": [
"authenticated",
"admin",
"writable"
],
- "body": "none",
+ "body": "json",
"request": {
- "$ref": "#/$defs/EmptyRequestInput"
+ "$ref": "#/$defs/HistoryPathRequestInput"
},
"response": {
"anyOf": [
@@ -147607,8 +148635,8 @@
},
{
"method": "POST",
- "path": "/api/history/rollbackAssetsHistory",
- "handler": "rollbackAssetsHistory",
+ "path": "/api/history/rollbackAttributeViewHistory",
+ "handler": "rollbackAttributeViewHistory",
"authorization": [
"authenticated",
"admin",
@@ -147687,8 +148715,8 @@
},
{
"method": "POST",
- "path": "/api/history/rollbackAttributeViewHistory",
- "handler": "rollbackAttributeViewHistory",
+ "path": "/api/history/rollbackDocHistory",
+ "handler": "rollbackDocHistory",
"authorization": [
"authenticated",
"admin",
@@ -147767,8 +148795,8 @@
},
{
"method": "POST",
- "path": "/api/history/rollbackDocHistory",
- "handler": "rollbackDocHistory",
+ "path": "/api/history/rollbackNotebookHistory",
+ "handler": "rollbackNotebookHistory",
"authorization": [
"authenticated",
"admin",
@@ -147847,8 +148875,87 @@
},
{
"method": "POST",
- "path": "/api/history/rollbackNotebookHistory",
- "handler": "rollbackNotebookHistory",
+ "path": "/api/history/searchHistory",
+ "handler": "searchHistory",
+ "authorization": [
+ "authenticated",
+ "admin"
+ ],
+ "body": "json",
+ "request": {
+ "$ref": "#/$defs/SearchHistoryRequestInput"
+ },
+ "response": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "enum": [
+ 0
+ ]
+ },
+ "data": {
+ "$ref": "#/$defs/SearchHistoryData"
+ },
+ "msg": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "msg",
+ "data"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "enum": [
+ -1
+ ]
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "closeTimeout": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "closeTimeout"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "msg": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "msg",
+ "data"
+ ],
+ "additionalProperties": true
+ }
+ ]
+ }
+ },
+ {
+ "method": "POST",
+ "path": "/api/import/cancelImportSY",
+ "handler": "cancelImportSY",
"authorization": [
"authenticated",
"admin",
@@ -147856,7 +148963,7 @@
],
"body": "json",
"request": {
- "$ref": "#/$defs/HistoryPathRequestInput"
+ "$ref": "#/$defs/ImportTokenRequestInput"
},
"response": {
"anyOf": [
@@ -147927,15 +149034,15 @@
},
{
"method": "POST",
- "path": "/api/history/searchHistory",
- "handler": "searchHistory",
+ "path": "/api/import/cancelObsidianVaultTask",
+ "handler": "cancelObsidianVaultTask",
"authorization": [
"authenticated",
"admin"
],
"body": "json",
"request": {
- "$ref": "#/$defs/SearchHistoryRequestInput"
+ "$ref": "#/$defs/ObsidianTaskRequestInput"
},
"response": {
"anyOf": [
@@ -147949,7 +149056,14 @@
]
},
"data": {
- "$ref": "#/$defs/SearchHistoryData"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ObsidianVaultTask"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -147987,6 +149101,16 @@
},
{
"type": "null"
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ObsidianVaultTask"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
]
},
@@ -148006,8 +149130,8 @@
},
{
"method": "POST",
- "path": "/api/import/cancelImportSY",
- "handler": "cancelImportSY",
+ "path": "/api/import/continueImportSY",
+ "handler": "continueImportSY",
"authorization": [
"authenticated",
"admin",
@@ -148015,7 +149139,7 @@
],
"body": "json",
"request": {
- "$ref": "#/$defs/ImportTokenRequestInput"
+ "$ref": "#/$defs/ContinueImportSYRequestInput"
},
"response": {
"anyOf": [
@@ -148029,7 +149153,7 @@
]
},
"data": {
- "type": "null"
+ "$ref": "#/$defs/ImportDocumentData"
},
"msg": {
"type": "string"
@@ -148086,8 +149210,8 @@
},
{
"method": "POST",
- "path": "/api/import/cancelObsidianVaultTask",
- "handler": "cancelObsidianVaultTask",
+ "path": "/api/import/getObsidianVaultTask",
+ "handler": "getObsidianVaultTask",
"authorization": [
"authenticated",
"admin"
@@ -148153,16 +149277,86 @@
},
{
"type": "null"
- },
+ }
+ ]
+ },
+ "msg": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "msg",
+ "data"
+ ],
+ "additionalProperties": true
+ }
+ ]
+ }
+ },
+ {
+ "method": "POST",
+ "path": "/api/import/importData",
+ "handler": "importData",
+ "authorization": [
+ "authenticated",
+ "admin",
+ "writable"
+ ],
+ "body": "multipart",
+ "request": {
+ "$ref": "#/$defs/ImportDataRequestInput"
+ },
+ "response": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "enum": [
+ 0
+ ]
+ },
+ "data": {
+ "type": "null"
+ },
+ "msg": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "msg",
+ "data"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "enum": [
+ -1
+ ]
+ },
+ "data": {
+ "anyOf": [
{
- "anyOf": [
- {
- "$ref": "#/$defs/ObsidianVaultTask"
- },
- {
- "type": "null"
+ "type": "object",
+ "properties": {
+ "closeTimeout": {
+ "type": "number"
}
- ]
+ },
+ "required": [
+ "closeTimeout"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "null"
}
]
},
@@ -148182,16 +149376,16 @@
},
{
"method": "POST",
- "path": "/api/import/continueImportSY",
- "handler": "continueImportSY",
+ "path": "/api/import/importSY",
+ "handler": "importSY",
"authorization": [
"authenticated",
"admin",
"writable"
],
- "body": "json",
+ "body": "multipart",
"request": {
- "$ref": "#/$defs/ContinueImportSYRequestInput"
+ "$ref": "#/$defs/ImportSYRequestInput"
},
"response": {
"anyOf": [
@@ -148205,7 +149399,7 @@
]
},
"data": {
- "$ref": "#/$defs/ImportDocumentData"
+ "type": "null"
},
"msg": {
"type": "string"
@@ -148262,15 +149456,16 @@
},
{
"method": "POST",
- "path": "/api/import/getObsidianVaultTask",
- "handler": "getObsidianVaultTask",
+ "path": "/api/import/importSYAuto",
+ "handler": "importSYAuto",
"authorization": [
"authenticated",
- "admin"
+ "admin",
+ "writable"
],
- "body": "json",
+ "body": "multipart",
"request": {
- "$ref": "#/$defs/ObsidianTaskRequestInput"
+ "$ref": "#/$defs/ImportSYRequestInput"
},
"response": {
"anyOf": [
@@ -148286,10 +149481,13 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/ObsidianVaultTask"
+ "$ref": "#/$defs/ImportAutoDocument"
},
{
- "type": "null"
+ "$ref": "#/$defs/ImportAutoNotebook"
+ },
+ {
+ "$ref": "#/$defs/ImportAutoNotebooks"
}
]
},
@@ -148329,6 +149527,19 @@
},
{
"type": "null"
+ },
+ {
+ "anyOf": [
+ {
+ "$ref": "#/$defs/ImportAutoDocument"
+ },
+ {
+ "$ref": "#/$defs/ImportAutoNotebook"
+ },
+ {
+ "$ref": "#/$defs/ImportAutoNotebooks"
+ }
+ ]
}
]
},
@@ -148348,8 +149559,8 @@
},
{
"method": "POST",
- "path": "/api/import/importData",
- "handler": "importData",
+ "path": "/api/import/importSYNotebook",
+ "handler": "importSYNotebook",
"authorization": [
"authenticated",
"admin",
@@ -148370,45 +149581,13 @@
0
]
},
- "data": {
- "type": "null"
- },
- "msg": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "msg",
- "data"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- -1
- ]
- },
"data": {
"anyOf": [
{
- "type": "object",
- "properties": {
- "closeTimeout": {
- "type": "number"
- }
- },
- "required": [
- "closeTimeout"
- ],
- "additionalProperties": false
+ "$ref": "#/$defs/ImportedNotebook"
},
{
- "type": "null"
+ "$ref": "#/$defs/ImportedNotebooks"
}
]
},
@@ -148421,47 +149600,6 @@
"msg",
"data"
],
- "additionalProperties": true
- }
- ]
- }
- },
- {
- "method": "POST",
- "path": "/api/import/importSY",
- "handler": "importSY",
- "authorization": [
- "authenticated",
- "admin",
- "writable"
- ],
- "body": "multipart",
- "request": {
- "$ref": "#/$defs/ImportSYRequestInput"
- },
- "response": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- 0
- ]
- },
- "data": {
- "type": "null"
- },
- "msg": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "msg",
- "data"
- ],
"additionalProperties": false
},
{
@@ -148508,16 +149646,16 @@
},
{
"method": "POST",
- "path": "/api/import/importSYAuto",
- "handler": "importSYAuto",
+ "path": "/api/import/importStdMd",
+ "handler": "importStdMd",
"authorization": [
"authenticated",
"admin",
"writable"
],
- "body": "multipart",
+ "body": "json",
"request": {
- "$ref": "#/$defs/ImportSYRequestInput"
+ "$ref": "#/$defs/ImportMarkdownRequestInput"
},
"response": {
"anyOf": [
@@ -148531,17 +149669,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/ImportAutoDocument"
- },
- {
- "$ref": "#/$defs/ImportAutoNotebook"
- },
- {
- "$ref": "#/$defs/ImportAutoNotebooks"
- }
- ]
+ "type": "null"
},
"msg": {
"type": "string"
@@ -148579,19 +149707,6 @@
},
{
"type": "null"
- },
- {
- "anyOf": [
- {
- "$ref": "#/$defs/ImportAutoDocument"
- },
- {
- "$ref": "#/$defs/ImportAutoNotebook"
- },
- {
- "$ref": "#/$defs/ImportAutoNotebooks"
- }
- ]
}
]
},
@@ -148611,8 +149726,8 @@
},
{
"method": "POST",
- "path": "/api/import/importSYNotebook",
- "handler": "importSYNotebook",
+ "path": "/api/import/importZipMd",
+ "handler": "importZipMd",
"authorization": [
"authenticated",
"admin",
@@ -148620,7 +149735,7 @@
],
"body": "multipart",
"request": {
- "$ref": "#/$defs/ImportDataRequestInput"
+ "$ref": "#/$defs/ImportZipMarkdownRequestInput"
},
"response": {
"anyOf": [
@@ -148634,14 +149749,7 @@
]
},
"data": {
- "anyOf": [
- {
- "$ref": "#/$defs/ImportedNotebook"
- },
- {
- "$ref": "#/$defs/ImportedNotebooks"
- }
- ]
+ "type": "null"
},
"msg": {
"type": "string"
@@ -148698,8 +149806,8 @@
},
{
"method": "POST",
- "path": "/api/import/importStdMd",
- "handler": "importStdMd",
+ "path": "/api/import/startObsidianVaultAnalysis",
+ "handler": "startObsidianVaultAnalysis",
"authorization": [
"authenticated",
"admin",
@@ -148707,7 +149815,7 @@
],
"body": "json",
"request": {
- "$ref": "#/$defs/ImportMarkdownRequestInput"
+ "$ref": "#/$defs/ObsidianAnalysisRequestInput"
},
"response": {
"anyOf": [
@@ -148720,42 +149828,10 @@
0
]
},
- "data": {
- "type": "null"
- },
- "msg": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "msg",
- "data"
- ],
- "additionalProperties": false
- },
- {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- -1
- ]
- },
"data": {
"anyOf": [
{
- "type": "object",
- "properties": {
- "closeTimeout": {
- "type": "number"
- }
- },
- "required": [
- "closeTimeout"
- ],
- "additionalProperties": false
+ "$ref": "#/$defs/ObsidianVaultTask"
},
{
"type": "null"
@@ -148771,47 +149847,6 @@
"msg",
"data"
],
- "additionalProperties": true
- }
- ]
- }
- },
- {
- "method": "POST",
- "path": "/api/import/importZipMd",
- "handler": "importZipMd",
- "authorization": [
- "authenticated",
- "admin",
- "writable"
- ],
- "body": "multipart",
- "request": {
- "$ref": "#/$defs/ImportZipMarkdownRequestInput"
- },
- "response": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer",
- "enum": [
- 0
- ]
- },
- "data": {
- "type": "null"
- },
- "msg": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "msg",
- "data"
- ],
"additionalProperties": false
},
{
@@ -148858,8 +149893,8 @@
},
{
"method": "POST",
- "path": "/api/import/startObsidianVaultAnalysis",
- "handler": "startObsidianVaultAnalysis",
+ "path": "/api/import/startObsidianVaultImport",
+ "handler": "startObsidianVaultImport",
"authorization": [
"authenticated",
"admin",
@@ -148867,7 +149902,7 @@
],
"body": "json",
"request": {
- "$ref": "#/$defs/ObsidianAnalysisRequestInput"
+ "$ref": "#/$defs/ObsidianImportRequestInput"
},
"response": {
"anyOf": [
@@ -148945,16 +149980,15 @@
},
{
"method": "POST",
- "path": "/api/import/startObsidianVaultImport",
- "handler": "startObsidianVaultImport",
+ "path": "/api/inbox/getShorthand",
+ "handler": "getShorthand",
"authorization": [
"authenticated",
- "admin",
- "writable"
+ "admin"
],
"body": "json",
"request": {
- "$ref": "#/$defs/ObsidianImportRequestInput"
+ "$ref": "#/$defs/TrimmedIDRequestInput"
},
"response": {
"anyOf": [
@@ -148970,7 +150004,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/ObsidianVaultTask"
+ "$ref": "#/$defs/Shorthand"
},
{
"type": "null"
@@ -148994,7 +150028,8 @@
"code": {
"type": "integer",
"enum": [
- -1
+ -1,
+ 1
]
},
"data": {
@@ -149032,15 +150067,15 @@
},
{
"method": "POST",
- "path": "/api/inbox/getShorthand",
- "handler": "getShorthand",
+ "path": "/api/inbox/getShorthands",
+ "handler": "getShorthands",
"authorization": [
"authenticated",
"admin"
],
"body": "json",
"request": {
- "$ref": "#/$defs/TrimmedIDRequestInput"
+ "$ref": "#/$defs/ShorthandsRequestInput"
},
"response": {
"anyOf": [
@@ -149056,7 +150091,7 @@
"data": {
"anyOf": [
{
- "$ref": "#/$defs/Shorthand"
+ "$ref": "#/$defs/ShorthandsData"
},
{
"type": "null"
@@ -149119,15 +150154,16 @@
},
{
"method": "POST",
- "path": "/api/inbox/getShorthands",
- "handler": "getShorthands",
+ "path": "/api/inbox/removeShorthands",
+ "handler": "removeShorthands",
"authorization": [
"authenticated",
- "admin"
+ "admin",
+ "writable"
],
"body": "json",
"request": {
- "$ref": "#/$defs/ShorthandsRequestInput"
+ "$ref": "#/$defs/RemoveShorthandsRequestInput"
},
"response": {
"anyOf": [
@@ -149140,10 +150176,43 @@
0
]
},
+ "data": {
+ "type": "null"
+ },
+ "msg": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "msg",
+ "data"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "enum": [
+ -1,
+ 1
+ ]
+ },
"data": {
"anyOf": [
{
- "$ref": "#/$defs/ShorthandsData"
+ "type": "object",
+ "properties": {
+ "closeTimeout": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "closeTimeout"
+ ],
+ "additionalProperties": false
},
{
"type": "null"
@@ -149159,6 +150228,45 @@
"msg",
"data"
],
+ "additionalProperties": true
+ }
+ ]
+ }
+ },
+ {
+ "method": "POST",
+ "path": "/api/lute/copyStdMarkdown",
+ "handler": "copyStdMarkdown",
+ "authorization": [
+ "authenticated"
+ ],
+ "body": "json",
+ "request": {
+ "$ref": "#/$defs/CopyStdMarkdownRequestInput"
+ },
+ "response": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "enum": [
+ 0
+ ]
+ },
+ "data": {
+ "type": "string"
+ },
+ "msg": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "msg",
+ "data"
+ ],
"additionalProperties": false
},
{
@@ -149167,8 +150275,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- 1
+ -1
]
},
"data": {
@@ -149206,8 +150313,8 @@
},
{
"method": "POST",
- "path": "/api/inbox/removeShorthands",
- "handler": "removeShorthands",
+ "path": "/api/lute/html2BlockDOM",
+ "handler": "html2BlockDOM",
"authorization": [
"authenticated",
"admin",
@@ -149215,7 +150322,7 @@
],
"body": "json",
"request": {
- "$ref": "#/$defs/RemoveShorthandsRequestInput"
+ "$ref": "#/$defs/HTMLClipboardRequestInput"
},
"response": {
"anyOf": [
@@ -149229,7 +150336,14 @@
]
},
"data": {
- "type": "null"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/$defs/HTMLClipboardPreflight"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -149248,8 +150362,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- 1
+ -1
]
},
"data": {
@@ -149287,14 +150400,14 @@
},
{
"method": "POST",
- "path": "/api/lute/copyStdMarkdown",
- "handler": "copyStdMarkdown",
+ "path": "/api/lute/md2html",
+ "handler": "md2HTML",
"authorization": [
"authenticated"
],
"body": "json",
"request": {
- "$ref": "#/$defs/CopyStdMarkdownRequestInput"
+ "$ref": "#/$defs/MarkdownHTMLRequestInput"
},
"response": {
"anyOf": [
@@ -149308,7 +150421,7 @@
]
},
"data": {
- "type": "string"
+ "$ref": "#/$defs/HTMLData"
},
"msg": {
"type": "string"
@@ -149365,16 +150478,15 @@
},
{
"method": "POST",
- "path": "/api/lute/html2BlockDOM",
- "handler": "html2BlockDOM",
+ "path": "/api/lute/spinBlockDOM",
+ "handler": "spinBlockDOM",
"authorization": [
"authenticated",
- "admin",
- "writable"
+ "admin"
],
"body": "json",
"request": {
- "$ref": "#/$defs/HTMLClipboardRequestInput"
+ "$ref": "#/$defs/DOMTextRequestInput"
},
"response": {
"anyOf": [
@@ -149387,13 +150499,46 @@
0
]
},
+ "data": {
+ "$ref": "#/$defs/DOMData"
+ },
+ "msg": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "msg",
+ "data"
+ ],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "enum": [
+ -1,
+ 413
+ ]
+ },
"data": {
"anyOf": [
{
- "type": "string"
+ "type": "object",
+ "properties": {
+ "closeTimeout": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "closeTimeout"
+ ],
+ "additionalProperties": false
},
{
- "$ref": "#/$defs/HTMLClipboardPreflight"
+ "type": "null"
}
]
},
@@ -149406,6 +150551,47 @@
"msg",
"data"
],
+ "additionalProperties": true
+ }
+ ]
+ }
+ },
+ {
+ "method": "POST",
+ "path": "/api/lute/wpsPresentation2BlockDOM",
+ "handler": "wpsPresentation2BlockDOM",
+ "authorization": [
+ "authenticated",
+ "admin",
+ "writable"
+ ],
+ "body": "json",
+ "request": {
+ "$ref": "#/$defs/WPSPresentationRequestInput"
+ },
+ "response": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "enum": [
+ 0
+ ]
+ },
+ "data": {
+ "$ref": "#/$defs/WPSPresentationData"
+ },
+ "msg": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "msg",
+ "data"
+ ],
"additionalProperties": false
},
{
@@ -149433,6 +150619,9 @@
},
{
"type": "null"
+ },
+ {
+ "$ref": "#/$defs/WPSPresentationData"
}
]
},
@@ -149452,14 +150641,15 @@
},
{
"method": "POST",
- "path": "/api/lute/md2html",
- "handler": "md2HTML",
+ "path": "/api/map/getConf",
+ "handler": "getMapConf",
"authorization": [
- "authenticated"
+ "authenticated",
+ "admin"
],
- "body": "json",
+ "body": "none",
"request": {
- "$ref": "#/$defs/MarkdownHTMLRequestInput"
+ "$ref": "#/$defs/EmptyRequestInput"
},
"response": {
"anyOf": [
@@ -149473,7 +150663,14 @@
]
},
"data": {
- "$ref": "#/$defs/HTMLData"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/MapConfig"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -149530,15 +150727,15 @@
},
{
"method": "POST",
- "path": "/api/lute/spinBlockDOM",
- "handler": "spinBlockDOM",
+ "path": "/api/map/getRuntime",
+ "handler": "getMapRuntime",
"authorization": [
"authenticated",
"admin"
],
"body": "json",
"request": {
- "$ref": "#/$defs/DOMTextRequestInput"
+ "$ref": "#/$defs/MapRuntimeRequestInput"
},
"response": {
"anyOf": [
@@ -149552,7 +150749,14 @@
]
},
"data": {
- "$ref": "#/$defs/DOMData"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/MapRuntime"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -149571,8 +150775,7 @@
"code": {
"type": "integer",
"enum": [
- -1,
- 413
+ -1
]
},
"data": {
@@ -149610,8 +150813,8 @@
},
{
"method": "POST",
- "path": "/api/lute/wpsPresentation2BlockDOM",
- "handler": "wpsPresentation2BlockDOM",
+ "path": "/api/map/setConf",
+ "handler": "setMapConf",
"authorization": [
"authenticated",
"admin",
@@ -149619,7 +150822,7 @@
],
"body": "json",
"request": {
- "$ref": "#/$defs/WPSPresentationRequestInput"
+ "$ref": "#/$defs/MapSetConfRequestInput"
},
"response": {
"anyOf": [
@@ -149633,7 +150836,14 @@
]
},
"data": {
- "$ref": "#/$defs/WPSPresentationData"
+ "anyOf": [
+ {
+ "$ref": "#/$defs/MapConfig"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"msg": {
"type": "string"
@@ -149671,9 +150881,6 @@
},
{
"type": "null"
- },
- {
- "$ref": "#/$defs/WPSPresentationData"
}
]
},
diff --git a/kernel/apicontract/system_conf.go b/kernel/apicontract/system_conf.go
index dfc0c7e846..3787dadd12 100644
--- a/kernel/apicontract/system_conf.go
+++ b/kernel/apicontract/system_conf.go
@@ -22,6 +22,7 @@ type SystemAppConf struct {
Search *SettingSearch `json:"search" api:"optional,nullable"`
Flashcard *SettingFlashcard `json:"flashcard" api:"optional,nullable"`
AI *SettingAI `json:"ai" api:"optional,nullable"`
+ Map *MapConfig `json:"map" api:"optional,nullable"`
OCR *SettingOCR `json:"ocr" api:"optional,nullable"`
Secrets *SettingSecrets `json:"secrets" api:"optional,nullable"`
Variables *SettingVariables `json:"variables" api:"optional,nullable"`
diff --git a/kernel/apicontract/transaction_schema.go b/kernel/apicontract/transaction_schema.go
index bac9f8ed63..13ba864b18 100644
--- a/kernel/apicontract/transaction_schema.go
+++ b/kernel/apicontract/transaction_schema.go
@@ -92,6 +92,7 @@ var transactionActionPayloads = []transactionActionPayload{
{"setAttrViewCardCoverPosition", reflect.TypeFor[TransactionCardCoverPosition](), reflect.TypeFor[Null]()},
{"setAttrViewCardSize", reflect.TypeFor[float64](), reflect.TypeFor[Null]()},
{"setAttrViewCardWidth", reflect.TypeFor[float64](), reflect.TypeFor[Null]()},
+ {"setAttrViewMap", reflect.TypeFor[AVMapSettings](), reflect.TypeFor[Null]()},
{"setAttrViewCalendar", reflect.TypeFor[AVCalendarSettings](), reflect.TypeFor[Null]()},
{"setAttrViewCardLayout", reflect.TypeFor[float64](), reflect.TypeFor[Null]()},
{"setAttrViewColFullRow", reflect.TypeFor[bool](), reflect.TypeFor[Null]()},
diff --git a/kernel/av/av.go b/kernel/av/av.go
index dbb2512572..2f7aae3c40 100644
--- a/kernel/av/av.go
+++ b/kernel/av/av.go
@@ -318,6 +318,7 @@ type View struct {
PageSize int `json:"pageSize"` // 每页条目数
LayoutType LayoutType `json:"type"` // 当前布局类型
Table *LayoutTable `json:"table,omitempty"` // 表格布局
+ Map *LayoutMap `json:"map,omitempty"` // 地图布局
Calendar *LayoutCalendar `json:"calendar,omitempty"`
List *LayoutList `json:"list,omitempty"` // 列表布局
Gallery *LayoutGallery `json:"gallery,omitempty"` // 卡片布局
@@ -348,7 +349,7 @@ type ViewData struct {
}
func (view *View) IsGroupView() bool {
- return LayoutTypeCalendar != view.LayoutType && nil != view.Group && "" != view.Group.Field
+ return LayoutTypeCalendar != view.LayoutType && LayoutTypeMap != view.LayoutType && nil != view.Group && "" != view.Group.Field
}
// GetGroupValue 获取分组视图的分组值。
@@ -425,6 +426,7 @@ type LayoutType string
const (
LayoutTypeTable LayoutType = "table" // 属性视图类型 - 表格
LayoutTypeCalendar LayoutType = "calendar"
+ LayoutTypeMap LayoutType = "map"
LayoutTypeList LayoutType = "list" // 属性视图类型 - 列表
LayoutTypeGallery LayoutType = "gallery" // 属性视图类型 - 卡片
LayoutTypeKanban LayoutType = "kanban" // 属性视图类型 - 看板
@@ -1368,6 +1370,11 @@ func (av *AttributeView) Clone() (ret *AttributeView) {
column.ID = keyIDMap[column.ID]
}
}
+ if nil != view.Map {
+ if id := keyIDMap[view.Map.Settings.LocationKeyID]; id != "" {
+ view.Map.Settings.LocationKeyID = id
+ }
+ }
if nil != view.Calendar {
if id := keyIDMap[view.Calendar.Settings.DateKeyID]; id != "" {
view.Calendar.Settings.DateKeyID = id
@@ -1431,6 +1438,7 @@ var (
ErrInvalidColumnAlign = errors.New("invalid column align")
ErrSpecTooNew = errors.New("attribute view spec is too new")
ErrRichTextSpecMismatch = errors.New("attribute view rich text requires storage spec 9")
+ ErrMapSpecMismatch = errors.New("attribute view map requires storage spec 12")
ErrLocationSpecMismatch = errors.New("attribute view location requires storage spec 11")
ErrFilterTooDeep = errors.New("filter nesting depth exceeds the maximum allowed")
)
diff --git a/kernel/av/av_fix.go b/kernel/av/av_fix.go
index 1d40d634ab..397f08cab4 100644
--- a/kernel/av/av_fix.go
+++ b/kernel/av/av_fix.go
@@ -26,10 +26,11 @@ import (
)
const (
- CurrentSpec = 11
+ CurrentSpec = 12
PlainTextSpec = 8
RichTextSpec = 9
LocationSpec = 11
+ MapSpec = 12
)
const MaxFilterNestingDepth = 3
@@ -49,9 +50,12 @@ func UpgradeSpec(av *AttributeView) {
upgradeSpec8(av)
upgradeSpec9(av)
upgradeSpec10(av)
- if av.HasLocation() {
+ if av.Spec < LocationSpec && av.HasLocation() {
av.Spec = LocationSpec
}
+ if av.HasMap() {
+ av.Spec = MapSpec
+ }
}
// upgradeSpec10 仅为包含列表或日历配置的数据库升级,保留其他数据库的旧版兼容性。
@@ -88,6 +92,9 @@ func CheckSpec(av *AttributeView) (err error) {
err = ErrSpecTooNew
return
}
+ if av.Spec < MapSpec && av.HasMap() {
+ return ErrMapSpecMismatch
+ }
if av.Spec < LocationSpec && av.HasLocation() {
return ErrLocationSpecMismatch
}
diff --git a/kernel/av/layout.go b/kernel/av/layout.go
index 286cbc49d1..ac638b5d27 100644
--- a/kernel/av/layout.go
+++ b/kernel/av/layout.go
@@ -76,7 +76,7 @@ type BaseInstance struct {
func NewViewBaseInstance(view *View) *BaseInstance {
showIcon, wrapField := true, false
switch view.LayoutType {
- case LayoutTypeTable, LayoutTypeList, LayoutTypeCalendar:
+ case LayoutTypeTable, LayoutTypeList, LayoutTypeCalendar, LayoutTypeMap:
showIcon = view.GetTableLayout().ShowIcon
wrapField = view.GetTableLayout().WrapField
case LayoutTypeGallery:
diff --git a/kernel/av/layout_calendar.go b/kernel/av/layout_calendar.go
index 0f7c1067a5..4f5e66ad9a 100644
--- a/kernel/av/layout_calendar.go
+++ b/kernel/av/layout_calendar.go
@@ -245,6 +245,9 @@ func FilterCalendarRows(calendar *Calendar, dateRange *CalendarRange, targetItem
// TableLayouts 枚举所有暂存的行列布局,确保字段删除、颜色和模板更新覆盖未激活布局。
func (view *View) TableLayouts() []*LayoutTable {
ret := []*LayoutTable{view.Table, view.List}
+ if nil != view.Map {
+ ret = append(ret, view.Map.LayoutTable)
+ }
if nil != view.Calendar {
ret = append(ret, view.Calendar.LayoutTable)
}
diff --git a/kernel/av/layout_list.go b/kernel/av/layout_list.go
index 6e0b784fac..65cd518600 100644
--- a/kernel/av/layout_list.go
+++ b/kernel/av/layout_list.go
@@ -33,6 +33,9 @@ func NewLayoutList() *LayoutList {
// GetTableLayout 返回当前布局使用的行列字段设置。
func (view *View) GetTableLayout() *LayoutTable {
+ if LayoutTypeMap == view.LayoutType {
+ return view.Map.LayoutTable
+ }
if LayoutTypeCalendar == view.LayoutType {
return view.Calendar.LayoutTable
}
@@ -42,7 +45,7 @@ func (view *View) GetTableLayout() *LayoutTable {
return view.Table
}
-// TableFromViewable 获取表格或列表实例的行列数据。
+// TableFromViewable 获取表格、列表、日历或地图实例的行列数据。
func TableFromViewable(viewable Viewable) *Table {
switch instance := viewable.(type) {
case *Table:
@@ -51,12 +54,17 @@ func TableFromViewable(viewable Viewable) *Table {
return instance.Table
case *Calendar:
return instance.Table
+ case *Map:
+ return instance.Table
}
return nil
}
// ValidateListLayouts 校验列表布局的结构,拒绝损坏数据并保留原始文件。
func (attrView *AttributeView) ValidateListLayouts() error {
+ if err := attrView.ValidateMapLayouts(); nil != err {
+ return err
+ }
if err := attrView.ValidateCalendarLayouts(); nil != err {
return err
}
diff --git a/kernel/av/layout_map.go b/kernel/av/layout_map.go
new file mode 100644
index 0000000000..e231849295
--- /dev/null
+++ b/kernel/av/layout_map.go
@@ -0,0 +1,121 @@
+// SiYuan - From thought to insight, with agents
+// Copyright (c) 2020-present, b3log.org
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+package av
+
+import (
+ "fmt"
+ "regexp"
+
+ "github.com/88250/lute/ast"
+)
+
+// MapSettings 只保存本机地图服务引用和位置字段绑定,不保存服务凭据或浏览状态。
+type MapSettings struct {
+ ServiceID string `json:"serviceID"`
+ LocationKeyID string `json:"locationKeyID"`
+ ShowRecordList bool `json:"showRecordList"`
+}
+
+var mapServiceIDPattern = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$`)
+
+// Validate 允许缺失的服务和字段引用,保持跨设备、删除和撤销后的原始绑定。
+func (settings MapSettings) Validate() error {
+ if settings.ServiceID != "" && !mapServiceIDPattern.MatchString(settings.ServiceID) {
+ return fmt.Errorf("invalid map service ID")
+ }
+ if settings.LocationKeyID != "" && !ast.IsNodeIDPattern(settings.LocationKeyID) {
+ return fmt.Errorf("invalid map location field ID")
+ }
+ return nil
+}
+
+// LayoutMap 独立保存记录列表字段顺序和显隐设置,复用表格的筛选、排序及分页。
+type LayoutMap struct {
+ *LayoutTable
+ Settings MapSettings `json:"settings"`
+}
+
+type Map struct {
+ *Table
+ // 保留筛选和排序后的完整行集,供发布权限过滤后重新分页;绝不序列化给客户端。
+ RowsBeforePagination []*TableRow `json:"-"`
+}
+
+func (*Map) GetType() LayoutType { return LayoutTypeMap }
+
+func NewMapView() *View {
+ view := NewTableView()
+ view.Name = GetAttributeViewI18n("map")
+ view.LayoutType = LayoutTypeMap
+ view.Map = &LayoutMap{LayoutTable: view.Table, Settings: MapSettings{ShowRecordList: true}}
+ view.Table = nil
+ return view
+}
+
+// HasMap 包含未激活和分组内暂存的地图配置,防止旧内核重写后丢失设置。
+func (attrView *AttributeView) HasMap() bool {
+ if attrView == nil {
+ return false
+ }
+ var hasMap func(*View) bool
+ hasMap = func(view *View) bool {
+ if view == nil {
+ return false
+ }
+ if view.Map != nil || view.LayoutType == LayoutTypeMap {
+ return true
+ }
+ for _, group := range view.Groups {
+ if hasMap(group) {
+ return true
+ }
+ }
+ return false
+ }
+ for _, view := range attrView.Views {
+ if hasMap(view) {
+ return true
+ }
+ }
+ return false
+}
+
+// ValidateMapLayouts 拒绝损坏或未知版本的地图配置,不修复、不覆盖源文件。
+func (attrView *AttributeView) ValidateMapLayouts() error {
+ var validate func(*View) error
+ validate = func(view *View) error {
+ if view == nil {
+ return nil
+ }
+ if view.LayoutType == LayoutTypeMap && view.Map == nil {
+ return fmt.Errorf("map layout missing in view [%s]", view.ID)
+ }
+ if layout := view.Map; layout != nil {
+ if layout.LayoutTable == nil || layout.BaseLayout == nil || layout.Spec != 0 {
+ return fmt.Errorf("invalid map layout in view [%s]", view.ID)
+ }
+ if err := layout.Settings.Validate(); err != nil {
+ return err
+ }
+ for _, column := range layout.Columns {
+ if column == nil || column.BaseField == nil {
+ return fmt.Errorf("invalid map field in view [%s]", view.ID)
+ }
+ }
+ }
+ for _, group := range view.Groups {
+ if err := validate(group); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+ for _, view := range attrView.Views {
+ if err := validate(view); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/kernel/av/layout_map_test.go b/kernel/av/layout_map_test.go
new file mode 100644
index 0000000000..e3f2d22fd5
--- /dev/null
+++ b/kernel/av/layout_map_test.go
@@ -0,0 +1,76 @@
+package av
+
+import (
+ "bytes"
+ "encoding/json"
+ "testing"
+
+ "github.com/88250/lute/ast"
+)
+
+func TestMapPrivatePaginationBufferIsNotSerialized(t *testing.T) {
+ mapped := &Map{Table: &Table{Rows: []*TableRow{}}, RowsBeforePagination: []*TableRow{{ID: "private-row-buffer"}}}
+ data, err := json.Marshal(mapped)
+ if err != nil || bytes.Contains(data, []byte("private-row-buffer")) {
+ t.Fatalf("private map pagination buffer escaped: %s, %v", data, err)
+ }
+}
+
+func TestMapConditionalSpecAndValidation(t *testing.T) {
+ for _, spec := range []int{PlainTextSpec, RichTextSpec, 10, LocationSpec} {
+ plain := &AttributeView{Spec: spec}
+ UpgradeSpec(plain)
+ if plain.Spec != spec {
+ t.Fatalf("unrelated database upgraded from %d to %d", spec, plain.Spec)
+ }
+ }
+ for _, nested := range []bool{false, true} {
+ view := &View{LayoutType: LayoutTypeTable, Map: &LayoutMap{LayoutTable: NewLayoutTable(),
+ Settings: MapSettings{ServiceID: "missing-service", LocationKeyID: ast.NewNodeID()}}}
+ attrView := &AttributeView{Spec: LocationSpec, Views: []*View{view}}
+ if nested {
+ attrView.Views = []*View{{Groups: []*View{view}}}
+ }
+ if CheckSpec(attrView) != ErrMapSpecMismatch {
+ t.Fatal("stored map settings bypassed the specification gate")
+ }
+ UpgradeSpec(attrView)
+ if attrView.Spec != MapSpec {
+ t.Fatalf("map specification: %d", attrView.Spec)
+ }
+ data, _ := json.Marshal(attrView)
+ if _, err := ParseAttributeViewData("map", data); err != nil {
+ t.Fatal(err)
+ }
+ view.Map.Spec = 1
+ data, _ = json.Marshal(attrView)
+ if _, err := ParseAttributeViewData("map", data); err == nil {
+ t.Fatal("future map layout accepted")
+ }
+ }
+ for _, layout := range []*LayoutMap{nil, {}, {LayoutTable: &LayoutTable{}},
+ {LayoutTable: &LayoutTable{BaseLayout: &BaseLayout{}, Columns: []*ViewTableColumn{nil}}}} {
+ attrView := &AttributeView{Spec: MapSpec, Views: []*View{{LayoutType: LayoutTypeMap, Map: layout}}}
+ if attrView.ValidateMapLayouts() == nil {
+ t.Fatal("corrupt map layout accepted")
+ }
+ }
+ if CheckSpec(&AttributeView{Spec: CurrentSpec + 1}) != ErrSpecTooNew {
+ t.Fatal("future database accepted")
+ }
+}
+
+func TestMapSettingsValidation(t *testing.T) {
+ for _, settings := range []MapSettings{{}, {ServiceID: "map_1-2", LocationKeyID: ast.NewNodeID()},
+ {ServiceID: "missing", ShowRecordList: true}} {
+ if err := settings.Validate(); err != nil {
+ t.Fatal(err)
+ }
+ }
+ for _, settings := range []MapSettings{{ServiceID: "https://maps.invalid/"}, {ServiceID: " key"},
+ {ServiceID: "_key"}, {LocationKeyID: "invalid"}} {
+ if settings.Validate() == nil {
+ t.Fatalf("invalid map settings accepted: %+v", settings)
+ }
+ }
+}
diff --git a/kernel/av/layout_table.go b/kernel/av/layout_table.go
index f5b3ae1245..7362581917 100644
--- a/kernel/av/layout_table.go
+++ b/kernel/av/layout_table.go
@@ -71,6 +71,8 @@ type ViewTableColumn struct {
type Table struct {
*BaseInstance
+ Map *MapSettings `json:"map,omitempty"`
+ MapMarkerScope string `json:"mapMarkerScope,omitempty"` // 地图标记与当前返回页保持一致
Calendar *CalendarSettings `json:"calendar,omitempty"`
CalendarRange *CalendarRange `json:"calendarRange,omitempty"`
CalendarTargetDate *int64 `json:"calendarTargetDate,omitempty"`
diff --git a/kernel/cli/cmd/database.go b/kernel/cli/cmd/database.go
index 650dd9becb..e3735951e0 100644
--- a/kernel/cli/cmd/database.go
+++ b/kernel/cli/cmd/database.go
@@ -485,6 +485,8 @@ func databaseViewBase(viewable av.Viewable) (ret *av.BaseInstance) {
ret = view.BaseInstance
case *av.List:
ret = view.BaseInstance
+ case *av.Map:
+ ret = view.BaseInstance
case *av.Gallery:
ret = view.BaseInstance
case *av.Kanban:
diff --git a/kernel/cli/cmd/database_test.go b/kernel/cli/cmd/database_test.go
index 9836d0286d..93a0162789 100644
--- a/kernel/cli/cmd/database_test.go
+++ b/kernel/cli/cmd/database_test.go
@@ -47,6 +47,9 @@ func TestWriteRenderedDatabaseView(t *testing.T) {
if count := writeRenderedView(&output, attrView, table, false); count != 1 {
t.Fatalf("unexpected rendered item count: %d", count)
}
+ if databaseViewBase(&av.Map{Table: table}) != table.BaseInstance {
+ t.Fatal("map record metadata is missing")
+ }
result := output.String()
if !strings.Contains(result, "ITEM_ID") || !strings.Contains(result, stateKey.Name) ||
!strings.Contains(result, "20260806000000-item001") || !strings.Contains(result, "Todo") {
diff --git a/kernel/conf/map.go b/kernel/conf/map.go
new file mode 100644
index 0000000000..a5bd6281de
--- /dev/null
+++ b/kernel/conf/map.go
@@ -0,0 +1,145 @@
+// SiYuan - From thought to insight, with agents
+// Copyright (c) 2020-present, b3log.org
+// Licensed under the GNU Affero General Public License, version 3 or later.
+
+package conf
+
+import (
+ "encoding/hex"
+ "regexp"
+
+ "github.com/siyuan-note/siyuan/kernel/util"
+)
+
+const (
+ MapProviderAMap = "amap"
+ MapProviderTencent = "tencent"
+ MapProviderBaidu = "baidu"
+ MapProviderOpenFreeMap = "openfreemap"
+)
+
+// Map 将本机地图服务配置保存在 conf.json 中,不参与数据同步。
+// 凭据沿用应用现有的 AES 落盘方式,不提供独立保险库的安全保证。
+type Map struct {
+ Services []*MapService `json:"services"`
+ Revision string `json:"revision"`
+}
+
+type MapService struct {
+ ID string `json:"id"`
+ Name string `json:"name"`
+ Provider string `json:"provider"`
+ APIKey string `json:"apiKey,omitempty"`
+ SecurityCode string `json:"securityCode,omitempty"`
+
+ // 清除凭据后保留存在状态,供公开配置 DTO 使用。
+ hasAPIKey bool
+ hasSecurityCode bool
+}
+
+func NewMap() *Map {
+ return &Map{Services: []*MapService{}}
+}
+
+var mapServiceIDPattern = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$`)
+
+func IsMapServiceID(id string) bool {
+ return mapServiceIDPattern.MatchString(id)
+}
+
+func IsMapProvider(provider string) bool {
+ switch provider {
+ case MapProviderAMap, MapProviderTencent, MapProviderBaidu, MapProviderOpenFreeMap:
+ return true
+ }
+ return false
+}
+
+func (service *MapService) HasAPIKey() bool {
+ return service != nil && (service.APIKey != "" || service.hasAPIKey)
+}
+
+func (service *MapService) HasSecurityCode() bool {
+ return service != nil && (service.SecurityCode != "" || service.hasSecurityCode)
+}
+
+func (service *MapService) Configured() bool {
+ if service == nil {
+ return false
+ }
+ switch service.Provider {
+ case MapProviderAMap:
+ return service.HasAPIKey() && service.HasSecurityCode()
+ case MapProviderTencent, MapProviderBaidu:
+ return service.HasAPIKey()
+ case MapProviderOpenFreeMap:
+ return true
+ }
+ return false
+}
+
+// Masked 返回独立的脱敏副本,保留服务标识和凭据存在状态。
+func (config *Map) Masked() *Map {
+ ret := NewMap()
+ if config == nil {
+ return ret
+ }
+ ret.Revision = config.Revision
+ for _, service := range config.Services {
+ if service == nil {
+ continue
+ }
+ ret.Services = append(ret.Services, &MapService{
+ ID: service.ID, Name: service.Name, Provider: service.Provider,
+ hasAPIKey: service.HasAPIKey(), hasSecurityCode: service.HasSecurityCode(),
+ })
+ }
+ return ret
+}
+
+func (config *Map) EncryptCredentials() {
+ if config == nil {
+ return
+ }
+ for _, service := range config.Services {
+ if service == nil {
+ continue
+ }
+ if service.APIKey != "" {
+ service.APIKey = util.AESEncrypt(service.APIKey)
+ }
+ if service.SecurityCode != "" {
+ service.SecurityCode = util.AESEncrypt(service.SecurityCode)
+ }
+ }
+}
+
+func (config *Map) DecryptCredentials() {
+ if config == nil {
+ return
+ }
+ for _, service := range config.Services {
+ if service != nil {
+ service.APIKey = decryptMapCredential(service.APIKey)
+ service.SecurityCode = decryptMapCredential(service.SecurityCode)
+ }
+ }
+}
+
+// 无法识别的内容保持原样,避免解密失败破坏已保存的凭据。
+func decryptMapCredential(value string) (ret string) {
+ ret = value
+ encrypted, err := hex.DecodeString(value)
+ if err != nil || len(encrypted) == 0 || len(encrypted)%16 != 0 {
+ return
+ }
+ defer func() { _ = recover() }()
+ decrypted := util.AESDecrypt(value)
+ if len(decrypted) == 0 {
+ return
+ }
+ if plain, err := hex.DecodeString(string(decrypted)); err == nil {
+ ret = string(plain)
+ }
+ return
+}
diff --git a/kernel/mcp/tools/database.go b/kernel/mcp/tools/database.go
index 7678913ce1..f0f72896c4 100644
--- a/kernel/mcp/tools/database.go
+++ b/kernel/mcp/tools/database.go
@@ -45,7 +45,7 @@ type databaseToolOutput struct {
var DatabaseTool = &Tool{
Name: "database",
- Description: "Attribute view (database) operations. Every successful call returns {action, data}. Actions: create(parentID, name?, primaryKeyName?, layout=table, keys?, previousID?, nextID?), search(keyword), get(id), render(id, viewID?, query?, page=1, pageSize=50), keys(id), key_add(id, name, type, icon?, prev?), key_update(id, keyID, config), key_set_template(id, keyID, template), key_remove(id, keyID, removeRelationDest?), item_add(id, blockID?, content?, viewID?, groupID?, previousID?, detached?, ignoreDefaultFill?), item_remove(id, itemIDs), item_update(id, keyID, itemID, value), view_get(id, blockID, viewID), view_add(id, blockID, layout?, name?), view_duplicate(id, blockID, viewID, name?), view_remove(id, blockID, viewID), view_update(id, blockID, viewID, name?, icon?, desc?), view_move(id, blockID, viewID, previousID), view_visibility_set(id, blockID, viewIDs), view_filters_set(id, blockID, viewID, revision, filters), view_sorts_set(id, blockID, viewID, revision, sorts), view_group_set(id, blockID, viewID, revision, group), view_layout_set(id, blockID, viewID, revision, layout), unused(), clean(id?). view_get returns metadata, ordered views and the carrier block's visibleViewIDs. view_update preserves omitted fields; empty icon or desc clears it. View metadata and order affect all mirrors; visibility affects only blockID and requires at least one visible view. Read view_get before replacing filters, sorts or visibleViewIDs, preserving unmodified entries. Pass its revision for filter, sort, group and layout changes. An empty filters or sorts array clears that setting. The layout string is validated by the kernel. clean only removes unused databases returned by unused(); referenced databases are rejected.",
+ Description: "Attribute view (database) operations. Every successful call returns {action, data}. Actions: create(parentID, name?, primaryKeyName?, layout=table, keys?, previousID?, nextID?), search(keyword), get(id), render(id, viewID?, query?, page=1, pageSize=50), keys(id), key_add(id, name, type, icon?, prev?), key_update(id, keyID, config), key_set_template(id, keyID, template), key_remove(id, keyID, removeRelationDest?), item_add(id, blockID?, content?, viewID?, groupID?, previousID?, detached?, ignoreDefaultFill?), item_remove(id, itemIDs), item_update(id, keyID, itemID, value), view_get(id, blockID, viewID), view_add(id, blockID, layout?, name?), view_duplicate(id, blockID, viewID, name?), view_remove(id, blockID, viewID), view_update(id, blockID, viewID, name?, icon?, desc?), view_move(id, blockID, viewID, previousID), view_visibility_set(id, blockID, viewIDs), view_filters_set(id, blockID, viewID, revision, filters), view_sorts_set(id, blockID, viewID, revision, sorts), view_group_set(id, blockID, viewID, revision, group), view_layout_set(id, blockID, viewID, revision, layout), unused(), clean(id?). view_get returns metadata, ordered views and the carrier block's visibleViewIDs. view_update preserves omitted fields; empty icon or desc clears it. View metadata and order affect all mirrors; visibility affects only blockID and requires at least one visible view. Read view_get before replacing filters, sorts or visibleViewIDs, preserving unmodified entries. Pass its revision for filter, sort, group and layout changes. An empty filters or sorts array clears that setting. Supported layouts: table, list, gallery, kanban, calendar, map. Map renders only the requested record page; mapMarkerScope is page and rowCount is the filtered total. Map service credentials are device-local and never part of database data. The layout string is validated by the kernel. clean only removes unused databases returned by unused(); referenced databases are rejected.",
EffectScope: EffectScopeLocal,
ActionEffects: map[string]ToolEffects{
"create": {LocalWrite: true},
@@ -402,7 +402,7 @@ func databaseViewFieldIDs(view *av.View) (ret []string) {
return
}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
if layout := view.GetTableLayout(); nil != layout {
for _, column := range layout.Columns {
if nil != column && "" != column.ID {
diff --git a/kernel/mcp/tools/database_test.go b/kernel/mcp/tools/database_test.go
index c3e107591e..b9c5ddff83 100644
--- a/kernel/mcp/tools/database_test.go
+++ b/kernel/mcp/tools/database_test.go
@@ -162,6 +162,9 @@ func TestDatabasePreviousKeyIDDefaultsToViewEnd(t *testing.T) {
func TestDatabaseViewFieldIDsSupportsLayouts(t *testing.T) {
tests := []*av.View{
+ {LayoutType: av.LayoutTypeMap, Map: &av.LayoutMap{LayoutTable: &av.LayoutTable{Columns: []*av.ViewTableColumn{
+ {BaseField: &av.BaseField{ID: "map-1"}}, {BaseField: &av.BaseField{ID: "map-2", Hidden: true}},
+ }}}},
{
LayoutType: av.LayoutTypeList,
List: &av.LayoutList{Columns: []*av.ViewTableColumn{
diff --git a/kernel/mcp/tools/database_view.go b/kernel/mcp/tools/database_view.go
index f2ffb435da..427aa473f5 100644
--- a/kernel/mcp/tools/database_view.go
+++ b/kernel/mcp/tools/database_view.go
@@ -348,8 +348,8 @@ func databaseValidateViewGroup(attrView *av.AttributeView, view *av.View, group
}
return nil
}
- if view.LayoutType == av.LayoutTypeCalendar {
- return errors.New("calendar views do not support grouping")
+ if view.LayoutType == av.LayoutTypeCalendar || view.LayoutType == av.LayoutTypeMap {
+ return fmt.Errorf("%s views do not support grouping", view.LayoutType)
}
key, err := attrView.GetKey(group.Field)
if nil != err || nil == key || key.Type == av.KeyTypeLineNumber || key.Type == av.KeyTypeRollup ||
diff --git a/kernel/mcp/tools/database_view_test.go b/kernel/mcp/tools/database_view_test.go
index 70a5673cc2..9c003462ea 100644
--- a/kernel/mcp/tools/database_view_test.go
+++ b/kernel/mcp/tools/database_view_test.go
@@ -117,6 +117,9 @@ func TestDatabaseViewConfigurationValidation(t *testing.T) {
if err := databaseValidateViewGroup(attrView, &av.View{LayoutType: av.LayoutTypeCalendar}, &av.ViewGroup{Field: "text"}); nil == err {
t.Fatal("calendar grouping accepted")
}
+ if err := databaseValidateViewGroup(attrView, &av.View{LayoutType: av.LayoutTypeMap}, &av.ViewGroup{Field: "text"}); nil == err {
+ t.Fatal("map grouping accepted")
+ }
if err := databaseValidateViewGroup(attrView, &av.View{LayoutType: av.LayoutTypeKanban}, &av.ViewGroup{}); nil == err {
t.Fatal("kanban grouping cleared")
}
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index 7b8e2d0315..9588d6804b 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -959,7 +959,7 @@ func syncAttrViewTableColWidth(operation *Operation) (err error) {
var width string
switch view.LayoutType {
- case av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
return
case av.LayoutTypeTable:
for _, column := range view.Table.Columns {
@@ -1313,7 +1313,7 @@ func setAttrViewCardAspectRatio(operation *Operation) (err error) {
}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
return
case av.LayoutTypeGallery:
view.Gallery.CardAspectRatio = ratio
@@ -1354,7 +1354,7 @@ func setAttrViewCardAspectRatioValue(operation *Operation) (err error) {
}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
return
case av.LayoutTypeGallery:
view.Gallery.CardAspectRatioValue = ratio
@@ -1519,7 +1519,7 @@ func changeAttrViewLayout(attrView *av.AttributeView, view *av.View, newLayout a
}
switch newLayout {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeGallery, av.LayoutTypeKanban:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap, av.LayoutTypeGallery, av.LayoutTypeKanban:
default:
return av.ErrWrongLayoutType
}
@@ -1527,11 +1527,18 @@ func changeAttrViewLayout(attrView *av.AttributeView, view *av.View, newLayout a
oldLayout := view.LayoutType
oldFields := attributeViewFieldIDs(view)
view.LayoutType = newLayout
- if oldLayout == av.LayoutTypeCalendar && view.Name == av.GetAttributeViewI18n("calendar") {
+ if (oldLayout == av.LayoutTypeCalendar || oldLayout == av.LayoutTypeMap) && view.Name == av.GetAttributeViewI18n(string(oldLayout)) {
view.Name = av.GetAttributeViewI18n(string(newLayout))
}
switch newLayout {
+ case av.LayoutTypeMap:
+ if view.Name == av.GetAttributeViewI18n(string(oldLayout)) {
+ view.Name = av.GetAttributeViewI18n("map")
+ }
+ if nil == view.Map {
+ view.Map = newAttributeViewMapLayout(attrView, oldFields)
+ }
case av.LayoutTypeCalendar:
if view.Name == av.GetAttributeViewI18n(string(oldLayout)) {
view.Name = av.GetAttributeViewI18n("calendar")
@@ -1557,7 +1564,7 @@ func changeAttrViewLayout(attrView *av.AttributeView, view *av.View, newLayout a
view.Table = av.NewLayoutTable()
switch oldLayout {
- case av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
for _, id := range oldFields {
view.Table.Columns = append(view.Table.Columns, &av.ViewTableColumn{BaseField: &av.BaseField{ID: id}})
}
@@ -1581,7 +1588,7 @@ func changeAttrViewLayout(attrView *av.AttributeView, view *av.View, newLayout a
view.Gallery = av.NewLayoutGallery()
switch oldLayout {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
for _, id := range oldFields {
view.Gallery.CardFields = append(view.Gallery.CardFields, &av.ViewGalleryCardField{BaseField: &av.BaseField{ID: id}})
}
@@ -1601,7 +1608,7 @@ func changeAttrViewLayout(attrView *av.AttributeView, view *av.View, newLayout a
view.Kanban = av.NewLayoutKanban()
switch oldLayout {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
for _, id := range oldFields {
view.Kanban.Fields = append(view.Kanban.Fields, &av.ViewKanbanField{BaseField: &av.BaseField{ID: id}})
}
@@ -1641,7 +1648,7 @@ func setAttrViewWrapField(operation *Operation) (err error) {
allFieldWrap := operation.Data.(bool)
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
view.GetTableLayout().WrapField = allFieldWrap
for _, col := range view.GetTableLayout().Columns {
col.Wrap = allFieldWrap
@@ -1682,7 +1689,7 @@ func setAttrViewShowIcon(operation *Operation) (err error) {
}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
view.GetTableLayout().ShowIcon = operation.Data.(bool)
case av.LayoutTypeGallery:
view.Gallery.ShowIcon = operation.Data.(bool)
@@ -1714,7 +1721,7 @@ func setAttrViewFitImage(operation *Operation) (err error) {
}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
return
case av.LayoutTypeGallery:
view.Gallery.FitImage = operation.Data.(bool)
@@ -1762,7 +1769,7 @@ func setAttrViewDisplayFieldName(operation *Operation) (err error) {
}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
return
case av.LayoutTypeGallery:
view.Gallery.DisplayFieldName = operation.Data.(bool)
@@ -1786,7 +1793,7 @@ func setAttrViewDisplayEmptyFields(operation *Operation) (err error) {
}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
return
case av.LayoutTypeGallery:
view.Gallery.DisplayEmptyFields = operation.Data.(bool)
@@ -1810,7 +1817,7 @@ func setAttrViewFillColBackgroundColor(operation *Operation) (err error) {
}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
return
case av.LayoutTypeGallery:
return
@@ -1851,7 +1858,7 @@ func setAttrViewCardSize(operation *Operation) (err error) {
}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
return
case av.LayoutTypeGallery:
view.Gallery.CardSize = size
@@ -1893,7 +1900,7 @@ func setAttrViewCardWidth(operation *Operation) (err error) {
}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
return
case av.LayoutTypeGallery:
view.Gallery.CardWidth = width
@@ -2034,7 +2041,7 @@ func setAttrViewCoverFromAssetKeyID(operation *Operation) (err error) {
}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
return
case av.LayoutTypeGallery:
view.Gallery.CoverFromAssetKeyID = operation.KeyID
@@ -2066,7 +2073,7 @@ func setAttrViewCoverFrom(operation *Operation) (err error) {
}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
return
case av.LayoutTypeGallery:
view.Gallery.CoverFrom = av.CoverFrom(operation.Data.(float64))
@@ -5058,6 +5065,8 @@ func (tx *Transaction) doDuplicateAttrViewView(operation *Operation) (ret *TxErr
var view *av.View
switch masterView.LayoutType {
+ case av.LayoutTypeMap:
+ view = av.NewMapView()
case av.LayoutTypeCalendar:
view = av.NewCalendarView()
case av.LayoutTypeList:
@@ -5155,6 +5164,9 @@ func addAttrViewViewNamed(avID, viewID, blockID, name string, layout av.LayoutTy
var view *av.View
switch layout {
+ case av.LayoutTypeMap:
+ view = av.NewMapView()
+ view.Map = newAttributeViewMapLayout(attrView, attributeViewFieldIDs(firstView))
case av.LayoutTypeCalendar:
view = av.NewCalendarView()
view.Calendar = newAttributeViewCalendarLayout(attrView, attributeViewFieldIDs(firstView))
@@ -5164,7 +5176,7 @@ func addAttrViewViewNamed(avID, viewID, blockID, name string, layout av.LayoutTy
case av.LayoutTypeTable:
view = av.NewTableView()
switch firstView.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
for _, col := range firstView.GetTableLayout().Columns {
view.Table.Columns = append(view.Table.Columns, &av.ViewTableColumn{
BaseField: &av.BaseField{ID: col.ID}, Width: col.Width, Align: col.Align,
@@ -5182,7 +5194,7 @@ func addAttrViewViewNamed(avID, viewID, blockID, name string, layout av.LayoutTy
case av.LayoutTypeGallery:
view = av.NewGalleryView()
switch firstView.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
for _, col := range firstView.GetTableLayout().Columns {
view.Gallery.CardFields = append(view.Gallery.CardFields, &av.ViewGalleryCardField{BaseField: &av.BaseField{ID: col.ID}})
}
@@ -5198,7 +5210,7 @@ func addAttrViewViewNamed(avID, viewID, blockID, name string, layout av.LayoutTy
case av.LayoutTypeKanban:
view = av.NewKanbanView()
switch firstView.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
for _, col := range firstView.GetTableLayout().Columns {
view.Kanban.Fields = append(view.Kanban.Fields, &av.ViewKanbanField{BaseField: &av.BaseField{ID: col.ID}})
}
@@ -6074,7 +6086,7 @@ func setAttributeViewColumnCalc(operation *Operation) (err error) {
calc := &av.FieldCalc{}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
if err = gulu.JSON.UnmarshalJSON(data, calc); err != nil {
return
}
@@ -6808,7 +6820,8 @@ func duplicateAttributeViewKey(operation *Operation) (err error) {
}
cloned.ID = copyKey.ID
if layout == view.List && av.LayoutTypeList != view.LayoutType ||
- view.Calendar != nil && layout == view.Calendar.LayoutTable && av.LayoutTypeCalendar != view.LayoutType {
+ view.Calendar != nil && layout == view.Calendar.LayoutTable && av.LayoutTypeCalendar != view.LayoutType ||
+ view.Map != nil && layout == view.Map.LayoutTable && av.LayoutTypeMap != view.LayoutType {
cloned.Hidden = true
}
layout.Columns = slices.Insert(layout.Columns, i+1, cloned)
@@ -6986,7 +6999,7 @@ func setAttributeViewColWrap(operation *Operation) (err error) {
newWrap := operation.Data.(bool)
allFieldWrap := true
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
for _, column := range view.GetTableLayout().Columns {
if column.ID == operation.ID {
column.Wrap = newWrap
@@ -7065,7 +7078,7 @@ func setAttributeViewFieldsHidden(attrView *av.AttributeView, keyID string, view
if nil == view {
return fmt.Errorf("view [%s] not found", viewID)
}
- if hidden && (av.LayoutTypeList == view.LayoutType || av.LayoutTypeCalendar == view.LayoutType) {
+ if hidden && (av.LayoutTypeList == view.LayoutType || av.LayoutTypeCalendar == view.LayoutType || av.LayoutTypeMap == view.LayoutType) {
key, keyErr := attrView.GetKey(keyID)
if nil != keyErr {
return keyErr
@@ -7092,7 +7105,7 @@ func setAttributeViewFieldsHidden(attrView *av.AttributeView, keyID string, view
func getAttributeViewField(view *av.View, keyID string) (ret *av.BaseField) {
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
if nil == view.GetTableLayout() {
return
}
@@ -7371,7 +7384,7 @@ func SortAttributeViewViewKey(avID, blockID, keyID, previousKeyID string) (err e
var curIndex, previousIndex int
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
var col *av.ViewTableColumn
for i, column := range view.GetTableLayout().Columns {
if column.ID == keyID {
@@ -7584,6 +7597,18 @@ func addAttributeViewKey(attrView *av.AttributeView, currentView *av.View, key *
attrView.KeyValues = append(attrView.KeyValues, &av.KeyValues{Key: key})
for _, view := range attrView.Views {
+ if nil != view.Map {
+ hidden := nil == currentView || currentView.ID != view.ID || av.LayoutTypeMap != currentView.LayoutType
+ column := &av.ViewTableColumn{BaseField: &av.BaseField{ID: key.ID, Hidden: hidden, Wrap: view.Map.WrapField}}
+ index := len(view.Map.Columns)
+ for i, field := range view.Map.Columns {
+ if field.ID == previousKeyID {
+ index = i + 1
+ break
+ }
+ }
+ view.Map.Columns = slices.Insert(view.Map.Columns, index, column)
+ }
if nil != view.Calendar {
hidden := nil == currentView || currentView.ID != view.ID || av.LayoutTypeCalendar != currentView.LayoutType
column := &av.ViewTableColumn{BaseField: &av.BaseField{ID: key.ID, Hidden: hidden, Wrap: view.Calendar.WrapField}}
diff --git a/kernel/model/attribute_view_create.go b/kernel/model/attribute_view_create.go
index 9c09c79825..caa3ebab24 100644
--- a/kernel/model/attribute_view_create.go
+++ b/kernel/model/attribute_view_create.go
@@ -63,7 +63,7 @@ func CreateAttributeViewDatabase(parentID, previousID, nextID, name, primaryKeyN
layout = av.LayoutTypeTable
}
switch layout {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeGallery, av.LayoutTypeKanban:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap, av.LayoutTypeGallery, av.LayoutTypeKanban:
default:
return nil, av.ErrWrongLayoutType
}
diff --git a/kernel/model/attribute_view_list.go b/kernel/model/attribute_view_list.go
index bccec01e8c..6e41086bb3 100644
--- a/kernel/model/attribute_view_list.go
+++ b/kernel/model/attribute_view_list.go
@@ -26,6 +26,13 @@ func cloneAttributeViewLayouts(target, source *av.View) (err error) {
}
target.List.ID = ast.NewNodeID()
}
+ if nil != source.Map {
+ target.Map = &av.LayoutMap{}
+ if err = copier.CopyWithOption(target.Map, source.Map, copier.Option{DeepCopy: true}); nil != err {
+ return
+ }
+ target.Map.ID = ast.NewNodeID()
+ }
if nil != source.Calendar {
target.Calendar = &av.LayoutCalendar{}
if err = copier.CopyWithOption(target.Calendar, source.Calendar, copier.Option{DeepCopy: true}); nil != err {
@@ -53,7 +60,7 @@ func cloneAttributeViewLayouts(target, source *av.View) (err error) {
// attributeViewFieldIDs 按当前布局的字段顺序返回字段 ID。
func attributeViewFieldIDs(view *av.View) (ret []string) {
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
if layout := view.GetTableLayout(); nil != layout {
for _, column := range layout.Columns {
ret = append(ret, column.ID)
diff --git a/kernel/model/attribute_view_map.go b/kernel/model/attribute_view_map.go
new file mode 100644
index 0000000000..8b228fd9c5
--- /dev/null
+++ b/kernel/model/attribute_view_map.go
@@ -0,0 +1,266 @@
+// SiYuan - From thought to insight, with agents
+// Copyright (c) 2020-present, b3log.org
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+package model
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "text/template"
+ "text/template/parse"
+
+ "github.com/siyuan-note/siyuan/kernel/av"
+ "github.com/siyuan-note/siyuan/kernel/filesys"
+ "github.com/siyuan-note/siyuan/kernel/sql"
+)
+
+func newAttributeViewMapLayout(attrView *av.AttributeView, fieldIDs []string) *av.LayoutMap {
+ return &av.LayoutMap{
+ LayoutTable: newAttributeViewListLayout(attrView, fieldIDs),
+ Settings: av.MapSettings{ShowRecordList: true},
+ }
+}
+
+func (filter *attributeViewPublishAccessFilter) filterMapTemplateValue(attrView *av.AttributeView, itemID string, baseValue *av.BaseValue) {
+ if nil == baseValue || nil == baseValue.Value {
+ return
+ }
+ var key *av.Key
+ if nil != attrView {
+ key, _ = attrView.GetKey(baseValue.Value.KeyID)
+ }
+ value := baseValue.Value
+ if av.KeyTypeTemplate == value.Type && nil != value.Template &&
+ (!filter.checkKeyDependencies(attrView, key, itemID, map[string]bool{}) ||
+ !filter.checkMapTemplateDependencySyntax(attrView, key, itemID, map[string]bool{})) {
+ // 地图模板在发布权限过滤前生成,私有依赖的结果只能在响应副本中清空。
+ value = cloneAttributeViewSensitiveValue(value)
+ value.Template = &av.ValueTemplate{}
+ value.RenderedContent = ""
+ }
+ if "" != value.RenderedContent {
+ var displayKey *av.Key
+ if nil != key {
+ clonedKey := *key
+ clonedKey.Type = av.KeyTypeText // 显示结果必须按 RenderTemplate 而非模板字段的 Template 分析。
+ displayKey = &clonedKey
+ }
+ if !filter.checkRenderTemplateDependencies(attrView, displayKey, itemID) ||
+ !filter.checkMapTemplateDependencySyntax(attrView, displayKey, itemID, map[string]bool{}) {
+ // 显示模板使用相同的证明边界,但不得清空原始标量、坐标或其他字段值。
+ value = cloneAttributeViewSensitiveValue(value)
+ value.RenderedContent = ""
+ }
+ }
+ baseValue.Value = value
+}
+
+func (filter *attributeViewPublishAccessFilter) checkMapTemplateDependencySyntax(attrView *av.AttributeView, key *av.Key,
+ itemID string, visited map[string]bool) bool {
+ if nil == attrView || nil == key {
+ return false
+ }
+ visitKey := attrView.ID + "\x00" + key.ID + "\x00" + itemID
+ if visited[visitKey] {
+ return true
+ }
+ visited[visitKey] = true
+ templateContent := key.RenderTemplate
+ if av.KeyTypeTemplate == key.Type {
+ templateContent = key.Template
+ }
+ if "" != templateContent {
+ if !mapTemplateDependencySyntaxIsSupported(templateContent) {
+ return false
+ }
+ for _, dependency := range sql.GetTemplateKeyRelevantKeys(attrView, key) {
+ if dependency.ID != key.ID &&
+ (!filter.checkKeyDependencies(attrView, dependency, itemID, map[string]bool{}) ||
+ !filter.checkMapTemplateDependencySyntax(attrView, dependency, itemID, visited)) {
+ return false
+ }
+ }
+ }
+ if av.KeyTypeRollup == key.Type {
+ targetAttrView, targetKey, targetItemIDs, ok := filter.getRollupTarget(attrView, key, itemID)
+ if ok {
+ for _, targetItemID := range targetItemIDs {
+ if !filter.checkMapTemplateDependencySyntax(targetAttrView, targetKey, targetItemID, visited) {
+ return false
+ }
+ }
+ }
+ }
+ return true
+}
+
+// 仅地图响应采用保守检查;共享依赖提取器尚未覆盖的语法不能用于证明模板可公开。
+func mapTemplateDependencySyntaxIsSupported(content string) bool {
+ funcs := filesys.BuiltInTemplateFuncs()
+ sql.SQLTemplateFuncs(&funcs)
+ tpl, err := template.New("").Delims(".action{", "}").Funcs(funcs).Parse(content)
+ if nil != err {
+ return false
+ }
+ var supported func(parse.Node) bool
+ supported = func(node parse.Node) bool {
+ switch n := node.(type) {
+ case *parse.ListNode:
+ for _, child := range n.Nodes {
+ if !supported(child) {
+ return false
+ }
+ }
+ case *parse.ActionNode:
+ return supported(n.Pipe)
+ case *parse.PipeNode:
+ if 0 < len(n.Decl) {
+ return false
+ }
+ for _, command := range n.Cmds {
+ if !supported(command) {
+ return false
+ }
+ }
+ case *parse.CommandNode:
+ staticIndex := false
+ if 3 <= len(n.Args) && "index" == n.Args[0].String() {
+ _, staticIndex = n.Args[2].(*parse.StringNode)
+ }
+ if 2 <= len(n.Args) && "index" == n.Args[0].String() {
+ if field, ok := n.Args[1].(*parse.FieldNode); ok && 0 < len(field.Ident) &&
+ ("id_mod" == field.Ident[0] || "id_mod_raw" == field.Ident[0]) &&
+ (1 != len(field.Ident) || !staticIndex) {
+ return false
+ }
+ }
+ for i, arg := range n.Args {
+ if 1 == i && staticIndex && (".id_mod" == arg.String() || ".id_mod_raw" == arg.String()) {
+ continue
+ }
+ if !supported(arg) {
+ return false
+ }
+ }
+ case *parse.FieldNode:
+ if 1 == len(n.Ident) && ("id_mod" == n.Ident[0] || "id_mod_raw" == n.Ident[0]) {
+ return false
+ }
+ case *parse.IdentifierNode:
+ switch n.Ident {
+ case "index", "len", "printf", "print", "println", "eq", "ne", "lt", "le", "gt", "ge", "and", "or", "not", "html", "js", "urlquery":
+ default:
+ return false
+ }
+ case *parse.TextNode, *parse.StringNode, *parse.NumberNode, *parse.BoolNode, *parse.NilNode:
+ default:
+ // 分支、链式表达式、变量别名和整行访问均可能隐藏共享提取器未识别的依赖。
+ return false
+ }
+ return true
+ }
+ return supported(tpl.Tree.Root)
+}
+
+func shouldPushAttributeViewTemplateErrors(layout av.LayoutType, writable bool) bool {
+ // 公开地图的模板先于权限过滤执行,不广播其中可能包含私有条目内容的错误。
+ return layout != av.LayoutTypeMap || writable
+}
+
+func (tx *Transaction) doSetAttrViewMap(operation *Operation) *TxErr {
+ if err := setAttrViewMap(operation); err != nil {
+ return &TxErr{code: TxErrHandleAttributeView, id: operation.AvID, msg: err.Error()}
+ }
+ return nil
+}
+
+func setAttrViewMap(operation *Operation) error {
+ if operation.Data == nil {
+ return fmt.Errorf("map settings are required")
+ }
+ data, err := json.Marshal(operation.Data)
+ if err != nil {
+ return err
+ }
+ // 完整设置必须包含三个字段,拒绝凭据和未知字段进入数据库事务。
+ var settings struct {
+ ServiceID *string `json:"serviceID"`
+ LocationKeyID *string `json:"locationKeyID"`
+ ShowRecordList *bool `json:"showRecordList"`
+ }
+ decoder := json.NewDecoder(bytes.NewReader(data))
+ decoder.DisallowUnknownFields()
+ if err = decoder.Decode(&settings); err != nil {
+ return err
+ }
+ if settings.ServiceID == nil || settings.LocationKeyID == nil || settings.ShowRecordList == nil {
+ return fmt.Errorf("complete map settings are required")
+ }
+ next := av.MapSettings{ServiceID: *settings.ServiceID, LocationKeyID: *settings.LocationKeyID,
+ ShowRecordList: *settings.ShowRecordList}
+ if err = next.Validate(); err != nil {
+ return err
+ }
+ attrView, err := av.ParseAttributeView(operation.AvID)
+ if err != nil {
+ return err
+ }
+ view, err := getAttrViewOperationView(attrView, operation)
+ if err != nil {
+ return err
+ }
+ if view.LayoutType != av.LayoutTypeMap || view.Map == nil {
+ return av.ErrWrongLayoutType
+ }
+ view.Map.Settings = next
+ return av.SaveAttributeView(attrView)
+}
+
+// FilterAttributeViewMapForPublish 在完整结果上过滤访问权限,再计算可访问总数和分页定位。
+// filter 同时负责行权限和关联字段脱敏,不把未授权条目的数量、位置或统计结果带入响应。
+func FilterAttributeViewMapForPublish(mapped *av.Map, page, pageSize int, target *AttributeViewRenderTarget,
+ filter func(av.Viewable) av.Viewable) (av.Viewable, *AttributeViewRenderTarget) {
+ if mapped.RowsBeforePagination != nil {
+ mapped.Rows = mapped.RowsBeforePagination
+ }
+ mapped.RowsBeforePagination = nil
+ filtered := filter(mapped)
+ mapped, ok := filtered.(*av.Map)
+ if !ok {
+ return filtered, nil
+ }
+ clearPublishedAttributeViewMapCalculations(mapped)
+ mapped.RowCount = len(mapped.Rows)
+ index := findAttributeViewTargetIndex(targetItemID(target), len(mapped.Rows), func(index int) string {
+ return mapped.Rows[index].ID
+ })
+ start, end := getAttributeViewRenderRange(page, pageSize, index, mapped.PageSize, len(mapped.Rows))
+ mapped.Rows = mapped.Rows[start:end]
+ if target == nil {
+ return mapped, nil
+ }
+ visibleTarget := &AttributeViewRenderTarget{Status: "itemNotFound", ItemID: target.ItemID}
+ if index >= 0 {
+ setAttributeViewRenderTarget(visibleTarget, "", index, start, mapped.PageSize)
+ }
+ return mapped, visibleTarget
+}
+
+// 发布地图不返回权限过滤前生成的聚合和条件颜色,避免泄露受限行或其关联内容。
+func clearPublishedAttributeViewMapCalculations(mapped *av.Map) {
+ for _, column := range mapped.Columns {
+ if column != nil && column.BaseInstanceField != nil {
+ column.Calc = nil
+ }
+ }
+ if mapped.BaseInstance != nil {
+ mapped.GroupCalc = nil
+ }
+ for _, row := range mapped.Rows {
+ if row != nil {
+ row.ConditionalColors = nil
+ }
+ }
+}
diff --git a/kernel/model/attribute_view_map_fts5_test.go b/kernel/model/attribute_view_map_fts5_test.go
new file mode 100644
index 0000000000..54e559b8ed
--- /dev/null
+++ b/kernel/model/attribute_view_map_fts5_test.go
@@ -0,0 +1,100 @@
+//go:build fts5
+
+package model
+
+import (
+ "bytes"
+ "os"
+ "path/filepath"
+ "testing"
+
+ "github.com/88250/lute/ast"
+ "github.com/siyuan-note/siyuan/kernel/av"
+ "github.com/siyuan-note/siyuan/kernel/cache"
+ "github.com/siyuan-note/siyuan/kernel/util"
+)
+
+func TestAttributeViewMapSettingsUndoAndEncryptedReplay(t *testing.T) {
+ for _, encrypted := range []bool{false, true} {
+ name := "ordinary"
+ if encrypted {
+ name = "encrypted"
+ }
+ t.Run(name, func(t *testing.T) {
+ _, database, _, _ := setupAttributeViewItemsTest(t, false)
+ util.AttrViewLangs["en"]["map"] = "Map"
+ view := database.Views[0]
+ if err := changeAttrViewLayout(database, view, av.LayoutTypeMap); err != nil {
+ t.Fatal(err)
+ }
+ boxID := ""
+ plainPath := filepath.Join(util.DataDir, "storage", "av", database.ID+".json")
+ if encrypted {
+ boxID = ast.NewNodeID()
+ markRuntimeEncryptedBox(boxID)
+ setDEKForTest(boxID, bytes.Repeat([]byte{0x61}, 32))
+ av.SetAVBoxID(database.ID, boxID)
+ t.Cleanup(func() {
+ av.SetAVBoxID(database.ID, "")
+ forgetRuntimeEncryptedBox(boxID)
+ encryptedBoxLifecycles.Delete(boxID)
+ cachedDEKsLock.Lock()
+ delete(cachedDEKs, boxID)
+ cachedDEKsLock.Unlock()
+ })
+ }
+ if err := av.SaveAttributeView(database); err != nil {
+ t.Fatal(err)
+ }
+ if encrypted {
+ if err := os.Remove(plainPath); err != nil {
+ t.Fatal(err)
+ }
+ }
+ before := view.Map.Settings
+ after := av.MapSettings{ServiceID: "missing-service", LocationKeyID: ast.NewNodeID(), ShowRecordList: false}
+ operation := func(settings av.MapSettings) *Operation {
+ return &Operation{Action: "setAttrViewMap", AvID: database.ID, ViewID: view.ID, Data: settings}
+ }
+ tx := &Transaction{DoOperations: []*Operation{operation(after)}, UndoOperations: []*Operation{operation(before)}, fromAPI: true}
+ if err := PerformTxSync(tx); err != nil {
+ t.Fatal(err)
+ }
+ for _, replay := range []struct {
+ operations []*Operation
+ settings av.MapSettings
+ }{{tx.DoOperations, after}, {tx.UndoOperations, before}, {tx.DoOperations, after}} {
+ if err := PerformTxSync(&Transaction{DoOperations: cloneOperations(replay.operations), isReplay: true}); err != nil {
+ t.Fatal(err)
+ }
+ cache.ClearAVCache()
+ stored, err := av.ParseAttributeViewForIndexInBox(database.ID, boxID)
+ if err != nil || stored.Spec != av.MapSpec || stored.Views[0].Map.Settings != replay.settings {
+ t.Fatalf("map settings replay: %v", err)
+ }
+ }
+ if encrypted {
+ path := filepath.Join(util.DataDir, boxID, "storage", "av", database.ID+".json")
+ ciphertext, err := os.ReadFile(path)
+ if err != nil || !util.IsCiphertext(ciphertext) {
+ t.Fatal("map settings did not retain encrypted storage")
+ }
+ if _, err = os.Stat(plainPath); !os.IsNotExist(err) {
+ t.Fatal("map settings recreated plaintext storage")
+ }
+ ciphertext[len(ciphertext)-1] ^= 1
+ if err = os.WriteFile(path, ciphertext, 0644); err != nil {
+ t.Fatal(err)
+ }
+ cache.ClearAVCache()
+ if err = PerformTxSync(&Transaction{DoOperations: cloneOperations(tx.UndoOperations), isReplay: true}); err == nil {
+ t.Fatal("map replay accepted unauthenticated data")
+ }
+ preserved, err := os.ReadFile(path)
+ if err != nil || !bytes.Equal(ciphertext, preserved) {
+ t.Fatal("failed map replay modified ciphertext")
+ }
+ }
+ })
+ }
+}
diff --git a/kernel/model/attribute_view_map_publish_test.go b/kernel/model/attribute_view_map_publish_test.go
new file mode 100644
index 0000000000..e617827f3a
--- /dev/null
+++ b/kernel/model/attribute_view_map_publish_test.go
@@ -0,0 +1,173 @@
+package model
+
+import (
+ "net/http"
+ "net/http/httptest"
+ "path/filepath"
+ "testing"
+
+ "github.com/gin-gonic/gin"
+ "github.com/siyuan-note/siyuan/kernel/av"
+ "github.com/siyuan-note/siyuan/kernel/treenode"
+ "github.com/siyuan-note/siyuan/kernel/util"
+)
+
+func TestAttributeViewMapPublishExcludesDeniedBoundRows(t *testing.T) {
+ const boxID, documentID = "20261009000000-box0001", "20261009000001-doc0001"
+ oldDataDir, oldBlockTreePath := util.DataDir, util.BlockTreeDBPath
+ util.DataDir = t.TempDir()
+ util.BlockTreeDBPath = filepath.Join(util.DataDir, "blocktree.db")
+ treenode.InitBlockTree(true)
+ invalidateEncryptedPublishAccessCache()
+ t.Cleanup(func() {
+ treenode.CloseDatabase()
+ util.DataDir, util.BlockTreeDBPath = oldDataDir, oldBlockTreePath
+ invalidateEncryptedPublishAccessCache()
+ if oldBlockTreePath != "" {
+ treenode.InitBlockTree(false)
+ }
+ })
+ tree := treenode.NewTree(boxID, "/"+documentID+".sy", "/Private", "Private")
+ treenode.UpsertBlockTree(tree)
+ row := func(id string, detached bool) *av.TableRow {
+ return &av.TableRow{ID: id, Cells: []*av.TableCell{{BaseValue: &av.BaseValue{
+ ValueType: av.KeyTypeBlock, Value: &av.Value{Type: av.KeyTypeBlock, IsDetached: detached,
+ Block: &av.ValueBlock{ID: documentID, Content: id}},
+ }}}}
+ }
+ mapped := &av.Map{Table: &av.Table{BaseInstance: &av.BaseInstance{},
+ Rows: []*av.TableRow{row("private", false), row("public", true)}, RowCount: 120}}
+ originalCalc := &av.FieldCalc{Operator: av.CalcOperatorCountAll, Result: &av.Value{Number: &av.ValueNumber{Content: 120, IsNotEmpty: true}}}
+ mapped.Columns = []*av.TableColumn{{BaseInstanceField: &av.BaseInstanceField{Calc: originalCalc}}}
+ mapped.GroupCalc = &av.GroupCalc{FieldCalc: originalCalc}
+ mapped.Rows[1].ConditionalColors = &av.ItemConditionalColors{Background: &av.ValueSelect{Color: "1"}}
+ context, _ := gin.CreateTestContext(httptest.NewRecorder())
+ context.Request = httptest.NewRequest(http.MethodGet, "/", nil)
+ filtered := FilterViewByPublishAccess(context, PublishAccess{{ID: documentID, Disable: true}}, mapped).(*av.Map)
+ if filtered.RowCount != 1 || len(filtered.Rows) != 1 || filtered.Rows[0].ID != "public" {
+ t.Fatal("map publish returned a denied row or its original count")
+ }
+ if filtered.Columns[0].Calc != nil || filtered.GroupCalc != nil || filtered.Rows[0].ConditionalColors != nil || originalCalc.Result.Number.Content != 120 {
+ t.Fatal("public map retained pre-filter derived data or changed the source calculation")
+ }
+}
+
+func TestAttributeViewMapPublishTemplateSyntax(t *testing.T) {
+ for _, test := range []struct {
+ content string
+ want bool
+ }{
+ {"constant result", true},
+ {".action{.Label}", true},
+ {".action{index .Secret_raw.Relation.BlockIDs 0}", true},
+ {`.action{index .id_mod "key"}`, true},
+ {`.action{index .id_mod_raw "key"}`, true},
+ {`.action{index . "Label"}`, false},
+ {`.action{index . "id_mod_raw"}`, false},
+ {`.action{printf "%s" .Label}`, true},
+ {".action{range .Secret_raw.Relation.BlockIDs}.action{.}.action{end}", false},
+ {".action{if .Secret}.action{.Secret}.action{end}", false},
+ {".action{with .Secret_raw}.action{.Relation}.action{end}", false},
+ {`.action{(index .id_mod_raw "key").Relation.BlockIDs}`, false},
+ {`.action{index .id_mod_raw.secret.Relation.Contents "other"}`, false},
+ {`.action{index .id_mod.secret "other"}`, false},
+ {".action{index .id_mod .Selector}", false},
+ {".action{.}", false},
+ {".action{$.Secret}", false},
+ {".action{.id_mod_raw}", false},
+ {`.action{sql "SELECT content FROM blocks"}`, false},
+ {`.action{getHPathByID "private-block"}`, false},
+ } {
+ if got := mapTemplateDependencySyntaxIsSupported(test.content); got != test.want {
+ t.Errorf("template %q supported=%t, want %t", test.content, got, test.want)
+ }
+ }
+}
+
+func TestAttributeViewMapPublishSuppressesTemplateErrors(t *testing.T) {
+ for _, layout := range []av.LayoutType{av.LayoutTypeMap, av.LayoutTypeTable, av.LayoutTypeList,
+ av.LayoutTypeCalendar, av.LayoutTypeGallery, av.LayoutTypeKanban} {
+ for _, writable := range []bool{false, true} {
+ want := layout != av.LayoutTypeMap || writable
+ if got := shouldPushAttributeViewTemplateErrors(layout, writable); got != want {
+ t.Errorf("layout=%s writable=%t push=%t, want %t", layout, writable, got, want)
+ }
+ }
+ }
+}
+
+func TestAttributeViewMapPublishTemplateRedactionClonesOnlyMapResponse(t *testing.T) {
+ key := &av.Key{ID: "template", Type: av.KeyTypeTemplate, Template: ".action{.}"}
+ source := &av.Value{KeyID: key.ID, BlockID: "item", Type: av.KeyTypeTemplate,
+ Template: &av.ValueTemplate{Content: "private derived value"}}
+ database := &av.AttributeView{ID: "database", KeyValues: []*av.KeyValues{{Key: key, Values: []*av.Value{source}}}}
+ filter := &attributeViewPublishAccessFilter{}
+ for _, layout := range []av.LayoutType{av.LayoutTypeTable, av.LayoutTypeCalendar, av.LayoutTypeMap} {
+ table := &av.Table{BaseInstance: &av.BaseInstance{}, Rows: []*av.TableRow{{ID: "item", Cells: []*av.TableCell{{BaseValue: &av.BaseValue{Value: source}}}}}}
+ var viewable av.Viewable = table
+ if layout == av.LayoutTypeCalendar {
+ viewable = &av.Calendar{Table: table}
+ } else if layout == av.LayoutTypeMap {
+ viewable = &av.Map{Table: table}
+ }
+ filter.filterViewable(database, viewable)
+ got := table.Rows[0].Cells[0].Value
+ if layout == av.LayoutTypeMap {
+ if got == source || got.Template.Content != "" {
+ t.Fatal("map redaction did not use a cleared response-only clone")
+ }
+ } else if got != source || got.Template.Content != "private derived value" {
+ t.Fatal("map-only redaction changed a pre-existing layout")
+ }
+ }
+ if source.Template.Content != "private derived value" {
+ t.Fatal("map template redaction mutated source value")
+ }
+}
+
+func TestAttributeViewMapPublishDisplayTemplatePreservesStoredValues(t *testing.T) {
+ latitude, longitude := 0.0, 120.0
+ for _, typ := range []av.KeyType{av.KeyTypeText, av.KeyTypeLocation, av.KeyTypeTemplate} {
+ key := &av.Key{ID: "display", Type: typ, Template: "public computed", RenderTemplate: `.action{getHPathByID "private-block"}`}
+ source := &av.Value{KeyID: key.ID, BlockID: "item", Type: typ, RenderedContent: "private path", HasRenderTemplate: true}
+ if typ == av.KeyTypeText {
+ source.Text = &av.ValueText{Content: "public scalar"}
+ } else if typ == av.KeyTypeLocation {
+ source.Location = &av.ValueLocation{Name: "public location", Latitude: &latitude, Longitude: &longitude}
+ } else {
+ source.Template = &av.ValueTemplate{Content: "public computed"}
+ }
+ database := &av.AttributeView{ID: "database", KeyValues: []*av.KeyValues{{Key: key, Values: []*av.Value{source}}}}
+ filter := &attributeViewPublishAccessFilter{}
+ for _, mapped := range []bool{false, true} {
+ table := &av.Table{BaseInstance: &av.BaseInstance{}, Rows: []*av.TableRow{{ID: "item", Cells: []*av.TableCell{{BaseValue: &av.BaseValue{Value: source}}}}}}
+ var viewable av.Viewable = table
+ if mapped {
+ viewable = &av.Map{Table: table}
+ }
+ filter.filterViewable(database, viewable)
+ got := table.Rows[0].Cells[0].Value
+ if mapped {
+ if got == source || got.RenderedContent != "" || !got.HasRenderTemplate {
+ t.Fatal("display template did not use a cleared response clone")
+ }
+ if typ == av.KeyTypeText && got.Text.Content != "public scalar" || typ == av.KeyTypeLocation &&
+ (got.Location.Name != "public location" || *got.Location.Latitude != latitude || *got.Location.Longitude != longitude) ||
+ typ == av.KeyTypeTemplate && got.Template.Content != "public computed" {
+ t.Fatal("display-template redaction changed the stored scalar or coordinates")
+ }
+ } else if got != source || got.RenderedContent != "private path" {
+ t.Fatal("map display-template policy changed the ordinary table")
+ }
+ }
+ if source.RenderedContent != "private path" {
+ t.Fatal("display-template redaction mutated the original value")
+ }
+ key.RenderTemplate = "public constant"
+ value := &av.BaseValue{Value: source}
+ filter.filterMapTemplateValue(database, "item", value)
+ if value.Value != source {
+ t.Fatal("a provably public display template was unnecessarily cloned or cleared")
+ }
+ }
+}
diff --git a/kernel/model/attribute_view_map_test.go b/kernel/model/attribute_view_map_test.go
new file mode 100644
index 0000000000..354ed39241
--- /dev/null
+++ b/kernel/model/attribute_view_map_test.go
@@ -0,0 +1,306 @@
+package model
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "os"
+ "path/filepath"
+ "reflect"
+ "strconv"
+ "testing"
+ "time"
+
+ "github.com/88250/lute/ast"
+ "github.com/siyuan-note/siyuan/kernel/av"
+ "github.com/siyuan-note/siyuan/kernel/cache"
+ "github.com/siyuan-note/siyuan/kernel/sql"
+ "github.com/siyuan-note/siyuan/kernel/util"
+)
+
+func setupMapTest(t *testing.T) (*av.AttributeView, *av.View) {
+ setupAttributeViewValidationTest(t)
+ setAttributeViewListTestLangs()
+ util.AttrViewLangs["en"]["map"] = "Map"
+ util.AttrViewLangs["en"]["calendar"] = "Calendar"
+ attrView := newAttributeViewWithLayout(ast.NewNodeID(), av.LayoutTypeMap)
+ return attrView, attrView.Views[0]
+}
+
+func TestAttributeViewMapSettingsFieldsAndClone(t *testing.T) {
+ attrView, view := setupMapTest(t)
+ if !view.Map.Settings.ShowRecordList || view.Map.Settings.LocationKeyID != "" || view.Map.Settings.ServiceID != "" {
+ t.Fatal("new map must retain an explicit unbound state")
+ }
+ key := av.NewKey(ast.NewNodeID(), "Place", "", av.KeyTypeLocation)
+ addAttributeViewKey(attrView, view, key, "")
+ view.Map.Settings.LocationKeyID = key.ID
+ view.Map.Settings.ServiceID = "local-service"
+ view.Group = &av.ViewGroup{Field: attrView.KeyValues[1].Key.ID}
+ if getAttributeViewField(view, key.ID) == nil || view.IsGroupView() {
+ t.Fatal("map field or grouping state is incorrect")
+ }
+ layout := view.Map
+ for _, typ := range []av.LayoutType{av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeGallery, av.LayoutTypeKanban} {
+ if err := changeAttrViewLayout(attrView, view, typ); err != nil {
+ t.Fatal(err)
+ }
+ if err := changeAttrViewLayout(attrView, view, av.LayoutTypeMap); err != nil {
+ t.Fatal(err)
+ }
+ if layout != view.Map || view.Map.Settings.LocationKeyID != key.ID || view.Group == nil {
+ t.Fatal("layout switch lost map settings or stored grouping")
+ }
+ }
+ cloned := av.NewMapView()
+ if err := cloneAttributeViewLayouts(cloned, view); err != nil {
+ t.Fatal(err)
+ }
+ cloned.Map.Columns[0].Hidden = true
+ if view.Map.Columns[0].Hidden || view.Map.ID == cloned.Map.ID {
+ t.Fatal("map layout clone is not independent")
+ }
+ copy := attrView.Clone()
+ if copy == nil {
+ t.Fatal("map database clone failed")
+ }
+ copySettings := copy.Views[0].Map.Settings
+ copyKey, err := copy.GetKey(copySettings.LocationKeyID)
+ if err != nil || copyKey.Type != av.KeyTypeLocation || copyKey.ID == key.ID || copySettings.ServiceID != "local-service" {
+ t.Fatal("clone did not remap its own field or preserve local service reference")
+ }
+ if err = av.SaveAttributeView(attrView); err != nil {
+ t.Fatal(err)
+ }
+ cache.ClearAVCache()
+ stored, err := av.ParseAttributeView(attrView.ID)
+ if err != nil || stored.Spec != av.MapSpec || !reflect.DeepEqual(stored.Views[0].Map, view.Map) {
+ t.Fatalf("map roundtrip: %v", err)
+ }
+ removeAttributeViewFieldDefinition(attrView, key.ID)
+ if view.Map.Settings.LocationKeyID != key.ID || getAttributeViewField(view, key.ID) != nil {
+ t.Fatal("deleting field changed the saved binding")
+ }
+ if err = setAttributeViewFieldsHidden(attrView, attrView.GetBlockKeyValues().Key.ID, []string{view.ID}, true); err == nil {
+ t.Fatal("map primary field must remain visible")
+ }
+}
+
+func TestAttributeViewMapFilterSortPageTargetAndExport(t *testing.T) {
+ attrView, view := setupMapTest(t)
+ key := av.NewKey(ast.NewNodeID(), "Place", "", av.KeyTypeLocation)
+ addAttributeViewKey(attrView, view, key, "")
+ view.Map.Settings.LocationKeyID = key.ID
+ view.Map.Settings.ServiceID = "missing-service"
+ view.PageSize = 10
+ for _, column := range view.Map.Columns {
+ if column.ID == key.ID {
+ column.Hidden = true
+ }
+ }
+ values, _ := attrView.GetKeyValues(key.ID)
+ primary := attrView.GetBlockKeyValues()
+ for i := 0; i < 125; i++ {
+ id := ast.NewNodeID()
+ view.ItemIDs = append(view.ItemIDs, id)
+ primary.Values = append(primary.Values, &av.Value{ID: ast.NewNodeID(), KeyID: primary.Key.ID, BlockID: id,
+ Type: av.KeyTypeBlock, IsDetached: true, Block: &av.ValueBlock{Content: fmt.Sprintf("Record %03d", i)}})
+ value := &av.Value{ID: ast.NewNodeID(), KeyID: key.ID, BlockID: id, Type: av.KeyTypeLocation}
+ if i < 120 {
+ zero := 0.0
+ value.Location = &av.ValueLocation{Name: fmt.Sprintf("Place %03d", i), Latitude: &zero, Longitude: &zero,
+ CoordinateSystem: "wgs84"}
+ }
+ values.Values = append(values.Values, value)
+ }
+ view.Sorts = []*av.ViewSort{{Column: key.ID, Order: av.SortOrderDesc}}
+ view.Filters = []*av.ViewFilter{{Column: key.ID, Operator: av.FilterOperatorIsNotEmpty, Value: &av.Value{Type: av.KeyTypeLocation}}}
+ for _, page := range []int{1, 2, 12} {
+ mapped := sql.RenderView(attrView, view, "", false).(*av.Map)
+ if _, _, err := renderViewableInstance(mapped, view, attrView, page, 10, false, "", sql.NewAttributeViewRenderContext()); err != nil {
+ t.Fatal(err)
+ }
+ if len(mapped.Rows) != 10 || mapped.RowCount != 120 || mapped.Rows[0].ID != view.ItemIDs[129-page*10] ||
+ mapped.MapMarkerScope != "page" || mapped.Map.ServiceID != "missing-service" {
+ t.Fatalf("page %d did not follow ordinary filtered/sorted rows: %+v", page, mapped.Table)
+ }
+ if value := mapped.Rows[0].GetValue(key.ID); value == nil || value.Location == nil || *value.Location.Latitude != 0 {
+ t.Fatal("hidden location value or zero coordinate was lost")
+ }
+ }
+ mapped := sql.RenderView(attrView, view, "", false).(*av.Map)
+ index, offset, err := renderViewableInstance(mapped, view, attrView, 1, 10, false, view.ItemIDs[24], sql.NewAttributeViewRenderContext())
+ if err != nil || index != 95 || offset != 0 || len(mapped.Rows) != 120 {
+ t.Fatalf("map target did not locate its page: %d %d %v", index, offset, err)
+ }
+ before, _ := json.Marshal(view.Map)
+ exported := getAttrViewTable(attrView, view, "")
+ after, _ := json.Marshal(view.Map)
+ if len(exported.Rows) != 125 || exported.Map != nil || !bytes.Equal(before, after) {
+ t.Fatal("map export must contain all ordinary records without map service data or layout mutations")
+ }
+}
+
+func TestAttributeViewMapInvalidSavePreservesSource(t *testing.T) {
+ attrView, view := setupMapTest(t)
+ if err := av.SaveAttributeView(attrView); err != nil {
+ t.Fatal(err)
+ }
+ path := av.GetAttributeViewDataPath(attrView.ID)
+ before, _ := os.ReadFile(path)
+ for _, malformed := range []any{nil, map[string]any{}, map[string]any{"serviceID": "", "locationKeyID": "", "showRecordList": true, "apiKey": "not-allowed"},
+ av.MapSettings{ServiceID: "invalid/url"}, av.MapSettings{LocationKeyID: "invalid"}} {
+ if err := setAttrViewMap(&Operation{AvID: attrView.ID, ViewID: view.ID, Data: malformed}); err == nil {
+ t.Fatalf("invalid settings accepted: %#v", malformed)
+ }
+ after, _ := os.ReadFile(path)
+ if !bytes.Equal(before, after) {
+ t.Fatal("invalid settings changed source")
+ }
+ }
+ view.Map = nil
+ if err := av.SaveAttributeView(attrView); err == nil {
+ t.Fatal("missing map layout accepted")
+ }
+ after, _ := os.ReadFile(path)
+ if !bytes.Equal(before, after) {
+ t.Fatal("invalid layout changed source")
+ }
+ if _, err := isolateImportedAttributeViewBindings([]byte(`{"spec":12,"views":[{"type":"map"}]}`), nil, false); err == nil {
+ t.Fatal("import accepted a damaged map layout")
+ }
+}
+
+func TestAttributeViewMapImportAndHistoryPreserveBindings(t *testing.T) {
+ t.Run("empty", func(t *testing.T) { testAttributeViewMapImportAndHistoryPreserveBindings(t, false) })
+ t.Run("populated", func(t *testing.T) { testAttributeViewMapImportAndHistoryPreserveBindings(t, true) })
+}
+
+func testAttributeViewMapImportAndHistoryPreserveBindings(t *testing.T, populated bool) {
+ attrView, view := setupMapTest(t)
+ oldHistory := util.HistoryDir
+ util.HistoryDir = t.TempDir()
+ t.Cleanup(func() { util.HistoryDir = oldHistory })
+ view.Map.Settings = av.MapSettings{ServiceID: "device-without-service", LocationKeyID: ast.NewNodeID(), ShowRecordList: true}
+ if populated {
+ primary := attrView.GetBlockKeyValues()
+ itemID := ast.NewNodeID()
+ primary.Values = []*av.Value{{ID: ast.NewNodeID(), KeyID: primary.Key.ID, BlockID: itemID,
+ Type: av.KeyTypeBlock, IsDetached: true, Block: &av.ValueBlock{Content: "Map import record"}}}
+ view.ItemIDs = []string{itemID}
+ }
+ if err := av.SaveAttributeView(attrView); err != nil {
+ t.Fatal(err)
+ }
+ data, err := json.Marshal(attrView)
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, encrypted := range []bool{false, true} {
+ imported, err := isolateImportedAttributeViewBindings(data, nil, encrypted)
+ if err != nil || !bytes.Equal(data, imported) {
+ t.Fatalf("import changed valid missing map bindings: %v", err)
+ }
+ }
+ created := time.Unix(1791514800, 0)
+ path := filepath.Join(util.HistoryDir, created.Format("2006-01-02-150405")+"-update", "storage", "av", attrView.ID+".json")
+ if err = os.MkdirAll(filepath.Dir(path), 0755); err != nil {
+ t.Fatal(err)
+ }
+ if err = os.WriteFile(path, data, 0600); err != nil {
+ t.Fatal(err)
+ }
+ rendered, _, err := RenderHistoryAttributeView(attrView.ID, view.ID, "", "", 1, 10, nil, strconv.FormatInt(created.Unix(), 10))
+ if err != nil {
+ t.Fatal(err)
+ }
+ mapped, ok := rendered.(*av.Map)
+ if !ok || mapped.Map == nil || *mapped.Map != view.Map.Settings || mapped.MapMarkerScope != "page" {
+ t.Fatal("history lost map bindings")
+ }
+ after, _ := os.ReadFile(path)
+ if !bytes.Equal(data, after) {
+ t.Fatal("history rendering changed its source")
+ }
+ for _, spec := range []int{av.LocationSpec, av.MapSpec, av.CurrentSpec + 1} {
+ attrView.Spec = spec
+ view.Map.Spec = 1
+ invalid, _ := json.Marshal(attrView)
+ if _, err = parseHistoricalAttributeViewData(attrView.ID, invalid); err == nil {
+ t.Fatal("history accepted malformed or unknown map format")
+ }
+ if _, err = isolateImportedAttributeViewBindings(invalid, nil, true); err == nil {
+ t.Fatal("encrypted import accepted malformed or unknown map format")
+ }
+ if err = os.WriteFile(path, invalid, 0600); err != nil {
+ t.Fatal(err)
+ }
+ if _, _, err = RenderHistoryAttributeView(attrView.ID, view.ID, "", "", 1, 10, nil, strconv.FormatInt(created.Unix(), 10)); err == nil {
+ t.Fatal("history rendering accepted malformed or unknown map format")
+ }
+ after, readErr := os.ReadFile(path)
+ if readErr != nil || !bytes.Equal(invalid, after) {
+ t.Fatal("rejected history rendering changed its source")
+ }
+ }
+}
+
+func TestAttributeViewMapAndLocationImportOmittedValues(t *testing.T) {
+ setupMapTest(t)
+ for _, scenario := range []struct {
+ name string
+ layout av.LayoutType
+ loc bool
+ }{
+ {"map", av.LayoutTypeMap, false},
+ {"location", av.LayoutTypeTable, true},
+ {"legacy table", av.LayoutTypeTable, false},
+ {"legacy calendar", av.LayoutTypeCalendar, false},
+ } {
+ t.Run(scenario.name, func(t *testing.T) {
+ database := newAttributeViewWithLayout(ast.NewNodeID(), scenario.layout)
+ if scenario.loc {
+ database.KeyValues = append(database.KeyValues, &av.KeyValues{Key: av.NewKey(ast.NewNodeID(), "Location", "", av.KeyTypeLocation)})
+ }
+ if err := av.SaveAttributeView(database); err != nil {
+ t.Fatal(err)
+ }
+ data, err := json.Marshal(database)
+ if err != nil {
+ t.Fatal(err)
+ }
+ var root map[string]json.RawMessage
+ if err = json.Unmarshal(data, &root); err != nil {
+ t.Fatal(err)
+ }
+ var keyValues []map[string]json.RawMessage
+ if err = json.Unmarshal(root["keyValues"], &keyValues); err != nil {
+ t.Fatal(err)
+ }
+ for _, values := range []string{"", "null", "[]", "{}", `"invalid"`} {
+ delete(keyValues[0], "values")
+ if values != "" {
+ keyValues[0]["values"] = json.RawMessage(values)
+ }
+ root["keyValues"], err = json.Marshal(keyValues)
+ if err != nil {
+ t.Fatal(err)
+ }
+ input, err := json.Marshal(root)
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, encrypted := range []bool{false, true} {
+ got, importErr := isolateImportedAttributeViewBindings(input, nil, encrypted)
+ wantSuccess := values == "null" || values == "[]" || values == ""
+ if wantSuccess && (importErr != nil || !bytes.Equal(got, input)) {
+ t.Fatalf("values=%q encrypted=%t rejected or rewrote valid empty data: %v", values, encrypted, importErr)
+ }
+ if !wantSuccess && importErr == nil {
+ t.Fatalf("values=%q encrypted=%t accepted malformed data", values, encrypted)
+ }
+ }
+ }
+ })
+ }
+}
diff --git a/kernel/model/attribute_view_render.go b/kernel/model/attribute_view_render.go
index 98f52669e6..f7d5075fd2 100644
--- a/kernel/model/attribute_view_render.go
+++ b/kernel/model/attribute_view_render.go
@@ -267,6 +267,8 @@ func getAttributeViewBaseInstance(viewable av.Viewable) (ret *av.BaseInstance) {
ret = instance.BaseInstance
case *av.Calendar:
ret = instance.BaseInstance
+ case *av.Map:
+ ret = instance.BaseInstance
case *av.List:
ret = instance.BaseInstance
case *av.Gallery:
@@ -502,7 +504,7 @@ func renderAttributeViewWithTarget(blockID, avID, viewID, query string, page, pa
func newAttributeViewWithLayout(avID string, initialLayout av.LayoutType) (ret *av.AttributeView) {
ret = av.NewAttributeView(avID)
switch initialLayout {
- case av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeGallery, av.LayoutTypeKanban:
+ case av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap, av.LayoutTypeGallery, av.LayoutTypeKanban:
default:
return
}
@@ -553,8 +555,14 @@ func renderAttributeView(attrView *av.AttributeView, nodeID, viewID, carrierView
// 渲染视图
renderContext := sql.NewAttributeViewRenderContext()
renderContext.ReadOnly = !writable
- defer renderContext.PushTemplateErrors()
+ if shouldPushAttributeViewTemplateErrors(view.LayoutType, writable) {
+ defer renderContext.PushTemplateErrors()
+ }
deferTemplateValues := shouldDeferAttributeViewTemplateValues(attrView, view, query, ignoreRows)
+ if view.LayoutType == av.LayoutTypeMap && !writable {
+ // 发布权限过滤可能改变分页边界,完整行集的模板值必须在重新分页前准备好。
+ deferTemplateValues = false
+ }
if deferTemplateValues {
viewable = sql.RenderViewWithDeferredTemplatesContext(attrView, view, query, ignoreRows, renderContext)
} else {
@@ -586,7 +594,7 @@ func renderAttributeView(attrView *av.AttributeView, nodeID, viewID, carrierView
}
// 渲染分组视图。当 ignoreRows 时若有已生成的分组则渲染元数据供面板使用,无分组则跳过(生成分组需要行数据)
- if view.LayoutType != av.LayoutTypeCalendar && (!ignoreRows || len(view.Groups) > 0) {
+ if view.LayoutType != av.LayoutTypeCalendar && view.LayoutType != av.LayoutTypeMap && (!ignoreRows || len(view.Groups) > 0) {
err = renderAttributeViewGroups(viewable, attrView, view, query, page, pageSize, groupPaging, groupRenderSource,
ignoreRows, writable, target, targetGroupID, renderContext, filterContext)
}
@@ -740,7 +748,7 @@ func renderAttributeViewGroups(viewable av.Viewable, attrView *av.AttributeView,
// 将分组视图的分组字段清空,减少冗余(字段信息可以在总的视图 view 对象上获取到)
switch groupView.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
groupView.GetTableLayout().Columns = nil
case av.LayoutTypeGallery:
groupView.Gallery.CardFields = nil
@@ -787,7 +795,7 @@ func hideEmptyGroupViews(view *av.View, viewable av.Viewable) {
itemCount := 0
switch viewable.GetType() {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
itemCount = av.TableFromViewable(viewable).RowCount
case av.LayoutTypeGallery:
itemCount = viewable.(*av.Gallery).CardCount
@@ -1033,7 +1041,7 @@ func shouldDeferAttributeViewTemplateValues(attrView *av.AttributeView, view *av
return templateKeyIDs[fieldID] && nil != calc && av.CalcOperatorNone != calc.Operator
}
switch view.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
for _, column := range view.GetTableLayout().Columns {
if nil != column && nil != column.BaseField && checkField(column.ID, column.Calc) {
return false
@@ -1100,7 +1108,7 @@ func renderViewableInstance(viewable av.Viewable, view *av.View, attrView *av.At
return
}
targetIndex = findAttributeViewTargetIndex(targetItemID, len(calendar.Rows), func(index int) string { return calendar.Rows[index].ID })
- case av.LayoutTypeTable, av.LayoutTypeList:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeMap:
table := av.TableFromViewable(viewable)
targetIndex = findAttributeViewTargetIndex(targetItemID, len(table.Rows), func(index int) string { return table.Rows[index].ID })
table.RowCount = len(table.Rows)
@@ -1112,6 +1120,9 @@ func renderViewableInstance(viewable av.Viewable, view *av.View, attrView *av.At
if targetIndex >= 0 {
targetOffset = start
}
+ if mapped, ok := viewable.(*av.Map); ok {
+ mapped.RowsBeforePagination = table.Rows
+ }
table.Rows = table.Rows[start:end]
case av.LayoutTypeGallery:
gallery := viewable.(*av.Gallery)
@@ -1529,6 +1540,9 @@ func parseHistoricalAttributeViewData(avID string, data []byte) (*av.AttributeVi
if err := av.CheckSpec(view); nil != err {
return nil, err
}
+ if err := view.ValidateMapLayouts(); nil != err {
+ return nil, err
+ }
if err := view.NormalizeLocations(); nil != err {
return nil, err
}
diff --git a/kernel/model/conf.go b/kernel/model/conf.go
index 800614d5dc..733baf3938 100644
--- a/kernel/model/conf.go
+++ b/kernel/model/conf.go
@@ -73,6 +73,7 @@ type AppConf struct {
Search *conf.Search `json:"search"` // 搜索配置
Flashcard *conf.Flashcard `json:"flashcard"` // 闪卡配置
AI *conf.AI `json:"ai"` // 人工智能配置
+ Map *conf.Map `json:"map"` // 本机地图服务配置,不参与数据同步
OCR *conf.OCR `json:"ocr"` // 本地图片文字识别
Secrets *conf.Secrets `json:"secrets"` // 全局密钥库
Variables *conf.Variables `json:"variables"` // 全局变量库
@@ -99,6 +100,7 @@ func NewAppConf() *AppConf {
return &AppConf{
LogLevel: "debug",
OIDC: conf.NewOIDC(),
+ Map: conf.NewMap(),
m: &sync.RWMutex{},
userLock: &sync.RWMutex{},
}
@@ -789,6 +791,8 @@ func InitConf() {
}
Conf.AI.Normalize()
Conf.AI.ReconcileModelIDs()
+ Conf.Map = normalizeMapConfig(Conf.Map)
+ Conf.Map.DecryptCredentials()
if nil == Conf.OIDC {
Conf.OIDC = conf.NewOIDC()
@@ -1262,6 +1266,9 @@ func (conf *AppConf) marshalForSave() ([]byte, error) {
if snapshot.AI != nil {
snapshot.AI.EncryptAPIKeys()
}
+ if snapshot.Map != nil {
+ snapshot.Map.EncryptCredentials()
+ }
if snapshot.OIDC != nil {
snapshot.OIDC.EncryptClientSecret()
}
@@ -1445,6 +1452,7 @@ func GetMaskedConf() (ret *AppConf, err error) {
ret.UserData = MaskedUserData
ret.MCPOAuth = ""
+ ret.Map = ret.Map.Masked()
ret.CookieKey = ""
if "" != ret.AccessAuthCode {
ret.AccessAuthCode = MaskedAccessAuthCode
@@ -1470,6 +1478,7 @@ func UpdateServerAddrs(serverAddrs []string) bool {
// REF: https://github.com/siyuan-note/siyuan/issues/11364
func HideConfSecret(c *AppConf) {
c.AI = &conf.AI{}
+ c.Map = conf.NewMap()
c.OIDC = &conf.OIDC{}
c.MCPOAuth = ""
c.CookieKey = ""
diff --git a/kernel/model/export.go b/kernel/model/export.go
index ed43a9181f..2d5338ea53 100644
--- a/kernel/model/export.go
+++ b/kernel/model/export.go
@@ -4983,8 +4983,8 @@ func exportRefTreesWithConfig(tree *parse.Tree, defBlockIDs *[]string, retTrees
func getAttrViewTable(attrView *av.AttributeView, view *av.View, query string) (ret *av.Table) {
switch view.LayoutType {
- case av.LayoutTypeList:
- // 列表复用行列导出,读取独立列表布局中的字段顺序和显隐设置。
+ case av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
+ // 复用行列导出,读取各布局的字段顺序和显隐设置,不加载地图服务。
case av.LayoutTypeGallery:
view.Table = av.NewLayoutTable()
for _, field := range view.Gallery.CardFields {
diff --git a/kernel/model/import_attribute_view.go b/kernel/model/import_attribute_view.go
index 5f73a71cfe..78059b7fcd 100644
--- a/kernel/model/import_attribute_view.go
+++ b/kernel/model/import_attribute_view.go
@@ -18,6 +18,9 @@ func isolateImportedAttributeViewBindings(data []byte, importedBlockIDs map[stri
if err := av.CheckSpec(&attrView); err != nil {
return nil, err
}
+ if err := attrView.ValidateListLayouts(); err != nil {
+ return nil, err
+ }
if err := attrView.NormalizeLocations(); err != nil {
return nil, err
}
diff --git a/kernel/model/map.go b/kernel/model/map.go
new file mode 100644
index 0000000000..e252718a44
--- /dev/null
+++ b/kernel/model/map.go
@@ -0,0 +1,153 @@
+// SiYuan - From thought to insight, with agents
+// Copyright (c) 2020-present, b3log.org
+// Licensed under the GNU Affero General Public License, version 3 or later.
+
+package model
+
+import (
+ "errors"
+ "path/filepath"
+ "strings"
+
+ "github.com/88250/lute/ast"
+ "github.com/siyuan-note/filelock"
+ "github.com/siyuan-note/siyuan/kernel/conf"
+ "github.com/siyuan-note/siyuan/kernel/util"
+)
+
+// MapServiceInput 包含只写凭据:省略时保留相同供应商的值,显式空字符串清除该值。
+type MapServiceInput struct {
+ ID string
+ Name string
+ Provider string
+ APIKey *string
+ SecurityCode *string
+}
+
+func normalizeMapConfig(config *conf.Map) *conf.Map {
+ if config == nil {
+ return conf.NewMap()
+ }
+ if config.Services == nil {
+ config.Services = []*conf.MapService{}
+ }
+ return config
+}
+
+func (appConf *AppConf) GetMap() *conf.Map {
+ appConf.m.RLock()
+ defer appConf.m.RUnlock()
+ return appConf.Map.Masked()
+}
+
+// SetMap 原子替换服务列表。本机尚不存在的指定 ID 也会原样保留,允许补充同步视图引用的服务。
+func (appConf *AppConf) SetMap(inputs []MapServiceInput, expectedRevision string) (*conf.Map, error) {
+ appConf.m.Lock()
+ defer appConf.m.Unlock()
+ if util.ReadOnly {
+ return nil, errors.New("workspace is read-only")
+ }
+ currentRevision := ""
+ if appConf.Map != nil {
+ currentRevision = appConf.Map.Revision
+ }
+ if expectedRevision != currentRevision {
+ return nil, errors.New("mapSettingsConflict")
+ }
+ if len(inputs) > 100 {
+ return nil, errors.New("too many map services")
+ }
+ existing := map[string]*conf.MapService{}
+ if appConf.Map != nil {
+ for _, service := range appConf.Map.Services {
+ if service != nil {
+ existing[service.ID] = service
+ }
+ }
+ }
+ next := conf.NewMap()
+ seen := map[string]bool{}
+ for _, input := range inputs {
+ id := input.ID
+ if id == "" {
+ id = ast.NewNodeID()
+ }
+ if !conf.IsMapServiceID(id) || seen[id] {
+ return nil, errors.New("invalid or duplicate map service ID")
+ }
+ seen[id] = true
+ name := strings.TrimSpace(input.Name)
+ if name == "" || len(name) > 256 {
+ return nil, errors.New("map service name must contain 1 to 256 bytes")
+ }
+ if !conf.IsMapProvider(input.Provider) {
+ return nil, errors.New("unsupported map provider")
+ }
+ service := &conf.MapService{ID: id, Name: name, Provider: input.Provider}
+ if old := existing[id]; old != nil && old.Provider == input.Provider {
+ service.APIKey, service.SecurityCode = old.APIKey, old.SecurityCode
+ }
+ if input.APIKey != nil {
+ service.APIKey = strings.TrimSpace(*input.APIKey)
+ }
+ if input.SecurityCode != nil {
+ service.SecurityCode = strings.TrimSpace(*input.SecurityCode)
+ }
+ if len(service.APIKey) > 4096 || len(service.SecurityCode) > 4096 {
+ return nil, errors.New("map credential is too long")
+ }
+ if service.Provider == conf.MapProviderOpenFreeMap {
+ if input.APIKey != nil && service.APIKey != "" || input.SecurityCode != nil && service.SecurityCode != "" {
+ return nil, errors.New("OpenFreeMap does not use credentials")
+ }
+ service.APIKey, service.SecurityCode = "", ""
+ } else if service.Provider != conf.MapProviderAMap {
+ if input.SecurityCode != nil && service.SecurityCode != "" {
+ return nil, errors.New("this map provider does not use a security code")
+ }
+ service.SecurityCode = ""
+ }
+ next.Services = append(next.Services, service)
+ }
+ previous := appConf.Map
+ // 版本号与凭据内容无关,只有成功写入后才对其他调用可见。
+ next.Revision = ast.NewNodeID()
+ appConf.Map = next
+ data, err := appConf.marshalForSave()
+ if err == nil {
+ err = filelock.WriteFile(filepath.Join(util.ConfDir, "conf.json"), data)
+ }
+ if err != nil {
+ appConf.Map = previous
+ return nil, errors.New("could not save map configuration")
+ }
+ return next.Masked(), nil
+}
+
+// GetMapRuntime 只返回明确选中且已配置的本机服务,不为缺失 ID 回退到其他服务或借用凭据。
+func (appConf *AppConf) GetMapRuntime(serviceID string) (*conf.MapService, error) {
+ appConf.m.RLock()
+ defer appConf.m.RUnlock()
+ if !conf.IsMapServiceID(serviceID) {
+ return nil, errors.New("invalid map service ID")
+ }
+ if appConf.Map != nil {
+ for _, service := range appConf.Map.Services {
+ if service == nil || service.ID != serviceID {
+ continue
+ }
+ if !service.Configured() {
+ return nil, errors.New("map service is not configured on this device")
+ }
+ ret := *service
+ if ret.Provider == conf.MapProviderOpenFreeMap {
+ ret.APIKey = ""
+ }
+ if ret.Provider != conf.MapProviderAMap {
+ ret.SecurityCode = ""
+ }
+ return &ret, nil
+ }
+ }
+ return nil, errors.New("map service is missing on this device")
+}
diff --git a/kernel/model/map_test.go b/kernel/model/map_test.go
new file mode 100644
index 0000000000..2921416e52
--- /dev/null
+++ b/kernel/model/map_test.go
@@ -0,0 +1,260 @@
+package model
+
+import (
+ "bytes"
+ "encoding/json"
+ "os"
+ "path/filepath"
+ "reflect"
+ "strings"
+ "testing"
+
+ "github.com/siyuan-note/siyuan/kernel/conf"
+ "github.com/siyuan-note/siyuan/kernel/util"
+)
+
+func mapTestString(value string) *string { return &value }
+
+func setMapForTest(app *AppConf, inputs []MapServiceInput) (*conf.Map, error) {
+ revision := ""
+ if app.Map != nil {
+ revision = app.Map.Revision
+ }
+ return app.SetMap(inputs, revision)
+}
+
+func mapTestConfig(t *testing.T) *AppConf {
+ t.Helper()
+ oldDir, oldReadonly := util.ConfDir, util.ReadOnly
+ util.ConfDir, util.ReadOnly = t.TempDir(), false
+ t.Cleanup(func() { util.ConfDir, util.ReadOnly = oldDir, oldReadonly })
+ return NewAppConf()
+}
+
+func TestMapConfigDefaultsAndLegacyNil(t *testing.T) {
+ for _, body := range []string{`{}`, `{"map":null}`, `{"map":{}}`, `{"map":{"services":null}}`} {
+ app := NewAppConf()
+ if err := json.Unmarshal([]byte(body), app); err != nil {
+ t.Fatal(err)
+ }
+ app.Map = normalizeMapConfig(app.Map)
+ if app.Map.Services == nil || len(app.Map.Services) != 0 || app.Map.Revision != "" {
+ t.Fatalf("legacy configuration acquired a default service: %s", body)
+ }
+ app.Map.DecryptCredentials()
+ if _, err := app.GetMapRuntime("missing"); err == nil {
+ t.Fatal("empty configuration resolved a runtime")
+ }
+ }
+ var config *conf.Map
+ config.EncryptCredentials()
+ config.DecryptCredentials()
+ if len(config.Masked().Services) != 0 {
+ t.Fatal("nil map configuration is not safely readable")
+ }
+}
+
+func TestMapConfigCredentialsAndStableReferences(t *testing.T) {
+ app := mapTestConfig(t)
+ inputs := []MapServiceInput{
+ {ID: "synced-view-service", Name: " AMap ", Provider: conf.MapProviderAMap, APIKey: mapTestString("test-amap-key"), SecurityCode: mapTestString("test-amap-code")},
+ {Name: "Free", Provider: conf.MapProviderOpenFreeMap},
+ {ID: "second", Name: "Tencent", Provider: conf.MapProviderTencent, APIKey: mapTestString("test-tencent-key")},
+ }
+ masked, err := setMapForTest(app, inputs)
+ if err != nil {
+ t.Fatal(err)
+ }
+ generatedID := masked.Services[1].ID
+ if !conf.IsMapServiceID(generatedID) || masked.Services[0].ID != "synced-view-service" || masked.Services[0].Name != "AMap" {
+ t.Fatal("stable IDs or normalization changed")
+ }
+ for _, service := range masked.Services {
+ if service.APIKey != "" || service.SecurityCode != "" || !service.Configured() {
+ t.Fatal("save returned a credential or lost presence metadata")
+ }
+ }
+ if !masked.Services[0].HasSecurityCode() || !masked.Services[0].HasAPIKey() || masked.Services[1].HasAPIKey() {
+ t.Fatal("masked credential metadata is inaccurate")
+ }
+ for _, id := range []string{"", "missing", "https://invalid.example", " space "} {
+ if _, err = app.GetMapRuntime(id); err == nil {
+ t.Fatalf("missing or malformed ID resolved: %q", id)
+ }
+ }
+ selected, err := app.GetMapRuntime("second")
+ if err != nil || selected.APIKey != "test-tencent-key" || selected.SecurityCode != "" {
+ t.Fatal("runtime did not select only the requested provider")
+ }
+ selected.APIKey = "changed-copy"
+ if app.Map.Services[2].APIKey != "test-tencent-key" {
+ t.Fatal("runtime exposed mutable active configuration")
+ }
+ inputs = []MapServiceInput{
+ {ID: generatedID, Name: "Free renamed", Provider: conf.MapProviderOpenFreeMap},
+ {ID: "synced-view-service", Name: "Renamed", Provider: conf.MapProviderAMap},
+ }
+ if _, err = setMapForTest(app, inputs); err != nil {
+ t.Fatal(err)
+ }
+ if app.Map.Services[1].APIKey != "test-amap-key" || app.Map.Services[1].SecurityCode != "test-amap-code" {
+ t.Fatal("omitted credentials did not survive rename/reorder")
+ }
+ if _, err = app.GetMapRuntime("second"); err == nil {
+ t.Fatal("removed service still resolved")
+ }
+ inputs[1].SecurityCode = mapTestString("")
+ if _, err = setMapForTest(app, inputs); err != nil {
+ t.Fatal(err)
+ }
+ if app.GetMap().Services[1].Configured() || app.Map.Services[1].APIKey != "test-amap-key" {
+ t.Fatal("explicit secret clear failed or cleared an omitted key")
+ }
+ if _, err = app.GetMapRuntime("synced-view-service"); err == nil {
+ t.Fatal("incomplete AMap service resolved")
+ }
+ inputs[1].Provider, inputs[1].SecurityCode = conf.MapProviderBaidu, nil
+ if _, err = setMapForTest(app, inputs); err != nil {
+ t.Fatal(err)
+ }
+ if app.Map.Services[1].APIKey != "" || app.Map.Services[1].SecurityCode != "" {
+ t.Fatal("provider change retained credentials")
+ }
+ inputs[1].APIKey = mapTestString("test-baidu-key")
+ if _, err = setMapForTest(app, inputs); err != nil {
+ t.Fatal(err)
+ }
+ if selected, err = app.GetMapRuntime("synced-view-service"); err != nil || selected.APIKey != "test-baidu-key" {
+ t.Fatal("replacement provider credentials were not usable")
+ }
+ if _, err = setMapForTest(app, []MapServiceInput{}); err != nil || len(app.Map.Services) != 0 {
+ t.Fatal("empty full list did not remove services")
+ }
+ if _, err = setMapForTest(app, []MapServiceInput{{ID: "synced-view-service", Name: "Configure missing reference", Provider: conf.MapProviderOpenFreeMap}}); err != nil || app.Map.Services[0].ID != "synced-view-service" {
+ t.Fatal("cross-device missing reference could not be explicitly configured")
+ }
+}
+
+func TestMapConfigRejectsInvalidChangesAtomically(t *testing.T) {
+ app := mapTestConfig(t)
+ input := MapServiceInput{ID: "existing", Name: "Original", Provider: conf.MapProviderAMap, APIKey: mapTestString("test-key"), SecurityCode: mapTestString("test-code")}
+ if _, err := setMapForTest(app, []MapServiceInput{input}); err != nil {
+ t.Fatal(err)
+ }
+ before, _ := json.Marshal(app.Map)
+ disk, _ := os.ReadFile(filepath.Join(util.ConfDir, "conf.json"))
+ invalid := []MapServiceInput{
+ {ID: "../bad", Name: "Bad", Provider: conf.MapProviderAMap},
+ {ID: strings.Repeat("a", 129), Name: "Bad", Provider: conf.MapProviderAMap},
+ {ID: "existing", Name: "Bad", Provider: conf.MapProviderBaidu},
+ {ID: "next", Name: " ", Provider: conf.MapProviderAMap},
+ {ID: "next", Name: "Bad", Provider: "https://unknown.example"},
+ {ID: "next", Name: "Bad", Provider: conf.MapProviderOpenFreeMap, APIKey: mapTestString("not-allowed")},
+ {ID: "next", Name: "Bad", Provider: conf.MapProviderTencent, SecurityCode: mapTestString("not-allowed")},
+ {ID: "next", Name: "Bad", Provider: conf.MapProviderAMap, APIKey: mapTestString(strings.Repeat("x", 4097))},
+ }
+ for _, value := range invalid {
+ if _, err := setMapForTest(app, []MapServiceInput{input, value}); err == nil {
+ t.Fatalf("invalid input accepted: ID=%q, provider=%q", value.ID, value.Provider)
+ }
+ after, _ := json.Marshal(app.Map)
+ stored, _ := os.ReadFile(filepath.Join(util.ConfDir, "conf.json"))
+ if !bytes.Equal(before, after) || !bytes.Equal(disk, stored) {
+ t.Fatal("rejected full list partially mutated configuration")
+ }
+ }
+ util.ReadOnly = true
+ if _, err := setMapForTest(app, nil); err == nil || len(app.Map.Services) != 1 {
+ t.Fatal("read-only configuration was changed")
+ }
+ util.ReadOnly = false
+ util.ConfDir = filepath.Join(util.ConfDir, "conf.json") // 已有文件不能作为父目录。
+ if _, err := setMapForTest(app, nil); err == nil || len(app.Map.Services) != 1 {
+ t.Fatal("failed persistence left a changed active configuration")
+ }
+}
+
+func TestMapConfigEncryptedStorageAndMaskedReads(t *testing.T) {
+ app := mapTestConfig(t)
+ app.Map = &conf.Map{Services: []*conf.MapService{{ID: "local", Name: "Local", Provider: conf.MapProviderAMap, APIKey: "map-test-private-key", SecurityCode: "map-test-private-code"}}}
+ before, _ := json.Marshal(app.Map)
+ app.Save()
+ app.Save()
+ data, err := os.ReadFile(filepath.Join(util.ConfDir, "conf.json"))
+ if err != nil || bytes.Contains(data, []byte("map-test-private")) {
+ t.Fatal("map credentials were not encrypted for storage")
+ }
+ after, _ := json.Marshal(app.Map)
+ if !bytes.Equal(before, after) {
+ t.Fatal("save mutated runtime credentials")
+ }
+ stored := NewAppConf()
+ if err = json.Unmarshal(data, stored); err != nil {
+ t.Fatal(err)
+ }
+ stored.Map.DecryptCredentials()
+ if !reflect.DeepEqual(stored.Map, app.Map) {
+ t.Fatal("stored map credentials did not round-trip")
+ }
+ oldConf := Conf
+ Conf = app
+ t.Cleanup(func() { Conf = oldConf })
+ masked, err := GetMaskedConf()
+ if err != nil {
+ t.Fatal(err)
+ }
+ serialized, _ := json.Marshal(masked)
+ if bytes.Contains(serialized, []byte("map-test-private")) || !masked.Map.Services[0].Configured() {
+ t.Fatal("masked configuration leaked credentials or lost configured status")
+ }
+ masked.System = &conf.System{}
+ HideConfSecret(masked)
+ if len(masked.Map.Services) != 0 {
+ t.Fatal("published configuration retained device service metadata")
+ }
+ if app.Map.Services[0].APIKey != "map-test-private-key" {
+ t.Fatal("masked read changed active credentials")
+ }
+}
+
+func TestMapConfigDecryptPreservesUnrecognizedInput(t *testing.T) {
+ for _, value := range []string{"", "legacy-plain-key", "0011", "00000000000000000000000000000000"} {
+ config := &conf.Map{Services: []*conf.MapService{nil, {APIKey: value, SecurityCode: value}}}
+ config.DecryptCredentials()
+ if config.Services[1].APIKey != value || config.Services[1].SecurityCode != value {
+ t.Fatal("unrecognized stored credential was silently destroyed")
+ }
+ }
+}
+
+func TestMapConfigRevisionPreventsStaleWholeListWrites(t *testing.T) {
+ app := mapTestConfig(t)
+ initialRevision := app.Map.Revision
+ inputs := []MapServiceInput{{ID: "new-service", Name: "New service", Provider: conf.MapProviderTencent, APIKey: mapTestString("preserved-concurrent-key")}}
+ first, err := app.SetMap(inputs, initialRevision)
+ if err != nil || first.Revision == "" || first.Revision == initialRevision || first.Revision != app.Map.Revision {
+ t.Fatal("successful map write did not publish a new independent revision")
+ }
+ path := filepath.Join(util.ConfDir, "conf.json")
+ before, err := os.ReadFile(path)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if _, err = app.SetMap([]MapServiceInput{}, initialRevision); err == nil || err.Error() != "mapSettingsConflict" {
+ t.Fatal("stale whole-list write did not report a conflict")
+ }
+ after, err := os.ReadFile(path)
+ if err != nil || !bytes.Equal(before, after) || len(app.Map.Services) != 1 || app.Map.Services[0].APIKey != "preserved-concurrent-key" || app.Map.Revision != first.Revision {
+ t.Fatal("stale write deleted another window's service or credential")
+ }
+ inputs[0].Name, inputs[0].APIKey = "Rename", nil
+ second, err := app.SetMap(inputs, first.Revision)
+ if err != nil || second.Revision == first.Revision || app.Map.Services[0].APIKey != "preserved-concurrent-key" {
+ t.Fatal("current revision could not save without replacing omitted credentials")
+ }
+ data, err := os.ReadFile(path)
+ stored := NewAppConf()
+ if err != nil || json.Unmarshal(data, stored) != nil || stored.Map.Revision != second.Revision {
+ t.Fatal("map revision was not persisted with its service list")
+ }
+}
diff --git a/kernel/model/publish_access.go b/kernel/model/publish_access.go
index 0e773476ea..45e5ec15ae 100644
--- a/kernel/model/publish_access.go
+++ b/kernel/model/publish_access.go
@@ -576,7 +576,7 @@ func FilterViewByPublishAccess(c *gin.Context, publishAccess PublishAccess, view
ret = viewable
switch ret.GetType() {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
table := av.TableFromViewable(ret)
filteredRows := []*av.TableRow{}
for _, row := range table.Rows {
@@ -585,6 +585,10 @@ func FilterViewByPublishAccess(c *gin.Context, publishAccess PublishAccess, view
}
}
table.Rows = filteredRows
+ if ret.GetType() == av.LayoutTypeMap {
+ table.RowCount = len(filteredRows)
+ clearPublishedAttributeViewMapCalculations(ret.(*av.Map))
+ }
if ret.GetType() == av.LayoutTypeCalendar {
table.RowCount = len(filteredRows)
table.CalendarTargetDate = nil
@@ -737,7 +741,7 @@ func (filter *attributeViewPublishAccessFilter) filterViewable(attrView *av.Attr
}
switch viewable.GetType() {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
table := av.TableFromViewable(viewable)
filter.filterGroupValue(attrView, table.BaseInstance)
for _, row := range table.Rows {
@@ -749,6 +753,9 @@ func (filter *attributeViewPublishAccessFilter) filterViewable(attrView *av.Attr
continue
}
filter.filterBaseValue(attrView, row.ID, cell.BaseValue)
+ if av.LayoutTypeMap == viewable.GetType() {
+ filter.filterMapTemplateValue(attrView, row.ID, cell.BaseValue)
+ }
}
}
for _, group := range table.Groups {
diff --git a/kernel/model/publish_access_test.go b/kernel/model/publish_access_test.go
index 2eb83e5ce8..70809b7aeb 100644
--- a/kernel/model/publish_access_test.go
+++ b/kernel/model/publish_access_test.go
@@ -1087,6 +1087,11 @@ func TestCheckAttributeViewBlockTreesAccessableByPublishAccess(t *testing.T) {
}
func TestFilterAttributeViewRelatedValuesByPublishAccess(t *testing.T) {
+ t.Run("table", func(t *testing.T) { testFilterAttributeViewRelatedValuesByPublishAccess(t, false) })
+ t.Run("map", func(t *testing.T) { testFilterAttributeViewRelatedValuesByPublishAccess(t, true) })
+}
+
+func testFilterAttributeViewRelatedValuesByPublishAccess(t *testing.T, mapped bool) {
const (
sourceAvID = "20260726000100-source1"
targetAvID = "20260726000101-target1"
@@ -1191,7 +1196,11 @@ func TestFilterAttributeViewRelatedValuesByPublishAccess(t *testing.T) {
},
}
- filter.filterViewable(sourceAttrView, table)
+ var instance av.Viewable = table
+ if mapped {
+ instance = &av.Map{Table: table}
+ }
+ filter.filterViewable(sourceAttrView, instance)
filteredRelation := table.Rows[0].Cells[0].Value
if filteredRelation == relationValue {
diff --git a/kernel/model/session.go b/kernel/model/session.go
index c7bfa14bc2..c520a74834 100644
--- a/kernel/model/session.go
+++ b/kernel/model/session.go
@@ -339,6 +339,15 @@ func CheckAuth(c *gin.Context) {
return
}
if util.WorkspaceName == username && util.AuthCodeEquals(Conf.AccessAuthCode, password) {
+ // 浏览器可能自动附带缓存的 HTTP Basic 凭据,仍须校验请求来源。
+ // 不携带 Origin 和 Fetch Metadata 的普通接口客户端保持兼容。
+ if !util.IsSessionOriginAllowedRequest(c.Request) {
+ logging.LogWarnf("invalid Basic auth request origin [origin=%s, fetch-site=%s, ip=%s]",
+ c.GetHeader("Origin"), c.GetHeader("Sec-Fetch-Site"), c.ClientIP())
+ c.JSON(http.StatusUnauthorized, map[string]any{"code": -1, "msg": "Auth failed: invalid request origin"})
+ c.Abort()
+ return
+ }
util.AuthThrottleReset(ip)
c.Set(RoleContextKey, RoleAdministrator)
c.Next()
diff --git a/kernel/model/template.go b/kernel/model/template.go
index 0d547a1fa3..a048d6d3c2 100644
--- a/kernel/model/template.go
+++ b/kernel/model/template.go
@@ -887,6 +887,13 @@ func applyTemplateAttributeViewPlan(node *ast.Node, plan *templateAttributeViewP
func templateAttributeViewPreviewTable(node *ast.Node, plan *templateAttributeViewPlan) *ast.Node {
view := *plan.selectedView
+ if nil != plan.selectedView.Map {
+ mapLayout := *plan.selectedView.Map
+ table := *mapLayout.LayoutTable
+ table.Columns = append([]*av.ViewTableColumn(nil), table.Columns...)
+ mapLayout.LayoutTable = &table
+ view.Map = &mapLayout
+ }
if nil != plan.selectedView.Calendar {
calendar := *plan.selectedView.Calendar
table := *calendar.LayoutTable
diff --git a/kernel/model/transaction.go b/kernel/model/transaction.go
index 62902256a5..dcaf238ded 100644
--- a/kernel/model/transaction.go
+++ b/kernel/model/transaction.go
@@ -503,6 +503,8 @@ func performTx(tx *Transaction) (ret *TxErr) {
ret = tx.doSetAttrViewCardWidth(op)
case "setAttrViewConditionalColors":
ret = tx.doSetAttrViewConditionalColors(op)
+ case "setAttrViewMap":
+ ret = tx.doSetAttrViewMap(op)
case "setAttrViewCalendar":
ret = tx.doSetAttrViewCalendar(op)
case "setAttrViewCardLayout":
diff --git a/kernel/server/map_host.go b/kernel/server/map_host.go
new file mode 100644
index 0000000000..3a1861e2d6
--- /dev/null
+++ b/kernel/server/map_host.go
@@ -0,0 +1,147 @@
+// SiYuan - From thought to insight, with agents
+// Copyright (c) 2020-present, b3log.org
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+package server
+
+import (
+ "net/http"
+ "net/url"
+ "os"
+ "path"
+ "path/filepath"
+ "strings"
+
+ "github.com/gin-gonic/gin"
+ "github.com/siyuan-note/siyuan/kernel/util"
+)
+
+// 地图静态资源没有用户数据;允许不携带 Cookie 的 opaque-origin 子框架读取。
+// 精确白名单独立于通用 stage 路由,防止沙箱策略被路径别名绕过。
+var mapHostFiles = map[string]string{
+ "/stage/map/index.html": "stage/map/index.html",
+ "/stage/map/wrapper.html": "stage/map/wrapper.html",
+ "/stage/map/host.css": "stage/map/host.css",
+ "/stage/build/map/host.js": "stage/build/map/host.js",
+ "/stage/build/map/wrapper.js": "stage/build/map/wrapper.js",
+ "/stage/build/map/maplibre-gl.js": "stage/build/map/maplibre-gl.js",
+ "/stage/build/map/maplibre-gl.css": "stage/build/map/maplibre-gl.css",
+ "/stage/build/map/maplibre-gl-csp-worker.js": "stage/build/map/maplibre-gl-csp-worker.js",
+ "/stage/build/map/maplibre-LICENSE.txt": "stage/build/map/maplibre-LICENSE.txt",
+}
+
+func mapWrapperPolicy(host, provider string) (string, bool) {
+ if _, valid := mapHostPolicy(host, provider); !valid {
+ return "", false
+ }
+ // 外层只运行固定本地代码;其 frame-src 持续约束内层框架自己的导航。
+ return "default-src 'none'; sandbox allow-scripts allow-same-origin; script-src " +
+ host + "/stage/build/map/wrapper.js; style-src 'unsafe-inline' " + host + "/stage/map/host.css; connect-src 'none'; " +
+ "frame-src " + host + "/stage/map/index.html; worker-src 'none'; object-src 'none'; " +
+ "base-uri 'none'; form-action 'none'; frame-ancestors 'self'", true
+}
+
+func mapHostPolicy(host, provider string) (string, bool) {
+ // CSP 的本地来源仅允许固定资源路径,不授权整个同源内核 API。
+ u, err := url.Parse("http://" + host)
+ if err != nil || u.Host != host || u.Hostname() == "" || u.User != nil ||
+ strings.ContainsAny(host, " \t\r\n;'\"\\/?#") {
+ return "", false
+ }
+ local := host + "/stage/build/map/"
+ scripts := local + "host.js"
+ connect, images, fonts, styles, workers := "'none'", "data: blob:", "'none'", "'unsafe-inline' "+host+"/stage/map/host.css", "'none'"
+ switch provider {
+ case "openfreemap":
+ scripts += " " + local + "maplibre-gl.js"
+ connect = "https://tiles.openfreemap.org " + local + "maplibre-gl-csp-worker.js"
+ images += " https://tiles.openfreemap.org"
+ styles += " " + local + "maplibre-gl.css"
+ workers = "blob:"
+ case "amap":
+ scripts += " https://webapi.amap.com"
+ connect = "https://webapi.amap.com https://restapi.amap.com https://vdata.amap.com"
+ images += " https://webapi.amap.com https://a.amap.com https://*.is.autonavi.com"
+ case "tencent":
+ scripts += " https://map.qq.com"
+ connect = "https://map.qq.com https://apis.map.qq.com https://*.map.qq.com"
+ images += " https://map.qq.com https://*.map.qq.com"
+ case "baidu":
+ scripts += " https://api.map.baidu.com"
+ connect = "https://api.map.baidu.com https://*.map.bdimg.com https://*.bdimg.com"
+ images += " https://api.map.baidu.com https://*.map.bdimg.com https://*.bdimg.com https://*.map.baidu.com"
+ default:
+ return "", false
+ }
+ return "default-src 'none'; sandbox allow-scripts; script-src " + scripts +
+ "; connect-src " + connect + "; img-src " + images + "; style-src " + styles +
+ "; font-src " + fonts + "; worker-src " + workers +
+ "; frame-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'self'", true
+}
+
+func mapHostMiddleware() gin.HandlerFunc {
+ return func(c *gin.Context) {
+ requestPath := c.Request.URL.Path
+ // 通用静态文件服务会清理路径;必须先识别别名再拒绝,不能让别名绕过 CSP。
+ cleanPath := path.Clean(strings.ReplaceAll(requestPath, "\\", "/"))
+ isMapPath := func(value string) bool {
+ // 默认不区分大小写的文件系统,以及 Windows 末尾点/空格,也不能形成别名。
+ parts := strings.Split(strings.ReplaceAll(value, "\\", "/"), "/")
+ for i, part := range parts {
+ part = strings.TrimRight(part, " ")
+ if part != "." && part != ".." {
+ part = strings.TrimRight(part, ". ")
+ }
+ parts[i] = part
+ }
+ value = strings.ToLower(path.Clean(strings.Join(parts, "/")))
+ return value == "/stage/map" || value == "/stage/build/map" ||
+ strings.HasPrefix(value, "/stage/map/") || strings.HasPrefix(value, "/stage/build/map/")
+ }
+ if !isMapPath(requestPath) && !isMapPath(cleanPath) {
+ c.Next()
+ return
+ }
+ c.Abort()
+ file, ok := mapHostFiles[requestPath]
+ if !ok || requestPath != cleanPath || c.Request.URL.RawPath != "" || (c.Request.Method != http.MethodGet && c.Request.Method != http.MethodHead) {
+ c.Status(http.StatusNotFound)
+ return
+ }
+ c.Header("Cache-Control", "no-store")
+ c.Header("X-Content-Type-Options", "nosniff")
+ c.Header("Access-Control-Allow-Origin", "*")
+ c.Header("Access-Control-Allow-Credentials", "")
+ c.Header("Referrer-Policy", "strict-origin-when-cross-origin")
+ c.Header("Permissions-Policy", "geolocation=(), camera=(), microphone=(), payment=(), usb=(), serial=(), bluetooth=()")
+ if requestPath == "/stage/map/index.html" || requestPath == "/stage/map/wrapper.html" {
+ // BYPASS 模式跳过 opaque-origin 鉴权,子框架自身导航后的请求无法安全隔离。
+ if util.SiYuanAccessAuthCodeBypass {
+ c.Status(http.StatusForbidden)
+ return
+ }
+ policy, valid := mapHostPolicy(c.Request.Host, c.Query("provider"))
+ if requestPath == "/stage/map/wrapper.html" {
+ policy, valid = mapWrapperPolicy(c.Request.Host, c.Query("provider"))
+ }
+ if !valid {
+ c.Status(http.StatusBadRequest)
+ return
+ }
+ c.Header("Content-Security-Policy", policy)
+ }
+ resource, err := os.Open(filepath.Join(util.WorkingDir, filepath.FromSlash(file)))
+ if err != nil {
+ c.Status(http.StatusNotFound)
+ return
+ }
+ defer resource.Close()
+ info, err := resource.Stat()
+ if err != nil || !info.Mode().IsRegular() {
+ c.Status(http.StatusNotFound)
+ return
+ }
+ // ServeFile 会将 index.html 重定向到目录;宿主必须保持精确的受保护 URL。
+ http.ServeContent(c.Writer, c.Request, info.Name(), info.ModTime(), resource)
+ }
+}
diff --git a/kernel/server/map_host_test.go b/kernel/server/map_host_test.go
new file mode 100644
index 0000000000..96f618ab4e
--- /dev/null
+++ b/kernel/server/map_host_test.go
@@ -0,0 +1,117 @@
+// SiYuan - From thought to insight, with agents
+// Copyright (c) 2020-present, b3log.org
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+package server
+
+import (
+ "net/http"
+ "net/http/httptest"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+
+ "github.com/gin-gonic/gin"
+ "github.com/siyuan-note/siyuan/kernel/util"
+)
+
+func TestMapHostPolicy(t *testing.T) {
+ for _, provider := range []string{"openfreemap", "amap", "tencent", "baidu"} {
+ policy, ok := mapHostPolicy("localhost:6806", provider)
+ if !ok || !strings.Contains(policy, "sandbox allow-scripts;") ||
+ strings.Contains(policy, "allow-same-origin") || strings.Contains(policy, "'unsafe-eval'") ||
+ strings.Contains(policy, "connect-src 'self'") || !strings.Contains(policy, "form-action 'none'") {
+ t.Fatalf("unsafe policy for %s: %s", provider, policy)
+ }
+ if provider != "openfreemap" && strings.Contains(policy, "tiles.openfreemap.org") {
+ t.Fatalf("provider sources leaked into %s", provider)
+ }
+ wrapper, valid := mapWrapperPolicy("localhost:6806", provider)
+ if !valid || !strings.Contains(wrapper, "frame-src localhost:6806/stage/map/index.html;") ||
+ !strings.Contains(wrapper, "script-src localhost:6806/stage/build/map/wrapper.js;") ||
+ !strings.Contains(wrapper, "style-src 'unsafe-inline' localhost:6806/stage/map/host.css;") ||
+ !strings.Contains(wrapper, "connect-src 'none'") || strings.Contains(wrapper, "https://") ||
+ strings.Contains(wrapper, "script-src 'self'") {
+ t.Fatalf("unsafe wrapper policy for %s: %s", provider, wrapper)
+ }
+ }
+ for _, host := range []string{"", "localhost; script-src *", "a.example/path", "user@host", "host\nvalue", "host?x=1", "host'"} {
+ if _, ok := mapHostPolicy(host, "openfreemap"); ok {
+ t.Fatalf("accepted host %q", host)
+ }
+ if _, ok := mapWrapperPolicy(host, "openfreemap"); ok {
+ t.Fatalf("accepted wrapper host %q", host)
+ }
+ }
+ if _, ok := mapHostPolicy("localhost:6806", "custom"); ok {
+ t.Fatal("accepted arbitrary provider")
+ }
+ if _, ok := mapWrapperPolicy("localhost:6806", "custom"); ok {
+ t.Fatal("accepted arbitrary wrapper provider")
+ }
+}
+
+func TestMapHostStaticIsolationHeaders(t *testing.T) {
+ old := util.WorkingDir
+ oldBypass := util.SiYuanAccessAuthCodeBypass
+ util.SiYuanAccessAuthCodeBypass = false
+ util.WorkingDir = t.TempDir()
+ t.Cleanup(func() { util.WorkingDir = old; util.SiYuanAccessAuthCodeBypass = oldBypass })
+ for _, file := range mapHostFiles {
+ full := filepath.Join(util.WorkingDir, file)
+ if err := os.MkdirAll(filepath.Dir(full), 0700); err != nil {
+ t.Fatal(err)
+ }
+ if err := os.WriteFile(full, []byte("fixture"), 0600); err != nil {
+ t.Fatal(err)
+ }
+ }
+ router := gin.New()
+ router.Use(mapHostMiddleware())
+ router.Static("/stage", filepath.Join(util.WorkingDir, "stage"))
+ router.GET("/api/conf", func(c *gin.Context) { c.String(200, "ordinary route") })
+ for _, path := range []string{"/stage/map/index.html?provider=openfreemap", "/stage/build/map/host.js",
+ "/stage/map/wrapper.html?provider=amap", "/stage/build/map/wrapper.js"} {
+ response := httptest.NewRecorder()
+ router.ServeHTTP(response, httptest.NewRequest(http.MethodGet, path, nil))
+ if response.Code != 200 || response.Body.String() != "fixture" ||
+ response.Header().Get("Cache-Control") != "no-store" ||
+ response.Header().Get("Access-Control-Allow-Origin") != "*" ||
+ response.Header().Get("Access-Control-Allow-Credentials") != "" ||
+ response.Header().Get("X-Content-Type-Options") != "nosniff" {
+ t.Fatalf("unexpected resource response %s: %d %v", path, response.Code, response.Header())
+ }
+ if strings.Contains(path, "index.html") && !strings.Contains(response.Header().Get("Content-Security-Policy"), "sandbox allow-scripts") {
+ t.Fatal("missing enforced sandbox")
+ }
+ if strings.Contains(path, "wrapper.html") && !strings.Contains(response.Header().Get("Content-Security-Policy"), "frame-src example.com/stage/map/index.html;") {
+ t.Fatal("missing wrapper navigation boundary")
+ }
+ }
+ for _, path := range []string{"/stage/map/index.html", "/stage/map/index.html?provider=custom", "/stage/map/wrapper.html", "/stage/map/wrapper.html?provider=custom",
+ "/stage/map/private.json", "/stage/build/map/host.js.map", "/stage/map%2findex.html?provider=amap", "/stage/Map/wrapper.html?provider=amap",
+ "/stage/.%2fmap/index.html?provider=amap", "/stage/%2fmap/index.html?provider=amap",
+ "/stage/anything/..%2fmap/index.html?provider=amap", "/stage/build/.%2fmap/host.js",
+ "/stage/%5cmap%5cindex.html?provider=amap", "/stage/Map/index.html?provider=amap",
+ "/stage/build/MAP/host.js", "/stage/map./index.html?provider=amap", "/stage/map%20/index.html?provider=amap"} {
+ response := httptest.NewRecorder()
+ router.ServeHTTP(response, httptest.NewRequest(http.MethodGet, path, nil))
+ if response.Code == http.StatusOK {
+ t.Fatalf("unexpected allowed resource %s", path)
+ }
+ }
+ response := httptest.NewRecorder()
+ router.ServeHTTP(response, httptest.NewRequest(http.MethodGet, "/api/conf", nil))
+ if response.Code != 200 || response.Body.String() != "ordinary route" || response.Header().Get("Content-Security-Policy") != "" {
+ t.Fatal("map middleware changed unrelated route")
+ }
+ util.SiYuanAccessAuthCodeBypass = true
+ for _, page := range []string{"index.html", "wrapper.html"} {
+ response = httptest.NewRecorder()
+ router.ServeHTTP(response, httptest.NewRequest(http.MethodGet, "/stage/map/"+page+"?provider=openfreemap", nil))
+ if response.Code != http.StatusForbidden || strings.Contains(response.Body.String(), "fixture") {
+ t.Fatal("map host available in authentication bypass mode")
+ }
+ }
+}
diff --git a/kernel/server/serve.go b/kernel/server/serve.go
index fefc3f4551..bae56ea3dc 100644
--- a/kernel/server/serve.go
+++ b/kernel/server/serve.go
@@ -168,6 +168,7 @@ func Serve(fastMode bool, cookieKey string) {
SameSite: http.SameSiteLaxMode, // 防止跨站请求伪造 https://github.com/siyuan-note/siyuan/security/advisories/GHSA-hhm2-g993-p656
})
ginServer.Use(sessions.Sessions("siyuan", sessionStore))
+ ginServer.Use(mapHostMiddleware())
serveDebug(ginServer)
serveAssets(ginServer)
diff --git a/kernel/sql/av.go b/kernel/sql/av.go
index c1d73bf9dd..ffc7794637 100644
--- a/kernel/sql/av.go
+++ b/kernel/sql/av.go
@@ -178,7 +178,7 @@ func RenderGroupViewWithSourceContext(attrView *av.AttributeView, view, groupVie
source *GroupViewRenderSource, ignoreRows bool, context *AttributeViewRenderContext) (ret av.Viewable) {
var err error
switch groupView.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
// 这里需要使用深拷贝,因为字段上可能会带有计算(FieldCalc),每个分组视图的计算结果都需要分别存储在不同的字段实例上
err = copier.CopyWithOption(&groupView.GetTableLayout().Columns, &view.GetTableLayout().Columns, copier.Option{DeepCopy: true})
groupView.GetTableLayout().ShowIcon = view.GetTableLayout().ShowIcon
@@ -218,7 +218,7 @@ func RenderGroupViewWithSourceContext(attrView *av.AttributeView, view, groupVie
if nil != err {
logging.LogErrorf("copy view fields [%s] to group [%s] failed: %s", view.ID, groupView.ID, err)
switch groupView.LayoutType {
- case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar:
+ case av.LayoutTypeTable, av.LayoutTypeList, av.LayoutTypeCalendar, av.LayoutTypeMap:
groupView.GetTableLayout().Columns = view.GetTableLayout().Columns
case av.LayoutTypeGallery:
groupView.Gallery.CardFields = view.Gallery.CardFields
@@ -289,8 +289,8 @@ func renderViewWithContext(attrView *av.AttributeView, view *av.View, query stri
renderedAttrViews[attrView.ID] = attrView
ret = renderView(attrView, view, query, &depth, renderedAttrViews, ignoreRows, deferTemplateValues, renderContext)
- // 元数据、延迟模板和日历区间渲染不写入缓存,避免后续全集渲染读取到不完整条目。
- if !ignoreRows && !deferTemplateValues && view.LayoutType != av.LayoutTypeCalendar {
+ // 元数据、延迟模板、日历和地图渲染不写入缓存,避免后续渲染读取已裁剪的条目。
+ if !ignoreRows && !deferTemplateValues && view.LayoutType != av.LayoutTypeCalendar && view.LayoutType != av.LayoutTypeMap {
attrView.RenderedViewables[ret.GetID()] = ret
}
renderedAttrViews[attrView.ID] = attrView
@@ -309,6 +309,13 @@ func renderView(attrView *av.AttributeView, view *av.View, query string, depth *
case av.LayoutTypeTable:
ret = renderAttributeViewTable(attrView, view, query, depth, cachedAttrViews, ignoreRows, deferTemplateValues,
renderContext)
+ case av.LayoutTypeMap:
+ table := renderAttributeViewTable(attrView, view, query, depth, cachedAttrViews, ignoreRows, deferTemplateValues, renderContext)
+ settings := view.Map.Settings
+ table.Map = &settings
+ table.MapMarkerScope = "page"
+ table.Group = nil
+ ret = &av.Map{Table: table}
case av.LayoutTypeCalendar:
table := renderAttributeViewTable(attrView, view, query, depth, cachedAttrViews, ignoreRows, deferTemplateValues, renderContext)
settings := view.Calendar.Settings
diff --git a/kernel/sql/av_table.go b/kernel/sql/av_table.go
index eeb6acfaf1..4567cd6bfc 100644
--- a/kernel/sql/av_table.go
+++ b/kernel/sql/av_table.go
@@ -29,7 +29,7 @@ func RenderAttributeViewTable(attrView *av.AttributeView, view *av.View, query s
func renderAttributeViewTable(attrView *av.AttributeView, view *av.View, query string, depth *int,
cachedAttrViews map[string]*av.AttributeView, ignoreRows, deferTemplateValues bool,
renderContext *AttributeViewRenderContext) (ret *av.Table) {
- if !ignoreRows && !deferTemplateValues && view.LayoutType != av.LayoutTypeCalendar {
+ if !ignoreRows && !deferTemplateValues && view.LayoutType != av.LayoutTypeCalendar && view.LayoutType != av.LayoutTypeMap {
viewable := attrView.RenderedViewables[view.ID]
if nil != viewable {
if ret = av.TableFromViewable(viewable); nil != ret {
@@ -62,7 +62,7 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View, query s
Type: key.Type,
Icon: key.Icon,
Wrap: col.Wrap,
- Hidden: col.Hidden && !((av.LayoutTypeList == view.LayoutType || av.LayoutTypeCalendar == view.LayoutType) && av.KeyTypeBlock == key.Type),
+ Hidden: col.Hidden && !((av.LayoutTypeList == view.LayoutType || av.LayoutTypeCalendar == view.LayoutType || av.LayoutTypeMap == view.LayoutType) && av.KeyTypeBlock == key.Type),
Desc: key.Desc,
Calc: col.Calc,
Options: key.Options,