From a798a525153aefee2eabea17f4d4729b6724c143 Mon Sep 17 00:00:00 2001 From: barth Date: Tue, 8 Oct 2024 12:25:32 +0200 Subject: [PATCH] CADENZA-36955 CADENZA-37861 feat: Added `setCustomValidity()` and `ValidationMessageType` to control geometry editor validation state and allow additional validation --- CHANGELOG.md | 2 ++ sandbox.html | 18 +++++++++++++++++- src/cadenza.js | 18 ++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3411a919..46dc1392 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +### Added +- `setCustomValidity()` and `ValidationMessageType` to control geometry editor validation state ## 2.13.1 - 2024-09-24 ### Fixed diff --git a/sandbox.html b/sandbox.html index 1503b530..c63aea6f 100644 --- a/sandbox.html +++ b/sandbox.html @@ -181,7 +181,8 @@ cadenzaClient.fetchAreaIntersections(data.embeddingTargetId, JSON.parse(data.layer), JSON.parse(data.geometry), getOptions(data)) .then(console.log); }, - downloadData: data => cadenzaClient.downloadData(data.embeddingTargetId, data.dataType, getOptions(data)) + downloadData: data => cadenzaClient.downloadData(data.embeddingTargetId, data.dataType, getOptions(data)), + setCustomValidity: data => cadenzaClient.setCustomValidity(data.message, data.type || undefined) }; const form = document.getElementById('form'); @@ -297,6 +298,7 @@ + @@ -472,6 +474,20 @@ + +