Tree Sweeper was designed to help people find and fix all the annoying errors in family trees: people dying before they're born, parents being born after their children, \n and the like. FamilySearch has tools to help with this, but Tree Sweeper is easier and faster to use.\n
\n
Getting Started
\n \n
\n
Once you log in to Tree Sweeper, there are a lot of options you can choose to set. However, by default it's ready to go! Just click on the \"Start Tree Sweep\" button and\n Tree Sweeper will download your family tree going 3 generations back from you, then will check that data for any of the errors we look for.\n There are many options you can adjust.
\n
\n
Tree Sweeper can check up to 7 generations at a time--the more it checks, the longer it takes. You are generation 0, your parents\n are generation 1, and so on.
\n
You can also change who Tree Sweeper starts at by selecting \"Someone Else\" for the starting point, then putting in their FamilySearch PID.
\n
\n
Next you can change which constraints are checked. A constraint is a rule ( or genealogical standard ), and TreeSweeper checks to see if someone in your family breaks any constraint. By default only constraints that indicate an error are checked,\n but there are different groups you can use that are more specific or even look for research opportunities. You can even choose \"Custom Constraints\" and pick them yourself!
\n
\n
When you have the options set to your liking, click \"Start Tree Sweep.\"
\n
Managing Results
\n
Tree Sweeper can give a lot of information, and you might not be interested in all of it. You can filter out types of results you're not interested in by using \"Filter Results\". \n You can also change the way the information is sorted, or even search for a specific name or FamilySearch PID.
\n
Understanding Results
\n
When Tree Sweeper finds a potential problem, it will add it to the list of results on the page. All of the issues associated with a person are grouped together, and a summary\n is displayed of the types of results Tree Sweeper has found. \n Tree Sweeper has 4 types of results, indicated by different color flags. They are:\n
\n
\n
Definite Error: Definite Errors are marked with flag. They indicate that something is definitely wrong. In many cases it just means\n that a date was entered wrong, but a lot of the time there is bad data associated with a person.
\n
Possible Error: Possible Errors are marked with flag. They indicate that something is unlikely, but not\n definitely wrong. In many cases there will be nothing wrong, but this can be a subtle indicator that something is wrong.
\n
Research Opportunity: Research Opportunities are marked with flag. They indicate a research opportunity. They don't \n indicate an error per se, but can give you somewhere to start with your own family history work.
\n
Okay Result: Okay Results are marked with flag. Tree Sweeper won't start out with anything marked as Okay, but \n it's pretty common for it to give you results that you know are all right. You can mark these as okay, and undo this decision later on if you want to.
\n
\n \n
That's about it. Thanks for using Tree Sweeper!
\n \n \n \n
\n
\n \n \n \n
\n
\n \n \n\n \n
\n
\n
\n
\n
Tree Sweeper Tutorial
\n \n
\n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
{{ getTitle() }}
\n \n \n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
"
/***/ }),
/***/ "./src/app/help/help.component.scss":
/*!******************************************!*\
!*** ./src/app/help/help.component.scss ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "/*\n * Make the component fill the whole space.\n */\n:host {\n flex: 1;\n display: block; }\n.mat-card {\n margin: 5px; }\n.impossible-flag {\n color: red; }\n.unlikely-flag {\n color: yellow; }\n.research-flag {\n color: purple; }\n.okay-flag {\n color: green; }\n"
/***/ }),
/***/ "./src/app/help/help.component.ts":
/*!****************************************!*\
!*** ./src/app/help/help.component.ts ***!
\****************************************/
/*! exports provided: HelpComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HelpComponent", function() { return HelpComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _link_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../link.service */ "./src/app/link.service.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var HelpComponent = /** @class */ (function () {
function HelpComponent(link, router) {
this.link = link;
this.router = router;
}
HelpComponent.prototype.ngOnInit = function () {
};
HelpComponent.prototype.openTutorial = function () {
this.tutorialIndex = 0;
$('#exampleModal').modal({});
};
HelpComponent.prototype.getTutorialIndex = function () {
return this.tutorialIndex;
};
HelpComponent.prototype.setTutorialIndex = function (index) {
this.tutorialIndex = index;
};
HelpComponent.prototype.getTitle = function () {
switch (this.tutorialIndex) {
case 0: return "Welcome";
case 1: return "Adjusting Options";
case 2: return "Changing the Starting Point";
case 3: return "Starting a Sweep";
case 4: return "Understanding Flags";
case 5: return "Understanding Results";
case 6: return "Marking Things Okay";
case 7: return "Sorting Results";
case 8: return "Filtering Results";
case 9: return "Contacting Us";
default: return "title";
}
};
HelpComponent.prototype.getImage = function () {
switch (this.tutorialIndex) {
case 0: return "./assets/icons/treesweeper.jpg";
case 1: return "./assets/options.png";
case 2: return "./assets/changing_start.png";
case 3: return "./assets/started.png";
case 4: return "./assets/flags.png";
case 5: return "./assets/results.png";
case 6: return "./assets/okay.png";
case 7: return "./assets/sort.png";
case 8: return "./assets/filter.png";
case 9: return "./assets/contact.png";
default: return "./assets/icons/treesweeper.jpg";
}
};
HelpComponent.prototype.getDescription = function () {
switch (this.tutorialIndex) {
case 0: return "Welcome to Tree Sweeper! This tutorial will show you everything you need to know to get started with Tree Sweeper. Feel free to skip it if you want!";
case 1: return "The two options you'll change the most are the number of generations and the constraint group. The number of generations is how many generations back from your starting point Tree Sweeper will check, and you can choose 1 to 7. The default is 3 generations, but you're more likely to see results if you check 5 or more.
The constraint group is the group of possible problems that Tree Sweeper looks for. Each one has a short description to tell you what kind of problems it's looking for. There's a bunch of them, try out different ones!";
case 2: return "Sometimes you may want to check the family tree of someone else on FamilySearch, not just your own. You can change the option 'Select Starting Point' to 'Someone Else' and enter the FamilySearch PID for the other person. The PID is an id given by FamilySearch and can be found on their FamilySearch page.";
case 3: return "Once you're ready to run Tree Sweeper, just click 'Start Tree Sweep.' The progress bar will appear and you'll receive messages telling you what Tree Sweeper is doing. Occasionally you may see a message saying that Tree Sweeper is waiting for Family Search servers; this is normal, and may last up to a minute. It means that FamilySearch is busy and Tree Sweeper's requests for information are being delayed.";
case 4: return "When you start seeing results, you will see 4 flag icons. The icons indicate how important something is. In this image, the numbers also indicate how many results with that type of flag have been received so far.
A red flag means that something is impossible or unheard of (a Definite Error).
A yellow flag means that something is unlikely, but not impossible (a Possible Error).
A purple flag means something is a Research Opportunity, not really an error.
A green flag means that you have marked something okay (an Okay Result).
";
case 5: return "When you click on a person to see their results, you will see a list of results that can also be clicked on, along with some information about that person. Clicking on one of their results will cause it to expand, like in this image. Each result has a flag, a message describing what might be wrong, and some prompts with information to verify.";
case 6: return "It is likely that sometimes you'll get a result that you know isn't a problem. When this happens, you can open that result and click the 'Mark Okay' button. By default, things that you mark okay will be hidden from view. At this time, Tree Sweeper won't remember what you've marked okay after you run another tree sweep.";
case 7: return "By default, Tree Sweeper sorts people by generation; that is, the number of generations they are back from you, with your most recent ancestors at the top of the list. However, you can change it to just sort by first name, or by most results.";
case 8: return "You can also choose to filter out certain results if you just aren't interested in them. Each result type can be filtered out, with 'Okay' results filtered out by default. Additionally, you can search for someone's name or FamilySearch PID. Their PID is a unique id assigned by FamilySearch and you can find it on their FamilySearch page.";
case 9: return "We would love to hear from you! If you have questions, comments, concerns, or suggestions please contact us! You can email us at fhtlab@gmail.com. We really appreciate feedback on how to make this app better!";
default: return "";
}
};
HelpComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-help',
template: __webpack_require__(/*! ./help.component.html */ "./src/app/help/help.component.html"),
styles: [__webpack_require__(/*! ./help.component.scss */ "./src/app/help/help.component.scss")]
}),
__metadata("design:paramtypes", [_link_service__WEBPACK_IMPORTED_MODULE_1__["LinkService"], _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"]])
], HelpComponent);
return HelpComponent;
}());
/***/ }),
/***/ "./src/app/home/home.component.html":
/*!******************************************!*\
!*** ./src/app/home/home.component.html ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n\n \n
\n"
/***/ }),
/***/ "./src/app/home/home.component.scss":
/*!******************************************!*\
!*** ./src/app/home/home.component.scss ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "/*\n * Make the component fill the whole space.\n */\n:host {\n flex: 1;\n display: block; }\n.test {\n align-content: center;\n padding: 0; }\n.container-fluid {\n padding-right: 5px;\n padding-left: 5px; }\n.row {\n margin-left: 0;\n margin-right: 0; }\n"
/***/ }),
/***/ "./src/app/home/home.component.ts":
/*!****************************************!*\
!*** ./src/app/home/home.component.ts ***!
\****************************************/
/*! exports provided: HomeComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HomeComponent", function() { return HomeComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var HomeComponent = /** @class */ (function () {
function HomeComponent() {
}
HomeComponent.prototype.ngOnInit = function () { };
HomeComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-home',
template: __webpack_require__(/*! ./home.component.html */ "./src/app/home/home.component.html"),
styles: [__webpack_require__(/*! ./home.component.scss */ "./src/app/home/home.component.scss")]
}),
__metadata("design:paramtypes", [])
], HomeComponent);
return HomeComponent;
}());
/***/ }),
/***/ "./src/app/importOptions.ts":
/*!**********************************!*\
!*** ./src/app/importOptions.ts ***!
\**********************************/
/*! exports provided: ImportOptions */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImportOptions", function() { return ImportOptions; });
/* harmony import */ var _constraintCategory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constraintCategory */ "./src/app/constraintCategory.ts");
var OPTIONS_KEY = "treesweeper-options";
var ImportOptions = /** @class */ (function () {
function ImportOptions() {
this.numGenerations = -1;
this.disabledConstraints = [];
this.enabledConstraints = [];
this.rootPid = '';
this.token = '';
}
ImportOptions.prototype.setDisabledConstraints = function (disabledConstraints) {
this.disabledConstraints = disabledConstraints;
var enabledConstraints = [];
// Load enabled constraints by looking at disabled constraints
var constraintCategories = new _constraintCategory__WEBPACK_IMPORTED_MODULE_0__["ConstraintCategory"]("").loadDefaults();
constraintCategories.forEach(function (category) {
category.constraints.forEach(function (constraint) {
// Check if constraint is disabled
var enabled = true;
disabledConstraints.forEach(function (constraintName) {
if (constraint.containsId(constraintName)) {
enabled = false;
}
});
// If constraint is enabled, add it to enabled constraints
if (enabled)
enabledConstraints.push(constraint.getId());
});
});
this.enabledConstraints = enabledConstraints;
};
ImportOptions.prototype.iWork = function () {
console.log("hello world!");
};
ImportOptions.loadFromStorage = function () {
if (sessionStorage.getItem(OPTIONS_KEY)) {
var temp = JSON.parse(sessionStorage.getItem(OPTIONS_KEY));
var options = new ImportOptions();
return Object.assign(options, temp);
}
else
return null;
};
return ImportOptions;
}());
/***/ }),
/***/ "./src/app/last-sweep-summary/last-sweep-summary.component.html":
/*!**********************************************************************!*\
!*** ./src/app/last-sweep-summary/last-sweep-summary.component.html ***!
\**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\n \n \n \n Options Used\n \n
\n \n"
/***/ }),
/***/ "./src/app/result-component/result-component.component.scss":
/*!******************************************************************!*\
!*** ./src/app/result-component/result-component.component.scss ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".yellow {\n color: yellow; }\n\n.mat-action-row {\n justify-content: space-between; }\n\n.mat-expansion-panel-header {\n padding: 10px; }\n\n.mat-list-item {\n height: auto;\n padding: 10px; }\n\n.myHeader {\n height: auto !important; }\n"
/***/ }),
/***/ "./src/app/result-component/result-component.component.ts":
/*!****************************************************************!*\
!*** ./src/app/result-component/result-component.component.ts ***!
\****************************************************************/
/*! exports provided: ResultComponentComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResultComponentComponent", function() { return ResultComponentComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _flaggedResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../flaggedResult */ "./src/app/flaggedResult.ts");
/* harmony import */ var _data_store_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data-store.service */ "./src/app/data-store.service.ts");
/* harmony import */ var _personResults__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../personResults */ "./src/app/personResults.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ResultComponentComponent = /** @class */ (function () {
function ResultComponentComponent(dataService) {
this.dataService = dataService;
this.result = null;
this.type = '';
this.person = null;
this.displayProbability = false;
}
ResultComponentComponent.prototype.ngOnInit = function () {
};
ResultComponentComponent.prototype.toggleOkay = function (person, result) {
person.toggleOkay(result);
this.dataService.dataChanged();
};
ResultComponentComponent.prototype.flagColor = function () {
switch (this.type) {
case "IMPOSSIBLE": return "red";
case "UNLIKELY": return "yellow";
case "RESEARCH": return "purple";
case "OKAY": return "green";
default: return "blue";
}
};
ResultComponentComponent.prototype.tooltipText = function (result) {
switch (this.type) {
case "IMPOSSIBLE": return "This is impossible.";
case "UNLIKELY": return "This is unlikely; the probability is " + this.prettyProbability(result.probability);
case "RESEARCH": return "This could use more research.";
case "OKAY": return "This has been marked OK.";
default: return "";
}
};
ResultComponentComponent.prototype.prettyProbability = function (probability) {
var percent = probability * 100;
return percent.toFixed(4) + "%";
};
ResultComponentComponent.prototype.probabilityButtonText = function () {
if (this.displayProbability)
return "Hide Probability";
else
return "Show Probability";
};
ResultComponentComponent.prototype.probabilityButtonIcon = function () {
if (this.displayProbability)
return "visibility_off";
else
return "visibility";
};
ResultComponentComponent.prototype.okayButtonIcon = function () {
if (this.type === "OKAY")
return "cancel";
else
return "check_circle_outline";
};
ResultComponentComponent.prototype.okayButtonText = function () {
if (this.type === "OKAY")
return "Mark Not OK";
else
return "Mark OK";
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", _flaggedResult__WEBPACK_IMPORTED_MODULE_1__["FlaggedResult"])
], ResultComponentComponent.prototype, "result", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], ResultComponentComponent.prototype, "type", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", _personResults__WEBPACK_IMPORTED_MODULE_3__["PersonResults"])
], ResultComponentComponent.prototype, "person", void 0);
ResultComponentComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-result-component',
template: __webpack_require__(/*! ./result-component.component.html */ "./src/app/result-component/result-component.component.html"),
styles: [__webpack_require__(/*! ./result-component.component.scss */ "./src/app/result-component/result-component.component.scss")]
}),
__metadata("design:paramtypes", [_data_store_service__WEBPACK_IMPORTED_MODULE_2__["DataStoreService"]])
], ResultComponentComponent);
return ResultComponentComponent;
}());
/***/ }),
/***/ "./src/app/result-list/result-list.component.html":
/*!********************************************************!*\
!*** ./src/app/result-list/result-list.component.html ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/result-list/result-list.component.scss":
/*!********************************************************!*\
!*** ./src/app/result-list/result-list.component.scss ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".impossible-flag {\n color: red; }\n\n.unlikely-flag {\n color: yellow; }\n\n.research-flag {\n color: purple; }\n\n.okay-flag {\n color: green; }\n"
/***/ }),
/***/ "./src/app/result-list/result-list.component.ts":
/*!******************************************************!*\
!*** ./src/app/result-list/result-list.component.ts ***!
\******************************************************/
/*! exports provided: ResultListComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResultListComponent", function() { return ResultListComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _personResults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../personResults */ "./src/app/personResults.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ResultListComponent = /** @class */ (function () {
function ResultListComponent() {
}
ResultListComponent.prototype.ngOnInit = function () {
};
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", String)
], ResultListComponent.prototype, "type", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", Array)
], ResultListComponent.prototype, "results", void 0);
__decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
__metadata("design:type", _personResults__WEBPACK_IMPORTED_MODULE_1__["PersonResults"])
], ResultListComponent.prototype, "person", void 0);
ResultListComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-result-list',
template: __webpack_require__(/*! ./result-list.component.html */ "./src/app/result-list/result-list.component.html"),
styles: [__webpack_require__(/*! ./result-list.component.scss */ "./src/app/result-list/result-list.component.scss")]
}),
__metadata("design:paramtypes", [])
], ResultListComponent);
return ResultListComponent;
}());
/***/ }),
/***/ "./src/app/serializer.service.ts":
/*!***************************************!*\
!*** ./src/app/serializer.service.ts ***!
\***************************************/
/*! exports provided: SerializerService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SerializerService", function() { return SerializerService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _flaggedResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./flaggedResult */ "./src/app/flaggedResult.ts");
/* harmony import */ var _personResults__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./personResults */ "./src/app/personResults.ts");
/* harmony import */ var _checkerResults__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./checkerResults */ "./src/app/checkerResults.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var SerializerService = /** @class */ (function () {
function SerializerService() {
}
SerializerService.prototype.deserializeFlaggedResult = function (model) {
var temp = new _flaggedResult__WEBPACK_IMPORTED_MODULE_1__["FlaggedResult"]();
return Object.assign(temp, model);
};
SerializerService.prototype.deserializePersonResults = function (model) {
var temp = new _personResults__WEBPACK_IMPORTED_MODULE_2__["PersonResults"](model.name, model.pid, model.generation);
// Deserialize flagged results
for (var i = 0; i < model["impossible"].length; ++i) {
var element = model["impossible"][i];
var result = this.deserializeFlaggedResult(element);
temp.impossible.push(result);
}
for (var i = 0; i < model["unlikely"].length; ++i) {
var element = model["unlikely"][i];
var result = this.deserializeFlaggedResult(element);
temp.unlikely.push(result);
}
for (var i = 0; i < model["research"].length; ++i) {
var element = model["research"][i];
var result = this.deserializeFlaggedResult(element);
temp.research.push(result);
}
for (var i = 0; i < model["okay"].length; ++i) {
var element = model["okay"][i];
var result = this.deserializeFlaggedResult(element);
temp.okay.push(result);
}
return temp;
};
SerializerService.prototype.deserializeCheckerResults = function (json) {
var temp = JSON.parse(json);
var target = new _checkerResults__WEBPACK_IMPORTED_MODULE_3__["CheckerResults"]();
target.setTotal(temp.totalResults);
target.numImpossible = temp.numImpossible;
target.numUnlikely = temp.numUnlikely;
target.numResearch = temp.numResearch;
// Get all person results
for (var pid in temp.rawResults) {
if (temp.rawResults.hasOwnProperty(pid)) {
var person = this.deserializePersonResults(temp.rawResults[pid]);
target.setPerson(person);
}
}
return target;
};
SerializerService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
providedIn: 'root'
}),
__metadata("design:paramtypes", [])
], SerializerService);
return SerializerService;
}());
/***/ }),
/***/ "./src/app/session-expired/session-expired.component.html":
/*!****************************************************************!*\
!*** ./src/app/session-expired/session-expired.component.html ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "
\n session-expired works!\n
\n"
/***/ }),
/***/ "./src/app/session-expired/session-expired.component.scss":
/*!****************************************************************!*\
!*** ./src/app/session-expired/session-expired.component.scss ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
/***/ }),
/***/ "./src/app/session-expired/session-expired.component.ts":
/*!**************************************************************!*\
!*** ./src/app/session-expired/session-expired.component.ts ***!
\**************************************************************/
/*! exports provided: SessionExpiredComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SessionExpiredComponent", function() { return SessionExpiredComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var SessionExpiredComponent = /** @class */ (function () {
function SessionExpiredComponent() {
}
SessionExpiredComponent.prototype.ngOnInit = function () {
};
SessionExpiredComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-session-expired',
template: __webpack_require__(/*! ./session-expired.component.html */ "./src/app/session-expired/session-expired.component.html"),
styles: [__webpack_require__(/*! ./session-expired.component.scss */ "./src/app/session-expired/session-expired.component.scss")]
}),
__metadata("design:paramtypes", [])
], SessionExpiredComponent);
return SessionExpiredComponent;
}());
/***/ }),
/***/ "./src/app/socket.ts":
/*!***************************!*\
!*** ./src/app/socket.ts ***!
\***************************/
/*! exports provided: TreeSweepSocket */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TreeSweepSocket", function() { return TreeSweepSocket; });
/* harmony import */ var _updates__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./updates */ "./src/app/updates.ts");
var TreeSweepSocket = /** @class */ (function () {
function TreeSweepSocket(url, status, options, dataService) {
// Open the connection
var socket = new WebSocket(url);
this.socket = socket;
// Define behavior for different events
socket.onopen = function () {
socket.send(JSON.stringify(options, null, 2));
keepAlive();
};
socket.onmessage = function (message) {
// First, figure out what type of message this is
try {
var input = JSON.parse(message.data);
try {
var update = _updates__WEBPACK_IMPORTED_MODULE_0__["Update"].typeOfUpdate(input);
dataService.handleUpdate(update);
}
catch (err) {
// Something went wrong while deserializing and classifying the object
console.error(err);
}
}
catch (err) {
// Not an object
console.log(message.data);
}
};
socket.onclose = function () {
status.loading = false;
cancelKeepAlive();
dataService.saveSweep();
};
socket.onerror = function (error) {
status.loading = false;
console.error(error.type);
cancelKeepAlive();
dataService.saveSweep();
};
// These functions are necessary for keeping the socket open
var timerId;
var keepAlive = function () {
var timeout = 5000;
if (socket.readyState === socket.OPEN)
socket.send("");
timerId = setTimeout(keepAlive, timeout);
};
var cancelKeepAlive = function () {
if (timerId)
clearTimeout(timerId);
};
}
TreeSweepSocket.prototype.kill = function () {
if (this.socket)
this.socket.close();
};
return TreeSweepSocket;
}());
/***/ }),
/***/ "./src/app/sorter.ts":
/*!***************************!*\
!*** ./src/app/sorter.ts ***!
\***************************/
/*! exports provided: Sorter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sorter", function() { return Sorter; });
var Sorter = /** @class */ (function () {
function Sorter(filter) {
this.sortMethod = "generation";
this.filter = filter;
}
Sorter.prototype.getMethod = function () {
return this.sortMethod;
};
Sorter.prototype.sortBy = function (type) {
this.sortMethod = type;
};
Sorter.prototype.sort = function (input) {
switch (this.sortMethod) {
case "name": return this.sortByName(input);
case "results": return this.sortByResults(input);
case "generation": return this.sortByGeneration(input);
default: return input;
}
};
Sorter.prototype.sortByName = function (input) {
return input.sort(function (a, b) {
if (a.getName() < b.getName())
return -1;
else if (a.getName() === b.getName())
return 0;
else
return 1;
});
};
Sorter.prototype.sortByResults = function (input) {
var fil = this.filter;
return input.sort(function (a, b) {
var value = b.totalResults(fil) - a.totalResults(fil);
if (value !== 0)
return value;
else {
// If number of results is the same, sort by name.
if (a.getName() < b.getName())
return -1;
else if (a.getName() === b.getName())
return 0;
else
return 1;
}
});
};
Sorter.prototype.sortByGeneration = function (input) {
return input.sort(function (a, b) {
var value = a.getGeneration() - b.getGeneration();
if (value !== 0)
return value;
else {
// If generation is the same, sort by name.
if (a.getName() < b.getName())
return -1;
else if (a.getName() === b.getName())
return 0;
else
return 1;
}
});
};
return Sorter;
}());
/***/ }),
/***/ "./src/app/start/start.component.html":
/*!********************************************!*\
!*** ./src/app/start/start.component.html ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\n
\n
Welcome to {{link.APP_NAME}}!
\n
{{appDescription}}
\n
\n
\n \n
\n\n \n\n
\n \n
\n\n "
/***/ }),
/***/ "./src/app/start/start.component.scss":
/*!********************************************!*\
!*** ./src/app/start/start.component.scss ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".welcome-card {\n font-family: Arial, Helvetica, sans-serif;\n font-weight: lighter; }\n\n.welcome-title {\n font-weight: lighter; }\n\n.app-description {\n max-width: 80%;\n display: block;\n margin: auto; }\n\n.partner-section {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 30px; }\n\n.partner-logo {\n width: 120px;\n text-align: center;\n padding: 0px 20px; }\n\n.login-button {\n width: 250px;\n max-width: 100%; }\n\n.button-border {\n padding: 30px; }\n\n@media screen and (min-width: 1100px) {\n .welcome-card {\n max-width: 1000px;\n margin: 20px auto; } }\n"
/***/ }),
/***/ "./src/app/start/start.component.ts":
/*!******************************************!*\
!*** ./src/app/start/start.component.ts ***!
\******************************************/
/*! exports provided: StartComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StartComponent", function() { return StartComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _utils_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.service */ "./src/app/utils.service.ts");
/* harmony import */ var _fs_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../fs.service */ "./src/app/fs.service.ts");
/* harmony import */ var _link_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../link.service */ "./src/app/link.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var StartComponent = /** @class */ (function () {
function StartComponent(utilsService, fsService, link) {
this.utilsService = utilsService;
this.fsService = fsService;
this.link = link;
this.appDescription = "Have you ever been looking at your family tree and found someone who died before they were born? Have you ever wished someone would fix all those annoying mistakes people make? Tree Sweeper will help you find the errors that have been put into your family tree so you can sweep them away!";
this.partnerLogos = [
'../../assets/icons/cs-logo.png',
'../../assets/icons/fhtl.png',
];
}
StartComponent.prototype.ngOnInit = function () {
};
StartComponent.prototype.doLogin = function () {
this.fsService.verifyAuthReady();
};
StartComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-start',
template: __webpack_require__(/*! ./start.component.html */ "./src/app/start/start.component.html"),
styles: [__webpack_require__(/*! ./start.component.scss */ "./src/app/start/start.component.scss")]
}),
__metadata("design:paramtypes", [_utils_service__WEBPACK_IMPORTED_MODULE_1__["UtilsService"], _fs_service__WEBPACK_IMPORTED_MODULE_2__["FsService"], _link_service__WEBPACK_IMPORTED_MODULE_3__["LinkService"]])
], StartComponent);
return StartComponent;
}());
/***/ }),
/***/ "./src/app/status.ts":
/*!***************************!*\
!*** ./src/app/status.ts ***!
\***************************/
/*! exports provided: Status */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Status", function() { return Status; });
var Status = /** @class */ (function () {
function Status(target) {
this.loading = false;
this.mode = "determinate";
this.buffer = 0;
this.target = target;
this.value = 0;
this.buffer = 0;
}
Status.prototype.setValue = function (value) {
this.value = value;
};
Status.prototype.setTarget = function (value) {
this.target = value;
};
Status.prototype.getProgress = function () {
return (this.value / this.target) * 100;
};
return Status;
}());
/***/ }),
/***/ "./src/app/sweep-options/sweep-options.component.html":
/*!************************************************************!*\
!*** ./src/app/sweep-options/sweep-options.component.html ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\n Options\n \n \n \n\n \n \n \n \n \n \n {{number}}\n \n \n\n \n \n \n Current User\n Someone Else\n \n \n \n \n \n \n \n\n \n \n \n Check Everything\n Research Opportunities Only\n Possible Errors Only\n Definite Errors Only\n Custom Constraints\n \n \n\n \n
{{getDescription()}}
\n\n \n \n \n \n {{category.name}}\n \n
\n {{constraint.getId()}}\n \n
\n \n \n \n\n\n \n\n\n"
/***/ }),
/***/ "./src/app/sweep-options/sweep-options.component.scss":
/*!************************************************************!*\
!*** ./src/app/sweep-options/sweep-options.component.scss ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".mat-card {\n margin: 5px;\n margin-left: 0; }\n\n.mat-form-field {\n width: 100%; }\n\np {\n text-align: left; }\n\n.mat-spinner {\n margin: 0 auto; }\n\n.mat-checkbox-label {\n white-space: normal; }\n"
/***/ }),
/***/ "./src/app/sweep-options/sweep-options.component.ts":
/*!**********************************************************!*\
!*** ./src/app/sweep-options/sweep-options.component.ts ***!
\**********************************************************/
/*! exports provided: SweepOptionsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SweepOptionsComponent", function() { return SweepOptionsComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _constraintCategory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constraintCategory */ "./src/app/constraintCategory.ts");
/* harmony import */ var _importOptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../importOptions */ "./src/app/importOptions.ts");
/* harmony import */ var _fs_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../fs.service */ "./src/app/fs.service.ts");
/* harmony import */ var _data_store_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data-store.service */ "./src/app/data-store.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var SweepOptionsComponent = /** @class */ (function () {
function SweepOptionsComponent(fsService, dataService) {
this.fsService = fsService;
this.dataService = dataService;
this.generationOptions = ["1", "2", "3", "4", "5", "6", "7"];
this.numGenerations = "3";
this.constraintGroup = "No Research";
this.isCustom = false;
}
SweepOptionsComponent.prototype.ngOnInit = function () {
// This would call a static method if I wanted to take the time to figure it out.
this.constraintCategories = new _constraintCategory__WEBPACK_IMPORTED_MODULE_1__["ConstraintCategory"]("").loadDefaults();
this.selectAllButResearch();
};
// Starts a new tree sweep using the options currently specified
SweepOptionsComponent.prototype.startSweep = function () {
// Generate constraint options object
var importOptions = new _importOptions__WEBPACK_IMPORTED_MODULE_2__["ImportOptions"]();
importOptions.constraintGroup = this.constraintGroup;
importOptions.numGenerations = parseInt(this.numGenerations);
if (this.dataService.useCurrentUser) {
// Use current user's pid as root
importOptions.rootPid = this.fsService.fsSession.fs_user.pid;
}
else {
// Use manual pid as root
importOptions.rootPid = this.dataService.rootPid.trim();
;
}
importOptions.token = this.fsService.fsSession.fs_access_token;
// Determine which constraints are disabled
var disabledConstraints = [];
this.constraintCategories.forEach(function (category) {
category.constraints.forEach(function (constraint) {
if (!constraint.isEnabled()) {
var ids = constraint.getIds();
ids.forEach(function (id) {
disabledConstraints.push(id);
});
}
});
});
importOptions.setDisabledConstraints(disabledConstraints);
// Start sweep
this.dataService.newSweep(importOptions);
};
// Returns a description of the current constraint category
SweepOptionsComponent.prototype.getDescription = function () {
switch (this.constraintGroup) {
case "All": return "This group checks for everything: definite errors, possible errors, and research opportunities.";
case "Impossible": return "This group only looks for definite errors. Any results you see indicate that something is definitely incorrect.";
case "Research": return "These constraints only give research opportunities. They may not tell you any problems, but will give you ideas of where to do your own research.";
case "Custom": return "Choose what you want to look for!";
case "No Research": return "This group only looks for possible errors and will not give you any additional research opportunities.";
default: return "";
}
};
// Enables all constraints
SweepOptionsComponent.prototype.enableConstraints = function () {
this.constraintCategories.forEach(function (category) {
category.constraints.forEach(function (constraint) { constraint.setEnabled(true); });
});
};
// Disables all constraints
SweepOptionsComponent.prototype.disableConstraints = function () {
this.constraintCategories.forEach(function (category) {
category.constraints.forEach(function (constraint) { constraint.setEnabled(false); });
});
};
// Enables a specific constraint
SweepOptionsComponent.prototype.enableConstraint = function (categoryName, constraintName) {
this.constraintCategories.forEach(function (category) {
if (category.name === categoryName)
category.constraints.forEach(function (constraint) {
if (constraint.getId() === constraintName)
constraint.setEnabled(true);
});
});
};
// Disables a specific constraint
SweepOptionsComponent.prototype.disableConstraint = function (categoryName, constraintName) {
this.constraintCategories.forEach(function (category) {
if (category.name === categoryName)
category.constraints.forEach(function (constraint) {
if (constraint.getId() === constraintName)
constraint.setEnabled(false);
});
});
};
// Enables all constraints and sets the constraint group to "All"
SweepOptionsComponent.prototype.selectAllConstraints = function () {
this.constraintGroup = "All";
this.isCustom = false;
this.enableConstraints();
};
SweepOptionsComponent.prototype.selectAllButResearch = function () {
this.constraintGroup = "No Research";
this.isCustom = false;
this.enableConstraints();
// Disable research constraints
this.disableConstraint("Research", "Person should have sources");
this.disableConstraint("Research", "Couple should not be missing children");
this.disableConstraint("Research", "Person should not be missing a spouse");
this.disableConstraint("Research", "Person should have a known gender");
this.disableConstraint("Research", "Person should have vital dates");
this.disableConstraint("Research", "Parents should not have duplicate children");
this.disableConstraint("Research", "Children should not have duplicate parents");
this.disableConstraint("Research", "People should not have duplicate spouses");
};
// Enables only impossibility constraints and sets the constraint group to "Impossible"
SweepOptionsComponent.prototype.selectImpossibleConstraints = function () {
this.constraintGroup = "Impossible";
this.isCustom = false;
this.disableConstraints();
// Enable constraints that return impossibilities
this.enableConstraint("Christening", "Person should be christened in their lifespan");
this.enableConstraint("Parent-Child Relationship", "Parent's children should be born during their lifespan");
this.enableConstraint("Parent-Child Relationship", "Person should not have too many parents");
this.enableConstraint("Parent-Child Relationship", "Person should not be their own ancestor");
this.enableConstraint("Marriage", "Person should be married in their lifespan");
this.enableConstraint("Lifespan", "Person should die after they were born");
};
// Enables only research constraints and sets the constraint group to "Research"
SweepOptionsComponent.prototype.selectResearchConstraints = function () {
this.constraintGroup = "Research";
this.isCustom = false;
this.disableConstraints();
// Enable constraints that return research opportunities
this.enableConstraint("Research", "Person should have sources");
this.enableConstraint("Research", "Couple should not be missing children");
this.enableConstraint("Research", "Person should not be missing a spouse");
this.enableConstraint("Research", "Person should have a known gender");
this.enableConstraint("Research", "Person should have vital dates");
this.enableConstraint("Research", "Parents should not have duplicate children");
this.enableConstraint("Research", "Children should not have duplicate parents");
this.enableConstraint("Research", "People should not have duplicate spouses");
};
// Disables all constraints, sets the constraint group to "Custom", and exposes constraints for manual selection
SweepOptionsComponent.prototype.selectCustomConstraints = function () {
this.constraintGroup = "Custom";
this.isCustom = true;
this.disableConstraints();
};
SweepOptionsComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-sweep-options',
template: __webpack_require__(/*! ./sweep-options.component.html */ "./src/app/sweep-options/sweep-options.component.html"),
styles: [__webpack_require__(/*! ./sweep-options.component.scss */ "./src/app/sweep-options/sweep-options.component.scss")]
}),
__metadata("design:paramtypes", [_fs_service__WEBPACK_IMPORTED_MODULE_3__["FsService"], _data_store_service__WEBPACK_IMPORTED_MODULE_4__["DataStoreService"]])
], SweepOptionsComponent);
return SweepOptionsComponent;
}());
/***/ }),
/***/ "./src/app/sweep-results/sweep-results.component.html":
/*!************************************************************!*\
!*** ./src/app/sweep-results/sweep-results.component.html ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "\n Results of Last Sweep\n \n \n \n \n \n \n
\n \n \n
No results! Try sweeping more generations or adjusting the filters.
\n \n \n \n \n \n\n\n No results yet! Set any options you want, and click \"Start Tree Sweep!\"\n"
/***/ }),
/***/ "./src/app/sweep-results/sweep-results.component.scss":
/*!************************************************************!*\
!*** ./src/app/sweep-results/sweep-results.component.scss ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ".mat-card {\n margin: 5px;\n margin-left: 0;\n width: 100%; }\n"
/***/ }),
/***/ "./src/app/sweep-results/sweep-results.component.ts":
/*!**********************************************************!*\
!*** ./src/app/sweep-results/sweep-results.component.ts ***!
\**********************************************************/
/*! exports provided: SweepResultsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SweepResultsComponent", function() { return SweepResultsComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _data_store_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data-store.service */ "./src/app/data-store.service.ts");
/* harmony import */ var _pdf_service_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../pdf-service.service */ "./src/app/pdf-service.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var SweepResultsComponent = /** @class */ (function () {
function SweepResultsComponent(dataService, pdfService) {
this.dataService = dataService;
this.pdfService = pdfService;
}
SweepResultsComponent.prototype.ngOnInit = function () {
};
SweepResultsComponent = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
selector: 'app-sweep-results',
template: __webpack_require__(/*! ./sweep-results.component.html */ "./src/app/sweep-results/sweep-results.component.html"),
styles: [__webpack_require__(/*! ./sweep-results.component.scss */ "./src/app/sweep-results/sweep-results.component.scss")]
}),
__metadata("design:paramtypes", [_data_store_service__WEBPACK_IMPORTED_MODULE_1__["DataStoreService"], _pdf_service_service__WEBPACK_IMPORTED_MODULE_2__["PdfServiceService"]])
], SweepResultsComponent);
return SweepResultsComponent;
}());
/***/ }),
/***/ "./src/app/updates.ts":
/*!****************************!*\
!*** ./src/app/updates.ts ***!
\****************************/
/*! exports provided: Update, MessageUpdate, ErrorUpdate, ResultUpdate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Update", function() { return Update; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MessageUpdate", function() { return MessageUpdate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorUpdate", function() { return ErrorUpdate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResultUpdate", function() { return ResultUpdate; });
/* harmony import */ var _flaggedResult__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./flaggedResult */ "./src/app/flaggedResult.ts");
var __extends = (undefined && undefined.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var Update = /** @class */ (function () {
function Update() {
}
Update.typeOfUpdate = function (input) {
if (input.type) {
switch (input.type) {
case "UPDATE": return new MessageUpdate(input);
case "ERROR": return new ErrorUpdate(input);
case "RESULT": return new ResultUpdate(input);
default: throw "Update has unknown type: " + input.type;
}
}
else
throw "Update has no type";
};
Update.prototype.execute = function (arg) { };
return Update;
}());
var MessageUpdate = /** @class */ (function (_super) {
__extends(MessageUpdate, _super);
function MessageUpdate(model) {
var _this = _super.call(this) || this;
if (model.message)
_this.message = model.message;
if (model.submessage)
_this.submessage = model.submessage;
if (model.target && model.target >= 0)
_this.target = model.target;
if (model.progress && model.progress >= 0)
_this.progress = model.progress;
return _this;
}
MessageUpdate.prototype.execute = function (arg) {
if (this.message)
arg.message = this.message;
if (this.submessage)
arg.status.mode = "indeterminate";
else
arg.status.mode = "determinate";
if (this.target && this.target >= 0)
arg.status.setTarget(this.target);
if (this.progress && this.progress >= 0)
arg.status.setValue(this.progress);
};
return MessageUpdate;
}(Update));
var ErrorUpdate = /** @class */ (function (_super) {
__extends(ErrorUpdate, _super);
function ErrorUpdate(model) {
var _this = _super.call(this) || this;
if (model.message)
_this.message = model.message;
return _this;
}
ErrorUpdate.prototype.execute = function (arg) {
if (this.message === 'Your session has expired. Please log in again to continue.') {
// Handle logout
var r = confirm(this.message);
if (r === true) {
window.location.href = '/logout';
}
}
else {
// Alert user of error
alert(this.message);
}
};
return ErrorUpdate;
}(Update));
var ResultUpdate = /** @class */ (function (_super) {
__extends(ResultUpdate, _super);
function ResultUpdate(model) {
var _this = _super.call(this) || this;
if (model.result) {
// Copy flagged result, because it has lost its class
var temp = new _flaggedResult__WEBPACK_IMPORTED_MODULE_0__["FlaggedResult"]();
_this.result = Object.assign(temp, model.result);
}
return _this;
}
ResultUpdate.prototype.execute = function (arg) {
if (this.result)
arg.addData(this.result);
arg.saveSweep();
};
return ResultUpdate;
}(Update));
/***/ }),
/***/ "./src/app/utils.service.ts":
/*!**********************************!*\
!*** ./src/app/utils.service.ts ***!
\**********************************/
/*! exports provided: UtilsService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UtilsService", function() { return UtilsService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
/* harmony import */ var _loader_loader_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./loader/loader.component */ "./src/app/loader/loader.component.ts");
/* harmony import */ var _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/esm5/overlay.es5.js");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var UtilsService = /** @class */ (function () {
function UtilsService(dialog, overlay) {
this.dialog = dialog;
this.overlay = overlay;
}
UtilsService.prototype.displayLoader = function (message, autoclose, duration) {
if (autoclose === void 0) { autoclose = true; }
if (duration === void 0) { duration = 2000; }
var dialogRef = this.dialog.open(_loader_loader_component__WEBPACK_IMPORTED_MODULE_2__["LoaderComponent"], {
data: { message: message },
minHeight: '80px',
minWidth: '230px',
scrollStrategy: this.overlay.scrollStrategies.block()
});
if (autoclose) {
setTimeout(function () {
dialogRef.close();
}, duration);
}
else {
return dialogRef;
}
};
UtilsService = __decorate([
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
providedIn: 'root'
}),
__metadata("design:paramtypes", [_angular_material__WEBPACK_IMPORTED_MODULE_1__["MatDialog"], _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_3__["Overlay"]])
], UtilsService);
return UtilsService;
}());
/***/ }),
/***/ "./src/environments/environment.ts":
/*!*****************************************!*\
!*** ./src/environments/environment.ts ***!
\*****************************************/
/*! exports provided: environment */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "environment", function() { return environment; });
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
var environment = {
production: false
};
/*
* In development mode, to ignore zone related error stack frames such as
* `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
* import the following file, but please comment it out in production mode
* because it will have performance impact when throw error
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
/***/ }),
/***/ "./src/main.ts":
/*!*********************!*\
!*** ./src/main.ts ***!
\*********************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser-dynamic */ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js");
/* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app/app.module */ "./src/app/app.module.ts");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! hammerjs */ "./node_modules/hammerjs/hammer.js");
/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(hammerjs__WEBPACK_IMPORTED_MODULE_4__);
if (_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].production) {
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["enableProdMode"])();
}
Object(_angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__["platformBrowserDynamic"])().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_2__["AppModule"])
.catch(function (err) { return console.log(err); });
/***/ }),
/***/ 0:
/*!***************************!*\
!*** multi ./src/main.ts ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! /www/treesweeper/src/treesweeper2-front-end/src/main.ts */"./src/main.ts");
/***/ })
},[[0,"runtime","vendor"]]]);
//# sourceMappingURL=main.js.map