@hestia-earth/ui-components 0.0.1 → 0.0.4

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.
@@ -417,7 +417,7 @@
417
417
  }]
418
418
  }], ctorParameters: function () { return [{ type: i1__namespace.FaIconLibrary }]; } });
419
419
 
420
- var _a$5, _b$2;
420
+ var _a$6, _b$3;
421
421
  var get$5 = require('lodash.get');
422
422
  var gitHome = 'https://gitlab.com/hestia-earth';
423
423
  var gitRawBaseUrl = 'https://glcdn.githack.com/hestia-earth';
@@ -627,8 +627,8 @@
627
627
  null; };
628
628
  var nodeTypeToString = function (type) { return "" + type.charAt(0).toLowerCase() + type.substring(1); };
629
629
  var parseNodeType = function (type) { return Object.values(schema.NodeType).find(function (v) { return v.toString().toLowerCase() === (type || '').toLowerCase(); }); };
630
- var nodeDefaultLabel = (_a$5 = {},
631
- _a$5[schema.NodeType.ImpactAssessment] = function (_a) {
630
+ var nodeDefaultLabel = (_a$6 = {},
631
+ _a$6[schema.NodeType.ImpactAssessment] = function (_a) {
632
632
  var name = _a.name, country = _a.country, endDate = _a.endDate, product = _a.product;
633
633
  return name ? name.replace((product === null || product === void 0 ? void 0 : product.name) + ", ", '') : [
634
634
  product === null || product === void 0 ? void 0 : product.name,
@@ -636,11 +636,11 @@
636
636
  endDate
637
637
  ].filter(Boolean).join(', ');
638
638
  },
639
- _a$5[schema.NodeType.Site] = function (_a) {
639
+ _a$6[schema.NodeType.Site] = function (_a) {
640
640
  var name = _a.name, description = _a.description;
641
641
  return name || description;
642
642
  },
643
- _a$5);
643
+ _a$6);
644
644
  var defaultLabel = function (node) { return node ? (node['@type'] in nodeDefaultLabel ? nodeDefaultLabel[node['@type']](node) : node.name) || node['@id'] || node.id : ''; };
645
645
  var itemColor = function (index) { return randomMaterialColor.getColor({ text: "" + index }); };
646
646
  var listColor = function (_v, index) { return itemColor(index); };
@@ -663,18 +663,26 @@
663
663
  DeltaDisplayType["absolute"] = "absolute";
664
664
  DeltaDisplayType["percent"] = "percent";
665
665
  })(exports.DeltaDisplayType || (exports.DeltaDisplayType = {}));
666
- var deltaPerType = (_b$2 = {},
667
- _b$2[exports.DeltaDisplayType.absolute] = function (value, original) { return value - original; },
668
- _b$2[exports.DeltaDisplayType.percent] = function (value, original) { return ((value - original) / original) * 100; },
669
- _b$2);
670
- var roundValue = function (value) { return +(("" + value).substring(0, 10)); };
671
- var delta = function (value, originalValue, displayType) {
666
+ var deltaPerType = (_b$3 = {},
667
+ _b$3[exports.DeltaDisplayType.absolute] = function (value, original) { return value - original; },
668
+ _b$3[exports.DeltaDisplayType.percent] = function (value, original) { return ((value - original) / original) * 100; },
669
+ _b$3);
670
+ var roundValue = function (value) { return +("" + value).substring(0, 10); };
671
+ var delta = function (value, originalValue, displayType, customDeltaFuncs) {
672
672
  if (displayType === void 0) { displayType = exports.DeltaDisplayType.percent; }
673
673
  var vvalue = roundValue(propertyValue$1(value));
674
674
  var voriginalValue = roundValue(propertyValue$1(originalValue));
675
- var diff = vvalue === voriginalValue ? 0 : deltaPerType[displayType](vvalue, voriginalValue);
675
+ var deltaFuncs = Object.assign(Object.assign({}, deltaPerType), customDeltaFuncs);
676
+ var diff = vvalue === voriginalValue ? 0 : deltaFuncs[displayType](vvalue, voriginalValue);
676
677
  return Number.isFinite(diff) ? (diff === -0 ? 0 : diff) : 0;
677
678
  };
679
+ exports.DeltaColour = void 0;
680
+ (function (DeltaColour) {
681
+ DeltaColour["Success"] = "success";
682
+ DeltaColour["Warning"] = "warning";
683
+ DeltaColour["Danger"] = "danger";
684
+ })(exports.DeltaColour || (exports.DeltaColour = {}));
685
+ var emptyValue = function (value) { return utils.isEmpty(value) || isNaN(propertyValue$1(value)); };
678
686
  var filenameWithoutExt = function (filename) {
679
687
  if (filename === void 0) { filename = ''; }
680
688
  var file = api.fileToExt(filename, '');
@@ -682,6 +690,57 @@
682
690
  return file.endsWith('.') ? file.substring(0, file.length - 1) : file;
683
691
  };
684
692
 
693
+ var reduceValues$1 = function (values) { return values.length ? values.reduce(function (p, v) { return p + propertyValue$1(v.value); }, 0) : undefined; };
694
+ var formatValues = function (originalValues, recalculatedValues) {
695
+ if (originalValues === void 0) { originalValues = []; }
696
+ if (recalculatedValues === void 0) { recalculatedValues = []; }
697
+ var originalValuesFiltered = originalValues.filter(function (value) { return !value.deleted; });
698
+ var recalculatedValuesFiltered = recalculatedValues.filter(function (value) { return !value.deleted; });
699
+ var terms = utils.unique(__spreadArray(__spreadArray([], __read(originalValuesFiltered)), __read(recalculatedValuesFiltered)).map(function (v) { return v.term['@id']; })).sort();
700
+ var values = terms.map(function (termId) {
701
+ var original = originalValuesFiltered.filter(function (v) { return termId === v.term['@id']; });
702
+ var recalculated = recalculatedValuesFiltered.filter(function (v) { return termId === v.term['@id']; });
703
+ var term = (original[0] || recalculated[0] || { term: { '@id': termId } }).term;
704
+ return {
705
+ term: term,
706
+ original: reduceValues$1(original),
707
+ recalculated: reduceValues$1(recalculated)
708
+ };
709
+ });
710
+ return values;
711
+ };
712
+
713
+ var _a$5, _b$2, _c$2;
714
+ var SUCCESS_CRITERION_MAX_DELTA_PERCENT = 5;
715
+ var WARNING_CRITERION_MAX_DELTA_PERCENT = 20;
716
+ var PercentDeltaConditions;
717
+ (function (PercentDeltaConditions) {
718
+ PercentDeltaConditions["recalculated0"] = "recalculated should be 0";
719
+ PercentDeltaConditions["original0"] = "original is 0";
720
+ })(PercentDeltaConditions || (PercentDeltaConditions = {}));
721
+ var calculatePercentDeltaConditions = (_a$5 = {},
722
+ _a$5[PercentDeltaConditions.recalculated0] = function (original, recalculated) { return original > 0 && recalculated === 0; },
723
+ _a$5[PercentDeltaConditions.original0] = function (original, recalculated) { return original === 0 && recalculated > 0; },
724
+ _a$5);
725
+ var calculatePercentDeltaResult = (_b$2 = {},
726
+ _b$2[PercentDeltaConditions.recalculated0] = function (original, recalculated) { return (recalculated - original) / (original + 1); },
727
+ // Always considered an error so deliberately exceed SUCCESS_CRITERION_MAX_DELTA_PERCENT
728
+ _b$2[PercentDeltaConditions.original0] = function (original, recalculated) { return Math.sign(recalculated - original); },
729
+ _b$2.default = function (original, recalculated) { return (recalculated - original) / original; },
730
+ _b$2);
731
+ var calculatePercentDelta = function (recalculated, original) {
732
+ var matchingCondition = Object.values(PercentDeltaConditions).find(function (value) { return calculatePercentDeltaConditions[value](original, recalculated); }) || 'default';
733
+ return calculatePercentDeltaResult[matchingCondition](original, recalculated) * 100;
734
+ };
735
+ var customDeltaFuncs = (_c$2 = {},
736
+ _c$2[exports.DeltaDisplayType.percent] = calculatePercentDelta,
737
+ _c$2);
738
+ var evaluateSuccess = function (delta) { return Math.abs(delta) < SUCCESS_CRITERION_MAX_DELTA_PERCENT
739
+ ? exports.DeltaColour.Success
740
+ : Math.abs(delta) < WARNING_CRITERION_MAX_DELTA_PERCENT
741
+ ? exports.DeltaColour.Warning
742
+ : exports.DeltaColour.Danger; };
743
+
685
744
  /* eslint-disable @angular-eslint/directive-selector */
686
745
  var BindOnceDirective = /** @class */ (function () {
687
746
  function BindOnceDirective(templateRef, viewContainerRef) {
@@ -724,7 +783,6 @@
724
783
  }]
725
784
  }] });
726
785
 
727
- var emptyValue = function (value) { return utils.isEmpty(value) || isNaN(propertyValue$1(value)); };
728
786
  var BlankNodeValueDeltaComponent = /** @class */ (function () {
729
787
  function BlankNodeValueDeltaComponent() {
730
788
  this.displayType = exports.DeltaDisplayType.percent;
@@ -739,15 +797,14 @@
739
797
  });
740
798
  Object.defineProperty(BlankNodeValueDeltaComponent.prototype, "delta", {
741
799
  get: function () {
742
- return delta(this.value, this.originalValue, this.displayType);
800
+ return delta(this.value, this.originalValue, this.displayType, customDeltaFuncs);
743
801
  },
744
802
  enumerable: false,
745
803
  configurable: true
746
804
  });
747
805
  Object.defineProperty(BlankNodeValueDeltaComponent.prototype, "color", {
748
806
  get: function () {
749
- var value = Math.abs(this.delta);
750
- return this.displayType === exports.DeltaDisplayType.percent ? (value < 5 ? 'success' : (value < 20 ? 'warning' : 'danger')) : '';
807
+ return this.displayType === exports.DeltaDisplayType.percent ? evaluateSuccess(this.delta) : '';
751
808
  },
752
809
  enumerable: false,
753
810
  configurable: true
@@ -771,7 +828,6 @@
771
828
  type: i0.Input
772
829
  }] } });
773
830
 
774
- var reduceValues$1 = function (values) { return values.length ? values.reduce(function (p, v) { return p + propertyValue$1(v.value); }, 0) : undefined; };
775
831
  var BlankNodeDiffsComponent = /** @class */ (function () {
776
832
  function BlankNodeDiffsComponent() {
777
833
  this.originalValues = [];
@@ -780,19 +836,7 @@
780
836
  this.values = [];
781
837
  }
782
838
  BlankNodeDiffsComponent.prototype.ngOnInit = function () {
783
- var originalValues = (this.originalValues || []).filter(function (value) { return !value.deleted; });
784
- var recalculatedValues = (this.recalculatedValues || []).filter(function (value) { return !value.deleted; });
785
- var terms = utils.unique(__spreadArray(__spreadArray([], __read(originalValues)), __read(recalculatedValues)).map(function (v) { return v.term['@id']; })).sort();
786
- this.values = terms.map(function (termId) {
787
- var original = originalValues.filter(function (v) { return termId === v.term['@id']; });
788
- var recalculated = recalculatedValues.filter(function (v) { return termId === v.term['@id']; });
789
- var term = (original[0] || recalculated[0] || { term: { '@id': termId } }).term;
790
- return {
791
- term: term,
792
- original: reduceValues$1(original),
793
- recalculated: reduceValues$1(recalculated),
794
- };
795
- });
839
+ this.values = formatValues(this.originalValues, this.recalculatedValues);
796
840
  };
797
841
  return BlankNodeDiffsComponent;
798
842
  }());
@@ -2123,7 +2167,7 @@
2123
2167
  return MapsDrawingConfirmComponent;
2124
2168
  }());
2125
2169
  MapsDrawingConfirmComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MapsDrawingConfirmComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2126
- MapsDrawingConfirmComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MapsDrawingConfirmComponent, selector: "he-maps-drawing-confirm", inputs: { value: "value", modes: "modes", center: "center", zoom: "zoom" }, outputs: { closed: "closed" }, viewQueries: [{ propertyName: "map", first: true, predicate: i1$2.GoogleMap, descendants: true }], ngImport: i0__namespace, template: "<div class=\"modal is-large is-active\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-card\">\n <header class=\"modal-card-head\">\n <p class=\"modal-card-title\">Draw on Map</p>\n <button class=\"delete\" aria-label=\"close\" (click)=\"closed.next(value)\"></button>\n </header>\n <section class=\"modal-card-body p-0\">\n <google-map\n height=\"100%\"\n width=\"100%\"\n [zoom]=\"zoom\"\n [center]=\"center\"\n [options]=\"options\"\n ></google-map>\n </section>\n <footer class=\"modal-card-foot\">\n <button class=\"button is-primary\" (click)=\"confirm()\">\n <span i18n=\"@@confirm\">Confirm</span>\n </button>\n <button class=\"button\" (click)=\"closed.next(value)\">\n <span i18n=\"@@close\">Close</span>\n </button>\n <button class=\"button is-danger is-outlined\" (click)=\"clear()\">\n <fa-icon class=\"mr-2\" icon=\"times\"></fa-icon>\n <span i18n=\"@@clear\">Clear</span>\n </button>\n </footer>\n </div>\n</div>\n", styles: ["google-map{display:block;height:100%;max-height:calc(100vh - 146px);min-height:500px}\n"], components: [{ type: i1__namespace$2.GoogleMap, selector: "google-map", inputs: ["height", "width", "center", "zoom", "options", "mapTypeId"], outputs: ["authFailure", "boundsChanged", "centerChanged", "mapClick", "mapDblclick", "mapDrag", "mapDragend", "mapDragstart", "headingChanged", "idle", "maptypeidChanged", "mapMousemove", "mapMouseout", "mapMouseover", "projectionChanged", "mapRightclick", "tilesloaded", "tiltChanged", "zoomChanged"], exportAs: ["googleMap"] }, { type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }] });
2170
+ MapsDrawingConfirmComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MapsDrawingConfirmComponent, selector: "he-maps-drawing-confirm", inputs: { value: "value", modes: "modes", center: "center", zoom: "zoom" }, outputs: { closed: "closed" }, viewQueries: [{ propertyName: "map", first: true, predicate: i1$2.GoogleMap, descendants: true }], ngImport: i0__namespace, template: "<div class=\"modal is-large is-active\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-card\">\n <header class=\"modal-card-head\">\n <p class=\"modal-card-title\">Draw on Map</p>\n <button class=\"delete\" aria-label=\"close\" (click)=\"closed.next(value)\"></button>\n </header>\n <section class=\"modal-card-body p-0\">\n <google-map\n height=\"100%\"\n width=\"100%\"\n [zoom]=\"zoom\"\n [center]=\"center\"\n [options]=\"options\"\n ></google-map>\n </section>\n <footer class=\"modal-card-foot\">\n <button class=\"button is-primary\" (click)=\"confirm()\">\n <span>Confirm</span>\n </button>\n <button class=\"button\" (click)=\"closed.next(value)\">\n <span>Close</span>\n </button>\n <button class=\"button is-danger is-outlined\" (click)=\"clear()\">\n <fa-icon class=\"mr-2\" icon=\"times\"></fa-icon>\n <span>Clear</span>\n </button>\n </footer>\n </div>\n</div>\n", styles: ["google-map{display:block;height:100%;max-height:calc(100vh - 146px);min-height:500px}\n"], components: [{ type: i1__namespace$2.GoogleMap, selector: "google-map", inputs: ["height", "width", "center", "zoom", "options", "mapTypeId"], outputs: ["authFailure", "boundsChanged", "centerChanged", "mapClick", "mapDblclick", "mapDrag", "mapDragend", "mapDragstart", "headingChanged", "idle", "maptypeidChanged", "mapMousemove", "mapMouseout", "mapMouseover", "projectionChanged", "mapRightclick", "tilesloaded", "tiltChanged", "zoomChanged"], exportAs: ["googleMap"] }, { type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }] });
2127
2171
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MapsDrawingConfirmComponent, decorators: [{
2128
2172
  type: i0.Component,
2129
2173
  args: [{
@@ -2160,7 +2204,7 @@
2160
2204
  return PopoverComponent;
2161
2205
  }());
2162
2206
  PopoverComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PopoverComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2163
- PopoverComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PopoverComponent, selector: "he-popover", inputs: { message: "message", content: "content", data: "data", position: "position" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0__namespace, template: "<div class=\"is-inline-block popover is-popover-{{position}}\" [class.is-popover-active]=\"active\">\n <ng-content></ng-content>\n\n <div class=\"popover-content\">\n\n <ng-template\n [ngTemplateOutlet]=\"content || ct\"\n [ngTemplateOutletContext]=\"{message: message, data: data}\"\n ></ng-template>\n\n <footer>\n <ng-content select=\"[actions]\"></ng-content>\n <button class=\"button is-small\" (click)=\"$event.stopPropagation(); active = false\">\n <span i18n=\"@@cancel\">Close</span>\n </button>\n </footer>\n </div>\n</div>\n\n<ng-template #ct>\n <p class=\"mb-2 is-pre-wrap\" [innerHtml]=\"message\"></p>\n</ng-template>\n", styles: [":host{cursor:pointer;display:block}.popover{position:relative;display:inline-block}.popover .popover-content{z-index:99999;position:absolute;display:none;font-size:.75rem;padding:.4rem .8rem;color:#4a4a4a;background-color:#fff;border-radius:4px;box-shadow:0 2px 3px #0a0a0a1a,0 0 0 1px #0a0a0a1a;width:max-content;max-width:24rem}.popover .popover-content:before{position:absolute;content:\"\";border-style:solid;pointer-events:none;height:0;width:0;top:100%;left:50%;border-color:transparent;border-bottom-color:#fff;border-left-color:#fff;border-width:.4rem;margin-left:-.4rem;margin-top:-.4rem;transform-origin:center;box-shadow:-1px 1px 2px #0a0a0a33}.popover .popover-content{top:auto!important;bottom:100%!important;left:50%!important;right:auto!important;transform:translate(-50%,-.7rem)!important}.popover .popover-content:before{top:100%!important;bottom:auto!important;left:50%!important;right:auto!important;transform:rotate(-45deg)}.popover.is-popover-right .popover-content{top:auto!important;bottom:50%!important;left:100%!important;right:auto!important;transform:translate(.7rem,50%)!important}.popover.is-popover-right .popover-content:before{top:50%!important;bottom:auto!important;left:0!important;right:auto!important;transform:rotate(45deg)}.popover.is-popover-bottom .popover-content{top:100%!important;bottom:auto!important;left:50%!important;right:auto!important;transform:translate(-50%,.7rem)!important}.popover.is-popover-bottom .popover-content:before{top:0!important;bottom:auto!important;left:50%!important;right:auto!important;transform:rotate(135deg)}.popover.is-popover-left .popover-content{top:auto!important;bottom:50%!important;left:auto!important;right:100%!important;transform:translate(-.7rem,50%)!important}.popover.is-popover-left .popover-content:before{top:50%!important;bottom:auto!important;left:100%!important;right:auto!important;transform:rotate(-135deg)}.popover.is-popover-active .popover-content,.popover.is-popover-hover:hover .popover-content,.popover .popover-trigger:focus~.popover-content{display:block}\n"], directives: [{ type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
2207
+ PopoverComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PopoverComponent, selector: "he-popover", inputs: { message: "message", content: "content", data: "data", position: "position" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0__namespace, template: "<div class=\"is-inline-block popover is-popover-{{position}}\" [class.is-popover-active]=\"active\">\n <ng-content></ng-content>\n\n <div class=\"popover-content\">\n\n <ng-template\n [ngTemplateOutlet]=\"content || ct\"\n [ngTemplateOutletContext]=\"{message: message, data: data}\"\n ></ng-template>\n\n <footer>\n <ng-content select=\"[actions]\"></ng-content>\n <button class=\"button is-small\" (click)=\"$event.stopPropagation(); active = false\">\n <span>Close</span>\n </button>\n </footer>\n </div>\n</div>\n\n<ng-template #ct>\n <p class=\"mb-2 is-pre-wrap\" [innerHtml]=\"message\"></p>\n</ng-template>\n", styles: [":host{cursor:pointer;display:block}.popover{position:relative;display:inline-block}.popover .popover-content{z-index:99999;position:absolute;display:none;font-size:.75rem;padding:.4rem .8rem;color:#4a4a4a;background-color:#fff;border-radius:4px;box-shadow:0 2px 3px #0a0a0a1a,0 0 0 1px #0a0a0a1a;width:max-content;max-width:24rem}.popover .popover-content:before{position:absolute;content:\"\";border-style:solid;pointer-events:none;height:0;width:0;top:100%;left:50%;border-color:transparent;border-bottom-color:#fff;border-left-color:#fff;border-width:.4rem;margin-left:-.4rem;margin-top:-.4rem;transform-origin:center;box-shadow:-1px 1px 2px #0a0a0a33}.popover .popover-content{top:auto!important;bottom:100%!important;left:50%!important;right:auto!important;transform:translate(-50%,-.7rem)!important}.popover .popover-content:before{top:100%!important;bottom:auto!important;left:50%!important;right:auto!important;transform:rotate(-45deg)}.popover.is-popover-right .popover-content{top:auto!important;bottom:50%!important;left:100%!important;right:auto!important;transform:translate(.7rem,50%)!important}.popover.is-popover-right .popover-content:before{top:50%!important;bottom:auto!important;left:0!important;right:auto!important;transform:rotate(45deg)}.popover.is-popover-bottom .popover-content{top:100%!important;bottom:auto!important;left:50%!important;right:auto!important;transform:translate(-50%,.7rem)!important}.popover.is-popover-bottom .popover-content:before{top:0!important;bottom:auto!important;left:50%!important;right:auto!important;transform:rotate(135deg)}.popover.is-popover-left .popover-content{top:auto!important;bottom:50%!important;left:auto!important;right:100%!important;transform:translate(-.7rem,50%)!important}.popover.is-popover-left .popover-content:before{top:50%!important;bottom:auto!important;left:100%!important;right:auto!important;transform:rotate(-135deg)}.popover.is-popover-active .popover-content,.popover.is-popover-hover:hover .popover-content,.popover .popover-trigger:focus~.popover-content{display:block}\n"], directives: [{ type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
2164
2208
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PopoverComponent, decorators: [{
2165
2209
  type: i0.Component,
2166
2210
  args: [{
@@ -2193,7 +2237,7 @@
2193
2237
  return PopoverConfirmComponent;
2194
2238
  }());
2195
2239
  PopoverConfirmComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PopoverConfirmComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2196
- PopoverConfirmComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PopoverConfirmComponent, selector: "he-popover-confirm", inputs: { message: "message", content: "content", position: "position", popoverClass: "popoverClass" }, outputs: { confirmed: "confirmed" }, viewQueries: [{ propertyName: "popover", first: true, predicate: PopoverComponent, descendants: true }], ngImport: i0__namespace, template: "<he-popover [message]=\"message\" [content]=\"content\" [data]=\"data\" [position]=\"position\" [class]=\"popoverClass\">\n <ng-content></ng-content>\n\n <ng-container actions>\n <button class=\"button is-small is-primary mr-2\" (click)=\"$event.stopPropagation(); confirm()\">\n <span i18n=\"@@confirm\">Confirm</span>\n </button>\n </ng-container>\n</he-popover>\n", styles: ["he-popover{height:100%;width:100%}\n"], components: [{ type: PopoverComponent, selector: "he-popover", inputs: ["message", "content", "data", "position"] }] });
2240
+ PopoverConfirmComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PopoverConfirmComponent, selector: "he-popover-confirm", inputs: { message: "message", content: "content", position: "position", popoverClass: "popoverClass" }, outputs: { confirmed: "confirmed" }, viewQueries: [{ propertyName: "popover", first: true, predicate: PopoverComponent, descendants: true }], ngImport: i0__namespace, template: "<he-popover [message]=\"message\" [content]=\"content\" [data]=\"data\" [position]=\"position\" [class]=\"popoverClass\">\n <ng-content></ng-content>\n\n <ng-container actions>\n <button class=\"button is-small is-primary mr-2\" (click)=\"$event.stopPropagation(); confirm()\">\n <span>Confirm</span>\n </button>\n </ng-container>\n</he-popover>\n", styles: ["he-popover{height:100%;width:100%}\n"], components: [{ type: PopoverComponent, selector: "he-popover", inputs: ["message", "content", "data", "position"] }] });
2197
2241
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PopoverConfirmComponent, decorators: [{
2198
2242
  type: i0.Component,
2199
2243
  args: [{
@@ -3090,7 +3134,7 @@
3090
3134
  return BibliographiesSearchConfirmComponent;
3091
3135
  }());
3092
3136
  BibliographiesSearchConfirmComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BibliographiesSearchConfirmComponent, deps: [{ token: i1__namespace$4.FormBuilder }, { token: HeMendeleyService }, { token: HeSearchService }], target: i0__namespace.ɵɵFactoryTarget.Component });
3093
- BibliographiesSearchConfirmComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: BibliographiesSearchConfirmComponent, selector: "he-bibliographies-search-confirm", inputs: { search: "search", searchSources: "searchSources", searchBibliographies: "searchBibliographies", searchBy: "searchBy" }, outputs: { closed: "closed" }, ngImport: i0__namespace, template: "<div class=\"modal is-large is-active\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-card\">\n <header class=\"modal-card-head\">\n <p class=\"modal-card-title\">Search Bibliographies</p>\n <button class=\"delete\" aria-label=\"close\" (click)=\"cancel()\"></button>\n </header>\n <section class=\"modal-card-body\">\n <form [formGroup]=\"formGroup\" novalidate>\n <div class=\"field has-addons\">\n <div class=\"control is-expanded has-icons-right\">\n <input class=\"input search-input\"\n [attr.placeholder]=\"'Search bibliography by ' + searchBy\"\n formControlName=\"search\" name=\"randomname\" autocomplete=\"off\"\n (focus)=\"searchFocus($event)\"\n >\n <a class=\"icon is-small is-right\" (click)=\"!loading && resetSearch()\" [ngSwitch]=\"loading\">\n <fa-icon *ngSwitchCase=\"true\" icon=\"spinner\" [pulse]=\"true\"></fa-icon>\n <fa-icon *ngSwitchCase=\"false\" icon=\"times\"></fa-icon>\n </a>\n </div>\n </div>\n </form>\n\n <div class=\"mt-2\">\n <span i18n=\"@@bibliographies.search.empty\" [class.is-hidden]=\"loading || !searchControl?.value || hasResults\">\n No bibliographies found matching query.\n </span>\n\n <ul>\n <li *ngFor=\"let result of results | async\">\n <a class=\"is-block p-1 search-result\" (click)=\"selectResult(result)\"\n [class.is-active]=\"selectedResult === result\"\n >\n <ngb-highlight\n [result]=\"result.bibliography ? result.bibliography.title : result.title\"\n [term]=\"searchControl?.value\"\n ></ngb-highlight>\n\n <span class=\"px-1\">-</span>\n\n <span class=\"px-1\"><i>{{result.name}}</i></span>\n\n <span class=\"px-1\"\n *ngIf=\"result.bibliography?.documentDOI || result.documentDOI\"\n >- <b>documentDOI:</b>\n </span>\n <ngb-highlight\n [result]=\"result.bibliography ? result.bibliography.documentDOI : result.documentDOI\"\n [term]=\"searchControl?.value\"\n ></ngb-highlight>\n\n <span class=\"px-1\"\n *ngIf=\"result.bibliography?.scopus || result.scopus\"\n >- <b>scopus:</b>\n </span>\n <ngb-highlight\n [result]=\"result.bibliography?.scopus || result.scopus\"\n [term]=\"searchControl?.value\"\n ></ngb-highlight>\n\n <span>\n <ng-container *ngTemplateOutlet=\"mendeleyLink; context: {$implicit: result.bibliography ? result.bibliography.mendeleyID : result.mendeleyID}\"></ng-container>\n </span>\n </a>\n </li>\n </ul>\n </div>\n </section>\n <footer class=\"modal-card-foot\">\n <button class=\"button is-primary\" (click)=\"confirm()\" [disabled]=\"!selectedResult\">\n <span i18n=\"@@confirm\">Confirm</span>\n </button>\n <button class=\"button\" (click)=\"cancel()\">\n <span i18n=\"@@close\">Close</span>\n </button>\n </footer>\n </div>\n</div>\n\n<ng-template #mendeleyLink let-id>\n <a *ngIf=\"id\" [href]=\"'https://www.mendeley.com/catalogue/' + id\" target=\"_blank\"\n (click)=\"$event.stopPropagation()\"\n >\n <fa-icon class=\"ml-2\" icon=\"external-link-alt\" size=\"sm\"></fa-icon>\n </a>\n</ng-template>\n", styles: ["ngb-highlight,span{vertical-align:middle;white-space:normal;width:auto}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: i10__namespace.NgbHighlight, selector: "ngb-highlight", inputs: ["highlightClass", "result", "term"] }], directives: [{ type: i1__namespace$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i3__namespace.AsyncPipe } });
3137
+ BibliographiesSearchConfirmComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: BibliographiesSearchConfirmComponent, selector: "he-bibliographies-search-confirm", inputs: { search: "search", searchSources: "searchSources", searchBibliographies: "searchBibliographies", searchBy: "searchBy" }, outputs: { closed: "closed" }, ngImport: i0__namespace, template: "<div class=\"modal is-large is-active\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-card\">\n <header class=\"modal-card-head\">\n <p class=\"modal-card-title\">Search Bibliographies</p>\n <button class=\"delete\" aria-label=\"close\" (click)=\"cancel()\"></button>\n </header>\n <section class=\"modal-card-body\">\n <form [formGroup]=\"formGroup\" novalidate>\n <div class=\"field has-addons\">\n <div class=\"control is-expanded has-icons-right\">\n <input class=\"input search-input\"\n [attr.placeholder]=\"'Search bibliography by ' + searchBy\"\n formControlName=\"search\" name=\"randomname\" autocomplete=\"off\"\n (focus)=\"searchFocus($event)\"\n >\n <a class=\"icon is-small is-right\" (click)=\"!loading && resetSearch()\" [ngSwitch]=\"loading\">\n <fa-icon *ngSwitchCase=\"true\" icon=\"spinner\" [pulse]=\"true\"></fa-icon>\n <fa-icon *ngSwitchCase=\"false\" icon=\"times\"></fa-icon>\n </a>\n </div>\n </div>\n </form>\n\n <div class=\"mt-2\">\n <span [class.is-hidden]=\"loading || !searchControl?.value || hasResults\">\n No bibliographies found matching query.\n </span>\n\n <ul>\n <li *ngFor=\"let result of results | async\">\n <a class=\"is-block p-1 search-result\" (click)=\"selectResult(result)\"\n [class.is-active]=\"selectedResult === result\"\n >\n <ngb-highlight\n [result]=\"result.bibliography ? result.bibliography.title : result.title\"\n [term]=\"searchControl?.value\"\n ></ngb-highlight>\n\n <span class=\"px-1\">-</span>\n\n <span class=\"px-1\"><i>{{result.name}}</i></span>\n\n <span class=\"px-1\"\n *ngIf=\"result.bibliography?.documentDOI || result.documentDOI\"\n >- <b>documentDOI:</b>\n </span>\n <ngb-highlight\n [result]=\"result.bibliography ? result.bibliography.documentDOI : result.documentDOI\"\n [term]=\"searchControl?.value\"\n ></ngb-highlight>\n\n <span class=\"px-1\"\n *ngIf=\"result.bibliography?.scopus || result.scopus\"\n >- <b>scopus:</b>\n </span>\n <ngb-highlight\n [result]=\"result.bibliography?.scopus || result.scopus\"\n [term]=\"searchControl?.value\"\n ></ngb-highlight>\n\n <span>\n <ng-container *ngTemplateOutlet=\"mendeleyLink; context: {$implicit: result.bibliography ? result.bibliography.mendeleyID : result.mendeleyID}\"></ng-container>\n </span>\n </a>\n </li>\n </ul>\n </div>\n </section>\n <footer class=\"modal-card-foot\">\n <button class=\"button is-primary\" (click)=\"confirm()\" [disabled]=\"!selectedResult\">\n <span>Confirm</span>\n </button>\n <button class=\"button\" (click)=\"cancel()\">\n <span>Close</span>\n </button>\n </footer>\n </div>\n</div>\n\n<ng-template #mendeleyLink let-id>\n <a *ngIf=\"id\" [href]=\"'https://www.mendeley.com/catalogue/' + id\" target=\"_blank\"\n (click)=\"$event.stopPropagation()\"\n >\n <fa-icon class=\"ml-2\" icon=\"external-link-alt\" size=\"sm\"></fa-icon>\n </a>\n</ng-template>\n", styles: ["ngb-highlight,span{vertical-align:middle;white-space:normal;width:auto}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: i10__namespace.NgbHighlight, selector: "ngb-highlight", inputs: ["highlightClass", "result", "term"] }], directives: [{ type: i1__namespace$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i3__namespace.AsyncPipe } });
3094
3138
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BibliographiesSearchConfirmComponent, decorators: [{
3095
3139
  type: i0.Component,
3096
3140
  args: [{
@@ -3587,7 +3631,7 @@
3587
3631
  return NodeCsvExportConfirmComponent;
3588
3632
  }());
3589
3633
  NodeCsvExportConfirmComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeCsvExportConfirmComponent, deps: [{ token: i1__namespace$3.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Component });
3590
- NodeCsvExportConfirmComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: { nodes: "nodes", filename: "filename", headerKeys: "headerKeys", extension: "extension", isUpload: "isUpload" }, outputs: { closed: "closed" }, ngImport: i0__namespace, template: "<div class=\"modal is-active\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-card\">\n <header class=\"modal-card-head\">\n <p class=\"modal-card-title\">Export as CSV</p>\n <button class=\"delete\" aria-label=\"close\" (click)=\"closed.next(true)\"></button>\n </header>\n <section class=\"modal-card-body\">\n <div class=\"notification is-info\" role=\"alert\" *ngIf=\"isUpload\">\n <span i18n=\"@@files.export.notice-1\">After Download, you can edit and</span>\n <a class=\"px-1\" routerLink=\"../\">upload the CSV file</a>\n <span i18n=\"@@files.export.notice-2\">to submit your content on the Hestia platform, and your draft will remain unchanged.</span>\n\n <p>\n <span>Alternatively, you can import the CSV file right back by clicking on the \"Import from CSV\" button and selecting the exported file.</span>\n </p>\n </div>\n\n <ng-container *ngIf=\"!isUpload && includedNodes.length > 1\">\n <p class=\"mb-2\">\n <b>{{includedNodes.length}}</b>\n <span class=\"px-1\">Nodes will be included in your download.</span>\n <a (click)=\"showIncludeNodes = !showIncludeNodes\">\n <ng-container *ngIf=\"!showIncludeNodes\">Show list</ng-container>\n <ng-container *ngIf=\"showIncludeNodes\">Hide list</ng-container>\n </a>\n </p>\n\n <div class=\"table-container\" *ngIf=\"showIncludeNodes\">\n <table class=\"table is-fullwidth is-hoverable mb-0\">\n <thead class=\"has-background-black\">\n <tr>\n <th>\n <span class=\"has-text-white\" i18n=\"@@files.export.confirm.@type\">@type</span>\n </th>\n <th>\n <span class=\"has-text-white\" i18n=\"@@files.export.confirm.@id\">@id</span>\n </th>\n <th>\n <span class=\"has-text-white\" i18n=\"@@files.export.confirm.name\">Name</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let node of includedNodes\">\n <td>\n <span *bindOnce=\"node\">{{node.node['@type']}}</span>\n </td>\n <td>\n <span *bindOnce=\"node\">{{node.node['@id']}}</span>\n </td>\n <td>\n <span *bindOnce=\"node\">{{node.node.name}}</span>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </ng-container>\n\n <he-node-csv-select-headers [class.is-hidden]=\"isUpload\"\n [csv]=\"csvData\" [keys]=\"headerKeys\" [includeDefaultCSV]=\"isUpload\"\n (headersChanged)=\"headersUpdated($event)\"\n ></he-node-csv-select-headers>\n </section>\n <footer class=\"modal-card-foot\">\n <a class=\"button is-success\" target=\"_blank\"\n [attr.disabled]=\"csvContent ? null : true\"\n [href]=\"csvContent\"\n [attr.download]=\"csvContent ? downloadFilename : null\"\n (click)=\"closed.next(true)\"\n >\n <fa-icon class=\"mr-2\" icon=\"download\"></fa-icon>\n <span i18n=\"@@files.export.confirm\">Download CSV</span>\n </a>\n <button class=\"button\" (click)=\"closed.next(true)\">\n <span i18n=\"@@cancel\">Cancel</span>\n </button>\n </footer>\n </div>\n</div>\n", styles: [""], components: [{ type: NodeCsvSelectHeadersComponent, selector: "he-node-csv-select-headers", inputs: ["csv", "keys", "includeDefaultCSV"], outputs: ["headersChanged"] }, { type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }] });
3634
+ NodeCsvExportConfirmComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: { nodes: "nodes", filename: "filename", headerKeys: "headerKeys", extension: "extension", isUpload: "isUpload" }, outputs: { closed: "closed" }, ngImport: i0__namespace, template: "<div class=\"modal is-active\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-card\">\n <header class=\"modal-card-head\">\n <p class=\"modal-card-title\">Export as CSV</p>\n <button class=\"delete\" aria-label=\"close\" (click)=\"closed.next(true)\"></button>\n </header>\n <section class=\"modal-card-body\">\n <div class=\"notification is-info\" role=\"alert\" *ngIf=\"isUpload\">\n <span>After Download, you can edit and</span>\n <a class=\"px-1\" routerLink=\"../\">upload the CSV file</a>\n <span>to submit your content on the Hestia platform, and your draft will remain unchanged.</span>\n\n <p>\n <span>Alternatively, you can import the CSV file right back by clicking on the \"Import from CSV\" button and selecting the exported file.</span>\n </p>\n </div>\n\n <ng-container *ngIf=\"!isUpload && includedNodes.length > 1\">\n <p class=\"mb-2\">\n <b>{{includedNodes.length}}</b>\n <span class=\"px-1\">Nodes will be included in your download.</span>\n <a (click)=\"showIncludeNodes = !showIncludeNodes\">\n <ng-container *ngIf=\"!showIncludeNodes\">Show list</ng-container>\n <ng-container *ngIf=\"showIncludeNodes\">Hide list</ng-container>\n </a>\n </p>\n\n <div class=\"table-container\" *ngIf=\"showIncludeNodes\">\n <table class=\"table is-fullwidth is-hoverable mb-0\">\n <thead class=\"has-background-black\">\n <tr>\n <th>\n <span class=\"has-text-white\">@type</span>\n </th>\n <th>\n <span class=\"has-text-white\">@id</span>\n </th>\n <th>\n <span class=\"has-text-white\">Name</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let node of includedNodes\">\n <td>\n <span *bindOnce=\"node\">{{node.node['@type']}}</span>\n </td>\n <td>\n <span *bindOnce=\"node\">{{node.node['@id']}}</span>\n </td>\n <td>\n <span *bindOnce=\"node\">{{node.node.name}}</span>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </ng-container>\n\n <he-node-csv-select-headers [class.is-hidden]=\"isUpload\"\n [csv]=\"csvData\" [keys]=\"headerKeys\" [includeDefaultCSV]=\"isUpload\"\n (headersChanged)=\"headersUpdated($event)\"\n ></he-node-csv-select-headers>\n </section>\n <footer class=\"modal-card-foot\">\n <a class=\"button is-success\" target=\"_blank\"\n [attr.disabled]=\"csvContent ? null : true\"\n [href]=\"csvContent\"\n [attr.download]=\"csvContent ? downloadFilename : null\"\n (click)=\"closed.next(true)\"\n >\n <fa-icon class=\"mr-2\" icon=\"download\"></fa-icon>\n <span>Download CSV</span>\n </a>\n <button class=\"button\" (click)=\"closed.next(true)\">\n <span>Cancel</span>\n </button>\n </footer>\n </div>\n</div>\n", styles: [""], components: [{ type: NodeCsvSelectHeadersComponent, selector: "he-node-csv-select-headers", inputs: ["csv", "keys", "includeDefaultCSV"], outputs: ["headersChanged"] }, { type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }] });
3591
3635
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeCsvExportConfirmComponent, decorators: [{
3592
3636
  type: i0.Component,
3593
3637
  args: [{
@@ -6532,7 +6576,7 @@
6532
6576
  return FilesFormComponent;
6533
6577
  }());
6534
6578
  FilesFormComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FilesFormComponent, deps: [{ token: i0__namespace.ElementRef }, { token: HeSearchService }, { token: HeUsersService }], target: i0__namespace.ɵɵFactoryTarget.Component });
6535
- FilesFormComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilesFormComponent, selector: "he-files-form", inputs: { schemas: "schemas", errors: "errors", node: "node", nodeMap: "nodeMap", editable: "editable", errorMode: "errorMode", deepEditable: "deepEditable", errorsEditable: "errorsEditable" }, outputs: { nodeChange: "nodeChange", nodeErorrResolved: "nodeErorrResolved", nodeErrorAdded: "nodeErrorAdded" }, ngImport: i0__namespace, template: "<div class=\"card\">\n <div class=\"card-toggle p-4\" (click)=\"isOpen = !isOpen\" pointer>\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"isOpen\"></fa-icon>\n <span *ngIf=\"nodeProperty\" class=\"is-px-2\"\n [class.has-text-danger]=\"nodeProperty.hasError\"\n [class.has-text-warning]=\"nodeProperty.hasWarning\"\n >\n <he-node-icon [type]=\"nodeProperty.schemaType\"></he-node-icon>\n </span>\n </div>\n\n <ng-container *ngIf=\"editable && isOpen && nodeProperty\">\n <ng-container *ngTemplateOutlet=\"showNewProperty; context: {$implicit: nodeProperty}\"></ng-container>\n </ng-container>\n\n <div class=\"card-content\">\n <ng-container *ngIf=\"isOpen\">\n <div class=\"pb-3 mb-2\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: nodeProperty}\"></ng-container>\n </div>\n\n <div class=\"mb-4\" *ngIf=\"nodeProperty?.error\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: nodeProperty, edit: true}\"></ng-container>\n </div>\n </ng-container>\n\n <div class=\"columns is-multiline\">\n <ng-container *ngFor=\"let property of properties; trackBy: trackByProperty\">\n <ng-container *ngTemplateOutlet=\"showProperty; context: {$implicit: property}\"></ng-container>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"isOpen\">\n <ng-container *ngTemplateOutlet=\"propertyMap; context: {$implicit: nodeProperty}\"></ng-container>\n </ng-container>\n </div>\n</div>\n\n<he-maps-drawing-confirm *ngIf=\"!!mapDrawingProperty\"\n [value]=\"mapDrawingProperty.value\" [modes]=\"mapDrawingModes(mapDrawingProperty)\"\n (closed)=\"onMapDrawingClosed($event)\"\n></he-maps-drawing-confirm>\n\n<he-bibliographies-search-confirm *ngIf=\"!!bibliographiesSearchProperty\"\n [search]=\"bibliographiesSearchProperty.value\"\n [searchBy]=\"bibliographiesSearchKey(bibliographiesSearchProperty)\"\n [searchSources]=\"bibliographiesSearchSources\"\n (closed)=\"onBibliographiesSearchClosed($event)\"\n></he-bibliographies-search-confirm>\n\n<ng-template #labelDescription let-property>\n <span\n class=\"trigger-popover\"\n [ngbPopover]=\"property.schema?.description\" [autoClose]=\"'outside'\"\n triggers=\"hover\" placement=\"right\" container=\"body\"\n >\n <span>{{property.key}}</span>\n </span>\n</ng-template>\n\n<ng-template #labelDefault let-property>\n <span>{{property.key}}</span>\n</ng-template>\n\n<ng-template #showProperty let-property>\n <ng-container *ngIf=\"(isOpen || property.closedVisible) && !property.isHidden\">\n <div class=\"column is-6\"\n [id]=\"property.fullKey + '_' + property.id\"\n [class.is-12]=\"property.properties.length || !property.key\"\n [ngSwitch]=\"!!property.properties.length\"\n >\n <div class=\"columns is-multiline is-variable is-1\" *ngSwitchCase=\"false\">\n <div class=\"column is-3 py-1\" *ngIf=\"property.key\">\n <label class=\"label has-text-right-tablet has-text-ellipsis\"\n *bindOnce=\"property\"\n [for]=\"property.id\"\n >\n <ng-container\n *ngTemplateOutlet=\"property.schema?.description && editable && property.editable ? labelDescription : labelDefault; context: {$implicit: property}\">\n </ng-container>\n </label>\n </div>\n\n <div class=\"column is-9 py-1\" [class.is-12]=\"!property.key\">\n <div class=\"field\">\n <ng-container *ngTemplateOutlet=\"inputForm; context: {$implicit: property}\"></ng-container>\n\n <ng-container *ngIf=\"(editable || errorsEditable) && (property.hasError || property.hasWarning)\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: property, edit: false}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div class=\"panel\" *ngSwitchCase=\"true\"\n [class.is-link]=\"errorMode && property.changed\"\n [class.is-danger]=\"!property.changed && property.hasError\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n [class.is-default]=\"!property.changed && !property.hasError && !property.hasWarning\"\n >\n <div class=\"open-group panel-heading py-0\"\n (click)=\"property.isOpen = !property.isOpen\" pointer\n [class.is-open]=\"property.isOpen\"\n [class.has-text-white]=\"(errorMode && property.changed) || property.hasError || property.hasWarning\"\n >\n <div class=\"columns is-mobile is-vcentered\">\n <span class=\"column is-narrow py-1 my-0\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!property.isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"property.isOpen\"></fa-icon>\n </span>\n <span class=\"column py-1 my-0\">\n <span class=\"is-size-6\">{{property.key}}</span>\n </span>\n <span *ngIf=\"property.schemaType\" class=\"column is-narrow py-1 my-0\">\n <span class=\"tags mb-0 has-addons\">\n <span class=\"tag mb-0 is-light\">Type</span>\n <span class=\"tag mb-0 is-white\">\n <he-schema-version-link linkClass=\"is-small\" [node]=\"{'@type': property.schemaType}\">\n <span>{{property.schemaType}}</span>\n </he-schema-version-link>\n </span>\n </span>\n </span>\n <he-popover-confirm class=\"column is-narrow py-1 my-0 px-0\"\n *ngIf=\"editable && !errorsEditable\"\n ngbTooltip=\"Remove group\" placement=\"top\"\n [message]=\"'<p>This will remove the group completely.</p>' + (property.isRequired ? '<p><u>Warning: this field is required.</u></p>' : '') + '<p>Do you confirm?</p>'\"\n popoverClass=\"px-3\"\n (confirmed)=\"propertyChanged(null, property)\"\n >\n <fa-icon icon=\"times\" size=\"sm\"></fa-icon>\n </he-popover-confirm>\n </div>\n </div>\n <div class=\"panel-block is-block p-0\" *ngIf=\"property.isOpen\">\n <ng-container [ngSwitch]=\"property.isArray\">\n <div class=\"px-3 pt-4\" *ngIf=\"property.error\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: property, edit: true}\"></ng-container>\n </div>\n\n <div class=\"mt-3\" *ngSwitchCase=\"false\">\n <p class=\"help py-1 px-2\" *ngIf=\"editable && !property.editable\">\n To change the {{property.key}}, please delete it first, then add the field again\n </p>\n <ng-container *ngIf=\"editable && property.editable\">\n <ng-container [ngSwitch]=\"property.schema?.title\">\n <p class=\"help py-1 px-2\" *ngSwitchCase=\"'Bibliography'\">\n Search by Title or Document DOI to auto-populate the fields using the Mendeley catalogue\n </p>\n </ng-container>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"showNewProperty; context: {$implicit: property}\"></ng-container>\n\n <div class=\"px-3 mt-1\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: property}\"></ng-container>\n </div>\n\n <div class=\"property-group py-2 px-3 mt-2\">\n <div class=\"columns is-multiline mb-0\">\n <ng-container *ngFor=\"let prop2 of property.properties; trackBy: trackByProperty\">\n <ng-container *ngTemplateOutlet=\"showProperty; context: {$implicit: prop2}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div class=\"py-2 px-3 mt-2\" *ngSwitchCase=\"true\">\n <div class=\"mt-1\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: property}\"></ng-container>\n </div>\n\n <ng-container *ngFor=\"let prop2 of property.properties; trackBy: trackByProperty\">\n <div class=\"card p-0 my-4\" *ngIf=\"prop2.key\"\n [id]=\"prop2.fullKey + '_' + prop2.id\"\n >\n <div class=\"property-array-number\">\n <div class=\"tags has-addons\">\n <span class=\"tag is-dark\">{{prop2.key}}</span>\n <ng-container *ngIf=\"editable && !errorsEditable && property.editable\">\n <span class=\"tag is-info\" pointer\n (click)=\"duplicateArrayGroup(property, prop2)\"\n [ngbTooltip]=\"'Duplicate ' + pluralize(property.key, 1)\" placement=\"top\"\n >\n <fa-icon icon=\"clone\" size=\"sm\"></fa-icon>\n </span>\n <span class=\"tag is-light\" pointer\n *ngIf=\"prop2.key !== '0'\"\n (click)=\"moveArrayGroupUp(property, prop2)\"\n ngbTooltip=\"Move Up\" placement=\"top\"\n >\n <fa-icon icon=\"long-arrow-alt-up\" size=\"sm\"></fa-icon>\n </span>\n <span class=\"tag is-light\" pointer\n *ngIf=\"prop2.key !== property.properties.length - 1\"\n (click)=\"moveArrayGroupDown(property, prop2)\"\n ngbTooltip=\"Move Down\" placement=\"top\"\n >\n <fa-icon icon=\"long-arrow-alt-down\" size=\"sm\"></fa-icon>\n </span>\n <he-popover-confirm class=\"tag is-delete\"\n [ngbTooltip]=\"'Remove ' + pluralize(property.key, 1)\" placement=\"top\"\n message=\"This will remove the group completely. Do you confirm?\" position=\"right\"\n (confirmed)=\"removeArrayGroup(property, prop2)\"\n ></he-popover-confirm>\n </ng-container>\n </div>\n </div>\n\n <ng-container *ngTemplateOutlet=\"showNewProperty; context: {$implicit: prop2}\"></ng-container>\n\n <div class=\"px-4 mt-2\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: prop2}\"></ng-container>\n </div>\n\n <div class=\"px-4 mt-2\" *ngIf=\"prop2.error\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: prop2, edit: true}\"></ng-container>\n </div>\n\n <div class=\"property-group card-content p-3\">\n <div class=\"columns is-multiline my-0\">\n <ng-container *ngFor=\"let prop3 of prop2.properties; trackBy: trackByProperty\">\n <ng-container *ngTemplateOutlet=\"showProperty; context: {$implicit: prop3}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n\n <button class=\"button is-dark is-outlined is-small\" type=\"button\"\n *ngIf=\"editable && !errorsEditable\"\n (click)=\"addArrayGroup(property)\"\n >\n <fa-icon icon=\"plus-circle\"></fa-icon>\n <span class=\"pl-2\" i18n=\"@@add\">Add</span>\n <span class=\"pl-1\">{{property.key | pluralize:1}}</span>\n </button>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #inputForm let-property>\n <ng-container *ngIf=\"property.key\">\n <ng-container [ngSwitch]=\"property.suggestions?.type\">\n <ng-container *ngSwitchCase=\"'select'\">\n <ng-container *ngTemplateOutlet=\"inputSelect; context: {$implicit: property}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"inputInput; context: {$implicit: property}\"></ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #inputInput let-property>\n <div class=\"field mb-0\" [class.has-addons]=\"hasAddons(property)\">\n <div class=\"control is-expanded\"\n [class.has-icons-right]=\"property.loading\"\n >\n <input class=\"input is-small search-input\"\n [class.is-dark]=\"property.key === 'type'\"\n [class.is-link]=\"errorMode && property.changed\"\n [class.is-danger]=\"(!property.changed && property.hasError) || isRequired(property)\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n\n [(ngModel)]=\"property.value\" #propertyModel=\"ngModel\"\n [type]=\"property.schema?.type === 'number' ? 'number' : 'string'\"\n [id]=\"property.id\"\n name=\"randomname\"\n [readonly]=\"!editable || !property.editable || property.schema?.internal\"\n [placeholder]=\"property.placeholder\"\n [appTagsInput]=\"{enabled: editable && property.editable && property.schema?.type === 'array', items: property.schema?.items, delimiter: ';', allowDuplicates: true, placeholder: property.placeholder}\"\n (change)=\"propertyChanged($event.target.value, property)\"\n\n [pattern]=\"property.schema?.pattern\"\n [required]=\"property.fullKey.endsWith('id') && property.fullKey !== 'id'\"\n [min]=\"property.schema?.minimum\"\n [max]=\"property.schema?.maximum\"\n\n [ngbTypeahead]=\"propertySuggest(property.fullKey, property.suggestions?.type)\"\n [resultTemplate]=\"suggestion\"\n [inputFormatter]=\"formatter\"\n [focusFirst]=\"true\"\n (focus)=\"editable && property.editable && typeaheadFocus($event)\"\n (selectItem)=\"suggestionSelected($event.item, property)\"\n >\n\n <span class=\"icon is-small is-right has-text-grey-dark\" [class.is-hidden]=\"!property.loading\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"sm\"></fa-icon>\n </span>\n </div>\n <ng-container *ngTemplateOutlet=\"inputAddons; context: {$implicit: property}\"></ng-container>\n </div>\n <p class=\"help is-danger-light\"\n *ngIf=\"!property.hasError && propertyModel.invalid\"\n >\n <span *bindOnce=\"propertyModel.errors\" [innerHTML]=\"formatPropertyError(propertyModel.errors, property)\"></span>\n </p>\n</ng-template>\n\n<ng-template #inputSelect let-property>\n <div class=\"field mb-0\" [class.has-addons]=\"hasAddons(property)\">\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth\"\n [class.is-link]=\"errorMode && property.changed\"\n [class.is-danger]=\"(!property.changed && property.hasError) || isRequired(property)\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n >\n <select\n [(ngModel)]=\"property.value\" #propertyModel=\"ngModel\"\n [id]=\"property.id\"\n name=\"randomname\"\n [disabled]=\"!editable || !property.editable || property.schema?.internal\"\n (change)=\"propertyChanged($event.target.value, property)\"\n >\n <option value=\"\">Select</option>\n <ng-container *bindOnce=\"property.suggestions\">\n <option *ngFor=\"let value of property.suggestions.values; trackBy: trackByIndex\" [value]=\"value\">{{value}}</option>\n </ng-container>\n </select>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"inputAddons; context: {$implicit: property}\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #removeFieldAddon let-property>\n <div class=\"control\" *ngIf=\"!errorsEditable && !property.isRequired\">\n <a class=\"button is-small\" title=\"Remove field\"\n [class.is-outlined]=\"!property.changed && (property.hasError || property.hasWarning)\"\n [class.is-danger]=\"!property.changed && property.hasError\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n (click)=\"$event.stopPropagation(); propertyChanged(null, property)\"\n >\n <fa-icon icon=\"times\"></fa-icon>\n </a>\n </div>\n</ng-template>\n\n<ng-template #inputAddons let-property>\n <he-popover-confirm class=\"control\"\n *ngIf=\"enableAddError(property)\"\n position=\"left\"\n [content]=\"popupErrorForm\"\n (confirmed)=\"addError(property, $event)\"\n >\n <span class=\"button is-small\">\n <fa-icon icon=\"comments\"></fa-icon>\n </span>\n </he-popover-confirm>\n\n <ng-container *ngIf=\"editable && property.editable\">\n <ng-container [ngSwitch]=\"property.schemaType\">\n <ng-container *ngSwitchCase=\"SchemaType.Actor\">\n <ng-container *ngTemplateOutlet=\"actorAddons; context: {$implicit: property}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"SchemaType.Cycle\">\n <ng-container *ngTemplateOutlet=\"cycleAddons; context: {$implicit: property}\"></ng-container>\n </ng-container>\n </ng-container>\n <ng-container *bindOnce=\"property\">\n <div class=\"control\" *ngIf=\"mapDrawingModes(property).length\">\n <button class=\"button is-small\" title=\"Pick on Map\"\n (click)=\"mapDrawingProperty = property\"\n >\n <fa-icon icon=\"map-marked-alt\"></fa-icon>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"bibliographiesSearchKey(property)\">\n <button class=\"button is-small\" title=\"Advanced Search\"\n (click)=\"bibliographiesSearchProperty = property\"\n >\n <fa-icon icon=\"search\"></fa-icon>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"removeFieldAddon; context: {$implicit: property}\"></ng-container>\n </ng-container>\n <div class=\"control\" *ngIf=\"addPropertyEnabled(property)\">\n <a class=\"button is-small is-danger\" title=\"Add field\"\n (click)=\"$event.stopPropagation(); addMissingProperty(property)\"\n >\n <fa-icon icon=\"plus-circle\"></fa-icon>\n <span class=\"pl-2\" i18n=\"@@add\">Add</span>\n </a>\n </div>\n <div class=\"control\" *ngIf=\"isRequired(property)\">\n <label class=\"button is-small is-danger\" [for]=\"property.id\"\n ngbTooltip=\"This field is required\" placement=\"top\"\n >\n <fa-icon icon=\"exclamation-triangle\"></fa-icon>\n </label>\n </div>\n <ng-container *ngIf=\"property.externalUrl?.url\">\n <div class=\"control\">\n <a class=\"button is-small\"\n [href]=\"property.externalUrl.url + (property.externalUrl.urlParamValue ? property.value : '')\"\n target=\"_blank\"\n [title]=\"property.externalUrl.title\"\n [ngClass]=\"{'is-dark is-outlined': property.key === 'type'}\"\n [attr.disabled]=\"property.externalUrl.urlParamValue && !property.value ? true : null\"\n >\n <fa-icon [icon]=\"property.externalUrl.icon || 'external-link-alt'\"></fa-icon>\n </a>\n </div>\n </ng-container>\n <ng-container *ngIf=\"unitConverterEnabled(property)\">\n <div class=\"control\">\n <button class=\"button is-small\" title=\"Open calculator\"\n [ngbPopover]=\"convertUnits\" autoClose=\"outside\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"bottom\" container=\"body\"\n (click)=\"openUnitConverter(p, property)\"\n >\n <fa-icon icon=\"calculator\"></fa-icon>\n </button>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #actorAddons let-property>\n <div class=\"control\" *ngIf=\"property.key === '@id'\">\n <button class=\"button is-small\" title=\"Add myself as Actor\"\n (click)=\"setUserActorId(property)\"\n >\n <fa-icon [icon]=\"['far', 'id-badge']\"></fa-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #cycleAddons let-property>\n <div class=\"control\" *ngIf=\"property.key === 'cycleDuration'\">\n <button class=\"button is-small\" title=\"Calculate value from startDate and endDate\"\n (click)=\"calculateCycleDuration(property)\"\n [disabled]=\"!calculateCycleDurationEnabled(property)\"\n >\n <fa-icon icon=\"calculator\"></fa-icon>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"property.key === 'startDate'\">\n <button class=\"button is-small\" title=\"Calculate value from endDate and cycleDuration\"\n (click)=\"calculateCycleStartDate(property)\"\n [disabled]=\"!calculateCycleStartDateEnabled(property)\"\n >\n <fa-icon icon=\"calculator\"></fa-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #showNewProperty let-property>\n <header class=\"card-header\" *ngIf=\"editable && property.editable && (property.addPropertyEnabled || deepEditable); else padder\">\n <form class=\"py-3 px-4 is-flex-grow-1\" (submit)=\"addProperty(property)\" novalidate>\n <div class=\"field is-horizontal\">\n <div class=\"field-label is-small\">\n <label class=\"label\" [for]=\"property.id + '_new'\">\n <span i18n=\"@@files.form.newProperty\">Add new field</span>\n </label>\n </div>\n <div class=\"field-body\">\n <div class=\"field has-addons\">\n <div class=\"control is-expanded\">\n <input class=\"input is-small\"\n [(ngModel)]=\"property.newProperty\"\n [id]=\"property.id + '_new'\"\n name=\"randomname\"\n placeholder=\"Search and select field from results\"\n\n [ngbTypeahead]=\"suggestNewProperty(property.fullKey)\"\n [resultTemplate]=\"suggestion\"\n [inputFormatter]=\"formatter\"\n [focusFirst]=\"false\"\n [editable]=\"false\"\n (focus)=\"typeaheadFocus($event)\"\n >\n </div>\n <div class=\"control\">\n <button class=\"button is-small\" type=\"submit\"\n [disabled]=\"!property.newProperty || !property.newProperty.name\"\n >\n <fa-icon icon=\"plus\"></fa-icon>\n <span class=\"pl-2\" i18n=\"@@add\">Add</span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </form>\n </header>\n</ng-template>\n\n<ng-template #propertyError let-property=\"property\" let-edit=\"edit\">\n <p class=\"help\"\n [class.is-danger]=\"property.hasError\"\n [class.is-warning]=\"property.hasWarning\"\n *ngIf=\"property.error\"\n >\n <span class=\"is-pre-wrap\" *bindOnce=\"property.error\" [innerHTML]=\"property.error.message\"></span>\n <a class=\"pl-2\"\n *ngIf=\"edit && errorsEditable && property.error.index >= 0\"\n (click)=\"editError(property)\"\n >\n <fa-icon class=\"pr-2\" icon=\"edit\"></fa-icon>\n <span i18n=\"@@edit\">Edit</span>\n </a>\n <a class=\"pl-2\"\n *ngIf=\"(property.hasWarning || errorsEditable) && property.error.index >= 0\"\n (click)=\"resolveError(property)\"\n >\n <fa-icon class=\"pr-2\" icon=\"check\"></fa-icon>\n <span i18n=\"@@resolved\">Resolved</span>\n </a>\n </p>\n</ng-template>\n\n<ng-template #propertyMap let-property>\n <div class=\"panel is-default\" *ngIf=\"showMap\">\n <div class=\"open-group panel-heading py-0\"\n (click)=\"mapVisible = !mapVisible\" pointer\n [class.is-open]=\"mapVisible\"\n >\n <div class=\"columns is-mobile is-vcentered mb-0\">\n <span class=\"column is-narrow py-1 my-0\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!mapVisible\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"mapVisible\"></fa-icon>\n </span>\n <span class=\"column py-1 my-0\">\n <span class=\"is-size-6\">View on Map</span>\n </span>\n </div>\n </div>\n <div class=\"panel-block is-block p-0\" [class.is-hidden]=\"!mapVisible\">\n <he-sites-maps [sites]=\"[node]\" [showNotice]=\"false\"></he-sites-maps>\n </div>\n </div>\n</ng-template>\n\n<ng-template #nodeErrorForm let-property>\n <ng-container *ngIf=\"property.newError && property.editable\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <div class=\"select is-small\">\n <select [(ngModel)]=\"property.newError.level\">\n <option [value]=\"undefined\">Select Level</option>\n <option value=\"error\">Error</option>\n <option value=\"warning\">Warning</option>\n </select>\n </div>\n </div>\n <div class=\"control is-expanded\">\n <textarea class=\"textarea is-small\"\n [(ngModel)]=\"property.newError.message\"\n placeholder=\"Enter your message here\"\n rows=\"1\"\n ></textarea>\n </div>\n <div class=\"control\">\n <button class=\"button is-small\"\n [disabled]=\"!property.newError.level || !property.newError.message\"\n (click)=\"addError(property, property.newError)\"\n >\n <fa-icon icon=\"plus-circle\"></fa-icon>\n <span class=\"pl-2\" i18n=\"@@add\">Add</span>\n </button>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #popupErrorForm let-data=\"data\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <div class=\"select\">\n <select [(ngModel)]=\"data.level\">\n <option [value]=\"undefined\">Select Level</option>\n <option value=\"error\">Error</option>\n <option value=\"warning\">Warning</option>\n </select>\n </div>\n </div>\n <div class=\"control\">\n <input class=\"input\"\n [(ngModel)]=\"data.message\"\n placeholder=\"Enter your message here\"\n >\n </div>\n </div>\n</ng-template>\n\n<ng-template #suggestion let-r=\"result\" let-t=\"term\">\n <ngb-highlight\n [title]=\"r.bibliography?.title || r.bibliography?.documentDOI || r.bibliography?.scopus || r.name\"\n [result]=\"r.bibliography?.title || r.bibliography?.documentDOI || r.bibliography?.scopus || r.name\"\n [term]=\"t\"\n ></ngb-highlight>\n</ng-template>\n\n<ng-template #padder>\n <div class=\"pt-1\"></div>\n</ng-template>\n\n<ng-template #convertUnits let-value=\"value\" let-term=\"term\" let-units=\"units\">\n <he-unit-converter [value]=\"value\" [term]=\"term\" [toUnits]=\"units\"></he-unit-converter>\n</ng-template>\n", styles: [".panel.is-default .panel-heading{background-color:#ededed;color:#363636}.card-toggle{left:0;position:absolute;top:0}@media screen and (max-width: 768px){.card-toggle{position:relative}}.card-toggle>fa-icon{display:inline-block;width:10px}.card{overflow:visible}.card .card{box-shadow:2px 2px #36363652,0 0 0 1px #36363652}.card .card>.card-header{box-shadow:0 2px 1px #36363652}.property-array-number{left:-4px;position:absolute;top:-12px}.property-array-number .tag.is-delete{border:1px solid rgba(54,54,54,.32)}.control>.button{height:100%}.is-danger-light{color:#f5758f}he-sites-maps{height:200px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: NodeIconComponent, selector: "he-node-icon", inputs: ["type", "size"] }, { type: MapsDrawingConfirmComponent, selector: "he-maps-drawing-confirm", inputs: ["value", "modes", "center", "zoom"], outputs: ["closed"] }, { type: BibliographiesSearchConfirmComponent, selector: "he-bibliographies-search-confirm", inputs: ["search", "searchSources", "searchBibliographies", "searchBy"], outputs: ["closed"] }, { type: SchemaVersionLinkComponent, selector: "he-schema-version-link", inputs: ["node", "showExternalLink", "linkClass", "text"] }, { type: PopoverConfirmComponent, selector: "he-popover-confirm", inputs: ["message", "content", "position", "popoverClass"], outputs: ["confirmed"] }, { type: SitesMapsComponent, selector: "he-sites-maps", inputs: ["loadPolygons", "sites", "nodes", "center", "zoom", "showNotice"] }, { type: i10__namespace.NgbHighlight, selector: "ngb-highlight", inputs: ["highlightClass", "result", "term"] }, { type: UnitConverterComponent, selector: "he-unit-converter", inputs: ["term", "value", "fromUnits", "toUnits"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i10__namespace.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i3__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10__namespace.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: TagsInputDirective, selector: "[appTagsInput]", inputs: ["appTagsInput"] }, { type: i1__namespace$4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i1__namespace$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1__namespace$4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1__namespace$4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace$4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace$4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], pipes: { "pluralize": PluralizePipe } });
6579
+ FilesFormComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilesFormComponent, selector: "he-files-form", inputs: { schemas: "schemas", errors: "errors", node: "node", nodeMap: "nodeMap", editable: "editable", errorMode: "errorMode", deepEditable: "deepEditable", errorsEditable: "errorsEditable" }, outputs: { nodeChange: "nodeChange", nodeErorrResolved: "nodeErorrResolved", nodeErrorAdded: "nodeErrorAdded" }, ngImport: i0__namespace, template: "<div class=\"card\">\n <div class=\"card-toggle p-4\" (click)=\"isOpen = !isOpen\" pointer>\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"isOpen\"></fa-icon>\n <span *ngIf=\"nodeProperty\" class=\"is-px-2\"\n [class.has-text-danger]=\"nodeProperty.hasError\"\n [class.has-text-warning]=\"nodeProperty.hasWarning\"\n >\n <he-node-icon [type]=\"nodeProperty.schemaType\"></he-node-icon>\n </span>\n </div>\n\n <ng-container *ngIf=\"editable && isOpen && nodeProperty\">\n <ng-container *ngTemplateOutlet=\"showNewProperty; context: {$implicit: nodeProperty}\"></ng-container>\n </ng-container>\n\n <div class=\"card-content\">\n <ng-container *ngIf=\"isOpen\">\n <div class=\"pb-3 mb-2\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: nodeProperty}\"></ng-container>\n </div>\n\n <div class=\"mb-4\" *ngIf=\"nodeProperty?.error\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: nodeProperty, edit: true}\"></ng-container>\n </div>\n </ng-container>\n\n <div class=\"columns is-multiline\">\n <ng-container *ngFor=\"let property of properties; trackBy: trackByProperty\">\n <ng-container *ngTemplateOutlet=\"showProperty; context: {$implicit: property}\"></ng-container>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"isOpen\">\n <ng-container *ngTemplateOutlet=\"propertyMap; context: {$implicit: nodeProperty}\"></ng-container>\n </ng-container>\n </div>\n</div>\n\n<he-maps-drawing-confirm *ngIf=\"!!mapDrawingProperty\"\n [value]=\"mapDrawingProperty.value\" [modes]=\"mapDrawingModes(mapDrawingProperty)\"\n (closed)=\"onMapDrawingClosed($event)\"\n></he-maps-drawing-confirm>\n\n<he-bibliographies-search-confirm *ngIf=\"!!bibliographiesSearchProperty\"\n [search]=\"bibliographiesSearchProperty.value\"\n [searchBy]=\"bibliographiesSearchKey(bibliographiesSearchProperty)\"\n [searchSources]=\"bibliographiesSearchSources\"\n (closed)=\"onBibliographiesSearchClosed($event)\"\n></he-bibliographies-search-confirm>\n\n<ng-template #labelDescription let-property>\n <span\n class=\"trigger-popover\"\n [ngbPopover]=\"property.schema?.description\" [autoClose]=\"'outside'\"\n triggers=\"hover\" placement=\"right\" container=\"body\"\n >\n <span>{{property.key}}</span>\n </span>\n</ng-template>\n\n<ng-template #labelDefault let-property>\n <span>{{property.key}}</span>\n</ng-template>\n\n<ng-template #showProperty let-property>\n <ng-container *ngIf=\"(isOpen || property.closedVisible) && !property.isHidden\">\n <div class=\"column is-6\"\n [id]=\"property.fullKey + '_' + property.id\"\n [class.is-12]=\"property.properties.length || !property.key\"\n [ngSwitch]=\"!!property.properties.length\"\n >\n <div class=\"columns is-multiline is-variable is-1\" *ngSwitchCase=\"false\">\n <div class=\"column is-3 py-1\" *ngIf=\"property.key\">\n <label class=\"label has-text-right-tablet has-text-ellipsis\"\n *bindOnce=\"property\"\n [for]=\"property.id\"\n >\n <ng-container\n *ngTemplateOutlet=\"property.schema?.description && editable && property.editable ? labelDescription : labelDefault; context: {$implicit: property}\">\n </ng-container>\n </label>\n </div>\n\n <div class=\"column is-9 py-1\" [class.is-12]=\"!property.key\">\n <div class=\"field\">\n <ng-container *ngTemplateOutlet=\"inputForm; context: {$implicit: property}\"></ng-container>\n\n <ng-container *ngIf=\"(editable || errorsEditable) && (property.hasError || property.hasWarning)\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: property, edit: false}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div class=\"panel\" *ngSwitchCase=\"true\"\n [class.is-link]=\"errorMode && property.changed\"\n [class.is-danger]=\"!property.changed && property.hasError\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n [class.is-default]=\"!property.changed && !property.hasError && !property.hasWarning\"\n >\n <div class=\"open-group panel-heading py-0\"\n (click)=\"property.isOpen = !property.isOpen\" pointer\n [class.is-open]=\"property.isOpen\"\n [class.has-text-white]=\"(errorMode && property.changed) || property.hasError || property.hasWarning\"\n >\n <div class=\"columns is-mobile is-vcentered\">\n <span class=\"column is-narrow py-1 my-0\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!property.isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"property.isOpen\"></fa-icon>\n </span>\n <span class=\"column py-1 my-0\">\n <span class=\"is-size-6\">{{property.key}}</span>\n </span>\n <span *ngIf=\"property.schemaType\" class=\"column is-narrow py-1 my-0\">\n <span class=\"tags mb-0 has-addons\">\n <span class=\"tag mb-0 is-light\">Type</span>\n <span class=\"tag mb-0 is-white\">\n <he-schema-version-link linkClass=\"is-small\" [node]=\"{'@type': property.schemaType}\">\n <span>{{property.schemaType}}</span>\n </he-schema-version-link>\n </span>\n </span>\n </span>\n <he-popover-confirm class=\"column is-narrow py-1 my-0 px-0\"\n *ngIf=\"editable && !errorsEditable\"\n ngbTooltip=\"Remove group\" placement=\"top\"\n [message]=\"'<p>This will remove the group completely.</p>' + (property.isRequired ? '<p><u>Warning: this field is required.</u></p>' : '') + '<p>Do you confirm?</p>'\"\n popoverClass=\"px-3\"\n (confirmed)=\"propertyChanged(null, property)\"\n >\n <fa-icon icon=\"times\" size=\"sm\"></fa-icon>\n </he-popover-confirm>\n </div>\n </div>\n <div class=\"panel-block is-block p-0\" *ngIf=\"property.isOpen\">\n <ng-container [ngSwitch]=\"property.isArray\">\n <div class=\"px-3 pt-4\" *ngIf=\"property.error\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: property, edit: true}\"></ng-container>\n </div>\n\n <div class=\"mt-3\" *ngSwitchCase=\"false\">\n <p class=\"help py-1 px-2\" *ngIf=\"editable && !property.editable\">\n To change the {{property.key}}, please delete it first, then add the field again\n </p>\n <ng-container *ngIf=\"editable && property.editable\">\n <ng-container [ngSwitch]=\"property.schema?.title\">\n <p class=\"help py-1 px-2\" *ngSwitchCase=\"'Bibliography'\">\n Search by Title or Document DOI to auto-populate the fields using the Mendeley catalogue\n </p>\n </ng-container>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"showNewProperty; context: {$implicit: property}\"></ng-container>\n\n <div class=\"px-3 mt-1\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: property}\"></ng-container>\n </div>\n\n <div class=\"property-group py-2 px-3 mt-2\">\n <div class=\"columns is-multiline mb-0\">\n <ng-container *ngFor=\"let prop2 of property.properties; trackBy: trackByProperty\">\n <ng-container *ngTemplateOutlet=\"showProperty; context: {$implicit: prop2}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div class=\"py-2 px-3 mt-2\" *ngSwitchCase=\"true\">\n <div class=\"mt-1\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: property}\"></ng-container>\n </div>\n\n <ng-container *ngFor=\"let prop2 of property.properties; trackBy: trackByProperty\">\n <div class=\"card p-0 my-4\" *ngIf=\"prop2.key\"\n [id]=\"prop2.fullKey + '_' + prop2.id\"\n >\n <div class=\"property-array-number\">\n <div class=\"tags has-addons\">\n <span class=\"tag is-dark\">{{prop2.key}}</span>\n <ng-container *ngIf=\"editable && !errorsEditable && property.editable\">\n <span class=\"tag is-info\" pointer\n (click)=\"duplicateArrayGroup(property, prop2)\"\n [ngbTooltip]=\"'Duplicate ' + pluralize(property.key, 1)\" placement=\"top\"\n >\n <fa-icon icon=\"clone\" size=\"sm\"></fa-icon>\n </span>\n <span class=\"tag is-light\" pointer\n *ngIf=\"prop2.key !== '0'\"\n (click)=\"moveArrayGroupUp(property, prop2)\"\n ngbTooltip=\"Move Up\" placement=\"top\"\n >\n <fa-icon icon=\"long-arrow-alt-up\" size=\"sm\"></fa-icon>\n </span>\n <span class=\"tag is-light\" pointer\n *ngIf=\"prop2.key !== property.properties.length - 1\"\n (click)=\"moveArrayGroupDown(property, prop2)\"\n ngbTooltip=\"Move Down\" placement=\"top\"\n >\n <fa-icon icon=\"long-arrow-alt-down\" size=\"sm\"></fa-icon>\n </span>\n <he-popover-confirm class=\"tag is-delete\"\n [ngbTooltip]=\"'Remove ' + pluralize(property.key, 1)\" placement=\"top\"\n message=\"This will remove the group completely. Do you confirm?\" position=\"right\"\n (confirmed)=\"removeArrayGroup(property, prop2)\"\n ></he-popover-confirm>\n </ng-container>\n </div>\n </div>\n\n <ng-container *ngTemplateOutlet=\"showNewProperty; context: {$implicit: prop2}\"></ng-container>\n\n <div class=\"px-4 mt-2\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: prop2}\"></ng-container>\n </div>\n\n <div class=\"px-4 mt-2\" *ngIf=\"prop2.error\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: prop2, edit: true}\"></ng-container>\n </div>\n\n <div class=\"property-group card-content p-3\">\n <div class=\"columns is-multiline my-0\">\n <ng-container *ngFor=\"let prop3 of prop2.properties; trackBy: trackByProperty\">\n <ng-container *ngTemplateOutlet=\"showProperty; context: {$implicit: prop3}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n\n <button class=\"button is-dark is-outlined is-small\" type=\"button\"\n *ngIf=\"editable && !errorsEditable\"\n (click)=\"addArrayGroup(property)\"\n >\n <fa-icon icon=\"plus-circle\"></fa-icon>\n <span class=\"pl-2\">Add</span>\n <span class=\"pl-1\">{{property.key | pluralize:1}}</span>\n </button>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #inputForm let-property>\n <ng-container *ngIf=\"property.key\">\n <ng-container [ngSwitch]=\"property.suggestions?.type\">\n <ng-container *ngSwitchCase=\"'select'\">\n <ng-container *ngTemplateOutlet=\"inputSelect; context: {$implicit: property}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"inputInput; context: {$implicit: property}\"></ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #inputInput let-property>\n <div class=\"field mb-0\" [class.has-addons]=\"hasAddons(property)\">\n <div class=\"control is-expanded\"\n [class.has-icons-right]=\"property.loading\"\n >\n <input class=\"input is-small search-input\"\n [class.is-dark]=\"property.key === 'type'\"\n [class.is-link]=\"errorMode && property.changed\"\n [class.is-danger]=\"(!property.changed && property.hasError) || isRequired(property)\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n\n [(ngModel)]=\"property.value\" #propertyModel=\"ngModel\"\n [type]=\"property.schema?.type === 'number' ? 'number' : 'string'\"\n [id]=\"property.id\"\n name=\"randomname\"\n [readonly]=\"!editable || !property.editable || property.schema?.internal\"\n [placeholder]=\"property.placeholder\"\n [appTagsInput]=\"{enabled: editable && property.editable && property.schema?.type === 'array', items: property.schema?.items, delimiter: ';', allowDuplicates: true, placeholder: property.placeholder}\"\n (change)=\"propertyChanged($event.target.value, property)\"\n\n [pattern]=\"property.schema?.pattern\"\n [required]=\"property.fullKey.endsWith('id') && property.fullKey !== 'id'\"\n [min]=\"property.schema?.minimum\"\n [max]=\"property.schema?.maximum\"\n\n [ngbTypeahead]=\"propertySuggest(property.fullKey, property.suggestions?.type)\"\n [resultTemplate]=\"suggestion\"\n [inputFormatter]=\"formatter\"\n [focusFirst]=\"true\"\n (focus)=\"editable && property.editable && typeaheadFocus($event)\"\n (selectItem)=\"suggestionSelected($event.item, property)\"\n >\n\n <span class=\"icon is-small is-right has-text-grey-dark\" [class.is-hidden]=\"!property.loading\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"sm\"></fa-icon>\n </span>\n </div>\n <ng-container *ngTemplateOutlet=\"inputAddons; context: {$implicit: property}\"></ng-container>\n </div>\n <p class=\"help is-danger-light\"\n *ngIf=\"!property.hasError && propertyModel.invalid\"\n >\n <span *bindOnce=\"propertyModel.errors\" [innerHTML]=\"formatPropertyError(propertyModel.errors, property)\"></span>\n </p>\n</ng-template>\n\n<ng-template #inputSelect let-property>\n <div class=\"field mb-0\" [class.has-addons]=\"hasAddons(property)\">\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth\"\n [class.is-link]=\"errorMode && property.changed\"\n [class.is-danger]=\"(!property.changed && property.hasError) || isRequired(property)\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n >\n <select\n [(ngModel)]=\"property.value\" #propertyModel=\"ngModel\"\n [id]=\"property.id\"\n name=\"randomname\"\n [disabled]=\"!editable || !property.editable || property.schema?.internal\"\n (change)=\"propertyChanged($event.target.value, property)\"\n >\n <option value=\"\">Select</option>\n <ng-container *bindOnce=\"property.suggestions\">\n <option *ngFor=\"let value of property.suggestions.values; trackBy: trackByIndex\" [value]=\"value\">{{value}}</option>\n </ng-container>\n </select>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"inputAddons; context: {$implicit: property}\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #removeFieldAddon let-property>\n <div class=\"control\" *ngIf=\"!errorsEditable && !property.isRequired\">\n <a class=\"button is-small\" title=\"Remove field\"\n [class.is-outlined]=\"!property.changed && (property.hasError || property.hasWarning)\"\n [class.is-danger]=\"!property.changed && property.hasError\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n (click)=\"$event.stopPropagation(); propertyChanged(null, property)\"\n >\n <fa-icon icon=\"times\"></fa-icon>\n </a>\n </div>\n</ng-template>\n\n<ng-template #inputAddons let-property>\n <he-popover-confirm class=\"control\"\n *ngIf=\"enableAddError(property)\"\n position=\"left\"\n [content]=\"popupErrorForm\"\n (confirmed)=\"addError(property, $event)\"\n >\n <span class=\"button is-small\">\n <fa-icon icon=\"comments\"></fa-icon>\n </span>\n </he-popover-confirm>\n\n <ng-container *ngIf=\"editable && property.editable\">\n <ng-container [ngSwitch]=\"property.schemaType\">\n <ng-container *ngSwitchCase=\"SchemaType.Actor\">\n <ng-container *ngTemplateOutlet=\"actorAddons; context: {$implicit: property}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"SchemaType.Cycle\">\n <ng-container *ngTemplateOutlet=\"cycleAddons; context: {$implicit: property}\"></ng-container>\n </ng-container>\n </ng-container>\n <ng-container *bindOnce=\"property\">\n <div class=\"control\" *ngIf=\"mapDrawingModes(property).length\">\n <button class=\"button is-small\" title=\"Pick on Map\"\n (click)=\"mapDrawingProperty = property\"\n >\n <fa-icon icon=\"map-marked-alt\"></fa-icon>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"bibliographiesSearchKey(property)\">\n <button class=\"button is-small\" title=\"Advanced Search\"\n (click)=\"bibliographiesSearchProperty = property\"\n >\n <fa-icon icon=\"search\"></fa-icon>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"removeFieldAddon; context: {$implicit: property}\"></ng-container>\n </ng-container>\n <div class=\"control\" *ngIf=\"addPropertyEnabled(property)\">\n <a class=\"button is-small is-danger\" title=\"Add field\"\n (click)=\"$event.stopPropagation(); addMissingProperty(property)\"\n >\n <fa-icon icon=\"plus-circle\"></fa-icon>\n <span class=\"pl-2\">Add</span>\n </a>\n </div>\n <div class=\"control\" *ngIf=\"isRequired(property)\">\n <label class=\"button is-small is-danger\" [for]=\"property.id\"\n ngbTooltip=\"This field is required\" placement=\"top\"\n >\n <fa-icon icon=\"exclamation-triangle\"></fa-icon>\n </label>\n </div>\n <ng-container *ngIf=\"property.externalUrl?.url\">\n <div class=\"control\">\n <a class=\"button is-small\"\n [href]=\"property.externalUrl.url + (property.externalUrl.urlParamValue ? property.value : '')\"\n target=\"_blank\"\n [title]=\"property.externalUrl.title\"\n [ngClass]=\"{'is-dark is-outlined': property.key === 'type'}\"\n [attr.disabled]=\"property.externalUrl.urlParamValue && !property.value ? true : null\"\n >\n <fa-icon [icon]=\"property.externalUrl.icon || 'external-link-alt'\"></fa-icon>\n </a>\n </div>\n </ng-container>\n <ng-container *ngIf=\"unitConverterEnabled(property)\">\n <div class=\"control\">\n <button class=\"button is-small\" title=\"Open calculator\"\n [ngbPopover]=\"convertUnits\" autoClose=\"outside\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"bottom\" container=\"body\"\n (click)=\"openUnitConverter(p, property)\"\n >\n <fa-icon icon=\"calculator\"></fa-icon>\n </button>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #actorAddons let-property>\n <div class=\"control\" *ngIf=\"property.key === '@id'\">\n <button class=\"button is-small\" title=\"Add myself as Actor\"\n (click)=\"setUserActorId(property)\"\n >\n <fa-icon [icon]=\"['far', 'id-badge']\"></fa-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #cycleAddons let-property>\n <div class=\"control\" *ngIf=\"property.key === 'cycleDuration'\">\n <button class=\"button is-small\" title=\"Calculate value from startDate and endDate\"\n (click)=\"calculateCycleDuration(property)\"\n [disabled]=\"!calculateCycleDurationEnabled(property)\"\n >\n <fa-icon icon=\"calculator\"></fa-icon>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"property.key === 'startDate'\">\n <button class=\"button is-small\" title=\"Calculate value from endDate and cycleDuration\"\n (click)=\"calculateCycleStartDate(property)\"\n [disabled]=\"!calculateCycleStartDateEnabled(property)\"\n >\n <fa-icon icon=\"calculator\"></fa-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #showNewProperty let-property>\n <header class=\"card-header\" *ngIf=\"editable && property.editable && (property.addPropertyEnabled || deepEditable); else padder\">\n <form class=\"py-3 px-4 is-flex-grow-1\" (submit)=\"addProperty(property)\" novalidate>\n <div class=\"field is-horizontal\">\n <div class=\"field-label is-small\">\n <label class=\"label\" [for]=\"property.id + '_new'\">\n <span>Add new field</span>\n </label>\n </div>\n <div class=\"field-body\">\n <div class=\"field has-addons\">\n <div class=\"control is-expanded\">\n <input class=\"input is-small\"\n [(ngModel)]=\"property.newProperty\"\n [id]=\"property.id + '_new'\"\n name=\"randomname\"\n placeholder=\"Search and select field from results\"\n\n [ngbTypeahead]=\"suggestNewProperty(property.fullKey)\"\n [resultTemplate]=\"suggestion\"\n [inputFormatter]=\"formatter\"\n [focusFirst]=\"false\"\n [editable]=\"false\"\n (focus)=\"typeaheadFocus($event)\"\n >\n </div>\n <div class=\"control\">\n <button class=\"button is-small\" type=\"submit\"\n [disabled]=\"!property.newProperty || !property.newProperty.name\"\n >\n <fa-icon icon=\"plus\"></fa-icon>\n <span class=\"pl-2\">Add</span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </form>\n </header>\n</ng-template>\n\n<ng-template #propertyError let-property=\"property\" let-edit=\"edit\">\n <p class=\"help\"\n [class.is-danger]=\"property.hasError\"\n [class.is-warning]=\"property.hasWarning\"\n *ngIf=\"property.error\"\n >\n <span class=\"is-pre-wrap\" *bindOnce=\"property.error\" [innerHTML]=\"property.error.message\"></span>\n <a class=\"pl-2\"\n *ngIf=\"edit && errorsEditable && property.error.index >= 0\"\n (click)=\"editError(property)\"\n >\n <fa-icon class=\"pr-2\" icon=\"edit\"></fa-icon>\n <span>Edit</span>\n </a>\n <a class=\"pl-2\"\n *ngIf=\"(property.hasWarning || errorsEditable) && property.error.index >= 0\"\n (click)=\"resolveError(property)\"\n >\n <fa-icon class=\"pr-2\" icon=\"check\"></fa-icon>\n <span>Resolved</span>\n </a>\n </p>\n</ng-template>\n\n<ng-template #propertyMap let-property>\n <div class=\"panel is-default\" *ngIf=\"showMap\">\n <div class=\"open-group panel-heading py-0\"\n (click)=\"mapVisible = !mapVisible\" pointer\n [class.is-open]=\"mapVisible\"\n >\n <div class=\"columns is-mobile is-vcentered mb-0\">\n <span class=\"column is-narrow py-1 my-0\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!mapVisible\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"mapVisible\"></fa-icon>\n </span>\n <span class=\"column py-1 my-0\">\n <span class=\"is-size-6\">View on Map</span>\n </span>\n </div>\n </div>\n <div class=\"panel-block is-block p-0\" [class.is-hidden]=\"!mapVisible\">\n <he-sites-maps [sites]=\"[node]\" [showNotice]=\"false\"></he-sites-maps>\n </div>\n </div>\n</ng-template>\n\n<ng-template #nodeErrorForm let-property>\n <ng-container *ngIf=\"property.newError && property.editable\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <div class=\"select is-small\">\n <select [(ngModel)]=\"property.newError.level\">\n <option [value]=\"undefined\">Select Level</option>\n <option value=\"error\">Error</option>\n <option value=\"warning\">Warning</option>\n </select>\n </div>\n </div>\n <div class=\"control is-expanded\">\n <textarea class=\"textarea is-small\"\n [(ngModel)]=\"property.newError.message\"\n placeholder=\"Enter your message here\"\n rows=\"1\"\n ></textarea>\n </div>\n <div class=\"control\">\n <button class=\"button is-small\"\n [disabled]=\"!property.newError.level || !property.newError.message\"\n (click)=\"addError(property, property.newError)\"\n >\n <fa-icon icon=\"plus-circle\"></fa-icon>\n <span class=\"pl-2\">Add</span>\n </button>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #popupErrorForm let-data=\"data\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <div class=\"select\">\n <select [(ngModel)]=\"data.level\">\n <option [value]=\"undefined\">Select Level</option>\n <option value=\"error\">Error</option>\n <option value=\"warning\">Warning</option>\n </select>\n </div>\n </div>\n <div class=\"control\">\n <input class=\"input\"\n [(ngModel)]=\"data.message\"\n placeholder=\"Enter your message here\"\n >\n </div>\n </div>\n</ng-template>\n\n<ng-template #suggestion let-r=\"result\" let-t=\"term\">\n <ngb-highlight\n [title]=\"r.bibliography?.title || r.bibliography?.documentDOI || r.bibliography?.scopus || r.name\"\n [result]=\"r.bibliography?.title || r.bibliography?.documentDOI || r.bibliography?.scopus || r.name\"\n [term]=\"t\"\n ></ngb-highlight>\n</ng-template>\n\n<ng-template #padder>\n <div class=\"pt-1\"></div>\n</ng-template>\n\n<ng-template #convertUnits let-value=\"value\" let-term=\"term\" let-units=\"units\">\n <he-unit-converter [value]=\"value\" [term]=\"term\" [toUnits]=\"units\"></he-unit-converter>\n</ng-template>\n", styles: [".panel.is-default .panel-heading{background-color:#ededed;color:#363636}.card-toggle{left:0;position:absolute;top:0}@media screen and (max-width: 768px){.card-toggle{position:relative}}.card-toggle>fa-icon{display:inline-block;width:10px}.card{overflow:visible}.card .card{box-shadow:2px 2px #36363652,0 0 0 1px #36363652}.card .card>.card-header{box-shadow:0 2px 1px #36363652}.property-array-number{left:-4px;position:absolute;top:-12px}.property-array-number .tag.is-delete{border:1px solid rgba(54,54,54,.32)}.control>.button{height:100%}.is-danger-light{color:#f5758f}he-sites-maps{height:200px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: NodeIconComponent, selector: "he-node-icon", inputs: ["type", "size"] }, { type: MapsDrawingConfirmComponent, selector: "he-maps-drawing-confirm", inputs: ["value", "modes", "center", "zoom"], outputs: ["closed"] }, { type: BibliographiesSearchConfirmComponent, selector: "he-bibliographies-search-confirm", inputs: ["search", "searchSources", "searchBibliographies", "searchBy"], outputs: ["closed"] }, { type: SchemaVersionLinkComponent, selector: "he-schema-version-link", inputs: ["node", "showExternalLink", "linkClass", "text"] }, { type: PopoverConfirmComponent, selector: "he-popover-confirm", inputs: ["message", "content", "position", "popoverClass"], outputs: ["confirmed"] }, { type: SitesMapsComponent, selector: "he-sites-maps", inputs: ["loadPolygons", "sites", "nodes", "center", "zoom", "showNotice"] }, { type: i10__namespace.NgbHighlight, selector: "ngb-highlight", inputs: ["highlightClass", "result", "term"] }, { type: UnitConverterComponent, selector: "he-unit-converter", inputs: ["term", "value", "fromUnits", "toUnits"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i10__namespace.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i3__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10__namespace.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: TagsInputDirective, selector: "[appTagsInput]", inputs: ["appTagsInput"] }, { type: i1__namespace$4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i1__namespace$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1__namespace$4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1__namespace$4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace$4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace$4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], pipes: { "pluralize": PluralizePipe } });
6536
6580
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FilesFormComponent, decorators: [{
6537
6581
  type: i0.Component,
6538
6582
  args: [{
@@ -7482,6 +7526,7 @@
7482
7526
  exports.delta = delta;
7483
7527
  exports.deserializeSearchFilters = deserializeSearchFilters;
7484
7528
  exports.ellipsis = ellipsis;
7529
+ exports.emptyValue = emptyValue;
7485
7530
  exports.errorText = errorText;
7486
7531
  exports.filenameWithoutExt = filenameWithoutExt;
7487
7532
  exports.filterParams = filterParams;
@@ -7534,6 +7579,7 @@
7534
7579
  exports.refToSchemaType = refToSchemaType;
7535
7580
  exports.regionsQuery = regionsQuery;
7536
7581
  exports.repeat = repeat;
7582
+ exports.roundValue = roundValue;
7537
7583
  exports.safeJSONParse = safeJSONParse;
7538
7584
  exports.safeJSONStringify = safeJSONStringify;
7539
7585
  exports.schemaRequiredProperties = schemaRequiredProperties;