diff --git a/Cargo.lock b/Cargo.lock index 52472c6..f16e59a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -493,7 +493,7 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "canvas" -version = "0.6.14" +version = "0.6.15" dependencies = [ "anyhow", "async-trait", @@ -586,7 +586,7 @@ dependencies = [ [[package]] name = "client" -version = "0.6.14" +version = "0.6.15" dependencies = [ "anyhow", "async-trait", @@ -642,7 +642,7 @@ dependencies = [ [[package]] name = "common" -version = "0.6.14" +version = "0.6.15" dependencies = [ "prost 0.13.5", "prost-build 0.14.1", @@ -3117,7 +3117,7 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "search" -version = "0.6.14" +version = "0.6.15" dependencies = [ "anyhow", "common", @@ -3216,7 +3216,7 @@ dependencies = [ [[package]] name = "server" -version = "0.6.14" +version = "0.6.15" dependencies = [ "anyhow", "bcrypt", @@ -4549,7 +4549,7 @@ dependencies = [ [[package]] name = "validation-core" -version = "0.6.14" +version = "0.6.15" dependencies = [ "regex", "serde", diff --git a/client b/client index 426f85d..768592e 160000 --- a/client +++ b/client @@ -1 +1 @@ -Subproject commit 426f85d6cf741e54485224cdc7d8e31f4f13ec02 +Subproject commit 768592e67334b1a5155584c35dd7a08df4b0eac9 diff --git a/common/build.rs b/common/build.rs index aeefe9a..dd77ea9 100644 --- a/common/build.rs +++ b/common/build.rs @@ -40,14 +40,6 @@ fn main() -> Result<(), Box> { ".komp_ac.table_validation.PatternRules", "#[derive(serde::Serialize, serde::Deserialize)]", ) - .type_attribute( - ".komp_ac.table_validation.CustomFormatter", - "#[derive(serde::Serialize, serde::Deserialize)]", - ) - .type_attribute( - ".komp_ac.table_validation.FormatterOption", - "#[derive(serde::Serialize, serde::Deserialize)]", - ) .type_attribute( ".komp_ac.table_validation.AllowedValues", "#[derive(serde::Serialize, serde::Deserialize)]", diff --git a/common/proto/table_validation.proto b/common/proto/table_validation.proto index a60015b..efd95ce 100644 --- a/common/proto/table_validation.proto +++ b/common/proto/table_validation.proto @@ -13,7 +13,7 @@ package komp_ac.table_validation; // // Important split: // - limits / pattern / allowed_values / required are validation rules. -// - mask / formatter are presentation and input-shaping metadata for clients. +// - mask is presentation and input-shaping metadata for clients. // Request validation rules for a table message GetTableValidationRequest { @@ -44,9 +44,6 @@ message FieldValidation { // Client-side hint that this field participates in external/asynchronous validation UI. bool external_validation_enabled = 13; - // Client-side formatter metadata. This is intentionally data-only, not executable code. - optional CustomFormatter formatter = 14; - // Client-side display mask metadata. The server stores raw data without mask literals. DisplayMask mask = 3; @@ -139,22 +136,6 @@ message PatternRule { CharacterConstraint constraint = 2; } -// Client-side formatter metadata. -// The formatter "type" is intended to be resolved by a client-side formatter registry. -message CustomFormatter { - // Formatter type identifier; handled client‑side. - // Examples: "PSCFormatter", "PhoneFormatter", "CreditCardFormatter", "DateFormatter" - string type = 1; - - repeated FormatterOption options = 2; - optional string description = 3; -} - -message FormatterOption { - string key = 1; - string value = 2; -} - // Exact-value whitelist configuration. // This maps to canvas AllowedValues semantics. message AllowedValues { diff --git a/common/src/proto/descriptor.bin b/common/src/proto/descriptor.bin index 0985e48..ac5dc14 100644 Binary files a/common/src/proto/descriptor.bin and b/common/src/proto/descriptor.bin differ diff --git a/common/src/proto/komp_ac.table_validation.rs b/common/src/proto/komp_ac.table_validation.rs index 80e9326..9357a51 100644 --- a/common/src/proto/komp_ac.table_validation.rs +++ b/common/src/proto/komp_ac.table_validation.rs @@ -34,9 +34,6 @@ pub struct FieldValidation { /// Client-side hint that this field participates in external/asynchronous validation UI. #[prost(bool, tag = "13")] pub external_validation_enabled: bool, - /// Client-side formatter metadata. This is intentionally data-only, not executable code. - #[prost(message, optional, tag = "14")] - pub formatter: ::core::option::Option, /// Client-side display mask metadata. The server stores raw data without mask literals. #[prost(message, optional, tag = "3")] pub mask: ::core::option::Option, @@ -126,28 +123,6 @@ pub struct PatternRule { #[prost(message, optional, tag = "2")] pub constraint: ::core::option::Option, } -/// Client-side formatter metadata. -/// The formatter "type" is intended to be resolved by a client-side formatter registry. -#[derive(serde::Serialize, serde::Deserialize)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CustomFormatter { - /// Formatter type identifier; handled client‑side. - /// Examples: "PSCFormatter", "PhoneFormatter", "CreditCardFormatter", "DateFormatter" - #[prost(string, tag = "1")] - pub r#type: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub options: ::prost::alloc::vec::Vec, - #[prost(string, optional, tag = "3")] - pub description: ::core::option::Option<::prost::alloc::string::String>, -} -#[derive(serde::Serialize, serde::Deserialize)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FormatterOption { - #[prost(string, tag = "1")] - pub key: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub value: ::prost::alloc::string::String, -} /// Exact-value whitelist configuration. /// This maps to canvas AllowedValues semantics. #[derive(serde::Serialize, serde::Deserialize)] diff --git a/server b/server index aa0f9a3..24339bf 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit aa0f9a310897adf1560b3a364ae83d38ae0a0f68 +Subproject commit 24339bf7afa6b05a8c2f9e13c45bcb7fa281c184 diff --git a/tui-pages b/tui-pages index 981d076..aa05de8 160000 --- a/tui-pages +++ b/tui-pages @@ -1 +1 @@ -Subproject commit 981d0763bdd45191e851137dbf20876d1b9f0400 +Subproject commit aa05de8dc85e3ff6c5ca253b0fcae21461c80a16 diff --git a/validation-core/docs/validation_architecture.md b/validation-core/docs/validation_architecture.md index 90ca941..656d961 100644 --- a/validation-core/docs/validation_architecture.md +++ b/validation-core/docs/validation_architecture.md @@ -282,17 +282,6 @@ mask: Canvas uses this for display/editing. Backend expects raw values without mask literals. -### Formatter - -```text -formatter: - type: "PhoneFormatter" - options: [] - description: optional -``` - -Formatter is resolved client-side. Backend stores it but does not execute it. - ### External Validation ```text @@ -331,7 +320,6 @@ limits section pattern section allowed values section mask section -formatter section external validation toggle ``` diff --git a/validation-core/src/config.rs b/validation-core/src/config.rs index a841965..c6ed9ac 100644 --- a/validation-core/src/config.rs +++ b/validation-core/src/config.rs @@ -42,19 +42,6 @@ impl AllowedValues { } } -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct FormatterSettings { - pub formatter_type: String, - pub options: Vec, - pub description: Option, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct FormatterOption { - pub key: String, - pub value: String, -} - #[derive(Debug, Clone, Serialize, Deserialize)] pub enum CharacterFilterSettings { Alphabetic, @@ -129,7 +116,6 @@ pub struct ValidationSettings { pub pattern: Option, pub allowed_values: Option, pub display_mask: Option, - pub formatter: Option, pub external_validation_enabled: bool, } @@ -141,7 +127,6 @@ impl ValidationSettings { pattern_filters: self.pattern.as_ref().map(PatternSettings::resolve), allowed_values: self.allowed_values.clone(), display_mask: self.display_mask.clone(), - formatter: self.formatter.clone(), external_validation_enabled: self.external_validation_enabled, } } @@ -173,7 +158,6 @@ impl ValidationSettings { &rule.allowed_values, )?; merge_singleton("display_mask", &mut self.display_mask, &rule.display_mask)?; - merge_singleton("formatter", &mut self.formatter, &rule.formatter)?; if let Some(pattern) = &rule.pattern { match &mut self.pattern { @@ -220,7 +204,6 @@ pub struct ValidationConfig { pub pattern_filters: Option, pub allowed_values: Option, pub display_mask: Option, - pub formatter: Option, pub external_validation_enabled: bool, } @@ -269,7 +252,6 @@ impl ValidationConfig { || self.pattern_filters.is_some() || self.allowed_values.is_some() || self.display_mask.is_some() - || self.formatter.is_some() || self.external_validation_enabled } } diff --git a/validation-core/src/lib.rs b/validation-core/src/lib.rs index 7165c27..f048e16 100644 --- a/validation-core/src/lib.rs +++ b/validation-core/src/lib.rs @@ -3,9 +3,8 @@ pub mod rules; pub mod set; pub use config::{ - AllowedValues, CharacterFilterSettings, FormatterOption, FormatterSettings, PatternSettings, - PositionFilterSettings, ValidationConfig, ValidationMergeError, ValidationResult, - ValidationSettings, + AllowedValues, CharacterFilterSettings, PatternSettings, PositionFilterSettings, + ValidationConfig, ValidationMergeError, ValidationResult, ValidationSettings, }; pub use rules::{ count_text, CharacterFilter, CharacterLimits, CountMode, DisplayMask, LimitCheckResult,