Skip to content

Commit cd62384

Browse files
committed
refactor(davinci-client): introduce RichTextCollector to avoid breaking ReadOnlyCollector
ReadOnlyCollector now represents plain-text LABEL fields only. RichTextCollector is a new dedicated type for LABEL fields with richContent, so consumers can discriminate on collector.type without a breaking change to the existing ReadOnlyCollector output shape.
1 parent bde8c7e commit cd62384

10 files changed

Lines changed: 5030 additions & 3730 deletions

File tree

e2e/davinci-app/components/label.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
* This software may be modified and distributed under the terms
55
* of the MIT license. See the LICENSE file for details.
66
*/
7-
import type { ReadOnlyCollector } from '@forgerock/davinci-client/types';
7+
import type { RichTextCollector } from '@forgerock/davinci-client/types';
88

9-
export default function (formEl: HTMLFormElement, collector: ReadOnlyCollector) {
9+
export default function (formEl: HTMLFormElement, collector: RichTextCollector) {
1010
const p = document.createElement('p');
1111
p.style.whiteSpace = 'pre-line';
1212
const { richContent } = collector.output;

0 commit comments

Comments
 (0)