adb-shared 1.0.10 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/adb-shared.umd.js +453 -41
- package/bundles/adb-shared.umd.js.map +1 -1
- package/esm2015/lib/components/adb-header/adb-header.component.js +100 -0
- package/esm2015/lib/components/adb-header/adb-header.module.js +51 -0
- package/esm2015/lib/{environment.service.js → components/adb-header/environment.service.js} +1 -1
- package/esm2015/lib/components/adb-header/navigation.model.js +2 -0
- package/esm2015/lib/components/pagers/infinite-scroll.component.js +48 -0
- package/esm2015/lib/components/pagers/pagers.module.js +17 -0
- package/esm2015/lib/directives/click-outside.directive.js +28 -0
- package/esm2015/lib/directives/directives.module.js +17 -0
- package/esm2015/public-api.js +7 -3
- package/fesm2015/adb-shared.js +115 -38
- package/fesm2015/adb-shared.js.map +1 -1
- package/lib/{adb-header.component.d.ts → components/adb-header/adb-header.component.d.ts} +0 -0
- package/lib/{adb-header.module.d.ts → components/adb-header/adb-header.module.d.ts} +6 -6
- package/lib/{environment.service.d.ts → components/adb-header/environment.service.d.ts} +0 -0
- package/lib/{navigation.model.d.ts → components/adb-header/navigation.model.d.ts} +0 -0
- package/lib/components/pagers/infinite-scroll.component.d.ts +17 -0
- package/lib/components/pagers/pagers.module.d.ts +7 -0
- package/lib/{click-outside.directive.d.ts → directives/click-outside.directive.d.ts} +1 -1
- package/lib/directives/directives.module.d.ts +7 -0
- package/package.json +6 -5
- package/public-api.d.ts +6 -2
- package/esm2015/lib/adb-header.component.js +0 -101
- package/esm2015/lib/adb-header.module.js +0 -48
- package/esm2015/lib/click-outside.directive.js +0 -28
- package/esm2015/lib/navigation.model.js +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('adb-shared', ['exports', '@angular/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["adb-shared"] = {}, global.ng.
|
|
5
|
-
})(this, (function (exports,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@ngx-translate/core'), require('rxjs'), require('@angular/common/http'), require('@angular/router')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('adb-shared', ['exports', '@angular/common', '@angular/core', '@ngx-translate/core', 'rxjs', '@angular/common/http', '@angular/router'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["adb-shared"] = {}, global.ng.common, global.ng.core, global.i3, global.rxjs, global.ng.common.http, global.ng.router));
|
|
5
|
+
})(this, (function (exports, i4, i0, i3, rxjs, i1, router) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
return Object.freeze(n);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
25
26
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
27
27
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
28
|
-
var
|
|
28
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
29
|
|
|
30
30
|
var EnvironmentService = /** @class */ (function () {
|
|
31
31
|
function EnvironmentService(environment) {
|
|
@@ -44,33 +44,6 @@
|
|
|
44
44
|
}] }];
|
|
45
45
|
} });
|
|
46
46
|
|
|
47
|
-
var ClickOutsideDirective = /** @class */ (function () {
|
|
48
|
-
function ClickOutsideDirective(elementRef) {
|
|
49
|
-
this.elementRef = elementRef;
|
|
50
|
-
this.clickOutside = new i0.EventEmitter();
|
|
51
|
-
}
|
|
52
|
-
ClickOutsideDirective.prototype.onClick = function (target) {
|
|
53
|
-
var clickedInside = this.elementRef.nativeElement.contains(target);
|
|
54
|
-
if (!clickedInside) {
|
|
55
|
-
this.clickOutside.emit();
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
return ClickOutsideDirective;
|
|
59
|
-
}());
|
|
60
|
-
/** @nocollapse */ ClickOutsideDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ClickOutsideDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
61
|
-
/** @nocollapse */ ClickOutsideDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: ClickOutsideDirective, selector: "[clickOutside]", outputs: { clickOutside: "clickOutside" }, host: { listeners: { "document:click": "onClick($event.target)" } }, ngImport: i0__namespace });
|
|
62
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ClickOutsideDirective, decorators: [{
|
|
63
|
-
type: i0.Directive,
|
|
64
|
-
args: [{
|
|
65
|
-
selector: '[clickOutside]',
|
|
66
|
-
}]
|
|
67
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { clickOutside: [{
|
|
68
|
-
type: i0.Output
|
|
69
|
-
}], onClick: [{
|
|
70
|
-
type: i0.HostListener,
|
|
71
|
-
args: ['document:click', ['$event.target']]
|
|
72
|
-
}] } });
|
|
73
|
-
|
|
74
47
|
var ADBHeaderComponent = /** @class */ (function () {
|
|
75
48
|
function ADBHeaderComponent(httpClient, envService, trans) {
|
|
76
49
|
this.httpClient = httpClient;
|
|
@@ -155,7 +128,7 @@
|
|
|
155
128
|
return ADBHeaderComponent;
|
|
156
129
|
}());
|
|
157
130
|
/** @nocollapse */ ADBHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ADBHeaderComponent, deps: [{ token: i1__namespace.HttpClient }, { token: EnvironmentService }, { token: i3__namespace.TranslateService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
158
|
-
/** @nocollapse */ ADBHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ADBHeaderComponent, selector: "adb-header2", inputs: { userName: "userName" }, outputs: { loginClicked: "loginClicked", logoutClicked: "logoutClicked", dropMenuChange: "dropMenuChange" }, ngImport: i0__namespace, template: "<header id=\"top-header\" (clickOutside)=\"showUserMenu=false;showMenuDropdown(false);\">\r\n <nav class=\"d-flex flex-wrap px-3\">\r\n <div class=\"flex-grow-1 d-flex align-items-center justify-content-between justify-content-md-start\">\r\n <div class=\"logo d-none d-md-block\">\r\n <img src=\"/assets/images/logo.svg\" style=\"height: 3.2rem;\">\r\n </div>\r\n <div class=\"logo ps-2 d-sm-block d-md-none d-flex align-items-center\">\r\n <img src=\"/assets/images/logo_sm_white.png\" style=\"height: 2rem;\">\r\n </div>\r\n <strong class=\"bigger\">Artfakta</strong>\r\n </div>\r\n <div *ngIf=\"translationFinished\" class=\"flex-grow-1 d-flex justify-content-lg-between justify-content-end align-items-center\">\r\n <div *ngIf=\"navigation\" class=\"d-flex align-items-center\">\r\n <nav class=\"d-none align-items-center d-lg-flex pe-4 gap-4\" *ngIf=\"navigation\">\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <a href=\"{{link.url}}?lang={{trans.currentLang}}\" *ngIf=\"link.topLink\" [ngClass]=\"{'d-none d-xl-block':link.transId==='ADB_HEADER.OBSERVATION'}\">\r\n {{link.transId|translate}}\r\n </a>\r\n </ng-container>\r\n </nav>\r\n <div>\r\n <button type=\"button\" class=\"btn btn-sm py-1 px-2 btn-primary\" (click)=\"showUserMenu = false;showMenuDropdown(!showMenu)\">\r\n {{'ADB_HEADER.MENY'|translate}}\r\n <i class=\"ms-1 fas\" [ngClass]=\"showMenu?'fa-chevron-up':'fa-chevron-down'\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"d-none d-md-block ps-4\">\r\n <button *ngIf=\"initials\" type=\"button\" class=\"btn initials\" (click)=\"showUserMenu = !showUserMenu;showMenuDropdown(false)\">{{initials}}</button>\r\n <button *ngIf=\"!initials\" type=\"button\" (click)=\"showUserMenu = !showUserMenu;showMenuDropdown(false)\" class=\"btn btn-link\">\r\n {{'ADB_HEADER.LOGIN'|translate}}\r\n </button>\r\n </div>\r\n </div>\r\n </nav>\r\n <div class=\"menu\" *ngIf=\"showUserMenu\">\r\n <div class=\"menu-body bg-white p-3\" style=\"width:15rem\">\r\n <ng-container *ngIf=\"initials\">\r\n <div class=\"d-flex align-items-center gap-2 text-dark\">\r\n <span class=\"initials\">{{initials}}</span>\r\n <strong>{{fullName}}</strong>\r\n </div>\r\n <hr class=\"mx-n3 text-muted\">\r\n <button (click)=\"logout()\" type=\"button\" class=\"btn btn-link p-0\">\r\n <i class=\"fas fa-sign-out-alt me-1\"></i>{{'ADB_HEADER.LOGOUT'|translate}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"!initials\">\r\n <div class=\"d-flex justify-content-center\">\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"login()\" id=\"start-login\">{{'ADB_HEADER.LOGIN'|translate}}</button>\r\n </div>\r\n <a *ngIf=\"navigation\" class=\"d-block mt-3\" href=\"{{navigation.createAccountLink}}?lang={{trans.currentLang}}&returnUrl={{url}}\">\r\n {{'ADB_HEADER.CREATE_USER'|translate}}\r\n </a>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"menu\" *ngIf=\"showMenu\">\r\n <div class=\"menu-body\" *ngIf=\"navigation\">\r\n <div class=\"px-3 pt-3 mb-1\">\r\n <div class=\"d-flex justify-content-between flex-wrap gap-2 mb-2\">\r\n <div>\r\n <div class=\"d-flex d-md-none align-items-center gap-2\" *ngIf=\"initials\">\r\n <span class=\"initials me-2\">{{initials}}</span>\r\n <button type=\"button\" (click)=\"logout()\" class=\"btn btn-primary\">\r\n {{'ADB_HEADER.LOGOUT'|translate}}\r\n </button>\r\n </div>\r\n <div class=\"d-flex gap-2 d-md-none\" *ngIf=\"!initials\">\r\n <button type=\"button\" (click)=\"login()\" class=\"btn btn-primary\" id=\"login\">\r\n {{'ADB_HEADER.LOGIN'|translate}}\r\n </button>\r\n <a href=\"{{navigation.createAccountLink}}?lang={{trans.currentLang}}&returnUrl={{url}}\"\r\n class=\"btn btn-primary text-white\">\r\n {{'ADB_HEADER.CREATE_USER'|translate}}\r\n </a>\r\n </div>\r\n </div>\r\n <div>\r\n <button type=\"button\" *ngIf=\"trans.currentLang==='en'\" (click)=\"setLanguage('sv')\"\r\n class=\"btn btn-primary\">\r\n {{'ADB_HEADER.IN_SWEDISH'|translate}}\r\n </button>\r\n <button type=\"button\" *ngIf=\"trans.currentLang==='sv'\" (click)=\"setLanguage('en')\"\r\n class=\"btn btn-primary\">\r\n {{'ADB_HEADER.IN_ENGLISH'|translate}}\r\n </button>\r\n </div>\r\n </div>\r\n {{'ADB_HEADER.SERVICES'|translate}}\r\n </div>\r\n <div id=\"splash\">\r\n <div class=\"px-3 d-flex flex-column\">\r\n <ul class=\"list-group ms-0 mb-0 ps-0\">\r\n <li class=\"mb-1 list-group-item p-0 rounded\" *ngFor=\"let link of navigation.links\"\r\n [attr.aria-expanded]=\"link.transId===expandedLink?true:false\" role=\"button\">\r\n <div class=\"d-flex align-items-center justify-content-between\">\r\n <a href=\"{{link.url}}?lang={{trans.currentLang}}\" class=\"d-flex align-items-center flex-grow-1 p-2\">\r\n <small class=\"fa-stack me-1\" *ngIf=\"link.icon\">\r\n <span class=\"fas fa-circle fa-stack-2x text-primary\"></span>\r\n <span class=\"fas fa-stack-1x fa-inverse\" [ngClass]=\"link.icon\"></span>\r\n </small>\r\n {{link.transId|translate}}\r\n </a>\r\n <button class=\"btn btn-expand me-2\" *ngIf=\"link.children?.length>0\" (click)=\"onExpandLink($event,link.transId)\">\r\n <i class=\"fas fa-chevron-up\" [ngClass]=\"link.transId===expandedLink?'d-block ':'d-none'\"></i>\r\n <i class=\"fas fa-chevron-down\" [ngClass]=\"link.transId!==expandedLink?'d-block ':'d-none'\"></i>\r\n </button>\r\n </div>\r\n <ul class=\"list-unstyled\" [ngClass]=\"link.transId===expandedLink?'d-block':'d-none'\">\r\n <li class=\"py-1 m-0\" [class.pt-0]=\"first\" *ngFor=\"let subLink of link.children;let first = first\" style=\"padding-left:3rem;\">\r\n <a class=\"w-100 d-block\" href=\"{{subLink.url}}?lang={{trans.currentLang}}\">\r\n {{subLink.transId|translate}}\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n </ul>\r\n <div *ngIf=\"navigation.about\" class=\"mt-2 mb-auto\">\r\n <div class=\"mb-1\">{{'ADB_HEADER.CONTACT'|translate}}</div>\r\n <div class=\"mb-1 row\">\r\n <div class=\"col-sm-6 mb-2\">\r\n <div class=\"bg-white p-2 rounded\">\r\n <small class=\"fa-stack\" *ngIf=\"navigation.about.icon\">\r\n <span class=\"fas fa-circle fa-stack-2x text-primary\"></span>\r\n <span class=\"fas fa-stack-1x fa-inverse fa-envelope\"></span>\r\n </small>\r\n <a class=\"bg-white p-2\" href=\"mailto:artfakta@artdatabanken.se\">artfakta@artdatabanken.se</a>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-6 mb-2\">\r\n <div class=\"bg-white p-2 rounded\">\r\n <small class=\"fa-stack\" *ngIf=\"navigation.about.icon\">\r\n <span class=\"fas fa-circle fa-stack-2x text-primary\"></span>\r\n <span class=\"fas fa-stack-1x fa-inverse\" [ngClass]=\"navigation.about.icon\"></span>\r\n </small>\r\n <a [href]=\"navigation.about.url\">{{navigation.about.transId|translate}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div style=\"height:10rem\"></div>\r\n <div class=\"mb-3\">\r\n {{'ADB_HEADER.DEVELOPED_BY'|translate}}\r\n <a href=\"https://www.artdatabanken.se/\" class=\"text-white\"><u>{{'ADB_HEADER.ARTDATABANKEN'|translate}}</u></a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</header>\r\n", directives: [{ type: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "translate": i3__namespace.TranslatePipe } });
|
|
131
|
+
/** @nocollapse */ ADBHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ADBHeaderComponent, selector: "adb-header2", inputs: { userName: "userName" }, outputs: { loginClicked: "loginClicked", logoutClicked: "logoutClicked", dropMenuChange: "dropMenuChange" }, ngImport: i0__namespace, template: "<header id=\"top-header\" (clickOutside)=\"showUserMenu=false;showMenuDropdown(false);\">\r\n <nav class=\"d-flex flex-wrap px-3\">\r\n <div class=\"flex-grow-1 d-flex align-items-center justify-content-between justify-content-md-start\">\r\n <div class=\"logo d-none d-md-block\">\r\n <img src=\"/assets/images/logo.svg\" style=\"height: 3.2rem;\">\r\n </div>\r\n <div class=\"logo ps-2 d-sm-block d-md-none d-flex align-items-center\">\r\n <img src=\"/assets/images/logo_sm_white.png\" style=\"height: 2rem;\">\r\n </div>\r\n <strong class=\"bigger\">Artfakta</strong>\r\n </div>\r\n <div *ngIf=\"translationFinished\" class=\"flex-grow-1 d-flex justify-content-lg-between justify-content-end align-items-center\">\r\n <div *ngIf=\"navigation\" class=\"d-flex align-items-center\">\r\n <nav class=\"d-none align-items-center d-lg-flex pe-4 gap-4\" *ngIf=\"navigation\">\r\n <ng-container *ngFor=\"let link of navigation.links\">\r\n <a href=\"{{link.url}}?lang={{trans.currentLang}}\" *ngIf=\"link.topLink\" [ngClass]=\"{'d-none d-xl-block':link.transId==='ADB_HEADER.OBSERVATION'}\">\r\n {{link.transId|translate}}\r\n </a>\r\n </ng-container>\r\n </nav>\r\n <div>\r\n <button type=\"button\" class=\"btn btn-sm py-1 px-2 btn-primary\" (click)=\"showUserMenu = false;showMenuDropdown(!showMenu)\">\r\n {{'ADB_HEADER.MENY'|translate}}\r\n <i class=\"ms-1 fas\" [ngClass]=\"showMenu?'fa-chevron-up':'fa-chevron-down'\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"d-none d-md-block ps-4\">\r\n <button *ngIf=\"initials\" type=\"button\" class=\"btn initials\" (click)=\"showUserMenu = !showUserMenu;showMenuDropdown(false)\">{{initials}}</button>\r\n <button *ngIf=\"!initials\" type=\"button\" (click)=\"showUserMenu = !showUserMenu;showMenuDropdown(false)\" class=\"btn btn-link\">\r\n {{'ADB_HEADER.LOGIN'|translate}}\r\n </button>\r\n </div>\r\n </div>\r\n </nav>\r\n <div class=\"menu\" *ngIf=\"showUserMenu\">\r\n <div class=\"menu-body bg-white p-3\" style=\"width:15rem\">\r\n <ng-container *ngIf=\"initials\">\r\n <div class=\"d-flex align-items-center gap-2 text-dark\">\r\n <span class=\"initials\">{{initials}}</span>\r\n <strong>{{fullName}}</strong>\r\n </div>\r\n <hr class=\"mx-n3 text-muted\">\r\n <button (click)=\"logout()\" type=\"button\" class=\"btn btn-link p-0\">\r\n <i class=\"fas fa-sign-out-alt me-1\"></i>{{'ADB_HEADER.LOGOUT'|translate}}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"!initials\">\r\n <div class=\"d-flex justify-content-center\">\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"login()\" id=\"start-login\">{{'ADB_HEADER.LOGIN'|translate}}</button>\r\n </div>\r\n <a *ngIf=\"navigation\" class=\"d-block mt-3\" href=\"{{navigation.createAccountLink}}?lang={{trans.currentLang}}&returnUrl={{url}}\">\r\n {{'ADB_HEADER.CREATE_USER'|translate}}\r\n </a>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"menu\" *ngIf=\"showMenu\">\r\n <div class=\"menu-body\" *ngIf=\"navigation\">\r\n <div class=\"px-3 pt-3 mb-1\">\r\n <div class=\"d-flex justify-content-between flex-wrap gap-2 mb-2\">\r\n <div>\r\n <div class=\"d-flex d-md-none align-items-center gap-2\" *ngIf=\"initials\">\r\n <span class=\"initials me-2\">{{initials}}</span>\r\n <button type=\"button\" (click)=\"logout()\" class=\"btn btn-primary\">\r\n {{'ADB_HEADER.LOGOUT'|translate}}\r\n </button>\r\n </div>\r\n <div class=\"d-flex gap-2 d-md-none\" *ngIf=\"!initials\">\r\n <button type=\"button\" (click)=\"login()\" class=\"btn btn-primary\" id=\"login\">\r\n {{'ADB_HEADER.LOGIN'|translate}}\r\n </button>\r\n <a href=\"{{navigation.createAccountLink}}?lang={{trans.currentLang}}&returnUrl={{url}}\"\r\n class=\"btn btn-primary text-white\">\r\n {{'ADB_HEADER.CREATE_USER'|translate}}\r\n </a>\r\n </div>\r\n </div>\r\n <div>\r\n <button type=\"button\" *ngIf=\"trans.currentLang==='en'\" (click)=\"setLanguage('sv')\"\r\n class=\"btn btn-primary\">\r\n {{'ADB_HEADER.IN_SWEDISH'|translate}}\r\n </button>\r\n <button type=\"button\" *ngIf=\"trans.currentLang==='sv'\" (click)=\"setLanguage('en')\"\r\n class=\"btn btn-primary\">\r\n {{'ADB_HEADER.IN_ENGLISH'|translate}}\r\n </button>\r\n </div>\r\n </div>\r\n {{'ADB_HEADER.SERVICES'|translate}}\r\n </div>\r\n <div id=\"splash\">\r\n <div class=\"px-3 d-flex flex-column\">\r\n <ul class=\"list-group ms-0 mb-0 ps-0\">\r\n <li class=\"mb-1 list-group-item p-0 rounded\" *ngFor=\"let link of navigation.links\"\r\n [attr.aria-expanded]=\"link.transId===expandedLink?true:false\" role=\"button\">\r\n <div class=\"d-flex align-items-center justify-content-between\">\r\n <a href=\"{{link.url}}?lang={{trans.currentLang}}\" class=\"d-flex align-items-center flex-grow-1 p-2\">\r\n <small class=\"fa-stack me-1\" *ngIf=\"link.icon\">\r\n <span class=\"fas fa-circle fa-stack-2x text-primary\"></span>\r\n <span class=\"fas fa-stack-1x fa-inverse\" [ngClass]=\"link.icon\"></span>\r\n </small>\r\n {{link.transId|translate}}\r\n </a>\r\n <button class=\"btn btn-expand me-2\" *ngIf=\"link.children?.length>0\" (click)=\"onExpandLink($event,link.transId)\">\r\n <i class=\"fas fa-chevron-up\" [ngClass]=\"link.transId===expandedLink?'d-block ':'d-none'\"></i>\r\n <i class=\"fas fa-chevron-down\" [ngClass]=\"link.transId!==expandedLink?'d-block ':'d-none'\"></i>\r\n </button>\r\n </div>\r\n <ul class=\"list-unstyled\" [ngClass]=\"link.transId===expandedLink?'d-block':'d-none'\">\r\n <li class=\"py-1 m-0\" [class.pt-0]=\"first\" *ngFor=\"let subLink of link.children;let first = first\" style=\"padding-left:3rem;\">\r\n <a class=\"w-100 d-block\" href=\"{{subLink.url}}?lang={{trans.currentLang}}\">\r\n {{subLink.transId|translate}}\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n </ul>\r\n <div *ngIf=\"navigation.about\" class=\"mt-2 mb-auto\">\r\n <div class=\"mb-1\">{{'ADB_HEADER.CONTACT'|translate}}</div>\r\n <div class=\"mb-1 row\">\r\n <div class=\"col-sm-6 mb-2\">\r\n <div class=\"bg-white p-2 rounded\">\r\n <small class=\"fa-stack\" *ngIf=\"navigation.about.icon\">\r\n <span class=\"fas fa-circle fa-stack-2x text-primary\"></span>\r\n <span class=\"fas fa-stack-1x fa-inverse fa-envelope\"></span>\r\n </small>\r\n <a class=\"bg-white p-2\" href=\"mailto:artfakta@artdatabanken.se\">artfakta@artdatabanken.se</a>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-6 mb-2\">\r\n <div class=\"bg-white p-2 rounded\">\r\n <small class=\"fa-stack\" *ngIf=\"navigation.about.icon\">\r\n <span class=\"fas fa-circle fa-stack-2x text-primary\"></span>\r\n <span class=\"fas fa-stack-1x fa-inverse\" [ngClass]=\"navigation.about.icon\"></span>\r\n </small>\r\n <a [href]=\"navigation.about.url\">{{navigation.about.transId|translate}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div style=\"height:10rem\"></div>\r\n <div class=\"mb-3\">\r\n {{'ADB_HEADER.DEVELOPED_BY'|translate}}\r\n <a href=\"https://www.artdatabanken.se/\" class=\"text-white\"><u>{{'ADB_HEADER.ARTDATABANKEN'|translate}}</u></a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</header>\r\n", directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "translate": i3__namespace.TranslatePipe } });
|
|
159
132
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ADBHeaderComponent, decorators: [{
|
|
160
133
|
type: i0.Component,
|
|
161
134
|
args: [{
|
|
@@ -172,6 +145,50 @@
|
|
|
172
145
|
type: i0.Input
|
|
173
146
|
}] } });
|
|
174
147
|
|
|
148
|
+
var ClickOutsideDirective = /** @class */ (function () {
|
|
149
|
+
function ClickOutsideDirective(elementRef) {
|
|
150
|
+
this.elementRef = elementRef;
|
|
151
|
+
this.clickOutside = new i0.EventEmitter();
|
|
152
|
+
}
|
|
153
|
+
ClickOutsideDirective.prototype.onClick = function (target) {
|
|
154
|
+
var clickedInside = this.elementRef.nativeElement.contains(target);
|
|
155
|
+
if (!clickedInside) {
|
|
156
|
+
this.clickOutside.emit();
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
return ClickOutsideDirective;
|
|
160
|
+
}());
|
|
161
|
+
/** @nocollapse */ ClickOutsideDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ClickOutsideDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
162
|
+
/** @nocollapse */ ClickOutsideDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: ClickOutsideDirective, selector: "[adbClickOutside]", outputs: { clickOutside: "clickOutside" }, host: { listeners: { "document:click": "onClick($event.target)" } }, ngImport: i0__namespace });
|
|
163
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ClickOutsideDirective, decorators: [{
|
|
164
|
+
type: i0.Directive,
|
|
165
|
+
args: [{
|
|
166
|
+
selector: '[adbClickOutside]',
|
|
167
|
+
}]
|
|
168
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { clickOutside: [{
|
|
169
|
+
type: i0.Output
|
|
170
|
+
}], onClick: [{
|
|
171
|
+
type: i0.HostListener,
|
|
172
|
+
args: ['document:click', ['$event.target']]
|
|
173
|
+
}] } });
|
|
174
|
+
|
|
175
|
+
var DirectivesModule = /** @class */ (function () {
|
|
176
|
+
function DirectivesModule() {
|
|
177
|
+
}
|
|
178
|
+
return DirectivesModule;
|
|
179
|
+
}());
|
|
180
|
+
/** @nocollapse */ DirectivesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DirectivesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
181
|
+
/** @nocollapse */ DirectivesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DirectivesModule, declarations: [ClickOutsideDirective], exports: [ClickOutsideDirective] });
|
|
182
|
+
/** @nocollapse */ DirectivesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DirectivesModule, imports: [[]] });
|
|
183
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DirectivesModule, decorators: [{
|
|
184
|
+
type: i0.NgModule,
|
|
185
|
+
args: [{
|
|
186
|
+
imports: [],
|
|
187
|
+
declarations: [ClickOutsideDirective],
|
|
188
|
+
exports: [ClickOutsideDirective]
|
|
189
|
+
}]
|
|
190
|
+
}] });
|
|
191
|
+
|
|
175
192
|
var ADBHeaderModule = /** @class */ (function () {
|
|
176
193
|
function ADBHeaderModule() {
|
|
177
194
|
}
|
|
@@ -190,30 +207,421 @@
|
|
|
190
207
|
return ADBHeaderModule;
|
|
191
208
|
}());
|
|
192
209
|
/** @nocollapse */ ADBHeaderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ADBHeaderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
193
|
-
/** @nocollapse */ ADBHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ADBHeaderModule, declarations: [ADBHeaderComponent
|
|
210
|
+
/** @nocollapse */ ADBHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ADBHeaderModule, declarations: [ADBHeaderComponent], imports: [i4.CommonModule,
|
|
194
211
|
i1.HttpClientModule,
|
|
195
212
|
router.RouterModule,
|
|
196
|
-
i3.TranslateModule
|
|
213
|
+
i3.TranslateModule,
|
|
214
|
+
DirectivesModule], exports: [ADBHeaderComponent] });
|
|
197
215
|
/** @nocollapse */ ADBHeaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ADBHeaderModule, imports: [[
|
|
198
|
-
|
|
216
|
+
i4.CommonModule,
|
|
199
217
|
i1.HttpClientModule,
|
|
200
218
|
router.RouterModule,
|
|
201
|
-
i3.TranslateModule
|
|
219
|
+
i3.TranslateModule,
|
|
220
|
+
DirectivesModule
|
|
202
221
|
]] });
|
|
203
222
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ADBHeaderModule, decorators: [{
|
|
204
223
|
type: i0.NgModule,
|
|
205
224
|
args: [{
|
|
206
|
-
declarations: [ADBHeaderComponent
|
|
225
|
+
declarations: [ADBHeaderComponent],
|
|
207
226
|
imports: [
|
|
208
|
-
|
|
227
|
+
i4.CommonModule,
|
|
209
228
|
i1.HttpClientModule,
|
|
210
229
|
router.RouterModule,
|
|
211
|
-
i3.TranslateModule
|
|
230
|
+
i3.TranslateModule,
|
|
231
|
+
DirectivesModule
|
|
212
232
|
],
|
|
213
233
|
exports: [ADBHeaderComponent]
|
|
214
234
|
}]
|
|
215
235
|
}] });
|
|
216
236
|
|
|
237
|
+
/*! *****************************************************************************
|
|
238
|
+
Copyright (c) Microsoft Corporation.
|
|
239
|
+
|
|
240
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
241
|
+
purpose with or without fee is hereby granted.
|
|
242
|
+
|
|
243
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
244
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
245
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
246
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
247
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
248
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
249
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
250
|
+
***************************************************************************** */
|
|
251
|
+
/* global Reflect, Promise */
|
|
252
|
+
var extendStatics = function (d, b) {
|
|
253
|
+
extendStatics = Object.setPrototypeOf ||
|
|
254
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
255
|
+
function (d, b) { for (var p in b)
|
|
256
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
257
|
+
d[p] = b[p]; };
|
|
258
|
+
return extendStatics(d, b);
|
|
259
|
+
};
|
|
260
|
+
function __extends(d, b) {
|
|
261
|
+
if (typeof b !== "function" && b !== null)
|
|
262
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
263
|
+
extendStatics(d, b);
|
|
264
|
+
function __() { this.constructor = d; }
|
|
265
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
266
|
+
}
|
|
267
|
+
var __assign = function () {
|
|
268
|
+
__assign = Object.assign || function __assign(t) {
|
|
269
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
270
|
+
s = arguments[i];
|
|
271
|
+
for (var p in s)
|
|
272
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
273
|
+
t[p] = s[p];
|
|
274
|
+
}
|
|
275
|
+
return t;
|
|
276
|
+
};
|
|
277
|
+
return __assign.apply(this, arguments);
|
|
278
|
+
};
|
|
279
|
+
function __rest(s, e) {
|
|
280
|
+
var t = {};
|
|
281
|
+
for (var p in s)
|
|
282
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
283
|
+
t[p] = s[p];
|
|
284
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
285
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
286
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
287
|
+
t[p[i]] = s[p[i]];
|
|
288
|
+
}
|
|
289
|
+
return t;
|
|
290
|
+
}
|
|
291
|
+
function __decorate(decorators, target, key, desc) {
|
|
292
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
293
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
294
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
295
|
+
else
|
|
296
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
297
|
+
if (d = decorators[i])
|
|
298
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
299
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
300
|
+
}
|
|
301
|
+
function __param(paramIndex, decorator) {
|
|
302
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
303
|
+
}
|
|
304
|
+
function __metadata(metadataKey, metadataValue) {
|
|
305
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
306
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
307
|
+
}
|
|
308
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
309
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
310
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
311
|
+
function fulfilled(value) { try {
|
|
312
|
+
step(generator.next(value));
|
|
313
|
+
}
|
|
314
|
+
catch (e) {
|
|
315
|
+
reject(e);
|
|
316
|
+
} }
|
|
317
|
+
function rejected(value) { try {
|
|
318
|
+
step(generator["throw"](value));
|
|
319
|
+
}
|
|
320
|
+
catch (e) {
|
|
321
|
+
reject(e);
|
|
322
|
+
} }
|
|
323
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
324
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
function __generator(thisArg, body) {
|
|
328
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
329
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
330
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
331
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
332
|
+
function step(op) {
|
|
333
|
+
if (f)
|
|
334
|
+
throw new TypeError("Generator is already executing.");
|
|
335
|
+
while (_)
|
|
336
|
+
try {
|
|
337
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
338
|
+
return t;
|
|
339
|
+
if (y = 0, t)
|
|
340
|
+
op = [op[0] & 2, t.value];
|
|
341
|
+
switch (op[0]) {
|
|
342
|
+
case 0:
|
|
343
|
+
case 1:
|
|
344
|
+
t = op;
|
|
345
|
+
break;
|
|
346
|
+
case 4:
|
|
347
|
+
_.label++;
|
|
348
|
+
return { value: op[1], done: false };
|
|
349
|
+
case 5:
|
|
350
|
+
_.label++;
|
|
351
|
+
y = op[1];
|
|
352
|
+
op = [0];
|
|
353
|
+
continue;
|
|
354
|
+
case 7:
|
|
355
|
+
op = _.ops.pop();
|
|
356
|
+
_.trys.pop();
|
|
357
|
+
continue;
|
|
358
|
+
default:
|
|
359
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
360
|
+
_ = 0;
|
|
361
|
+
continue;
|
|
362
|
+
}
|
|
363
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
364
|
+
_.label = op[1];
|
|
365
|
+
break;
|
|
366
|
+
}
|
|
367
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
368
|
+
_.label = t[1];
|
|
369
|
+
t = op;
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
if (t && _.label < t[2]) {
|
|
373
|
+
_.label = t[2];
|
|
374
|
+
_.ops.push(op);
|
|
375
|
+
break;
|
|
376
|
+
}
|
|
377
|
+
if (t[2])
|
|
378
|
+
_.ops.pop();
|
|
379
|
+
_.trys.pop();
|
|
380
|
+
continue;
|
|
381
|
+
}
|
|
382
|
+
op = body.call(thisArg, _);
|
|
383
|
+
}
|
|
384
|
+
catch (e) {
|
|
385
|
+
op = [6, e];
|
|
386
|
+
y = 0;
|
|
387
|
+
}
|
|
388
|
+
finally {
|
|
389
|
+
f = t = 0;
|
|
390
|
+
}
|
|
391
|
+
if (op[0] & 5)
|
|
392
|
+
throw op[1];
|
|
393
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
397
|
+
if (k2 === undefined)
|
|
398
|
+
k2 = k;
|
|
399
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
400
|
+
}) : (function (o, m, k, k2) {
|
|
401
|
+
if (k2 === undefined)
|
|
402
|
+
k2 = k;
|
|
403
|
+
o[k2] = m[k];
|
|
404
|
+
});
|
|
405
|
+
function __exportStar(m, o) {
|
|
406
|
+
for (var p in m)
|
|
407
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
408
|
+
__createBinding(o, m, p);
|
|
409
|
+
}
|
|
410
|
+
function __values(o) {
|
|
411
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
412
|
+
if (m)
|
|
413
|
+
return m.call(o);
|
|
414
|
+
if (o && typeof o.length === "number")
|
|
415
|
+
return {
|
|
416
|
+
next: function () {
|
|
417
|
+
if (o && i >= o.length)
|
|
418
|
+
o = void 0;
|
|
419
|
+
return { value: o && o[i++], done: !o };
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
423
|
+
}
|
|
424
|
+
function __read(o, n) {
|
|
425
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
426
|
+
if (!m)
|
|
427
|
+
return o;
|
|
428
|
+
var i = m.call(o), r, ar = [], e;
|
|
429
|
+
try {
|
|
430
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
431
|
+
ar.push(r.value);
|
|
432
|
+
}
|
|
433
|
+
catch (error) {
|
|
434
|
+
e = { error: error };
|
|
435
|
+
}
|
|
436
|
+
finally {
|
|
437
|
+
try {
|
|
438
|
+
if (r && !r.done && (m = i["return"]))
|
|
439
|
+
m.call(i);
|
|
440
|
+
}
|
|
441
|
+
finally {
|
|
442
|
+
if (e)
|
|
443
|
+
throw e.error;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
return ar;
|
|
447
|
+
}
|
|
448
|
+
/** @deprecated */
|
|
449
|
+
function __spread() {
|
|
450
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
451
|
+
ar = ar.concat(__read(arguments[i]));
|
|
452
|
+
return ar;
|
|
453
|
+
}
|
|
454
|
+
/** @deprecated */
|
|
455
|
+
function __spreadArrays() {
|
|
456
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
457
|
+
s += arguments[i].length;
|
|
458
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
459
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
460
|
+
r[k] = a[j];
|
|
461
|
+
return r;
|
|
462
|
+
}
|
|
463
|
+
function __spreadArray(to, from, pack) {
|
|
464
|
+
if (pack || arguments.length === 2)
|
|
465
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
466
|
+
if (ar || !(i in from)) {
|
|
467
|
+
if (!ar)
|
|
468
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
469
|
+
ar[i] = from[i];
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
473
|
+
}
|
|
474
|
+
function __await(v) {
|
|
475
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
476
|
+
}
|
|
477
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
478
|
+
if (!Symbol.asyncIterator)
|
|
479
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
480
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
481
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
482
|
+
function verb(n) { if (g[n])
|
|
483
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
484
|
+
function resume(n, v) { try {
|
|
485
|
+
step(g[n](v));
|
|
486
|
+
}
|
|
487
|
+
catch (e) {
|
|
488
|
+
settle(q[0][3], e);
|
|
489
|
+
} }
|
|
490
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
491
|
+
function fulfill(value) { resume("next", value); }
|
|
492
|
+
function reject(value) { resume("throw", value); }
|
|
493
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
494
|
+
resume(q[0][0], q[0][1]); }
|
|
495
|
+
}
|
|
496
|
+
function __asyncDelegator(o) {
|
|
497
|
+
var i, p;
|
|
498
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
499
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
500
|
+
}
|
|
501
|
+
function __asyncValues(o) {
|
|
502
|
+
if (!Symbol.asyncIterator)
|
|
503
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
504
|
+
var m = o[Symbol.asyncIterator], i;
|
|
505
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
506
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
507
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
508
|
+
}
|
|
509
|
+
function __makeTemplateObject(cooked, raw) {
|
|
510
|
+
if (Object.defineProperty) {
|
|
511
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
512
|
+
}
|
|
513
|
+
else {
|
|
514
|
+
cooked.raw = raw;
|
|
515
|
+
}
|
|
516
|
+
return cooked;
|
|
517
|
+
}
|
|
518
|
+
;
|
|
519
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
520
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
521
|
+
}) : function (o, v) {
|
|
522
|
+
o["default"] = v;
|
|
523
|
+
};
|
|
524
|
+
function __importStar(mod) {
|
|
525
|
+
if (mod && mod.__esModule)
|
|
526
|
+
return mod;
|
|
527
|
+
var result = {};
|
|
528
|
+
if (mod != null)
|
|
529
|
+
for (var k in mod)
|
|
530
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
531
|
+
__createBinding(result, mod, k);
|
|
532
|
+
__setModuleDefault(result, mod);
|
|
533
|
+
return result;
|
|
534
|
+
}
|
|
535
|
+
function __importDefault(mod) {
|
|
536
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
537
|
+
}
|
|
538
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
539
|
+
if (kind === "a" && !f)
|
|
540
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
541
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
542
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
543
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
544
|
+
}
|
|
545
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
546
|
+
if (kind === "m")
|
|
547
|
+
throw new TypeError("Private method is not writable");
|
|
548
|
+
if (kind === "a" && !f)
|
|
549
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
550
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
551
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
552
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
var InfiniteScrollComponent = /** @class */ (function () {
|
|
556
|
+
function InfiniteScrollComponent(host) {
|
|
557
|
+
this.host = host;
|
|
558
|
+
this.options = {};
|
|
559
|
+
this.scrolled = new i0.EventEmitter();
|
|
560
|
+
}
|
|
561
|
+
Object.defineProperty(InfiniteScrollComponent.prototype, "element", {
|
|
562
|
+
get: function () {
|
|
563
|
+
return this.host.nativeElement;
|
|
564
|
+
},
|
|
565
|
+
enumerable: false,
|
|
566
|
+
configurable: true
|
|
567
|
+
});
|
|
568
|
+
InfiniteScrollComponent.prototype.ngOnInit = function () {
|
|
569
|
+
var _this = this;
|
|
570
|
+
var options = Object.assign({ root: this.isHostScrollable() ? this.host.nativeElement : null }, this.options);
|
|
571
|
+
this.observer = new IntersectionObserver(function (_b) {
|
|
572
|
+
var _c = __read(_b, 1), entry = _c[0];
|
|
573
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
574
|
+
entry.isIntersecting && _this.scrolled.emit();
|
|
575
|
+
}, options);
|
|
576
|
+
};
|
|
577
|
+
InfiniteScrollComponent.prototype.ngAfterViewInit = function () {
|
|
578
|
+
this.observer.observe(this.anchor.nativeElement);
|
|
579
|
+
};
|
|
580
|
+
InfiniteScrollComponent.prototype.isHostScrollable = function () {
|
|
581
|
+
var style = window.getComputedStyle(this.element);
|
|
582
|
+
return style.getPropertyValue('overflow') === 'auto' ||
|
|
583
|
+
style.getPropertyValue('overflow-y') === 'scroll';
|
|
584
|
+
};
|
|
585
|
+
InfiniteScrollComponent.prototype.ngOnDestroy = function () {
|
|
586
|
+
var _a;
|
|
587
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
588
|
+
};
|
|
589
|
+
return InfiniteScrollComponent;
|
|
590
|
+
}());
|
|
591
|
+
/** @nocollapse */ InfiniteScrollComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: InfiniteScrollComponent, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
592
|
+
/** @nocollapse */ InfiniteScrollComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: InfiniteScrollComponent, selector: "adb-infinite-scroll", inputs: { options: "options" }, outputs: { scrolled: "scrolled" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true }], ngImport: i0__namespace, template: '<ng-content></ng-content><div #anchor></div>', isInline: true });
|
|
593
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: InfiniteScrollComponent, decorators: [{
|
|
594
|
+
type: i0.Component,
|
|
595
|
+
args: [{
|
|
596
|
+
selector: 'adb-infinite-scroll',
|
|
597
|
+
template: '<ng-content></ng-content><div #anchor></div>'
|
|
598
|
+
}]
|
|
599
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { options: [{
|
|
600
|
+
type: i0.Input
|
|
601
|
+
}], scrolled: [{
|
|
602
|
+
type: i0.Output
|
|
603
|
+
}], anchor: [{
|
|
604
|
+
type: i0.ViewChild,
|
|
605
|
+
args: ['anchor']
|
|
606
|
+
}] } });
|
|
607
|
+
|
|
608
|
+
var PagersModule = /** @class */ (function () {
|
|
609
|
+
function PagersModule() {
|
|
610
|
+
}
|
|
611
|
+
return PagersModule;
|
|
612
|
+
}());
|
|
613
|
+
/** @nocollapse */ PagersModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PagersModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
614
|
+
/** @nocollapse */ PagersModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PagersModule, declarations: [InfiniteScrollComponent], exports: [InfiniteScrollComponent] });
|
|
615
|
+
/** @nocollapse */ PagersModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PagersModule, imports: [[]] });
|
|
616
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PagersModule, decorators: [{
|
|
617
|
+
type: i0.NgModule,
|
|
618
|
+
args: [{
|
|
619
|
+
imports: [],
|
|
620
|
+
declarations: [InfiniteScrollComponent],
|
|
621
|
+
exports: [InfiniteScrollComponent],
|
|
622
|
+
}]
|
|
623
|
+
}] });
|
|
624
|
+
|
|
217
625
|
/*
|
|
218
626
|
* Public API Surface of artdata-shared
|
|
219
627
|
*/
|
|
@@ -224,6 +632,10 @@
|
|
|
224
632
|
|
|
225
633
|
exports.ADBHeaderComponent = ADBHeaderComponent;
|
|
226
634
|
exports.ADBHeaderModule = ADBHeaderModule;
|
|
635
|
+
exports.ClickOutsideDirective = ClickOutsideDirective;
|
|
636
|
+
exports.DirectivesModule = DirectivesModule;
|
|
637
|
+
exports.InfiniteScrollComponent = InfiniteScrollComponent;
|
|
638
|
+
exports.PagersModule = PagersModule;
|
|
227
639
|
|
|
228
640
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
229
641
|
|