@elisra-devops/docgen-data-provider 1.81.0 → 1.82.0

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.
@@ -14,7 +14,6 @@ export interface MewpCoverageRequestOptions {
14
14
  useRelFallback?: boolean;
15
15
  externalBugsFile?: MewpExternalFileRef | null;
16
16
  externalL3L4File?: MewpExternalFileRef | null;
17
- mergeDuplicateL2Cells?: boolean;
18
17
  }
19
18
  export interface MewpInternalValidationRequestOptions {
20
19
  useRelFallback?: boolean;
@@ -783,7 +783,18 @@ class ResultDataProvider {
783
783
  l4Title: existing.l4Title || l4Title,
784
784
  });
785
785
  }
786
- return [...deduped.values()].sort((a, b) => {
786
+ const normalizedPairs = [...deduped.values()];
787
+ const l3KeysWithAnyL4 = new Set(normalizedPairs
788
+ .filter((item) => !!String((item === null || item === void 0 ? void 0 : item.l3Id) || '').trim() && !!String((item === null || item === void 0 ? void 0 : item.l4Id) || '').trim())
789
+ .map((item) => String((item === null || item === void 0 ? void 0 : item.l3Id) || '').trim().toLowerCase()));
790
+ const filtered = normalizedPairs.filter((item) => {
791
+ const l3Id = String((item === null || item === void 0 ? void 0 : item.l3Id) || '').trim();
792
+ const l4Id = String((item === null || item === void 0 ? void 0 : item.l4Id) || '').trim();
793
+ if (!l3Id || !!l4Id)
794
+ return true;
795
+ return !l3KeysWithAnyL4.has(l3Id.toLowerCase());
796
+ });
797
+ return filtered.sort((a, b) => {
787
798
  const l3Compare = String((a === null || a === void 0 ? void 0 : a.l3Id) || '').localeCompare(String((b === null || b === void 0 ? void 0 : b.l3Id) || ''));
788
799
  if (l3Compare !== 0)
789
800
  return l3Compare;