mutation-testing-elements
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -6,7 +6,12 @@ # Change Log | ||
# [1.1.0](https://github.com/stryker-mutator/mutation-testing-elements/compare/v1.0.8...v1.1.0) (2019-06-17) | ||
## [1.1.1](https://github.com/stryker-mutator/mutation-testing-elements/compare/v1.1.0...v1.1.1) (2019-07-15) | ||
**Note:** Version bump only for package mutation-testing-elements | ||
### Bug Fixes | ||
* **legend:** status alignments ([#45](https://github.com/stryker-mutator/mutation-testing-elements/issues/45)) ([5656efd](https://github.com/stryker-mutator/mutation-testing-elements/commit/5656efd)) | ||
* **links:** use absolute urls inside the report ([#56](https://github.com/stryker-mutator/mutation-testing-elements/issues/56)) ([1fa4d2f](https://github.com/stryker-mutator/mutation-testing-elements/commit/1fa4d2f)) | ||
* **popup:** caution popup arrow color ([#46](https://github.com/stryker-mutator/mutation-testing-elements/issues/46)) ([d44bd4b](https://github.com/stryker-mutator/mutation-testing-elements/commit/d44bd4b)) | ||
* **popup:** popup offset ([#47](https://github.com/stryker-mutator/mutation-testing-elements/issues/47)) ([7860fc0](https://github.com/stryker-mutator/mutation-testing-elements/commit/7860fc0)) | ||
* **router:** allow url encoded chars in file names ([#55](https://github.com/stryker-mutator/mutation-testing-elements/issues/55)) ([1d73afd](https://github.com/stryker-mutator/mutation-testing-elements/commit/1d73afd)) | ||
@@ -16,2 +21,4 @@ | ||
## [1.1.0](https://github.com/stryker-mutator/mutation-testing-elements/compare/v1.0.7...v1.1.0) (2019-06-17) | ||
@@ -18,0 +25,0 @@ |
@@ -11,2 +11,3 @@ "use strict"; | ||
const style_1 = require("../style"); | ||
const htmlHelpers_1 = require("../lib/htmlHelpers"); | ||
const ROOT_NAME = 'All files'; | ||
@@ -24,3 +25,3 @@ let MutationTestReportBreadcrumbComponent = class MutationTestReportBreadcrumbComponent extends lit_element_1.LitElement { | ||
if (this.path && this.path.length) { | ||
return this.renderLink(ROOT_NAME, '#'); | ||
return this.renderLink(ROOT_NAME, ''); | ||
} | ||
@@ -39,3 +40,3 @@ else { | ||
else { | ||
return this.renderLink(item, `#${path.filter((_, i) => i <= index).join('/')}`); | ||
return this.renderLink(item, `${path.filter((_, i) => i <= index).join('/')}`); | ||
} | ||
@@ -50,3 +51,3 @@ }); | ||
renderLink(title, url) { | ||
return lit_element_1.html `<li class="breadcrumb-item"><a href="${url}">${title}</a></li>`; | ||
return lit_element_1.html `<li class="breadcrumb-item"><a href="${htmlHelpers_1.toAbsoluteUrl(url)}">${title}</a></li>`; | ||
} | ||
@@ -53,0 +54,0 @@ }; |
@@ -60,15 +60,13 @@ "use strict"; | ||
return lit_element_1.html ` | ||
<div class='row legend'> | ||
<form class='col-md-12' novalidate='novalidate'> | ||
${this.filters.map(filter => lit_element_1.html ` | ||
<div data-status="${filter.status}" class="form-check form-check-inline"> | ||
<label class="form-check-label"> | ||
<input class="form-check-input" type="checkbox" ?checked="${filter.enabled}" value="${filter.status}" @input="${() => this.checkboxClicked(filter)}"> | ||
<span class="badge badge-${htmlHelpers_1.getContextClassForStatus(filter.status)}">${htmlHelpers_1.getEmojiForStatus(filter.status)} | ||
${filter.status} (${filter.numberOfMutants})</span> | ||
</label> | ||
</div> | ||
`)} | ||
<button @click="${this.toggleOpenAll}" class="btn btn-sm btn-secondary" type="button">${this.collapseButtonText}</button> | ||
</form> | ||
<div class='row legend col-md-12'> | ||
${this.filters.map(filter => lit_element_1.html ` | ||
<div data-status="${filter.status}" class="form-check form-check-inline"> | ||
<label class="form-check-label"> | ||
<input class="form-check-input" type="checkbox" ?checked="${filter.enabled}" value="${filter.status}" @input="${() => this.checkboxClicked(filter)}"> | ||
<span class="badge badge-${htmlHelpers_1.getContextClassForStatus(filter.status)}">${htmlHelpers_1.getEmojiForStatus(filter.status)} | ||
${filter.status} (${filter.numberOfMutants})</span> | ||
</label> | ||
</div> | ||
`)} | ||
<button @click="${this.toggleOpenAll}" class="btn btn-sm btn-secondary" type="button">${this.collapseButtonText}</button> | ||
</div> | ||
@@ -81,3 +79,3 @@ `; | ||
lit_element_1.css ` | ||
.legend{ | ||
.legend { | ||
position: sticky; | ||
@@ -96,3 +94,2 @@ top: 0; | ||
} | ||
. | ||
` | ||
@@ -99,0 +96,0 @@ ]; |
@@ -11,2 +11,4 @@ "use strict"; | ||
const style_1 = require("../../style"); | ||
// Variable should be kept in sync with 'popup-width' in './mutation-test-report-popup.scss' | ||
const popupWidth = 200; | ||
let MutationTestReportPopupComponent = class MutationTestReportPopupComponent extends lit_element_1.LitElement { | ||
@@ -18,3 +20,3 @@ constructor() { | ||
firstUpdated() { | ||
if (this.getBoundingClientRect().left < 150) { | ||
if (this.getBoundingClientRect().left < (popupWidth / 2)) { | ||
const popover = this.shadowRoot.querySelector('.popover'); | ||
@@ -21,0 +23,0 @@ popover.style.marginLeft = '0px'; |
@@ -13,5 +13,4 @@ import { LitElement } from 'lit-element'; | ||
private renderRow; | ||
private link; | ||
private determineColoringClass; | ||
} | ||
//# sourceMappingURL=mutation-test-report-totals.d.ts.map |
@@ -20,2 +20,3 @@ "use strict"; | ||
const codeHelpers_1 = require("../lib/codeHelpers"); | ||
const htmlHelpers_1 = require("../lib/htmlHelpers"); | ||
let MutationTestReportTotalsComponent = class MutationTestReportTotalsComponent extends lit_element_1.LitElement { | ||
@@ -107,3 +108,3 @@ constructor() { | ||
<td style="width: 17px;" class="icon no-border-right">${row.file ? svg.file : svg.directory}</td> | ||
<td width="" class="no-border-left">${typeof path === 'string' ? lit_element_1.html `<a href="${this.link(path)}">${name}</a>` : | ||
<td width="" class="no-border-left">${typeof path === 'string' ? lit_element_1.html `<a href="${htmlHelpers_1.toAbsoluteUrl(path)}">${name}</a>` : | ||
lit_element_1.html `<span>${row.name}</span>`}</td> | ||
@@ -130,5 +131,2 @@ <td class="no-border-right vertical-middle"> | ||
} | ||
link(to) { | ||
return `#${to}`; | ||
} | ||
determineColoringClass(score) { | ||
@@ -135,0 +133,0 @@ if (this.thresholds) { |
@@ -5,2 +5,3 @@ import { MutantStatus } from 'mutation-testing-report-schema'; | ||
export declare function escapeHtml(unsafe: string): string; | ||
export declare function toAbsoluteUrl(fragment: string): string; | ||
//# sourceMappingURL=htmlHelpers.d.ts.map |
@@ -44,2 +44,8 @@ "use strict"; | ||
exports.escapeHtml = escapeHtml; | ||
function toAbsoluteUrl(fragment) { | ||
// Use absolute url because of https://github.com/stryker-mutator/mutation-testing-elements/issues/53 | ||
const url = new URL(window.location.href); | ||
return new URL(`#${fragment}`, url).href; | ||
} | ||
exports.toAbsoluteUrl = toAbsoluteUrl; | ||
//# sourceMappingURL=htmlHelpers.js.map |
@@ -11,3 +11,6 @@ "use strict"; | ||
*/ | ||
exports.locationChange$ = rxjs_1.merge(rxjs_1.of(1), rxjs_1.fromEvent(window, 'hashchange').pipe(operators_1.tap(event => event.preventDefault()))).pipe(operators_1.map(_ => window.location.hash.substr(1).split('/').filter(part => part !== ''))); | ||
exports.locationChange$ = rxjs_1.merge(rxjs_1.of(1), rxjs_1.fromEvent(window, 'hashchange').pipe(operators_1.tap(event => event.preventDefault()))).pipe(operators_1.map(_ => window.location.hash.substr(1) | ||
.split('/') | ||
.filter(Boolean) | ||
.map(decodeURIComponent))); | ||
//# sourceMappingURL=router.js.map |
{ | ||
"name": "mutation-testing-elements", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A suite of web components for a mutation testing report.", | ||
@@ -27,8 +27,8 @@ "unpkg": "dist/mutation-test-elements.js", | ||
"devDependencies": { | ||
"@types/lodash.groupby": "^4.6.5", | ||
"@types/lodash.groupby": "^4.6.6", | ||
"lodash.groupby": "^4.6.0", | ||
"mutation-testing-metrics": "^1.1.0", | ||
"mutation-testing-report-schema": "^1.1.0" | ||
"mutation-testing-metrics": "^1.1.1", | ||
"mutation-testing-report-schema": "^1.1.1" | ||
}, | ||
"gitHead": "aff9ba1038d4af340e4b9b510c2d2255daca1983" | ||
"gitHead": "fa77e5b53e66a603b90ba77c457991bbeddc5181" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
813767
66
2948