adb-shared 6.1.10 → 6.2.0-beta
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/fesm2022/adb-shared.mjs +589 -370
- package/fesm2022/adb-shared.mjs.map +1 -1
- package/package.json +11 -9
- package/types/adb-shared.d.ts +877 -0
- package/index.d.ts +0 -5
- package/lib/components/adb-artportalen-nav/adb-artportalen-footer.component.d.ts +0 -23
- package/lib/components/adb-artportalen-nav/adb-artportalen-nav.component.d.ts +0 -41
- package/lib/components/adb-artportalen-nav/adb-artportalen-nav.module.d.ts +0 -16
- package/lib/components/adb-artportalen-nav/environment.service.d.ts +0 -7
- package/lib/components/adb-artportalen-nav/navigation.model.d.ts +0 -18
- package/lib/components/adb-buttons/adb-buttons.module.d.ts +0 -9
- package/lib/components/adb-buttons/help-button.component.d.ts +0 -16
- package/lib/components/adb-confirm-modal/adb-confirm-modal.d.ts +0 -21
- package/lib/components/adb-confirm-modal/adb-modal.module.d.ts +0 -10
- package/lib/components/adb-confirm-modal/adb-modal.service.d.ts +0 -18
- package/lib/components/adb-dropdown/adb-dropdown.directive.d.ts +0 -21
- package/lib/components/adb-dropdown/adb-dropdown.module.d.ts +0 -11
- package/lib/components/adb-dropdown/adb-dropdown.service.d.ts +0 -7
- package/lib/components/adb-dropdown/adb-dropdown2.directive.d.ts +0 -23
- package/lib/components/adb-filter-section/adb-filter-section.module.d.ts +0 -11
- package/lib/components/adb-filter-section/filter-section.component.d.ts +0 -13
- package/lib/components/adb-header/adb-header.module.d.ts +0 -15
- package/lib/components/adb-header/adb-nav.component.d.ts +0 -41
- package/lib/components/adb-header/environment.service.d.ts +0 -7
- package/lib/components/adb-header/navigation.model.d.ts +0 -29
- package/lib/components/adb-rich-editor/adb-rich-editor.component.d.ts +0 -28
- package/lib/components/adb-rich-editor/adb-rich-editor.module.d.ts +0 -13
- package/lib/components/adb-rich-editor/adb-rich-text.d.ts +0 -18
- package/lib/components/adb-rich-editor/rich-module-config.d.ts +0 -5
- package/lib/components/adb-toast/adb-toast.d.ts +0 -11
- package/lib/components/adb-toast/adb-toast.module.d.ts +0 -10
- package/lib/components/adb-toast/adb-toast.service.d.ts +0 -36
- package/lib/components/adb-user/adb-user-service-config.d.ts +0 -22
- package/lib/components/adb-user/adb-user.interceptor.d.ts +0 -13
- package/lib/components/adb-user/adb-user.module.d.ts +0 -13
- package/lib/components/adb-user/adb-user.service.d.ts +0 -34
- package/lib/components/adb-user/auth-callback.component.d.ts +0 -16
- package/lib/components/adb-user/user-constants.d.ts +0 -9
- package/lib/components/date-picker/adb-date-picker.component.d.ts +0 -64
- package/lib/components/date-picker/adb-date-picker.directive.d.ts +0 -47
- package/lib/components/date-picker/adb-date-picker.module.d.ts +0 -12
- package/lib/components/date-picker/adb-date-picker.service.d.ts +0 -8
- package/lib/components/pagers/infinite-scroll.component.d.ts +0 -15
- package/lib/components/pagers/pager-base.directive.d.ts +0 -17
- package/lib/components/pagers/pager-inline.d.ts +0 -16
- package/lib/components/pagers/pager.d.ts +0 -22
- package/lib/components/pagers/pagers.module.d.ts +0 -11
- package/lib/directives/active-fragment.directive.d.ts +0 -17
- package/lib/directives/click-outside.directive.d.ts +0 -10
- package/lib/directives/directives.module.d.ts +0 -13
- package/lib/directives/file-upload.directive.d.ts +0 -12
- package/lib/directives/focus.directive.d.ts +0 -11
- package/lib/directives/image-loader.directive.d.ts +0 -21
- package/lib/directives/redlist-badge-class.directive.d.ts +0 -7
- package/lib/directives/risk-class.directive.d.ts +0 -7
- package/lib/pipes/date.pipe.d.ts +0 -10
- package/lib/pipes/emptyValue.pipe.d.ts +0 -7
- package/lib/pipes/highlight-html.pipe.d.ts +0 -10
- package/lib/pipes/highlight.pipe.d.ts +0 -9
- package/lib/pipes/number-spacing.pipe.d.ts +0 -7
- package/lib/pipes/pipes.module.d.ts +0 -11
- package/public-api.d.ts +0 -48
package/fesm2022/adb-shared.mjs
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i1$3 from '@angular/common';
|
|
2
2
|
import { CommonModule, DatePipe, formatDate } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Inject, Injectable, EventEmitter, HostListener, Output, Directive, Input, HostBinding, NgModule, Component, Pipe, forwardRef, InjectionToken } from '@angular/core';
|
|
4
|
+
import { Inject, Injectable, EventEmitter, HostListener, Output, Directive, Input, HostBinding, NgModule, Component, Pipe, forwardRef, InjectionToken, TemplateRef, ContentChild } from '@angular/core';
|
|
5
5
|
import * as i1$1 from '@ngx-translate/core';
|
|
6
6
|
import { TranslateModule } from '@ngx-translate/core';
|
|
7
7
|
import * as i1$2 from '@angular/common/http';
|
|
8
8
|
import { provideHttpClient, withInterceptorsFromDi, HttpHeaders, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
9
9
|
import * as i1 from '@angular/router';
|
|
10
10
|
import { NavigationEnd, RouterModule, NavigationStart } from '@angular/router';
|
|
11
|
-
import { Subscription, Subject, of, BehaviorSubject, catchError, throwError } from 'rxjs';
|
|
11
|
+
import { Subscription, Subject, of, BehaviorSubject, catchError, throwError, map as map$1, tap } from 'rxjs';
|
|
12
12
|
import { endOfDay, addYears, startOfDay, subYears, getMonth, subMonths, addMonths, isSameYear, endOfMonth, startOfMonth, eachWeekOfInterval, getISOWeek, addDays, eachDayOfInterval, getHours, getMinutes, isSameDay, isWithinInterval, isSameMonth, isValid, parseISO, addSeconds, format } from 'date-fns';
|
|
13
|
-
import * as
|
|
13
|
+
import * as i1$4 from '@angular/forms';
|
|
14
14
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';
|
|
15
|
-
import { delay } from 'rxjs/operators';
|
|
15
|
+
import { delay, debounceTime, switchMap, map, catchError as catchError$1 } from 'rxjs/operators';
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
class EnvironmentService {
|
|
18
18
|
constructor(environment) {
|
|
19
19
|
this.environment = environment;
|
|
20
20
|
}
|
|
21
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
22
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
23
|
-
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
25
|
-
type: Injectable
|
|
21
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: EnvironmentService, deps: [{ token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
22
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: EnvironmentService, providedIn: 'root' }); }
|
|
23
|
+
}
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: EnvironmentService, decorators: [{
|
|
25
|
+
type: Injectable,
|
|
26
|
+
args: [{ providedIn: 'root' }]
|
|
26
27
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
27
28
|
type: Inject,
|
|
28
29
|
args: ['env']
|
|
@@ -39,10 +40,10 @@ class ClickOutsideDirective {
|
|
|
39
40
|
this.adbClickOutside.emit(target);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
43
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
43
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ClickOutsideDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
44
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: ClickOutsideDirective, isStandalone: false, selector: "[adbClickOutside]", outputs: { adbClickOutside: "adbClickOutside" }, host: { listeners: { "document:click": "onClick($event.target)" } }, ngImport: i0 }); }
|
|
44
45
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ClickOutsideDirective, decorators: [{
|
|
46
47
|
type: Directive,
|
|
47
48
|
args: [{
|
|
48
49
|
selector: '[adbClickOutside]',
|
|
@@ -74,10 +75,10 @@ class FileUploadDirective {
|
|
|
74
75
|
this.click.emit(target);
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
78
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
78
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FileUploadDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
79
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: FileUploadDirective, isStandalone: false, selector: "input[adbFileUpload]", outputs: { upload: "upload" }, host: { listeners: { "change": "onBeginUpload($event.target)", "click": "onClick($event.target)" } }, ngImport: i0 }); }
|
|
79
80
|
}
|
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FileUploadDirective, decorators: [{
|
|
81
82
|
type: Directive,
|
|
82
83
|
args: [{
|
|
83
84
|
selector: 'input[adbFileUpload]',
|
|
@@ -110,10 +111,10 @@ class FocusDirective {
|
|
|
110
111
|
setTimeout(() => this.element.nativeElement.focus(), 0);
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
114
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
114
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
115
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: FocusDirective, isStandalone: false, selector: "[adbFocus]", inputs: { adbFocus: "adbFocus" }, ngImport: i0 }); }
|
|
115
116
|
}
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FocusDirective, decorators: [{
|
|
117
118
|
type: Directive,
|
|
118
119
|
args: [{
|
|
119
120
|
selector: '[adbFocus]',
|
|
@@ -149,10 +150,10 @@ class RedListBadgeClassDirective {
|
|
|
149
150
|
}
|
|
150
151
|
return 'bg-redlist-lc border';
|
|
151
152
|
}
|
|
152
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
153
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
153
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RedListBadgeClassDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
154
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: RedListBadgeClassDirective, isStandalone: false, selector: "[adbRedListBadgeClass]", inputs: { redlistId: ["adbRedListBadgeClass", "redlistId"] }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0 }); }
|
|
154
155
|
}
|
|
155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RedListBadgeClassDirective, decorators: [{
|
|
156
157
|
type: Directive,
|
|
157
158
|
args: [{
|
|
158
159
|
selector: '[adbRedListBadgeClass]',
|
|
@@ -185,10 +186,10 @@ class RiskClassDirective {
|
|
|
185
186
|
}
|
|
186
187
|
return 'text-dark';
|
|
187
188
|
}
|
|
188
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
189
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
189
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RiskClassDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
190
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: RiskClassDirective, isStandalone: false, selector: "[adbRiskClass]", inputs: { category: ["adbRiskClass", "category"] }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0 }); }
|
|
190
191
|
}
|
|
191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RiskClassDirective, decorators: [{
|
|
192
193
|
type: Directive,
|
|
193
194
|
args: [{
|
|
194
195
|
selector: '[adbRiskClass]',
|
|
@@ -240,10 +241,10 @@ class RouterLinkActiveFragmentDirective {
|
|
|
240
241
|
this.sub.unsubscribe();
|
|
241
242
|
}
|
|
242
243
|
}
|
|
243
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
244
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
244
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RouterLinkActiveFragmentDirective, deps: [{ token: i1.Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
245
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: RouterLinkActiveFragmentDirective, isStandalone: false, selector: "[adbActiveFragment]", inputs: { activeClass: ["adbActiveFragment", "activeClass"], fragment: "fragment" }, ngImport: i0 }); }
|
|
245
246
|
}
|
|
246
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RouterLinkActiveFragmentDirective, decorators: [{
|
|
247
248
|
type: Directive,
|
|
248
249
|
args: [{
|
|
249
250
|
selector: '[adbActiveFragment]',
|
|
@@ -309,10 +310,10 @@ class ImageLoaderDirective {
|
|
|
309
310
|
this.translationSub?.unsubscribe();
|
|
310
311
|
this.hideSpinner();
|
|
311
312
|
}
|
|
312
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
313
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
313
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ImageLoaderDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
314
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: ImageLoaderDirective, isStandalone: false, selector: "img[adbImageLoader]", inputs: { fallbackKey: ["adbImageLoader", "fallbackKey"] }, host: { listeners: { "load": "onLoad()", "error": "onError()" } }, ngImport: i0 }); }
|
|
314
315
|
}
|
|
315
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ImageLoaderDirective, decorators: [{
|
|
316
317
|
type: Directive,
|
|
317
318
|
args: [{
|
|
318
319
|
selector: 'img[adbImageLoader]',
|
|
@@ -330,11 +331,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
330
331
|
}] } });
|
|
331
332
|
|
|
332
333
|
class AdbDirectivesModule {
|
|
333
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
334
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
335
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
334
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
335
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AdbDirectivesModule, declarations: [ClickOutsideDirective, FocusDirective, FileUploadDirective, RedListBadgeClassDirective, RiskClassDirective, ImageLoaderDirective, RouterLinkActiveFragmentDirective], exports: [ClickOutsideDirective, FocusDirective, FileUploadDirective, RedListBadgeClassDirective, RiskClassDirective, ImageLoaderDirective, RouterLinkActiveFragmentDirective] }); }
|
|
336
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDirectivesModule }); }
|
|
336
337
|
}
|
|
337
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDirectivesModule, decorators: [{
|
|
338
339
|
type: NgModule,
|
|
339
340
|
args: [{
|
|
340
341
|
imports: [],
|
|
@@ -343,24 +344,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
343
344
|
}]
|
|
344
345
|
}] });
|
|
345
346
|
|
|
346
|
-
class
|
|
347
|
+
class ArtportalenNavComponent {
|
|
347
348
|
set userName(fullName) {
|
|
348
349
|
this.fullName = fullName;
|
|
349
|
-
const splitted = fullName?.split(' ');
|
|
350
|
-
if (splitted?.length > 1) {
|
|
351
|
-
const initials = splitted.shift().charAt(0) + splitted.pop().charAt(0);
|
|
352
|
-
this.initials = initials.toUpperCase();
|
|
353
|
-
}
|
|
354
|
-
else {
|
|
355
|
-
this.initials = this.fullName ? this.fullName.charAt(0).toUpperCase() : this.fullName;
|
|
356
|
-
}
|
|
357
350
|
}
|
|
358
351
|
;
|
|
359
|
-
constructor(httpClient, router,
|
|
352
|
+
constructor(httpClient, router, trans, envService) {
|
|
360
353
|
this.httpClient = httpClient;
|
|
361
354
|
this.router = router;
|
|
362
|
-
this.envService = envService;
|
|
363
355
|
this.trans = trans;
|
|
356
|
+
this.envService = envService;
|
|
364
357
|
this.subscription = new Subscription();
|
|
365
358
|
this.loginClicked = new EventEmitter();
|
|
366
359
|
this.logoutClicked = new EventEmitter();
|
|
@@ -368,16 +361,16 @@ class ADBNavComponent {
|
|
|
368
361
|
this.showPattern = false;
|
|
369
362
|
this.translationFinished = false;
|
|
370
363
|
this.lastPosition = 0;
|
|
371
|
-
this.artfakta = true;
|
|
372
364
|
this.showNavMenu = false;
|
|
373
365
|
this.showUserMenu = false;
|
|
374
|
-
this.
|
|
375
|
-
this.
|
|
366
|
+
this.showReport = true;
|
|
367
|
+
this.showObservations = true;
|
|
368
|
+
this.showSubs = false;
|
|
376
369
|
}
|
|
377
370
|
ngOnInit() {
|
|
378
371
|
this.url = window.location.href;
|
|
379
372
|
const baseUrl = this.envService.environment.resourceUrl;
|
|
380
|
-
const url =
|
|
373
|
+
const url = '/assets/artportalen/links-ap3.json';
|
|
381
374
|
this.subscription.add(this.httpClient.get(baseUrl + url).subscribe(result => {
|
|
382
375
|
this.navigation = result;
|
|
383
376
|
}));
|
|
@@ -389,23 +382,6 @@ class ADBNavComponent {
|
|
|
389
382
|
}
|
|
390
383
|
});
|
|
391
384
|
}
|
|
392
|
-
initTranslations(baseUrl) {
|
|
393
|
-
if (this.trans.store.translations[this.trans.currentLang]) {
|
|
394
|
-
this.loadTranslation(baseUrl, this.trans.currentLang);
|
|
395
|
-
}
|
|
396
|
-
this.subscription.add(this.trans.onLangChange.subscribe((event) => {
|
|
397
|
-
this.translationFinished = false;
|
|
398
|
-
this.loadTranslation(baseUrl, event.lang);
|
|
399
|
-
}));
|
|
400
|
-
}
|
|
401
|
-
loadTranslation(baseUrl, lang) {
|
|
402
|
-
//TODO: Prepare for diffents lang then en sv (en-GB) or add more files in devcomponentserver :)
|
|
403
|
-
const url = this.artfakta ? baseUrl + `/assets/i18n/${lang}.json` : baseUrl + `/assets/artportalen/i18n/${lang}.json`;
|
|
404
|
-
this.subscription.add(this.httpClient.get(url).subscribe(translations => {
|
|
405
|
-
this.trans.setTranslation(lang, translations, true);
|
|
406
|
-
this.translationFinished = true;
|
|
407
|
-
}));
|
|
408
|
-
}
|
|
409
385
|
showMenuDropdown(show) {
|
|
410
386
|
this.showUserMenu = false;
|
|
411
387
|
if (this.showNavMenu !== show) {
|
|
@@ -417,7 +393,14 @@ class ADBNavComponent {
|
|
|
417
393
|
this.trans.use(lang);
|
|
418
394
|
this.showNavMenu = false;
|
|
419
395
|
this.dropMenuChange.emit(false);
|
|
420
|
-
|
|
396
|
+
}
|
|
397
|
+
onUserClick() {
|
|
398
|
+
if (this.fullName) {
|
|
399
|
+
this.logout();
|
|
400
|
+
}
|
|
401
|
+
else {
|
|
402
|
+
this.login();
|
|
403
|
+
}
|
|
421
404
|
}
|
|
422
405
|
login() {
|
|
423
406
|
this.loginClicked.emit();
|
|
@@ -425,16 +408,31 @@ class ADBNavComponent {
|
|
|
425
408
|
logout() {
|
|
426
409
|
this.logoutClicked.emit();
|
|
427
410
|
}
|
|
411
|
+
initTranslations(baseUrl) {
|
|
412
|
+
this.loadTranslation(baseUrl, this.trans.getCurrentLang());
|
|
413
|
+
this.subscription.add(this.trans.onLangChange.subscribe((event) => {
|
|
414
|
+
this.translationFinished = false;
|
|
415
|
+
this.loadTranslation(baseUrl, event.lang);
|
|
416
|
+
}));
|
|
417
|
+
}
|
|
418
|
+
loadTranslation(baseUrl, lang) {
|
|
419
|
+
//TODO: Prepare for diffents lang then en sv (en-GB) or add more files in devcomponentserver :)
|
|
420
|
+
const url = baseUrl + `/assets/artportalen/i18n/${lang}.json`;
|
|
421
|
+
this.subscription.add(this.httpClient.get(url).subscribe(translations => {
|
|
422
|
+
this.trans.setTranslation(lang, translations, true);
|
|
423
|
+
this.translationFinished = true;
|
|
424
|
+
}));
|
|
425
|
+
}
|
|
428
426
|
ngOnDestroy() {
|
|
429
427
|
this.subscription.unsubscribe();
|
|
430
428
|
}
|
|
431
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
432
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.13", type: ADBNavComponent, isStandalone: false, selector: "adb-nav", inputs: { showPattern: "showPattern", userName: "userName", artfakta: "artfakta" }, outputs: { loginClicked: "loginClicked", logoutClicked: "logoutClicked", dropMenuChange: "dropMenuChange" }, ngImport: i0, template: "<div class=\"bg-primary adb-main-header\" (adbClickOutside)=\"showMenuDropdown(false);\">\r\n <header class=\"container-lg\" *ngIf=\"translationFinished\">\r\n <div [attr.id]=\"showPattern?'banner':''\" class=\"d-flex align-items-center gap-2\">\r\n <nav class=\"d-flex flex-grow-1 align-items-center pe-2 py-2 gap-1\">\r\n <a class=\"d-flex text-white text-decoration-none d-flex gap-2\" href=\"https://www.artdatabanken.se/\" target=\"new\">\r\n <img style=\"height: 2rem;\" src=\"/assets/images/slu.svg\" alt=\"logo\">\r\n <div class=\"border-end d-none d-sm-block\"></div>\r\n <img class=\"d-none d-sm-block align-self-center pe-5\" style=\"height: 0.7rem;\" src=\"/assets/images/artdatabanken.svg\" alt=\"logo\">\r\n </a>\r\n <a routerLink=\"/\" class=\"text-white text-decoration-none fs-1 fw-bold\">Artfakta</a>\r\n </nav>\r\n <div class=\"d-flex align-items-center gap-2\">\r\n <div><ng-content></ng-content></div>\r\n <div>\r\n <button class=\"btn btn-primary-dark btn-lg\" type=\"button\"\r\n attr.aria-label=\"{{'ADB_HEADER.MENY'|translate}}\"\r\n (click)=\"showMenuDropdown(!showNavMenu)\">\r\n <i class=\"fas fa-bars\"></i>\r\n <small class=\"d-none ms-2 d-md-inline-block\">{{'ADB_HEADER.MENY'|translate}}</small>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </header>\r\n <div *ngIf=\"navigation\" role=\"dialog\" class=\"offcanvas offcanvas-end bg-primary text-white\"\r\n [class.show]=\"showNavMenu\" tabindex=\"-1\" aria-labelledby=\"offcanvasNav\">\r\n <div class=\"offcanvas-header\">\r\n <h1 class=\"offcanvas-title h-section mb-0\" id=\"offcanvasNav\">Artfakta</h1>\r\n <button type=\"button\" class=\"btn-close btn-close-white\" attr.aria-label=\"{{'CLOSE'|translate}}\" (click)=\"showMenuDropdown(false)\"></button>\r\n </div>\r\n <div tabindex=\"-1\" class=\"offcanvas-body d-flex flex-column p-0\">\r\n <div class=\"px-3\">\r\n <div class=\"d-flex flex-wrap justify-content-between align-items-center mb-2 gap-1 px-2\">\r\n <ng-container *ngIf=\"initials\">\r\n <div>\r\n <button (click)=\"logout()\" type=\"button\" class=\"btn btn-primary-dark\">\r\n {{'ADB_HEADER.LOGOUT'|translate}}\r\n </button>\r\n </div>\r\n <div>{{fullName}}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!initials\">\r\n <div class=\"text-center\">\r\n <button type=\"button\" class=\"btn btn-primary-dark\" (click)=\"login()\" id=\"start-login\">{{'ADB_HEADER.LOGIN'|translate}}</button>\r\n </div>\r\n <a *ngIf=\"navigation\" class=\"text-white\" 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 <ul class=\"list-group list-group-flush border-top\">\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showArtfakta?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.artinfo.url}}\">\r\n {{navigation.artinfo.transId|translate}}\r\n </a>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showArtfakta = !showArtfakta\"\r\n attr.aria-controls=\"artfakta-links\" attr.aria-expanded=\"{{showArtfakta}}\">\r\n <span class=\"fas\" [ngClass]=\"showArtfakta?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" *ngIf=\"showArtfakta\" id=\"artfakta-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <a href=\"{{navigation.keys.url}}\" class=\"text-white\">\r\n {{navigation.keys.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-1\">\r\n <a href=\"{{navigation.mySpecies.url}}\" class=\"text-white\">\r\n {{navigation.mySpecies.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-1\">\r\n <a href=\"{{navigation.lists.url}}\" class=\"text-white\">\r\n {{navigation.lists.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-1\">\r\n <a href=\"{{navigation.imageRec.url}}\" class=\"text-white\">\r\n {{navigation.imageRec.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-1\">\r\n <a href=\"{{navigation.filter.url}}\" class=\"text-white\">\r\n {{navigation.filter.transId|translate}}\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.observations.url}}?lang={{trans.currentLang}}\">\r\n {{navigation.observations.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showNOS?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <button class=\"btn btn-link p-0 text-white w-100 text-start\" (click)=\"showNOS = !showNOS\">\r\n {{navigation.nameAndRelationship.transId|translate}}\r\n </button>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showNOS = !showNOS\" attr.aria-controls=\"nos-links\" attr.aria-expanded=\"{{showNOS}}\">\r\n <span class=\"fas\" [ngClass]=\"showNOS?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" *ngIf=\"showNOS\" id=\"nos-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1 text-white\">\r\n <a href=\"{{navigation.nameSearch.url}}\" class=\"text-white\">\r\n {{navigation.nameSearch.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-1 text-white\">\r\n <a href=\"{{navigation.match.url}}\" class=\"text-white\">\r\n {{navigation.match.transId|translate}}\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block py-1 text-white\" [href]=\"navigation.about.url\">{{navigation.about.transId|translate}}</a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block fw-bold py-1 text-white\" [href]=\"navigation.artportalenUrl\">\r\n {{'ADB_HEADER.ARTPORTALEN_TITLE'|translate}}\r\n <i class=\"fas fa-external-link\"></i>\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <small class=\"d-block text-white pt-1\">\r\n {{'ADB_HEADER.DEVELOPED_BY'|translate}}\r\n <a href=\"https://www.artdatabanken.se/\" class=\"text-white\"><u class=\"me-1\">{{'ADB_HEADER.ARTDATABANKEN'|translate}}</u> <span class=\"fas fa-external-link\"></span></a>\r\n </small>\r\n </li>\r\n </ul>\r\n </div>\r\n <div id=\"pattern\" class=\"flex-grow-1\">\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[adbClickOutside]", outputs: ["adbClickOutside"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
429
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ArtportalenNavComponent, deps: [{ token: i1$2.HttpClient }, { token: i1.Router }, { token: i1$1.TranslateService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
430
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: ArtportalenNavComponent, isStandalone: false, selector: "adb-artportalen-nav", inputs: { showPattern: "showPattern", userName: "userName" }, outputs: { loginClicked: "loginClicked", logoutClicked: "logoutClicked", dropMenuChange: "dropMenuChange" }, ngImport: i0, template: "<div class=\"bg-primary adb-main-header position-static\" (adbClickOutside)=\"showMenuDropdown(false);\">\r\n @if (translationFinished) {\r\n <header class=\"container-lg px-0\">\r\n <div [attr.id]=\"showPattern?'banner':''\" class=\"px-1 d-flex flex-wrap align-items-center gap-2\">\r\n <nav class=\"d-flex flex-grow-1 align-items-center pe-2 py-2 gap-2\">\r\n <a class=\"d-flex text-white text-decoration-none d-flex gap-2\" href=\"https://www.artdatabanken.se/\" target=\"new\">\r\n <img style=\"height: 2rem;\" src=\"/assets/images/slu.svg\" alt=\"logo\">\r\n <div class=\"border-end d-none d-sm-block\"></div>\r\n <img class=\"d-none d-sm-block align-self-center pe-5\" style=\"height: 0.7rem;\" src=\"/assets/images/artdatabanken.svg\" alt=\"logo\">\r\n </a>\r\n <a [href]=\"navigation?.home\" class=\"text-white text-decoration-none fs-1 fw-bold\">{{'HEADER.TITLE'|translate}}</a>\r\n </nav>\r\n <div class=\"ms-auto d-flex align-items-center gap-2\">\r\n <div><ng-content></ng-content></div>\r\n <div>\r\n <button class=\"d-none d-md-block btn btn-primary-dark btn-lg\" type=\"button\"\r\n title=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\"\r\n attr.aria-label=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\"\r\n (click)=\"onUserClick()\">\r\n <small>{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}</small>\r\n </button>\r\n </div>\r\n <div>\r\n <button class=\"btn btn-primary-dark btn-lg\" type=\"button\" title=\"{{'HEADER.MENY'|translate}}\" attr.aria-label=\"{{'HEADER.MENY'|translate}}\" (click)=\"showMenuDropdown(!showNavMenu)\">\r\n <i class=\"fas fa-bars\"></i>\r\n <small class=\"ms-2 d-none d-md-inline-block\">{{'HEADER.MENY'|translate}}</small>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex justify-content-center d-md-none p-2 border-dark border-top\">\r\n <button class=\"btn btn-primary-dark btn-lg\" type=\"button\"\r\n title=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\"\r\n attr.aria-label=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\" (click)=\"onUserClick()\">\r\n <small>{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}</small>\r\n </button>\r\n </div>\r\n </header>\r\n }\r\n @if (navigation) {\r\n <div role=\"dialog\" class=\"offcanvas offcanvas-end bg-primary text-white\" [class.show]=\"showNavMenu\" tabindex=\"-1\" aria-labelledby=\"offcanvasNav\">\r\n <div class=\"offcanvas-header\">\r\n <h1 class=\"offcanvas-title h-section mb-0\" id=\"offcanvasNav\"><a [href]=\"navigation.home\" class=\"text-white text-decoration-none\">{{'HEADER.TITLE'|translate}}</a></h1>\r\n <button type=\"button\" class=\"btn-close btn-close-white\" attr.aria-label=\"{{'CLOSE'|translate}}\" (click)=\"showMenuDropdown(false)\"></button>\r\n </div>\r\n <div class=\"offcanvas-body d-flex flex-column p-0\">\r\n <div class=\"px-3\">\r\n <div class=\"d-flex flex-wrap justify-content-between align-items-center mb-2 gap-1 px-2\">\r\n @if (fullName) {\r\n <div>\r\n <button (click)=\"logout()\" type=\"button\" class=\"btn btn-primary-dark\">\r\n {{'HEADER.LOGOUT'|translate}}\r\n </button>\r\n </div>\r\n <div>{{fullName}}</div>\r\n }\r\n @if (!fullName) {\r\n <div class=\"text-center\">\r\n <button type=\"button\" class=\"btn btn-primary-dark\" (click)=\"login()\" id=\"start-login\">{{'HEADER.LOGIN'|translate}}</button>\r\n </div>\r\n @if (navigation) {\r\n <a class=\"text-white\" href=\"{{navigation.createAccountLink}}?lang={{trans.currentLang}}&returnUrl={{url}}\">\r\n {{'HEADER.CREATE_USER'|translate}}\r\n </a>\r\n }\r\n }\r\n </div>\r\n <ul class=\"list-group list-group-flush border-top\">\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showReport?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <a class=\"py-1 text-white flex-grow-1\" href=\"{{navigation.report.url}}\">\r\n {{navigation.report.transId|translate}}\r\n </a>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showReport = !showReport\" attr.aria-controls=\"report-links\" attr.aria-expanded=\"{{showReport}}\">\r\n <span class=\"fas\" [ngClass]=\"showReport?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n @if (showReport) {\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" id=\"report-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <div class=\"d-flex\">\r\n <a href=\"{{navigation.checklist.url}}\" class=\"text-white flex-grow-1\">\r\n {{navigation.checklist.transId|translate}}\r\n </a>\r\n </div>\r\n </li>\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.report.url}}\">\r\n {{'HEADER.REPORT'|translate}}\r\n </a>\r\n <li class=\"d-block py-1\">\r\n <div class=\"d-flex \">\r\n <a href=\"{{navigation.wanted.url}}\" class=\"text-white flex-grow-1\">\r\n {{navigation.wanted.transId|translate}}\r\n </a>\r\n </div>\r\n </li>\r\n </ul>\r\n </li>\r\n }\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showObservations?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <a class=\"py-1 text-white flex-grow-1\" href=\"{{navigation.observations.url}}\">\r\n {{navigation.observations.transId|translate}}\r\n </a>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showObservations = !showObservations\" attr.aria-controls=\"observations-links\" attr.aria-expanded=\"{{showObservations}}\">\r\n <span class=\"fas\" [ngClass]=\"showObservations?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n @if (showObservations) {\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" id=\"observations-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.observations.url}}\">\r\n {{'HEADER.TODAYS_OBSERVATIONS'|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-0\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.fieldDiary.url}}\">\r\n {{'HEADER.FIELD_DIARY'|translate}}\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n }\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showSubs?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <button class=\"btn btn-link p-0 text-white w-100 text-start\" (click)=\"showSubs = !showSubs\">\r\n {{navigation.subcriptions.transId|translate}}\r\n </button>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showSubs = !showSubs\" attr.aria-controls=\"subs-links\" attr.aria-expanded=\"{{showSubs}}\">\r\n <span class=\"fas\" [ngClass]=\"showSubs?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n @if (showSubs) {\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" id=\"subs-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.subcriptions.url}}\">\r\n {{'HEADER.MY_SUBSCRIPTIONS'|translate}}\r\n </a>\r\n </li>\r\n <li class=\"py-1\">\r\n <div class=\"d-flex\">\r\n <a href=\"{{navigation.events.url}}\" class=\"text-white flex-grow-1\">\r\n {{navigation.events.transId|translate}}\r\n </a>\r\n </div>\r\n </li>\r\n </ul>\r\n </li>\r\n }\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.fyndregler.url}}\">\r\n {{navigation.fyndregler.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block fw-bold py-1 text-white\" [href]=\"navigation.artportalenUrl\">\r\n Artportalen.se\r\n <i class=\"fas fa-external-link\"></i>\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block fw-bold py-1 text-white\" [href]=\"navigation.artfaktaUrl\">\r\n {{'HEADER.ARTFAKTA'|translate}}\r\n <i class=\"fas fa-external-link\"></i>\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <small class=\"d-block text-white pt-1\">\r\n {{'HEADER.DEVELOPED_BY'|translate}}\r\n <a href=\"https://www.artdatabanken.se/\" class=\"text-white\">\r\n {{'HEADER.ARTDATABANKEN'|translate}}\r\n <span class=\"fas fa-external-link\"></span>\r\n </a>\r\n </small>\r\n </li>\r\n </ul>\r\n </div>\r\n <div id=\"pattern\" class=\"flex-grow-1\"> </div>\r\n </div>\r\n </div>\r\n }\r\n</div>", dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[adbClickOutside]", outputs: ["adbClickOutside"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
433
431
|
}
|
|
434
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ArtportalenNavComponent, decorators: [{
|
|
435
433
|
type: Component,
|
|
436
|
-
args: [{ selector: 'adb-nav', standalone: false, template: "<div class=\"bg-primary adb-main-header\" (adbClickOutside)=\"showMenuDropdown(false);\">\r\n <header class=\"container-lg\" *ngIf=\"translationFinished\">\r\n <div [attr.id]=\"showPattern?'banner':''\" class=\"d-flex align-items-center gap-2\">\r\n <nav class=\"d-flex flex-grow-1 align-items-center pe-2 py-2 gap-1\">\r\n <a class=\"d-flex text-white text-decoration-none d-flex gap-2\" href=\"https://www.artdatabanken.se/\" target=\"new\">\r\n <img style=\"height: 2rem;\" src=\"/assets/images/slu.svg\" alt=\"logo\">\r\n <div class=\"border-end d-none d-sm-block\"></div>\r\n <img class=\"d-none d-sm-block align-self-center pe-5\" style=\"height: 0.7rem;\" src=\"/assets/images/artdatabanken.svg\" alt=\"logo\">\r\n </a>\r\n <a routerLink=\"/\" class=\"text-white text-decoration-none fs-1 fw-bold\">Artfakta</a>\r\n </nav>\r\n <div class=\"d-flex align-items-center gap-2\">\r\n <div><ng-content></ng-content></div>\r\n <div>\r\n <button class=\"btn btn-primary-dark btn-lg\" type=\"button\"\r\n attr.aria-label=\"{{'ADB_HEADER.MENY'|translate}}\"\r\n (click)=\"showMenuDropdown(!showNavMenu)\">\r\n <i class=\"fas fa-bars\"></i>\r\n <small class=\"d-none ms-2 d-md-inline-block\">{{'ADB_HEADER.MENY'|translate}}</small>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </header>\r\n <div *ngIf=\"navigation\" role=\"dialog\" class=\"offcanvas offcanvas-end bg-primary text-white\"\r\n [class.show]=\"showNavMenu\" tabindex=\"-1\" aria-labelledby=\"offcanvasNav\">\r\n <div class=\"offcanvas-header\">\r\n <h1 class=\"offcanvas-title h-section mb-0\" id=\"offcanvasNav\">Artfakta</h1>\r\n <button type=\"button\" class=\"btn-close btn-close-white\" attr.aria-label=\"{{'CLOSE'|translate}}\" (click)=\"showMenuDropdown(false)\"></button>\r\n </div>\r\n <div tabindex=\"-1\" class=\"offcanvas-body d-flex flex-column p-0\">\r\n <div class=\"px-3\">\r\n <div class=\"d-flex flex-wrap justify-content-between align-items-center mb-2 gap-1 px-2\">\r\n <ng-container *ngIf=\"initials\">\r\n <div>\r\n <button (click)=\"logout()\" type=\"button\" class=\"btn btn-primary-dark\">\r\n {{'ADB_HEADER.LOGOUT'|translate}}\r\n </button>\r\n </div>\r\n <div>{{fullName}}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!initials\">\r\n <div class=\"text-center\">\r\n <button type=\"button\" class=\"btn btn-primary-dark\" (click)=\"login()\" id=\"start-login\">{{'ADB_HEADER.LOGIN'|translate}}</button>\r\n </div>\r\n <a *ngIf=\"navigation\" class=\"text-white\" 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 <ul class=\"list-group list-group-flush border-top\">\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showArtfakta?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.artinfo.url}}\">\r\n {{navigation.artinfo.transId|translate}}\r\n </a>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showArtfakta = !showArtfakta\"\r\n attr.aria-controls=\"artfakta-links\" attr.aria-expanded=\"{{showArtfakta}}\">\r\n <span class=\"fas\" [ngClass]=\"showArtfakta?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" *ngIf=\"showArtfakta\" id=\"artfakta-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <a href=\"{{navigation.keys.url}}\" class=\"text-white\">\r\n {{navigation.keys.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-1\">\r\n <a href=\"{{navigation.mySpecies.url}}\" class=\"text-white\">\r\n {{navigation.mySpecies.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-1\">\r\n <a href=\"{{navigation.lists.url}}\" class=\"text-white\">\r\n {{navigation.lists.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-1\">\r\n <a href=\"{{navigation.imageRec.url}}\" class=\"text-white\">\r\n {{navigation.imageRec.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-1\">\r\n <a href=\"{{navigation.filter.url}}\" class=\"text-white\">\r\n {{navigation.filter.transId|translate}}\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.observations.url}}?lang={{trans.currentLang}}\">\r\n {{navigation.observations.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showNOS?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <button class=\"btn btn-link p-0 text-white w-100 text-start\" (click)=\"showNOS = !showNOS\">\r\n {{navigation.nameAndRelationship.transId|translate}}\r\n </button>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showNOS = !showNOS\" attr.aria-controls=\"nos-links\" attr.aria-expanded=\"{{showNOS}}\">\r\n <span class=\"fas\" [ngClass]=\"showNOS?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" *ngIf=\"showNOS\" id=\"nos-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1 text-white\">\r\n <a href=\"{{navigation.nameSearch.url}}\" class=\"text-white\">\r\n {{navigation.nameSearch.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-1 text-white\">\r\n <a href=\"{{navigation.match.url}}\" class=\"text-white\">\r\n {{navigation.match.transId|translate}}\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block py-1 text-white\" [href]=\"navigation.about.url\">{{navigation.about.transId|translate}}</a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block fw-bold py-1 text-white\" [href]=\"navigation.artportalenUrl\">\r\n {{'ADB_HEADER.ARTPORTALEN_TITLE'|translate}}\r\n <i class=\"fas fa-external-link\"></i>\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <small class=\"d-block text-white pt-1\">\r\n {{'ADB_HEADER.DEVELOPED_BY'|translate}}\r\n <a href=\"https://www.artdatabanken.se/\" class=\"text-white\"><u class=\"me-1\">{{'ADB_HEADER.ARTDATABANKEN'|translate}}</u> <span class=\"fas fa-external-link\"></span></a>\r\n </small>\r\n </li>\r\n </ul>\r\n </div>\r\n <div id=\"pattern\" class=\"flex-grow-1\">\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</div>" }]
|
|
437
|
-
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i1.Router }, { type:
|
|
434
|
+
args: [{ selector: 'adb-artportalen-nav', standalone: false, template: "<div class=\"bg-primary adb-main-header position-static\" (adbClickOutside)=\"showMenuDropdown(false);\">\r\n @if (translationFinished) {\r\n <header class=\"container-lg px-0\">\r\n <div [attr.id]=\"showPattern?'banner':''\" class=\"px-1 d-flex flex-wrap align-items-center gap-2\">\r\n <nav class=\"d-flex flex-grow-1 align-items-center pe-2 py-2 gap-2\">\r\n <a class=\"d-flex text-white text-decoration-none d-flex gap-2\" href=\"https://www.artdatabanken.se/\" target=\"new\">\r\n <img style=\"height: 2rem;\" src=\"/assets/images/slu.svg\" alt=\"logo\">\r\n <div class=\"border-end d-none d-sm-block\"></div>\r\n <img class=\"d-none d-sm-block align-self-center pe-5\" style=\"height: 0.7rem;\" src=\"/assets/images/artdatabanken.svg\" alt=\"logo\">\r\n </a>\r\n <a [href]=\"navigation?.home\" class=\"text-white text-decoration-none fs-1 fw-bold\">{{'HEADER.TITLE'|translate}}</a>\r\n </nav>\r\n <div class=\"ms-auto d-flex align-items-center gap-2\">\r\n <div><ng-content></ng-content></div>\r\n <div>\r\n <button class=\"d-none d-md-block btn btn-primary-dark btn-lg\" type=\"button\"\r\n title=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\"\r\n attr.aria-label=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\"\r\n (click)=\"onUserClick()\">\r\n <small>{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}</small>\r\n </button>\r\n </div>\r\n <div>\r\n <button class=\"btn btn-primary-dark btn-lg\" type=\"button\" title=\"{{'HEADER.MENY'|translate}}\" attr.aria-label=\"{{'HEADER.MENY'|translate}}\" (click)=\"showMenuDropdown(!showNavMenu)\">\r\n <i class=\"fas fa-bars\"></i>\r\n <small class=\"ms-2 d-none d-md-inline-block\">{{'HEADER.MENY'|translate}}</small>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex justify-content-center d-md-none p-2 border-dark border-top\">\r\n <button class=\"btn btn-primary-dark btn-lg\" type=\"button\"\r\n title=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\"\r\n attr.aria-label=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\" (click)=\"onUserClick()\">\r\n <small>{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}</small>\r\n </button>\r\n </div>\r\n </header>\r\n }\r\n @if (navigation) {\r\n <div role=\"dialog\" class=\"offcanvas offcanvas-end bg-primary text-white\" [class.show]=\"showNavMenu\" tabindex=\"-1\" aria-labelledby=\"offcanvasNav\">\r\n <div class=\"offcanvas-header\">\r\n <h1 class=\"offcanvas-title h-section mb-0\" id=\"offcanvasNav\"><a [href]=\"navigation.home\" class=\"text-white text-decoration-none\">{{'HEADER.TITLE'|translate}}</a></h1>\r\n <button type=\"button\" class=\"btn-close btn-close-white\" attr.aria-label=\"{{'CLOSE'|translate}}\" (click)=\"showMenuDropdown(false)\"></button>\r\n </div>\r\n <div class=\"offcanvas-body d-flex flex-column p-0\">\r\n <div class=\"px-3\">\r\n <div class=\"d-flex flex-wrap justify-content-between align-items-center mb-2 gap-1 px-2\">\r\n @if (fullName) {\r\n <div>\r\n <button (click)=\"logout()\" type=\"button\" class=\"btn btn-primary-dark\">\r\n {{'HEADER.LOGOUT'|translate}}\r\n </button>\r\n </div>\r\n <div>{{fullName}}</div>\r\n }\r\n @if (!fullName) {\r\n <div class=\"text-center\">\r\n <button type=\"button\" class=\"btn btn-primary-dark\" (click)=\"login()\" id=\"start-login\">{{'HEADER.LOGIN'|translate}}</button>\r\n </div>\r\n @if (navigation) {\r\n <a class=\"text-white\" href=\"{{navigation.createAccountLink}}?lang={{trans.currentLang}}&returnUrl={{url}}\">\r\n {{'HEADER.CREATE_USER'|translate}}\r\n </a>\r\n }\r\n }\r\n </div>\r\n <ul class=\"list-group list-group-flush border-top\">\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showReport?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <a class=\"py-1 text-white flex-grow-1\" href=\"{{navigation.report.url}}\">\r\n {{navigation.report.transId|translate}}\r\n </a>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showReport = !showReport\" attr.aria-controls=\"report-links\" attr.aria-expanded=\"{{showReport}}\">\r\n <span class=\"fas\" [ngClass]=\"showReport?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n @if (showReport) {\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" id=\"report-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <div class=\"d-flex\">\r\n <a href=\"{{navigation.checklist.url}}\" class=\"text-white flex-grow-1\">\r\n {{navigation.checklist.transId|translate}}\r\n </a>\r\n </div>\r\n </li>\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.report.url}}\">\r\n {{'HEADER.REPORT'|translate}}\r\n </a>\r\n <li class=\"d-block py-1\">\r\n <div class=\"d-flex \">\r\n <a href=\"{{navigation.wanted.url}}\" class=\"text-white flex-grow-1\">\r\n {{navigation.wanted.transId|translate}}\r\n </a>\r\n </div>\r\n </li>\r\n </ul>\r\n </li>\r\n }\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showObservations?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <a class=\"py-1 text-white flex-grow-1\" href=\"{{navigation.observations.url}}\">\r\n {{navigation.observations.transId|translate}}\r\n </a>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showObservations = !showObservations\" attr.aria-controls=\"observations-links\" attr.aria-expanded=\"{{showObservations}}\">\r\n <span class=\"fas\" [ngClass]=\"showObservations?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n @if (showObservations) {\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" id=\"observations-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.observations.url}}\">\r\n {{'HEADER.TODAYS_OBSERVATIONS'|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-0\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.fieldDiary.url}}\">\r\n {{'HEADER.FIELD_DIARY'|translate}}\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n }\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showSubs?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <button class=\"btn btn-link p-0 text-white w-100 text-start\" (click)=\"showSubs = !showSubs\">\r\n {{navigation.subcriptions.transId|translate}}\r\n </button>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showSubs = !showSubs\" attr.aria-controls=\"subs-links\" attr.aria-expanded=\"{{showSubs}}\">\r\n <span class=\"fas\" [ngClass]=\"showSubs?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n @if (showSubs) {\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" id=\"subs-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.subcriptions.url}}\">\r\n {{'HEADER.MY_SUBSCRIPTIONS'|translate}}\r\n </a>\r\n </li>\r\n <li class=\"py-1\">\r\n <div class=\"d-flex\">\r\n <a href=\"{{navigation.events.url}}\" class=\"text-white flex-grow-1\">\r\n {{navigation.events.transId|translate}}\r\n </a>\r\n </div>\r\n </li>\r\n </ul>\r\n </li>\r\n }\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.fyndregler.url}}\">\r\n {{navigation.fyndregler.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block fw-bold py-1 text-white\" [href]=\"navigation.artportalenUrl\">\r\n Artportalen.se\r\n <i class=\"fas fa-external-link\"></i>\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block fw-bold py-1 text-white\" [href]=\"navigation.artfaktaUrl\">\r\n {{'HEADER.ARTFAKTA'|translate}}\r\n <i class=\"fas fa-external-link\"></i>\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <small class=\"d-block text-white pt-1\">\r\n {{'HEADER.DEVELOPED_BY'|translate}}\r\n <a href=\"https://www.artdatabanken.se/\" class=\"text-white\">\r\n {{'HEADER.ARTDATABANKEN'|translate}}\r\n <span class=\"fas fa-external-link\"></span>\r\n </a>\r\n </small>\r\n </li>\r\n </ul>\r\n </div>\r\n <div id=\"pattern\" class=\"flex-grow-1\"> </div>\r\n </div>\r\n </div>\r\n }\r\n</div>" }]
|
|
435
|
+
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i1.Router }, { type: i1$1.TranslateService }, { type: EnvironmentService }], propDecorators: { loginClicked: [{
|
|
438
436
|
type: Output
|
|
439
437
|
}], logoutClicked: [{
|
|
440
438
|
type: Output
|
|
@@ -444,15 +442,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
444
442
|
type: Input
|
|
445
443
|
}], userName: [{
|
|
446
444
|
type: Input
|
|
447
|
-
}], artfakta: [{
|
|
448
|
-
type: Input
|
|
449
445
|
}] } });
|
|
450
446
|
|
|
451
447
|
class AdbDropdownService {
|
|
452
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
453
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
448
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDropdownService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
449
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDropdownService }); }
|
|
454
450
|
}
|
|
455
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
451
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDropdownService, decorators: [{
|
|
456
452
|
type: Injectable
|
|
457
453
|
}] });
|
|
458
454
|
|
|
@@ -517,10 +513,10 @@ class AdbDropdownDirective {
|
|
|
517
513
|
getId() {
|
|
518
514
|
return '' + Math.floor(Math.random() * Date.now());
|
|
519
515
|
}
|
|
520
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
521
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
516
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDropdownDirective, deps: [{ token: i0.ElementRef }, { token: AdbDropdownService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
517
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: AdbDropdownDirective, isStandalone: false, selector: "[adbDropdown]", inputs: { insideClick: "insideClick" }, outputs: { adbDropdown: "adbDropdown" }, host: { listeners: { "click": "onClick()", "document:click": "onCheckOutSideClick($event.target)" }, properties: { "id": "this.id", "attr.data-toggle": "this.dataToggle", "attr.aria-haspopup": "this.haspPopup", "attr.aria-expanded": "this.expanded", "attr.aria-controls": "this.dropId" } }, exportAs: ["adbDropdown"], ngImport: i0 }); }
|
|
522
518
|
}
|
|
523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
519
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDropdownDirective, decorators: [{
|
|
524
520
|
type: Directive,
|
|
525
521
|
args: [{
|
|
526
522
|
selector: '[adbDropdown]',
|
|
@@ -631,10 +627,10 @@ class AdbDropdown2Directive {
|
|
|
631
627
|
getId() {
|
|
632
628
|
return '' + Math.floor(Math.random() * Date.now());
|
|
633
629
|
}
|
|
634
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
635
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
630
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDropdown2Directive, deps: [{ token: i0.ElementRef }, { token: AdbDropdownService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
631
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: AdbDropdown2Directive, isStandalone: false, selector: "[adbDropdown2]", inputs: { insideClick: "insideClick" }, outputs: { adbDropdown: "adbDropdown" }, host: { listeners: { "click": "onClick()", "document:click": "onCheckOutSideClick($event.target)", "window:scroll": "onWindowScroll()" }, properties: { "id": "this.id", "attr.data-toggle": "this.dataToggle", "attr.aria-haspopup": "this.haspPopup", "attr.aria-expanded": "this.expanded", "attr.aria-controls": "this.dropId" } }, exportAs: ["adbDropdown"], ngImport: i0 }); }
|
|
636
632
|
}
|
|
637
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
633
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDropdown2Directive, decorators: [{
|
|
638
634
|
type: Directive,
|
|
639
635
|
args: [{
|
|
640
636
|
selector: '[adbDropdown2]',
|
|
@@ -672,11 +668,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
672
668
|
}] } });
|
|
673
669
|
|
|
674
670
|
class AdbDropdownModule {
|
|
675
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
676
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
677
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
671
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
672
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AdbDropdownModule, declarations: [AdbDropdownDirective, AdbDropdown2Directive], imports: [CommonModule, i1$1.TranslateModule, AdbDirectivesModule], exports: [AdbDropdownDirective, AdbDropdown2Directive] }); }
|
|
673
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDropdownModule, providers: [AdbDropdownService], imports: [CommonModule, TranslateModule.forChild(), AdbDirectivesModule] }); }
|
|
678
674
|
}
|
|
679
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
675
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDropdownModule, decorators: [{
|
|
680
676
|
type: NgModule,
|
|
681
677
|
args: [{
|
|
682
678
|
imports: [CommonModule, TranslateModule.forChild(), AdbDirectivesModule],
|
|
@@ -716,10 +712,10 @@ class InfiniteScrollComponent {
|
|
|
716
712
|
this._intersectionObserver.disconnect();
|
|
717
713
|
}
|
|
718
714
|
}
|
|
719
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
720
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
715
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: InfiniteScrollComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
716
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: InfiniteScrollComponent, isStandalone: false, selector: "[onVisible]", outputs: { onVisible: "onVisible", onHidden: "onHidden" }, host: { properties: { "style.height": "this.height" } }, ngImport: i0 }); }
|
|
721
717
|
}
|
|
722
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: InfiniteScrollComponent, decorators: [{
|
|
723
719
|
type: Directive,
|
|
724
720
|
args: [{
|
|
725
721
|
selector: "[onVisible]",
|
|
@@ -775,10 +771,10 @@ class PagerBaseDirective {
|
|
|
775
771
|
this.amountOfPages = 0;
|
|
776
772
|
}
|
|
777
773
|
}
|
|
778
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
779
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
774
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PagerBaseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
775
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: PagerBaseDirective, isStandalone: true, inputs: { setTotalCount: ["totalCount", "setTotalCount"], setLimit: ["limit", "setLimit"] }, ngImport: i0 }); }
|
|
780
776
|
}
|
|
781
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
777
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PagerBaseDirective, decorators: [{
|
|
782
778
|
type: Directive
|
|
783
779
|
}], propDecorators: { setTotalCount: [{
|
|
784
780
|
type: Input,
|
|
@@ -823,12 +819,12 @@ class PagerComponent extends PagerBaseDirective {
|
|
|
823
819
|
ngOnDestroy() {
|
|
824
820
|
this.subscription.unsubscribe();
|
|
825
821
|
}
|
|
826
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
827
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
822
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PagerComponent, deps: [{ token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
823
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: PagerComponent, isStandalone: false, selector: "adb-pager-nav", inputs: { offsetName: "offsetName", infiniteLimit: "infiniteLimit" }, usesInheritance: true, ngImport: i0, template: "@if (pages&&pages.length>1&¤tPage<=amountOfPages) {\r\n <nav class=\"d-flex justify-content-end my-1\">\r\n <ul class=\"pagination flex-wrap mb-0\">\r\n <li class=\"page-item\">\r\n <a class=\"page-link\" [routerLink]=\"[]\" [queryParams]=\"params.first\" queryParamsHandling=\"merge\"\r\n [ngClass]=\"{'pe-none opacity-50':currentPage===1}\" [attr.aria-disabled]=\"currentPage===1\">\r\n <i class=\"fas fa-chevron-double-left\"></i>\r\n </a>\r\n </li>\r\n <li class=\"page-item\">\r\n <a class=\"page-link\" [routerLink]=\"[]\" [queryParams]=\"params.prev\" queryParamsHandling=\"merge\"\r\n [ngClass]=\"{'pe-none opacity-50':currentPage===1}\" [attr.aria-disabled]=\"currentPage===1\">\r\n <i class=\"fas fa-chevron-left\"></i>\r\n </a>\r\n </li>\r\n @for (page of params.pages; track page) {\r\n <li class=\"page-item\" [class.active]=\"currentPage===page.name\">\r\n <a class=\"page-link\" [routerLink]=\"[]\" [queryParams]=\"page.params\"\r\n queryParamsHandling=\"merge\">{{page.name}}</a>\r\n </li>\r\n }\r\n <li class=\"page-item\">\r\n <a class=\"page-link\" [routerLink]=\"[]\" [queryParams]=\"params.next\" queryParamsHandling=\"merge\"\r\n [ngClass]=\"{'pe-none opacity-50':currentPage>=amountOfPages}\" [attr.aria-disabled]=\"currentPage>=amountOfPages\">\r\n <i class=\"fas fa-chevron-right\"></i>\r\n </a>\r\n </li>\r\n @if (!infiniteLimit) {\r\n @if ((amountOfPages-1)*limit<10000) {\r\n <li class=\"page-item\">\r\n <a class=\"page-link\" [routerLink]=\"[]\" [queryParams]=\"params.last\" queryParamsHandling=\"merge\"\r\n [attr.aria-disabled]=\"currentPage>=amountOfPages\" [ngClass]=\"{'pe-none opacity-50':currentPage>=amountOfPages}\">\r\n <i class=\"fas fa-chevron-double-right\"></i>\r\n </a>\r\n </li>\r\n }\r\n }\r\n @if (infiniteLimit) {\r\n <li class=\"page-item\">\r\n <a class=\"page-link\" [routerLink]=\"[]\" [queryParams]=\"params.last\" queryParamsHandling=\"merge\"\r\n [attr.aria-disabled]=\"currentPage>=amountOfPages\" [ngClass]=\"{'pe-none opacity-50':currentPage>=amountOfPages}\">\r\n <i class=\"fas fa-chevron-double-right\"></i>\r\n </a>\r\n </li>\r\n }\r\n </ul>\r\n </nav>\r\n}", dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
|
828
824
|
}
|
|
829
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PagerComponent, decorators: [{
|
|
830
826
|
type: Component,
|
|
831
|
-
args: [{ selector: 'adb-pager-nav', standalone: false, template: "
|
|
827
|
+
args: [{ selector: 'adb-pager-nav', standalone: false, template: "@if (pages&&pages.length>1&¤tPage<=amountOfPages) {\r\n <nav class=\"d-flex justify-content-end my-1\">\r\n <ul class=\"pagination flex-wrap mb-0\">\r\n <li class=\"page-item\">\r\n <a class=\"page-link\" [routerLink]=\"[]\" [queryParams]=\"params.first\" queryParamsHandling=\"merge\"\r\n [ngClass]=\"{'pe-none opacity-50':currentPage===1}\" [attr.aria-disabled]=\"currentPage===1\">\r\n <i class=\"fas fa-chevron-double-left\"></i>\r\n </a>\r\n </li>\r\n <li class=\"page-item\">\r\n <a class=\"page-link\" [routerLink]=\"[]\" [queryParams]=\"params.prev\" queryParamsHandling=\"merge\"\r\n [ngClass]=\"{'pe-none opacity-50':currentPage===1}\" [attr.aria-disabled]=\"currentPage===1\">\r\n <i class=\"fas fa-chevron-left\"></i>\r\n </a>\r\n </li>\r\n @for (page of params.pages; track page) {\r\n <li class=\"page-item\" [class.active]=\"currentPage===page.name\">\r\n <a class=\"page-link\" [routerLink]=\"[]\" [queryParams]=\"page.params\"\r\n queryParamsHandling=\"merge\">{{page.name}}</a>\r\n </li>\r\n }\r\n <li class=\"page-item\">\r\n <a class=\"page-link\" [routerLink]=\"[]\" [queryParams]=\"params.next\" queryParamsHandling=\"merge\"\r\n [ngClass]=\"{'pe-none opacity-50':currentPage>=amountOfPages}\" [attr.aria-disabled]=\"currentPage>=amountOfPages\">\r\n <i class=\"fas fa-chevron-right\"></i>\r\n </a>\r\n </li>\r\n @if (!infiniteLimit) {\r\n @if ((amountOfPages-1)*limit<10000) {\r\n <li class=\"page-item\">\r\n <a class=\"page-link\" [routerLink]=\"[]\" [queryParams]=\"params.last\" queryParamsHandling=\"merge\"\r\n [attr.aria-disabled]=\"currentPage>=amountOfPages\" [ngClass]=\"{'pe-none opacity-50':currentPage>=amountOfPages}\">\r\n <i class=\"fas fa-chevron-double-right\"></i>\r\n </a>\r\n </li>\r\n }\r\n }\r\n @if (infiniteLimit) {\r\n <li class=\"page-item\">\r\n <a class=\"page-link\" [routerLink]=\"[]\" [queryParams]=\"params.last\" queryParamsHandling=\"merge\"\r\n [attr.aria-disabled]=\"currentPage>=amountOfPages\" [ngClass]=\"{'pe-none opacity-50':currentPage>=amountOfPages}\">\r\n <i class=\"fas fa-chevron-double-right\"></i>\r\n </a>\r\n </li>\r\n }\r\n </ul>\r\n </nav>\r\n}" }]
|
|
832
828
|
}], ctorParameters: () => [{ type: i1.ActivatedRoute }], propDecorators: { offsetName: [{
|
|
833
829
|
type: Input
|
|
834
830
|
}], infiniteLimit: [{
|
|
@@ -868,12 +864,12 @@ class PagerInlineComponent extends PagerBaseDirective {
|
|
|
868
864
|
this.pageChanged.emit(this.currentPage - 1);
|
|
869
865
|
this.calculatePages();
|
|
870
866
|
}
|
|
871
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
872
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
867
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PagerInlineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
868
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: PagerInlineComponent, isStandalone: false, selector: "adb-pager", inputs: { infiniteLimit: "infiniteLimit" }, outputs: { pageChanged: "pageChanged" }, usesInheritance: true, ngImport: i0, template: "@if (pages&&pages.length>1&¤tPage<=amountOfPages) {\r\n <nav class=\"d-flex justify-content-end pr-2 my-1\">\r\n <ul class=\"pagination flex-wrap\">\r\n <li class=\"page-item\">\r\n <button class=\"page-link\" (click)=\"onFirstClick()\" [ngClass]=\"currentPage==1?'opacity-50 pe-none':''\" [disabled]=\"currentPage==1\">\r\n <i class=\"fas fa-chevron-double-left\"></i>\r\n </button>\r\n </li>\r\n <li class=\"page-item\">\r\n <button class=\"page-link\" (click)=\"onPrevClick()\" [ngClass]=\"currentPage==1?'opacity-50 pe-none':''\" [disabled]=\"currentPage==1\">\r\n <i class=\"fas fa-chevron-left\"></i>\r\n </button>\r\n </li>\r\n @for (page of pages; track page) {\r\n <li class=\"page-item\" [class.active]=\"currentPage==page\">\r\n <button class=\"page-link\" (click)=\"onPageClick(page)\">\r\n {{page}}\r\n </button>\r\n </li>\r\n }\r\n <li class=\"page-item\">\r\n <button class=\"page-link\" (click)=\"onNextClick()\" [ngClass]=\"currentPage>=amountOfPages?'opacity-50 pe-none':''\" [disabled]=\"currentPage>=amountOfPages\">\r\n <i class=\"fas fa-chevron-right\"></i>\r\n </button>\r\n </li>\r\n @if (!infiniteLimit) {\r\n @if ((amountOfPages-1)*limit<10000) {\r\n <li class=\"page-item\">\r\n <button class=\"page-link\" (click)=\"onLastClick()\" [ngClass]=\"currentPage>=amountOfPages?'opacity-50 pe-none':''\" [disabled]=\"currentPage>=amountOfPages\">\r\n <i class=\"fas fa-chevron-double-right\"></i>\r\n </button>\r\n </li>\r\n }\r\n }\r\n @if (infiniteLimit) {\r\n <li class=\"page-item\">\r\n <button class=\"page-link\" (click)=\"onLastClick()\" [ngClass]=\"currentPage>=amountOfPages?'opacity-50 pe-none':''\" [disabled]=\"currentPage>=amountOfPages\">\r\n <i class=\"fas fa-chevron-double-right\"></i>\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n </nav>\r\n}\r\n", dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
873
869
|
}
|
|
874
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PagerInlineComponent, decorators: [{
|
|
875
871
|
type: Component,
|
|
876
|
-
args: [{ selector: 'adb-pager', standalone: false, template: "
|
|
872
|
+
args: [{ selector: 'adb-pager', standalone: false, template: "@if (pages&&pages.length>1&¤tPage<=amountOfPages) {\r\n <nav class=\"d-flex justify-content-end pr-2 my-1\">\r\n <ul class=\"pagination flex-wrap\">\r\n <li class=\"page-item\">\r\n <button class=\"page-link\" (click)=\"onFirstClick()\" [ngClass]=\"currentPage==1?'opacity-50 pe-none':''\" [disabled]=\"currentPage==1\">\r\n <i class=\"fas fa-chevron-double-left\"></i>\r\n </button>\r\n </li>\r\n <li class=\"page-item\">\r\n <button class=\"page-link\" (click)=\"onPrevClick()\" [ngClass]=\"currentPage==1?'opacity-50 pe-none':''\" [disabled]=\"currentPage==1\">\r\n <i class=\"fas fa-chevron-left\"></i>\r\n </button>\r\n </li>\r\n @for (page of pages; track page) {\r\n <li class=\"page-item\" [class.active]=\"currentPage==page\">\r\n <button class=\"page-link\" (click)=\"onPageClick(page)\">\r\n {{page}}\r\n </button>\r\n </li>\r\n }\r\n <li class=\"page-item\">\r\n <button class=\"page-link\" (click)=\"onNextClick()\" [ngClass]=\"currentPage>=amountOfPages?'opacity-50 pe-none':''\" [disabled]=\"currentPage>=amountOfPages\">\r\n <i class=\"fas fa-chevron-right\"></i>\r\n </button>\r\n </li>\r\n @if (!infiniteLimit) {\r\n @if ((amountOfPages-1)*limit<10000) {\r\n <li class=\"page-item\">\r\n <button class=\"page-link\" (click)=\"onLastClick()\" [ngClass]=\"currentPage>=amountOfPages?'opacity-50 pe-none':''\" [disabled]=\"currentPage>=amountOfPages\">\r\n <i class=\"fas fa-chevron-double-right\"></i>\r\n </button>\r\n </li>\r\n }\r\n }\r\n @if (infiniteLimit) {\r\n <li class=\"page-item\">\r\n <button class=\"page-link\" (click)=\"onLastClick()\" [ngClass]=\"currentPage>=amountOfPages?'opacity-50 pe-none':''\" [disabled]=\"currentPage>=amountOfPages\">\r\n <i class=\"fas fa-chevron-double-right\"></i>\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n </nav>\r\n}\r\n" }]
|
|
877
873
|
}], ctorParameters: () => [], propDecorators: { pageChanged: [{
|
|
878
874
|
type: Output
|
|
879
875
|
}], infiniteLimit: [{
|
|
@@ -881,13 +877,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
881
877
|
}] } });
|
|
882
878
|
|
|
883
879
|
class AdbPagersModule {
|
|
884
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
885
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
880
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbPagersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
881
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AdbPagersModule, declarations: [InfiniteScrollComponent, PagerComponent, PagerInlineComponent], imports: [CommonModule,
|
|
886
882
|
RouterModule], exports: [InfiniteScrollComponent, PagerComponent, PagerInlineComponent] }); }
|
|
887
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
883
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbPagersModule, imports: [CommonModule,
|
|
888
884
|
RouterModule] }); }
|
|
889
885
|
}
|
|
890
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
886
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbPagersModule, decorators: [{
|
|
891
887
|
type: NgModule,
|
|
892
888
|
args: [{
|
|
893
889
|
imports: [
|
|
@@ -899,160 +895,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
899
895
|
}]
|
|
900
896
|
}] });
|
|
901
897
|
|
|
902
|
-
class ADBHeaderModule {
|
|
903
|
-
static forRoot(environment) {
|
|
904
|
-
return {
|
|
905
|
-
ngModule: ADBHeaderModule,
|
|
906
|
-
providers: [
|
|
907
|
-
EnvironmentService$1,
|
|
908
|
-
{
|
|
909
|
-
provide: 'env', // you can also use InjectionToken
|
|
910
|
-
useValue: environment
|
|
911
|
-
}
|
|
912
|
-
]
|
|
913
|
-
};
|
|
914
|
-
}
|
|
915
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: ADBHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
916
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.13", ngImport: i0, type: ADBHeaderModule, declarations: [ADBNavComponent], imports: [CommonModule,
|
|
917
|
-
RouterModule,
|
|
918
|
-
TranslateModule,
|
|
919
|
-
AdbDirectivesModule,
|
|
920
|
-
AdbDropdownModule,
|
|
921
|
-
AdbPagersModule], exports: [ADBNavComponent] }); }
|
|
922
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: ADBHeaderModule, providers: [provideHttpClient(withInterceptorsFromDi())], imports: [CommonModule,
|
|
923
|
-
RouterModule,
|
|
924
|
-
TranslateModule,
|
|
925
|
-
AdbDirectivesModule,
|
|
926
|
-
AdbDropdownModule,
|
|
927
|
-
AdbPagersModule] }); }
|
|
928
|
-
}
|
|
929
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: ADBHeaderModule, decorators: [{
|
|
930
|
-
type: NgModule,
|
|
931
|
-
args: [{ declarations: [ADBNavComponent],
|
|
932
|
-
exports: [ADBNavComponent], imports: [CommonModule,
|
|
933
|
-
RouterModule,
|
|
934
|
-
TranslateModule,
|
|
935
|
-
AdbDirectivesModule,
|
|
936
|
-
AdbDropdownModule,
|
|
937
|
-
AdbPagersModule], providers: [provideHttpClient(withInterceptorsFromDi())] }]
|
|
938
|
-
}] });
|
|
939
|
-
|
|
940
|
-
class EnvironmentService {
|
|
941
|
-
constructor(environment) {
|
|
942
|
-
this.environment = environment;
|
|
943
|
-
}
|
|
944
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: EnvironmentService, deps: [{ token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
945
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: EnvironmentService }); }
|
|
946
|
-
}
|
|
947
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: EnvironmentService, decorators: [{
|
|
948
|
-
type: Injectable
|
|
949
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
950
|
-
type: Inject,
|
|
951
|
-
args: ['env']
|
|
952
|
-
}] }] });
|
|
953
|
-
|
|
954
|
-
class ArtportalenNavComponent {
|
|
955
|
-
set userName(fullName) {
|
|
956
|
-
this.fullName = fullName;
|
|
957
|
-
}
|
|
958
|
-
;
|
|
959
|
-
constructor(httpClient, router, trans, envService) {
|
|
960
|
-
this.httpClient = httpClient;
|
|
961
|
-
this.router = router;
|
|
962
|
-
this.trans = trans;
|
|
963
|
-
this.envService = envService;
|
|
964
|
-
this.subscription = new Subscription();
|
|
965
|
-
this.loginClicked = new EventEmitter();
|
|
966
|
-
this.logoutClicked = new EventEmitter();
|
|
967
|
-
this.dropMenuChange = new EventEmitter();
|
|
968
|
-
this.showPattern = false;
|
|
969
|
-
this.translationFinished = false;
|
|
970
|
-
this.lastPosition = 0;
|
|
971
|
-
this.showNavMenu = false;
|
|
972
|
-
this.showUserMenu = false;
|
|
973
|
-
this.showReport = true;
|
|
974
|
-
this.showObservations = true;
|
|
975
|
-
this.showSubs = false;
|
|
976
|
-
}
|
|
977
|
-
ngOnInit() {
|
|
978
|
-
this.url = window.location.href;
|
|
979
|
-
const baseUrl = this.envService.environment.resourceUrl;
|
|
980
|
-
const url = '/assets/artportalen/links-ap3.json';
|
|
981
|
-
this.subscription.add(this.httpClient.get(baseUrl + url).subscribe(result => {
|
|
982
|
-
this.navigation = result;
|
|
983
|
-
}));
|
|
984
|
-
this.initTranslations(baseUrl);
|
|
985
|
-
this.router.events.subscribe((event) => {
|
|
986
|
-
if (event instanceof NavigationEnd) {
|
|
987
|
-
this.showNavMenu = false;
|
|
988
|
-
this.dropMenuChange.emit(this.showNavMenu);
|
|
989
|
-
}
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
showMenuDropdown(show) {
|
|
993
|
-
this.showUserMenu = false;
|
|
994
|
-
if (this.showNavMenu !== show) {
|
|
995
|
-
this.showNavMenu = show;
|
|
996
|
-
this.dropMenuChange.emit(show);
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
setLanguage(lang) {
|
|
1000
|
-
this.trans.use(lang);
|
|
1001
|
-
this.showNavMenu = false;
|
|
1002
|
-
this.dropMenuChange.emit(false);
|
|
1003
|
-
}
|
|
1004
|
-
onUserClick() {
|
|
1005
|
-
if (this.fullName) {
|
|
1006
|
-
this.logout();
|
|
1007
|
-
}
|
|
1008
|
-
else {
|
|
1009
|
-
this.login();
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
login() {
|
|
1013
|
-
this.loginClicked.emit();
|
|
1014
|
-
}
|
|
1015
|
-
logout() {
|
|
1016
|
-
this.logoutClicked.emit();
|
|
1017
|
-
}
|
|
1018
|
-
initTranslations(baseUrl) {
|
|
1019
|
-
if (this.trans.store.translations[this.trans.currentLang]) {
|
|
1020
|
-
this.loadTranslation(baseUrl, this.trans.currentLang);
|
|
1021
|
-
}
|
|
1022
|
-
this.subscription.add(this.trans.onLangChange.subscribe((event) => {
|
|
1023
|
-
this.translationFinished = false;
|
|
1024
|
-
this.loadTranslation(baseUrl, event.lang);
|
|
1025
|
-
}));
|
|
1026
|
-
}
|
|
1027
|
-
loadTranslation(baseUrl, lang) {
|
|
1028
|
-
//TODO: Prepare for diffents lang then en sv (en-GB) or add more files in devcomponentserver :)
|
|
1029
|
-
const url = baseUrl + `/assets/artportalen/i18n/${lang}.json`;
|
|
1030
|
-
this.subscription.add(this.httpClient.get(url).subscribe(translations => {
|
|
1031
|
-
this.trans.setTranslation(lang, translations, true);
|
|
1032
|
-
this.translationFinished = true;
|
|
1033
|
-
}));
|
|
1034
|
-
}
|
|
1035
|
-
ngOnDestroy() {
|
|
1036
|
-
this.subscription.unsubscribe();
|
|
1037
|
-
}
|
|
1038
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: ArtportalenNavComponent, deps: [{ token: i1$2.HttpClient }, { token: i1.Router }, { token: i1$1.TranslateService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1039
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.13", type: ArtportalenNavComponent, isStandalone: false, selector: "adb-artportalen-nav", inputs: { showPattern: "showPattern", userName: "userName" }, outputs: { loginClicked: "loginClicked", logoutClicked: "logoutClicked", dropMenuChange: "dropMenuChange" }, ngImport: i0, template: "<div class=\"bg-primary adb-main-header position-static\" (adbClickOutside)=\"showMenuDropdown(false);\">\r\n <header class=\"container-lg px-0\" *ngIf=\"translationFinished\">\r\n <div [attr.id]=\"showPattern?'banner':''\" class=\"px-1 d-flex flex-wrap align-items-center gap-2\">\r\n <nav class=\"d-flex flex-grow-1 align-items-center pe-2 py-2 gap-2\">\r\n <a class=\"d-flex text-white text-decoration-none d-flex gap-2\" href=\"https://www.artdatabanken.se/\" target=\"new\">\r\n <img style=\"height: 2rem;\" src=\"/assets/images/slu.svg\" alt=\"logo\">\r\n <div class=\"border-end d-none d-sm-block\"></div>\r\n <img class=\"d-none d-sm-block align-self-center pe-5\" style=\"height: 0.7rem;\" src=\"/assets/images/artdatabanken.svg\" alt=\"logo\">\r\n </a>\r\n <a [href]=\"navigation?.home\" class=\"text-white text-decoration-none fs-1 fw-bold\">{{'HEADER.TITLE'|translate}}</a>\r\n </nav>\r\n <div class=\"ms-auto d-flex align-items-center gap-2\">\r\n <div><ng-content></ng-content></div>\r\n <div>\r\n <button class=\"d-none d-md-block btn btn-primary-dark btn-lg\" type=\"button\"\r\n title=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\"\r\n attr.aria-label=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\"\r\n (click)=\"onUserClick()\">\r\n <small>{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}</small>\r\n </button>\r\n </div>\r\n <div>\r\n <button class=\"btn btn-primary-dark btn-lg\" type=\"button\" title=\"{{'HEADER.MENY'|translate}}\" attr.aria-label=\"{{'HEADER.MENY'|translate}}\" (click)=\"showMenuDropdown(!showNavMenu)\">\r\n <i class=\"fas fa-bars\"></i>\r\n <small class=\"ms-2 d-none d-md-inline-block\">{{'HEADER.MENY'|translate}}</small>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex justify-content-center d-md-none p-2 border-dark border-top\">\r\n <button class=\"btn btn-primary-dark btn-lg\" type=\"button\"\r\n title=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\"\r\n attr.aria-label=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\" (click)=\"onUserClick()\">\r\n <small>{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}</small>\r\n </button>\r\n </div>\r\n </header>\r\n <div *ngIf=\"navigation\" role=\"dialog\" class=\"offcanvas offcanvas-end bg-primary text-white\" [class.show]=\"showNavMenu\" tabindex=\"-1\" aria-labelledby=\"offcanvasNav\">\r\n <div class=\"offcanvas-header\">\r\n <h1 class=\"offcanvas-title h-section mb-0\" id=\"offcanvasNav\"><a [href]=\"navigation.home\" class=\"text-white text-decoration-none\">{{'HEADER.TITLE'|translate}}</a></h1>\r\n <button type=\"button\" class=\"btn-close btn-close-white\" attr.aria-label=\"{{'CLOSE'|translate}}\" (click)=\"showMenuDropdown(false)\"></button>\r\n </div>\r\n <div class=\"offcanvas-body d-flex flex-column p-0\">\r\n <div class=\"px-3\">\r\n <div class=\"d-flex flex-wrap justify-content-between align-items-center mb-2 gap-1 px-2\">\r\n <ng-container *ngIf=\"fullName\">\r\n <div>\r\n <button (click)=\"logout()\" type=\"button\" class=\"btn btn-primary-dark\">\r\n {{'HEADER.LOGOUT'|translate}}\r\n </button>\r\n </div>\r\n <div>{{fullName}}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!fullName\">\r\n <div class=\"text-center\">\r\n <button type=\"button\" class=\"btn btn-primary-dark\" (click)=\"login()\" id=\"start-login\">{{'HEADER.LOGIN'|translate}}</button>\r\n </div>\r\n <a *ngIf=\"navigation\" class=\"text-white\" href=\"{{navigation.createAccountLink}}?lang={{trans.currentLang}}&returnUrl={{url}}\">\r\n {{'HEADER.CREATE_USER'|translate}}\r\n </a>\r\n </ng-container>\r\n </div>\r\n <ul class=\"list-group list-group-flush border-top\">\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showReport?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <a class=\"py-1 text-white flex-grow-1\" href=\"{{navigation.report.url}}\">\r\n {{navigation.report.transId|translate}}\r\n </a>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showReport = !showReport\" attr.aria-controls=\"report-links\" attr.aria-expanded=\"{{showReport}}\">\r\n <span class=\"fas\" [ngClass]=\"showReport?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" *ngIf=\"showReport\" id=\"report-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <div class=\"d-flex\">\r\n <a href=\"{{navigation.checklist.url}}\" class=\"text-white flex-grow-1\">\r\n {{navigation.checklist.transId|translate}}\r\n </a>\r\n </div>\r\n </li>\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.report.url}}\">\r\n {{'HEADER.REPORT'|translate}}\r\n </a>\r\n <li class=\"d-block py-1\">\r\n <div class=\"d-flex \">\r\n <a href=\"{{navigation.wanted.url}}\" class=\"text-white flex-grow-1\">\r\n {{navigation.wanted.transId|translate}}\r\n </a>\r\n </div>\r\n </li>\r\n </ul>\r\n </li>\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showObservations?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <a class=\"py-1 text-white flex-grow-1\" href=\"{{navigation.observations.url}}\">\r\n {{navigation.observations.transId|translate}}\r\n </a>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showObservations = !showObservations\" attr.aria-controls=\"observations-links\" attr.aria-expanded=\"{{showObservations}}\">\r\n <span class=\"fas\" [ngClass]=\"showObservations?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" *ngIf=\"showObservations\" id=\"observations-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.observations.url}}\">\r\n {{'HEADER.TODAYS_OBSERVATIONS'|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-0\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.fieldDiary.url}}\">\r\n {{'HEADER.FIELD_DIARY'|translate}}\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showSubs?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <button class=\"btn btn-link p-0 text-white w-100 text-start\" (click)=\"showSubs = !showSubs\">\r\n {{navigation.subcriptions.transId|translate}}\r\n </button>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showSubs = !showSubs\" attr.aria-controls=\"subs-links\" attr.aria-expanded=\"{{showSubs}}\">\r\n <span class=\"fas\" [ngClass]=\"showSubs?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" *ngIf=\"showSubs\" id=\"subs-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.subcriptions.url}}\">\r\n {{'HEADER.MY_SUBSCRIPTIONS'|translate}}\r\n </a>\r\n </li>\r\n <li class=\"py-1\">\r\n <div class=\"d-flex\">\r\n <a href=\"{{navigation.events.url}}\" class=\"text-white flex-grow-1\">\r\n {{navigation.events.transId|translate}}\r\n </a>\r\n </div>\r\n </li>\r\n </ul>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.fyndregler.url}}\">\r\n {{navigation.fyndregler.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block fw-bold py-1 text-white\" [href]=\"navigation.artportalenUrl\">\r\n Artportalen.se\r\n <i class=\"fas fa-external-link\"></i>\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block fw-bold py-1 text-white\" [href]=\"navigation.artfaktaUrl\">\r\n {{'HEADER.ARTFAKTA'|translate}}\r\n <i class=\"fas fa-external-link\"></i>\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <small class=\"d-block text-white pt-1\">\r\n {{'HEADER.DEVELOPED_BY'|translate}}\r\n <a href=\"https://www.artdatabanken.se/\" class=\"text-white\">\r\n {{'HEADER.ARTDATABANKEN'|translate}}\r\n <span class=\"fas fa-external-link\"></span>\r\n </a>\r\n </small>\r\n </li>\r\n </ul>\r\n </div>\r\n <div id=\"pattern\" class=\"flex-grow-1\"> </div>\r\n </div>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[adbClickOutside]", outputs: ["adbClickOutside"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
1040
|
-
}
|
|
1041
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: ArtportalenNavComponent, decorators: [{
|
|
1042
|
-
type: Component,
|
|
1043
|
-
args: [{ selector: 'adb-artportalen-nav', standalone: false, template: "<div class=\"bg-primary adb-main-header position-static\" (adbClickOutside)=\"showMenuDropdown(false);\">\r\n <header class=\"container-lg px-0\" *ngIf=\"translationFinished\">\r\n <div [attr.id]=\"showPattern?'banner':''\" class=\"px-1 d-flex flex-wrap align-items-center gap-2\">\r\n <nav class=\"d-flex flex-grow-1 align-items-center pe-2 py-2 gap-2\">\r\n <a class=\"d-flex text-white text-decoration-none d-flex gap-2\" href=\"https://www.artdatabanken.se/\" target=\"new\">\r\n <img style=\"height: 2rem;\" src=\"/assets/images/slu.svg\" alt=\"logo\">\r\n <div class=\"border-end d-none d-sm-block\"></div>\r\n <img class=\"d-none d-sm-block align-self-center pe-5\" style=\"height: 0.7rem;\" src=\"/assets/images/artdatabanken.svg\" alt=\"logo\">\r\n </a>\r\n <a [href]=\"navigation?.home\" class=\"text-white text-decoration-none fs-1 fw-bold\">{{'HEADER.TITLE'|translate}}</a>\r\n </nav>\r\n <div class=\"ms-auto d-flex align-items-center gap-2\">\r\n <div><ng-content></ng-content></div>\r\n <div>\r\n <button class=\"d-none d-md-block btn btn-primary-dark btn-lg\" type=\"button\"\r\n title=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\"\r\n attr.aria-label=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\"\r\n (click)=\"onUserClick()\">\r\n <small>{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}</small>\r\n </button>\r\n </div>\r\n <div>\r\n <button class=\"btn btn-primary-dark btn-lg\" type=\"button\" title=\"{{'HEADER.MENY'|translate}}\" attr.aria-label=\"{{'HEADER.MENY'|translate}}\" (click)=\"showMenuDropdown(!showNavMenu)\">\r\n <i class=\"fas fa-bars\"></i>\r\n <small class=\"ms-2 d-none d-md-inline-block\">{{'HEADER.MENY'|translate}}</small>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex justify-content-center d-md-none p-2 border-dark border-top\">\r\n <button class=\"btn btn-primary-dark btn-lg\" type=\"button\"\r\n title=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\"\r\n attr.aria-label=\"{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}\" (click)=\"onUserClick()\">\r\n <small>{{(!fullName ? 'HEADER.LOGIN' : 'HEADER.LOGOUT')|translate}}</small>\r\n </button>\r\n </div>\r\n </header>\r\n <div *ngIf=\"navigation\" role=\"dialog\" class=\"offcanvas offcanvas-end bg-primary text-white\" [class.show]=\"showNavMenu\" tabindex=\"-1\" aria-labelledby=\"offcanvasNav\">\r\n <div class=\"offcanvas-header\">\r\n <h1 class=\"offcanvas-title h-section mb-0\" id=\"offcanvasNav\"><a [href]=\"navigation.home\" class=\"text-white text-decoration-none\">{{'HEADER.TITLE'|translate}}</a></h1>\r\n <button type=\"button\" class=\"btn-close btn-close-white\" attr.aria-label=\"{{'CLOSE'|translate}}\" (click)=\"showMenuDropdown(false)\"></button>\r\n </div>\r\n <div class=\"offcanvas-body d-flex flex-column p-0\">\r\n <div class=\"px-3\">\r\n <div class=\"d-flex flex-wrap justify-content-between align-items-center mb-2 gap-1 px-2\">\r\n <ng-container *ngIf=\"fullName\">\r\n <div>\r\n <button (click)=\"logout()\" type=\"button\" class=\"btn btn-primary-dark\">\r\n {{'HEADER.LOGOUT'|translate}}\r\n </button>\r\n </div>\r\n <div>{{fullName}}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!fullName\">\r\n <div class=\"text-center\">\r\n <button type=\"button\" class=\"btn btn-primary-dark\" (click)=\"login()\" id=\"start-login\">{{'HEADER.LOGIN'|translate}}</button>\r\n </div>\r\n <a *ngIf=\"navigation\" class=\"text-white\" href=\"{{navigation.createAccountLink}}?lang={{trans.currentLang}}&returnUrl={{url}}\">\r\n {{'HEADER.CREATE_USER'|translate}}\r\n </a>\r\n </ng-container>\r\n </div>\r\n <ul class=\"list-group list-group-flush border-top\">\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showReport?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <a class=\"py-1 text-white flex-grow-1\" href=\"{{navigation.report.url}}\">\r\n {{navigation.report.transId|translate}}\r\n </a>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showReport = !showReport\" attr.aria-controls=\"report-links\" attr.aria-expanded=\"{{showReport}}\">\r\n <span class=\"fas\" [ngClass]=\"showReport?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" *ngIf=\"showReport\" id=\"report-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <div class=\"d-flex\">\r\n <a href=\"{{navigation.checklist.url}}\" class=\"text-white flex-grow-1\">\r\n {{navigation.checklist.transId|translate}}\r\n </a>\r\n </div>\r\n </li>\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.report.url}}\">\r\n {{'HEADER.REPORT'|translate}}\r\n </a>\r\n <li class=\"d-block py-1\">\r\n <div class=\"d-flex \">\r\n <a href=\"{{navigation.wanted.url}}\" class=\"text-white flex-grow-1\">\r\n {{navigation.wanted.transId|translate}}\r\n </a>\r\n </div>\r\n </li>\r\n </ul>\r\n </li>\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showObservations?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <a class=\"py-1 text-white flex-grow-1\" href=\"{{navigation.observations.url}}\">\r\n {{navigation.observations.transId|translate}}\r\n </a>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showObservations = !showObservations\" attr.aria-controls=\"observations-links\" attr.aria-expanded=\"{{showObservations}}\">\r\n <span class=\"fas\" [ngClass]=\"showObservations?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" *ngIf=\"showObservations\" id=\"observations-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.observations.url}}\">\r\n {{'HEADER.TODAYS_OBSERVATIONS'|translate}}\r\n </a>\r\n </li>\r\n <li class=\"d-block py-0\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.fieldDiary.url}}\">\r\n {{'HEADER.FIELD_DIARY'|translate}}\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li class=\"list-group-item bg-primary\" [ngClass]=\"showSubs?'border-bottom-0 pb-0':''\">\r\n <div class=\"d-flex justify-content-between gap-2\">\r\n <button class=\"btn btn-link p-0 text-white w-100 text-start\" (click)=\"showSubs = !showSubs\">\r\n {{navigation.subcriptions.transId|translate}}\r\n </button>\r\n <button class=\"btn btn-sm btn-primary\" (click)=\"showSubs = !showSubs\" attr.aria-controls=\"subs-links\" attr.aria-expanded=\"{{showSubs}}\">\r\n <span class=\"fas\" [ngClass]=\"showSubs?'fa-chevron-up':'fa-chevron-down'\"></span>\r\n </button>\r\n </div>\r\n </li>\r\n <li class=\"list-group-item bg-primary pt-0 px-3\" *ngIf=\"showSubs\" id=\"subs-links\">\r\n <ul class=\"list-unstyled\">\r\n <li class=\"d-block py-1\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.subcriptions.url}}\">\r\n {{'HEADER.MY_SUBSCRIPTIONS'|translate}}\r\n </a>\r\n </li>\r\n <li class=\"py-1\">\r\n <div class=\"d-flex\">\r\n <a href=\"{{navigation.events.url}}\" class=\"text-white flex-grow-1\">\r\n {{navigation.events.transId|translate}}\r\n </a>\r\n </div>\r\n </li>\r\n </ul>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block py-1 text-white\" href=\"{{navigation.fyndregler.url}}\">\r\n {{navigation.fyndregler.transId|translate}}\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block fw-bold py-1 text-white\" [href]=\"navigation.artportalenUrl\">\r\n Artportalen.se\r\n <i class=\"fas fa-external-link\"></i>\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <a class=\"d-block fw-bold py-1 text-white\" [href]=\"navigation.artfaktaUrl\">\r\n {{'HEADER.ARTFAKTA'|translate}}\r\n <i class=\"fas fa-external-link\"></i>\r\n </a>\r\n </li>\r\n <li class=\"list-group-item bg-primary\">\r\n <small class=\"d-block text-white pt-1\">\r\n {{'HEADER.DEVELOPED_BY'|translate}}\r\n <a href=\"https://www.artdatabanken.se/\" class=\"text-white\">\r\n {{'HEADER.ARTDATABANKEN'|translate}}\r\n <span class=\"fas fa-external-link\"></span>\r\n </a>\r\n </small>\r\n </li>\r\n </ul>\r\n </div>\r\n <div id=\"pattern\" class=\"flex-grow-1\"> </div>\r\n </div>\r\n </div>\r\n</div>" }]
|
|
1044
|
-
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i1.Router }, { type: i1$1.TranslateService }, { type: EnvironmentService }], propDecorators: { loginClicked: [{
|
|
1045
|
-
type: Output
|
|
1046
|
-
}], logoutClicked: [{
|
|
1047
|
-
type: Output
|
|
1048
|
-
}], dropMenuChange: [{
|
|
1049
|
-
type: Output
|
|
1050
|
-
}], showPattern: [{
|
|
1051
|
-
type: Input
|
|
1052
|
-
}], userName: [{
|
|
1053
|
-
type: Input
|
|
1054
|
-
}] } });
|
|
1055
|
-
|
|
1056
898
|
class ArtportalenFooterComponent {
|
|
1057
899
|
constructor(httpClient, envService, trans) {
|
|
1058
900
|
this.httpClient = httpClient;
|
|
@@ -1067,9 +909,7 @@ class ArtportalenFooterComponent {
|
|
|
1067
909
|
this.initTranslations(this.baseUrl);
|
|
1068
910
|
}
|
|
1069
911
|
initTranslations(baseUrl) {
|
|
1070
|
-
|
|
1071
|
-
this.loadTranslation(baseUrl, this.trans.currentLang);
|
|
1072
|
-
}
|
|
912
|
+
this.loadTranslation(baseUrl, this.trans.getCurrentLang());
|
|
1073
913
|
this.subscription.add(this.trans.onLangChange.subscribe((event) => {
|
|
1074
914
|
this.translationFinished = false;
|
|
1075
915
|
this.loadTranslation(baseUrl, event.lang);
|
|
@@ -1086,12 +926,12 @@ class ArtportalenFooterComponent {
|
|
|
1086
926
|
ngOnDestroy() {
|
|
1087
927
|
this.subscription.unsubscribe();
|
|
1088
928
|
}
|
|
1089
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1090
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
929
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ArtportalenFooterComponent, deps: [{ token: i1$2.HttpClient }, { token: EnvironmentService }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
930
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: ArtportalenFooterComponent, isStandalone: false, selector: "adb-artportalen-footer", ngImport: i0, template: "@if (translationFinished) {\r\n <footer class=\"bg-primary-dark py-2 mt-auto container-fluid\">\r\n <div class=\"d-flex justify-content-center\">\r\n <div class=\"container py-3 px-5 justify-content-center text-white\">\r\n <div class=\"row mb-4\">\r\n <div class=\"col-md-2\"></div>\r\n <div class=\"col-md-4 mb-3\">\r\n <a href=\"https://www.slu.se/artdatabanken/rapportering-och-fynd/artportalen/om\" class=\"d-block text-white mb-2\">{{'FOOTER.ABOUT'|translate}}</a>\r\n <a href=\"https://www.slu.se/artdatabanken/rapportering-och-fynd/artportalen/artportalen-tillganglighetsredogorelse\" class=\"d-block text-white mb-2\">{{'FOOTER.WCAG'|translate}}</a>\r\n <a href=\"https://www.slu.se/artdatabanken/om-oss/kontakt/artportalen-support\" class=\"d-block text-white mb-2\"><span class=\"me-1\">{{'FOOTER.SUPPORT'|translate}}</span><span class=\"fas fa-external-link\"></span></a>\r\n <a href=\"https://www.slu.se/artdatabanken/rapportering-och-fynd/villkor-kontohavare\" class=\"d-block text-white mb-2\"><span class=\"me-1\">{{'FOOTER.TERMS_OF_USE'|translate}}</span><span class=\"fas fa-external-link\"></span></a>\r\n <a href=\"https://www.slu.se/artdatabanken/om-oss/behandling-av-personuppgifter\" class=\"d-block text-white mb-2\"><span class=\"me-1\">{{'FOOTER.PERSONAL_DATA'|translate}}</span><span class=\"fas fa-external-link\"></span></a>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"mb-2\" style=\"font-variant: small-caps;\"><sub><strong>{{'FOOTER.PARTNERS'|translate}}</strong></sub></div>\r\n <a href=\"https://birdlife.se\" class=\"d-block text-white mb-2\"><span class=\"me-1\">BirdLife Sverige</span><span class=\"fas fa-external-link\"></span></a>\r\n <a href=\"https://svenskbotanik.se\" class=\"d-block text-nowrap text-white mb-2\"><span class=\"me-1\">Svenska Botaniska F\u00F6reningen</span><span class=\"fas fa-external-link\"></span></a>\r\n <a href=\"https://www.sef.nu\" class=\"d-block text-nowrap text-white mb-2\"><span class=\"me-1\">Sveriges Entomologiska F\u00F6rening</span><span class=\"fas fa-external-link\"></span></a>\r\n <a href=\"https://www.svampar.se\" class=\"d-block text-nowrap text-white mb-2\"><span class=\"me-1\">Sveriges Mykologiska F\u00F6rening</span><span class=\"fas fa-external-link\"></span></a>\r\n </div>\r\n <div class=\"col-md-2\"></div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-2\"></div>\r\n <div class=\"col-md-4\">\r\n <div class=\"mb-3 text-white\">\r\n <div>{{'FOOTER.INFO'|translate}}</div>\r\n <div>{{'FOOTER.INFO2'|translate}}</div>\r\n <div>{{'FOOTER.INFO3'|translate}}\r\n <a href=\"https://www.naturvardsverket.se\" class=\"text-white mb-2\"><u class=\"me-1\">Naturv\u00E5rdsverket.</u><span class=\"fas fa-external-link\"></span></a>\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">{{'FOOTER.INFO4'|translate}}.</div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <a class=\"text-white text-decoration-none d-flex gap-2 mb-3\" href=\"https://www.artdatabanken.se/\" target=\"new\">\r\n <img class=\"d-block d-md-none\" style=\"height: 2.6rem;\" src=\"/assets/images/slu.svg\" alt=\"logo\">\r\n <img class=\"d-none d-md-block\" style=\"height: 2rem;\" src=\"/assets/images/slu.svg\" alt=\"logo\">\r\n <div class=\"border-end d-none d-sm-block\"></div>\r\n <div class=\"border-end d-block d-sm-none\"></div>\r\n <img class=\"d-none d-md-block align-self-center pe-5\" style=\"height: 0.7rem;\" src=\"/assets/images/artdatabanken.svg\" alt=\"logo\">\r\n <img class=\"d-block d-md-none align-self-center pe-5\" style=\"height: 0.8rem;\" src=\"/assets/images/artdatabanken.svg\" alt=\"logo\">\r\n </a>\r\n </div>\r\n <div class=\"col-md-2\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </footer>\r\n}", dependencies: [{ kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
1091
931
|
}
|
|
1092
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
932
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ArtportalenFooterComponent, decorators: [{
|
|
1093
933
|
type: Component,
|
|
1094
|
-
args: [{ selector: 'adb-artportalen-footer', standalone: false, template: "<footer class=\"bg-primary-dark py-2 mt-auto container-fluid\"
|
|
934
|
+
args: [{ selector: 'adb-artportalen-footer', standalone: false, template: "@if (translationFinished) {\r\n <footer class=\"bg-primary-dark py-2 mt-auto container-fluid\">\r\n <div class=\"d-flex justify-content-center\">\r\n <div class=\"container py-3 px-5 justify-content-center text-white\">\r\n <div class=\"row mb-4\">\r\n <div class=\"col-md-2\"></div>\r\n <div class=\"col-md-4 mb-3\">\r\n <a href=\"https://www.slu.se/artdatabanken/rapportering-och-fynd/artportalen/om\" class=\"d-block text-white mb-2\">{{'FOOTER.ABOUT'|translate}}</a>\r\n <a href=\"https://www.slu.se/artdatabanken/rapportering-och-fynd/artportalen/artportalen-tillganglighetsredogorelse\" class=\"d-block text-white mb-2\">{{'FOOTER.WCAG'|translate}}</a>\r\n <a href=\"https://www.slu.se/artdatabanken/om-oss/kontakt/artportalen-support\" class=\"d-block text-white mb-2\"><span class=\"me-1\">{{'FOOTER.SUPPORT'|translate}}</span><span class=\"fas fa-external-link\"></span></a>\r\n <a href=\"https://www.slu.se/artdatabanken/rapportering-och-fynd/villkor-kontohavare\" class=\"d-block text-white mb-2\"><span class=\"me-1\">{{'FOOTER.TERMS_OF_USE'|translate}}</span><span class=\"fas fa-external-link\"></span></a>\r\n <a href=\"https://www.slu.se/artdatabanken/om-oss/behandling-av-personuppgifter\" class=\"d-block text-white mb-2\"><span class=\"me-1\">{{'FOOTER.PERSONAL_DATA'|translate}}</span><span class=\"fas fa-external-link\"></span></a>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"mb-2\" style=\"font-variant: small-caps;\"><sub><strong>{{'FOOTER.PARTNERS'|translate}}</strong></sub></div>\r\n <a href=\"https://birdlife.se\" class=\"d-block text-white mb-2\"><span class=\"me-1\">BirdLife Sverige</span><span class=\"fas fa-external-link\"></span></a>\r\n <a href=\"https://svenskbotanik.se\" class=\"d-block text-nowrap text-white mb-2\"><span class=\"me-1\">Svenska Botaniska F\u00F6reningen</span><span class=\"fas fa-external-link\"></span></a>\r\n <a href=\"https://www.sef.nu\" class=\"d-block text-nowrap text-white mb-2\"><span class=\"me-1\">Sveriges Entomologiska F\u00F6rening</span><span class=\"fas fa-external-link\"></span></a>\r\n <a href=\"https://www.svampar.se\" class=\"d-block text-nowrap text-white mb-2\"><span class=\"me-1\">Sveriges Mykologiska F\u00F6rening</span><span class=\"fas fa-external-link\"></span></a>\r\n </div>\r\n <div class=\"col-md-2\"></div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-2\"></div>\r\n <div class=\"col-md-4\">\r\n <div class=\"mb-3 text-white\">\r\n <div>{{'FOOTER.INFO'|translate}}</div>\r\n <div>{{'FOOTER.INFO2'|translate}}</div>\r\n <div>{{'FOOTER.INFO3'|translate}}\r\n <a href=\"https://www.naturvardsverket.se\" class=\"text-white mb-2\"><u class=\"me-1\">Naturv\u00E5rdsverket.</u><span class=\"fas fa-external-link\"></span></a>\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">{{'FOOTER.INFO4'|translate}}.</div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <a class=\"text-white text-decoration-none d-flex gap-2 mb-3\" href=\"https://www.artdatabanken.se/\" target=\"new\">\r\n <img class=\"d-block d-md-none\" style=\"height: 2.6rem;\" src=\"/assets/images/slu.svg\" alt=\"logo\">\r\n <img class=\"d-none d-md-block\" style=\"height: 2rem;\" src=\"/assets/images/slu.svg\" alt=\"logo\">\r\n <div class=\"border-end d-none d-sm-block\"></div>\r\n <div class=\"border-end d-block d-sm-none\"></div>\r\n <img class=\"d-none d-md-block align-self-center pe-5\" style=\"height: 0.7rem;\" src=\"/assets/images/artdatabanken.svg\" alt=\"logo\">\r\n <img class=\"d-block d-md-none align-self-center pe-5\" style=\"height: 0.8rem;\" src=\"/assets/images/artdatabanken.svg\" alt=\"logo\">\r\n </a>\r\n </div>\r\n <div class=\"col-md-2\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </footer>\r\n}" }]
|
|
1095
935
|
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: EnvironmentService }, { type: i1$1.TranslateService }] });
|
|
1096
936
|
|
|
1097
937
|
class ArtportalenNavModule {
|
|
@@ -1107,8 +947,8 @@ class ArtportalenNavModule {
|
|
|
1107
947
|
]
|
|
1108
948
|
};
|
|
1109
949
|
}
|
|
1110
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1111
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
950
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ArtportalenNavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
951
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: ArtportalenNavModule, declarations: [ArtportalenNavComponent,
|
|
1112
952
|
ArtportalenFooterComponent], imports: [CommonModule,
|
|
1113
953
|
RouterModule,
|
|
1114
954
|
TranslateModule,
|
|
@@ -1116,14 +956,14 @@ class ArtportalenNavModule {
|
|
|
1116
956
|
AdbDropdownModule,
|
|
1117
957
|
AdbPagersModule], exports: [ArtportalenNavComponent,
|
|
1118
958
|
ArtportalenFooterComponent] }); }
|
|
1119
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
959
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ArtportalenNavModule, providers: [EnvironmentService, provideHttpClient(withInterceptorsFromDi())], imports: [CommonModule,
|
|
1120
960
|
RouterModule,
|
|
1121
961
|
TranslateModule,
|
|
1122
962
|
AdbDirectivesModule,
|
|
1123
963
|
AdbDropdownModule,
|
|
1124
964
|
AdbPagersModule] }); }
|
|
1125
965
|
}
|
|
1126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
966
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ArtportalenNavModule, decorators: [{
|
|
1127
967
|
type: NgModule,
|
|
1128
968
|
args: [{ declarations: [
|
|
1129
969
|
ArtportalenNavComponent,
|
|
@@ -1138,7 +978,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
1138
978
|
AdbDirectivesModule,
|
|
1139
979
|
AdbDropdownModule,
|
|
1140
980
|
AdbPagersModule],
|
|
1141
|
-
providers: [provideHttpClient(withInterceptorsFromDi())] }]
|
|
981
|
+
providers: [EnvironmentService, provideHttpClient(withInterceptorsFromDi())] }]
|
|
1142
982
|
}] });
|
|
1143
983
|
|
|
1144
984
|
class LocaleDatePipe {
|
|
@@ -1148,10 +988,10 @@ class LocaleDatePipe {
|
|
|
1148
988
|
transform(value, format) {
|
|
1149
989
|
return new DatePipe(this.translate.currentLang).transform(value, format, null, this.translate.currentLang);
|
|
1150
990
|
}
|
|
1151
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1152
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
991
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: LocaleDatePipe, deps: [{ token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
992
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: LocaleDatePipe, isStandalone: false, name: "adbLocaleDate", pure: false }); }
|
|
1153
993
|
}
|
|
1154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
994
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: LocaleDatePipe, decorators: [{
|
|
1155
995
|
type: Pipe,
|
|
1156
996
|
args: [{
|
|
1157
997
|
name: 'adbLocaleDate',
|
|
@@ -1170,10 +1010,10 @@ class EmptyValuePipe {
|
|
|
1170
1010
|
}
|
|
1171
1011
|
return value;
|
|
1172
1012
|
}
|
|
1173
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1174
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
1013
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: EmptyValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1014
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: EmptyValuePipe, isStandalone: false, name: "adbEmptyValue" }); }
|
|
1175
1015
|
}
|
|
1176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1016
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: EmptyValuePipe, decorators: [{
|
|
1177
1017
|
type: Pipe,
|
|
1178
1018
|
args: [{
|
|
1179
1019
|
name: 'adbEmptyValue',
|
|
@@ -1215,10 +1055,10 @@ class HighlightPipe {
|
|
|
1215
1055
|
normalizeText(text) {
|
|
1216
1056
|
return text?.normalize('NFD').replace(/[\u0300-\u036f]/g, '').toLocaleLowerCase();
|
|
1217
1057
|
}
|
|
1218
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1219
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
1058
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: HighlightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1059
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: HighlightPipe, isStandalone: false, name: "adbHighlight" }); }
|
|
1220
1060
|
}
|
|
1221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1061
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: HighlightPipe, decorators: [{
|
|
1222
1062
|
type: Pipe,
|
|
1223
1063
|
args: [{
|
|
1224
1064
|
name: 'adbHighlight',
|
|
@@ -1234,10 +1074,10 @@ class NumberSpacingPipe {
|
|
|
1234
1074
|
}
|
|
1235
1075
|
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
|
|
1236
1076
|
}
|
|
1237
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1238
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
1077
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: NumberSpacingPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1078
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: NumberSpacingPipe, isStandalone: false, name: "adbSpacing", pure: false }); }
|
|
1239
1079
|
}
|
|
1240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1080
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: NumberSpacingPipe, decorators: [{
|
|
1241
1081
|
type: Pipe,
|
|
1242
1082
|
args: [{
|
|
1243
1083
|
name: 'adbSpacing',
|
|
@@ -1280,10 +1120,10 @@ class HighlightHtmlPipe {
|
|
|
1280
1120
|
escapeRegExp(text) {
|
|
1281
1121
|
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
|
1282
1122
|
}
|
|
1283
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1284
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
1123
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: HighlightHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1124
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: HighlightHtmlPipe, isStandalone: false, name: "adbHighlightHtml" }); }
|
|
1285
1125
|
}
|
|
1286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: HighlightHtmlPipe, decorators: [{
|
|
1287
1127
|
type: Pipe,
|
|
1288
1128
|
args: [{
|
|
1289
1129
|
name: 'adbHighlightHtml',
|
|
@@ -1292,11 +1132,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
1292
1132
|
}] });
|
|
1293
1133
|
|
|
1294
1134
|
class AdbPipesModule {
|
|
1295
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1296
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1297
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1135
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1136
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AdbPipesModule, declarations: [HighlightPipe, HighlightHtmlPipe, NumberSpacingPipe, LocaleDatePipe, EmptyValuePipe], exports: [HighlightPipe, HighlightHtmlPipe, NumberSpacingPipe, LocaleDatePipe, EmptyValuePipe] }); }
|
|
1137
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbPipesModule }); }
|
|
1298
1138
|
}
|
|
1299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbPipesModule, decorators: [{
|
|
1300
1140
|
type: NgModule,
|
|
1301
1141
|
args: [{
|
|
1302
1142
|
imports: [],
|
|
@@ -1454,10 +1294,10 @@ class AdbDatePickerComponent {
|
|
|
1454
1294
|
return null;
|
|
1455
1295
|
}
|
|
1456
1296
|
}
|
|
1457
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1458
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1297
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDatePickerComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1298
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.8", type: AdbDatePickerComponent, isStandalone: false, selector: "adb-date-picker", inputs: { initialDate: "initialDate", settings: "settings", toLeft: "toLeft", id: "id" }, outputs: { selectDate: "selectDate" }, host: { properties: { "id": "this.id" } }, ngImport: i0, template: "<div class=\"position-relative\" [class.to-left]=\"toLeft\">\r\n <nav class=\"bg-white shadow rounded position-absolute\">\r\n <header class=\"bg-primary p-2 rounded-top d-flex justify-content-between align-items-center gap-1\">\r\n <button tabIndex=\"-1\" class=\"btn btn-primary text-white rounded-pill\" type=\"button\" (click)=\"onPrev()\" [disabled]=\"noYearMode&¤tMonth===0\"><span class=\"fa fa-chevron-left\"></span></button>\r\n <ng-container *ngIf=\"!years&&!months\">\r\n <button tabIndex=\"-1\" class=\"btn btn-primary text-white rounded-pill\" type=\"button\" (click)=\"onShowMonth();$event.stopPropagation()\">{{selectedDate|adbLocaleDate:'MMM'}}</button>\r\n <button *ngIf=\"!noYearMode\" tabIndex=\"-1\" class=\"btn btn-primary text-white rounded-pill\" type=\"button\" (click)=\"onShowYear();$event.stopPropagation()\">{{selectedDate|date:'yyyy'}}</button>\r\n </ng-container>\r\n <button tabIndex=\"-1\" *ngIf=\"years\" class=\"btn btn-primary text-white rounded-pill\" type=\"button\" (click)=\"years=null;$event.stopPropagation()\">{{years[0].title}} - {{years[years.length-1].title}}</button>\r\n <button tabIndex=\"-1\" *ngIf=\"months\" class=\"btn btn-primary text-white rounded-pill\" type=\"button\" (click)=\"onShowYear();$event.stopPropagation()\">{{selectedDate|date:'yyyy'}}</button>\r\n <button tabIndex=\"-1\" class=\"btn btn-primary text-white rounded-pill\" type=\"button\" (click)=\"onNext()\" [disabled]=\"noYearMode&¤tMonth===11\"><span class=\"fa fa-chevron-right\"></span></button>\r\n </header>\r\n <div class=\"p-0 border calendar\">\r\n <ul class=\"list-unstyled row\" *ngIf=\"years\">\r\n <li class=\"col-3 text-center px-2 py-3\" *ngFor=\"let year of years\">\r\n <button type=\"button\" tabIndex=\"-1\" class=\"btn btn-sm btn-outline-secondary rounded-pill\" (click)=\"onSelectYear(year.value);$event.stopPropagation()\" [class.active]=\"year.hasObservation\" [ngClass]=\"{'border border-secondary':year.isThisYear}\">{{year.title}}</button>\r\n </li>\r\n </ul>\r\n <ul class=\"list-unstyled row\" *ngIf=\"months\">\r\n <li class=\"col-4 text-center px-2 py-3\" *ngFor=\"let month of months\">\r\n <button type=\"button\" tabIndex=\"-1\" class=\"btn btn-sm btn-outline-secondary rounded-pill\" (click)=\"onSelectMonth(month.value);$event.stopPropagation()\" [class.active]=\"month.observation\" [ngClass]=\"{'border border-secondary':month.isThisMonth}\">\r\n {{'MONTHS.'+(month.value+1)|translate}}\r\n </button>\r\n </li>\r\n </ul>\r\n <div class=\"days\" *ngIf=\"!years&&!months\">\r\n <div class=\"text-center border-bottom py-2 text-muted\" *ngFor=\"let weekDay of weekDays\">{{'WEEK_DAYS.'+weekDay|translate}}</div>\r\n <ng-container *ngFor=\"let week of weeks\">\r\n <button tabIndex=\"-1\" class=\"btn rounded-circle p-0\" *ngFor=\"let day of week.days\" (click)=\"onSelectDate(day)\" type=\"button\" \r\n [class.border]=\"day.isToday\" [class.bg-primary]=\"day.isSelected\" [class.text-white]=\"day.isSelected\" [ngClass]=\"{'pe-none text-muted opacity-50':!day.inMonth||!day.isInRange}\">\r\n <small>{{day.value|date:'d'}}</small>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </nav>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$3.DatePipe, name: "date" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: LocaleDatePipe, name: "adbLocaleDate" }] }); }
|
|
1459
1299
|
}
|
|
1460
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDatePickerComponent, decorators: [{
|
|
1461
1301
|
type: Component,
|
|
1462
1302
|
args: [{ selector: 'adb-date-picker', standalone: false, template: "<div class=\"position-relative\" [class.to-left]=\"toLeft\">\r\n <nav class=\"bg-white shadow rounded position-absolute\">\r\n <header class=\"bg-primary p-2 rounded-top d-flex justify-content-between align-items-center gap-1\">\r\n <button tabIndex=\"-1\" class=\"btn btn-primary text-white rounded-pill\" type=\"button\" (click)=\"onPrev()\" [disabled]=\"noYearMode&¤tMonth===0\"><span class=\"fa fa-chevron-left\"></span></button>\r\n <ng-container *ngIf=\"!years&&!months\">\r\n <button tabIndex=\"-1\" class=\"btn btn-primary text-white rounded-pill\" type=\"button\" (click)=\"onShowMonth();$event.stopPropagation()\">{{selectedDate|adbLocaleDate:'MMM'}}</button>\r\n <button *ngIf=\"!noYearMode\" tabIndex=\"-1\" class=\"btn btn-primary text-white rounded-pill\" type=\"button\" (click)=\"onShowYear();$event.stopPropagation()\">{{selectedDate|date:'yyyy'}}</button>\r\n </ng-container>\r\n <button tabIndex=\"-1\" *ngIf=\"years\" class=\"btn btn-primary text-white rounded-pill\" type=\"button\" (click)=\"years=null;$event.stopPropagation()\">{{years[0].title}} - {{years[years.length-1].title}}</button>\r\n <button tabIndex=\"-1\" *ngIf=\"months\" class=\"btn btn-primary text-white rounded-pill\" type=\"button\" (click)=\"onShowYear();$event.stopPropagation()\">{{selectedDate|date:'yyyy'}}</button>\r\n <button tabIndex=\"-1\" class=\"btn btn-primary text-white rounded-pill\" type=\"button\" (click)=\"onNext()\" [disabled]=\"noYearMode&¤tMonth===11\"><span class=\"fa fa-chevron-right\"></span></button>\r\n </header>\r\n <div class=\"p-0 border calendar\">\r\n <ul class=\"list-unstyled row\" *ngIf=\"years\">\r\n <li class=\"col-3 text-center px-2 py-3\" *ngFor=\"let year of years\">\r\n <button type=\"button\" tabIndex=\"-1\" class=\"btn btn-sm btn-outline-secondary rounded-pill\" (click)=\"onSelectYear(year.value);$event.stopPropagation()\" [class.active]=\"year.hasObservation\" [ngClass]=\"{'border border-secondary':year.isThisYear}\">{{year.title}}</button>\r\n </li>\r\n </ul>\r\n <ul class=\"list-unstyled row\" *ngIf=\"months\">\r\n <li class=\"col-4 text-center px-2 py-3\" *ngFor=\"let month of months\">\r\n <button type=\"button\" tabIndex=\"-1\" class=\"btn btn-sm btn-outline-secondary rounded-pill\" (click)=\"onSelectMonth(month.value);$event.stopPropagation()\" [class.active]=\"month.observation\" [ngClass]=\"{'border border-secondary':month.isThisMonth}\">\r\n {{'MONTHS.'+(month.value+1)|translate}}\r\n </button>\r\n </li>\r\n </ul>\r\n <div class=\"days\" *ngIf=\"!years&&!months\">\r\n <div class=\"text-center border-bottom py-2 text-muted\" *ngFor=\"let weekDay of weekDays\">{{'WEEK_DAYS.'+weekDay|translate}}</div>\r\n <ng-container *ngFor=\"let week of weeks\">\r\n <button tabIndex=\"-1\" class=\"btn rounded-circle p-0\" *ngFor=\"let day of week.days\" (click)=\"onSelectDate(day)\" type=\"button\" \r\n [class.border]=\"day.isToday\" [class.bg-primary]=\"day.isSelected\" [class.text-white]=\"day.isSelected\" [ngClass]=\"{'pe-none text-muted opacity-50':!day.inMonth||!day.isInRange}\">\r\n <small>{{day.value|date:'d'}}</small>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </nav>\r\n</div>\r\n" }]
|
|
1463
1303
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.TranslateService }], propDecorators: { initialDate: [{
|
|
@@ -1476,10 +1316,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
1476
1316
|
}] } });
|
|
1477
1317
|
|
|
1478
1318
|
class AdbDatePickerService {
|
|
1479
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1480
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1319
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDatePickerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1320
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDatePickerService }); }
|
|
1481
1321
|
}
|
|
1482
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDatePickerService, decorators: [{
|
|
1483
1323
|
type: Injectable
|
|
1484
1324
|
}] });
|
|
1485
1325
|
|
|
@@ -1638,8 +1478,8 @@ class AdbDatePickerDirective {
|
|
|
1638
1478
|
getId() {
|
|
1639
1479
|
return '' + Math.floor(Math.random() * Date.now());
|
|
1640
1480
|
}
|
|
1641
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1642
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1481
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDatePickerDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: AdbDatePickerService }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1482
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.8", type: AdbDatePickerDirective, isStandalone: false, selector: "input[adbDatepicker]", inputs: { format: "format", toLeft: "toLeft", settings: "settings" }, outputs: { adbBlur: "adbBlur" }, host: { listeners: { "click": "onClick()", "keyup": "onKeyup($event)", "keydown.shift.tab": "onTabDown()", "keydown.tab": "onTabDown()", "keydown.esc": "onEscdOWN()", "document:click": "onCheckOutSideClick($event.target)" }, properties: { "autocomplete": "this.autocomplete" } }, providers: [{
|
|
1643
1483
|
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => AdbDatePickerDirective)),
|
|
1644
1484
|
multi: true
|
|
1645
1485
|
},
|
|
@@ -1649,7 +1489,7 @@ class AdbDatePickerDirective {
|
|
|
1649
1489
|
multi: true,
|
|
1650
1490
|
},], ngImport: i0 }); }
|
|
1651
1491
|
}
|
|
1652
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDatePickerDirective, decorators: [{
|
|
1653
1493
|
type: Directive,
|
|
1654
1494
|
args: [{
|
|
1655
1495
|
selector: `input[adbDatepicker]`,
|
|
@@ -1696,11 +1536,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
1696
1536
|
}] } });
|
|
1697
1537
|
|
|
1698
1538
|
class AdbDatePickerModule {
|
|
1699
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1700
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1701
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1539
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDatePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1540
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AdbDatePickerModule, declarations: [AdbDatePickerComponent, AdbDatePickerDirective], imports: [CommonModule, i1$1.TranslateModule, AdbPipesModule, AdbDirectivesModule], exports: [AdbDatePickerComponent, AdbDatePickerDirective] }); }
|
|
1541
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDatePickerModule, providers: [AdbDatePickerService], imports: [CommonModule, TranslateModule.forChild(), AdbPipesModule, AdbDirectivesModule] }); }
|
|
1702
1542
|
}
|
|
1703
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1543
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbDatePickerModule, decorators: [{
|
|
1704
1544
|
type: NgModule,
|
|
1705
1545
|
args: [{
|
|
1706
1546
|
imports: [CommonModule, TranslateModule.forChild(), AdbPipesModule, AdbDirectivesModule],
|
|
@@ -1746,10 +1586,10 @@ class AdbModalService {
|
|
|
1746
1586
|
this.domElem = componentRef.hostView.rootNodes[0];
|
|
1747
1587
|
document.body.appendChild(this.domElem);
|
|
1748
1588
|
}
|
|
1749
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1750
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1589
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbModalService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.RendererFactory2 }, { token: i0.ApplicationRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1590
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbModalService }); }
|
|
1751
1591
|
}
|
|
1752
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1592
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbModalService, decorators: [{
|
|
1753
1593
|
type: Injectable
|
|
1754
1594
|
}], ctorParameters: () => [{ type: i0.ComponentFactoryResolver }, { type: i0.RendererFactory2 }, { type: i0.ApplicationRef }, { type: i0.Injector }] });
|
|
1755
1595
|
|
|
@@ -1767,22 +1607,22 @@ class AdbConfirmModal {
|
|
|
1767
1607
|
onClose(confirm) {
|
|
1768
1608
|
this.modalRef.hide(confirm);
|
|
1769
1609
|
}
|
|
1770
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1771
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1610
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbConfirmModal, deps: [{ token: AdbModalService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1611
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: AdbConfirmModal, isStandalone: false, selector: "ng-component", inputs: { model: "model" }, ngImport: i0, template: "@if (model) {\r\n <div class=\"modal fade show\" role=\"dialog\"\r\n attr.aria-labelledby=\"mod_header\"\r\n attr.aria-describedby=\"mod_desc\">\r\n <div class=\"modal-dialog modal-dialog-centered\">\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <h1 class=\"h-subsection mb-0 modal-title\" id=\"mod_header\">{{model.header|translate}}</h1>\r\n <button type=\"button\" class=\"btn-close\" id=\"modal-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\" (click)=\"onClose(false)\"></button>\r\n </div>\r\n <div class=\"modal-body\">\r\n <div id=\"mod_desc\">{{model.text|translate}}</div>\r\n @if (model.value) {\r\n <div>\r\n <strong>{{model.value}}</strong>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"modal-footer\">\r\n <div class=\"d-flex gap-2 justify-content-end\">\r\n @if (model.showDecline) {\r\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onClose(false)\">{{model.decline|translate}}</button>\r\n }\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"onClose(true)\">{{model.confirm|translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n}", dependencies: [{ kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
1772
1612
|
}
|
|
1773
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1613
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbConfirmModal, decorators: [{
|
|
1774
1614
|
type: Component,
|
|
1775
|
-
args: [{ standalone: false, template: "<div class=\"modal fade show\"
|
|
1615
|
+
args: [{ standalone: false, template: "@if (model) {\r\n <div class=\"modal fade show\" role=\"dialog\"\r\n attr.aria-labelledby=\"mod_header\"\r\n attr.aria-describedby=\"mod_desc\">\r\n <div class=\"modal-dialog modal-dialog-centered\">\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <h1 class=\"h-subsection mb-0 modal-title\" id=\"mod_header\">{{model.header|translate}}</h1>\r\n <button type=\"button\" class=\"btn-close\" id=\"modal-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\" (click)=\"onClose(false)\"></button>\r\n </div>\r\n <div class=\"modal-body\">\r\n <div id=\"mod_desc\">{{model.text|translate}}</div>\r\n @if (model.value) {\r\n <div>\r\n <strong>{{model.value}}</strong>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"modal-footer\">\r\n <div class=\"d-flex gap-2 justify-content-end\">\r\n @if (model.showDecline) {\r\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onClose(false)\">{{model.decline|translate}}</button>\r\n }\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"onClose(true)\">{{model.confirm|translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n}" }]
|
|
1776
1616
|
}], ctorParameters: () => [{ type: AdbModalService }, { type: i0.ElementRef }], propDecorators: { model: [{
|
|
1777
1617
|
type: Input
|
|
1778
1618
|
}] } });
|
|
1779
1619
|
|
|
1780
1620
|
class AdbModalModule {
|
|
1781
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1782
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1783
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1621
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1622
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AdbModalModule, declarations: [AdbConfirmModal], imports: [CommonModule, i1$1.TranslateModule, AdbDirectivesModule], exports: [AdbConfirmModal] }); }
|
|
1623
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbModalModule, providers: [AdbModalService], imports: [CommonModule, TranslateModule.forChild(), AdbDirectivesModule] }); }
|
|
1784
1624
|
}
|
|
1785
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1625
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbModalModule, decorators: [{
|
|
1786
1626
|
type: NgModule,
|
|
1787
1627
|
args: [{
|
|
1788
1628
|
imports: [CommonModule, TranslateModule.forChild(), AdbDirectivesModule],
|
|
@@ -1828,10 +1668,10 @@ class AdbToastService {
|
|
|
1828
1668
|
this.container.prepend(element);
|
|
1829
1669
|
}
|
|
1830
1670
|
}
|
|
1831
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1832
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1671
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbToastService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.RendererFactory2 }, { token: i0.ApplicationRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1672
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbToastService }); }
|
|
1833
1673
|
}
|
|
1834
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1674
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbToastService, decorators: [{
|
|
1835
1675
|
type: Injectable
|
|
1836
1676
|
}], ctorParameters: () => [{ type: i0.ComponentFactoryResolver }, { type: i0.RendererFactory2 }, { type: i0.ApplicationRef }, { type: i0.Injector }] });
|
|
1837
1677
|
var ToastType;
|
|
@@ -1853,20 +1693,20 @@ class AdbToast {
|
|
|
1853
1693
|
onRemoveToast(toast) {
|
|
1854
1694
|
this.toastService.remove(toast);
|
|
1855
1695
|
}
|
|
1856
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1857
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1696
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbToast, deps: [{ token: AdbToastService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1697
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: AdbToast, isStandalone: false, selector: "ng-component", ngImport: i0, template: "<div class=\"position-fixed bottom-0 end-0\" style=\"z-index: 50000;min-width: 15rem;\">\r\n @for (toast of toasts; track toast) {\r\n <div class=\"alert alert-dismissible\" role=\"alert\"\r\n [class.alert-primary]=\"toast.type===toastType.Primary\"\r\n [class.alert-success]=\"toast.type===toastType.Success\"\r\n [class.alert-warning]=\"toast.type===toastType.Warn\"\r\n [class.alert-danger]=\"toast.type===toastType.Danger\">\r\n @if (toast.header) {\r\n <div class=\"d-flex align-items-center justify-content-between pb-1\">\r\n @if (!toast.headerValue) {\r\n <div class=\"fw-bold pb-1\">{{toast.header|translate}}</div>\r\n }\r\n @if (toast.headerValue) {\r\n <div class=\"fw-bold pb-1\">{{(toast.header|translate:toast.headerValue )}}</div>\r\n }\r\n <button type=\"button\" class=\"btn-close\" (click)=\"onRemoveToast(toast)\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>\r\n </div>\r\n }\r\n <div class=\"d-flex align-items-center justify-content-between mt-1\">\r\n @if (!toast.messageValue) {\r\n <div>{{toast.message|translate}}</div>\r\n }\r\n @if (toast.messageValue) {\r\n <div>{{(toast.message|translate:toast.messageValue )}}</div>\r\n }\r\n <button type=\"button\" class=\"btn-close\" (click)=\"onRemoveToast(toast)\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>\r\n </div>\r\n </div>\r\n }\r\n</div>", dependencies: [{ kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
1858
1698
|
}
|
|
1859
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbToast, decorators: [{
|
|
1860
1700
|
type: Component,
|
|
1861
|
-
args: [{ standalone: false, template: "<div class=\"position-fixed bottom-0 end-0\" style=\"z-index: 50000;min-width: 15rem;\">\r\n <div class=\"alert alert-dismissible\" role=\"alert\"
|
|
1701
|
+
args: [{ standalone: false, template: "<div class=\"position-fixed bottom-0 end-0\" style=\"z-index: 50000;min-width: 15rem;\">\r\n @for (toast of toasts; track toast) {\r\n <div class=\"alert alert-dismissible\" role=\"alert\"\r\n [class.alert-primary]=\"toast.type===toastType.Primary\"\r\n [class.alert-success]=\"toast.type===toastType.Success\"\r\n [class.alert-warning]=\"toast.type===toastType.Warn\"\r\n [class.alert-danger]=\"toast.type===toastType.Danger\">\r\n @if (toast.header) {\r\n <div class=\"d-flex align-items-center justify-content-between pb-1\">\r\n @if (!toast.headerValue) {\r\n <div class=\"fw-bold pb-1\">{{toast.header|translate}}</div>\r\n }\r\n @if (toast.headerValue) {\r\n <div class=\"fw-bold pb-1\">{{(toast.header|translate:toast.headerValue )}}</div>\r\n }\r\n <button type=\"button\" class=\"btn-close\" (click)=\"onRemoveToast(toast)\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>\r\n </div>\r\n }\r\n <div class=\"d-flex align-items-center justify-content-between mt-1\">\r\n @if (!toast.messageValue) {\r\n <div>{{toast.message|translate}}</div>\r\n }\r\n @if (toast.messageValue) {\r\n <div>{{(toast.message|translate:toast.messageValue )}}</div>\r\n }\r\n <button type=\"button\" class=\"btn-close\" (click)=\"onRemoveToast(toast)\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>\r\n </div>\r\n </div>\r\n }\r\n</div>" }]
|
|
1862
1702
|
}], ctorParameters: () => [{ type: AdbToastService }] });
|
|
1863
1703
|
|
|
1864
1704
|
class AdbToastModule {
|
|
1865
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1866
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1867
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1705
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbToastModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1706
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AdbToastModule, declarations: [AdbToast], imports: [CommonModule, i1$1.TranslateModule, AdbDirectivesModule], exports: [AdbToast] }); }
|
|
1707
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbToastModule, providers: [AdbToastService], imports: [CommonModule, TranslateModule.forChild(), AdbDirectivesModule] }); }
|
|
1868
1708
|
}
|
|
1869
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbToastModule, decorators: [{
|
|
1870
1710
|
type: NgModule,
|
|
1871
1711
|
args: [{
|
|
1872
1712
|
imports: [CommonModule, TranslateModule.forChild(), AdbDirectivesModule],
|
|
@@ -1907,12 +1747,12 @@ class AdbHelpButtonComponent {
|
|
|
1907
1747
|
}
|
|
1908
1748
|
this.showHelp = !this.showHelp;
|
|
1909
1749
|
}
|
|
1910
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1911
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1750
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbHelpButtonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1751
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: AdbHelpButtonComponent, isStandalone: false, selector: "adb-help-button", inputs: { buttonClass: "buttonClass", iconClass: "iconClass", label: "label" }, host: { listeners: { "document:click": "onClickDoc($event)" } }, ngImport: i0, template: "<button type=\"button\"\r\n class=\"w-auto d-flex gap-1 align-items-baseline help-button\"\r\n [ngClass]=\"buttonClass\"\r\n [attr.aria-controls]=\"id\" aria-label=\"Help\"\r\n [attr.aria-expanded]=\"showHelp\" (click)=\"onClose()\">\r\n <span [ngClass]=\"iconClass\"></span>\r\n {{label}}\r\n</button>\r\n<div>\r\n @if (showHelp) {\r\n <div [id]=\"id\" class=\"position-absolute start-0 w-100 adb-plate-primary text-start shadow\" style=\"z-index:4\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"flex-grow-1\"><ng-content></ng-content></div>\r\n <div class=\"ms-auto align-self-start d-flex align-items-start\">\r\n <button type=\"button\" class=\"btn-close p-1\" data-bs-dismiss=\"modal\" aria-label=\"Close\" (click)=\"showHelp=false\"></button>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>", dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
1912
1752
|
}
|
|
1913
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbHelpButtonComponent, decorators: [{
|
|
1914
1754
|
type: Component,
|
|
1915
|
-
args: [{ selector: 'adb-help-button', standalone: false, template: "<button type=\"button\"\r\n
|
|
1755
|
+
args: [{ selector: 'adb-help-button', standalone: false, template: "<button type=\"button\"\r\n class=\"w-auto d-flex gap-1 align-items-baseline help-button\"\r\n [ngClass]=\"buttonClass\"\r\n [attr.aria-controls]=\"id\" aria-label=\"Help\"\r\n [attr.aria-expanded]=\"showHelp\" (click)=\"onClose()\">\r\n <span [ngClass]=\"iconClass\"></span>\r\n {{label}}\r\n</button>\r\n<div>\r\n @if (showHelp) {\r\n <div [id]=\"id\" class=\"position-absolute start-0 w-100 adb-plate-primary text-start shadow\" style=\"z-index:4\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"flex-grow-1\"><ng-content></ng-content></div>\r\n <div class=\"ms-auto align-self-start d-flex align-items-start\">\r\n <button type=\"button\" class=\"btn-close p-1\" data-bs-dismiss=\"modal\" aria-label=\"Close\" (click)=\"showHelp=false\"></button>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>" }]
|
|
1916
1756
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { buttonClass: [{
|
|
1917
1757
|
type: Input
|
|
1918
1758
|
}], iconClass: [{
|
|
@@ -1925,11 +1765,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
1925
1765
|
}] } });
|
|
1926
1766
|
|
|
1927
1767
|
class AdbButtonsModule {
|
|
1928
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1929
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1930
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1768
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbButtonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1769
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AdbButtonsModule, declarations: [AdbHelpButtonComponent], imports: [CommonModule, AdbDirectivesModule], exports: [AdbHelpButtonComponent] }); }
|
|
1770
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbButtonsModule, imports: [CommonModule, AdbDirectivesModule] }); }
|
|
1931
1771
|
}
|
|
1932
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1772
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbButtonsModule, decorators: [{
|
|
1933
1773
|
type: NgModule,
|
|
1934
1774
|
args: [{
|
|
1935
1775
|
imports: [CommonModule, AdbDirectivesModule],
|
|
@@ -2025,18 +1865,18 @@ class AdbRichEditorComponent {
|
|
|
2025
1865
|
}
|
|
2026
1866
|
ngOnDestroy() {
|
|
2027
1867
|
}
|
|
2028
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2029
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1868
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbRichEditorComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1869
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: AdbRichEditorComponent, isStandalone: false, selector: "adb-rich-editor", inputs: { hasTaxon: "hasTaxon", hasReference: "hasReference", rows: "rows" }, providers: [{
|
|
2030
1870
|
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => AdbRichEditorComponent)),
|
|
2031
1871
|
multi: true
|
|
2032
|
-
}], ngImport: i0, template: "<div>\r\n
|
|
1872
|
+
}], ngImport: i0, template: "<div>\r\n <div class=\"d-flex justify-content-end gap-3 mb-1\">\r\n <button class=\"btn btn-secondary\" (click)=\"onItalicClick()\" title=\"Italic\" aria-label=\"Italic\" type=\"button\"><span class=\"fas fa-italic\"></span></button>\r\n <button class=\"btn btn-secondary\" (click)=\"onBoldClick()\" title=\"Italic\" aria-label=\"strong\" type=\"button\"><span class=\"fas fa-bold\"></span></button>\r\n @if (hasTaxon) {\r\n <button class=\"btn btn-secondary\" (click)=\"onTaxonClick()\" title=\"Taxon\" aria-label=\"Taxon\" type=\"button\"><span class=\"fas fa-bug\"></span></button>\r\n }\r\n @if (hasReference) {\r\n <button class=\"btn btn-secondary\" (click)=\"onReferenceClick()\" title=\"Reference\" aria-label=\"Reference\" type=\"button\"><span class=\"fas fa-asterisk\"></span></button>\r\n }\r\n </div>\r\n <textarea class=\"form-control\" [(ngModel)]=\"text\" (ngModelChange)=\"onTextChange()\" [rows]=\"rows\" (dblclick)=\"onDoubleClick()\"></textarea>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$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]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
2033
1873
|
}
|
|
2034
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1874
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbRichEditorComponent, decorators: [{
|
|
2035
1875
|
type: Component,
|
|
2036
1876
|
args: [{ selector: 'adb-rich-editor', providers: [{
|
|
2037
1877
|
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => AdbRichEditorComponent)),
|
|
2038
1878
|
multi: true
|
|
2039
|
-
}], standalone: false, template: "<div>\r\n
|
|
1879
|
+
}], standalone: false, template: "<div>\r\n <div class=\"d-flex justify-content-end gap-3 mb-1\">\r\n <button class=\"btn btn-secondary\" (click)=\"onItalicClick()\" title=\"Italic\" aria-label=\"Italic\" type=\"button\"><span class=\"fas fa-italic\"></span></button>\r\n <button class=\"btn btn-secondary\" (click)=\"onBoldClick()\" title=\"Italic\" aria-label=\"strong\" type=\"button\"><span class=\"fas fa-bold\"></span></button>\r\n @if (hasTaxon) {\r\n <button class=\"btn btn-secondary\" (click)=\"onTaxonClick()\" title=\"Taxon\" aria-label=\"Taxon\" type=\"button\"><span class=\"fas fa-bug\"></span></button>\r\n }\r\n @if (hasReference) {\r\n <button class=\"btn btn-secondary\" (click)=\"onReferenceClick()\" title=\"Reference\" aria-label=\"Reference\" type=\"button\"><span class=\"fas fa-asterisk\"></span></button>\r\n }\r\n </div>\r\n <textarea class=\"form-control\" [(ngModel)]=\"text\" (ngModelChange)=\"onTextChange()\" [rows]=\"rows\" (dblclick)=\"onDoubleClick()\"></textarea>\r\n</div>\r\n" }]
|
|
2040
1880
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { hasTaxon: [{
|
|
2041
1881
|
type: Input
|
|
2042
1882
|
}], hasReference: [{
|
|
@@ -2095,12 +1935,12 @@ class RichTextComponent {
|
|
|
2095
1935
|
}
|
|
2096
1936
|
return parts;
|
|
2097
1937
|
}
|
|
2098
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2099
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1938
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RichTextComponent, deps: [{ token: RICH_MODULE_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1939
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: RichTextComponent, isStandalone: false, selector: "adb-rich-text", inputs: { text: "text" }, usesOnChanges: true, ngImport: i0, template: "<div style=\"white-space: pre-wrap;\">\r\n @for (part of parts; track part) {\r\n @if (part.type === 'text') {\r\n <span>{{ part.content }}</span>\r\n }\r\n @if (part.type === 'italic') {\r\n <em>{{ part.content }}</em>\r\n }\r\n @if (part.type === 'bold') {\r\n <b>{{ part.content }}</b>\r\n }\r\n @if (part.type === 'taxon') {\r\n <a [href]=\"taxonUrl + part.id\">{{ part.content }}</a>\r\n }\r\n @if (part.type === 'term') {\r\n <span>{{ part.content }}</span>\r\n }\r\n @if (part.type === 'reference') {\r\n <span>{{ part.content }}</span>\r\n }\r\n }\r\n</div>\r\n" }); }
|
|
2100
1940
|
}
|
|
2101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1941
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RichTextComponent, decorators: [{
|
|
2102
1942
|
type: Component,
|
|
2103
|
-
args: [{ selector: 'adb-rich-text', standalone: false, template: "<div style=\"white-space: pre-wrap;\">\r\n
|
|
1943
|
+
args: [{ selector: 'adb-rich-text', standalone: false, template: "<div style=\"white-space: pre-wrap;\">\r\n @for (part of parts; track part) {\r\n @if (part.type === 'text') {\r\n <span>{{ part.content }}</span>\r\n }\r\n @if (part.type === 'italic') {\r\n <em>{{ part.content }}</em>\r\n }\r\n @if (part.type === 'bold') {\r\n <b>{{ part.content }}</b>\r\n }\r\n @if (part.type === 'taxon') {\r\n <a [href]=\"taxonUrl + part.id\">{{ part.content }}</a>\r\n }\r\n @if (part.type === 'term') {\r\n <span>{{ part.content }}</span>\r\n }\r\n @if (part.type === 'reference') {\r\n <span>{{ part.content }}</span>\r\n }\r\n }\r\n</div>\r\n" }]
|
|
2104
1944
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2105
1945
|
type: Inject,
|
|
2106
1946
|
args: [RICH_MODULE_CONFIG]
|
|
@@ -2117,11 +1957,11 @@ class AdbRichEditorModule {
|
|
|
2117
1957
|
]
|
|
2118
1958
|
};
|
|
2119
1959
|
}
|
|
2120
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2121
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2122
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1960
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbRichEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1961
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AdbRichEditorModule, declarations: [AdbRichEditorComponent, RichTextComponent], imports: [CommonModule, FormsModule], exports: [AdbRichEditorComponent, RichTextComponent] }); }
|
|
1962
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbRichEditorModule, imports: [CommonModule, FormsModule] }); }
|
|
2123
1963
|
}
|
|
2124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1964
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbRichEditorModule, decorators: [{
|
|
2125
1965
|
type: NgModule,
|
|
2126
1966
|
args: [{
|
|
2127
1967
|
imports: [CommonModule, FormsModule],
|
|
@@ -2134,18 +1974,19 @@ class FilterSectionComponent {
|
|
|
2134
1974
|
constructor() {
|
|
2135
1975
|
this.titleResource = 'Not set';
|
|
2136
1976
|
this.helpResource = null;
|
|
1977
|
+
this.lazy = false;
|
|
2137
1978
|
}
|
|
2138
1979
|
ngOnInit() {
|
|
2139
1980
|
this.id = +Math.floor(Math.random() * Date.now());
|
|
2140
1981
|
}
|
|
2141
1982
|
ngOnDestroy() {
|
|
2142
1983
|
}
|
|
2143
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2144
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1984
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FilterSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1985
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: FilterSectionComponent, isStandalone: false, selector: "adb-filter-section", inputs: { titleResource: "titleResource", helpResource: "helpResource", count: "count", expanded: "expanded", lazy: "lazy" }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: "<button [attr.aria-expanded]=\"expanded\" [attr.aria-controls]=\"id\" class=\"btn btn-invisible px-1 bg-white\" type=\"button\" (click)=\"expanded = !expanded\">\r\n <div class=\"d-flex align-items-center gap-1 flex-wrap \">\r\n <div class=\"d-flex align-items-center\">\r\n <i class=\"fas fa-fw\" [ngClass]=\"expanded?'fa-chevron-down':'fa-chevron-right'\"></i>\r\n {{titleResource|translate}}\r\n </div>\r\n @if(helpResource){\r\n <adb-help-button (click)=\"$event.stopPropagation()\">{{helpResource|translate}}</adb-help-button>\r\n }\r\n @if(count > 0){\r\n <div class=\"ms-auto badge bg-dark\">{{count}}</div>\r\n }\r\n </div>\r\n</button>\r\n@if (expanded) {\r\n<div class=\"px-3 pb-3 border-bottom\" [id]=\"id\">\r\n @if (lazy && template) {\r\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n</div>\r\n}", dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AdbHelpButtonComponent, selector: "adb-help-button", inputs: ["buttonClass", "iconClass", "label"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
2145
1986
|
}
|
|
2146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1987
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FilterSectionComponent, decorators: [{
|
|
2147
1988
|
type: Component,
|
|
2148
|
-
args: [{ selector: 'adb-filter-section', standalone: false, template: "<button [attr.aria-expanded]=\"expanded\" [attr.aria-controls]=\"id\" class=\"btn btn-invisible px-1 bg-white\" type=\"button\" (click)=\"expanded = !expanded\">\r\n <div class=\"d-flex align-items-center gap-1 flex-wrap \">\r\n <div class=\"d-flex align-items-center\">\r\n <i class=\"fas fa-fw\" [ngClass]=\"expanded?'fa-chevron-down':'fa-chevron-right'\"></i>\r\n {{titleResource|translate}}\r\n </div>\r\n @if(helpResource){\r\n <adb-help-button (click)=\"$event.stopPropagation()\">{{helpResource|translate}}</adb-help-button>\r\n }\r\n @if(count > 0){\r\n <div class=\"ms-auto badge bg-dark\">{{count}}</div>\r\n }\r\n </div>\r\n</button>\r\n@if(expanded){\r\n<div class=\"px-3 pb-3 border-bottom\" [id]=\"id\">\r\n <ng-content></ng-content>\r\n</div>\r\n}" }]
|
|
1989
|
+
args: [{ selector: 'adb-filter-section', standalone: false, template: "<button [attr.aria-expanded]=\"expanded\" [attr.aria-controls]=\"id\" class=\"btn btn-invisible px-1 bg-white\" type=\"button\" (click)=\"expanded = !expanded\">\r\n <div class=\"d-flex align-items-center gap-1 flex-wrap \">\r\n <div class=\"d-flex align-items-center\">\r\n <i class=\"fas fa-fw\" [ngClass]=\"expanded?'fa-chevron-down':'fa-chevron-right'\"></i>\r\n {{titleResource|translate}}\r\n </div>\r\n @if(helpResource){\r\n <adb-help-button (click)=\"$event.stopPropagation()\">{{helpResource|translate}}</adb-help-button>\r\n }\r\n @if(count > 0){\r\n <div class=\"ms-auto badge bg-dark\">{{count}}</div>\r\n }\r\n </div>\r\n</button>\r\n@if (expanded) {\r\n<div class=\"px-3 pb-3 border-bottom\" [id]=\"id\">\r\n @if (lazy && template) {\r\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\r\n } @else {\r\n <ng-content></ng-content>\r\n }\r\n</div>\r\n}" }]
|
|
2149
1990
|
}], propDecorators: { titleResource: [{
|
|
2150
1991
|
type: Input
|
|
2151
1992
|
}], helpResource: [{
|
|
@@ -2154,14 +1995,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
2154
1995
|
type: Input
|
|
2155
1996
|
}], expanded: [{
|
|
2156
1997
|
type: Input
|
|
1998
|
+
}], lazy: [{
|
|
1999
|
+
type: Input
|
|
2000
|
+
}], template: [{
|
|
2001
|
+
type: ContentChild,
|
|
2002
|
+
args: [TemplateRef]
|
|
2157
2003
|
}] } });
|
|
2158
2004
|
|
|
2159
2005
|
class AdbFilterSectionModule {
|
|
2160
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2161
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2162
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2006
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbFilterSectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2007
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AdbFilterSectionModule, declarations: [FilterSectionComponent], imports: [CommonModule, FormsModule, TranslateModule, AdbButtonsModule], exports: [FilterSectionComponent, AdbButtonsModule] }); }
|
|
2008
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbFilterSectionModule, imports: [CommonModule, FormsModule, TranslateModule, AdbButtonsModule, AdbButtonsModule] }); }
|
|
2163
2009
|
}
|
|
2164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2010
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbFilterSectionModule, decorators: [{
|
|
2165
2011
|
type: NgModule,
|
|
2166
2012
|
args: [{
|
|
2167
2013
|
imports: [CommonModule, FormsModule, TranslateModule, AdbButtonsModule],
|
|
@@ -2384,10 +2230,10 @@ class AdbUserService {
|
|
|
2384
2230
|
ngOnDestroy() {
|
|
2385
2231
|
this.subscriptions.unsubscribe();
|
|
2386
2232
|
}
|
|
2387
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2388
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2233
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbUserService, deps: [{ token: ADB_USER_SERVICE_CONFIG }, { token: i1$2.HttpClient }, { token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2234
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbUserService }); }
|
|
2389
2235
|
}
|
|
2390
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbUserService, decorators: [{
|
|
2391
2237
|
type: Injectable
|
|
2392
2238
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2393
2239
|
type: Inject,
|
|
@@ -2433,10 +2279,10 @@ class AuthCallbackComponent {
|
|
|
2433
2279
|
}
|
|
2434
2280
|
}));
|
|
2435
2281
|
}
|
|
2436
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2437
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2282
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AuthCallbackComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: i1$2.HttpClient }, { token: AdbUserService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2283
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.8", type: AuthCallbackComponent, isStandalone: false, selector: "ng-component", ngImport: i0, template: '<div class="loading-dead-spinner"></div>', isInline: true }); }
|
|
2438
2284
|
}
|
|
2439
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AuthCallbackComponent, decorators: [{
|
|
2440
2286
|
type: Component,
|
|
2441
2287
|
args: [{
|
|
2442
2288
|
template: '<div class="loading-dead-spinner"></div>',
|
|
@@ -2478,10 +2324,10 @@ class AdbUserInterceptor {
|
|
|
2478
2324
|
}
|
|
2479
2325
|
return throwError(() => error);
|
|
2480
2326
|
}
|
|
2481
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2482
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2327
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbUserInterceptor, deps: [{ token: AdbUserService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2328
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbUserInterceptor }); }
|
|
2483
2329
|
}
|
|
2484
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbUserInterceptor, decorators: [{
|
|
2485
2331
|
type: Injectable
|
|
2486
2332
|
}], ctorParameters: () => [{ type: AdbUserService }] });
|
|
2487
2333
|
|
|
@@ -2504,9 +2350,9 @@ class AdbUserModule {
|
|
|
2504
2350
|
],
|
|
2505
2351
|
};
|
|
2506
2352
|
}
|
|
2507
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2508
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2509
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2353
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbUserModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2354
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AdbUserModule, declarations: [AuthCallbackComponent], imports: [CommonModule, i1.RouterModule, i1$1.TranslateModule], exports: [AuthCallbackComponent] }); }
|
|
2355
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbUserModule, providers: [
|
|
2510
2356
|
AdbUserService,
|
|
2511
2357
|
{
|
|
2512
2358
|
provide: HTTP_INTERCEPTORS,
|
|
@@ -2515,7 +2361,7 @@ class AdbUserModule {
|
|
|
2515
2361
|
}
|
|
2516
2362
|
], imports: [CommonModule, RouterModule.forChild(routes), TranslateModule.forChild()] }); }
|
|
2517
2363
|
}
|
|
2518
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbUserModule, decorators: [{
|
|
2519
2365
|
type: NgModule,
|
|
2520
2366
|
args: [{
|
|
2521
2367
|
imports: [CommonModule, RouterModule.forChild(routes), TranslateModule.forChild()],
|
|
@@ -2532,6 +2378,379 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
2532
2378
|
}]
|
|
2533
2379
|
}] });
|
|
2534
2380
|
|
|
2381
|
+
class GenericPickerComponent {
|
|
2382
|
+
constructor() {
|
|
2383
|
+
this.subs = new Subscription();
|
|
2384
|
+
this.searchChanged$ = new BehaviorSubject('');
|
|
2385
|
+
this.disabled = false;
|
|
2386
|
+
this.placeholder = '';
|
|
2387
|
+
this.selectItemChange = new EventEmitter();
|
|
2388
|
+
this.focus = new EventEmitter();
|
|
2389
|
+
this.searchQuery = '';
|
|
2390
|
+
this.loading = false;
|
|
2391
|
+
this.error = null;
|
|
2392
|
+
this.items$ = of([]);
|
|
2393
|
+
this.itemsSnapshot = [];
|
|
2394
|
+
this.showPop = false;
|
|
2395
|
+
this.rowIndex = -1;
|
|
2396
|
+
}
|
|
2397
|
+
set initialValue(item) {
|
|
2398
|
+
if (item) {
|
|
2399
|
+
this.searchQuery = this.displayFn(item);
|
|
2400
|
+
}
|
|
2401
|
+
else {
|
|
2402
|
+
this.searchQuery = '';
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
ngOnInit() {
|
|
2406
|
+
this.items$ = this.searchChanged$.pipe(debounceTime(300), switchMap(query => {
|
|
2407
|
+
if (!query) {
|
|
2408
|
+
this.showPop = false;
|
|
2409
|
+
this.itemsSnapshot = [];
|
|
2410
|
+
this.loading = false;
|
|
2411
|
+
return of([]);
|
|
2412
|
+
}
|
|
2413
|
+
this.loading = true;
|
|
2414
|
+
this.showPop = true;
|
|
2415
|
+
return this.search(query).pipe(map(result => {
|
|
2416
|
+
this.loading = false;
|
|
2417
|
+
const items = result?.records?.length
|
|
2418
|
+
? result.records
|
|
2419
|
+
: result?.items ?? [];
|
|
2420
|
+
this.itemsSnapshot = items;
|
|
2421
|
+
return items;
|
|
2422
|
+
}), catchError$1(err => {
|
|
2423
|
+
this.loading = false;
|
|
2424
|
+
this.error = err;
|
|
2425
|
+
this.itemsSnapshot = [];
|
|
2426
|
+
return of([]);
|
|
2427
|
+
}));
|
|
2428
|
+
}));
|
|
2429
|
+
}
|
|
2430
|
+
onModelChange() {
|
|
2431
|
+
this.rowIndex = -1;
|
|
2432
|
+
this.loading = true;
|
|
2433
|
+
this.showPop = true;
|
|
2434
|
+
this.searchChanged$.next(this.searchQuery);
|
|
2435
|
+
}
|
|
2436
|
+
onArrowDown() {
|
|
2437
|
+
if (!this.itemsSnapshot.length)
|
|
2438
|
+
return;
|
|
2439
|
+
this.rowIndex = (this.rowIndex + 1) % this.itemsSnapshot.length;
|
|
2440
|
+
}
|
|
2441
|
+
onArrowUp() {
|
|
2442
|
+
if (!this.itemsSnapshot.length)
|
|
2443
|
+
return;
|
|
2444
|
+
this.rowIndex = (this.rowIndex - 1 + this.itemsSnapshot.length) % this.itemsSnapshot.length;
|
|
2445
|
+
}
|
|
2446
|
+
onEnter(event) {
|
|
2447
|
+
if (this.rowIndex < 0)
|
|
2448
|
+
return;
|
|
2449
|
+
event.preventDefault();
|
|
2450
|
+
event.stopPropagation();
|
|
2451
|
+
this.selectItem(this.itemsSnapshot[this.rowIndex]);
|
|
2452
|
+
}
|
|
2453
|
+
resetPopup() {
|
|
2454
|
+
this.showPop = false;
|
|
2455
|
+
this.itemsSnapshot = [];
|
|
2456
|
+
this.rowIndex = -1;
|
|
2457
|
+
}
|
|
2458
|
+
selectItem(item) {
|
|
2459
|
+
this.searchQuery = item ? this.displayFn(item) : '';
|
|
2460
|
+
this.selectItemChange.emit(item);
|
|
2461
|
+
this.resetPopup();
|
|
2462
|
+
}
|
|
2463
|
+
resetModel() {
|
|
2464
|
+
this.selectItem(null);
|
|
2465
|
+
}
|
|
2466
|
+
ngOnDestroy() {
|
|
2467
|
+
this.subs.unsubscribe();
|
|
2468
|
+
}
|
|
2469
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: GenericPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2470
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: GenericPickerComponent, isStandalone: false, selector: "adb-generic-picker", inputs: { search: "search", displayFn: "displayFn", loadById: "loadById", disabled: "disabled", placeholder: "placeholder", initialValue: "initialValue" }, outputs: { selectItemChange: "selectItemChange", focus: "focus" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: ["itemTemplate"], descendants: true }], ngImport: i0, template: "<div (adbClickOutside)=\"resetPopup()\">\r\n <div class=\"input-group\">\r\n <input [(ngModel)]=\"searchQuery\" class=\"form-control\" role=\"combobox\" aria-autocomplete=\"list\" [attr.aria-expanded]=\"showPop\" aria-controls=\"picker-listbox\" [disabled]=\"disabled\" autocomplete=\"off\" (keyup.arrowdown)=\"onArrowDown()\"\r\n (keyup.arrowup)=\"onArrowUp()\" (keydown.enter)=\"onEnter($event)\" (keydown.escape)=\"resetPopup()\" (keydown.tab)=\"resetPopup()\" (ngModelChange)=\"onModelChange()\" (focus)=\"focus.emit($event)\" [placeholder]=\"placeholder\" />\r\n @if (searchQuery && !showPop) {\r\n <div>\r\n <button type=\"button\" (click)=\"resetModel()\" class=\"btn btn-secondary border border-start-0\">\r\n <span class=\"fas fa-times\"></span>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n@let items = items$ | async;\r\n@if (showPop) {\r\n<div class=\"pop\">\r\n <div class=\"pop-body\">\r\n <div [class.loading]=\"loading\">\r\n @if (error) {\r\n <div class=\"alert alert-danger mb-0\">\r\n Serverfel\r\n </div>\r\n }\r\n @else {\r\n <ul class=\"list-group list-group-flush\" role=\"listbox\" id=\"picker-listbox\">\r\n @for (item of items; track item; let i = $index) {\r\n <li role=\"option\" class=\"list-group-item list-group-item-action pointer\" [class.active]=\"i === rowIndex\" (click)=\"$event.preventDefault(); $event.stopPropagation(); selectItem(item)\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item, searchQuery: searchQuery }\"></ng-container>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n}", dependencies: [{ kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$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]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[adbClickOutside]", outputs: ["adbClickOutside"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }] }); }
|
|
2471
|
+
}
|
|
2472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: GenericPickerComponent, decorators: [{
|
|
2473
|
+
type: Component,
|
|
2474
|
+
args: [{ selector: 'adb-generic-picker', standalone: false, template: "<div (adbClickOutside)=\"resetPopup()\">\r\n <div class=\"input-group\">\r\n <input [(ngModel)]=\"searchQuery\" class=\"form-control\" role=\"combobox\" aria-autocomplete=\"list\" [attr.aria-expanded]=\"showPop\" aria-controls=\"picker-listbox\" [disabled]=\"disabled\" autocomplete=\"off\" (keyup.arrowdown)=\"onArrowDown()\"\r\n (keyup.arrowup)=\"onArrowUp()\" (keydown.enter)=\"onEnter($event)\" (keydown.escape)=\"resetPopup()\" (keydown.tab)=\"resetPopup()\" (ngModelChange)=\"onModelChange()\" (focus)=\"focus.emit($event)\" [placeholder]=\"placeholder\" />\r\n @if (searchQuery && !showPop) {\r\n <div>\r\n <button type=\"button\" (click)=\"resetModel()\" class=\"btn btn-secondary border border-start-0\">\r\n <span class=\"fas fa-times\"></span>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n@let items = items$ | async;\r\n@if (showPop) {\r\n<div class=\"pop\">\r\n <div class=\"pop-body\">\r\n <div [class.loading]=\"loading\">\r\n @if (error) {\r\n <div class=\"alert alert-danger mb-0\">\r\n Serverfel\r\n </div>\r\n }\r\n @else {\r\n <ul class=\"list-group list-group-flush\" role=\"listbox\" id=\"picker-listbox\">\r\n @for (item of items; track item; let i = $index) {\r\n <li role=\"option\" class=\"list-group-item list-group-item-action pointer\" [class.active]=\"i === rowIndex\" (click)=\"$event.preventDefault(); $event.stopPropagation(); selectItem(item)\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item, searchQuery: searchQuery }\"></ng-container>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n}" }]
|
|
2475
|
+
}], propDecorators: { search: [{
|
|
2476
|
+
type: Input
|
|
2477
|
+
}], displayFn: [{
|
|
2478
|
+
type: Input
|
|
2479
|
+
}], loadById: [{
|
|
2480
|
+
type: Input
|
|
2481
|
+
}], disabled: [{
|
|
2482
|
+
type: Input
|
|
2483
|
+
}], placeholder: [{
|
|
2484
|
+
type: Input
|
|
2485
|
+
}], itemTemplate: [{
|
|
2486
|
+
type: ContentChild,
|
|
2487
|
+
args: ['itemTemplate']
|
|
2488
|
+
}], selectItemChange: [{
|
|
2489
|
+
type: Output
|
|
2490
|
+
}], focus: [{
|
|
2491
|
+
type: Output
|
|
2492
|
+
}], initialValue: [{
|
|
2493
|
+
type: Input
|
|
2494
|
+
}] } });
|
|
2495
|
+
|
|
2496
|
+
const ADB_PICKER_CONFIG = new InjectionToken('ADB_PICKER_CONFIG');
|
|
2497
|
+
class AdbPickerConfigService {
|
|
2498
|
+
constructor(config) {
|
|
2499
|
+
this.areas = config.api + '/areas';
|
|
2500
|
+
this.taxa = config.api + '/taxalookup';
|
|
2501
|
+
}
|
|
2502
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbPickerConfigService, deps: [{ token: ADB_PICKER_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2503
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbPickerConfigService }); }
|
|
2504
|
+
}
|
|
2505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbPickerConfigService, decorators: [{
|
|
2506
|
+
type: Injectable
|
|
2507
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2508
|
+
type: Inject,
|
|
2509
|
+
args: [ADB_PICKER_CONFIG]
|
|
2510
|
+
}] }] });
|
|
2511
|
+
|
|
2512
|
+
class AdbTaxonPickerComponent {
|
|
2513
|
+
constructor(config, http) {
|
|
2514
|
+
this.config = config;
|
|
2515
|
+
this.http = http;
|
|
2516
|
+
this.fullWidth = true;
|
|
2517
|
+
this.placeholder = 'Sök taxon';
|
|
2518
|
+
this.useObject = false;
|
|
2519
|
+
this.prefill = false;
|
|
2520
|
+
this.initialValue = null;
|
|
2521
|
+
this.isDisabled = false;
|
|
2522
|
+
this.loading = false;
|
|
2523
|
+
this.showPrefill = false;
|
|
2524
|
+
this.onChange = () => { };
|
|
2525
|
+
this.onTouched = () => { };
|
|
2526
|
+
this.getTaxa = (query) => {
|
|
2527
|
+
this.loading = true;
|
|
2528
|
+
const params = { search: query };
|
|
2529
|
+
return this.http.get(this.config.taxa, { params }).pipe(map$1(result => Array.isArray(result) ? { items: result } : result), tap(() => this.loading = false), catchError(() => {
|
|
2530
|
+
this.loading = false;
|
|
2531
|
+
return of({ items: [] });
|
|
2532
|
+
}));
|
|
2533
|
+
};
|
|
2534
|
+
this.displayTaxon = (taxon) => {
|
|
2535
|
+
if (!taxon)
|
|
2536
|
+
return '';
|
|
2537
|
+
if (taxon.swedishName && taxon.scientificName) {
|
|
2538
|
+
return `${taxon.swedishName} ${taxon.scientificName}`;
|
|
2539
|
+
}
|
|
2540
|
+
return taxon.scientificName ?? '';
|
|
2541
|
+
};
|
|
2542
|
+
}
|
|
2543
|
+
loadTaxonById(id) {
|
|
2544
|
+
if (!id)
|
|
2545
|
+
return of(null);
|
|
2546
|
+
this.loading = true;
|
|
2547
|
+
return this.http.get(`${this.config.taxa}/${id}`).pipe(tap(() => this.loading = false), catchError(() => {
|
|
2548
|
+
this.loading = false;
|
|
2549
|
+
return of(null);
|
|
2550
|
+
}));
|
|
2551
|
+
}
|
|
2552
|
+
onSelect(taxon) {
|
|
2553
|
+
const value = this.useObject ? taxon : taxon?.id ?? null;
|
|
2554
|
+
this.onChange(value);
|
|
2555
|
+
}
|
|
2556
|
+
onFocus() {
|
|
2557
|
+
this.showPrefill = true;
|
|
2558
|
+
}
|
|
2559
|
+
writeValue(value) {
|
|
2560
|
+
if (!value) {
|
|
2561
|
+
this.initialValue = null;
|
|
2562
|
+
return;
|
|
2563
|
+
}
|
|
2564
|
+
if (this.useObject) {
|
|
2565
|
+
if (value.id) {
|
|
2566
|
+
this.loadTaxonById(value.id).subscribe(taxon => {
|
|
2567
|
+
this.initialValue = taxon;
|
|
2568
|
+
});
|
|
2569
|
+
}
|
|
2570
|
+
else {
|
|
2571
|
+
this.initialValue = value;
|
|
2572
|
+
}
|
|
2573
|
+
}
|
|
2574
|
+
else {
|
|
2575
|
+
this.loadTaxonById(value).subscribe(taxon => {
|
|
2576
|
+
this.initialValue = taxon;
|
|
2577
|
+
});
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2580
|
+
registerOnChange(fn) {
|
|
2581
|
+
this.onChange = fn;
|
|
2582
|
+
}
|
|
2583
|
+
registerOnTouched(fn) {
|
|
2584
|
+
this.onTouched = fn;
|
|
2585
|
+
}
|
|
2586
|
+
setDisabledState(isDisabled) {
|
|
2587
|
+
this.isDisabled = isDisabled;
|
|
2588
|
+
}
|
|
2589
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbTaxonPickerComponent, deps: [{ token: AdbPickerConfigService }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2590
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: AdbTaxonPickerComponent, isStandalone: false, selector: "adb-taxon-picker", inputs: { placeholder: "placeholder", useObject: "useObject", prefill: "prefill" }, host: { properties: { "class.w-100": "this.fullWidth" } }, providers: [
|
|
2591
|
+
{
|
|
2592
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2593
|
+
useExisting: forwardRef((() => AdbTaxonPickerComponent)),
|
|
2594
|
+
multi: true
|
|
2595
|
+
}
|
|
2596
|
+
], ngImport: i0, template: "<adb-generic-picker [search]=\"getTaxa\" [displayFn]=\"displayTaxon\" [placeholder]=\"placeholder\" [disabled]=\"isDisabled\" [initialValue]=\"initialValue\" (selectItemChange)=\"onSelect($event)\" (focus)=\"onFocus()\">\r\n <ng-template #itemTemplate let-taxon let-searchQuery=\"searchQuery\">\r\n <div class=\"d-flex flex-wrap gap-1 align-items-center\">\r\n <div innerHTML=\"{{taxon.swedishName | adbHighlight: searchQuery}}\"></div>\r\n <em innerHTML=\"{{taxon.scientificName | adbHighlight: searchQuery}}\"></em>\r\n </div>\r\n </ng-template>\r\n</adb-generic-picker>\r\n@if (showPrefill && prefill) {\r\n<div class=\"pop\">\r\n <div class=\"pop-body\">\r\n <div class=\"p-3\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n}", dependencies: [{ kind: "component", type: GenericPickerComponent, selector: "adb-generic-picker", inputs: ["search", "displayFn", "loadById", "disabled", "placeholder", "initialValue"], outputs: ["selectItemChange", "focus"] }, { kind: "pipe", type: HighlightPipe, name: "adbHighlight" }] }); }
|
|
2597
|
+
}
|
|
2598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbTaxonPickerComponent, decorators: [{
|
|
2599
|
+
type: Component,
|
|
2600
|
+
args: [{ selector: 'adb-taxon-picker', standalone: false, providers: [
|
|
2601
|
+
{
|
|
2602
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2603
|
+
useExisting: forwardRef((() => AdbTaxonPickerComponent)),
|
|
2604
|
+
multi: true
|
|
2605
|
+
}
|
|
2606
|
+
], template: "<adb-generic-picker [search]=\"getTaxa\" [displayFn]=\"displayTaxon\" [placeholder]=\"placeholder\" [disabled]=\"isDisabled\" [initialValue]=\"initialValue\" (selectItemChange)=\"onSelect($event)\" (focus)=\"onFocus()\">\r\n <ng-template #itemTemplate let-taxon let-searchQuery=\"searchQuery\">\r\n <div class=\"d-flex flex-wrap gap-1 align-items-center\">\r\n <div innerHTML=\"{{taxon.swedishName | adbHighlight: searchQuery}}\"></div>\r\n <em innerHTML=\"{{taxon.scientificName | adbHighlight: searchQuery}}\"></em>\r\n </div>\r\n </ng-template>\r\n</adb-generic-picker>\r\n@if (showPrefill && prefill) {\r\n<div class=\"pop\">\r\n <div class=\"pop-body\">\r\n <div class=\"p-3\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n}" }]
|
|
2607
|
+
}], ctorParameters: () => [{ type: AdbPickerConfigService }, { type: i1$2.HttpClient }], propDecorators: { fullWidth: [{
|
|
2608
|
+
type: HostBinding,
|
|
2609
|
+
args: ['class.w-100']
|
|
2610
|
+
}], placeholder: [{
|
|
2611
|
+
type: Input
|
|
2612
|
+
}], useObject: [{
|
|
2613
|
+
type: Input
|
|
2614
|
+
}], prefill: [{
|
|
2615
|
+
type: Input
|
|
2616
|
+
}] } });
|
|
2617
|
+
|
|
2618
|
+
class AdbAreaPickerComponent {
|
|
2619
|
+
constructor(translate, config, http) {
|
|
2620
|
+
this.translate = translate;
|
|
2621
|
+
this.config = config;
|
|
2622
|
+
this.http = http;
|
|
2623
|
+
this.fullWidth = true;
|
|
2624
|
+
this.placeholder = 'Sök område';
|
|
2625
|
+
this.useObject = false;
|
|
2626
|
+
this.prefill = false;
|
|
2627
|
+
this.initialValue = null;
|
|
2628
|
+
this.isDisabled = false;
|
|
2629
|
+
this.loading = false;
|
|
2630
|
+
this.showPrefill = false;
|
|
2631
|
+
this.onChange = () => { };
|
|
2632
|
+
this.onTouched = () => { };
|
|
2633
|
+
this.getAreas = (query) => {
|
|
2634
|
+
this.showPrefill = false;
|
|
2635
|
+
const params = { search: query, skip: 0, take: 10 };
|
|
2636
|
+
return this.http.get(this.config.areas, { params: params });
|
|
2637
|
+
};
|
|
2638
|
+
this.displayArea = (area) => {
|
|
2639
|
+
if (!area || Object.keys(area).length === 0) {
|
|
2640
|
+
return '';
|
|
2641
|
+
}
|
|
2642
|
+
return area ? `${area.name} ${this.translate.instant('AREATYPES.' + area.areaType)}` : '';
|
|
2643
|
+
};
|
|
2644
|
+
this.loadAreaId = (id) => {
|
|
2645
|
+
this.loading = true;
|
|
2646
|
+
const url = `${this.config.areas}/${id}`;
|
|
2647
|
+
return this.http.get(url).pipe(tap(() => this.loading = false));
|
|
2648
|
+
};
|
|
2649
|
+
}
|
|
2650
|
+
onSelect(area) {
|
|
2651
|
+
const value = this.useObject ? area : area?.id ?? null;
|
|
2652
|
+
this.onChange(value);
|
|
2653
|
+
}
|
|
2654
|
+
onFocus() {
|
|
2655
|
+
this.showPrefill = true;
|
|
2656
|
+
}
|
|
2657
|
+
writeValue(value) {
|
|
2658
|
+
if (!value) {
|
|
2659
|
+
this.initialValue = null;
|
|
2660
|
+
return;
|
|
2661
|
+
}
|
|
2662
|
+
if (this.useObject) {
|
|
2663
|
+
if (value.id) {
|
|
2664
|
+
this.loadAreaId(value.id).subscribe(area => {
|
|
2665
|
+
this.initialValue = area;
|
|
2666
|
+
});
|
|
2667
|
+
}
|
|
2668
|
+
else {
|
|
2669
|
+
this.initialValue = value;
|
|
2670
|
+
}
|
|
2671
|
+
}
|
|
2672
|
+
else {
|
|
2673
|
+
this.loadAreaId(value).subscribe(area => {
|
|
2674
|
+
this.initialValue = area;
|
|
2675
|
+
});
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
registerOnChange(fn) {
|
|
2679
|
+
this.onChange = fn;
|
|
2680
|
+
}
|
|
2681
|
+
registerOnTouched(fn) {
|
|
2682
|
+
this.onTouched = fn;
|
|
2683
|
+
}
|
|
2684
|
+
setDisabledState(isDisabled) {
|
|
2685
|
+
this.isDisabled = isDisabled;
|
|
2686
|
+
}
|
|
2687
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbAreaPickerComponent, deps: [{ token: i1$1.TranslateService }, { token: AdbPickerConfigService }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2688
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: AdbAreaPickerComponent, isStandalone: false, selector: "adb-area-picker", inputs: { placeholder: "placeholder", useObject: "useObject", prefill: "prefill" }, host: { properties: { "class.w-100": "this.fullWidth" } }, providers: [
|
|
2689
|
+
{
|
|
2690
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2691
|
+
useExisting: forwardRef((() => AdbAreaPickerComponent)),
|
|
2692
|
+
multi: true
|
|
2693
|
+
}
|
|
2694
|
+
], ngImport: i0, template: "<adb-generic-picker [search]=\"getAreas\" [displayFn]=\"displayArea\" [placeholder]=\"placeholder\" [disabled]=\"isDisabled\" [initialValue]=\"initialValue\" (selectItemChange)=\"onSelect($event)\" (focus)=\"onFocus()\">\r\n <ng-template #itemTemplate let-area let-searchQuery=\"searchQuery\">\r\n <div class=\"d-flex flex-wrap gap-1 align-items-center\">\r\n <div innerHTML=\"{{area.name|adbHighlight: searchQuery}}\"></div>\r\n <div>{{'AREATYPES.'+area.areaType|translate}}</div>\r\n </div>\r\n </ng-template>\r\n</adb-generic-picker>\r\n@if (showPrefill && prefill) {\r\n<div class=\"pop\">\r\n <div class=\"pop-body\">\r\n <div class=\"p-3\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n}", dependencies: [{ kind: "component", type: GenericPickerComponent, selector: "adb-generic-picker", inputs: ["search", "displayFn", "loadById", "disabled", "placeholder", "initialValue"], outputs: ["selectItemChange", "focus"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: HighlightPipe, name: "adbHighlight" }] }); }
|
|
2695
|
+
}
|
|
2696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbAreaPickerComponent, decorators: [{
|
|
2697
|
+
type: Component,
|
|
2698
|
+
args: [{ selector: 'adb-area-picker', standalone: false, providers: [
|
|
2699
|
+
{
|
|
2700
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2701
|
+
useExisting: forwardRef((() => AdbAreaPickerComponent)),
|
|
2702
|
+
multi: true
|
|
2703
|
+
}
|
|
2704
|
+
], template: "<adb-generic-picker [search]=\"getAreas\" [displayFn]=\"displayArea\" [placeholder]=\"placeholder\" [disabled]=\"isDisabled\" [initialValue]=\"initialValue\" (selectItemChange)=\"onSelect($event)\" (focus)=\"onFocus()\">\r\n <ng-template #itemTemplate let-area let-searchQuery=\"searchQuery\">\r\n <div class=\"d-flex flex-wrap gap-1 align-items-center\">\r\n <div innerHTML=\"{{area.name|adbHighlight: searchQuery}}\"></div>\r\n <div>{{'AREATYPES.'+area.areaType|translate}}</div>\r\n </div>\r\n </ng-template>\r\n</adb-generic-picker>\r\n@if (showPrefill && prefill) {\r\n<div class=\"pop\">\r\n <div class=\"pop-body\">\r\n <div class=\"p-3\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n}" }]
|
|
2705
|
+
}], ctorParameters: () => [{ type: i1$1.TranslateService }, { type: AdbPickerConfigService }, { type: i1$2.HttpClient }], propDecorators: { fullWidth: [{
|
|
2706
|
+
type: HostBinding,
|
|
2707
|
+
args: ['class.w-100']
|
|
2708
|
+
}], placeholder: [{
|
|
2709
|
+
type: Input
|
|
2710
|
+
}], useObject: [{
|
|
2711
|
+
type: Input
|
|
2712
|
+
}], prefill: [{
|
|
2713
|
+
type: Input
|
|
2714
|
+
}] } });
|
|
2715
|
+
|
|
2716
|
+
class AdbPickerModule {
|
|
2717
|
+
static forRoot(config) {
|
|
2718
|
+
return {
|
|
2719
|
+
ngModule: AdbPickerModule,
|
|
2720
|
+
providers: [
|
|
2721
|
+
{
|
|
2722
|
+
provide: ADB_PICKER_CONFIG,
|
|
2723
|
+
useValue: config
|
|
2724
|
+
}
|
|
2725
|
+
]
|
|
2726
|
+
};
|
|
2727
|
+
}
|
|
2728
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2729
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: AdbPickerModule, declarations: [GenericPickerComponent,
|
|
2730
|
+
AdbAreaPickerComponent,
|
|
2731
|
+
AdbTaxonPickerComponent], imports: [CommonModule, FormsModule, i1$1.TranslateModule, AdbPipesModule, AdbDirectivesModule], exports: [GenericPickerComponent,
|
|
2732
|
+
AdbAreaPickerComponent,
|
|
2733
|
+
AdbTaxonPickerComponent] }); }
|
|
2734
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbPickerModule, providers: [AdbPickerConfigService], imports: [CommonModule, FormsModule, TranslateModule.forChild(), AdbPipesModule, AdbDirectivesModule] }); }
|
|
2735
|
+
}
|
|
2736
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: AdbPickerModule, decorators: [{
|
|
2737
|
+
type: NgModule,
|
|
2738
|
+
args: [{
|
|
2739
|
+
imports: [CommonModule, FormsModule, TranslateModule.forChild(), AdbPipesModule, AdbDirectivesModule],
|
|
2740
|
+
declarations: [
|
|
2741
|
+
GenericPickerComponent,
|
|
2742
|
+
AdbAreaPickerComponent,
|
|
2743
|
+
AdbTaxonPickerComponent
|
|
2744
|
+
],
|
|
2745
|
+
exports: [
|
|
2746
|
+
GenericPickerComponent,
|
|
2747
|
+
AdbAreaPickerComponent,
|
|
2748
|
+
AdbTaxonPickerComponent
|
|
2749
|
+
],
|
|
2750
|
+
providers: [AdbPickerConfigService]
|
|
2751
|
+
}]
|
|
2752
|
+
}] });
|
|
2753
|
+
|
|
2535
2754
|
/*
|
|
2536
2755
|
* Public API Surface of artdata-shared
|
|
2537
2756
|
*/
|
|
@@ -2540,5 +2759,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
2540
2759
|
* Generated bundle index. Do not edit.
|
|
2541
2760
|
*/
|
|
2542
2761
|
|
|
2543
|
-
export {
|
|
2762
|
+
export { ADB_PICKER_CONFIG, ADB_USER_SERVICE_CONFIG, AdbAreaPickerComponent, AdbButtonsModule, AdbConfirmModal, AdbDatePickerComponent, AdbDatePickerDirective, AdbDatePickerModule, AdbDirectivesModule, AdbDropdown2Directive, AdbDropdownDirective, AdbDropdownModule, AdbFilterSectionModule, AdbHelpButtonComponent, AdbModalModule, AdbModalService, AdbPagersModule, AdbPickerConfigService, AdbPickerModule, AdbPipesModule, AdbRichEditorComponent, AdbRichEditorModule, AdbTaxonPickerComponent, AdbToast, AdbToastModule, AdbToastService, AdbUserInterceptor, AdbUserModule, AdbUserService, ArtportalenFooterComponent, ArtportalenNavComponent, ArtportalenNavModule, AuthCallbackComponent, ClickOutsideDirective, DEFAULT_ADB_USER_SERVICE_CONFIG, EmptyValuePipe, EnvironmentService, FileUploadDirective, FilterSectionComponent, FocusDirective, GenericPickerComponent, HighlightHtmlPipe, HighlightPipe, ImageLoaderDirective, InfiniteScrollComponent, LocaleDatePipe, NumberSpacingPipe, PagerComponent, PagerInlineComponent, RedListBadgeClassDirective, RichTextComponent, RiskClassDirective, RouterLinkActiveFragmentDirective, ToastType, UserModuleConstants };
|
|
2544
2763
|
//# sourceMappingURL=adb-shared.mjs.map
|