@eo4geo/ngx-bok-visualization 1.3.13 → 1.3.15
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.
- package/README.md +179 -179
- package/fesm2022/eo4geo-ngx-bok-visualization.mjs +85 -15
- package/fesm2022/eo4geo-ngx-bok-visualization.mjs.map +1 -1
- package/lib/model/DeprecatedConcept.d.ts +13 -0
- package/lib/services/bok-firebase.service.d.ts +4 -0
- package/lib/services/bok-information.service.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Output, Input, Component, Pipe, Injectable, ViewContainerRef, ViewChild } from '@angular/core';
|
|
2
|
+
import { EventEmitter, Output, Input, Component, Pipe, inject, Injectable, ViewContainerRef, ViewChild } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { select } from 'd3-selection';
|
|
@@ -27,7 +27,8 @@ import { DataView } from 'primeng/dataview';
|
|
|
27
27
|
import * as i1$1 from '@angular/cdk/layout';
|
|
28
28
|
import * as i4$1 from 'primeng/scrolltop';
|
|
29
29
|
import { ScrollTopModule } from 'primeng/scrolltop';
|
|
30
|
-
import { BehaviorSubject, concatMap, of, tap, filter, map, forkJoin, catchError, from, take, expand, takeWhile } from 'rxjs';
|
|
30
|
+
import { BehaviorSubject, concatMap, of, tap, filter, map, forkJoin, catchError, from, take, expand, takeWhile, switchMap } from 'rxjs';
|
|
31
|
+
import { Firestore, collection, doc, getDoc } from '@angular/fire/firestore';
|
|
31
32
|
import * as i1$2 from '@angular/common/http';
|
|
32
33
|
|
|
33
34
|
class CustomD3NodeCollection {
|
|
@@ -461,11 +462,11 @@ class ListComponent {
|
|
|
461
462
|
return 0;
|
|
462
463
|
};
|
|
463
464
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
464
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: ListComponent, isStandalone: true, selector: "list", inputs: { array: "array", propertyname: "propertyname", propertyname2: "propertyname2", headline: "headline", isConcept: "isConcept" }, outputs: { codSelectedChange: "codSelectedChange" }, ngImport: i0, template: "<div *ngIf=\"array && array.length > 0\">\
|
|
465
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: ListComponent, isStandalone: true, selector: "list", inputs: { array: "array", propertyname: "propertyname", propertyname2: "propertyname2", headline: "headline", isConcept: "isConcept" }, outputs: { codSelectedChange: "codSelectedChange" }, ngImport: i0, template: "<div *ngIf=\"array && array.length > 0\">\n <h3>{{ headline }} [{{ array.length }}]</h3>\n <div>\n <ul [ngStyle]=\"{'list-style-type': isConcept ? 'none' : 'disc', 'padding-left': isConcept ? '1em' : '2em'}\">\n <ng-container *ngFor=\"let item of sortedArray; let i = index\">\n <li style=\"margin-top: 0.25em;\">\n <!-- Conditional Rendering based on the Headline -->\n <ng-container [ngSwitch]=\"isConcept\">\n <!-- Concept -->\n <a\n *ngSwitchCase=\"true\"\n style=\"font-weight: 400; cursor: pointer;\"\n (click)=\"browseToConcept(item[propertyname2!])\"\n id=\"sc-{{ mapValue(item) }}\"\n >\n [{{ item[propertyname2!] }}] {{ mapValue(item) }}\n </a>\n <!-- No Concept -->\n <div *ngSwitchCase=\"false\">\n <!-- URL -->\n <a\n *ngIf=\"propertyname2 && item[propertyname2] && item[propertyname2].trim().length > 0\"\n style=\"font-weight: 400; cursor: pointer; text-decoration: none;\"\n [href]=\"item[propertyname2]\"\n target=\"_blank\"\n >\n {{ mapValue(item) }}\n </a>\n <!-- Text -->\n <span *ngIf=\"!propertyname2 || !item[propertyname2] || item[propertyname2].trim().length == 0\">\n {{ mapValue(item) }}\n </span>\n </div>\n <!-- Default -->\n <a *ngSwitchDefault>{{ mapValue(item) }}</a>\n </ng-container>\n </li>\n </ng-container>\n </ul>\n </div>\n</div>\n ", styles: ["a{color:var(--secondary-color)}a:hover{color:var(--hover-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
|
|
465
466
|
}
|
|
466
467
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ListComponent, decorators: [{
|
|
467
468
|
type: Component,
|
|
468
|
-
args: [{ standalone: true, selector: 'list', imports: [CommonModule], template: "<div *ngIf=\"array && array.length > 0\">\
|
|
469
|
+
args: [{ standalone: true, selector: 'list', imports: [CommonModule], template: "<div *ngIf=\"array && array.length > 0\">\n <h3>{{ headline }} [{{ array.length }}]</h3>\n <div>\n <ul [ngStyle]=\"{'list-style-type': isConcept ? 'none' : 'disc', 'padding-left': isConcept ? '1em' : '2em'}\">\n <ng-container *ngFor=\"let item of sortedArray; let i = index\">\n <li style=\"margin-top: 0.25em;\">\n <!-- Conditional Rendering based on the Headline -->\n <ng-container [ngSwitch]=\"isConcept\">\n <!-- Concept -->\n <a\n *ngSwitchCase=\"true\"\n style=\"font-weight: 400; cursor: pointer;\"\n (click)=\"browseToConcept(item[propertyname2!])\"\n id=\"sc-{{ mapValue(item) }}\"\n >\n [{{ item[propertyname2!] }}] {{ mapValue(item) }}\n </a>\n <!-- No Concept -->\n <div *ngSwitchCase=\"false\">\n <!-- URL -->\n <a\n *ngIf=\"propertyname2 && item[propertyname2] && item[propertyname2].trim().length > 0\"\n style=\"font-weight: 400; cursor: pointer; text-decoration: none;\"\n [href]=\"item[propertyname2]\"\n target=\"_blank\"\n >\n {{ mapValue(item) }}\n </a>\n <!-- Text -->\n <span *ngIf=\"!propertyname2 || !item[propertyname2] || item[propertyname2].trim().length == 0\">\n {{ mapValue(item) }}\n </span>\n </div>\n <!-- Default -->\n <a *ngSwitchDefault>{{ mapValue(item) }}</a>\n </ng-container>\n </li>\n </ng-container>\n </ul>\n </div>\n</div>\n ", styles: ["a{color:var(--secondary-color)}a:hover{color:var(--hover-color)}\n"] }]
|
|
469
470
|
}], propDecorators: { array: [{
|
|
470
471
|
type: Input
|
|
471
472
|
}], propertyname: [{
|
|
@@ -490,11 +491,11 @@ class VersionsComponent {
|
|
|
490
491
|
this.bokVersionChange.emit(version);
|
|
491
492
|
}
|
|
492
493
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: VersionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
493
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: VersionsComponent, isStandalone: true, selector: "versions", inputs: { currentVersion: "currentVersion", bokVersion: "bokVersion", bokVersions: "bokVersions" }, outputs: { bokVersionChange: "bokVersionChange" }, ngImport: i0, template: "<div *ngIf=\"bokVersions && bokVersion && currentVersion\">\
|
|
494
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: VersionsComponent, isStandalone: true, selector: "versions", inputs: { currentVersion: "currentVersion", bokVersion: "bokVersion", bokVersions: "bokVersions" }, outputs: { bokVersionChange: "bokVersionChange" }, ngImport: i0, template: "<div *ngIf=\"bokVersions && bokVersion && currentVersion\">\n <h3>Versioning</h3>\n <div *ngIf=\"bokVersions.size > 0\">\n <div style=\"padding-left: 1em;\">\n <dl>\n <ng-container *ngFor=\"let version of bokVersions | keyvalue : descendingOrder\">\n <dt *ngIf=\"version.key == currentVersion && version.key != bokVersion\" class=\"concept-name dt-link\" \n style=\"font-weight: 400; cursor: pointer; margin-top: 0.25em;\"\n (click)=\"loadOldBokVersion(version.key)\">\n <b>-</b> Version {{ currentVersion.slice(1) }}.0 ({{version.value}}) (Current BoK Version)\n </dt>\n <dt *ngIf=\"version.key == currentVersion && version.key == bokVersion\" class=\"concept-name\" \n style=\"font-weight: 800; margin-top: 0.25em; margin-bottom: 1em;\">\n <b>\u2192</b> You are viewing: Version {{ currentVersion.slice(1) }}.0 ({{version.value}}) (Current BoK Version)\n </dt>\n <dt *ngIf=\"version.key != currentVersion && version.key != bokVersion\" class=\"concept-name dt-link\" \n style=\"font-weight: 400; cursor: pointer; margin-top: 0.25em;\"\n (click)=\"loadOldBokVersion(version.key)\">\n <b>-</b> Version {{ version.key.slice(1)}}.0 ({{version.value}})\n </dt>\n <dt *ngIf=\"version.key != currentVersion && version.key == bokVersion\" class=\"concept-name\" \n style=\"font-weight: 800; margin-top: 0.25em; margin-bottom: 1em;\">\n <b>\u2192</b> You are viewing: Version {{ version.key.slice(1) }}.0 ({{version.value}})\n </dt>\n </ng-container>\n </dl>\n </div>\n </div>\n</div>", styles: [".dt-link{color:var(--secondary-color)}.dt-link:hover{color:var(--hover-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.KeyValuePipe, name: "keyvalue" }] });
|
|
494
495
|
}
|
|
495
496
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: VersionsComponent, decorators: [{
|
|
496
497
|
type: Component,
|
|
497
|
-
args: [{ standalone: true, selector: 'versions', imports: [CommonModule], template: "<div *ngIf=\"bokVersions && bokVersion && currentVersion\">\
|
|
498
|
+
args: [{ standalone: true, selector: 'versions', imports: [CommonModule], template: "<div *ngIf=\"bokVersions && bokVersion && currentVersion\">\n <h3>Versioning</h3>\n <div *ngIf=\"bokVersions.size > 0\">\n <div style=\"padding-left: 1em;\">\n <dl>\n <ng-container *ngFor=\"let version of bokVersions | keyvalue : descendingOrder\">\n <dt *ngIf=\"version.key == currentVersion && version.key != bokVersion\" class=\"concept-name dt-link\" \n style=\"font-weight: 400; cursor: pointer; margin-top: 0.25em;\"\n (click)=\"loadOldBokVersion(version.key)\">\n <b>-</b> Version {{ currentVersion.slice(1) }}.0 ({{version.value}}) (Current BoK Version)\n </dt>\n <dt *ngIf=\"version.key == currentVersion && version.key == bokVersion\" class=\"concept-name\" \n style=\"font-weight: 800; margin-top: 0.25em; margin-bottom: 1em;\">\n <b>\u2192</b> You are viewing: Version {{ currentVersion.slice(1) }}.0 ({{version.value}}) (Current BoK Version)\n </dt>\n <dt *ngIf=\"version.key != currentVersion && version.key != bokVersion\" class=\"concept-name dt-link\" \n style=\"font-weight: 400; cursor: pointer; margin-top: 0.25em;\"\n (click)=\"loadOldBokVersion(version.key)\">\n <b>-</b> Version {{ version.key.slice(1)}}.0 ({{version.value}})\n </dt>\n <dt *ngIf=\"version.key != currentVersion && version.key == bokVersion\" class=\"concept-name\" \n style=\"font-weight: 800; margin-top: 0.25em; margin-bottom: 1em;\">\n <b>\u2192</b> You are viewing: Version {{ version.key.slice(1) }}.0 ({{version.value}})\n </dt>\n </ng-container>\n </dl>\n </div>\n </div>\n</div>", styles: [".dt-link{color:var(--secondary-color)}.dt-link:hover{color:var(--hover-color)}\n"] }]
|
|
498
499
|
}], propDecorators: { currentVersion: [{
|
|
499
500
|
type: Input
|
|
500
501
|
}], bokVersion: [{
|
|
@@ -560,11 +561,11 @@ class DescriptionComponent {
|
|
|
560
561
|
return text.replace(/<\/?[^>]+(>|$)/g, "");
|
|
561
562
|
}
|
|
562
563
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
563
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DescriptionComponent, isStandalone: true, selector: "description", inputs: { bokNode: "bokNode", isAnOldVersion: "isAnOldVersion", isAnObsoleteId: "isAnObsoleteId", showVersions: "showVersions", versionMap: "versionMap", currentVersion: "currentVersion", bokVersion: "bokVersion" }, outputs: { codSelectedChange: "codSelectedChange", bokVersionChange: "bokVersionChange" }, ngImport: i0, template: "<div>\
|
|
564
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DescriptionComponent, isStandalone: true, selector: "description", inputs: { bokNode: "bokNode", isAnOldVersion: "isAnOldVersion", isAnObsoleteId: "isAnObsoleteId", showVersions: "showVersions", versionMap: "versionMap", currentVersion: "currentVersion", bokVersion: "bokVersion" }, outputs: { codSelectedChange: "codSelectedChange", bokVersionChange: "bokVersionChange" }, ngImport: i0, template: "<div>\n <!-- Permalink -->\n <p>\n Permalink: \n <a style=\"text-decoration: none;\" [href]=\"permalink\">{{ permalink }}</a>\n </p>\n\n <!-- Title -->\n <h2 id=\"boktitle\" style=\"margin-bottom: 0px;\">\n [{{ bokNode.nameShort }}] {{ bokNode.name }}\n </h2>\n\n <!-- Status -->\n <div *ngIf=\"statusText\" style=\"margin-bottom: 1em;\">\n {{ statusText }}\n </div>\n\n <!-- Warning for obsolete BoK concept -->\n <p *ngIf=\"isAnObsoleteId && currentVersion\">\n <span style=\"color: var(--danger-color); font-weight: normal;\">\n warning: this is an obsolete BoK concept - this concept is no longer present in \n <a \n style=\"color: var(--danger-color); font-weight: normal; cursor: pointer; text-decoration: underline;\"\n (click)=\"loadOldBokVersion(currentVersion)\">\n the current version of the BoK\n </a>\n </span>\n </p>\n \n <!-- Warning for old version -->\n <p *ngIf=\"isAnOldVersion && !isAnObsoleteId\">\n <span style=\"color: var(--warning-color); font-weight: normal;\">\n warning: this is an old version of this BoK concept; see \"Versioning\" below for more recent version(s)\n </span>\n </p>\n\n <!-- Last Updated -->\n <small *ngIf=\"formattedTimestamp\">{{ formattedTimestamp }}</small>\n \n <!-- Description -->\n <h3>Description:</h3>\n <div id=\"currentDescription\" class=\"hideContent\">\n {{ bokNode.description }}\n </div>\n\n <!-- Superconcepts -->\n <div *ngIf=\"parentHierarchy.length > 0\">\n <h3>Superconcepts [{{ 1 + bokNode.otherParents.length }}]</h3>\n <div style=\"padding-left: 1em;\">\n <dl>\n <ng-container *ngFor=\"let parent of parentHierarchy; let i = index\">\n <dt *ngIf=\"parent === parentHierarchy[0]\" class=\"concept-name dt-link\" \n style=\"font-weight: 400; cursor: pointer;\"\n (click)=\"browseToConcept(parent.nameShort)\">\n <b>-</b> [{{ parent.nameShort }}] {{ parent.name }}\n </dt>\n <dd *ngIf=\"parent !== parentHierarchy[0]\"\n [style.marginLeft.em]=\"i * 0.8\"\n style=\"margin-top: 0.25em;\">\n <dl>\n <dt class=\"concept-name dt-link\" \n style=\"font-weight: 400; cursor: pointer;\"\n (click)=\"browseToConcept(parent.nameShort)\">\n <b>-</b> [{{ parent.nameShort }}] {{ parent.name }}\n </dt>\n </dl>\n </dd>\n </ng-container>\n </dl>\n </div>\n </div>\n\n <!-- Other Superconcepts -->\n <div *ngFor=\"let hierarchy of otherParentHierarchies\">\n <div style=\"margin-top: 1em; padding-left: 1em;\">\n <dl>\n <ng-container *ngFor=\"let other of hierarchy; let i = index\">\n <dt *ngIf=\"other === hierarchy[0]\" class=\"concept-name dt-link\" \n style=\"font-weight: 400; cursor: pointer;\"\n (click)=\"browseToConcept(other.nameShort)\">\n <b>-</b> [{{ other.nameShort }}] {{ other.name }}\n </dt>\n <dd *ngIf=\"other !== hierarchy[0]\"\n [style.marginLeft.px]=\"i * 8\"\n style=\"margin-top: 0.25em;\">\n <dl>\n <dt class=\"concept-name dt-link\" \n style=\"font-weight: 400; cursor: pointer;\"\n (click)=\"browseToConcept(other.nameShort)\">\n <b>-</b> [{{ other.nameShort }}] {{ other.name }}\n </dt>\n </dl>\n </dd>\n </ng-container>\n </dl>\n </div>\n </div>\n\n <!-- Subconcepts -->\n <list [array]=\"bokNode.children\" [propertyname]=\"'name'\" [propertyname2]=\"'nameShort'\" \n [headline]=\"'Subconcepts'\" [isConcept]=\"true\" (codSelectedChange)=\"browseToConcept($event)\"></list>\n\n <!-- Prerequisites -->\n <list [array]=\"bokNode.prerequisites\" [propertyname]=\"'name'\" [propertyname2]=\"'nameShort'\" \n [headline]=\"'Prerequisites'\" [isConcept]=\"true\" (codSelectedChange)=\"browseToConcept($event)\"></list>\n\n <!-- postrequisites -->\n <list [array]=\"bokNode.postrequisites\" [propertyname]=\"'name'\" [propertyname2]=\"'nameShort'\" \n [headline]=\"'Postrequisites'\" [isConcept]=\"true\" (codSelectedChange)=\"browseToConcept($event)\"></list>\n\n <!-- Similar concepts -->\n <list [array]=\"bokNode.similarConcepts\" [propertyname]=\"'name'\" [propertyname2]=\"'nameShort'\" \n [headline]=\"'Similar concepts'\" [isConcept]=\"true\" (codSelectedChange)=\"browseToConcept($event)\"></list>\n\n <!-- Skills -->\n <list [array]=\"bokNode.demonstrableSkills\" [propertyname]=\"'description'\" [headline]=\"'Skills'\" [isConcept]=\"false\"></list>\n\n <!-- Contributors -->\n <list [array]=\"bokNode.contributors\" [propertyname]=\"'nameShort'\" [propertyname2]=\"'url'\" \n [headline]=\"'Contributors'\" [isConcept]=\"false\"></list>\n\n <!-- Source Documents -->\n <list [array]=\"bokNode.sourceDocuments\" [propertyname]=\"'nameShort'\" [propertyname2]=\"'url'\" \n [headline]=\"'Source documents'\" [isConcept]=\"false\"></list>\n\n <!-- Versions -->\n <div *ngIf=\"showVersions && bokVersion && currentVersion && versionMap\">\n <versions (bokVersionChange)=\"loadOldBokVersion($event)\" [bokVersion]=\"bokVersion\" [currentVersion]=\"currentVersion\" [bokVersions]=\"versionMap\"></versions>\n </div>\n\n</div>\n ", styles: [".dt-link{color:var(--secondary-color)}.dt-link:hover{color:var(--hover-color)}a{color:var(--secondary-color)}a:hover{color:var(--hover-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ListComponent, selector: "list", inputs: ["array", "propertyname", "propertyname2", "headline", "isConcept"], outputs: ["codSelectedChange"] }, { kind: "component", type: VersionsComponent, selector: "versions", inputs: ["currentVersion", "bokVersion", "bokVersions"], outputs: ["bokVersionChange"] }] });
|
|
564
565
|
}
|
|
565
566
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DescriptionComponent, decorators: [{
|
|
566
567
|
type: Component,
|
|
567
|
-
args: [{ standalone: true, selector: 'description', imports: [CommonModule, ListComponent, VersionsComponent], template: "<div>\
|
|
568
|
+
args: [{ standalone: true, selector: 'description', imports: [CommonModule, ListComponent, VersionsComponent], template: "<div>\n <!-- Permalink -->\n <p>\n Permalink: \n <a style=\"text-decoration: none;\" [href]=\"permalink\">{{ permalink }}</a>\n </p>\n\n <!-- Title -->\n <h2 id=\"boktitle\" style=\"margin-bottom: 0px;\">\n [{{ bokNode.nameShort }}] {{ bokNode.name }}\n </h2>\n\n <!-- Status -->\n <div *ngIf=\"statusText\" style=\"margin-bottom: 1em;\">\n {{ statusText }}\n </div>\n\n <!-- Warning for obsolete BoK concept -->\n <p *ngIf=\"isAnObsoleteId && currentVersion\">\n <span style=\"color: var(--danger-color); font-weight: normal;\">\n warning: this is an obsolete BoK concept - this concept is no longer present in \n <a \n style=\"color: var(--danger-color); font-weight: normal; cursor: pointer; text-decoration: underline;\"\n (click)=\"loadOldBokVersion(currentVersion)\">\n the current version of the BoK\n </a>\n </span>\n </p>\n \n <!-- Warning for old version -->\n <p *ngIf=\"isAnOldVersion && !isAnObsoleteId\">\n <span style=\"color: var(--warning-color); font-weight: normal;\">\n warning: this is an old version of this BoK concept; see \"Versioning\" below for more recent version(s)\n </span>\n </p>\n\n <!-- Last Updated -->\n <small *ngIf=\"formattedTimestamp\">{{ formattedTimestamp }}</small>\n \n <!-- Description -->\n <h3>Description:</h3>\n <div id=\"currentDescription\" class=\"hideContent\">\n {{ bokNode.description }}\n </div>\n\n <!-- Superconcepts -->\n <div *ngIf=\"parentHierarchy.length > 0\">\n <h3>Superconcepts [{{ 1 + bokNode.otherParents.length }}]</h3>\n <div style=\"padding-left: 1em;\">\n <dl>\n <ng-container *ngFor=\"let parent of parentHierarchy; let i = index\">\n <dt *ngIf=\"parent === parentHierarchy[0]\" class=\"concept-name dt-link\" \n style=\"font-weight: 400; cursor: pointer;\"\n (click)=\"browseToConcept(parent.nameShort)\">\n <b>-</b> [{{ parent.nameShort }}] {{ parent.name }}\n </dt>\n <dd *ngIf=\"parent !== parentHierarchy[0]\"\n [style.marginLeft.em]=\"i * 0.8\"\n style=\"margin-top: 0.25em;\">\n <dl>\n <dt class=\"concept-name dt-link\" \n style=\"font-weight: 400; cursor: pointer;\"\n (click)=\"browseToConcept(parent.nameShort)\">\n <b>-</b> [{{ parent.nameShort }}] {{ parent.name }}\n </dt>\n </dl>\n </dd>\n </ng-container>\n </dl>\n </div>\n </div>\n\n <!-- Other Superconcepts -->\n <div *ngFor=\"let hierarchy of otherParentHierarchies\">\n <div style=\"margin-top: 1em; padding-left: 1em;\">\n <dl>\n <ng-container *ngFor=\"let other of hierarchy; let i = index\">\n <dt *ngIf=\"other === hierarchy[0]\" class=\"concept-name dt-link\" \n style=\"font-weight: 400; cursor: pointer;\"\n (click)=\"browseToConcept(other.nameShort)\">\n <b>-</b> [{{ other.nameShort }}] {{ other.name }}\n </dt>\n <dd *ngIf=\"other !== hierarchy[0]\"\n [style.marginLeft.px]=\"i * 8\"\n style=\"margin-top: 0.25em;\">\n <dl>\n <dt class=\"concept-name dt-link\" \n style=\"font-weight: 400; cursor: pointer;\"\n (click)=\"browseToConcept(other.nameShort)\">\n <b>-</b> [{{ other.nameShort }}] {{ other.name }}\n </dt>\n </dl>\n </dd>\n </ng-container>\n </dl>\n </div>\n </div>\n\n <!-- Subconcepts -->\n <list [array]=\"bokNode.children\" [propertyname]=\"'name'\" [propertyname2]=\"'nameShort'\" \n [headline]=\"'Subconcepts'\" [isConcept]=\"true\" (codSelectedChange)=\"browseToConcept($event)\"></list>\n\n <!-- Prerequisites -->\n <list [array]=\"bokNode.prerequisites\" [propertyname]=\"'name'\" [propertyname2]=\"'nameShort'\" \n [headline]=\"'Prerequisites'\" [isConcept]=\"true\" (codSelectedChange)=\"browseToConcept($event)\"></list>\n\n <!-- postrequisites -->\n <list [array]=\"bokNode.postrequisites\" [propertyname]=\"'name'\" [propertyname2]=\"'nameShort'\" \n [headline]=\"'Postrequisites'\" [isConcept]=\"true\" (codSelectedChange)=\"browseToConcept($event)\"></list>\n\n <!-- Similar concepts -->\n <list [array]=\"bokNode.similarConcepts\" [propertyname]=\"'name'\" [propertyname2]=\"'nameShort'\" \n [headline]=\"'Similar concepts'\" [isConcept]=\"true\" (codSelectedChange)=\"browseToConcept($event)\"></list>\n\n <!-- Skills -->\n <list [array]=\"bokNode.demonstrableSkills\" [propertyname]=\"'description'\" [headline]=\"'Skills'\" [isConcept]=\"false\"></list>\n\n <!-- Contributors -->\n <list [array]=\"bokNode.contributors\" [propertyname]=\"'nameShort'\" [propertyname2]=\"'url'\" \n [headline]=\"'Contributors'\" [isConcept]=\"false\"></list>\n\n <!-- Source Documents -->\n <list [array]=\"bokNode.sourceDocuments\" [propertyname]=\"'nameShort'\" [propertyname2]=\"'url'\" \n [headline]=\"'Source documents'\" [isConcept]=\"false\"></list>\n\n <!-- Versions -->\n <div *ngIf=\"showVersions && bokVersion && currentVersion && versionMap\">\n <versions (bokVersionChange)=\"loadOldBokVersion($event)\" [bokVersion]=\"bokVersion\" [currentVersion]=\"currentVersion\" [bokVersions]=\"versionMap\"></versions>\n </div>\n\n</div>\n ", styles: [".dt-link{color:var(--secondary-color)}.dt-link:hover{color:var(--hover-color)}a{color:var(--secondary-color)}a:hover{color:var(--hover-color)}\n"] }]
|
|
568
569
|
}], propDecorators: { bokNode: [{
|
|
569
570
|
type: Input
|
|
570
571
|
}], isAnOldVersion: [{
|
|
@@ -616,11 +617,11 @@ class SearchResultsComponent {
|
|
|
616
617
|
highlightDescription = false;
|
|
617
618
|
codSelectedChange = new EventEmitter();
|
|
618
619
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SearchResultsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
619
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SearchResultsComponent, isStandalone: true, selector: "searchResults", inputs: { nodeSuggestions: ["suggestions", "nodeSuggestions"], searchValue: "searchValue", highlightDescription: "highlightDescription" }, outputs: { codSelectedChange: "codSelectedChange" }, ngImport: i0, template: "<p *ngIf=\"nodeSuggestions.length > 0\">{{nodeSuggestions.length}} concepts</p>\
|
|
620
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SearchResultsComponent, isStandalone: true, selector: "searchResults", inputs: { nodeSuggestions: ["suggestions", "nodeSuggestions"], searchValue: "searchValue", highlightDescription: "highlightDescription" }, outputs: { codSelectedChange: "codSelectedChange" }, ngImport: i0, template: "<p *ngIf=\"nodeSuggestions.length > 0\">{{nodeSuggestions.length}} concepts</p>\n<p-dataview [value]=\"nodeSuggestions\" [rows]=\"8\" [paginator]=\"true\" >\n <ng-template #list let-items>\n <div class=\"h-4rem mt-2 pr-4\" *ngFor=\"let item of items; let first = first\">\n <a (click)=\"codSelectedChange.emit(item.nameShort)\" style=\"font-weight: 400; cursor: pointer;\">\n <div class=\"white-space-nowrap overflow-hidden text-overflow-ellipsis\">\n [{{item.nameShort}}] {{item.name}}\n </div>\n </a>\n <div class=\"mt-1 white-space-nowrap overflow-hidden text-overflow-ellipsis\" style=\"font-size: 0.85em\" \n [innerHTML]=\"highlightDescription ? (item.description | truncate : searchValue : 25) : item.description\"></div>\n </div>\n </ng-template>\n</p-dataview>", styles: ["a{color:var(--secondary-color)}a:hover{color:var(--hover-color)}\n"], dependencies: [{ kind: "component", type: DataView, selector: "p-dataView, p-dataview, p-data-view", inputs: ["paginator", "rows", "totalRecords", "pageLinks", "rowsPerPageOptions", "paginatorPosition", "paginatorStyleClass", "alwaysShowPaginator", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showFirstLastIcon", "showPageLinks", "lazy", "lazyLoadOnInit", "emptyMessage", "style", "styleClass", "gridStyleClass", "trackBy", "filterBy", "filterLocale", "loading", "loadingIcon", "first", "sortField", "sortOrder", "value", "layout"], outputs: ["onLazyLoad", "onPage", "onSort", "onChangeLayout"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "pipe", type: TruncatePipe, name: "truncate" }] });
|
|
620
621
|
}
|
|
621
622
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SearchResultsComponent, decorators: [{
|
|
622
623
|
type: Component,
|
|
623
|
-
args: [{ standalone: true, selector: 'searchResults', imports: [DataView, CommonModule, ButtonModule, TruncatePipe], template: "<p *ngIf=\"nodeSuggestions.length > 0\">{{nodeSuggestions.length}} concepts</p>\
|
|
624
|
+
args: [{ standalone: true, selector: 'searchResults', imports: [DataView, CommonModule, ButtonModule, TruncatePipe], template: "<p *ngIf=\"nodeSuggestions.length > 0\">{{nodeSuggestions.length}} concepts</p>\n<p-dataview [value]=\"nodeSuggestions\" [rows]=\"8\" [paginator]=\"true\" >\n <ng-template #list let-items>\n <div class=\"h-4rem mt-2 pr-4\" *ngFor=\"let item of items; let first = first\">\n <a (click)=\"codSelectedChange.emit(item.nameShort)\" style=\"font-weight: 400; cursor: pointer;\">\n <div class=\"white-space-nowrap overflow-hidden text-overflow-ellipsis\">\n [{{item.nameShort}}] {{item.name}}\n </div>\n </a>\n <div class=\"mt-1 white-space-nowrap overflow-hidden text-overflow-ellipsis\" style=\"font-size: 0.85em\" \n [innerHTML]=\"highlightDescription ? (item.description | truncate : searchValue : 25) : item.description\"></div>\n </div>\n </ng-template>\n</p-dataview>", styles: ["a{color:var(--secondary-color)}a:hover{color:var(--hover-color)}\n"] }]
|
|
624
625
|
}], propDecorators: { nodeSuggestions: [{
|
|
625
626
|
type: Input,
|
|
626
627
|
args: [{ alias: 'suggestions' }]
|
|
@@ -672,14 +673,14 @@ class SearchComponent {
|
|
|
672
673
|
this.visible = false;
|
|
673
674
|
}
|
|
674
675
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SearchComponent, deps: [{ token: i1$1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component });
|
|
675
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SearchComponent, isStandalone: true, selector: "search", inputs: { inputValue: "inputValue", searchBooleans: "searchBooleans", nodeSuggestions: ["suggestions", "nodeSuggestions"] }, outputs: { inputValueChange: "inputValueChange", searchSettingsChange: "searchSettingsChange", codSelectedChange: "codSelectedChange" }, usesOnChanges: true, ngImport: i0, template: "<p-drawer header=\"Search Concepts\" position=\"right\" [(visible)]=\"visible\" [blockScroll]=\"true\" styleClass=\"w-full md:w-25rem xl:w-30rem\">\
|
|
676
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SearchComponent, isStandalone: true, selector: "search", inputs: { inputValue: "inputValue", searchBooleans: "searchBooleans", nodeSuggestions: ["suggestions", "nodeSuggestions"] }, outputs: { inputValueChange: "inputValueChange", searchSettingsChange: "searchSettingsChange", codSelectedChange: "codSelectedChange" }, usesOnChanges: true, ngImport: i0, template: "<p-drawer header=\"Search Concepts\" position=\"right\" [(visible)]=\"visible\" [blockScroll]=\"true\" styleClass=\"w-full md:w-25rem xl:w-30rem\">\n <div class=\"flex flex-wrap justify-center align-items-center my-4\">\n <p-floatlabel variant=\"on\">\n <input pInputText id=\"on_label\" [(ngModel)]=\"inputValue\" (ngModelChange)=\"onInputValueChange($event)\" autocomplete=\"off\" class=\"w-19rem custom-input\"/>\n <label for=\"on_label\" class=\"custom-label\">Search</label>\n </p-floatlabel>\n <p-button variant=\"text\" severity=\"secondary\" (click)=\"onInputValueChange('')\" size=\"small\" [rounded]=\"true\" icon=\"pi pi-times\"/>\n </div>\n <div class=\"flex flex-wrap justify-center align-items-center gap-3\">\n <div class=\"flex items-center\">\n <p-checkbox inputId=\"searchCode\" [(ngModel)]=\"searchBooleans.searchCode\" (ngModelChange)=\"updateSearchSettings()\" [binary]=\"true\" class=\"custom-checkbox\"/>\n <label for=\"searchCode\" class=\"ml-2\"> Code </label>\n </div>\n <div class=\"flex items-center\">\n <p-checkbox inputId=\"searchName\" [(ngModel)]=\"searchBooleans.searchName\" (ngModelChange)=\"updateSearchSettings()\" [binary]=\"true\" class=\"custom-checkbox\"/>\n <label for=\"searchName\" class=\"ml-2\"> Name </label>\n </div>\n <div class=\"flex items-center\">\n <p-checkbox inputId=\"searchDescription\" [(ngModel)]=\"searchBooleans.searchDescription\" (ngModelChange)=\"updateSearchSettings()\" [binary]=\"true\" class=\"custom-checkbox\"/>\n <label for=\"searchDescription\" class=\"ml-2\"> Description </label>\n </div>\n <div class=\"flex items-center\">\n <p-checkbox inputId=\"searchSkills\" [(ngModel)]=\"searchBooleans.searchSkills\" (ngModelChange)=\"updateSearchSettings()\" [binary]=\"true\" class=\"custom-checkbox\"/>\n <label for=\"searchSkills\" class=\"ml-2\"> Skills </label>\n </div>\n </div>\n <p-divider />\n <searchResults [suggestions]=\"nodeSuggestions\" [searchValue]=\"inputValue\" [highlightDescription]=\"searchBooleans.searchDescription\" (codSelectedChange)=\"onCodSelectedChange($event)\"/>\n</p-drawer>\n<p-button variant=\"text\" (click)=\"visible = true\" icon=\"pi pi-search\" [label]=\"isMobile ? '' : 'Search'\" class=\"absolute top-70px right-0 m-4 custom-button\"/>\n", styles: [".custom-checkbox{--p-checkbox-checked-background: var(--secondary-color);--p-checkbox-checked-border-color: var(--secondary-color);--p-checkbox-checked-hover-background: var(--hover-color);--p-checkbox-checked-hover-border-color: var(--hover-color);--p-checkbox-checked-focus-border-color: var(--secondary-color);--p-checkbox-focus-ring-color: var(--secondary-color)}.custom-input{--p-inputtext-focus-border-color: var(--hover-color)}.custom-label{--p-floatlabel-focus-color: var(--hover-color)}.custom-button{--p-button-text-primary-color: var(--secondary-color);--p-button-text-primary-hover-background: var(--p-button-text-secondary-hover-background);--p-button-text-primary-active-background: var(--p-button-text-secondary-active-background)}.custom-button:hover{--p-button-text-primary-color: var(--hover-color)}\n"], dependencies: [{ kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i4.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "name", "disabled", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "inputStyle", "styleClass", "inputClass", "indeterminate", "size", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i5.Drawer, selector: "p-drawer", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i6.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DividerModule }, { kind: "component", type: i7.Divider, selector: "p-divider", inputs: ["style", "styleClass", "layout", "type", "align"] }, { kind: "component", type: SearchResultsComponent, selector: "searchResults", inputs: ["suggestions", "searchValue", "highlightDescription"], outputs: ["codSelectedChange"] }] });
|
|
676
677
|
}
|
|
677
678
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SearchComponent, decorators: [{
|
|
678
679
|
type: Component,
|
|
679
680
|
args: [{ standalone: true, selector: 'search', imports: [InputTextModule, FloatLabel,
|
|
680
681
|
FormsModule, CheckboxModule,
|
|
681
682
|
DrawerModule, ButtonModule,
|
|
682
|
-
DividerModule, SearchResultsComponent], template: "<p-drawer header=\"Search Concepts\" position=\"right\" [(visible)]=\"visible\" [blockScroll]=\"true\" styleClass=\"w-full md:w-25rem xl:w-30rem\">\
|
|
683
|
+
DividerModule, SearchResultsComponent], template: "<p-drawer header=\"Search Concepts\" position=\"right\" [(visible)]=\"visible\" [blockScroll]=\"true\" styleClass=\"w-full md:w-25rem xl:w-30rem\">\n <div class=\"flex flex-wrap justify-center align-items-center my-4\">\n <p-floatlabel variant=\"on\">\n <input pInputText id=\"on_label\" [(ngModel)]=\"inputValue\" (ngModelChange)=\"onInputValueChange($event)\" autocomplete=\"off\" class=\"w-19rem custom-input\"/>\n <label for=\"on_label\" class=\"custom-label\">Search</label>\n </p-floatlabel>\n <p-button variant=\"text\" severity=\"secondary\" (click)=\"onInputValueChange('')\" size=\"small\" [rounded]=\"true\" icon=\"pi pi-times\"/>\n </div>\n <div class=\"flex flex-wrap justify-center align-items-center gap-3\">\n <div class=\"flex items-center\">\n <p-checkbox inputId=\"searchCode\" [(ngModel)]=\"searchBooleans.searchCode\" (ngModelChange)=\"updateSearchSettings()\" [binary]=\"true\" class=\"custom-checkbox\"/>\n <label for=\"searchCode\" class=\"ml-2\"> Code </label>\n </div>\n <div class=\"flex items-center\">\n <p-checkbox inputId=\"searchName\" [(ngModel)]=\"searchBooleans.searchName\" (ngModelChange)=\"updateSearchSettings()\" [binary]=\"true\" class=\"custom-checkbox\"/>\n <label for=\"searchName\" class=\"ml-2\"> Name </label>\n </div>\n <div class=\"flex items-center\">\n <p-checkbox inputId=\"searchDescription\" [(ngModel)]=\"searchBooleans.searchDescription\" (ngModelChange)=\"updateSearchSettings()\" [binary]=\"true\" class=\"custom-checkbox\"/>\n <label for=\"searchDescription\" class=\"ml-2\"> Description </label>\n </div>\n <div class=\"flex items-center\">\n <p-checkbox inputId=\"searchSkills\" [(ngModel)]=\"searchBooleans.searchSkills\" (ngModelChange)=\"updateSearchSettings()\" [binary]=\"true\" class=\"custom-checkbox\"/>\n <label for=\"searchSkills\" class=\"ml-2\"> Skills </label>\n </div>\n </div>\n <p-divider />\n <searchResults [suggestions]=\"nodeSuggestions\" [searchValue]=\"inputValue\" [highlightDescription]=\"searchBooleans.searchDescription\" (codSelectedChange)=\"onCodSelectedChange($event)\"/>\n</p-drawer>\n<p-button variant=\"text\" (click)=\"visible = true\" icon=\"pi pi-search\" [label]=\"isMobile ? '' : 'Search'\" class=\"absolute top-70px right-0 m-4 custom-button\"/>\n", styles: [".custom-checkbox{--p-checkbox-checked-background: var(--secondary-color);--p-checkbox-checked-border-color: var(--secondary-color);--p-checkbox-checked-hover-background: var(--hover-color);--p-checkbox-checked-hover-border-color: var(--hover-color);--p-checkbox-checked-focus-border-color: var(--secondary-color);--p-checkbox-focus-ring-color: var(--secondary-color)}.custom-input{--p-inputtext-focus-border-color: var(--hover-color)}.custom-label{--p-floatlabel-focus-color: var(--hover-color)}.custom-button{--p-button-text-primary-color: var(--secondary-color);--p-button-text-primary-hover-background: var(--p-button-text-secondary-hover-background);--p-button-text-primary-active-background: var(--p-button-text-secondary-active-background)}.custom-button:hover{--p-button-text-primary-color: var(--hover-color)}\n"] }]
|
|
683
684
|
}], ctorParameters: () => [{ type: i1$1.BreakpointObserver }], propDecorators: { inputValue: [{
|
|
684
685
|
type: Input
|
|
685
686
|
}], searchBooleans: [{
|
|
@@ -704,15 +705,48 @@ const environment = {
|
|
|
704
705
|
API_URL: 'https://eo4geo-bok.firebaseio.com/',
|
|
705
706
|
};
|
|
706
707
|
|
|
708
|
+
class DeprecatedConcept {
|
|
709
|
+
code;
|
|
710
|
+
name;
|
|
711
|
+
color;
|
|
712
|
+
version;
|
|
713
|
+
constructor(data) {
|
|
714
|
+
if (data) {
|
|
715
|
+
this.code = data.code;
|
|
716
|
+
this.name = data.name;
|
|
717
|
+
this.color = data.color;
|
|
718
|
+
this.version = data.version;
|
|
719
|
+
}
|
|
720
|
+
else {
|
|
721
|
+
this.code = '';
|
|
722
|
+
this.name = '';
|
|
723
|
+
this.color = '';
|
|
724
|
+
this.version = '';
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
toFirestore() {
|
|
728
|
+
return {
|
|
729
|
+
code: this.code,
|
|
730
|
+
name: this.name,
|
|
731
|
+
color: this.color,
|
|
732
|
+
version: this.version
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
707
737
|
class BokFirebaseService {
|
|
708
738
|
http;
|
|
709
739
|
bokMap = new Map();
|
|
710
740
|
versionsMap$ = new BehaviorSubject(undefined);
|
|
711
741
|
currentVersion$ = new BehaviorSubject(undefined);
|
|
712
742
|
URL_BASE;
|
|
743
|
+
db;
|
|
744
|
+
deprecatedConceptsCollection;
|
|
713
745
|
constructor(http) {
|
|
714
746
|
this.http = http;
|
|
715
747
|
this.URL_BASE = environment.URL_ARRAY[0];
|
|
748
|
+
this.db = inject(Firestore);
|
|
749
|
+
this.deprecatedConceptsCollection = collection(this.db, 'DeprecatedConcepts');
|
|
716
750
|
}
|
|
717
751
|
// Function to get the BOK data for a specific version from Firebase
|
|
718
752
|
getBokVersion(version) {
|
|
@@ -796,6 +830,19 @@ class BokFirebaseService {
|
|
|
796
830
|
checkConcept(conceptCode, bokversion) {
|
|
797
831
|
return this.http.get(environment.API_URL + bokversion + '/concepts/' + conceptCode + '/id.json');
|
|
798
832
|
}
|
|
833
|
+
getDeprecatedConcept(conceptCode) {
|
|
834
|
+
const userDocRef = doc(this.deprecatedConceptsCollection, conceptCode);
|
|
835
|
+
return from(getDoc(userDocRef)).pipe(map(docSnap => {
|
|
836
|
+
if (docSnap.exists()) {
|
|
837
|
+
const data = docSnap.data();
|
|
838
|
+
const concept = new DeprecatedConcept(data);
|
|
839
|
+
return concept;
|
|
840
|
+
}
|
|
841
|
+
else {
|
|
842
|
+
return null;
|
|
843
|
+
}
|
|
844
|
+
}));
|
|
845
|
+
}
|
|
799
846
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: BokFirebaseService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
800
847
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: BokFirebaseService, providedIn: 'root' });
|
|
801
848
|
}
|
|
@@ -1086,11 +1133,11 @@ class BokComponent {
|
|
|
1086
1133
|
}
|
|
1087
1134
|
}
|
|
1088
1135
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: BokComponent, deps: [{ token: BokFirebaseService }, { token: BokDataService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1089
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: BokComponent, isStandalone: true, selector: "bok-visualization", inputs: { customSpinner: "customSpinner", codSelected: ["selectedConcept", "codSelected"], showDescription: "showDescription", showVersions: "showVersions", showSearchEngine: "showSearchEngine" }, outputs: { codSelectedChange: "selectedConceptChange" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div *ngIf=\"!loading; else spinner\">\
|
|
1136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: BokComponent, isStandalone: true, selector: "bok-visualization", inputs: { customSpinner: "customSpinner", codSelected: ["selectedConcept", "codSelected"], showDescription: "showDescription", showVersions: "showVersions", showSearchEngine: "showSearchEngine" }, outputs: { codSelectedChange: "selectedConceptChange" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div *ngIf=\"!loading; else spinner\">\n <div *ngIf=\"showSearchEngine && this.bubbleData\" class=\"flex justify-content-center\">\n <search [inputValue]=\"searchInputFieldDoc\" [searchBooleans]=\"searchBooleans\" (inputValueChange)=\"onSearchValueChange($event)\" \n (searchSettingsChange)=\"onSearchBooleansChange($event)\" [suggestions]=\"suggestions\" (codSelectedChange)=\"onCodeSelectedChange($event)\"></search>\n </div>\n <div class=\"flex flex-wrap\">\n <div class=\"flex-1 p-3\" *ngIf=\"bubbleData\">\n <bubble [bokData]=\"bubbleData\" [codSelected]=\"codSelected\" [selectedNodes]=\"selectedNodes\" (codSelectedChange)=\"onCodeSelectedChange($event)\"></bubble>\n </div>\n <div class=\"flex-1 p-3 overflow-auto min-w-screen lg:min-w-0 max-h-full lg:max-h-screen\" *ngIf=\"nodeSelected && showDescription\">\n <div class=\"card h-full flex flex-col\">\n <description [bokNode]=\"nodeSelected\" [showVersions]=\"showVersions\" [versionMap]=\"versionMap\" \n [bokVersion]=\"bokVersion\" [currentVersion]=\"currentVersion\" (codSelectedChange)=\"onCodeSelectedChange($event)\"\n (bokVersionChange)=\"onBokversionChange($event)\" [isAnOldVersion]=\"isAnOldVersion\"\n [isAnObsoleteId]=\"isAnObsoleteId\"></description>\n </div>\n </div>\n </div>\n <p-scrolltop class=\"lg:hidden scroll-top\" *ngIf=\"showDescription\"/>\n</div>\n\n<ng-template #spinner>\n <div class=\"flex justify-content-center align-content-center\" style=\"min-height: 30rem\">\n <ng-container #container></ng-container>\n <p-progress-spinner *ngIf=\"!customSpinner\" strokeWidth=\"3\" ariaLabel=\"loading\" class=\"flex align-items-center justify-content-center\" />\n </div>\n</ng-template>\n", styles: [".card{background-color:#fff;padding:1rem;box-sizing:border-box;height:100%;display:flex;flex-direction:column;overflow:auto}@media (min-width: 992px){.card{border-left:1px solid rgba(0,0,0,.1)}}.scroll-top{--p-button-primary-background: var(--secondary-color);--p-button-primary-border-color: var(--secondary-color);--p-button-primary-hover-background: var(--hover-color);--p-button-primary-hover-border-color: var(--hover-color)}\n"], dependencies: [{ kind: "component", type: BubbleComponent, selector: "bubble", inputs: ["bokData", "COLOR_STROKE_SELECTED", "margin", "codSelected", "selectedNodes"], outputs: ["codSelectedChange"] }, { kind: "component", type: DescriptionComponent, selector: "description", inputs: ["bokNode", "isAnOldVersion", "isAnObsoleteId", "showVersions", "versionMap", "currentVersion", "bokVersion"], outputs: ["codSelectedChange", "bokVersionChange"] }, { kind: "component", type: SearchComponent, selector: "search", inputs: ["inputValue", "searchBooleans", "suggestions"], outputs: ["inputValueChange", "searchSettingsChange", "codSelectedChange"] }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i3$1.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "ngmodule", type: ScrollTopModule }, { kind: "component", type: i4$1.ScrollTop, selector: "p-scrollTop, p-scrolltop, p-scroll-top", inputs: ["styleClass", "style", "target", "threshold", "icon", "behavior", "showTransitionOptions", "hideTransitionOptions", "buttonAriaLabel", "buttonProps"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1090
1137
|
}
|
|
1091
1138
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: BokComponent, decorators: [{
|
|
1092
1139
|
type: Component,
|
|
1093
|
-
args: [{ standalone: true, selector: 'bok-visualization', imports: [BubbleComponent, DescriptionComponent, SearchComponent, ProgressSpinnerModule, ScrollTopModule, CommonModule], template: "<div *ngIf=\"!loading; else spinner\">\
|
|
1140
|
+
args: [{ standalone: true, selector: 'bok-visualization', imports: [BubbleComponent, DescriptionComponent, SearchComponent, ProgressSpinnerModule, ScrollTopModule, CommonModule], template: "<div *ngIf=\"!loading; else spinner\">\n <div *ngIf=\"showSearchEngine && this.bubbleData\" class=\"flex justify-content-center\">\n <search [inputValue]=\"searchInputFieldDoc\" [searchBooleans]=\"searchBooleans\" (inputValueChange)=\"onSearchValueChange($event)\" \n (searchSettingsChange)=\"onSearchBooleansChange($event)\" [suggestions]=\"suggestions\" (codSelectedChange)=\"onCodeSelectedChange($event)\"></search>\n </div>\n <div class=\"flex flex-wrap\">\n <div class=\"flex-1 p-3\" *ngIf=\"bubbleData\">\n <bubble [bokData]=\"bubbleData\" [codSelected]=\"codSelected\" [selectedNodes]=\"selectedNodes\" (codSelectedChange)=\"onCodeSelectedChange($event)\"></bubble>\n </div>\n <div class=\"flex-1 p-3 overflow-auto min-w-screen lg:min-w-0 max-h-full lg:max-h-screen\" *ngIf=\"nodeSelected && showDescription\">\n <div class=\"card h-full flex flex-col\">\n <description [bokNode]=\"nodeSelected\" [showVersions]=\"showVersions\" [versionMap]=\"versionMap\" \n [bokVersion]=\"bokVersion\" [currentVersion]=\"currentVersion\" (codSelectedChange)=\"onCodeSelectedChange($event)\"\n (bokVersionChange)=\"onBokversionChange($event)\" [isAnOldVersion]=\"isAnOldVersion\"\n [isAnObsoleteId]=\"isAnObsoleteId\"></description>\n </div>\n </div>\n </div>\n <p-scrolltop class=\"lg:hidden scroll-top\" *ngIf=\"showDescription\"/>\n</div>\n\n<ng-template #spinner>\n <div class=\"flex justify-content-center align-content-center\" style=\"min-height: 30rem\">\n <ng-container #container></ng-container>\n <p-progress-spinner *ngIf=\"!customSpinner\" strokeWidth=\"3\" ariaLabel=\"loading\" class=\"flex align-items-center justify-content-center\" />\n </div>\n</ng-template>\n", styles: [".card{background-color:#fff;padding:1rem;box-sizing:border-box;height:100%;display:flex;flex-direction:column;overflow:auto}@media (min-width: 992px){.card{border-left:1px solid rgba(0,0,0,.1)}}.scroll-top{--p-button-primary-background: var(--secondary-color);--p-button-primary-border-color: var(--secondary-color);--p-button-primary-hover-background: var(--hover-color);--p-button-primary-hover-border-color: var(--hover-color)}\n"] }]
|
|
1094
1141
|
}], ctorParameters: () => [{ type: BokFirebaseService }, { type: BokDataService }], propDecorators: { customSpinner: [{
|
|
1095
1142
|
type: Input
|
|
1096
1143
|
}], container: [{
|
|
@@ -1113,6 +1160,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
1113
1160
|
class BokInformationService {
|
|
1114
1161
|
bokDataService;
|
|
1115
1162
|
bokFirebaseService;
|
|
1163
|
+
deprecatedConceptsCache = new Map();
|
|
1116
1164
|
constructor(bokDataService, bokFirebaseService) {
|
|
1117
1165
|
this.bokDataService = bokDataService;
|
|
1118
1166
|
this.bokFirebaseService = bokFirebaseService;
|
|
@@ -1125,7 +1173,29 @@ class BokInformationService {
|
|
|
1125
1173
|
return this.bokDataService.getParsedBokData().pipe(filter((parsedData) => parsedData !== undefined), map((parsedData) => parsedData.colors[knowledgeAreaCode]));
|
|
1126
1174
|
}
|
|
1127
1175
|
getConceptName(code) {
|
|
1128
|
-
return this.bokDataService.getParsedBokData().pipe(filter((parsedData) => parsedData !== undefined),
|
|
1176
|
+
return this.bokDataService.getParsedBokData().pipe(filter((parsedData) => parsedData !== undefined), switchMap((parsedData) => {
|
|
1177
|
+
const currentName = parsedData.namehash[code];
|
|
1178
|
+
if (currentName)
|
|
1179
|
+
return of(currentName);
|
|
1180
|
+
return this.getDeprecatedConcept(code).pipe(map((deprecatedConcept) => {
|
|
1181
|
+
if (deprecatedConcept) {
|
|
1182
|
+
return deprecatedConcept.name;
|
|
1183
|
+
}
|
|
1184
|
+
else {
|
|
1185
|
+
return 'Unknown Concept';
|
|
1186
|
+
}
|
|
1187
|
+
}));
|
|
1188
|
+
}));
|
|
1189
|
+
}
|
|
1190
|
+
getDeprecatedConcept(code) {
|
|
1191
|
+
if (this.deprecatedConceptsCache.has(code)) {
|
|
1192
|
+
return of(this.deprecatedConceptsCache.get(code));
|
|
1193
|
+
}
|
|
1194
|
+
return this.bokFirebaseService.getDeprecatedConcept(code).pipe(tap((deprecatedConcept) => {
|
|
1195
|
+
if (deprecatedConcept) {
|
|
1196
|
+
this.deprecatedConceptsCache.set(code, deprecatedConcept);
|
|
1197
|
+
}
|
|
1198
|
+
}));
|
|
1129
1199
|
}
|
|
1130
1200
|
getKnowledgeAreas(code) {
|
|
1131
1201
|
return this.bokDataService.getParsedBokData().pipe(filter((parsedData) => parsedData !== undefined), map((parsedData) => {
|