adb-shared 1.0.17 → 1.0.20
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 +160 -57
- package/bundles/adb-shared.umd.js.map +1 -1
- package/esm2015/lib/components/adb-header/adb-header.component.js +2 -2
- package/esm2015/lib/components/pagers/infinite-scroll.component.js +30 -37
- package/esm2015/lib/directives/directives.module.js +5 -4
- package/esm2015/lib/directives/focus.directive.js +27 -0
- package/esm2015/lib/pipes/highlight.pipe.js +34 -0
- package/esm2015/lib/pipes/number-spacing.pipe.js +21 -0
- package/esm2015/lib/pipes/pipes.module.js +18 -0
- package/esm2015/public-api.js +5 -1
- package/fesm2015/adb-shared.js +124 -41
- package/fesm2015/adb-shared.js.map +1 -1
- package/lib/components/pagers/infinite-scroll.component.d.ts +9 -12
- package/lib/directives/directives.module.d.ts +2 -1
- package/lib/directives/focus.directive.d.ts +10 -0
- package/lib/pipes/highlight.pipe.d.ts +8 -0
- package/lib/pipes/number-spacing.pipe.d.ts +7 -0
- package/lib/pipes/pipes.module.d.ts +8 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
return ADBHeaderComponent;
|
|
134
134
|
}());
|
|
135
135
|
/** @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 });
|
|
136
|
-
/** @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 } });
|
|
136
|
+
/** @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\">{{'ADB_HEADER.TITLE'|translate}}</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 } });
|
|
137
137
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ADBHeaderComponent, decorators: [{
|
|
138
138
|
type: i0.Component,
|
|
139
139
|
args: [{
|
|
@@ -177,20 +177,47 @@
|
|
|
177
177
|
args: ['document:click', ['$event.target']]
|
|
178
178
|
}] } });
|
|
179
179
|
|
|
180
|
+
/* eslint-disable @angular-eslint/directive-selector */
|
|
181
|
+
var FocusDirective = /** @class */ (function () {
|
|
182
|
+
function FocusDirective(element) {
|
|
183
|
+
this.element = element;
|
|
184
|
+
this.focused = false;
|
|
185
|
+
}
|
|
186
|
+
FocusDirective.prototype.ngAfterViewInit = function () {
|
|
187
|
+
var _this = this;
|
|
188
|
+
// ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.
|
|
189
|
+
if (this.focused) {
|
|
190
|
+
setTimeout(function () { return _this.element.nativeElement.focus(); }, 0);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
return FocusDirective;
|
|
194
|
+
}());
|
|
195
|
+
/** @nocollapse */ FocusDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: FocusDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
196
|
+
/** @nocollapse */ FocusDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: FocusDirective, selector: "[adbfocus]", inputs: { focused: ["focus", "focused"] }, ngImport: i0__namespace });
|
|
197
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: FocusDirective, decorators: [{
|
|
198
|
+
type: i0.Directive,
|
|
199
|
+
args: [{
|
|
200
|
+
selector: '[adbfocus]',
|
|
201
|
+
}]
|
|
202
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { focused: [{
|
|
203
|
+
type: i0.Input,
|
|
204
|
+
args: ['focus']
|
|
205
|
+
}] } });
|
|
206
|
+
|
|
180
207
|
var DirectivesModule = /** @class */ (function () {
|
|
181
208
|
function DirectivesModule() {
|
|
182
209
|
}
|
|
183
210
|
return DirectivesModule;
|
|
184
211
|
}());
|
|
185
212
|
/** @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 });
|
|
186
|
-
/** @nocollapse */ DirectivesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DirectivesModule, declarations: [ClickOutsideDirective], exports: [ClickOutsideDirective] });
|
|
213
|
+
/** @nocollapse */ DirectivesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DirectivesModule, declarations: [ClickOutsideDirective, FocusDirective], exports: [ClickOutsideDirective, FocusDirective] });
|
|
187
214
|
/** @nocollapse */ DirectivesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DirectivesModule, imports: [[]] });
|
|
188
215
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: DirectivesModule, decorators: [{
|
|
189
216
|
type: i0.NgModule,
|
|
190
217
|
args: [{
|
|
191
218
|
imports: [],
|
|
192
|
-
declarations: [ClickOutsideDirective],
|
|
193
|
-
exports: [ClickOutsideDirective]
|
|
219
|
+
declarations: [ClickOutsideDirective, FocusDirective],
|
|
220
|
+
exports: [ClickOutsideDirective, FocusDirective]
|
|
194
221
|
}]
|
|
195
222
|
}] });
|
|
196
223
|
|
|
@@ -239,6 +266,48 @@
|
|
|
239
266
|
}]
|
|
240
267
|
}] });
|
|
241
268
|
|
|
269
|
+
var InfiniteScrollComponent = /** @class */ (function () {
|
|
270
|
+
function InfiniteScrollComponent(_element) {
|
|
271
|
+
var _this = this;
|
|
272
|
+
this._element = _element;
|
|
273
|
+
this.onVisible = new i0.EventEmitter();
|
|
274
|
+
this.height = '1px';
|
|
275
|
+
this.checkForIntersection = function (entries) {
|
|
276
|
+
entries.forEach(function (entry) {
|
|
277
|
+
var isIntersecting = entry.isIntersecting &&
|
|
278
|
+
entry.target === _this._element.nativeElement;
|
|
279
|
+
if (isIntersecting) {
|
|
280
|
+
_this.onVisible.emit();
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
InfiniteScrollComponent.prototype.ngAfterViewInit = function () {
|
|
286
|
+
var _this = this;
|
|
287
|
+
this._intersectionObserver = new IntersectionObserver(function (entries) {
|
|
288
|
+
_this.checkForIntersection(entries);
|
|
289
|
+
}, {});
|
|
290
|
+
this._intersectionObserver.observe(this._element.nativeElement);
|
|
291
|
+
};
|
|
292
|
+
InfiniteScrollComponent.prototype.ngOnDestroy = function () {
|
|
293
|
+
if (this._intersectionObserver) {
|
|
294
|
+
this._intersectionObserver.disconnect();
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
return InfiniteScrollComponent;
|
|
298
|
+
}());
|
|
299
|
+
/** @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.Directive });
|
|
300
|
+
/** @nocollapse */ InfiniteScrollComponent.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: InfiniteScrollComponent, selector: "[onVisible]", outputs: { onVisible: "onVisible" }, host: { properties: { "style.height": "this.height" } }, ngImport: i0__namespace });
|
|
301
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: InfiniteScrollComponent, decorators: [{
|
|
302
|
+
type: i0.Directive,
|
|
303
|
+
args: [{ selector: "[onVisible]" }]
|
|
304
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { onVisible: [{
|
|
305
|
+
type: i0.Output
|
|
306
|
+
}], height: [{
|
|
307
|
+
type: i0.HostBinding,
|
|
308
|
+
args: ['style.height']
|
|
309
|
+
}] } });
|
|
310
|
+
|
|
242
311
|
/*! *****************************************************************************
|
|
243
312
|
Copyright (c) Microsoft Corporation.
|
|
244
313
|
|
|
@@ -557,59 +626,6 @@
|
|
|
557
626
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
558
627
|
}
|
|
559
628
|
|
|
560
|
-
var InfiniteScrollComponent = /** @class */ (function () {
|
|
561
|
-
function InfiniteScrollComponent(host) {
|
|
562
|
-
this.host = host;
|
|
563
|
-
this.options = {};
|
|
564
|
-
this.scrolled = new i0.EventEmitter();
|
|
565
|
-
}
|
|
566
|
-
Object.defineProperty(InfiniteScrollComponent.prototype, "element", {
|
|
567
|
-
get: function () {
|
|
568
|
-
return this.host.nativeElement;
|
|
569
|
-
},
|
|
570
|
-
enumerable: false,
|
|
571
|
-
configurable: true
|
|
572
|
-
});
|
|
573
|
-
InfiniteScrollComponent.prototype.ngOnInit = function () {
|
|
574
|
-
var _this = this;
|
|
575
|
-
var options = Object.assign({ root: this.isHostScrollable() ? this.host.nativeElement : null }, this.options);
|
|
576
|
-
this.observer = new IntersectionObserver(function (_b) {
|
|
577
|
-
var _c = __read(_b, 1), entry = _c[0];
|
|
578
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
579
|
-
entry.isIntersecting && _this.scrolled.emit();
|
|
580
|
-
}, options);
|
|
581
|
-
};
|
|
582
|
-
InfiniteScrollComponent.prototype.ngAfterViewInit = function () {
|
|
583
|
-
this.observer.observe(this.anchor.nativeElement);
|
|
584
|
-
};
|
|
585
|
-
InfiniteScrollComponent.prototype.isHostScrollable = function () {
|
|
586
|
-
var style = window.getComputedStyle(this.element);
|
|
587
|
-
return style.getPropertyValue('overflow') === 'auto' ||
|
|
588
|
-
style.getPropertyValue('overflow-y') === 'scroll';
|
|
589
|
-
};
|
|
590
|
-
InfiniteScrollComponent.prototype.ngOnDestroy = function () {
|
|
591
|
-
var _a;
|
|
592
|
-
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
593
|
-
};
|
|
594
|
-
return InfiniteScrollComponent;
|
|
595
|
-
}());
|
|
596
|
-
/** @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 });
|
|
597
|
-
/** @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 });
|
|
598
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: InfiniteScrollComponent, decorators: [{
|
|
599
|
-
type: i0.Component,
|
|
600
|
-
args: [{
|
|
601
|
-
selector: 'adb-infinite-scroll',
|
|
602
|
-
template: '<ng-content></ng-content><div #anchor></div>'
|
|
603
|
-
}]
|
|
604
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { options: [{
|
|
605
|
-
type: i0.Input
|
|
606
|
-
}], scrolled: [{
|
|
607
|
-
type: i0.Output
|
|
608
|
-
}], anchor: [{
|
|
609
|
-
type: i0.ViewChild,
|
|
610
|
-
args: ['anchor']
|
|
611
|
-
}] } });
|
|
612
|
-
|
|
613
629
|
var PagerBaseDirective = /** @class */ (function () {
|
|
614
630
|
function PagerBaseDirective() {
|
|
615
631
|
this.limit = PagerBaseDirective.DEFAULT_LIMIT;
|
|
@@ -706,6 +722,89 @@
|
|
|
706
722
|
}]
|
|
707
723
|
}] });
|
|
708
724
|
|
|
725
|
+
var HighlightPipe = /** @class */ (function () {
|
|
726
|
+
function HighlightPipe() {
|
|
727
|
+
this.format = /[`!@#$%*\\()_+\-=\[\]{};':"\\|,<>\/?~]/g;
|
|
728
|
+
}
|
|
729
|
+
HighlightPipe.prototype.transform = function (value, searchs) {
|
|
730
|
+
var e_1, _a;
|
|
731
|
+
if (!value) {
|
|
732
|
+
return value;
|
|
733
|
+
}
|
|
734
|
+
if (searchs) {
|
|
735
|
+
if (!Array.isArray(searchs)) {
|
|
736
|
+
searchs = searchs.split(' ').filter(function (s) { return s; });
|
|
737
|
+
}
|
|
738
|
+
try {
|
|
739
|
+
for (var searchs_1 = __values(searchs), searchs_1_1 = searchs_1.next(); !searchs_1_1.done; searchs_1_1 = searchs_1.next()) {
|
|
740
|
+
var search = searchs_1_1.value;
|
|
741
|
+
if (this.format.test(search)) {
|
|
742
|
+
search = search.replace(this.format, '');
|
|
743
|
+
}
|
|
744
|
+
var reText = new RegExp(search, 'gi');
|
|
745
|
+
value = value.replace(reText, '<mark>$&</mark>');
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
749
|
+
finally {
|
|
750
|
+
try {
|
|
751
|
+
if (searchs_1_1 && !searchs_1_1.done && (_a = searchs_1.return)) _a.call(searchs_1);
|
|
752
|
+
}
|
|
753
|
+
finally { if (e_1) throw e_1.error; }
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
return value;
|
|
757
|
+
};
|
|
758
|
+
return HighlightPipe;
|
|
759
|
+
}());
|
|
760
|
+
/** @nocollapse */ HighlightPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: HighlightPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
761
|
+
/** @nocollapse */ HighlightPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: HighlightPipe, name: "adbHighlight" });
|
|
762
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: HighlightPipe, decorators: [{
|
|
763
|
+
type: i0.Pipe,
|
|
764
|
+
args: [{
|
|
765
|
+
name: 'adbHighlight'
|
|
766
|
+
}]
|
|
767
|
+
}] });
|
|
768
|
+
|
|
769
|
+
var NumberSpacingPipe = /** @class */ (function () {
|
|
770
|
+
function NumberSpacingPipe() {
|
|
771
|
+
}
|
|
772
|
+
NumberSpacingPipe.prototype.transform = function (value) {
|
|
773
|
+
// If value is empty, 0 is falsy so perform an extra check to not make '0' to an empty string
|
|
774
|
+
if (!value && value !== 0) {
|
|
775
|
+
return '';
|
|
776
|
+
}
|
|
777
|
+
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
|
|
778
|
+
};
|
|
779
|
+
return NumberSpacingPipe;
|
|
780
|
+
}());
|
|
781
|
+
/** @nocollapse */ NumberSpacingPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NumberSpacingPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
782
|
+
/** @nocollapse */ NumberSpacingPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NumberSpacingPipe, name: "adbSpacing", pure: false });
|
|
783
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NumberSpacingPipe, decorators: [{
|
|
784
|
+
type: i0.Pipe,
|
|
785
|
+
args: [{
|
|
786
|
+
name: 'adbSpacing',
|
|
787
|
+
pure: false
|
|
788
|
+
}]
|
|
789
|
+
}] });
|
|
790
|
+
|
|
791
|
+
var PipesModule = /** @class */ (function () {
|
|
792
|
+
function PipesModule() {
|
|
793
|
+
}
|
|
794
|
+
return PipesModule;
|
|
795
|
+
}());
|
|
796
|
+
/** @nocollapse */ PipesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PipesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
797
|
+
/** @nocollapse */ PipesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PipesModule, declarations: [HighlightPipe, NumberSpacingPipe], exports: [HighlightPipe, NumberSpacingPipe] });
|
|
798
|
+
/** @nocollapse */ PipesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PipesModule, imports: [[]] });
|
|
799
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: PipesModule, decorators: [{
|
|
800
|
+
type: i0.NgModule,
|
|
801
|
+
args: [{
|
|
802
|
+
imports: [],
|
|
803
|
+
declarations: [HighlightPipe, NumberSpacingPipe],
|
|
804
|
+
exports: [HighlightPipe, NumberSpacingPipe]
|
|
805
|
+
}]
|
|
806
|
+
}] });
|
|
807
|
+
|
|
709
808
|
/*
|
|
710
809
|
* Public API Surface of artdata-shared
|
|
711
810
|
*/
|
|
@@ -718,9 +817,13 @@
|
|
|
718
817
|
exports.ADBHeaderModule = ADBHeaderModule;
|
|
719
818
|
exports.ClickOutsideDirective = ClickOutsideDirective;
|
|
720
819
|
exports.DirectivesModule = DirectivesModule;
|
|
820
|
+
exports.FocusDirective = FocusDirective;
|
|
821
|
+
exports.HighlightPipe = HighlightPipe;
|
|
721
822
|
exports.InfiniteScrollComponent = InfiniteScrollComponent;
|
|
823
|
+
exports.NumberSpacingPipe = NumberSpacingPipe;
|
|
722
824
|
exports.PagerComponent = PagerComponent;
|
|
723
825
|
exports.PagersModule = PagersModule;
|
|
826
|
+
exports.PipesModule = PipesModule;
|
|
724
827
|
|
|
725
828
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
726
829
|
|