@hmcts/ccd-case-ui-toolkit 7.4.17-exceljs-update → 7.4.17-exui-5220-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26674,7 +26674,18 @@ const richTextNodes = {
|
|
|
26674
26674
|
}, 0]
|
|
26675
26675
|
}
|
|
26676
26676
|
};
|
|
26677
|
-
const
|
|
26677
|
+
const richTextMarks = {
|
|
26678
|
+
...marks,
|
|
26679
|
+
em: {
|
|
26680
|
+
...marks.em,
|
|
26681
|
+
toDOM: () => ['i', 0]
|
|
26682
|
+
},
|
|
26683
|
+
strong: {
|
|
26684
|
+
...marks.strong,
|
|
26685
|
+
toDOM: () => ['b', 0]
|
|
26686
|
+
}
|
|
26687
|
+
};
|
|
26688
|
+
const richTextSchema = new Schema({ nodes: richTextNodes, marks: richTextMarks });
|
|
26678
26689
|
class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
26679
26690
|
editorHost;
|
|
26680
26691
|
editor;
|
|
@@ -27512,6 +27523,7 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27512
27523
|
this.removeUnsupportedMarkup(documentElement);
|
|
27513
27524
|
this.normaliseDateRangeSpacing(documentElement);
|
|
27514
27525
|
this.removeUnsupportedAttributes(documentElement);
|
|
27526
|
+
this.normaliseDocmosisInlineFormatting(documentElement);
|
|
27515
27527
|
const hasMeaningfulContent = this.hasMeaningfulRichTextContent(documentElement);
|
|
27516
27528
|
if (hasMeaningfulContent) {
|
|
27517
27529
|
this.preserveDocmosisBlankParagraphs(documentElement);
|
|
@@ -27537,6 +27549,7 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27537
27549
|
this.removeUnsupportedMarkup(documentElement);
|
|
27538
27550
|
this.normaliseDateRangeSpacing(documentElement);
|
|
27539
27551
|
this.removeUnsupportedAttributes(documentElement);
|
|
27552
|
+
this.normaliseDocmosisInlineFormatting(documentElement);
|
|
27540
27553
|
const hasMeaningfulContent = this.hasMeaningfulRichTextContent(documentElement);
|
|
27541
27554
|
if (hasMeaningfulContent) {
|
|
27542
27555
|
this.preserveDocmosisBlankParagraphs(documentElement);
|
|
@@ -27553,6 +27566,24 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27553
27566
|
preserveDocmosisBlankParagraphs(documentElement) {
|
|
27554
27567
|
this.replaceBlankParagraphContent(documentElement, '\u00a0');
|
|
27555
27568
|
}
|
|
27569
|
+
/**
|
|
27570
|
+
* Uses the presentational tags supported by Docmosis while continuing to
|
|
27571
|
+
* accept the equivalent semantic tags when existing content is loaded.
|
|
27572
|
+
*/
|
|
27573
|
+
normaliseDocmosisInlineFormatting(documentElement) {
|
|
27574
|
+
this.replaceElements(documentElement, 'strong', 'b');
|
|
27575
|
+
this.replaceElements(documentElement, 'em', 'i');
|
|
27576
|
+
}
|
|
27577
|
+
replaceElements(documentElement, sourceTag, targetTag) {
|
|
27578
|
+
const elements = Array.prototype.slice.call(documentElement.body.querySelectorAll(sourceTag));
|
|
27579
|
+
elements.forEach((element) => {
|
|
27580
|
+
const replacement = documentElement.createElement(targetTag);
|
|
27581
|
+
while (element.firstChild) {
|
|
27582
|
+
replacement.appendChild(element.firstChild);
|
|
27583
|
+
}
|
|
27584
|
+
element.replaceWith(replacement);
|
|
27585
|
+
});
|
|
27586
|
+
}
|
|
27556
27587
|
hasMeaningfulRichTextContent(documentElement) {
|
|
27557
27588
|
const visibleText = (documentElement.body.textContent || '')
|
|
27558
27589
|
.replace(/[\s\u00a0\u200b-\u200d\ufeff]/g, '');
|
|
@@ -29288,7 +29319,7 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
29288
29319
|
type: ViewChild,
|
|
29289
29320
|
args: ['editorHost']
|
|
29290
29321
|
}] }); })();
|
|
29291
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteRichTextAreaFieldComponent, { className: "WriteRichTextAreaFieldComponent", filePath: "lib/shared/components/palette/rich-text-area/write-rich-text-area-field.component.ts", lineNumber:
|
|
29322
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteRichTextAreaFieldComponent, { className: "WriteRichTextAreaFieldComponent", filePath: "lib/shared/components/palette/rich-text-area/write-rich-text-area-field.component.ts", lineNumber: 151 }); })();
|
|
29292
29323
|
|
|
29293
29324
|
class ReadTextFieldComponent extends AbstractFieldReadComponent {
|
|
29294
29325
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextFieldComponent_BaseFactory; return function ReadTextFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextFieldComponent_BaseFactory || (ɵReadTextFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextFieldComponent)))(__ngFactoryType__ || ReadTextFieldComponent); }; })();
|
|
@@ -35820,18 +35851,19 @@ class ReadFieldsFilterPipe {
|
|
|
35820
35851
|
const collectionItemValue = ReadFieldsFilterPipe.getCollectionItemValue(complexField);
|
|
35821
35852
|
if (Object.keys(collectionItemValue).length > 0) {
|
|
35822
35853
|
return {
|
|
35823
|
-
checkConditionalShowAgainst:
|
|
35854
|
+
checkConditionalShowAgainst: { ...collectionItemValue, ...currentValues },
|
|
35824
35855
|
formGroupAvailable: false
|
|
35825
35856
|
};
|
|
35826
35857
|
}
|
|
35827
35858
|
return {
|
|
35828
|
-
checkConditionalShowAgainst:
|
|
35859
|
+
checkConditionalShowAgainst: { ...checkConditionalShowAgainst, ...currentValues },
|
|
35829
35860
|
formGroupAvailable: false
|
|
35830
35861
|
};
|
|
35831
35862
|
}
|
|
35832
35863
|
static resolveFallbackConditionalShowContext(checkConditionalShowAgainst, currentValues) {
|
|
35833
35864
|
return {
|
|
35834
|
-
|
|
35865
|
+
// Contexts are local to this render; never copy sibling values into shared form data.
|
|
35866
|
+
checkConditionalShowAgainst: { ...checkConditionalShowAgainst, ...currentValues },
|
|
35835
35867
|
formGroupAvailable: false
|
|
35836
35868
|
};
|
|
35837
35869
|
}
|
|
@@ -35844,6 +35876,11 @@ class ReadFieldsFilterPipe {
|
|
|
35844
35876
|
return { checkConditionalShowAgainst, formGroupAvailable };
|
|
35845
35877
|
}
|
|
35846
35878
|
if (idPrefix !== '') {
|
|
35879
|
+
// A collection item already supplies its own condition values. Do not rely on
|
|
35880
|
+
// its collection's name having been flattened into the root by another render.
|
|
35881
|
+
if (complexField.parent?.field_type?.type === 'Collection') {
|
|
35882
|
+
return { checkConditionalShowAgainst: currentValues, formGroupAvailable: false };
|
|
35883
|
+
}
|
|
35847
35884
|
return ReadFieldsFilterPipe.resolvePrefixedConditionalShowContext(checkConditionalShowAgainst, currentValues, idPrefix);
|
|
35848
35885
|
}
|
|
35849
35886
|
if (path === 'parent_value' && ReadFieldsFilterPipe.findAncestorOfType(complexField, 'Collection')) {
|