@design-factory/design-factory 15.2.2 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -1
- package/assets/fonts/amadeus-neue/bold/AmadeusNeue-Bold.ttf +0 -0
- package/assets/fonts/amadeus-neue/bold/AmadeusNeue-Bold.woff +0 -0
- package/assets/fonts/amadeus-neue/bold/AmadeusNeue-Bold.woff2 +0 -0
- package/assets/fonts/amadeus-neue/bold/AmadeusNeue-BoldItalic.ttf +0 -0
- package/assets/fonts/amadeus-neue/bold/AmadeusNeue-BoldItalic.woff +0 -0
- package/assets/fonts/amadeus-neue/bold/AmadeusNeue-BoldItalic.woff2 +0 -0
- package/assets/fonts/amadeus-neue/light/AmadeusNeue-Light.ttf +0 -0
- package/assets/fonts/amadeus-neue/light/AmadeusNeue-Light.woff +0 -0
- package/assets/fonts/amadeus-neue/light/AmadeusNeue-Light.woff2 +0 -0
- package/assets/fonts/amadeus-neue/light/AmadeusNeue-LightItalic.ttf +0 -0
- package/assets/fonts/amadeus-neue/light/AmadeusNeue-LightItalic.woff +0 -0
- package/assets/fonts/amadeus-neue/light/AmadeusNeue-LightItalic.woff2 +0 -0
- package/assets/fonts/amadeus-neue/medium/AmadeusNeue-Medium.ttf +0 -0
- package/assets/fonts/amadeus-neue/medium/AmadeusNeue-Medium.woff +0 -0
- package/assets/fonts/amadeus-neue/medium/AmadeusNeue-Medium.woff2 +0 -0
- package/assets/fonts/amadeus-neue/medium/AmadeusNeue-MediumItalic.ttf +0 -0
- package/assets/fonts/amadeus-neue/medium/AmadeusNeue-MediumItalic.woff +0 -0
- package/assets/fonts/amadeus-neue/medium/AmadeusNeue-MediumItalic.woff2 +0 -0
- package/assets/fonts/amadeus-neue/regular/AmadeusNeue-Regular.ttf +0 -0
- package/assets/fonts/amadeus-neue/regular/AmadeusNeue-Regular.woff +0 -0
- package/assets/fonts/amadeus-neue/regular/AmadeusNeue-Regular.woff2 +0 -0
- package/assets/fonts/amadeus-neue/regular/AmadeusNeue-RegularItalic.ttf +0 -0
- package/assets/fonts/amadeus-neue/regular/AmadeusNeue-RegularItalic.woff +0 -0
- package/assets/fonts/amadeus-neue/regular/AmadeusNeue-RegularItalic.woff2 +0 -0
- package/design-factory-initial-branding.css +1 -0
- package/design-factory-initial-branding.scss +1 -0
- package/design-factory.css +1 -3
- package/design-factory.scss +1 -0
- package/esm2022/lib/angular/accessibility/components/skip-links-container/skip-links-container.component.mjs +3 -3
- package/esm2022/lib/angular/df.module.mjs +102 -0
- package/esm2022/lib/angular/icon/amadeus-icon.mjs +2 -2
- package/esm2022/lib/angular/stepper/stepper.component.mjs +65 -0
- package/esm2022/lib/angular/stepper/stepper.directive.mjs +174 -0
- package/esm2022/lib/angular/stepper/stepper.module.mjs +17 -0
- package/esm2022/lib/angular/stepper/stepper.service.mjs +213 -0
- package/esm2022/lib/index.mjs +9 -94
- package/fesm2022/design-factory.mjs +1854 -1394
- package/fesm2022/design-factory.mjs.map +1 -1
- package/lib/angular/df.module.d.ts +26 -0
- package/lib/angular/stepper/stepper.component.d.ts +31 -0
- package/lib/angular/stepper/stepper.directive.d.ts +37 -0
- package/lib/angular/stepper/stepper.module.d.ts +8 -0
- package/lib/angular/stepper/stepper.service.d.ts +126 -0
- package/lib/index.d.ts +7 -22
- package/package.json +23 -4
- package/schematics/migrations/15_0_0/remove-ngx-slider/index.js +0 -1
- package/schematics/migrations/16_0_0/navbar-logo-dark/index.d.ts +9 -0
- package/schematics/migrations/16_0_0/navbar-logo-dark/index.js +43 -0
- package/schematics/migrations/16_0_0/revert-to-old-brand/index.d.ts +7 -0
- package/schematics/migrations/16_0_0/revert-to-old-brand/index.js +115 -0
- package/schematics/migrations/16_0_0/scss-var/files/removed.json +55 -0
- package/schematics/migrations/16_0_0/scss-var/files/renames.json +76 -0
- package/schematics/migrations/16_0_0/scss-var/index.d.ts +7 -0
- package/schematics/migrations/16_0_0/scss-var/index.js +57 -0
- package/schematics/migrations/16_0_0/stepper-classes/index.d.ts +13 -0
- package/schematics/migrations/16_0_0/stepper-classes/index.js +63 -0
- package/schematics/migrations/helpers.js +0 -1
- package/schematics/migrations/migration.json +23 -1
- package/schematics/migrations/utils/component-resource-collector.d.ts +44 -0
- package/schematics/migrations/utils/component-resource-collector.js +166 -0
- package/schematics/migrations/utils/project_tsconfig_paths.js +0 -1
- package/schematics/migrations/utils/style-updater.d.ts +9 -0
- package/schematics/migrations/utils/style-updater.js +38 -0
- package/schematics/migrations/utils/template-updater.d.ts +9 -0
- package/schematics/migrations/utils/template-updater.js +38 -0
- package/schematics/migrations/utils/typescript/compiler_host.js +0 -1
- package/schematics/migrations/utils/typescript/decorators.d.ts +22 -0
- package/schematics/migrations/utils/typescript/decorators.js +41 -0
- package/schematics/migrations/utils/typescript/functions.d.ts +14 -0
- package/schematics/migrations/utils/typescript/functions.js +20 -0
- package/schematics/migrations/utils/typescript/imports.d.ts +17 -0
- package/schematics/migrations/utils/typescript/imports.js +110 -0
- package/schematics/migrations/utils/typescript/line-mappings.d.ts +21 -0
- package/schematics/migrations/utils/typescript/line-mappings.js +75 -0
- package/schematics/migrations/utils/typescript/parse_tsconfig.js +0 -1
- package/schematics/migrations/utils/typescript/property-name.d.ts +18 -0
- package/schematics/migrations/utils/typescript/property-name.js +27 -0
- package/schematics/ng-add/index.js +0 -1
- package/schematics/ng-add/schema.js +0 -1
- package/styles/scss/_common.root.scss +37 -0
- package/styles/scss/_common.scss +3 -9
- package/styles/scss/_common.variables.scss +16 -6
- package/styles/scss/_variables.scss +0 -1
- package/styles/scss/bootstrap/_maps.scss +10 -9
- package/styles/scss/bootstrap/_mixins-override.scss +26 -0
- package/styles/scss/bootstrap/_variables.scss +927 -267
- package/styles/scss/components/accordion/_accordion.scss +31 -14
- package/styles/scss/components/accordion/_accordion.variables.scss +5 -5
- package/styles/scss/components/alert/_alert.scss +130 -228
- package/styles/scss/components/alert/_alert.variables.scss +22 -33
- package/styles/scss/components/badge/_badge.scss +130 -118
- package/styles/scss/components/badge/_badge.variables.scss +14 -8
- package/styles/scss/components/brand-color/_brand-color.mixins.scss +19 -4
- package/styles/scss/components/brand-color/_brand-color.scss +4 -6
- package/styles/scss/components/brand-color/_brand-color.variables.scss +1 -7
- package/styles/scss/components/brand-color/_brand-color_container.scss +28 -0
- package/styles/scss/components/breadcrumbs/_breadcrumbs.scss +77 -65
- package/styles/scss/components/breadcrumbs/_breadcrumbs.variables.scss +6 -4
- package/styles/scss/components/button/_button.scss +120 -55
- package/styles/scss/components/button/_button.variables.scss +18 -4
- package/styles/scss/components/button/_button_container.scss +9 -45
- package/styles/scss/components/card/_card.scss +90 -58
- package/styles/scss/components/card/_card.variables.scss +13 -13
- package/styles/scss/components/carousel/_carousel.scss +22 -23
- package/styles/scss/components/carousel/_carousel.variables.scss +2 -1
- package/styles/scss/components/checkbox/_checkbox.scss +14 -8
- package/styles/scss/components/checkbox/_checkbox.variables.scss +2 -2
- package/styles/scss/components/collapse/_collapse.scss +15 -7
- package/styles/scss/components/collapse/_collapse.variables.scss +3 -3
- package/styles/scss/components/datepicker/_datepicker.scss +178 -122
- package/styles/scss/components/datepicker/_datepicker.variables.scss +22 -15
- package/styles/scss/components/dropdown/_dropdown.mixins.scss +4 -4
- package/styles/scss/components/dropdown/_dropdown.scss +39 -19
- package/styles/scss/components/dropdown/_dropdown.variables.scss +4 -4
- package/styles/scss/components/fieldset/_fieldset.scss +4 -2
- package/styles/scss/components/fonts/_fonts-family.scss +112 -29
- package/styles/scss/components/fonts/_fonts.root.scss +27 -0
- package/styles/scss/components/fonts/_fonts.scss +25 -26
- package/styles/scss/components/fonts/_fonts.variables.scss +2 -2
- package/styles/scss/components/footer/_footer.scss +48 -18
- package/styles/scss/components/footer/_footer.variables.scss +4 -2
- package/styles/scss/components/form/_form.scss +69 -16
- package/styles/scss/components/form/_form.variables.scss +23 -3
- package/styles/scss/components/icon/_amadeus-icon.scss +2 -2
- package/styles/scss/components/icon/_amadeus-icon.variables.scss +1 -0
- package/styles/scss/components/inputs/_inputs.mixin.scss +8 -4
- package/styles/scss/components/inputs/_inputs.root.scss +8 -0
- package/styles/scss/components/inputs/_inputs.scss +159 -118
- package/styles/scss/components/inputs/_inputs.variables.scss +2 -1
- package/styles/scss/components/link/_link.mixins.scss +49 -49
- package/styles/scss/components/link/_link.scss +84 -22
- package/styles/scss/components/link/_link.variables.scss +6 -6
- package/styles/scss/components/list/_list.scss +10 -5
- package/styles/scss/components/list-group/_list-group.scss +54 -48
- package/styles/scss/components/list-group/_list-group.variables.scss +6 -14
- package/styles/scss/components/media/_media.scss +17 -9
- package/styles/scss/components/media/_media.variables.scss +2 -1
- package/styles/scss/components/modal/_modal.scss +88 -39
- package/styles/scss/components/modal/_modal.variables.scss +4 -5
- package/styles/scss/components/navbar/_navbar.scss +298 -115
- package/styles/scss/components/navbar/_navbar.variables.scss +29 -18
- package/styles/scss/components/pagination/_pagination.scss +68 -82
- package/styles/scss/components/pagination/_pagination.variables.scss +5 -8
- package/styles/scss/components/pagination/_pagination_container.scss +3 -0
- package/styles/scss/components/popover/_popover.mixin.scss +20 -33
- package/styles/scss/components/popover/_popover.scss +25 -7
- package/styles/scss/components/popover/_popover_container.scss +123 -74
- package/styles/scss/components/progressbar/_progressbar.scss +15 -7
- package/styles/scss/components/progressbar/_progressbar.variables.scss +3 -2
- package/styles/scss/components/radio/_radio.scss +19 -14
- package/styles/scss/components/rating/_rating.scss +41 -22
- package/styles/scss/components/rating/_rating.variables.scss +5 -5
- package/styles/scss/components/scrollspy/_scrollspy.scss +30 -13
- package/styles/scss/components/scrollspy/_scrollspy.variables.scss +2 -1
- package/styles/scss/components/select/_select.scss +232 -166
- package/styles/scss/components/select/_select.variables.scss +15 -15
- package/styles/scss/components/separator/_separator.scss +2 -1
- package/styles/scss/components/sidenav/_sidenav.scss +208 -135
- package/styles/scss/components/sidenav/_sidenav.variables.scss +19 -20
- package/styles/scss/components/skip-links/_skip-links.scss +31 -16
- package/styles/scss/components/skip-links/_skip-links.variables.scss +6 -6
- package/styles/scss/components/slider/_slider.scss +11 -10
- package/styles/scss/components/slider/_slider.variables.scss +8 -8
- package/styles/scss/components/speechbubble/_speechbubble.scss +50 -30
- package/styles/scss/components/speechbubble/_speechbubble.variables.scss +4 -2
- package/styles/scss/components/spinner/_spinner.scss +34 -29
- package/styles/scss/components/stepper/_stepper.mixins.scss +111 -151
- package/styles/scss/components/stepper/_stepper.scss +163 -69
- package/styles/scss/components/stepper/_stepper.variables.scss +23 -17
- package/styles/scss/components/table/_advancedtables.scss +50 -31
- package/styles/scss/components/table/_table.variables.scss +3 -2
- package/styles/scss/components/tabs/_tabs.scss +98 -49
- package/styles/scss/components/tabs/_tabs.variables.scss +11 -10
- package/styles/scss/components/toast/_toast.scss +136 -68
- package/styles/scss/components/toast/_toast.variables.scss +4 -4
- package/styles/scss/components/toggle/_toggle.scss +90 -44
- package/styles/scss/components/toggle/_toggle.variables.scss +7 -5
- package/styles/scss/components/typeahead/_typeahead.scss +18 -8
- package/styles/scss/components/typeahead/_typeahead.variables.scss +1 -1
- package/styles/scss/df-styles-namespace.scss +8 -11
- package/styles/scss/df-styles.scss +6 -3
- package/styles/scss/themes/brand2023/_variables.scss +585 -0
- package/styles/scss/utilities/_common.utilities.scss +112 -32
- package/assets/fonts/amadeus-light/amadeus-light.svg +0 -8658
- package/assets/fonts/amadeus-light/amadeus-light.ttf +0 -0
- package/assets/fonts/amadeus-light/amadeus-light.woff +0 -0
- package/assets/fonts/amadeus-light/amadeus-light.woff2 +0 -0
- package/assets/icon-amadeus.svg +0 -1
- package/schematics/migrations/15_0_0/remove-ngx-slider/index.js.map +0 -1
- package/schematics/migrations/helpers.js.map +0 -1
- package/schematics/migrations/utils/project_tsconfig_paths.js.map +0 -1
- package/schematics/migrations/utils/typescript/compiler_host.js.map +0 -1
- package/schematics/migrations/utils/typescript/parse_tsconfig.js.map +0 -1
- package/schematics/ng-add/index.js.map +0 -1
- package/schematics/ng-add/schema.js.map +0 -1
- package/styles/scss/components/tooltip/_tooltip.scss +0 -3
- package/styles/scss/components/tooltip/_tooltip.variables.scss +0 -5
|
@@ -1,16 +1,118 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive,
|
|
2
|
+
import { EventEmitter, Directive, Inject, HostBinding, Output, HostListener, Component, ChangeDetectionStrategy, ContentChildren, NgModule, Input, Injectable, InjectionToken, PLATFORM_ID, ViewEncapsulation, ComponentRef, TemplateRef, Optional, forwardRef, ViewChild, ContentChild, inject, Host, Renderer2, ElementRef, numberAttribute } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/common';
|
|
4
|
+
import { DOCUMENT, isPlatformBrowser, CommonModule, NgIf, NgTemplateOutlet } from '@angular/common';
|
|
5
|
+
import { merge, BehaviorSubject, fromEvent, Subscription, combineLatest, Subject, Observable, EMPTY, of, timer, race } from 'rxjs';
|
|
3
6
|
import * as i1 from '@ng-bootstrap/ng-bootstrap';
|
|
4
|
-
import { NgbAlertModule, NgbDatepickerKeyboardService, NgbDate, NgbDropdownModule, NgbDatepickerModule, NgbPopoverConfig, NgbPopoverModule, NgbProgressbarModule,
|
|
5
|
-
import
|
|
6
|
-
import { NgSelectModule } from '@ng-select/ng-select';
|
|
7
|
-
import * as i1$2 from '@angular/common';
|
|
8
|
-
import { CommonModule, DOCUMENT, NgIf, NgTemplateOutlet, isPlatformBrowser } from '@angular/common';
|
|
9
|
-
import { merge, Subject, Subscription, BehaviorSubject, fromEvent, combineLatest, Observable, EMPTY, of, timer, race } from 'rxjs';
|
|
7
|
+
import { NgbToastModule, NgbAlertModule, NgbDatepickerKeyboardService, NgbDate, NgbDropdownModule, NgbDatepickerModule, NgbAccordionModule, NgbPopoverConfig, NgbPopoverModule, NgbProgressbarModule, NgbCollapseModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
|
|
8
|
+
import { take, map, switchMap, distinctUntilChanged, throttleTime, tap, filter, endWith, takeUntil } from 'rxjs/operators';
|
|
10
9
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
11
|
-
import { throttleTime, tap, distinctUntilChanged, filter, take, map, switchMap, endWith, takeUntil } from 'rxjs/operators';
|
|
12
10
|
import * as i3 from '@angular/router';
|
|
13
11
|
import { RouterModule } from '@angular/router';
|
|
12
|
+
import * as i1$2 from '@ng-select/ng-select';
|
|
13
|
+
import { NgSelectModule } from '@ng-select/ng-select';
|
|
14
|
+
|
|
15
|
+
class SkipLinkDirective {
|
|
16
|
+
onFocus() {
|
|
17
|
+
this.inFocus.emit(true);
|
|
18
|
+
}
|
|
19
|
+
onClick() {
|
|
20
|
+
this.focusOnTarget();
|
|
21
|
+
}
|
|
22
|
+
onBlur() {
|
|
23
|
+
this.inFocus.emit(false);
|
|
24
|
+
}
|
|
25
|
+
constructor(element, document) {
|
|
26
|
+
this.element = element;
|
|
27
|
+
this.document = document;
|
|
28
|
+
this.class = 'list-group-item list-group-item-action';
|
|
29
|
+
this.inFocus = new EventEmitter();
|
|
30
|
+
}
|
|
31
|
+
focusOnTarget() {
|
|
32
|
+
const href = String(this.element.nativeElement.getAttribute('href'));
|
|
33
|
+
const parts = href.split('#');
|
|
34
|
+
if (parts.length < 2) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const id = parts.pop();
|
|
38
|
+
if (!id) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
const target = this.document.getElementById(id);
|
|
43
|
+
if (target) {
|
|
44
|
+
target.focus();
|
|
45
|
+
this.onBlur();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SkipLinkDirective, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
50
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: SkipLinkDirective, isStandalone: true, selector: "[dfSkipLink]", outputs: { inFocus: "inFocus" }, host: { listeners: { "focus": "onFocus()", "click": "onClick()", "blur": "onBlur()" }, properties: { "class": "this.class" } }, ngImport: i0 }); }
|
|
51
|
+
}
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SkipLinkDirective, decorators: [{
|
|
53
|
+
type: Directive,
|
|
54
|
+
args: [{
|
|
55
|
+
selector: '[dfSkipLink]',
|
|
56
|
+
standalone: true
|
|
57
|
+
}]
|
|
58
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
59
|
+
type: Inject,
|
|
60
|
+
args: [DOCUMENT]
|
|
61
|
+
}] }]; }, propDecorators: { class: [{
|
|
62
|
+
type: HostBinding
|
|
63
|
+
}], inFocus: [{
|
|
64
|
+
type: Output
|
|
65
|
+
}], onFocus: [{
|
|
66
|
+
type: HostListener,
|
|
67
|
+
args: ['focus']
|
|
68
|
+
}], onClick: [{
|
|
69
|
+
type: HostListener,
|
|
70
|
+
args: ['click']
|
|
71
|
+
}], onBlur: [{
|
|
72
|
+
type: HostListener,
|
|
73
|
+
args: ['blur']
|
|
74
|
+
}] } });
|
|
75
|
+
|
|
76
|
+
class SkipLinksContainerComponent {
|
|
77
|
+
constructor(changeDetector) {
|
|
78
|
+
this.changeDetector = changeDetector;
|
|
79
|
+
this.inFocus = false;
|
|
80
|
+
}
|
|
81
|
+
ngAfterContentInit() {
|
|
82
|
+
if (!this.links.length) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
this.focusSubscription = merge(...this.links.map((link) => link.inFocus)).subscribe((focus) => {
|
|
86
|
+
this.inFocus = focus;
|
|
87
|
+
this.changeDetector.detectChanges();
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
ngOnDestroy() {
|
|
91
|
+
this.focusSubscription.unsubscribe();
|
|
92
|
+
}
|
|
93
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SkipLinksContainerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
94
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: SkipLinksContainerComponent, isStandalone: true, selector: "df-skip-links-container", queries: [{ propertyName: "links", predicate: SkipLinkDirective }], ngImport: i0, template: "<section class=\"df-skip-links__section\">\n <div class=\"df-skip-links\">\n <div\n class=\"df-skip-links-wrap list-group\"\n [class.focus]=\"inFocus\"\n (blur)=\"inFocus=false\"\n >\n <ng-content></ng-content>\n </div>\n </div>\n</section>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
95
|
+
}
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SkipLinksContainerComponent, decorators: [{
|
|
97
|
+
type: Component,
|
|
98
|
+
args: [{ selector: 'df-skip-links-container', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<section class=\"df-skip-links__section\">\n <div class=\"df-skip-links\">\n <div\n class=\"df-skip-links-wrap list-group\"\n [class.focus]=\"inFocus\"\n (blur)=\"inFocus=false\"\n >\n <ng-content></ng-content>\n </div>\n </div>\n</section>\n" }]
|
|
99
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { links: [{
|
|
100
|
+
type: ContentChildren,
|
|
101
|
+
args: [SkipLinkDirective]
|
|
102
|
+
}] } });
|
|
103
|
+
|
|
104
|
+
class DfAccessibilityModule {
|
|
105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfAccessibilityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
106
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfAccessibilityModule, imports: [SkipLinkDirective, SkipLinksContainerComponent], exports: [SkipLinkDirective, SkipLinksContainerComponent] }); }
|
|
107
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfAccessibilityModule }); }
|
|
108
|
+
}
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfAccessibilityModule, decorators: [{
|
|
110
|
+
type: NgModule,
|
|
111
|
+
args: [{
|
|
112
|
+
imports: [SkipLinkDirective, SkipLinksContainerComponent],
|
|
113
|
+
exports: [SkipLinkDirective, SkipLinksContainerComponent]
|
|
114
|
+
}]
|
|
115
|
+
}] });
|
|
14
116
|
|
|
15
117
|
class DfInsertIconDirective {
|
|
16
118
|
constructor(el, renderer) {
|
|
@@ -70,6 +172,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImpor
|
|
|
70
172
|
}]
|
|
71
173
|
}] });
|
|
72
174
|
|
|
175
|
+
class DfToastModule {
|
|
176
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfToastModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
177
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfToastModule, imports: [DfInsertIconModule], exports: [NgbToastModule, DfInsertIconModule] }); }
|
|
178
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfToastModule, imports: [DfInsertIconModule, NgbToastModule, DfInsertIconModule] }); }
|
|
179
|
+
}
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfToastModule, decorators: [{
|
|
181
|
+
type: NgModule,
|
|
182
|
+
args: [{
|
|
183
|
+
imports: [DfInsertIconModule],
|
|
184
|
+
exports: [NgbToastModule, DfInsertIconModule]
|
|
185
|
+
}]
|
|
186
|
+
}] });
|
|
187
|
+
|
|
73
188
|
class DfAlertModule {
|
|
74
189
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
75
190
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfAlertModule, imports: [DfInsertIconModule], exports: [NgbAlertModule, DfInsertIconModule] }); }
|
|
@@ -539,242 +654,425 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImpor
|
|
|
539
654
|
}]
|
|
540
655
|
}] });
|
|
541
656
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
657
|
+
// Default DF breakpoints
|
|
658
|
+
const DF_BREAKPOINTS_VAR_DEFAULT = {
|
|
659
|
+
xs: '--df-breakpoint-xs',
|
|
660
|
+
sm: '--df-breakpoint-sm',
|
|
661
|
+
md: '--df-breakpoint-md',
|
|
662
|
+
lg: '--df-breakpoint-lg',
|
|
663
|
+
xl: '--df-breakpoint-xl',
|
|
664
|
+
xxl: '--df-breakpoint-xxl',
|
|
665
|
+
xxxl: '--df-breakpoint-xxxl'
|
|
666
|
+
};
|
|
667
|
+
const BREAKPOINTS_VARS = new InjectionToken('Bootstrap Breakpoints', {
|
|
668
|
+
providedIn: 'root',
|
|
669
|
+
factory() {
|
|
670
|
+
return DF_BREAKPOINTS_VAR_DEFAULT;
|
|
550
671
|
}
|
|
551
|
-
|
|
552
|
-
|
|
672
|
+
});
|
|
673
|
+
class DfBreakpoints {
|
|
674
|
+
constructor(_breakPointsVar, platformID) {
|
|
675
|
+
this._breakPointsVar = _breakPointsVar;
|
|
676
|
+
this.platformID = platformID;
|
|
677
|
+
this._breakPoints$ = new BehaviorSubject(null);
|
|
678
|
+
this.initBreakpoints();
|
|
553
679
|
}
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
this.arrowLeftInnerHandler(event);
|
|
557
|
-
}
|
|
558
|
-
else {
|
|
559
|
-
this.arrowRightInnerHandler(event);
|
|
560
|
-
}
|
|
680
|
+
get breakPoints$() {
|
|
681
|
+
return this._breakPoints$.asObservable();
|
|
561
682
|
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
if (
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
683
|
+
initBreakpoints() {
|
|
684
|
+
let breakPoints = null;
|
|
685
|
+
if (isPlatformBrowser(this.platformID) && this._breakPoints$.value === null) {
|
|
686
|
+
// we are in a browser so CSS variable are accessible
|
|
687
|
+
// we init the BP only once
|
|
688
|
+
const styles = window.getComputedStyle(document.documentElement);
|
|
689
|
+
const bpArray = [];
|
|
690
|
+
for (const el of Object.keys(this._breakPointsVar)) {
|
|
691
|
+
const curValue = this._breakPointsVar[el];
|
|
692
|
+
const bpValue = Number.parseInt(styles.getPropertyValue(curValue), 10);
|
|
693
|
+
if (isNaN(bpValue)) {
|
|
694
|
+
// We should never enter here. Only if people did not put the correct list of CSS vars...
|
|
695
|
+
// Or if the CSS is not arrived yet.
|
|
696
|
+
// What should we do then?
|
|
697
|
+
// TODO init from the default list provided if we want to?
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
bpArray.push([el, bpValue]);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
breakPoints = this.generate(bpArray);
|
|
704
|
+
// In case the first page contains the directive and the CSS vars are not available
|
|
705
|
+
// We may need to launch a second init at load time.
|
|
706
|
+
if (Object.keys(breakPoints).length === 0) {
|
|
707
|
+
fromEvent(window, 'load')
|
|
708
|
+
.pipe(take(1))
|
|
709
|
+
.subscribe(() => {
|
|
710
|
+
// Init once as the service is available everywhere
|
|
711
|
+
// We do not check if the CSS variable are changing over time
|
|
712
|
+
// here onload the CSS var should be available
|
|
713
|
+
this.initBreakpoints();
|
|
714
|
+
});
|
|
568
715
|
}
|
|
569
716
|
}
|
|
717
|
+
this._breakPoints$.next(breakPoints);
|
|
570
718
|
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
if (currentPos !== -1) {
|
|
584
|
-
if (currentPos === listBadge.length - 1) {
|
|
585
|
-
this.select.focus();
|
|
719
|
+
// Utilities to use if you want to create your own queries with your values.
|
|
720
|
+
// sizes is an array of array BreakPoints with sizes[0] --> identifier of the BreakPoint
|
|
721
|
+
// sizes[1] px value of the BreakPoint
|
|
722
|
+
generate(sizes) {
|
|
723
|
+
sizes = sizes.sort((a, b) => a[1] - b[1]);
|
|
724
|
+
const dict = {};
|
|
725
|
+
for (let i = 0; i < sizes.length; i++) {
|
|
726
|
+
const name = sizes[i][0];
|
|
727
|
+
const min = sizes[i][1];
|
|
728
|
+
const max = i === sizes.length - 1 ? undefined : sizes[i + 1][1];
|
|
729
|
+
if (min === 0) {
|
|
730
|
+
dict[name] = `(max-width: ${max - 0.01}px)`;
|
|
586
731
|
}
|
|
587
|
-
else {
|
|
588
|
-
|
|
732
|
+
else if (max) {
|
|
733
|
+
dict[name] = `(max-width: ${max - 0.01}px) and (min-width: ${min}px)`;
|
|
589
734
|
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
event.target.nodeName === 'INPUT' &&
|
|
593
|
-
event.target.selectionStart === event.target.value.length) {
|
|
594
|
-
const clearEl = this.element.nativeElement.querySelector('.ng-clear-wrapper') ||
|
|
595
|
-
this.element.nativeElement.querySelector('.ng-clear');
|
|
596
|
-
if (clearEl) {
|
|
597
|
-
// Event if it can be added multiple time it is not an issue I think.
|
|
598
|
-
this.renderer.listen(clearEl, 'keydown.Enter', (e) => {
|
|
599
|
-
e.stopPropagation(); // kill the event to forbid default ng-select behavior (open the dropdown)
|
|
600
|
-
this.select.handleClearClick();
|
|
601
|
-
});
|
|
602
|
-
clearEl.setAttribute('tabindex', '1'); // To be able to focus the element in chrome
|
|
603
|
-
clearEl.focus();
|
|
735
|
+
else {
|
|
736
|
+
dict[name] = `(min-width: ${min}px)`;
|
|
604
737
|
}
|
|
605
738
|
}
|
|
739
|
+
return dict;
|
|
606
740
|
}
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
741
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfBreakpoints, deps: [{ token: BREAKPOINTS_VARS }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
742
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfBreakpoints, providedIn: 'root' }); }
|
|
743
|
+
}
|
|
744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfBreakpoints, decorators: [{
|
|
745
|
+
type: Injectable,
|
|
746
|
+
args: [{ providedIn: 'root' }]
|
|
747
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
748
|
+
type: Inject,
|
|
749
|
+
args: [BREAKPOINTS_VARS]
|
|
750
|
+
}] }, { type: Object, decorators: [{
|
|
751
|
+
type: Inject,
|
|
752
|
+
args: [PLATFORM_ID]
|
|
753
|
+
}] }]; } });
|
|
754
|
+
class DfMediaQuery {
|
|
755
|
+
constructor(platformId) {
|
|
756
|
+
this._isBrowser = isPlatformBrowser(platformId);
|
|
757
|
+
}
|
|
758
|
+
notSupported(query) {
|
|
759
|
+
return { matches: false, media: query, addEventListener: () => { }, removeEventListener: () => { } };
|
|
760
|
+
}
|
|
761
|
+
matchMedia(query) {
|
|
762
|
+
if (this._isBrowser && window.matchMedia) {
|
|
763
|
+
return window.matchMedia(query);
|
|
764
|
+
}
|
|
765
|
+
else {
|
|
766
|
+
return this.notSupported(query);
|
|
622
767
|
}
|
|
623
768
|
}
|
|
624
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
625
|
-
static { this.ɵ
|
|
769
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMediaQuery, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
770
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMediaQuery, providedIn: 'root' }); }
|
|
626
771
|
}
|
|
627
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
628
|
-
type:
|
|
629
|
-
args: [{
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
type: HostListener,
|
|
640
|
-
args: ['keydown.Backspace', ['$event']]
|
|
641
|
-
}], handleKeyDownRight: [{
|
|
642
|
-
type: HostListener,
|
|
643
|
-
args: ['keydown.arrowRight', ['$event']]
|
|
644
|
-
}] } });
|
|
645
|
-
|
|
646
|
-
// Put to avoid opening of the select after removal. See why in file:
|
|
647
|
-
// https://github.com/ng-select/ng-select/blob/57c6671a972d23beddcca2b6acc9418544c17a2e/src/ng-select/ng-select.component.ts#L307
|
|
648
|
-
const NG_SELECT_CLASS_IDENTIFIER = 'ng-value-icon';
|
|
649
|
-
class DfManageBadgeEventsDirective {
|
|
650
|
-
constructor(renderer, element) {
|
|
651
|
-
this.renderer = renderer;
|
|
652
|
-
this.element = element;
|
|
653
|
-
this.tabindex = '-1';
|
|
654
|
-
this.renderer.addClass(this.element.nativeElement, DF_SELECT_CLASS);
|
|
655
|
-
this.renderer.addClass(this.element.nativeElement, NG_SELECT_CLASS_IDENTIFIER);
|
|
772
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMediaQuery, decorators: [{
|
|
773
|
+
type: Injectable,
|
|
774
|
+
args: [{ providedIn: 'root' }]
|
|
775
|
+
}], ctorParameters: function () { return [{ type: Object, decorators: [{
|
|
776
|
+
type: Inject,
|
|
777
|
+
args: [PLATFORM_ID]
|
|
778
|
+
}] }]; } });
|
|
779
|
+
class DfMediaObserver {
|
|
780
|
+
constructor(_mediaQuery) {
|
|
781
|
+
this._mediaQuery = _mediaQuery;
|
|
782
|
+
this._subscription = new Subscription();
|
|
783
|
+
this._queries = new Map();
|
|
656
784
|
}
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
785
|
+
/**
|
|
786
|
+
* Verifies if at least one of the provided media-queries is matching
|
|
787
|
+
* the current viewport
|
|
788
|
+
*/
|
|
789
|
+
matches(queries) {
|
|
790
|
+
queries = this._flattenQueries(Array.isArray(queries) ? queries : [queries]);
|
|
791
|
+
return queries.some(q => this._registerQuery(q).mediaQueryList.matches);
|
|
663
792
|
}
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
793
|
+
/**
|
|
794
|
+
* Produces an observable for a set of media-queries that will emit
|
|
795
|
+
* meta information for any changes of the given queries.
|
|
796
|
+
* @param value One or more media-queries to be observed.
|
|
797
|
+
* @returns A stream of matches meta object for the given media-queries.
|
|
798
|
+
*/
|
|
799
|
+
observe(queries) {
|
|
800
|
+
queries = this._flattenQueries(Array.isArray(queries) ? queries : [queries]);
|
|
801
|
+
return combineLatest(queries.map(q => this._registerQuery(q).mediaQueryList$)).pipe(map((events) => events.reduce((result, event) => {
|
|
802
|
+
result.matches = result.matches || event.matches;
|
|
803
|
+
result.breakpoints[event.media] = event.matches;
|
|
804
|
+
return result;
|
|
805
|
+
}, { matches: false, breakpoints: {} })));
|
|
667
806
|
}
|
|
668
|
-
|
|
669
|
-
this.
|
|
670
|
-
event.stopPropagation();
|
|
807
|
+
ngOnDestroy() {
|
|
808
|
+
this._subscription.unsubscribe();
|
|
671
809
|
}
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
event.stopPropagation();
|
|
810
|
+
_flattenQueries(queries) {
|
|
811
|
+
return queries.map(q => q.split(',')).reduce((flat, a) => flat.concat(a));
|
|
675
812
|
}
|
|
676
|
-
|
|
677
|
-
this.
|
|
678
|
-
|
|
813
|
+
_registerQuery(query) {
|
|
814
|
+
if (this._queries.has(query)) {
|
|
815
|
+
return this._queries.get(query);
|
|
816
|
+
}
|
|
817
|
+
const queryList = this._mediaQuery.matchMedia(query);
|
|
818
|
+
const queryList$ = new BehaviorSubject({
|
|
819
|
+
media: query,
|
|
820
|
+
matches: queryList.matches
|
|
821
|
+
});
|
|
822
|
+
this._subscription.add(fromEvent(queryList, 'change').subscribe((event) => {
|
|
823
|
+
queryList$.next(event);
|
|
824
|
+
}));
|
|
825
|
+
const meta = { mediaQueryList: queryList, mediaQueryList$: queryList$ };
|
|
826
|
+
this._queries.set(query, meta);
|
|
827
|
+
return meta;
|
|
679
828
|
}
|
|
680
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
681
|
-
static { this.ɵ
|
|
829
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMediaObserver, deps: [{ token: DfMediaQuery }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
830
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMediaObserver, providedIn: 'root' }); }
|
|
682
831
|
}
|
|
683
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
684
|
-
type:
|
|
685
|
-
args: [{
|
|
686
|
-
|
|
687
|
-
standalone: true
|
|
688
|
-
}]
|
|
689
|
-
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { dfManageBadgeEventsSelect: [{
|
|
690
|
-
type: Input
|
|
691
|
-
}], tabindex: [{
|
|
692
|
-
type: HostBinding,
|
|
693
|
-
args: ['attr.tabindex']
|
|
694
|
-
}], handleKeyDownBackspace: [{
|
|
695
|
-
type: HostListener,
|
|
696
|
-
args: ['keydown.Backspace', ['$event']]
|
|
697
|
-
}], handleClick: [{
|
|
698
|
-
type: HostListener,
|
|
699
|
-
args: ['click', ['$event']]
|
|
700
|
-
}], handleKeyDownEnter: [{
|
|
701
|
-
type: HostListener,
|
|
702
|
-
args: ['keydown.Enter', ['$event']]
|
|
703
|
-
}], handleKeyDownDelete: [{
|
|
704
|
-
type: HostListener,
|
|
705
|
-
args: ['keydown.Delete', ['$event']]
|
|
706
|
-
}] } });
|
|
832
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMediaObserver, decorators: [{
|
|
833
|
+
type: Injectable,
|
|
834
|
+
args: [{ providedIn: 'root' }]
|
|
835
|
+
}], ctorParameters: function () { return [{ type: DfMediaQuery }]; } });
|
|
707
836
|
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
837
|
+
/**
|
|
838
|
+
* Services you can use to get indication about the current width screen of your application
|
|
839
|
+
* the matchMedia JS feature (https://developer.mozilla.org/fr/docs/Web/API/Window/matchMedia)
|
|
840
|
+
*/
|
|
841
|
+
class DfMedia {
|
|
842
|
+
constructor(mediaObserver, _breakPointsService) {
|
|
843
|
+
this.mediaObserver = mediaObserver;
|
|
844
|
+
this._breakPointsService = _breakPointsService;
|
|
714
845
|
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
846
|
+
initQueries(mediaOrBreakpoints, breakPoints = {}) {
|
|
847
|
+
const queries = [];
|
|
848
|
+
if (Array.isArray(mediaOrBreakpoints)) {
|
|
849
|
+
for (const el of mediaOrBreakpoints) {
|
|
850
|
+
queries.push(breakPoints[el] ? breakPoints[el] : el);
|
|
851
|
+
}
|
|
721
852
|
}
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
this.label = this.element.innerHTML;
|
|
725
|
-
if (this.canHighlight) {
|
|
726
|
-
this.highlightLabel();
|
|
853
|
+
else {
|
|
854
|
+
queries.push(breakPoints[mediaOrBreakpoints] ? breakPoints[mediaOrBreakpoints] : mediaOrBreakpoints);
|
|
727
855
|
}
|
|
856
|
+
return queries;
|
|
728
857
|
}
|
|
729
|
-
|
|
730
|
-
|
|
858
|
+
/**
|
|
859
|
+
* Getter to have the observable indication if you are or not in the current scope of your queries
|
|
860
|
+
* If one queries is matching result is `True` otherwise result is `False`
|
|
861
|
+
* @param mediaOrBreakpoints either media query string/Array of string or/and in case of BS usage a
|
|
862
|
+
* string/Array of string of the breakpoints name (sm...).
|
|
863
|
+
*/
|
|
864
|
+
getObservable(mediaOrBreakpoints) {
|
|
865
|
+
return this._breakPointsService.breakPoints$.pipe(map(breakpoints => {
|
|
866
|
+
return breakpoints ? this.initQueries(mediaOrBreakpoints, breakpoints) : this.initQueries(mediaOrBreakpoints);
|
|
867
|
+
}), switchMap(query => {
|
|
868
|
+
return this.mediaObserver.observe(query);
|
|
869
|
+
}), map(value => value.matches), distinctUntilChanged());
|
|
731
870
|
}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
871
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMedia, deps: [{ token: DfMediaObserver }, { token: DfBreakpoints }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
872
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMedia, providedIn: 'root' }); }
|
|
873
|
+
}
|
|
874
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMedia, decorators: [{
|
|
875
|
+
type: Injectable,
|
|
876
|
+
args: [{ providedIn: 'root' }]
|
|
877
|
+
}], ctorParameters: function () { return [{ type: DfMediaObserver }, { type: DfBreakpoints }]; } });
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* Directive using the matchMedia JS feature (https://developer.mozilla.org/fr/docs/Web/API/Window/matchMedia)
|
|
881
|
+
* to be able to add or remove an element like ngIf is doing.
|
|
882
|
+
* Import DfMediaModule from DF to use all media elements provided
|
|
883
|
+
*/
|
|
884
|
+
class DfIfMediaDirective {
|
|
885
|
+
/**
|
|
886
|
+
* Input of the directive
|
|
887
|
+
* @param mediaOrBreakpoints either media query string/Array of string or in case of BS usage a
|
|
888
|
+
* string/Array of string of the breakpoints name (sm...).
|
|
889
|
+
*/
|
|
890
|
+
set dfIfMedia(mediaOrBreakpoints) {
|
|
891
|
+
this._subscription.add(this._mediaService.getObservable(mediaOrBreakpoints).subscribe((isValidated) => {
|
|
892
|
+
this.update(isValidated);
|
|
893
|
+
}));
|
|
741
894
|
}
|
|
742
|
-
|
|
743
|
-
|
|
895
|
+
constructor(_viewContainerRef, _template, _mediaService) {
|
|
896
|
+
this._viewContainerRef = _viewContainerRef;
|
|
897
|
+
this._template = _template;
|
|
898
|
+
this._mediaService = _mediaService;
|
|
899
|
+
this._viewInstance = null;
|
|
900
|
+
this._subscription = new Subscription();
|
|
744
901
|
}
|
|
745
|
-
|
|
746
|
-
|
|
902
|
+
ngOnDestroy() {
|
|
903
|
+
if (this._viewInstance) {
|
|
904
|
+
this._viewContainerRef.clear();
|
|
905
|
+
}
|
|
906
|
+
this._subscription.unsubscribe();
|
|
747
907
|
}
|
|
748
|
-
|
|
749
|
-
|
|
908
|
+
update(matches) {
|
|
909
|
+
if (matches && this._viewInstance === null) {
|
|
910
|
+
this._viewInstance = this._viewContainerRef.createEmbeddedView(this._template);
|
|
911
|
+
}
|
|
912
|
+
else if (!matches) {
|
|
913
|
+
this._viewContainerRef.clear();
|
|
914
|
+
this._viewInstance = null;
|
|
915
|
+
}
|
|
750
916
|
}
|
|
751
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
752
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type:
|
|
917
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfIfMediaDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: DfMedia }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
918
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DfIfMediaDirective, isStandalone: true, selector: "[dfIfMedia]", inputs: { dfIfMedia: "dfIfMedia" }, ngImport: i0 }); }
|
|
753
919
|
}
|
|
754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
920
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfIfMediaDirective, decorators: [{
|
|
755
921
|
type: Directive,
|
|
922
|
+
args: [{ selector: '[dfIfMedia]', standalone: true }]
|
|
923
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: DfMedia }]; }, propDecorators: { dfIfMedia: [{
|
|
924
|
+
type: Input
|
|
925
|
+
}] } });
|
|
926
|
+
|
|
927
|
+
class DfMediaModule {
|
|
928
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMediaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
929
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfMediaModule, imports: [DfIfMediaDirective], exports: [DfIfMediaDirective] }); }
|
|
930
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMediaModule }); }
|
|
931
|
+
}
|
|
932
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMediaModule, decorators: [{
|
|
933
|
+
type: NgModule,
|
|
756
934
|
args: [{
|
|
757
|
-
|
|
758
|
-
|
|
935
|
+
imports: [DfIfMediaDirective],
|
|
936
|
+
exports: [DfIfMediaDirective]
|
|
759
937
|
}]
|
|
760
|
-
}]
|
|
761
|
-
type: Input,
|
|
762
|
-
args: ['dfOptionHighlight']
|
|
763
|
-
}] } });
|
|
938
|
+
}] });
|
|
764
939
|
|
|
765
|
-
class
|
|
766
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
767
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type:
|
|
768
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
940
|
+
class DfFooterModule {
|
|
941
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfFooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
942
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfFooterModule, imports: [DfMediaModule, NgbAccordionModule], exports: [DfMediaModule, NgbAccordionModule] }); }
|
|
943
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfFooterModule, imports: [DfMediaModule, NgbAccordionModule, DfMediaModule, NgbAccordionModule] }); }
|
|
769
944
|
}
|
|
770
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
945
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfFooterModule, decorators: [{
|
|
771
946
|
type: NgModule,
|
|
772
947
|
args: [{
|
|
773
|
-
imports: [
|
|
774
|
-
exports: [
|
|
948
|
+
imports: [DfMediaModule, NgbAccordionModule],
|
|
949
|
+
exports: [DfMediaModule, NgbAccordionModule]
|
|
950
|
+
}]
|
|
951
|
+
}] });
|
|
952
|
+
|
|
953
|
+
class DfAmadeusIconComponent {
|
|
954
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfAmadeusIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
955
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DfAmadeusIconComponent, isStandalone: true, selector: "df-amadeus-icon", ngImport: i0, template: `
|
|
956
|
+
<svg
|
|
957
|
+
version="1.1"
|
|
958
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
959
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
960
|
+
x="0px"
|
|
961
|
+
y="0px"
|
|
962
|
+
viewBox="0 0 510.2 67.9"
|
|
963
|
+
style="enable-background:new 0 0 510.2 67.9;"
|
|
964
|
+
xml:space="preserve"
|
|
965
|
+
>
|
|
966
|
+
<g id="Layer_2"></g>
|
|
967
|
+
<g id="Layer_1">
|
|
968
|
+
<path
|
|
969
|
+
d="M269.7,0c-8.3,0-19.8,1.4-26.9,4v61.9c5.8,1.2,16.8,2,24.4,2c26,0,36.1-10.2,36.1-34.4C303.4,12.5,290.5,0,269.7,0
|
|
970
|
+
M257.5,12.6c2.4-0.5,7-1.1,11.6-1.1c10.6,0,18.8,5.9,18.8,22c0,15.5-4.1,22.9-20.2,22.9c-5.2,0-10.3-0.8-10.3-0.8V12.6z
|
|
971
|
+
M461.5,65.5c0,0,9,2.4,21.7,2.4c12,0,27-4.1,27-20.3c0-10.6-7.8-15.1-20.5-19.7c-6.9-2.5-12.7-4.8-12.7-9.5
|
|
972
|
+
c0-2.3,1.7-6.7,10.5-6.7c8.2,0,16.6,3.8,16.6,3.8l3.7-10.8C505.2,3.4,497.2,0,486.1,0c-12.1,0-23.8,6.4-23.8,19.3
|
|
973
|
+
c0,13.3,12.1,17.3,21.5,20.5c6.4,2.2,11.8,4.4,11.8,8.7c0,4.1-2.3,7.7-13.1,7.7c-8.9,0-18.3-2-18.3-2L461.5,65.5z M429.6,50.3
|
|
974
|
+
c-3.5,1.7-11,4.5-17.9,4.5c-10,0-11.7-4.5-11.7-14.9V0.6h-2.2c-3.3,0-10.6,0.6-12.4,0.9v40.3c0,17.6,4.3,26,22.2,26
|
|
975
|
+
c13.7,0,21.7-5.3,22.2-5.3c0.2,0,4.9,2.9,14.3,2.9v-64c-1-0.2-8.1-0.9-11.7-0.9h-2.9V50.3z M198.5,0c-13,0-23.2,3.2-27.1,5.2
|
|
976
|
+
l3.1,10.9c0,0,10-3.6,19.8-3.6c8.4,0,12.7,2.4,12.7,10.6v4.7h-12.7c-21.6,0-28,9.9-28,20.8c0,14.5,11.3,19.1,21.6,19.1
|
|
977
|
+
c12,0,18.9-5,19.8-5c0.7,0,3.1,2.6,14,2.6V19.3C221.7,5.5,213.1,0,198.5,0 M207.1,52.7c-3.1,1.2-10.7,3.7-16.2,3.7
|
|
978
|
+
c-6,0-10.6-2.1-10.6-8.7c0-5.7,3.1-9,11.4-9.3l15.4-0.6V52.7z M32.2,0C19.2,0,9,3.2,5.1,5.2l3.1,10.9c0,0,10-3.6,19.8-3.6
|
|
979
|
+
c8.4,0,12.7,2.4,12.7,10.6v4.7H28c-21.6,0-28,9.9-28,20.8c0,14.5,11.3,19.1,21.6,19.1c12,0,18.9-5,19.8-5c0.7,0,3.1,2.6,14,2.6
|
|
980
|
+
V19.3C55.4,5.5,46.8,0,32.2,0 M40.9,52.7c-3.1,1.2-10.7,3.7-16.2,3.7c-6,0-10.6-2.1-10.6-8.7c0-5.7,3.1-9,11.4-9.3l15.4-0.6V52.7z
|
|
981
|
+
M114,39c-0.4,0.9-0.8,2.7-1.1,3.8c-0.3-1-0.8-2.8-1.1-3.8L99,6.1C96.8,0.7,93.4,0,87.2,0c-2.2,0-6.6,0.3-6.6,0.3L74,66.9h14.6
|
|
982
|
+
l3.2-44.7l13.9,33.8c1,2.6,3.1,3.7,7.3,3.7c4.1,0,6.2-1,7.3-3.7L134,22.2l3.2,44.7h14.6l-6.6-66.6c0,0-4.4-0.3-6.6-0.3
|
|
983
|
+
c-6.2,0-9.6,0.7-11.8,6.1L114,39z M320.8,64.7c0,0,11.2,3.1,25.5,3.1c15.3,0,22.3-1.7,22.3-1.7V54.8c0,0-7.6,1.5-18.3,1.5
|
|
984
|
+
c-9.3,0-15.1-1.2-15.1-1.2v-16h28.9V27.8h-28.9V12.5c0,0,5.7-1,14.1-1c9.5,0,18.1,1.5,18.1,1.5V1.6c0,0-7.5-1.6-19.8-1.6
|
|
985
|
+
c-16.3,0-27,2.9-27,2.9V64.7z"
|
|
986
|
+
/>
|
|
987
|
+
</g>
|
|
988
|
+
</svg>
|
|
989
|
+
`, isInline: true, styles: [":root{--df-navbar-height: 3.5rem}:host{min-width:60px}:host svg{margin:10%}:host.icon-primary{fill:var(--df-primary-500)}:host.icon-white{fill:#fff}\n"] }); }
|
|
990
|
+
}
|
|
991
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfAmadeusIconComponent, decorators: [{
|
|
992
|
+
type: Component,
|
|
993
|
+
args: [{ selector: 'df-amadeus-icon', template: `
|
|
994
|
+
<svg
|
|
995
|
+
version="1.1"
|
|
996
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
997
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
998
|
+
x="0px"
|
|
999
|
+
y="0px"
|
|
1000
|
+
viewBox="0 0 510.2 67.9"
|
|
1001
|
+
style="enable-background:new 0 0 510.2 67.9;"
|
|
1002
|
+
xml:space="preserve"
|
|
1003
|
+
>
|
|
1004
|
+
<g id="Layer_2"></g>
|
|
1005
|
+
<g id="Layer_1">
|
|
1006
|
+
<path
|
|
1007
|
+
d="M269.7,0c-8.3,0-19.8,1.4-26.9,4v61.9c5.8,1.2,16.8,2,24.4,2c26,0,36.1-10.2,36.1-34.4C303.4,12.5,290.5,0,269.7,0
|
|
1008
|
+
M257.5,12.6c2.4-0.5,7-1.1,11.6-1.1c10.6,0,18.8,5.9,18.8,22c0,15.5-4.1,22.9-20.2,22.9c-5.2,0-10.3-0.8-10.3-0.8V12.6z
|
|
1009
|
+
M461.5,65.5c0,0,9,2.4,21.7,2.4c12,0,27-4.1,27-20.3c0-10.6-7.8-15.1-20.5-19.7c-6.9-2.5-12.7-4.8-12.7-9.5
|
|
1010
|
+
c0-2.3,1.7-6.7,10.5-6.7c8.2,0,16.6,3.8,16.6,3.8l3.7-10.8C505.2,3.4,497.2,0,486.1,0c-12.1,0-23.8,6.4-23.8,19.3
|
|
1011
|
+
c0,13.3,12.1,17.3,21.5,20.5c6.4,2.2,11.8,4.4,11.8,8.7c0,4.1-2.3,7.7-13.1,7.7c-8.9,0-18.3-2-18.3-2L461.5,65.5z M429.6,50.3
|
|
1012
|
+
c-3.5,1.7-11,4.5-17.9,4.5c-10,0-11.7-4.5-11.7-14.9V0.6h-2.2c-3.3,0-10.6,0.6-12.4,0.9v40.3c0,17.6,4.3,26,22.2,26
|
|
1013
|
+
c13.7,0,21.7-5.3,22.2-5.3c0.2,0,4.9,2.9,14.3,2.9v-64c-1-0.2-8.1-0.9-11.7-0.9h-2.9V50.3z M198.5,0c-13,0-23.2,3.2-27.1,5.2
|
|
1014
|
+
l3.1,10.9c0,0,10-3.6,19.8-3.6c8.4,0,12.7,2.4,12.7,10.6v4.7h-12.7c-21.6,0-28,9.9-28,20.8c0,14.5,11.3,19.1,21.6,19.1
|
|
1015
|
+
c12,0,18.9-5,19.8-5c0.7,0,3.1,2.6,14,2.6V19.3C221.7,5.5,213.1,0,198.5,0 M207.1,52.7c-3.1,1.2-10.7,3.7-16.2,3.7
|
|
1016
|
+
c-6,0-10.6-2.1-10.6-8.7c0-5.7,3.1-9,11.4-9.3l15.4-0.6V52.7z M32.2,0C19.2,0,9,3.2,5.1,5.2l3.1,10.9c0,0,10-3.6,19.8-3.6
|
|
1017
|
+
c8.4,0,12.7,2.4,12.7,10.6v4.7H28c-21.6,0-28,9.9-28,20.8c0,14.5,11.3,19.1,21.6,19.1c12,0,18.9-5,19.8-5c0.7,0,3.1,2.6,14,2.6
|
|
1018
|
+
V19.3C55.4,5.5,46.8,0,32.2,0 M40.9,52.7c-3.1,1.2-10.7,3.7-16.2,3.7c-6,0-10.6-2.1-10.6-8.7c0-5.7,3.1-9,11.4-9.3l15.4-0.6V52.7z
|
|
1019
|
+
M114,39c-0.4,0.9-0.8,2.7-1.1,3.8c-0.3-1-0.8-2.8-1.1-3.8L99,6.1C96.8,0.7,93.4,0,87.2,0c-2.2,0-6.6,0.3-6.6,0.3L74,66.9h14.6
|
|
1020
|
+
l3.2-44.7l13.9,33.8c1,2.6,3.1,3.7,7.3,3.7c4.1,0,6.2-1,7.3-3.7L134,22.2l3.2,44.7h14.6l-6.6-66.6c0,0-4.4-0.3-6.6-0.3
|
|
1021
|
+
c-6.2,0-9.6,0.7-11.8,6.1L114,39z M320.8,64.7c0,0,11.2,3.1,25.5,3.1c15.3,0,22.3-1.7,22.3-1.7V54.8c0,0-7.6,1.5-18.3,1.5
|
|
1022
|
+
c-9.3,0-15.1-1.2-15.1-1.2v-16h28.9V27.8h-28.9V12.5c0,0,5.7-1,14.1-1c9.5,0,18.1,1.5,18.1,1.5V1.6c0,0-7.5-1.6-19.8-1.6
|
|
1023
|
+
c-16.3,0-27,2.9-27,2.9V64.7z"
|
|
1024
|
+
/>
|
|
1025
|
+
</g>
|
|
1026
|
+
</svg>
|
|
1027
|
+
`, standalone: true, styles: [":root{--df-navbar-height: 3.5rem}:host{min-width:60px}:host svg{margin:10%}:host.icon-primary{fill:var(--df-primary-500)}:host.icon-white{fill:#fff}\n"] }]
|
|
1028
|
+
}] });
|
|
1029
|
+
|
|
1030
|
+
class DfIconModule {
|
|
1031
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1032
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfIconModule, imports: [DfAmadeusIconComponent], exports: [DfAmadeusIconComponent] }); }
|
|
1033
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfIconModule }); }
|
|
1034
|
+
}
|
|
1035
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfIconModule, decorators: [{
|
|
1036
|
+
type: NgModule,
|
|
1037
|
+
args: [{
|
|
1038
|
+
imports: [DfAmadeusIconComponent],
|
|
1039
|
+
exports: [DfAmadeusIconComponent]
|
|
775
1040
|
}]
|
|
776
1041
|
}] });
|
|
777
1042
|
|
|
1043
|
+
class DfModalService {
|
|
1044
|
+
constructor(modalService, rendererFactory) {
|
|
1045
|
+
this.modalService = modalService;
|
|
1046
|
+
this.rendererFactory = rendererFactory;
|
|
1047
|
+
this.renderer = this.rendererFactory.createRenderer(null, null);
|
|
1048
|
+
}
|
|
1049
|
+
open(content, options) {
|
|
1050
|
+
let modalRef;
|
|
1051
|
+
if (options && options.container) {
|
|
1052
|
+
modalRef = this.modalService.open(content, options);
|
|
1053
|
+
}
|
|
1054
|
+
else {
|
|
1055
|
+
modalRef = this.modalService.open(content, Object.assign({}, { container: 'body' }, options));
|
|
1056
|
+
}
|
|
1057
|
+
// we add the 'df-modal-open' class to the body when the modal is open. We remove it when the modal is closed/dismissed
|
|
1058
|
+
this.renderer.addClass(document.body, 'df-modal-open');
|
|
1059
|
+
modalRef.result.then(() => {
|
|
1060
|
+
this.renderer.removeClass(document.body, 'df-modal-open');
|
|
1061
|
+
}, () => {
|
|
1062
|
+
this.renderer.removeClass(document.body, 'df-modal-open');
|
|
1063
|
+
});
|
|
1064
|
+
return modalRef;
|
|
1065
|
+
}
|
|
1066
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfModalService, deps: [{ token: i1.NgbModal }, { token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1067
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfModalService, providedIn: 'root' }); }
|
|
1068
|
+
}
|
|
1069
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfModalService, decorators: [{
|
|
1070
|
+
type: Injectable,
|
|
1071
|
+
args: [{
|
|
1072
|
+
providedIn: 'root'
|
|
1073
|
+
}]
|
|
1074
|
+
}], ctorParameters: function () { return [{ type: i1.NgbModal }, { type: i0.RendererFactory2 }]; } });
|
|
1075
|
+
|
|
778
1076
|
class DfPopoverConfig extends NgbPopoverConfig {
|
|
779
1077
|
constructor(ngbConfig) {
|
|
780
1078
|
super(ngbConfig || { animation: true });
|
|
@@ -929,7 +1227,7 @@ class DfProgressbarComponent {
|
|
|
929
1227
|
this.maxValue = 100;
|
|
930
1228
|
}
|
|
931
1229
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
932
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DfProgressbarComponent, isStandalone: true, selector: "df-progressbar", inputs: { infiniteAnimation: "infiniteAnimation", value: "value", maxValue: "maxValue", text: "text", start$: "start$", end$: "end$", ariaLabelledBy: "ariaLabelledBy", ariaLabel: "ariaLabel" }, outputs: { percentageValueChange: "percentageValueChange" }, ngImport: i0, template: "<ng-container *ngIf=\"displayProgressBar\">\n <div *ngIf=\"computedText\" class=\"progressbar-text mb-2\">{{ computedText }}</div>\n <div class=\"progress\">\n <ng-container *ngIf=\"infiniteAnimation; else withValue\">\n <div\n class=\"progress-bar infinite-animation\"\n role=\"progressbar\"\n aria-valuetext=\"indeterminate\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-label]=\"!ariaLabelledBy && ariaLabel ? ariaLabel : null\"\n ></div>\n </ng-container>\n <ng-template #withValue>\n <div\n [style.width.%]=\"percentageValue\"\n class=\"progress-bar\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"value\"\n aria-valuemin=\"0\"\n [attr.aria-valuemax]=\"maxValue\"\n [attr.aria-valuetext]=\"computedText ? computedText : null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-label]=\"!ariaLabelledBy && ariaLabel ? ariaLabel : null\"\n ></div>\n </ng-template>\n </div>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$
|
|
1230
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DfProgressbarComponent, isStandalone: true, selector: "df-progressbar", inputs: { infiniteAnimation: "infiniteAnimation", value: "value", maxValue: "maxValue", text: "text", start$: "start$", end$: "end$", ariaLabelledBy: "ariaLabelledBy", ariaLabel: "ariaLabel" }, outputs: { percentageValueChange: "percentageValueChange" }, ngImport: i0, template: "<ng-container *ngIf=\"displayProgressBar\">\n <div *ngIf=\"computedText\" class=\"progressbar-text mb-2\">{{ computedText }}</div>\n <div class=\"progress\">\n <ng-container *ngIf=\"infiniteAnimation; else withValue\">\n <div\n class=\"progress-bar infinite-animation\"\n role=\"progressbar\"\n aria-valuetext=\"indeterminate\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-label]=\"!ariaLabelledBy && ariaLabel ? ariaLabel : null\"\n ></div>\n </ng-container>\n <ng-template #withValue>\n <div\n [style.width.%]=\"percentageValue\"\n class=\"progress-bar\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"value\"\n aria-valuemin=\"0\"\n [attr.aria-valuemax]=\"maxValue\"\n [attr.aria-valuetext]=\"computedText ? computedText : null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-label]=\"!ariaLabelledBy && ariaLabel ? ariaLabel : null\"\n ></div>\n </ng-template>\n </div>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
933
1231
|
}
|
|
934
1232
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressbarComponent, decorators: [{
|
|
935
1233
|
type: Component,
|
|
@@ -967,195 +1265,437 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImpor
|
|
|
967
1265
|
}]
|
|
968
1266
|
}] });
|
|
969
1267
|
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1268
|
+
var DfProgressIndicatorContentType;
|
|
1269
|
+
(function (DfProgressIndicatorContentType) {
|
|
1270
|
+
DfProgressIndicatorContentType["SPINNER"] = "spinner";
|
|
1271
|
+
DfProgressIndicatorContentType["PROGRESSBAR"] = "progressbar";
|
|
1272
|
+
})(DfProgressIndicatorContentType || (DfProgressIndicatorContentType = {}));
|
|
1273
|
+
class DfProgressIndicatorContentSpinner {
|
|
1274
|
+
constructor(spinnerInput) {
|
|
1275
|
+
this.type = DfProgressIndicatorContentType.SPINNER;
|
|
1276
|
+
this.spinnerInput = spinnerInput;
|
|
973
1277
|
}
|
|
974
|
-
|
|
975
|
-
|
|
1278
|
+
}
|
|
1279
|
+
class DfProgressIndicatorContentProgressBar {
|
|
1280
|
+
constructor(progressBarInput, position) {
|
|
1281
|
+
this.type = DfProgressIndicatorContentType.PROGRESSBAR;
|
|
1282
|
+
this.progressBarInput = progressBarInput;
|
|
1283
|
+
this.position = position || DfProgressIndicatorContentPosition.TOP;
|
|
976
1284
|
}
|
|
977
|
-
|
|
978
|
-
|
|
1285
|
+
}
|
|
1286
|
+
var DfProgressIndicatorContentPosition;
|
|
1287
|
+
(function (DfProgressIndicatorContentPosition) {
|
|
1288
|
+
DfProgressIndicatorContentPosition["TOP"] = "top";
|
|
1289
|
+
DfProgressIndicatorContentPosition["BOTTOM"] = "bottom";
|
|
1290
|
+
DfProgressIndicatorContentPosition["CENTERED"] = "centered";
|
|
1291
|
+
})(DfProgressIndicatorContentPosition || (DfProgressIndicatorContentPosition = {}));
|
|
1292
|
+
|
|
1293
|
+
class DfProgressIndicatorContainerComponent {
|
|
1294
|
+
constructor() {
|
|
1295
|
+
this.DEFAULT_CLASS_POSITION = 'df-progressindicator-centered';
|
|
1296
|
+
this.positionClass = this.DEFAULT_CLASS_POSITION;
|
|
979
1297
|
}
|
|
980
|
-
|
|
981
|
-
this.
|
|
982
|
-
this.document = document;
|
|
983
|
-
this.class = 'list-group-item list-group-item-action';
|
|
984
|
-
this.inFocus = new EventEmitter();
|
|
1298
|
+
get classes() {
|
|
1299
|
+
return `df-progressindicator-container ${this.containerClass || ''} ${this.positionClass}`;
|
|
985
1300
|
}
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1301
|
+
set position(newPosition) {
|
|
1302
|
+
switch (newPosition) {
|
|
1303
|
+
case DfProgressIndicatorContentPosition.TOP:
|
|
1304
|
+
this.positionClass = 'df-progressindicator-top';
|
|
1305
|
+
break;
|
|
1306
|
+
case DfProgressIndicatorContentPosition.BOTTOM:
|
|
1307
|
+
this.positionClass = 'df-progressindicator-bottom';
|
|
1308
|
+
break;
|
|
1309
|
+
default:
|
|
1310
|
+
this.positionClass = this.DEFAULT_CLASS_POSITION;
|
|
995
1311
|
}
|
|
996
|
-
|
|
997
|
-
const target = this.document.getElementById(id);
|
|
998
|
-
if (target) {
|
|
999
|
-
target.focus();
|
|
1000
|
-
this.onBlur();
|
|
1001
|
-
}
|
|
1002
|
-
});
|
|
1312
|
+
this._position = newPosition;
|
|
1003
1313
|
}
|
|
1004
|
-
|
|
1005
|
-
|
|
1314
|
+
get position() {
|
|
1315
|
+
return this._position;
|
|
1316
|
+
}
|
|
1317
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1318
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DfProgressIndicatorContainerComponent, isStandalone: true, selector: "df-progressindicator-container", inputs: { containerClass: "containerClass", position: "position" }, host: { properties: { "class": "this.classes" } }, ngImport: i0, template: `
|
|
1319
|
+
<ng-content></ng-content>
|
|
1320
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1006
1321
|
}
|
|
1007
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
1008
|
-
type:
|
|
1322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorContainerComponent, decorators: [{
|
|
1323
|
+
type: Component,
|
|
1009
1324
|
args: [{
|
|
1010
|
-
selector: '
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
type:
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
}],
|
|
1024
|
-
type:
|
|
1025
|
-
args: ['click']
|
|
1026
|
-
}], onBlur: [{
|
|
1027
|
-
type: HostListener,
|
|
1028
|
-
args: ['blur']
|
|
1325
|
+
selector: 'df-progressindicator-container',
|
|
1326
|
+
encapsulation: ViewEncapsulation.None,
|
|
1327
|
+
template: `
|
|
1328
|
+
<ng-content></ng-content>
|
|
1329
|
+
`,
|
|
1330
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1331
|
+
standalone: true
|
|
1332
|
+
}]
|
|
1333
|
+
}], propDecorators: { classes: [{
|
|
1334
|
+
type: HostBinding,
|
|
1335
|
+
args: ['class']
|
|
1336
|
+
}], containerClass: [{
|
|
1337
|
+
type: Input
|
|
1338
|
+
}], position: [{
|
|
1339
|
+
type: Input
|
|
1029
1340
|
}] } });
|
|
1030
1341
|
|
|
1031
|
-
class
|
|
1032
|
-
constructor(
|
|
1033
|
-
this.
|
|
1034
|
-
this.
|
|
1342
|
+
class DfDefaultSpinnerComponent {
|
|
1343
|
+
constructor() {
|
|
1344
|
+
this.isGlobalSpinner = false;
|
|
1345
|
+
this.contentClass = 'spinner-border text-primary';
|
|
1035
1346
|
}
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1347
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfDefaultSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1348
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DfDefaultSpinnerComponent, isStandalone: true, selector: "df-default-spinner", inputs: { isGlobalSpinner: "isGlobalSpinner", contentClass: "contentClass", ariaLabel: "ariaLabel" }, ngImport: i0, template: "<div [ngClass]=\"contentClass\" [attr.role]=\"isGlobalSpinner ? 'alert' : 'status'\">\n <span class=\"visually-hidden\">\n <ng-container *ngIf=\"ariaLabel; else defaultAriaLabel\">{{ ariaLabel }}</ng-container>\n </span>\n</div>\n\n<ng-template #defaultAriaLabel>\n <ng-container i18n=\"@@df.progressindicator.default.spinner.ariaLabel\">Loading...</ng-container>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1349
|
+
}
|
|
1350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfDefaultSpinnerComponent, decorators: [{
|
|
1351
|
+
type: Component,
|
|
1352
|
+
args: [{ selector: 'df-default-spinner', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule], template: "<div [ngClass]=\"contentClass\" [attr.role]=\"isGlobalSpinner ? 'alert' : 'status'\">\n <span class=\"visually-hidden\">\n <ng-container *ngIf=\"ariaLabel; else defaultAriaLabel\">{{ ariaLabel }}</ng-container>\n </span>\n</div>\n\n<ng-template #defaultAriaLabel>\n <ng-container i18n=\"@@df.progressindicator.default.spinner.ariaLabel\">Loading...</ng-container>\n</ng-template>\n" }]
|
|
1353
|
+
}], propDecorators: { isGlobalSpinner: [{
|
|
1354
|
+
type: Input
|
|
1355
|
+
}], contentClass: [{
|
|
1356
|
+
type: Input
|
|
1357
|
+
}], ariaLabel: [{
|
|
1358
|
+
type: Input
|
|
1359
|
+
}] } });
|
|
1360
|
+
|
|
1361
|
+
class DfProgressIndicatorBackdropComponent {
|
|
1362
|
+
constructor() {
|
|
1363
|
+
this.isGlobalBackdrop = true;
|
|
1044
1364
|
}
|
|
1045
|
-
|
|
1046
|
-
this.
|
|
1365
|
+
get classes() {
|
|
1366
|
+
return `df-progressindicator-backdrop ${this.backdropClass || ''} ${this.isGlobalBackdrop ? 'df-progressindicator-backdrop-global' : 'df-progressindicator-backdrop-contextual'}`;
|
|
1047
1367
|
}
|
|
1048
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
1049
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type:
|
|
1368
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorBackdropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1369
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DfProgressIndicatorBackdropComponent, isStandalone: true, selector: "df-progressindicator-backdrop", inputs: { backdropClass: "backdropClass", isGlobalBackdrop: "isGlobalBackdrop" }, host: { properties: { "class": "this.classes" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1050
1370
|
}
|
|
1051
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
1371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorBackdropComponent, decorators: [{
|
|
1052
1372
|
type: Component,
|
|
1053
|
-
args: [{
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1373
|
+
args: [{
|
|
1374
|
+
selector: 'df-progressindicator-backdrop',
|
|
1375
|
+
template: '',
|
|
1376
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1377
|
+
standalone: true
|
|
1378
|
+
}]
|
|
1379
|
+
}], propDecorators: { classes: [{
|
|
1380
|
+
type: HostBinding,
|
|
1381
|
+
args: ['class']
|
|
1382
|
+
}], backdropClass: [{
|
|
1383
|
+
type: Input
|
|
1384
|
+
}], isGlobalBackdrop: [{
|
|
1385
|
+
type: Input
|
|
1057
1386
|
}] } });
|
|
1058
1387
|
|
|
1059
|
-
class
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1388
|
+
class DfProgressIndicatorRef {
|
|
1389
|
+
constructor(containerRef, contentRef, backdropRef) {
|
|
1390
|
+
this.containerRef = containerRef;
|
|
1391
|
+
this.contentRef = contentRef;
|
|
1392
|
+
this.backdropRef = backdropRef;
|
|
1393
|
+
}
|
|
1063
1394
|
}
|
|
1064
|
-
|
|
1065
|
-
|
|
1395
|
+
|
|
1396
|
+
const noop$1 = () => { };
|
|
1397
|
+
/**
|
|
1398
|
+
* Utility to handle the scrollbar.
|
|
1399
|
+
*
|
|
1400
|
+
* It allows to compensate the lack of a vertical scrollbar by adding an
|
|
1401
|
+
* equivalent padding on the right of the body, and to remove this compensation.
|
|
1402
|
+
*
|
|
1403
|
+
* It is a copy of https://github.com/ng-bootstrap/ng-bootstrap/blob/master/src/util/scrollbar.ts
|
|
1404
|
+
*/
|
|
1405
|
+
class ScrollBar {
|
|
1406
|
+
constructor(_document) {
|
|
1407
|
+
this._document = _document;
|
|
1408
|
+
}
|
|
1409
|
+
/**
|
|
1410
|
+
* To be called right before a potential vertical scrollbar would be removed:
|
|
1411
|
+
*
|
|
1412
|
+
* - if there was a scrollbar, adds some compensation padding to the body
|
|
1413
|
+
* to keep the same layout as when the scrollbar is there
|
|
1414
|
+
* - if there was none, there is nothing to do
|
|
1415
|
+
*
|
|
1416
|
+
* @return a callback used to revert the compensation (noop if there was none,
|
|
1417
|
+
* otherwise a function removing the padding)
|
|
1418
|
+
*/
|
|
1419
|
+
compensate() {
|
|
1420
|
+
const width = this._getWidth();
|
|
1421
|
+
return !this._isPresent(width) ? noop$1 : this._adjustBody(width);
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Adds a padding of the given width on the right of the body.
|
|
1425
|
+
*
|
|
1426
|
+
* @return a callback used to revert the padding to its previous value
|
|
1427
|
+
*/
|
|
1428
|
+
_adjustBody(scrollbarWidth) {
|
|
1429
|
+
const body = this._document.body;
|
|
1430
|
+
const userSetPaddingStyle = body.style.paddingRight;
|
|
1431
|
+
const paddingRight = 'padding-right';
|
|
1432
|
+
const actualPadding = parseFloat(window.getComputedStyle(body)[paddingRight]);
|
|
1433
|
+
body.style[paddingRight] = `${actualPadding + scrollbarWidth}px`;
|
|
1434
|
+
return () => (body.style[paddingRight] = userSetPaddingStyle);
|
|
1435
|
+
}
|
|
1436
|
+
/**
|
|
1437
|
+
* Tells whether a scrollbar is currently present on the body.
|
|
1438
|
+
*
|
|
1439
|
+
* @return true if scrollbar is present, false otherwise
|
|
1440
|
+
*/
|
|
1441
|
+
_isPresent(scrollbarWidth) {
|
|
1442
|
+
const rect = this._document.body.getBoundingClientRect();
|
|
1443
|
+
const bodyToViewportGap = window.innerWidth - (rect.left + rect.right);
|
|
1444
|
+
const uncertainty = 0.1 * scrollbarWidth;
|
|
1445
|
+
return bodyToViewportGap >= scrollbarWidth - uncertainty;
|
|
1446
|
+
}
|
|
1447
|
+
/**
|
|
1448
|
+
* Calculates and returns the width of a scrollbar.
|
|
1449
|
+
*
|
|
1450
|
+
* @return the width of a scrollbar on this page
|
|
1451
|
+
*/
|
|
1452
|
+
_getWidth() {
|
|
1453
|
+
const measurer = this._document.createElement('div');
|
|
1454
|
+
measurer.className = 'modal-scrollbar-measure';
|
|
1455
|
+
const body = this._document.body;
|
|
1456
|
+
body.appendChild(measurer);
|
|
1457
|
+
const width = measurer.getBoundingClientRect().width - measurer.clientWidth;
|
|
1458
|
+
body.removeChild(measurer);
|
|
1459
|
+
return width;
|
|
1460
|
+
}
|
|
1461
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ScrollBar, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1462
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ScrollBar, providedIn: 'root' }); }
|
|
1463
|
+
}
|
|
1464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ScrollBar, decorators: [{
|
|
1465
|
+
type: Injectable,
|
|
1466
|
+
args: [{ providedIn: 'root' }]
|
|
1467
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1468
|
+
type: Inject,
|
|
1469
|
+
args: [DOCUMENT]
|
|
1470
|
+
}] }]; } });
|
|
1471
|
+
|
|
1472
|
+
class DfProgressIndicatorService {
|
|
1473
|
+
constructor(document, rendererFactory, componentFactoryResolver, appRef, injector, scrollbar) {
|
|
1474
|
+
this.document = document;
|
|
1475
|
+
this.rendererFactory = rendererFactory;
|
|
1476
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
1477
|
+
this.appRef = appRef;
|
|
1478
|
+
this.injector = injector;
|
|
1479
|
+
this.scrollbar = scrollbar;
|
|
1480
|
+
this.BODY_CLASS = 'df-progressindicator-open';
|
|
1481
|
+
// TODO - Remove it when https://github.com/angular/angular/issues/22567
|
|
1482
|
+
this.containerAttributes = ['containerClass', 'position'];
|
|
1483
|
+
this.backdropAttributes = ['backdropClass', 'isGlobalBackdrop'];
|
|
1484
|
+
this.defaultSpinnerAttributes = ['contentClass', 'ariaLabel', 'isGlobalSpinner'];
|
|
1485
|
+
this.defaultProgressBarAttributes = ['infiniteAnimation', 'ariaLabel'];
|
|
1486
|
+
this.activeInstances = [];
|
|
1487
|
+
this.renderer = this.rendererFactory.createRenderer(null, null);
|
|
1488
|
+
}
|
|
1489
|
+
open(content, options) {
|
|
1490
|
+
const containerElt = this.getContainer(this.document, options);
|
|
1491
|
+
if (!containerElt) {
|
|
1492
|
+
throw new Error(`[Design Factory] The specified progress indicator container "${options?.container ||
|
|
1493
|
+
'body'}" was not found in the DOM.`);
|
|
1494
|
+
}
|
|
1495
|
+
// Create needed components
|
|
1496
|
+
const backdropRef = options?.backdrop !== false
|
|
1497
|
+
? this.createComponent(DfProgressIndicatorBackdropComponent, this.componentFactoryResolver, undefined, containerElt)
|
|
1498
|
+
: undefined;
|
|
1499
|
+
const contentRef = this.getContent(content, this.componentFactoryResolver, containerElt);
|
|
1500
|
+
const containerCmpRef = this.createComponent(DfProgressIndicatorContainerComponent, this.componentFactoryResolver, contentRef, containerElt);
|
|
1501
|
+
const onDestroyOperations = [];
|
|
1502
|
+
// Add aria attributes on the container
|
|
1503
|
+
this.renderer.setAttribute(containerElt, 'aria-busy', 'true');
|
|
1504
|
+
onDestroyOperations.push(() => {
|
|
1505
|
+
this.renderer.removeAttribute(containerElt, 'aria-busy');
|
|
1506
|
+
});
|
|
1507
|
+
// Override some styles if body is the container
|
|
1508
|
+
if (containerElt === this.document.body) {
|
|
1509
|
+
const scrollCompensation = this.scrollbar.compensate();
|
|
1510
|
+
this.renderer.addClass(this.document.body, this.BODY_CLASS);
|
|
1511
|
+
this.renderer.setAttribute(this.document.body, 'aria-busy', 'true');
|
|
1512
|
+
onDestroyOperations.push(() => {
|
|
1513
|
+
scrollCompensation();
|
|
1514
|
+
this.renderer.removeClass(this.document.body, this.BODY_CLASS);
|
|
1515
|
+
});
|
|
1516
|
+
}
|
|
1517
|
+
if (onDestroyOperations.length > 0) {
|
|
1518
|
+
containerCmpRef.onDestroy(() => {
|
|
1519
|
+
onDestroyOperations.forEach(operation => {
|
|
1520
|
+
operation();
|
|
1521
|
+
});
|
|
1522
|
+
});
|
|
1523
|
+
}
|
|
1524
|
+
// Force override of position in case of the use of a progress bar component
|
|
1525
|
+
if (content instanceof DfProgressIndicatorContentProgressBar) {
|
|
1526
|
+
options = {
|
|
1527
|
+
...options,
|
|
1528
|
+
position: content.position
|
|
1529
|
+
};
|
|
1530
|
+
}
|
|
1531
|
+
// Apply options to the created components
|
|
1532
|
+
if (backdropRef) {
|
|
1533
|
+
this.applyOptions(backdropRef, this.backdropAttributes, { ...options, isGlobalBackdrop: containerElt === this.document.body });
|
|
1534
|
+
}
|
|
1535
|
+
this.applyOptions(containerCmpRef, this.containerAttributes, options);
|
|
1536
|
+
const progressIndicatorRef = new DfProgressIndicatorRef(containerCmpRef, contentRef, backdropRef);
|
|
1537
|
+
this.activeInstances.push(progressIndicatorRef);
|
|
1538
|
+
return progressIndicatorRef;
|
|
1539
|
+
}
|
|
1540
|
+
close(progressIndicatorRef) {
|
|
1541
|
+
const instanceIndex = this.activeInstances.indexOf(progressIndicatorRef);
|
|
1542
|
+
if (instanceIndex > -1) {
|
|
1543
|
+
Object.keys(progressIndicatorRef).forEach(key => {
|
|
1544
|
+
const propertyValue = progressIndicatorRef[key];
|
|
1545
|
+
if (propertyValue && propertyValue instanceof ComponentRef) {
|
|
1546
|
+
propertyValue.destroy();
|
|
1547
|
+
progressIndicatorRef[key] = undefined;
|
|
1548
|
+
}
|
|
1549
|
+
});
|
|
1550
|
+
this.activeInstances.splice(instanceIndex, 1);
|
|
1551
|
+
}
|
|
1552
|
+
else {
|
|
1553
|
+
throw new Error('[Design Factory] The specified progress indicator reference is no longer active and cannot be closed.');
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
/**
|
|
1557
|
+
* Retrieve container according to the desired options.
|
|
1558
|
+
*/
|
|
1559
|
+
getContainer(document, options) {
|
|
1560
|
+
if (options?.container instanceof HTMLElement) {
|
|
1561
|
+
return options.container;
|
|
1562
|
+
}
|
|
1563
|
+
return options?.container ? document.querySelector(options.container) : document.body;
|
|
1564
|
+
}
|
|
1565
|
+
getContent(content, cfr, container) {
|
|
1566
|
+
if (!content) {
|
|
1567
|
+
return this.createComponent(DfDefaultSpinnerComponent, cfr);
|
|
1568
|
+
}
|
|
1569
|
+
else if (content instanceof DfProgressIndicatorContentSpinner) {
|
|
1570
|
+
const cmpRef = this.createComponent(DfDefaultSpinnerComponent, cfr);
|
|
1571
|
+
this.applyOptions(cmpRef, this.defaultSpinnerAttributes, { ...content.spinnerInput, isGlobalSpinner: container === this.document.body });
|
|
1572
|
+
return cmpRef;
|
|
1573
|
+
}
|
|
1574
|
+
else if (content instanceof DfProgressIndicatorContentProgressBar) {
|
|
1575
|
+
const cmpRef = this.createComponent(DfProgressbarComponent, cfr);
|
|
1576
|
+
this.applyOptions(cmpRef, this.defaultProgressBarAttributes, { ...content.progressBarInput, infiniteAnimation: true });
|
|
1577
|
+
return cmpRef;
|
|
1578
|
+
}
|
|
1579
|
+
else if (content instanceof TemplateRef) {
|
|
1580
|
+
const viewRef = content.createEmbeddedView({});
|
|
1581
|
+
this.appRef.attachView(viewRef);
|
|
1582
|
+
return viewRef;
|
|
1583
|
+
}
|
|
1584
|
+
else {
|
|
1585
|
+
return this.createComponent(content, cfr);
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
createComponent(cmpType, cfr, childrenProjectables, container) {
|
|
1589
|
+
const cmpFactory = cfr.resolveComponentFactory(cmpType);
|
|
1590
|
+
let cmpRef;
|
|
1591
|
+
if (childrenProjectables) {
|
|
1592
|
+
if (childrenProjectables instanceof ComponentRef) {
|
|
1593
|
+
cmpRef = cmpFactory.create(this.injector, [[childrenProjectables.location.nativeElement]]);
|
|
1594
|
+
}
|
|
1595
|
+
else {
|
|
1596
|
+
cmpRef = cmpFactory.create(this.injector, [childrenProjectables.rootNodes]);
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
else {
|
|
1600
|
+
cmpRef = cmpFactory.create(this.injector);
|
|
1601
|
+
}
|
|
1602
|
+
this.appRef.attachView(cmpRef.hostView);
|
|
1603
|
+
if (container) {
|
|
1604
|
+
container.appendChild(cmpRef.location.nativeElement);
|
|
1605
|
+
}
|
|
1606
|
+
return cmpRef;
|
|
1607
|
+
}
|
|
1608
|
+
applyOptions(cmpRef, availableOptions, options) {
|
|
1609
|
+
if (options) {
|
|
1610
|
+
const cmpInst = cmpRef.instance;
|
|
1611
|
+
availableOptions.forEach((option) => {
|
|
1612
|
+
const optionValue = options[option];
|
|
1613
|
+
if (optionValue !== null && optionValue !== undefined) {
|
|
1614
|
+
cmpInst[option] = optionValue;
|
|
1615
|
+
}
|
|
1616
|
+
});
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorService, deps: [{ token: DOCUMENT }, { token: i0.RendererFactory2 }, { token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: ScrollBar }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1620
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorService, providedIn: 'root' }); }
|
|
1621
|
+
}
|
|
1622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorService, decorators: [{
|
|
1623
|
+
type: Injectable,
|
|
1066
1624
|
args: [{
|
|
1067
|
-
|
|
1068
|
-
exports: [SkipLinkDirective, SkipLinksContainerComponent]
|
|
1625
|
+
providedIn: 'root'
|
|
1069
1626
|
}]
|
|
1070
|
-
}]
|
|
1627
|
+
}], ctorParameters: function () { return [{ type: Document, decorators: [{
|
|
1628
|
+
type: Inject,
|
|
1629
|
+
args: [DOCUMENT]
|
|
1630
|
+
}] }, { type: i0.RendererFactory2 }, { type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: ScrollBar }]; } });
|
|
1071
1631
|
|
|
1072
|
-
class
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
l3.1,10.9c0,0,10-3.6,19.8-3.6c8.4,0,12.7,2.4,12.7,10.6v4.7h-12.7c-21.6,0-28,9.9-28,20.8c0,14.5,11.3,19.1,21.6,19.1
|
|
1096
|
-
c12,0,18.9-5,19.8-5c0.7,0,3.1,2.6,14,2.6V19.3C221.7,5.5,213.1,0,198.5,0 M207.1,52.7c-3.1,1.2-10.7,3.7-16.2,3.7
|
|
1097
|
-
c-6,0-10.6-2.1-10.6-8.7c0-5.7,3.1-9,11.4-9.3l15.4-0.6V52.7z M32.2,0C19.2,0,9,3.2,5.1,5.2l3.1,10.9c0,0,10-3.6,19.8-3.6
|
|
1098
|
-
c8.4,0,12.7,2.4,12.7,10.6v4.7H28c-21.6,0-28,9.9-28,20.8c0,14.5,11.3,19.1,21.6,19.1c12,0,18.9-5,19.8-5c0.7,0,3.1,2.6,14,2.6
|
|
1099
|
-
V19.3C55.4,5.5,46.8,0,32.2,0 M40.9,52.7c-3.1,1.2-10.7,3.7-16.2,3.7c-6,0-10.6-2.1-10.6-8.7c0-5.7,3.1-9,11.4-9.3l15.4-0.6V52.7z
|
|
1100
|
-
M114,39c-0.4,0.9-0.8,2.7-1.1,3.8c-0.3-1-0.8-2.8-1.1-3.8L99,6.1C96.8,0.7,93.4,0,87.2,0c-2.2,0-6.6,0.3-6.6,0.3L74,66.9h14.6
|
|
1101
|
-
l3.2-44.7l13.9,33.8c1,2.6,3.1,3.7,7.3,3.7c4.1,0,6.2-1,7.3-3.7L134,22.2l3.2,44.7h14.6l-6.6-66.6c0,0-4.4-0.3-6.6-0.3
|
|
1102
|
-
c-6.2,0-9.6,0.7-11.8,6.1L114,39z M320.8,64.7c0,0,11.2,3.1,25.5,3.1c15.3,0,22.3-1.7,22.3-1.7V54.8c0,0-7.6,1.5-18.3,1.5
|
|
1103
|
-
c-9.3,0-15.1-1.2-15.1-1.2v-16h28.9V27.8h-28.9V12.5c0,0,5.7-1,14.1-1c9.5,0,18.1,1.5,18.1,1.5V1.6c0,0-7.5-1.6-19.8-1.6
|
|
1104
|
-
c-16.3,0-27,2.9-27,2.9V64.7z"
|
|
1105
|
-
/>
|
|
1106
|
-
</g>
|
|
1107
|
-
</svg>
|
|
1108
|
-
`, isInline: true, styles: [":host{min-width:60px}:host svg{margin:10%}:host.icon-primary{fill:#005eb8}:host.icon-white{fill:#fff}\n"] }); }
|
|
1632
|
+
class DfProgressIndicatorDirective {
|
|
1633
|
+
constructor(elementRef, progressService) {
|
|
1634
|
+
this.elementRef = elementRef;
|
|
1635
|
+
this.progressService = progressService;
|
|
1636
|
+
}
|
|
1637
|
+
ngOnChanges(changes) {
|
|
1638
|
+
if (changes['dfProgressIndicator']) {
|
|
1639
|
+
const isProgressing = this.dfProgressIndicator;
|
|
1640
|
+
if (isProgressing) {
|
|
1641
|
+
const config = {
|
|
1642
|
+
...this.dfProgressIndicatorConfig?.options,
|
|
1643
|
+
container: this.elementRef.nativeElement
|
|
1644
|
+
};
|
|
1645
|
+
this.progressIndicatorRef = this.progressService.open(this.dfProgressIndicatorConfig?.content, config);
|
|
1646
|
+
}
|
|
1647
|
+
else if (!isProgressing && this.progressIndicatorRef) {
|
|
1648
|
+
this.progressService.close(this.progressIndicatorRef);
|
|
1649
|
+
this.progressIndicatorRef = undefined;
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorDirective, deps: [{ token: i0.ElementRef }, { token: DfProgressIndicatorService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1654
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DfProgressIndicatorDirective, isStandalone: true, selector: "[dfProgressIndicator]", inputs: { dfProgressIndicator: "dfProgressIndicator", dfProgressIndicatorConfig: "dfProgressIndicatorConfig" }, usesOnChanges: true, ngImport: i0 }); }
|
|
1109
1655
|
}
|
|
1110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
1111
|
-
type:
|
|
1112
|
-
args: [{
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
xml:space="preserve"
|
|
1122
|
-
>
|
|
1123
|
-
<g id="Layer_2"></g>
|
|
1124
|
-
<g id="Layer_1">
|
|
1125
|
-
<path
|
|
1126
|
-
d="M269.7,0c-8.3,0-19.8,1.4-26.9,4v61.9c5.8,1.2,16.8,2,24.4,2c26,0,36.1-10.2,36.1-34.4C303.4,12.5,290.5,0,269.7,0
|
|
1127
|
-
M257.5,12.6c2.4-0.5,7-1.1,11.6-1.1c10.6,0,18.8,5.9,18.8,22c0,15.5-4.1,22.9-20.2,22.9c-5.2,0-10.3-0.8-10.3-0.8V12.6z
|
|
1128
|
-
M461.5,65.5c0,0,9,2.4,21.7,2.4c12,0,27-4.1,27-20.3c0-10.6-7.8-15.1-20.5-19.7c-6.9-2.5-12.7-4.8-12.7-9.5
|
|
1129
|
-
c0-2.3,1.7-6.7,10.5-6.7c8.2,0,16.6,3.8,16.6,3.8l3.7-10.8C505.2,3.4,497.2,0,486.1,0c-12.1,0-23.8,6.4-23.8,19.3
|
|
1130
|
-
c0,13.3,12.1,17.3,21.5,20.5c6.4,2.2,11.8,4.4,11.8,8.7c0,4.1-2.3,7.7-13.1,7.7c-8.9,0-18.3-2-18.3-2L461.5,65.5z M429.6,50.3
|
|
1131
|
-
c-3.5,1.7-11,4.5-17.9,4.5c-10,0-11.7-4.5-11.7-14.9V0.6h-2.2c-3.3,0-10.6,0.6-12.4,0.9v40.3c0,17.6,4.3,26,22.2,26
|
|
1132
|
-
c13.7,0,21.7-5.3,22.2-5.3c0.2,0,4.9,2.9,14.3,2.9v-64c-1-0.2-8.1-0.9-11.7-0.9h-2.9V50.3z M198.5,0c-13,0-23.2,3.2-27.1,5.2
|
|
1133
|
-
l3.1,10.9c0,0,10-3.6,19.8-3.6c8.4,0,12.7,2.4,12.7,10.6v4.7h-12.7c-21.6,0-28,9.9-28,20.8c0,14.5,11.3,19.1,21.6,19.1
|
|
1134
|
-
c12,0,18.9-5,19.8-5c0.7,0,3.1,2.6,14,2.6V19.3C221.7,5.5,213.1,0,198.5,0 M207.1,52.7c-3.1,1.2-10.7,3.7-16.2,3.7
|
|
1135
|
-
c-6,0-10.6-2.1-10.6-8.7c0-5.7,3.1-9,11.4-9.3l15.4-0.6V52.7z M32.2,0C19.2,0,9,3.2,5.1,5.2l3.1,10.9c0,0,10-3.6,19.8-3.6
|
|
1136
|
-
c8.4,0,12.7,2.4,12.7,10.6v4.7H28c-21.6,0-28,9.9-28,20.8c0,14.5,11.3,19.1,21.6,19.1c12,0,18.9-5,19.8-5c0.7,0,3.1,2.6,14,2.6
|
|
1137
|
-
V19.3C55.4,5.5,46.8,0,32.2,0 M40.9,52.7c-3.1,1.2-10.7,3.7-16.2,3.7c-6,0-10.6-2.1-10.6-8.7c0-5.7,3.1-9,11.4-9.3l15.4-0.6V52.7z
|
|
1138
|
-
M114,39c-0.4,0.9-0.8,2.7-1.1,3.8c-0.3-1-0.8-2.8-1.1-3.8L99,6.1C96.8,0.7,93.4,0,87.2,0c-2.2,0-6.6,0.3-6.6,0.3L74,66.9h14.6
|
|
1139
|
-
l3.2-44.7l13.9,33.8c1,2.6,3.1,3.7,7.3,3.7c4.1,0,6.2-1,7.3-3.7L134,22.2l3.2,44.7h14.6l-6.6-66.6c0,0-4.4-0.3-6.6-0.3
|
|
1140
|
-
c-6.2,0-9.6,0.7-11.8,6.1L114,39z M320.8,64.7c0,0,11.2,3.1,25.5,3.1c15.3,0,22.3-1.7,22.3-1.7V54.8c0,0-7.6,1.5-18.3,1.5
|
|
1141
|
-
c-9.3,0-15.1-1.2-15.1-1.2v-16h28.9V27.8h-28.9V12.5c0,0,5.7-1,14.1-1c9.5,0,18.1,1.5,18.1,1.5V1.6c0,0-7.5-1.6-19.8-1.6
|
|
1142
|
-
c-16.3,0-27,2.9-27,2.9V64.7z"
|
|
1143
|
-
/>
|
|
1144
|
-
</g>
|
|
1145
|
-
</svg>
|
|
1146
|
-
`, standalone: true, styles: [":host{min-width:60px}:host svg{margin:10%}:host.icon-primary{fill:#005eb8}:host.icon-white{fill:#fff}\n"] }]
|
|
1147
|
-
}] });
|
|
1656
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorDirective, decorators: [{
|
|
1657
|
+
type: Directive,
|
|
1658
|
+
args: [{
|
|
1659
|
+
selector: '[dfProgressIndicator]',
|
|
1660
|
+
standalone: true
|
|
1661
|
+
}]
|
|
1662
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DfProgressIndicatorService }]; }, propDecorators: { dfProgressIndicator: [{
|
|
1663
|
+
type: Input
|
|
1664
|
+
}], dfProgressIndicatorConfig: [{
|
|
1665
|
+
type: Input
|
|
1666
|
+
}] } });
|
|
1148
1667
|
|
|
1149
|
-
class
|
|
1150
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
1151
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type:
|
|
1152
|
-
|
|
1668
|
+
class DfProgressIndicatorModule {
|
|
1669
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1670
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorModule, imports: [DfDefaultSpinnerComponent,
|
|
1671
|
+
DfProgressbarModule,
|
|
1672
|
+
DfProgressIndicatorBackdropComponent,
|
|
1673
|
+
DfProgressIndicatorContainerComponent,
|
|
1674
|
+
DfProgressIndicatorDirective], exports: [DfProgressbarModule,
|
|
1675
|
+
DfProgressIndicatorContainerComponent,
|
|
1676
|
+
DfProgressIndicatorDirective,
|
|
1677
|
+
DfProgressIndicatorBackdropComponent,
|
|
1678
|
+
DfDefaultSpinnerComponent] }); }
|
|
1679
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorModule, imports: [DfDefaultSpinnerComponent,
|
|
1680
|
+
DfProgressbarModule, DfProgressbarModule] }); }
|
|
1153
1681
|
}
|
|
1154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
1682
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorModule, decorators: [{
|
|
1155
1683
|
type: NgModule,
|
|
1156
1684
|
args: [{
|
|
1157
|
-
imports: [
|
|
1158
|
-
|
|
1685
|
+
imports: [
|
|
1686
|
+
DfDefaultSpinnerComponent,
|
|
1687
|
+
DfProgressbarModule,
|
|
1688
|
+
DfProgressIndicatorBackdropComponent,
|
|
1689
|
+
DfProgressIndicatorContainerComponent,
|
|
1690
|
+
DfProgressIndicatorDirective
|
|
1691
|
+
],
|
|
1692
|
+
exports: [
|
|
1693
|
+
DfProgressbarModule,
|
|
1694
|
+
DfProgressIndicatorContainerComponent,
|
|
1695
|
+
DfProgressIndicatorDirective,
|
|
1696
|
+
DfProgressIndicatorBackdropComponent,
|
|
1697
|
+
DfDefaultSpinnerComponent
|
|
1698
|
+
]
|
|
1159
1699
|
}]
|
|
1160
1700
|
}] });
|
|
1161
1701
|
|
|
@@ -1413,9 +1953,9 @@ const options = {
|
|
|
1413
1953
|
return (passiveOptionAccessed = true);
|
|
1414
1954
|
}
|
|
1415
1955
|
};
|
|
1416
|
-
const noop
|
|
1417
|
-
w.addEventListener && w.addEventListener('p', noop
|
|
1418
|
-
w.removeEventListener && w.removeEventListener('p', noop
|
|
1956
|
+
const noop = () => { };
|
|
1957
|
+
w.addEventListener && w.addEventListener('p', noop, options);
|
|
1958
|
+
w.removeEventListener && w.removeEventListener('p', noop, false);
|
|
1419
1959
|
const supportsPassiveEvents = passiveOptionAccessed;
|
|
1420
1960
|
/**
|
|
1421
1961
|
* Helper class to attach event listeners to DOM elements with debounce support using rxjs
|
|
@@ -3687,7 +4227,7 @@ class SliderComponent {
|
|
|
3687
4227
|
return changeContext;
|
|
3688
4228
|
}
|
|
3689
4229
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SliderComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3690
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: SliderComponent, isStandalone: true, selector: "ngx-slider", inputs: { value: "value", highValue: "highValue", options: "options", manualRefresh: "manualRefresh", triggerFocus: "triggerFocus" }, outputs: { valueChange: "valueChange", highValueChange: "highValueChange", userChangeStart: "userChangeStart", userChange: "userChange", userChangeEnd: "userChangeEnd" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "class": "this.class", "class.vertical": "this.sliderElementVerticalClass", "class.animate": "this.sliderElementAnimateClass", "class.with-legend": "this.sliderElementWithLegendClass", "attr.disabled": "this.sliderElementDisabledAttr", "attr.aria-label": "this.sliderElementAriaLabel" } }, providers: [NGX_SLIDER_CONTROL_VALUE_ACCESSOR], queries: [{ propertyName: "tooltipTemplate", first: true, predicate: ["tooltipTemplate"], descendants: true }], viewQueries: [{ propertyName: "leftOuterSelectionBarElement", first: true, predicate: ["leftOuterSelectionBar"], descendants: true, read: SliderElementDirective }, { propertyName: "rightOuterSelectionBarElement", first: true, predicate: ["rightOuterSelectionBar"], descendants: true, read: SliderElementDirective }, { propertyName: "fullBarElement", first: true, predicate: ["fullBar"], descendants: true, read: SliderElementDirective }, { propertyName: "selectionBarElement", first: true, predicate: ["selectionBar"], descendants: true, read: SliderElementDirective }, { propertyName: "minHandleElement", first: true, predicate: ["minHandle"], descendants: true, read: SliderHandleDirective }, { propertyName: "maxHandleElement", first: true, predicate: ["maxHandle"], descendants: true, read: SliderHandleDirective }, { propertyName: "floorLabelElement", first: true, predicate: ["floorLabel"], descendants: true, read: SliderLabelDirective }, { propertyName: "ceilLabelElement", first: true, predicate: ["ceilLabel"], descendants: true, read: SliderLabelDirective }, { propertyName: "minHandleLabelElement", first: true, predicate: ["minHandleLabel"], descendants: true, read: SliderLabelDirective }, { propertyName: "maxHandleLabelElement", first: true, predicate: ["maxHandleLabel"], descendants: true, read: SliderLabelDirective }, { propertyName: "combinedLabelElement", first: true, predicate: ["combinedLabel"], descendants: true, read: SliderLabelDirective }, { propertyName: "ticksElement", first: true, predicate: ["ticksElement"], descendants: true, read: SliderElementDirective }], usesOnChanges: true, ngImport: i0, template: "<!-- // 0 Left selection bar outside two handles -->\n<span ngxSliderElement #leftOuterSelectionBar class=\"ngx-slider-span ngx-slider-bar-wrapper ngx-slider-left-out-selection\">\n <span class=\"ngx-slider-span ngx-slider-bar\"></span>\n</span>\n<!-- // 1 Right selection bar outside two handles -->\n<span ngxSliderElement #rightOuterSelectionBar class=\"ngx-slider-span ngx-slider-bar-wrapper ngx-slider-right-out-selection\">\n <span class=\"ngx-slider-span ngx-slider-bar\"></span>\n</span>\n<!-- // 2 The whole slider bar -->\n<span ngxSliderElement #fullBar [class.ngx-slider-transparent]=\"fullBarTransparentClass\" class=\"ngx-slider-span ngx-slider-bar-wrapper ngx-slider-full-bar\">\n <span class=\"ngx-slider-span ngx-slider-bar\"></span>\n</span>\n<!-- // 3 Selection bar between two handles -->\n<span ngxSliderElement #selectionBar [class.ngx-slider-draggable]=\"selectionBarDraggableClass\" class=\"ngx-slider-span ngx-slider-bar-wrapper ngx-slider-selection-bar\">\n <span class=\"ngx-slider-span ngx-slider-bar ngx-slider-selection\" [ngStyle]=\"barStyle\"></span>\n</span>\n<!-- // 4 Low slider handle -->\n<span ngxSliderHandle #minHandle class=\"ngx-slider-span ngx-slider-pointer ngx-slider-pointer-min\" [ngStyle]=minPointerStyle></span>\n<!-- // 5 High slider handle -->\n<span ngxSliderHandle #maxHandle [style.display]=\"range ? 'inherit' : 'none'\" class=\"ngx-slider-span ngx-slider-pointer ngx-slider-pointer-max\" [ngStyle]=maxPointerStyle></span>\n<!-- // 6 Floor label -->\n<span ngxSliderLabel #floorLabel class=\"ngx-slider-span ngx-slider-bubble ngx-slider-limit ngx-slider-floor\"></span>\n<!-- // 7 Ceiling label -->\n<span ngxSliderLabel #ceilLabel class=\"ngx-slider-span ngx-slider-bubble ngx-slider-limit ngx-slider-ceil\"></span>\n<!-- // 8 Label above the low slider handle -->\n<span ngxSliderLabel #minHandleLabel class=\"ngx-slider-span ngx-slider-bubble ngx-slider-model-value\"></span>\n<!-- // 9 Label above the high slider handle -->\n<span ngxSliderLabel #maxHandleLabel class=\"ngx-slider-span ngx-slider-bubble ngx-slider-model-high\"></span>\n<!-- // 10 Combined range label when the slider handles are close ex. 15 - 17 -->\n<span ngxSliderLabel #combinedLabel class=\"ngx-slider-span ngx-slider-bubble ngx-slider-combined\"></span>\n<!-- // 11 The ticks -->\n<span ngxSliderElement #ticksElement [hidden]=\"!showTicks\" [class.ngx-slider-ticks-values-under]=\"ticksUnderValuesClass\" class=\"ngx-slider-ticks\">\n <span *ngFor=\"let t of ticks\" class=\"ngx-slider-tick\" [ngClass]=\"{'ngx-slider-selected': t.selected}\" [ngStyle]=\"t.style\">\n <ngx-slider-tooltip-wrapper [template]=\"tooltipTemplate\" [tooltip]=\"t.tooltip\" [placement]=\"t.tooltipPlacement\"></ngx-slider-tooltip-wrapper>\n <ngx-slider-tooltip-wrapper *ngIf=\"t.value !== null\" class=\"ngx-slider-span ngx-slider-tick-value\"\n [template]=\"tooltipTemplate\" [tooltip]=\"t.valueTooltip\" [placement]=\"t.valueTooltipPlacement\" [content]=\"t.value\"></ngx-slider-tooltip-wrapper>\n <span *ngIf=\"t.legend !== null\" class=\"ngx-slider-span ngx-slider-tick-legend\" [innerHTML]=\"t.legend\"></span>\n </span>\n</span>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$
|
|
4230
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: SliderComponent, isStandalone: true, selector: "ngx-slider", inputs: { value: "value", highValue: "highValue", options: "options", manualRefresh: "manualRefresh", triggerFocus: "triggerFocus" }, outputs: { valueChange: "valueChange", highValueChange: "highValueChange", userChangeStart: "userChangeStart", userChange: "userChange", userChangeEnd: "userChangeEnd" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "class": "this.class", "class.vertical": "this.sliderElementVerticalClass", "class.animate": "this.sliderElementAnimateClass", "class.with-legend": "this.sliderElementWithLegendClass", "attr.disabled": "this.sliderElementDisabledAttr", "attr.aria-label": "this.sliderElementAriaLabel" } }, providers: [NGX_SLIDER_CONTROL_VALUE_ACCESSOR], queries: [{ propertyName: "tooltipTemplate", first: true, predicate: ["tooltipTemplate"], descendants: true }], viewQueries: [{ propertyName: "leftOuterSelectionBarElement", first: true, predicate: ["leftOuterSelectionBar"], descendants: true, read: SliderElementDirective }, { propertyName: "rightOuterSelectionBarElement", first: true, predicate: ["rightOuterSelectionBar"], descendants: true, read: SliderElementDirective }, { propertyName: "fullBarElement", first: true, predicate: ["fullBar"], descendants: true, read: SliderElementDirective }, { propertyName: "selectionBarElement", first: true, predicate: ["selectionBar"], descendants: true, read: SliderElementDirective }, { propertyName: "minHandleElement", first: true, predicate: ["minHandle"], descendants: true, read: SliderHandleDirective }, { propertyName: "maxHandleElement", first: true, predicate: ["maxHandle"], descendants: true, read: SliderHandleDirective }, { propertyName: "floorLabelElement", first: true, predicate: ["floorLabel"], descendants: true, read: SliderLabelDirective }, { propertyName: "ceilLabelElement", first: true, predicate: ["ceilLabel"], descendants: true, read: SliderLabelDirective }, { propertyName: "minHandleLabelElement", first: true, predicate: ["minHandleLabel"], descendants: true, read: SliderLabelDirective }, { propertyName: "maxHandleLabelElement", first: true, predicate: ["maxHandleLabel"], descendants: true, read: SliderLabelDirective }, { propertyName: "combinedLabelElement", first: true, predicate: ["combinedLabel"], descendants: true, read: SliderLabelDirective }, { propertyName: "ticksElement", first: true, predicate: ["ticksElement"], descendants: true, read: SliderElementDirective }], usesOnChanges: true, ngImport: i0, template: "<!-- // 0 Left selection bar outside two handles -->\n<span ngxSliderElement #leftOuterSelectionBar class=\"ngx-slider-span ngx-slider-bar-wrapper ngx-slider-left-out-selection\">\n <span class=\"ngx-slider-span ngx-slider-bar\"></span>\n</span>\n<!-- // 1 Right selection bar outside two handles -->\n<span ngxSliderElement #rightOuterSelectionBar class=\"ngx-slider-span ngx-slider-bar-wrapper ngx-slider-right-out-selection\">\n <span class=\"ngx-slider-span ngx-slider-bar\"></span>\n</span>\n<!-- // 2 The whole slider bar -->\n<span ngxSliderElement #fullBar [class.ngx-slider-transparent]=\"fullBarTransparentClass\" class=\"ngx-slider-span ngx-slider-bar-wrapper ngx-slider-full-bar\">\n <span class=\"ngx-slider-span ngx-slider-bar\"></span>\n</span>\n<!-- // 3 Selection bar between two handles -->\n<span ngxSliderElement #selectionBar [class.ngx-slider-draggable]=\"selectionBarDraggableClass\" class=\"ngx-slider-span ngx-slider-bar-wrapper ngx-slider-selection-bar\">\n <span class=\"ngx-slider-span ngx-slider-bar ngx-slider-selection\" [ngStyle]=\"barStyle\"></span>\n</span>\n<!-- // 4 Low slider handle -->\n<span ngxSliderHandle #minHandle class=\"ngx-slider-span ngx-slider-pointer ngx-slider-pointer-min\" [ngStyle]=minPointerStyle></span>\n<!-- // 5 High slider handle -->\n<span ngxSliderHandle #maxHandle [style.display]=\"range ? 'inherit' : 'none'\" class=\"ngx-slider-span ngx-slider-pointer ngx-slider-pointer-max\" [ngStyle]=maxPointerStyle></span>\n<!-- // 6 Floor label -->\n<span ngxSliderLabel #floorLabel class=\"ngx-slider-span ngx-slider-bubble ngx-slider-limit ngx-slider-floor\"></span>\n<!-- // 7 Ceiling label -->\n<span ngxSliderLabel #ceilLabel class=\"ngx-slider-span ngx-slider-bubble ngx-slider-limit ngx-slider-ceil\"></span>\n<!-- // 8 Label above the low slider handle -->\n<span ngxSliderLabel #minHandleLabel class=\"ngx-slider-span ngx-slider-bubble ngx-slider-model-value\"></span>\n<!-- // 9 Label above the high slider handle -->\n<span ngxSliderLabel #maxHandleLabel class=\"ngx-slider-span ngx-slider-bubble ngx-slider-model-high\"></span>\n<!-- // 10 Combined range label when the slider handles are close ex. 15 - 17 -->\n<span ngxSliderLabel #combinedLabel class=\"ngx-slider-span ngx-slider-bubble ngx-slider-combined\"></span>\n<!-- // 11 The ticks -->\n<span ngxSliderElement #ticksElement [hidden]=\"!showTicks\" [class.ngx-slider-ticks-values-under]=\"ticksUnderValuesClass\" class=\"ngx-slider-ticks\">\n <span *ngFor=\"let t of ticks\" class=\"ngx-slider-tick\" [ngClass]=\"{'ngx-slider-selected': t.selected}\" [ngStyle]=\"t.style\">\n <ngx-slider-tooltip-wrapper [template]=\"tooltipTemplate\" [tooltip]=\"t.tooltip\" [placement]=\"t.tooltipPlacement\"></ngx-slider-tooltip-wrapper>\n <ngx-slider-tooltip-wrapper *ngIf=\"t.value !== null\" class=\"ngx-slider-span ngx-slider-tick-value\"\n [template]=\"tooltipTemplate\" [tooltip]=\"t.valueTooltip\" [placement]=\"t.valueTooltipPlacement\" [content]=\"t.value\"></ngx-slider-tooltip-wrapper>\n <span *ngIf=\"t.legend !== null\" class=\"ngx-slider-span ngx-slider-tick-legend\" [innerHTML]=\"t.legend\"></span>\n </span>\n</span>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TooltipWrapperComponent, selector: "ngx-slider-tooltip-wrapper", inputs: ["template", "tooltip", "placement", "content"] }, { kind: "directive", type: SliderLabelDirective, selector: "[ngxSliderLabel]" }, { kind: "directive", type: SliderHandleDirective, selector: "[ngxSliderHandle]" }, { kind: "directive", type: SliderElementDirective, selector: "[ngxSliderElement]" }] }); }
|
|
3691
4231
|
}
|
|
3692
4232
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SliderComponent, decorators: [{
|
|
3693
4233
|
type: Component,
|
|
@@ -3795,49 +4335,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImpor
|
|
|
3795
4335
|
}]
|
|
3796
4336
|
}] });
|
|
3797
4337
|
|
|
3798
|
-
/**
|
|
3799
|
-
* My dfTooltipTruncate directive
|
|
3800
|
-
*/
|
|
3801
|
-
class DfTooltipTruncateDirective {
|
|
3802
|
-
constructor(tooltip, elementRef, renderer) {
|
|
3803
|
-
this.tooltip = tooltip;
|
|
3804
|
-
this.elementRef = elementRef;
|
|
3805
|
-
this.renderer = renderer;
|
|
3806
|
-
}
|
|
3807
|
-
ngOnInit() {
|
|
3808
|
-
this.renderer.addClass(this.elementRef.nativeElement, 'text-truncate');
|
|
3809
|
-
}
|
|
3810
|
-
ngDoCheck() {
|
|
3811
|
-
this.tooltip.disableTooltip = !this.hasOverflow(this.elementRef.nativeElement);
|
|
3812
|
-
}
|
|
3813
|
-
hasOverflow(element) {
|
|
3814
|
-
return element?.offsetHeight < element?.scrollHeight || element?.offsetWidth < element?.scrollWidth;
|
|
3815
|
-
}
|
|
3816
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfTooltipTruncateDirective, deps: [{ token: i1.NgbTooltip }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3817
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DfTooltipTruncateDirective, isStandalone: true, selector: "[dfTooltipTruncate]", exportAs: ["dfTooltipTruncate"], ngImport: i0 }); }
|
|
3818
|
-
}
|
|
3819
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfTooltipTruncateDirective, decorators: [{
|
|
3820
|
-
type: Directive,
|
|
3821
|
-
args: [{
|
|
3822
|
-
exportAs: 'dfTooltipTruncate',
|
|
3823
|
-
selector: '[dfTooltipTruncate]',
|
|
3824
|
-
standalone: true
|
|
3825
|
-
}]
|
|
3826
|
-
}], ctorParameters: function () { return [{ type: i1.NgbTooltip }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; } });
|
|
3827
|
-
|
|
3828
|
-
class DfTooltipModule {
|
|
3829
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3830
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfTooltipModule, imports: [DfTooltipTruncateDirective], exports: [DfTooltipTruncateDirective, NgbTooltipModule] }); }
|
|
3831
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfTooltipModule, imports: [NgbTooltipModule] }); }
|
|
3832
|
-
}
|
|
3833
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfTooltipModule, decorators: [{
|
|
3834
|
-
type: NgModule,
|
|
3835
|
-
args: [{
|
|
3836
|
-
imports: [DfTooltipTruncateDirective],
|
|
3837
|
-
exports: [DfTooltipTruncateDirective, NgbTooltipModule]
|
|
3838
|
-
}]
|
|
3839
|
-
}] });
|
|
3840
|
-
|
|
3841
4338
|
/**
|
|
3842
4339
|
* A configuration service for the [DfSideNavService](#/components/sidenav/api#DfSideNavComponent) component.
|
|
3843
4340
|
*
|
|
@@ -3899,561 +4396,278 @@ class DfSideNavService {
|
|
|
3899
4396
|
this.subscription.unsubscribe();
|
|
3900
4397
|
}
|
|
3901
4398
|
/**
|
|
3902
|
-
* Use this to init the list of Elements from your sidenav
|
|
3903
|
-
*
|
|
3904
|
-
*
|
|
3905
|
-
* Second option withRouter is to be set to false if you are not passing link string for the angular Router
|
|
3906
|
-
* Here we are not deep copying the array --> the function will change it
|
|
3907
|
-
*/
|
|
3908
|
-
initItems(items, withRouter = true) {
|
|
3909
|
-
this._items = items;
|
|
3910
|
-
this.addNavItemType(withRouter);
|
|
3911
|
-
this.setActiveItem(this._items);
|
|
3912
|
-
this.dispatchSideNavItems();
|
|
3913
|
-
}
|
|
3914
|
-
/**
|
|
3915
|
-
* Use this to inactivate the list of Elements from your sidenav
|
|
3916
|
-
* isActive properties of all items will be set to false recursively
|
|
3917
|
-
*
|
|
3918
|
-
*/
|
|
3919
|
-
inactiveItems(list) {
|
|
3920
|
-
list.forEach(item => {
|
|
3921
|
-
item.isActive = false;
|
|
3922
|
-
if (item.subMenus) {
|
|
3923
|
-
this.inactiveItems(item.subMenus);
|
|
3924
|
-
}
|
|
3925
|
-
});
|
|
3926
|
-
this.dispatchSideNavItems();
|
|
3927
|
-
}
|
|
3928
|
-
/**
|
|
3929
|
-
* Use this to active the item pass as input
|
|
3930
|
-
* This function inactivate all the other items of the service
|
|
3931
|
-
* It will then dispatch the list of items of the sideNav to activeItem$
|
|
3932
|
-
*
|
|
3933
|
-
*/
|
|
3934
|
-
activeItem(item) {
|
|
3935
|
-
this.inactiveItems(this._items);
|
|
3936
|
-
item.isActive = true;
|
|
3937
|
-
this._activeItem$.next(item);
|
|
3938
|
-
this.dispatchSideNavItems();
|
|
3939
|
-
}
|
|
3940
|
-
/**
|
|
3941
|
-
* Getter to know when to put/remove the overlay.
|
|
3942
|
-
* `True` in case of overlay needed
|
|
3943
|
-
*
|
|
3944
|
-
*/
|
|
3945
|
-
get isAppOverlay$() {
|
|
3946
|
-
return this._isAppOverlay$.asObservable();
|
|
3947
|
-
}
|
|
3948
|
-
/**
|
|
3949
|
-
* Getter to know if the sidenav is in an overlay panel or not
|
|
3950
|
-
* `True` in case of overlay panel
|
|
3951
|
-
*
|
|
3952
|
-
*/
|
|
3953
|
-
get isInMenuOverlay$() {
|
|
3954
|
-
return this._isInMenuOverlay$.asObservable();
|
|
3955
|
-
}
|
|
3956
|
-
/**
|
|
3957
|
-
* Getter to know the current activeItem a user clicked on
|
|
3958
|
-
*
|
|
3959
|
-
*/
|
|
3960
|
-
get activeItem$() {
|
|
3961
|
-
return this._activeItem$.asObservable();
|
|
3962
|
-
}
|
|
3963
|
-
/**
|
|
3964
|
-
* Getter to know if the sideNav is present in the page
|
|
3965
|
-
* SideNav may be collapsed here or not
|
|
3966
|
-
*
|
|
3967
|
-
*/
|
|
3968
|
-
get isPresent$() {
|
|
3969
|
-
return this._isPresent$.asObservable();
|
|
3970
|
-
}
|
|
3971
|
-
/**
|
|
3972
|
-
* Future Options
|
|
3973
|
-
*/
|
|
3974
|
-
get isMinimized$() {
|
|
3975
|
-
return this._isMinmized$.asObservable();
|
|
3976
|
-
}
|
|
3977
|
-
/**
|
|
3978
|
-
* Getter to know if the SideNav is collapsed or not
|
|
3979
|
-
* If `true` the SideNav is collapsed
|
|
3980
|
-
*
|
|
3981
|
-
*/
|
|
3982
|
-
get isCollapsed$() {
|
|
3983
|
-
return this._isCollapsed$.asObservable();
|
|
3984
|
-
}
|
|
3985
|
-
/**
|
|
3986
|
-
* Getter of the SideNav Items after they have beens changed
|
|
3987
|
-
*
|
|
3988
|
-
*/
|
|
3989
|
-
get sideNavItems$() {
|
|
3990
|
-
return this._sideNavItems$.asObservable();
|
|
3991
|
-
}
|
|
3992
|
-
/**
|
|
3993
|
-
* Getter to know the mode Apply for the SideNav
|
|
3994
|
-
* If `true` the SideNav can be in overlay (but not necessary is).
|
|
3995
|
-
*
|
|
3996
|
-
*/
|
|
3997
|
-
get isAppOverlayMode() {
|
|
3998
|
-
return this._isAppOverlayMode;
|
|
3999
|
-
}
|
|
4000
|
-
// initItems must be used to push new items to the service
|
|
4001
|
-
get items() {
|
|
4002
|
-
return this._items;
|
|
4003
|
-
}
|
|
4004
|
-
/**
|
|
4005
|
-
* Use this to toggle a SideNav Item (either from expand to collapse or the other way around).
|
|
4006
|
-
* isCollapsed attribute of the input item is changed.
|
|
4007
|
-
* All items are push again to the stream of items.
|
|
4008
|
-
* This is used internally by the SideNav in case of click and Enter on an Item with subMenus
|
|
4009
|
-
*/
|
|
4010
|
-
toggle(itemInput) {
|
|
4011
|
-
itemInput.isCollapsed = !itemInput.isCollapsed;
|
|
4012
|
-
this.dispatchSideNavItems();
|
|
4013
|
-
}
|
|
4014
|
-
/**
|
|
4399
|
+
* Use this to init the list of Elements from your sidenav
|
|
4015
4400
|
*
|
|
4016
|
-
*
|
|
4401
|
+
*
|
|
4402
|
+
* Second option withRouter is to be set to false if you are not passing link string for the angular Router
|
|
4403
|
+
* Here we are not deep copying the array --> the function will change it
|
|
4017
4404
|
*/
|
|
4018
|
-
|
|
4019
|
-
this.
|
|
4405
|
+
initItems(items, withRouter = true) {
|
|
4406
|
+
this._items = items;
|
|
4407
|
+
this.addNavItemType(withRouter);
|
|
4408
|
+
this.setActiveItem(this._items);
|
|
4020
4409
|
this.dispatchSideNavItems();
|
|
4021
4410
|
}
|
|
4022
4411
|
/**
|
|
4023
|
-
* Use this to
|
|
4412
|
+
* Use this to inactivate the list of Elements from your sidenav
|
|
4413
|
+
* isActive properties of all items will be set to false recursively
|
|
4414
|
+
*
|
|
4024
4415
|
*/
|
|
4025
|
-
|
|
4026
|
-
|
|
4416
|
+
inactiveItems(list) {
|
|
4417
|
+
list.forEach(item => {
|
|
4418
|
+
item.isActive = false;
|
|
4419
|
+
if (item.subMenus) {
|
|
4420
|
+
this.inactiveItems(item.subMenus);
|
|
4421
|
+
}
|
|
4422
|
+
});
|
|
4027
4423
|
this.dispatchSideNavItems();
|
|
4028
4424
|
}
|
|
4029
4425
|
/**
|
|
4030
|
-
* Use this to
|
|
4031
|
-
*
|
|
4032
|
-
*
|
|
4426
|
+
* Use this to active the item pass as input
|
|
4427
|
+
* This function inactivate all the other items of the service
|
|
4428
|
+
* It will then dispatch the list of items of the sideNav to activeItem$
|
|
4033
4429
|
*
|
|
4034
4430
|
*/
|
|
4035
|
-
|
|
4036
|
-
this.
|
|
4431
|
+
activeItem(item) {
|
|
4432
|
+
this.inactiveItems(this._items);
|
|
4433
|
+
item.isActive = true;
|
|
4434
|
+
this._activeItem$.next(item);
|
|
4435
|
+
this.dispatchSideNavItems();
|
|
4037
4436
|
}
|
|
4038
4437
|
/**
|
|
4039
|
-
*
|
|
4438
|
+
* Getter to know when to put/remove the overlay.
|
|
4439
|
+
* `True` in case of overlay needed
|
|
4040
4440
|
*
|
|
4041
4441
|
*/
|
|
4042
|
-
|
|
4043
|
-
this.
|
|
4442
|
+
get isAppOverlay$() {
|
|
4443
|
+
return this._isAppOverlay$.asObservable();
|
|
4044
4444
|
}
|
|
4045
4445
|
/**
|
|
4046
|
-
*
|
|
4446
|
+
* Getter to know if the sidenav is in an overlay panel or not
|
|
4447
|
+
* `True` in case of overlay panel
|
|
4047
4448
|
*
|
|
4048
4449
|
*/
|
|
4049
|
-
|
|
4050
|
-
this.
|
|
4450
|
+
get isInMenuOverlay$() {
|
|
4451
|
+
return this._isInMenuOverlay$.asObservable();
|
|
4051
4452
|
}
|
|
4052
4453
|
/**
|
|
4053
|
-
*
|
|
4454
|
+
* Getter to know the current activeItem a user clicked on
|
|
4054
4455
|
*
|
|
4055
4456
|
*/
|
|
4056
|
-
|
|
4057
|
-
this.
|
|
4058
|
-
}
|
|
4059
|
-
// internal usage from the SideNav. Call when component is destroy
|
|
4060
|
-
removeSideBar() {
|
|
4061
|
-
this._isCollapsed$.next(false);
|
|
4062
|
-
this._isPresent$.next(false);
|
|
4457
|
+
get activeItem$() {
|
|
4458
|
+
return this._activeItem$.asObservable();
|
|
4063
4459
|
}
|
|
4064
4460
|
/**
|
|
4065
|
-
*
|
|
4066
|
-
*
|
|
4067
|
-
* An event is send to isAppOverlay$ depending on your status
|
|
4068
|
-
* if Input = `True` and isCollapsed = `False` then isAppOverlay$
|
|
4069
|
-
* will be `True`
|
|
4461
|
+
* Getter to know if the sideNav is present in the page
|
|
4462
|
+
* SideNav may be collapsed here or not
|
|
4070
4463
|
*
|
|
4071
4464
|
*/
|
|
4072
|
-
|
|
4073
|
-
this.
|
|
4074
|
-
this.updateOverLay();
|
|
4075
|
-
}
|
|
4076
|
-
// Internal usage to the sidenav component
|
|
4077
|
-
// Do not use
|
|
4078
|
-
setSideNav() {
|
|
4079
|
-
this._isPresent$.next(true);
|
|
4465
|
+
get isPresent$() {
|
|
4466
|
+
return this._isPresent$.asObservable();
|
|
4080
4467
|
}
|
|
4081
4468
|
/**
|
|
4082
|
-
*
|
|
4083
|
-
* @param itemInput
|
|
4084
|
-
* @param itemsList
|
|
4469
|
+
* Future Options
|
|
4085
4470
|
*/
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
if (item === itemInput && item.subMenus) {
|
|
4089
|
-
item.isCollapsed = true;
|
|
4090
|
-
return true; // propagate the collapse up
|
|
4091
|
-
}
|
|
4092
|
-
else if (item === itemInput) {
|
|
4093
|
-
return true;
|
|
4094
|
-
}
|
|
4095
|
-
else if (item.subMenus) {
|
|
4096
|
-
const needcol = this.collapse(itemInput, item.subMenus);
|
|
4097
|
-
if (needcol) {
|
|
4098
|
-
item.isCollapsed = true; // collapse it
|
|
4099
|
-
return true; // propagate the collapse up
|
|
4100
|
-
}
|
|
4101
|
-
}
|
|
4102
|
-
}
|
|
4103
|
-
return false;
|
|
4471
|
+
get isMinimized$() {
|
|
4472
|
+
return this._isMinmized$.asObservable();
|
|
4104
4473
|
}
|
|
4105
4474
|
/**
|
|
4475
|
+
* Getter to know if the SideNav is collapsed or not
|
|
4476
|
+
* If `true` the SideNav is collapsed
|
|
4106
4477
|
*
|
|
4107
|
-
* @param itemsList
|
|
4108
4478
|
*/
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
if (item.subMenus) {
|
|
4112
|
-
item.isCollapsed = true;
|
|
4113
|
-
this.collapseAll(item.subMenus);
|
|
4114
|
-
}
|
|
4115
|
-
});
|
|
4116
|
-
}
|
|
4117
|
-
// Only one item at the time must be active
|
|
4118
|
-
// Active flag in item is only valid for action button and link
|
|
4119
|
-
// Router link does not use this active flag to work
|
|
4120
|
-
// It is up to you to inactivateItems when needed when you mix actionButton and router link
|
|
4121
|
-
// To avoid more than one active state visible
|
|
4122
|
-
setActiveItem(items, foundAnActive = false) {
|
|
4123
|
-
let foundActive = foundAnActive;
|
|
4124
|
-
items.forEach(item => {
|
|
4125
|
-
if (item.isActive && foundAnActive) {
|
|
4126
|
-
throw Error('DfSideNavService must be init with only one isActive item');
|
|
4127
|
-
}
|
|
4128
|
-
else if (item.isActive) {
|
|
4129
|
-
this._activeItem$.next(item);
|
|
4130
|
-
foundActive = true;
|
|
4131
|
-
}
|
|
4132
|
-
if (item.subMenus) {
|
|
4133
|
-
foundActive = this.setActiveItem(item.subMenus, foundActive);
|
|
4134
|
-
}
|
|
4135
|
-
});
|
|
4136
|
-
return foundActive;
|
|
4137
|
-
}
|
|
4138
|
-
addNavItemType(withRouter, items = this._items) {
|
|
4139
|
-
items.forEach(item => {
|
|
4140
|
-
if (!item.type) {
|
|
4141
|
-
if (item.subMenus) {
|
|
4142
|
-
item.type = DfNavItemType.subMenus;
|
|
4143
|
-
}
|
|
4144
|
-
else if (item.isExternal) {
|
|
4145
|
-
item.type = DfNavItemType.externalLink;
|
|
4146
|
-
}
|
|
4147
|
-
else if (withRouter) {
|
|
4148
|
-
item.type = DfNavItemType.routerLink;
|
|
4149
|
-
}
|
|
4150
|
-
else {
|
|
4151
|
-
item.type = DfNavItemType.actionButton;
|
|
4152
|
-
}
|
|
4153
|
-
}
|
|
4154
|
-
if (item.subMenus) {
|
|
4155
|
-
this.addNavItemType(withRouter, item.subMenus);
|
|
4156
|
-
}
|
|
4157
|
-
});
|
|
4158
|
-
}
|
|
4159
|
-
dispatchSideNavItems() {
|
|
4160
|
-
this._sideNavItems$.next(this._items);
|
|
4161
|
-
}
|
|
4162
|
-
updateOverLay() {
|
|
4163
|
-
this._isAppOverlay$.next(this.isAppOverlayMode && this._isCollapsed$.value === false);
|
|
4164
|
-
}
|
|
4165
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavService, deps: [{ token: DfSideNavConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4166
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavService, providedIn: 'root' }); }
|
|
4167
|
-
}
|
|
4168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavService, decorators: [{
|
|
4169
|
-
type: Injectable,
|
|
4170
|
-
args: [{
|
|
4171
|
-
providedIn: 'root'
|
|
4172
|
-
}]
|
|
4173
|
-
}], ctorParameters: function () { return [{ type: DfSideNavConfig }]; } });
|
|
4174
|
-
|
|
4175
|
-
// Default DF breakpoints
|
|
4176
|
-
const DF_BREAKPOINTS_VAR_DEFAULT = {
|
|
4177
|
-
xs: '--df-breakpoint-xs',
|
|
4178
|
-
sm: '--df-breakpoint-sm',
|
|
4179
|
-
md: '--df-breakpoint-md',
|
|
4180
|
-
lg: '--df-breakpoint-lg',
|
|
4181
|
-
xl: '--df-breakpoint-xl',
|
|
4182
|
-
xxl: '--df-breakpoint-xxl',
|
|
4183
|
-
xxxl: '--df-breakpoint-xxxl'
|
|
4184
|
-
};
|
|
4185
|
-
const BREAKPOINTS_VARS = new InjectionToken('Bootstrap Breakpoints', {
|
|
4186
|
-
providedIn: 'root',
|
|
4187
|
-
factory() {
|
|
4188
|
-
return DF_BREAKPOINTS_VAR_DEFAULT;
|
|
4189
|
-
}
|
|
4190
|
-
});
|
|
4191
|
-
class DfBreakpoints {
|
|
4192
|
-
constructor(_breakPointsVar, platformID) {
|
|
4193
|
-
this._breakPointsVar = _breakPointsVar;
|
|
4194
|
-
this.platformID = platformID;
|
|
4195
|
-
this._breakPoints$ = new BehaviorSubject(null);
|
|
4196
|
-
this.initBreakpoints();
|
|
4197
|
-
}
|
|
4198
|
-
get breakPoints$() {
|
|
4199
|
-
return this._breakPoints$.asObservable();
|
|
4200
|
-
}
|
|
4201
|
-
initBreakpoints() {
|
|
4202
|
-
let breakPoints = null;
|
|
4203
|
-
if (isPlatformBrowser(this.platformID) && this._breakPoints$.value === null) {
|
|
4204
|
-
// we are in a browser so CSS variable are accessible
|
|
4205
|
-
// we init the BP only once
|
|
4206
|
-
const styles = window.getComputedStyle(document.documentElement);
|
|
4207
|
-
const bpArray = [];
|
|
4208
|
-
for (const el of Object.keys(this._breakPointsVar)) {
|
|
4209
|
-
const curValue = this._breakPointsVar[el];
|
|
4210
|
-
const bpValue = Number.parseInt(styles.getPropertyValue(curValue), 10);
|
|
4211
|
-
if (isNaN(bpValue)) {
|
|
4212
|
-
// We should never enter here. Only if people did not put the correct list of CSS vars...
|
|
4213
|
-
// Or if the CSS is not arrived yet.
|
|
4214
|
-
// What should we do then?
|
|
4215
|
-
// TODO init from the default list provided if we want to?
|
|
4216
|
-
}
|
|
4217
|
-
else {
|
|
4218
|
-
bpArray.push([el, bpValue]);
|
|
4219
|
-
}
|
|
4220
|
-
}
|
|
4221
|
-
breakPoints = this.generate(bpArray);
|
|
4222
|
-
// In case the first page contains the directive and the CSS vars are not available
|
|
4223
|
-
// We may need to launch a second init at load time.
|
|
4224
|
-
if (Object.keys(breakPoints).length === 0) {
|
|
4225
|
-
fromEvent(window, 'load')
|
|
4226
|
-
.pipe(take(1))
|
|
4227
|
-
.subscribe(() => {
|
|
4228
|
-
// Init once as the service is available everywhere
|
|
4229
|
-
// We do not check if the CSS variable are changing over time
|
|
4230
|
-
// here onload the CSS var should be available
|
|
4231
|
-
this.initBreakpoints();
|
|
4232
|
-
});
|
|
4233
|
-
}
|
|
4234
|
-
}
|
|
4235
|
-
this._breakPoints$.next(breakPoints);
|
|
4236
|
-
}
|
|
4237
|
-
// Utilities to use if you want to create your own queries with your values.
|
|
4238
|
-
// sizes is an array of array BreakPoints with sizes[0] --> identifier of the BreakPoint
|
|
4239
|
-
// sizes[1] px value of the BreakPoint
|
|
4240
|
-
generate(sizes) {
|
|
4241
|
-
sizes = sizes.sort((a, b) => a[1] - b[1]);
|
|
4242
|
-
const dict = {};
|
|
4243
|
-
for (let i = 0; i < sizes.length; i++) {
|
|
4244
|
-
const name = sizes[i][0];
|
|
4245
|
-
const min = sizes[i][1];
|
|
4246
|
-
const max = i === sizes.length - 1 ? undefined : sizes[i + 1][1];
|
|
4247
|
-
if (min === 0) {
|
|
4248
|
-
dict[name] = `(max-width: ${max - 0.01}px)`;
|
|
4249
|
-
}
|
|
4250
|
-
else if (max) {
|
|
4251
|
-
dict[name] = `(max-width: ${max - 0.01}px) and (min-width: ${min}px)`;
|
|
4252
|
-
}
|
|
4253
|
-
else {
|
|
4254
|
-
dict[name] = `(min-width: ${min}px)`;
|
|
4255
|
-
}
|
|
4256
|
-
}
|
|
4257
|
-
return dict;
|
|
4479
|
+
get isCollapsed$() {
|
|
4480
|
+
return this._isCollapsed$.asObservable();
|
|
4258
4481
|
}
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
4266
|
-
type: Inject,
|
|
4267
|
-
args: [BREAKPOINTS_VARS]
|
|
4268
|
-
}] }, { type: Object, decorators: [{
|
|
4269
|
-
type: Inject,
|
|
4270
|
-
args: [PLATFORM_ID]
|
|
4271
|
-
}] }]; } });
|
|
4272
|
-
class DfMediaQuery {
|
|
4273
|
-
constructor(platformId) {
|
|
4274
|
-
this._isBrowser = isPlatformBrowser(platformId);
|
|
4482
|
+
/**
|
|
4483
|
+
* Getter of the SideNav Items after they have beens changed
|
|
4484
|
+
*
|
|
4485
|
+
*/
|
|
4486
|
+
get sideNavItems$() {
|
|
4487
|
+
return this._sideNavItems$.asObservable();
|
|
4275
4488
|
}
|
|
4276
|
-
|
|
4277
|
-
|
|
4489
|
+
/**
|
|
4490
|
+
* Getter to know the mode Apply for the SideNav
|
|
4491
|
+
* If `true` the SideNav can be in overlay (but not necessary is).
|
|
4492
|
+
*
|
|
4493
|
+
*/
|
|
4494
|
+
get isAppOverlayMode() {
|
|
4495
|
+
return this._isAppOverlayMode;
|
|
4278
4496
|
}
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
}
|
|
4283
|
-
else {
|
|
4284
|
-
return this.notSupported(query);
|
|
4285
|
-
}
|
|
4497
|
+
// initItems must be used to push new items to the service
|
|
4498
|
+
get items() {
|
|
4499
|
+
return this._items;
|
|
4286
4500
|
}
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
}] }]; } });
|
|
4297
|
-
class DfMediaObserver {
|
|
4298
|
-
constructor(_mediaQuery) {
|
|
4299
|
-
this._mediaQuery = _mediaQuery;
|
|
4300
|
-
this._subscription = new Subscription();
|
|
4301
|
-
this._queries = new Map();
|
|
4501
|
+
/**
|
|
4502
|
+
* Use this to toggle a SideNav Item (either from expand to collapse or the other way around).
|
|
4503
|
+
* isCollapsed attribute of the input item is changed.
|
|
4504
|
+
* All items are push again to the stream of items.
|
|
4505
|
+
* This is used internally by the SideNav in case of click and Enter on an Item with subMenus
|
|
4506
|
+
*/
|
|
4507
|
+
toggle(itemInput) {
|
|
4508
|
+
itemInput.isCollapsed = !itemInput.isCollapsed;
|
|
4509
|
+
this.dispatchSideNavItems();
|
|
4302
4510
|
}
|
|
4303
4511
|
/**
|
|
4304
|
-
*
|
|
4305
|
-
*
|
|
4512
|
+
*
|
|
4513
|
+
* @param itemInput
|
|
4306
4514
|
*/
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4515
|
+
collapseItem(itemInput) {
|
|
4516
|
+
this.collapse(itemInput, this._items);
|
|
4517
|
+
this.dispatchSideNavItems();
|
|
4310
4518
|
}
|
|
4311
4519
|
/**
|
|
4312
|
-
*
|
|
4313
|
-
* meta information for any changes of the given queries.
|
|
4314
|
-
* @param value One or more media-queries to be observed.
|
|
4315
|
-
* @returns A stream of matches meta object for the given media-queries.
|
|
4520
|
+
* Use this to collapseAll items
|
|
4316
4521
|
*/
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
result.matches = result.matches || event.matches;
|
|
4321
|
-
result.breakpoints[event.media] = event.matches;
|
|
4322
|
-
return result;
|
|
4323
|
-
}, { matches: false, breakpoints: {} })));
|
|
4522
|
+
collapseAllItems() {
|
|
4523
|
+
this.collapseAll(this._items);
|
|
4524
|
+
this.dispatchSideNavItems();
|
|
4324
4525
|
}
|
|
4325
|
-
|
|
4326
|
-
|
|
4526
|
+
/**
|
|
4527
|
+
* Use this to set/unset the SideNav in an Overlay Menu
|
|
4528
|
+
* If input is `True` then the SideNav will be in an Overlay Menu
|
|
4529
|
+
* (when not collapsed)
|
|
4530
|
+
*
|
|
4531
|
+
*/
|
|
4532
|
+
setInMenuSideNav(on) {
|
|
4533
|
+
this._isInMenuOverlay$.next(on);
|
|
4327
4534
|
}
|
|
4328
|
-
|
|
4329
|
-
|
|
4535
|
+
/**
|
|
4536
|
+
* Use this to collapse the SideNav
|
|
4537
|
+
*
|
|
4538
|
+
*/
|
|
4539
|
+
hideSideNav() {
|
|
4540
|
+
this._isCollapsed$.next(true);
|
|
4330
4541
|
}
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
media: query,
|
|
4338
|
-
matches: queryList.matches
|
|
4339
|
-
});
|
|
4340
|
-
this._subscription.add(fromEvent(queryList, 'change').subscribe((event) => {
|
|
4341
|
-
queryList$.next(event);
|
|
4342
|
-
}));
|
|
4343
|
-
const meta = { mediaQueryList: queryList, mediaQueryList$: queryList$ };
|
|
4344
|
-
this._queries.set(query, meta);
|
|
4345
|
-
return meta;
|
|
4542
|
+
/**
|
|
4543
|
+
* Use this to make the SideNav visible (uncollapse)
|
|
4544
|
+
*
|
|
4545
|
+
*/
|
|
4546
|
+
showSideNav() {
|
|
4547
|
+
this._isCollapsed$.next(false);
|
|
4346
4548
|
}
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
}], ctorParameters: function () { return [{ type: DfMediaQuery }]; } });
|
|
4354
|
-
|
|
4355
|
-
/**
|
|
4356
|
-
* Services you can use to get indication about the current width screen of your application
|
|
4357
|
-
* the matchMedia JS feature (https://developer.mozilla.org/fr/docs/Web/API/Window/matchMedia)
|
|
4358
|
-
*/
|
|
4359
|
-
class DfMedia {
|
|
4360
|
-
constructor(mediaObserver, _breakPointsService) {
|
|
4361
|
-
this.mediaObserver = mediaObserver;
|
|
4362
|
-
this._breakPointsService = _breakPointsService;
|
|
4549
|
+
/**
|
|
4550
|
+
* Use this to toggle the SideNav status collapse/visible
|
|
4551
|
+
*
|
|
4552
|
+
*/
|
|
4553
|
+
toggleSideNav() {
|
|
4554
|
+
this._isCollapsed$.next(!this._isCollapsed$.value);
|
|
4363
4555
|
}
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
queries.push(breakPoints[el] ? breakPoints[el] : el);
|
|
4369
|
-
}
|
|
4370
|
-
}
|
|
4371
|
-
else {
|
|
4372
|
-
queries.push(breakPoints[mediaOrBreakpoints] ? breakPoints[mediaOrBreakpoints] : mediaOrBreakpoints);
|
|
4373
|
-
}
|
|
4374
|
-
return queries;
|
|
4556
|
+
// internal usage from the SideNav. Call when component is destroy
|
|
4557
|
+
removeSideBar() {
|
|
4558
|
+
this._isCollapsed$.next(false);
|
|
4559
|
+
this._isPresent$.next(false);
|
|
4375
4560
|
}
|
|
4376
4561
|
/**
|
|
4377
|
-
*
|
|
4378
|
-
*
|
|
4379
|
-
*
|
|
4380
|
-
*
|
|
4562
|
+
* Use this to set the App Overlay Mode
|
|
4563
|
+
* Input `True` if you want to set the AppOverlay
|
|
4564
|
+
* An event is send to isAppOverlay$ depending on your status
|
|
4565
|
+
* if Input = `True` and isCollapsed = `False` then isAppOverlay$
|
|
4566
|
+
* will be `True`
|
|
4567
|
+
*
|
|
4381
4568
|
*/
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4569
|
+
setAppOverlayMode(on) {
|
|
4570
|
+
this._isAppOverlayMode = on;
|
|
4571
|
+
this.updateOverLay();
|
|
4572
|
+
}
|
|
4573
|
+
// Internal usage to the sidenav component
|
|
4574
|
+
// Do not use
|
|
4575
|
+
setSideNav() {
|
|
4576
|
+
this._isPresent$.next(true);
|
|
4388
4577
|
}
|
|
4389
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMedia, deps: [{ token: DfMediaObserver }, { token: DfBreakpoints }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4390
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMedia, providedIn: 'root' }); }
|
|
4391
|
-
}
|
|
4392
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMedia, decorators: [{
|
|
4393
|
-
type: Injectable,
|
|
4394
|
-
args: [{ providedIn: 'root' }]
|
|
4395
|
-
}], ctorParameters: function () { return [{ type: DfMediaObserver }, { type: DfBreakpoints }]; } });
|
|
4396
|
-
|
|
4397
|
-
/**
|
|
4398
|
-
* Directive using the matchMedia JS feature (https://developer.mozilla.org/fr/docs/Web/API/Window/matchMedia)
|
|
4399
|
-
* to be able to add or remove an element like ngIf is doing.
|
|
4400
|
-
* Import DfMediaModule from DF to use all media elements provided
|
|
4401
|
-
*/
|
|
4402
|
-
class DfIfMediaDirective {
|
|
4403
4578
|
/**
|
|
4404
|
-
*
|
|
4405
|
-
* @param
|
|
4406
|
-
*
|
|
4579
|
+
*
|
|
4580
|
+
* @param itemInput
|
|
4581
|
+
* @param itemsList
|
|
4407
4582
|
*/
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4583
|
+
collapse(itemInput, itemsList) {
|
|
4584
|
+
for (const item of itemsList) {
|
|
4585
|
+
if (item === itemInput && item.subMenus) {
|
|
4586
|
+
item.isCollapsed = true;
|
|
4587
|
+
return true; // propagate the collapse up
|
|
4588
|
+
}
|
|
4589
|
+
else if (item === itemInput) {
|
|
4590
|
+
return true;
|
|
4591
|
+
}
|
|
4592
|
+
else if (item.subMenus) {
|
|
4593
|
+
const needcol = this.collapse(itemInput, item.subMenus);
|
|
4594
|
+
if (needcol) {
|
|
4595
|
+
item.isCollapsed = true; // collapse it
|
|
4596
|
+
return true; // propagate the collapse up
|
|
4597
|
+
}
|
|
4598
|
+
}
|
|
4599
|
+
}
|
|
4600
|
+
return false;
|
|
4601
|
+
}
|
|
4602
|
+
/**
|
|
4603
|
+
*
|
|
4604
|
+
* @param itemsList
|
|
4605
|
+
*/
|
|
4606
|
+
collapseAll(itemsList) {
|
|
4607
|
+
itemsList.forEach(item => {
|
|
4608
|
+
if (item.subMenus) {
|
|
4609
|
+
item.isCollapsed = true;
|
|
4610
|
+
this.collapseAll(item.subMenus);
|
|
4611
|
+
}
|
|
4612
|
+
});
|
|
4613
|
+
}
|
|
4614
|
+
// Only one item at the time must be active
|
|
4615
|
+
// Active flag in item is only valid for action button and link
|
|
4616
|
+
// Router link does not use this active flag to work
|
|
4617
|
+
// It is up to you to inactivateItems when needed when you mix actionButton and router link
|
|
4618
|
+
// To avoid more than one active state visible
|
|
4619
|
+
setActiveItem(items, foundAnActive = false) {
|
|
4620
|
+
let foundActive = foundAnActive;
|
|
4621
|
+
items.forEach(item => {
|
|
4622
|
+
if (item.isActive && foundAnActive) {
|
|
4623
|
+
throw Error('DfSideNavService must be init with only one isActive item');
|
|
4624
|
+
}
|
|
4625
|
+
else if (item.isActive) {
|
|
4626
|
+
this._activeItem$.next(item);
|
|
4627
|
+
foundActive = true;
|
|
4628
|
+
}
|
|
4629
|
+
if (item.subMenus) {
|
|
4630
|
+
foundActive = this.setActiveItem(item.subMenus, foundActive);
|
|
4631
|
+
}
|
|
4632
|
+
});
|
|
4633
|
+
return foundActive;
|
|
4412
4634
|
}
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4635
|
+
addNavItemType(withRouter, items = this._items) {
|
|
4636
|
+
items.forEach(item => {
|
|
4637
|
+
if (!item.type) {
|
|
4638
|
+
if (item.subMenus) {
|
|
4639
|
+
item.type = DfNavItemType.subMenus;
|
|
4640
|
+
}
|
|
4641
|
+
else if (item.isExternal) {
|
|
4642
|
+
item.type = DfNavItemType.externalLink;
|
|
4643
|
+
}
|
|
4644
|
+
else if (withRouter) {
|
|
4645
|
+
item.type = DfNavItemType.routerLink;
|
|
4646
|
+
}
|
|
4647
|
+
else {
|
|
4648
|
+
item.type = DfNavItemType.actionButton;
|
|
4649
|
+
}
|
|
4650
|
+
}
|
|
4651
|
+
if (item.subMenus) {
|
|
4652
|
+
this.addNavItemType(withRouter, item.subMenus);
|
|
4653
|
+
}
|
|
4654
|
+
});
|
|
4419
4655
|
}
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
this._viewContainerRef.clear();
|
|
4423
|
-
}
|
|
4424
|
-
this._subscription.unsubscribe();
|
|
4656
|
+
dispatchSideNavItems() {
|
|
4657
|
+
this._sideNavItems$.next(this._items);
|
|
4425
4658
|
}
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
this._viewInstance = this._viewContainerRef.createEmbeddedView(this._template);
|
|
4429
|
-
}
|
|
4430
|
-
else if (!matches) {
|
|
4431
|
-
this._viewContainerRef.clear();
|
|
4432
|
-
this._viewInstance = null;
|
|
4433
|
-
}
|
|
4659
|
+
updateOverLay() {
|
|
4660
|
+
this._isAppOverlay$.next(this.isAppOverlayMode && this._isCollapsed$.value === false);
|
|
4434
4661
|
}
|
|
4435
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
4436
|
-
static { this.ɵ
|
|
4437
|
-
}
|
|
4438
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfIfMediaDirective, decorators: [{
|
|
4439
|
-
type: Directive,
|
|
4440
|
-
args: [{ selector: '[dfIfMedia]', standalone: true }]
|
|
4441
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: DfMedia }]; }, propDecorators: { dfIfMedia: [{
|
|
4442
|
-
type: Input
|
|
4443
|
-
}] } });
|
|
4444
|
-
|
|
4445
|
-
class DfMediaModule {
|
|
4446
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMediaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4447
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfMediaModule, imports: [DfIfMediaDirective], exports: [DfIfMediaDirective] }); }
|
|
4448
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfMediaModule }); }
|
|
4662
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavService, deps: [{ token: DfSideNavConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4663
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavService, providedIn: 'root' }); }
|
|
4449
4664
|
}
|
|
4450
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
4451
|
-
type:
|
|
4665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavService, decorators: [{
|
|
4666
|
+
type: Injectable,
|
|
4452
4667
|
args: [{
|
|
4453
|
-
|
|
4454
|
-
exports: [DfIfMediaDirective]
|
|
4668
|
+
providedIn: 'root'
|
|
4455
4669
|
}]
|
|
4456
|
-
}] });
|
|
4670
|
+
}], ctorParameters: function () { return [{ type: DfSideNavConfig }]; } });
|
|
4457
4671
|
|
|
4458
4672
|
const environment = {
|
|
4459
4673
|
animation: true,
|
|
@@ -4835,7 +5049,7 @@ class DfSideNavListComponent {
|
|
|
4835
5049
|
return `df-sidenav-id-${uniqueId};`;
|
|
4836
5050
|
}
|
|
4837
5051
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4838
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DfSideNavListComponent, isStandalone: true, selector: "df-sidenavlist", inputs: { items: "items", tplIcon: "tplIcon", tplItem: "tplItem", currentItem: "currentItem", id: "id" }, ngImport: i0, template: "<ul class=\"df-sidenav-list\" [ngbCollapse]=\"currentItem?.isCollapsed ?? false\" [attr.id]=\"id\">\n <li *ngFor=\"let item of items; let i = index\" [ngSwitch]=\"item.type\" dfManageSideNav>\n <ng-container *ngSwitchCase=\"sideNavService.type.subMenus\">\n <ng-template #subMenus>\n <button\n class=\"df-sidenav-item d-flex align-items-center\"\n (click)=\"sideNavService.toggle(item)\"\n type=\"button\"\n [attr.aria-expanded]=\"!item.isCollapsed\"\n [attr.aria-controls]=\"'sidenavControl' + controlledUniqueId.toString() + '-' + i\"\n [class.df-sidenav-item-withicon]=\"item.icon\"\n >\n <ng-template\n *ngIf=\"tplIcon && item.icon; else elseIcon\"\n [ngTemplateOutlet]=\"tplIcon.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-template>\n <ng-template #elseIcon>\n <span *ngIf=\"item.icon\" aria-hidden=\"true\" class=\"{{ item.icon }} df-sidenav-icon\"></span>\n </ng-template>\n <span class=\"flex-grow-1 text-nowrap text-truncate\">{{ item.title }}</span>\n <span\n class=\"ms-3\"\n [class.icon-chevron-down]=\"item.isCollapsed\"\n [class.icon-chevron-up]=\"!item.isCollapsed\"\n ></span>\n <!-- put the chevron as icon directly in the menu -->\n <!-- todo the icon and the minimized -->\n </button>\n <!-- we don't pass the icons as they are not suppose to have ones ??-->\n <df-sidenavlist\n [items]=\"item.subMenus ?? []\"\n [tplItem]=\"tplItem\"\n [currentItem]=\"item\"\n [id]=\"'sidenavControl' + controlledUniqueId.toString() + '-' + i\"\n ></df-sidenavlist>\n </ng-template>\n <ng-container *ngIf=\"!item.breakpoints; else elseSubMenus\">\n <ng-container *ngTemplateOutlet=\"subMenus\"></ng-container>\n </ng-container>\n <ng-template #elseSubMenus>\n <ng-container *dfIfMedia=\"item.breakpoints!\">\n <ng-container *ngTemplateOutlet=\"subMenus\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-template #dfSideNavItemContent>\n <ng-template\n *ngIf=\"tplIcon && item.icon; else elseIcon\"\n [ngTemplateOutlet]=\"tplIcon.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-template>\n <ng-template #elseIcon>\n <span *ngIf=\"item.icon\" aria-hidden=\"true\" class=\"{{ item.icon }} df-sidenav-icon me-5\"></span>\n </ng-template>\n <span class=\"flex-grow-1 text-nowrap text-truncate\">{{ item.title }}</span>\n </ng-template>\n <ng-container *ngSwitchCase=\"sideNavService.type.actionButton\">\n <ng-template #dfSideNavItemButton>\n <button\n class=\"df-sidenav-item d-flex align-items-center flex-nowrap\"\n (click)=\"sideNavService.activeItem(item)\"\n [class.active]=\"item.isActive\"\n >\n <ng-container *ngTemplateOutlet=\"dfSideNavItemContent\"></ng-container>\n </button>\n </ng-template>\n <ng-container *ngIf=\"!item.breakpoints; else elseAction\">\n <ng-container *ngTemplateOutlet=\"dfSideNavItemButton\"></ng-container>\n </ng-container>\n <ng-template #elseAction>\n <ng-container *dfIfMedia=\"item.breakpoints!\">\n <ng-container *ngTemplateOutlet=\"dfSideNavItemButton\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-template #dfRouterTemplate>\n <a\n class=\"df-sidenav-item d-flex align-items-center flex-nowrap\"\n routerLinkActive=\"active\"\n routerLink=\"{{ item.value }}\"\n ariaCurrentWhenActive=\"page\"\n >\n <ng-container *ngTemplateOutlet=\"dfSideNavItemContent\"></ng-container>\n </a>\n </ng-template>\n <ng-container *ngSwitchCase=\"sideNavService.type.routerLink\">\n <ng-container *ngIf=\"!item.breakpoints; else elseRouterLink\">\n <ng-container *ngTemplateOutlet=\"dfRouterTemplate\"></ng-container>\n </ng-container>\n <ng-template #elseRouterLink>\n <ng-container *dfIfMedia=\"item.breakpoints!\">\n <ng-container *ngTemplateOutlet=\"dfRouterTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"sideNavService.type.separator\">\n <ng-template #dfSeparatorTmp>\n <hr class=\"spacing-01\" />\n </ng-template>\n <ng-container *ngIf=\"!item.breakpoints; else elseSeparator\">\n <ng-container *ngTemplateOutlet=\"dfSeparatorTmp\"></ng-container>\n </ng-container>\n <ng-template #elseSeparator>\n <ng-container *dfIfMedia=\"item.breakpoints!\">\n <ng-container *ngTemplateOutlet=\"dfSeparatorTmp\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"sideNavService.type.template\">\n <ng-template\n *ngIf=\"tplItem\"\n [ngTemplateOutlet]=\"tplItem.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"sideNavService.type.title\">\n <ng-template #dfTitleTmp>\n <div class=\"df-sidenav-item df-sidenav-title d-flex align-items-center flex-grow-1\">\n <span class=\"text-nowrap text-truncate text-uppercase text-muted\">{{ item.title }}</span>\n </div>\n </ng-template>\n <ng-container *ngIf=\"!item.breakpoints; else elseTitle\">\n <ng-container *ngTemplateOutlet=\"dfTitleTmp\"></ng-container>\n </ng-container>\n <ng-template #elseTitle>\n <ng-container *dfIfMedia=\"item.breakpoints!\">\n <ng-container *ngTemplateOutlet=\"dfTitleTmp\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-template #dfLinkDefaultTmp>\n <a\n class=\"df-sidenav-item d-flex align-items-center flex-nowrap\"\n href=\"{{ item.value }}\"\n [class.active]=\"item.isActive && item.type === sideNavService.type.link\"\n [attr.target]=\"item.type === sideNavService.type.externalLink ? '_blank' : ''\"\n >\n <ng-container *ngTemplateOutlet=\"dfSideNavItemContent\"></ng-container>\n </a>\n </ng-template>\n <ng-container *ngIf=\"!item.breakpoints; else elseDefault\">\n <ng-container *ngTemplateOutlet=\"dfLinkDefaultTmp\"></ng-container>\n </ng-container>\n <ng-template #elseDefault>\n <ng-container *dfIfMedia=\"item.breakpoints!\">\n <ng-container *ngTemplateOutlet=\"dfLinkDefaultTmp\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n </li>\n</ul>\n", dependencies: [{ kind: "component", type: DfSideNavListComponent, selector: "df-sidenavlist", inputs: ["items", "tplIcon", "tplItem", "currentItem", "id"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$
|
|
5052
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DfSideNavListComponent, isStandalone: true, selector: "df-sidenavlist", inputs: { items: "items", tplIcon: "tplIcon", tplItem: "tplItem", currentItem: "currentItem", id: "id" }, ngImport: i0, template: "<ul class=\"df-sidenav-list\" [ngbCollapse]=\"currentItem?.isCollapsed ?? false\" [attr.id]=\"id\">\n <li *ngFor=\"let item of items; let i = index\" [ngSwitch]=\"item.type\" dfManageSideNav>\n <ng-container *ngSwitchCase=\"sideNavService.type.subMenus\">\n <ng-template #subMenus>\n <button\n class=\"df-sidenav-item d-flex align-items-center\"\n (click)=\"sideNavService.toggle(item)\"\n type=\"button\"\n [attr.aria-expanded]=\"!item.isCollapsed\"\n [attr.aria-controls]=\"'sidenavControl' + controlledUniqueId.toString() + '-' + i\"\n [class.df-sidenav-item-withicon]=\"item.icon\"\n >\n <ng-template\n *ngIf=\"tplIcon && item.icon; else elseIcon\"\n [ngTemplateOutlet]=\"tplIcon.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-template>\n <ng-template #elseIcon>\n <span *ngIf=\"item.icon\" aria-hidden=\"true\" class=\"{{ item.icon }} df-sidenav-icon\"></span>\n </ng-template>\n <span class=\"flex-grow-1 text-nowrap text-truncate\">{{ item.title }}</span>\n <span\n class=\"ms-3\"\n [class.icon-chevron-down]=\"item.isCollapsed\"\n [class.icon-chevron-up]=\"!item.isCollapsed\"\n ></span>\n <!-- put the chevron as icon directly in the menu -->\n <!-- todo the icon and the minimized -->\n </button>\n <!-- we don't pass the icons as they are not suppose to have ones ??-->\n <df-sidenavlist\n [items]=\"item.subMenus ?? []\"\n [tplItem]=\"tplItem\"\n [currentItem]=\"item\"\n [id]=\"'sidenavControl' + controlledUniqueId.toString() + '-' + i\"\n ></df-sidenavlist>\n </ng-template>\n <ng-container *ngIf=\"!item.breakpoints; else elseSubMenus\">\n <ng-container *ngTemplateOutlet=\"subMenus\"></ng-container>\n </ng-container>\n <ng-template #elseSubMenus>\n <ng-container *dfIfMedia=\"item.breakpoints!\">\n <ng-container *ngTemplateOutlet=\"subMenus\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-template #dfSideNavItemContent>\n <ng-template\n *ngIf=\"tplIcon && item.icon; else elseIcon\"\n [ngTemplateOutlet]=\"tplIcon.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-template>\n <ng-template #elseIcon>\n <span *ngIf=\"item.icon\" aria-hidden=\"true\" class=\"{{ item.icon }} df-sidenav-icon me-5\"></span>\n </ng-template>\n <span class=\"flex-grow-1 text-nowrap text-truncate\">{{ item.title }}</span>\n </ng-template>\n <ng-container *ngSwitchCase=\"sideNavService.type.actionButton\">\n <ng-template #dfSideNavItemButton>\n <button\n class=\"df-sidenav-item d-flex align-items-center flex-nowrap\"\n (click)=\"sideNavService.activeItem(item)\"\n [class.active]=\"item.isActive\"\n >\n <ng-container *ngTemplateOutlet=\"dfSideNavItemContent\"></ng-container>\n </button>\n </ng-template>\n <ng-container *ngIf=\"!item.breakpoints; else elseAction\">\n <ng-container *ngTemplateOutlet=\"dfSideNavItemButton\"></ng-container>\n </ng-container>\n <ng-template #elseAction>\n <ng-container *dfIfMedia=\"item.breakpoints!\">\n <ng-container *ngTemplateOutlet=\"dfSideNavItemButton\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-template #dfRouterTemplate>\n <a\n class=\"df-sidenav-item d-flex align-items-center flex-nowrap\"\n routerLinkActive=\"active\"\n routerLink=\"{{ item.value }}\"\n ariaCurrentWhenActive=\"page\"\n >\n <ng-container *ngTemplateOutlet=\"dfSideNavItemContent\"></ng-container>\n </a>\n </ng-template>\n <ng-container *ngSwitchCase=\"sideNavService.type.routerLink\">\n <ng-container *ngIf=\"!item.breakpoints; else elseRouterLink\">\n <ng-container *ngTemplateOutlet=\"dfRouterTemplate\"></ng-container>\n </ng-container>\n <ng-template #elseRouterLink>\n <ng-container *dfIfMedia=\"item.breakpoints!\">\n <ng-container *ngTemplateOutlet=\"dfRouterTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"sideNavService.type.separator\">\n <ng-template #dfSeparatorTmp>\n <hr class=\"spacing-01\" />\n </ng-template>\n <ng-container *ngIf=\"!item.breakpoints; else elseSeparator\">\n <ng-container *ngTemplateOutlet=\"dfSeparatorTmp\"></ng-container>\n </ng-container>\n <ng-template #elseSeparator>\n <ng-container *dfIfMedia=\"item.breakpoints!\">\n <ng-container *ngTemplateOutlet=\"dfSeparatorTmp\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"sideNavService.type.template\">\n <ng-template\n *ngIf=\"tplItem\"\n [ngTemplateOutlet]=\"tplItem.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"sideNavService.type.title\">\n <ng-template #dfTitleTmp>\n <div class=\"df-sidenav-item df-sidenav-title d-flex align-items-center flex-grow-1\">\n <span class=\"text-nowrap text-truncate text-uppercase text-muted\">{{ item.title }}</span>\n </div>\n </ng-template>\n <ng-container *ngIf=\"!item.breakpoints; else elseTitle\">\n <ng-container *ngTemplateOutlet=\"dfTitleTmp\"></ng-container>\n </ng-container>\n <ng-template #elseTitle>\n <ng-container *dfIfMedia=\"item.breakpoints!\">\n <ng-container *ngTemplateOutlet=\"dfTitleTmp\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-template #dfLinkDefaultTmp>\n <a\n class=\"df-sidenav-item d-flex align-items-center flex-nowrap\"\n href=\"{{ item.value }}\"\n [class.active]=\"item.isActive && item.type === sideNavService.type.link\"\n [attr.target]=\"item.type === sideNavService.type.externalLink ? '_blank' : ''\"\n >\n <ng-container *ngTemplateOutlet=\"dfSideNavItemContent\"></ng-container>\n </a>\n </ng-template>\n <ng-container *ngIf=\"!item.breakpoints; else elseDefault\">\n <ng-container *ngTemplateOutlet=\"dfLinkDefaultTmp\"></ng-container>\n </ng-container>\n <ng-template #elseDefault>\n <ng-container *dfIfMedia=\"item.breakpoints!\">\n <ng-container *ngTemplateOutlet=\"dfLinkDefaultTmp\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n </li>\n</ul>\n", dependencies: [{ kind: "component", type: DfSideNavListComponent, selector: "df-sidenavlist", inputs: ["items", "tplIcon", "tplItem", "currentItem", "id"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: NgbCollapseModule }, { kind: "directive", type: i1.NgbCollapse, selector: "[ngbCollapse]", inputs: ["animation", "ngbCollapse", "horizontal"], outputs: ["ngbCollapseChange", "shown", "hidden"], exportAs: ["ngbCollapse"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "ngmodule", type: DfMediaModule }, { kind: "directive", type: DfIfMediaDirective, selector: "[dfIfMedia]", inputs: ["dfIfMedia"] }, { kind: "ngmodule", type: DfSideNavCollapseModule }, { kind: "directive", type: DfManageSideNavDirective, selector: "[dfManageSideNav]" }] }); }
|
|
4839
5053
|
}
|
|
4840
5054
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavListComponent, decorators: [{
|
|
4841
5055
|
type: Component,
|
|
@@ -4909,7 +5123,7 @@ class DfSideNavComponent {
|
|
|
4909
5123
|
this.sideNavService.removeSideBar();
|
|
4910
5124
|
}
|
|
4911
5125
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4912
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DfSideNavComponent, isStandalone: true, selector: "df-sidenav", host: { properties: { "class.df-sidenav-menu-overlay": "this.overlayClass", "class": "this.elements" } }, queries: [{ propertyName: "tplHeader", first: true, predicate: DfSideNavHeaderDirective, descendants: true }, { propertyName: "tplIcon", first: true, predicate: DfSideNavIconDirective, descendants: true }, { propertyName: "tplItem", first: true, predicate: DfSideNavItemDirective, descendants: true }], ngImport: i0, template: "<ng-template *ngIf=\"tplHeader\" [ngTemplateOutlet]=\"tplHeader.templateRef\"></ng-template>\n<df-sidenavlist [items]=\"(sideNavService.sideNavItems$ | async) ?? []\" [tplIcon]=\"tplIcon\" [tplItem]=\"tplItem\"></df-sidenavlist>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$
|
|
5126
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DfSideNavComponent, isStandalone: true, selector: "df-sidenav", host: { properties: { "class.df-sidenav-menu-overlay": "this.overlayClass", "class": "this.elements" } }, queries: [{ propertyName: "tplHeader", first: true, predicate: DfSideNavHeaderDirective, descendants: true }, { propertyName: "tplIcon", first: true, predicate: DfSideNavIconDirective, descendants: true }, { propertyName: "tplItem", first: true, predicate: DfSideNavItemDirective, descendants: true }], ngImport: i0, template: "<ng-template *ngIf=\"tplHeader\" [ngTemplateOutlet]=\"tplHeader.templateRef\"></ng-template>\n<df-sidenavlist [items]=\"(sideNavService.sideNavItems$ | async) ?? []\" [tplIcon]=\"tplIcon\" [tplItem]=\"tplItem\"></df-sidenavlist>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "component", type: DfSideNavListComponent, selector: "df-sidenavlist", inputs: ["items", "tplIcon", "tplItem", "currentItem", "id"] }] }); }
|
|
4913
5127
|
}
|
|
4914
5128
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavComponent, decorators: [{
|
|
4915
5129
|
type: Component,
|
|
@@ -4983,598 +5197,835 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImpor
|
|
|
4983
5197
|
type: Input
|
|
4984
5198
|
}] } });
|
|
4985
5199
|
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5200
|
+
const DF_SELECT_CLASS = 'df-ym';
|
|
5201
|
+
|
|
5202
|
+
class DfManageNavSelectDirective {
|
|
5203
|
+
constructor(select, element, rtlDirectionService, renderer) {
|
|
5204
|
+
this.select = select;
|
|
5205
|
+
this.element = element;
|
|
5206
|
+
this.rtlDirectionService = rtlDirectionService;
|
|
5207
|
+
this.renderer = renderer;
|
|
5208
|
+
}
|
|
5209
|
+
ngOnInit() {
|
|
5210
|
+
this.direction = this.rtlDirectionService.getPageDirection(this.element);
|
|
5211
|
+
}
|
|
5212
|
+
handleKeyDown(event) {
|
|
5213
|
+
if (this.direction === RightToLeftDirectionEnum.LeftToRight) {
|
|
5214
|
+
this.arrowLeftInnerHandler(event);
|
|
5215
|
+
}
|
|
5216
|
+
else {
|
|
5217
|
+
this.arrowRightInnerHandler(event);
|
|
5218
|
+
}
|
|
5219
|
+
}
|
|
5220
|
+
handleKeyDownBackspace(event) {
|
|
5221
|
+
// Clear on backspace is already handled by ng select when clearable is true
|
|
5222
|
+
if (!this.select.clearable && !this.select.searchTerm) {
|
|
5223
|
+
const listBadge = this.element.nativeElement.querySelectorAll(`.${DF_SELECT_CLASS}`);
|
|
5224
|
+
if (listBadge.length > 0) {
|
|
5225
|
+
listBadge[listBadge.length - 1].click();
|
|
5226
|
+
}
|
|
5227
|
+
}
|
|
5228
|
+
}
|
|
5229
|
+
handleKeyDownRight(event) {
|
|
5230
|
+
if (this.direction === RightToLeftDirectionEnum.LeftToRight) {
|
|
5231
|
+
this.arrowRightInnerHandler(event);
|
|
5232
|
+
}
|
|
5233
|
+
else {
|
|
5234
|
+
this.arrowLeftInnerHandler(event);
|
|
5235
|
+
}
|
|
5236
|
+
}
|
|
5237
|
+
arrowRightInnerHandler(event) {
|
|
5238
|
+
const listBadge = this.element.nativeElement.querySelectorAll(`.${DF_SELECT_CLASS}`);
|
|
5239
|
+
const currentPos = Array.prototype.indexOf.call(listBadge, document.activeElement);
|
|
5240
|
+
// Test if the focus is in the list (otherwise it is in the input and we do nothing)
|
|
5241
|
+
if (currentPos !== -1) {
|
|
5242
|
+
if (currentPos === listBadge.length - 1) {
|
|
5243
|
+
this.select.focus();
|
|
5244
|
+
}
|
|
5245
|
+
else {
|
|
5246
|
+
(listBadge[currentPos + 1] || document.activeElement).focus();
|
|
5247
|
+
}
|
|
5248
|
+
}
|
|
5249
|
+
else if (event.target.selectionStart === event.target.selectionEnd &&
|
|
5250
|
+
event.target.nodeName === 'INPUT' &&
|
|
5251
|
+
event.target.selectionStart === event.target.value.length) {
|
|
5252
|
+
const clearEl = this.element.nativeElement.querySelector('.ng-clear-wrapper') ||
|
|
5253
|
+
this.element.nativeElement.querySelector('.ng-clear');
|
|
5254
|
+
if (clearEl) {
|
|
5255
|
+
// Event if it can be added multiple time it is not an issue I think.
|
|
5256
|
+
this.renderer.listen(clearEl, 'keydown.Enter', (e) => {
|
|
5257
|
+
e.stopPropagation(); // kill the event to forbid default ng-select behavior (open the dropdown)
|
|
5258
|
+
this.select.handleClearClick();
|
|
5259
|
+
});
|
|
5260
|
+
clearEl.setAttribute('tabindex', '1'); // To be able to focus the element in chrome
|
|
5261
|
+
clearEl.focus();
|
|
5262
|
+
}
|
|
5263
|
+
}
|
|
5264
|
+
}
|
|
5265
|
+
arrowLeftInnerHandler(event) {
|
|
5266
|
+
const listBadge = this.element.nativeElement.querySelectorAll(`.${DF_SELECT_CLASS}`);
|
|
5267
|
+
if (event.target.selectionStart === event.target.selectionEnd &&
|
|
5268
|
+
event.target.selectionStart === 0 &&
|
|
5269
|
+
event.target.nodeName === 'INPUT') {
|
|
5270
|
+
if (listBadge.length > 0) {
|
|
5271
|
+
listBadge[listBadge.length - 1].focus();
|
|
5272
|
+
}
|
|
5273
|
+
}
|
|
5274
|
+
else if (event.target.classList.contains('ng-clear-wrapper') || event.target.classList.contains('ng-clear')) {
|
|
5275
|
+
this.select.focus();
|
|
5276
|
+
}
|
|
5277
|
+
else {
|
|
5278
|
+
const currentPos = Array.prototype.indexOf.call(listBadge, document.activeElement);
|
|
5279
|
+
(listBadge[currentPos - 1] || document.activeElement).focus();
|
|
5280
|
+
}
|
|
5281
|
+
}
|
|
5282
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfManageNavSelectDirective, deps: [{ token: i1$2.NgSelectComponent, host: true }, { token: i0.ElementRef }, { token: DfDirectionDetectionService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5283
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DfManageNavSelectDirective, isStandalone: true, selector: "[dfManageNavSelect]", host: { listeners: { "keydown.arrowLeft": "handleKeyDown($event)", "keydown.Backspace": "handleKeyDownBackspace($event)", "keydown.arrowRight": "handleKeyDownRight($event)" } }, ngImport: i0 }); }
|
|
5003
5284
|
}
|
|
5004
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5005
|
-
type:
|
|
5285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfManageNavSelectDirective, decorators: [{
|
|
5286
|
+
type: Directive,
|
|
5006
5287
|
args: [{
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5288
|
+
selector: '[dfManageNavSelect]',
|
|
5289
|
+
standalone: true
|
|
5290
|
+
}]
|
|
5291
|
+
}], ctorParameters: function () { return [{ type: i1$2.NgSelectComponent, decorators: [{
|
|
5292
|
+
type: Host
|
|
5293
|
+
}] }, { type: i0.ElementRef }, { type: DfDirectionDetectionService }, { type: i0.Renderer2 }]; }, propDecorators: { handleKeyDown: [{
|
|
5294
|
+
type: HostListener,
|
|
5295
|
+
args: ['keydown.arrowLeft', ['$event']]
|
|
5296
|
+
}], handleKeyDownBackspace: [{
|
|
5297
|
+
type: HostListener,
|
|
5298
|
+
args: ['keydown.Backspace', ['$event']]
|
|
5299
|
+
}], handleKeyDownRight: [{
|
|
5300
|
+
type: HostListener,
|
|
5301
|
+
args: ['keydown.arrowRight', ['$event']]
|
|
5302
|
+
}] } });
|
|
5303
|
+
|
|
5304
|
+
// Copy of https://github.com/ng-select/ng-select/blob/master/src/ng-option-highlight/lib/ng-option-highlight.directive.ts
|
|
5305
|
+
class DfOptionHighlightDirective {
|
|
5306
|
+
constructor(elementRef, renderer) {
|
|
5307
|
+
this.elementRef = elementRef;
|
|
5308
|
+
this.renderer = renderer;
|
|
5309
|
+
this.element = this.elementRef.nativeElement;
|
|
5310
|
+
}
|
|
5311
|
+
ngOnChanges() {
|
|
5312
|
+
if (this.canHighlight) {
|
|
5313
|
+
this.highlightLabel();
|
|
5314
|
+
}
|
|
5315
|
+
else if (this.label) { // unhighlight if there was some
|
|
5316
|
+
this.setInnerHtml(this.label);
|
|
5317
|
+
}
|
|
5318
|
+
}
|
|
5319
|
+
ngAfterViewInit() {
|
|
5320
|
+
this.label = this.element.innerHTML;
|
|
5321
|
+
if (this.canHighlight) {
|
|
5322
|
+
this.highlightLabel();
|
|
5323
|
+
}
|
|
5324
|
+
}
|
|
5325
|
+
escapeRegExp(str) {
|
|
5326
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
5327
|
+
}
|
|
5328
|
+
highlightLabel() {
|
|
5329
|
+
const label = this.label;
|
|
5330
|
+
if (!this.term) {
|
|
5331
|
+
this.setInnerHtml(label);
|
|
5332
|
+
return;
|
|
5333
|
+
}
|
|
5334
|
+
const alternationString = this.escapeRegExp(this.term).replace(' ', '|');
|
|
5335
|
+
const termRegex = new RegExp(alternationString, 'gi');
|
|
5336
|
+
this.setInnerHtml(label.replace(termRegex, `<span class=\"highlighted\">$&</span>`));
|
|
5337
|
+
}
|
|
5338
|
+
get canHighlight() {
|
|
5339
|
+
return this.isDefined(this.term) && this.isDefined(this.label);
|
|
5340
|
+
}
|
|
5341
|
+
setInnerHtml(html) {
|
|
5342
|
+
this.renderer.setProperty(this.elementRef.nativeElement, 'innerHTML', html);
|
|
5343
|
+
}
|
|
5344
|
+
isDefined(value) {
|
|
5345
|
+
return value !== undefined && value !== null;
|
|
5346
|
+
}
|
|
5347
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfOptionHighlightDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5348
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DfOptionHighlightDirective, isStandalone: true, selector: "[dfOptionHighlight]", inputs: { term: ["dfOptionHighlight", "term"] }, usesOnChanges: true, ngImport: i0 }); }
|
|
5349
|
+
}
|
|
5350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfOptionHighlightDirective, decorators: [{
|
|
5351
|
+
type: Directive,
|
|
5352
|
+
args: [{
|
|
5353
|
+
selector: '[dfOptionHighlight]',
|
|
5354
|
+
standalone: true
|
|
5025
5355
|
}]
|
|
5026
|
-
}] }
|
|
5356
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { term: [{
|
|
5357
|
+
type: Input,
|
|
5358
|
+
args: ['dfOptionHighlight']
|
|
5359
|
+
}] } });
|
|
5027
5360
|
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
}
|
|
5034
|
-
else {
|
|
5035
|
-
this.renderer.removeClass(this.element.nativeElement, selectedClass);
|
|
5036
|
-
}
|
|
5037
|
-
}
|
|
5038
|
-
constructor(element, renderer) {
|
|
5039
|
-
this.element = element;
|
|
5361
|
+
// Put to avoid opening of the select after removal. See why in file:
|
|
5362
|
+
// https://github.com/ng-select/ng-select/blob/57c6671a972d23beddcca2b6acc9418544c17a2e/src/ng-select/ng-select.component.ts#L307
|
|
5363
|
+
const NG_SELECT_CLASS_IDENTIFIER = 'ng-value-icon';
|
|
5364
|
+
class DfManageBadgeEventsDirective {
|
|
5365
|
+
constructor(renderer, element) {
|
|
5040
5366
|
this.renderer = renderer;
|
|
5367
|
+
this.element = element;
|
|
5368
|
+
this.tabindex = '-1';
|
|
5369
|
+
this.renderer.addClass(this.element.nativeElement, DF_SELECT_CLASS);
|
|
5370
|
+
this.renderer.addClass(this.element.nativeElement, NG_SELECT_CLASS_IDENTIFIER);
|
|
5041
5371
|
}
|
|
5042
5372
|
ngAfterViewInit() {
|
|
5043
|
-
|
|
5044
|
-
|
|
5373
|
+
const childs = this.element.nativeElement.children;
|
|
5374
|
+
const map = Array.from(childs);
|
|
5375
|
+
map.forEach((element) => {
|
|
5376
|
+
this.renderer.addClass(element, NG_SELECT_CLASS_IDENTIFIER);
|
|
5377
|
+
});
|
|
5045
5378
|
}
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
// The card must have only one input
|
|
5050
|
-
if (!(target.classList.contains('form-check-input') || target.classList.contains('form-check-label'))) {
|
|
5051
|
-
this.input.click();
|
|
5052
|
-
}
|
|
5053
|
-
else {
|
|
5054
|
-
this.element.nativeElement.focus();
|
|
5055
|
-
}
|
|
5379
|
+
handleKeyDownBackspace(event) {
|
|
5380
|
+
this.dfManageBadgeEventsSelect[0](this.dfManageBadgeEventsSelect[1]);
|
|
5381
|
+
event.stopPropagation();
|
|
5056
5382
|
}
|
|
5057
|
-
|
|
5058
|
-
|
|
5383
|
+
handleClick(event) {
|
|
5384
|
+
this.dfManageBadgeEventsSelect[0](this.dfManageBadgeEventsSelect[1]);
|
|
5385
|
+
event.stopPropagation();
|
|
5386
|
+
}
|
|
5387
|
+
handleKeyDownEnter(event) {
|
|
5388
|
+
this.dfManageBadgeEventsSelect[0](this.dfManageBadgeEventsSelect[1]);
|
|
5389
|
+
event.stopPropagation();
|
|
5390
|
+
}
|
|
5391
|
+
handleKeyDownDelete(event) {
|
|
5392
|
+
this.dfManageBadgeEventsSelect[0](this.dfManageBadgeEventsSelect[1]);
|
|
5393
|
+
event.stopPropagation();
|
|
5394
|
+
}
|
|
5395
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfManageBadgeEventsDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5396
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DfManageBadgeEventsDirective, isStandalone: true, selector: "[dfManageBadgeEventsSelect]", inputs: { dfManageBadgeEventsSelect: "dfManageBadgeEventsSelect" }, host: { listeners: { "keydown.Backspace": "handleKeyDownBackspace($event)", "click": "handleClick($event)", "keydown.Enter": "handleKeyDownEnter($event)", "keydown.Delete": "handleKeyDownDelete($event)" }, properties: { "attr.tabindex": "this.tabindex" } }, ngImport: i0 }); }
|
|
5059
5397
|
}
|
|
5060
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfManageBadgeEventsDirective, decorators: [{
|
|
5061
5399
|
type: Directive,
|
|
5062
5400
|
args: [{
|
|
5063
|
-
selector: '[
|
|
5401
|
+
selector: '[dfManageBadgeEventsSelect]',
|
|
5064
5402
|
standalone: true
|
|
5065
5403
|
}]
|
|
5066
|
-
}], ctorParameters: function () { return [{ type: i0.
|
|
5404
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { dfManageBadgeEventsSelect: [{
|
|
5067
5405
|
type: Input
|
|
5068
|
-
}],
|
|
5406
|
+
}], tabindex: [{
|
|
5407
|
+
type: HostBinding,
|
|
5408
|
+
args: ['attr.tabindex']
|
|
5409
|
+
}], handleKeyDownBackspace: [{
|
|
5410
|
+
type: HostListener,
|
|
5411
|
+
args: ['keydown.Backspace', ['$event']]
|
|
5412
|
+
}], handleClick: [{
|
|
5069
5413
|
type: HostListener,
|
|
5070
5414
|
args: ['click', ['$event']]
|
|
5415
|
+
}], handleKeyDownEnter: [{
|
|
5416
|
+
type: HostListener,
|
|
5417
|
+
args: ['keydown.Enter', ['$event']]
|
|
5418
|
+
}], handleKeyDownDelete: [{
|
|
5419
|
+
type: HostListener,
|
|
5420
|
+
args: ['keydown.Delete', ['$event']]
|
|
5071
5421
|
}] } });
|
|
5072
5422
|
|
|
5073
|
-
class
|
|
5074
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5075
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5076
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5423
|
+
class DfSelectModule {
|
|
5424
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5425
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfSelectModule, imports: [DfManageNavSelectDirective, DfManageBadgeEventsDirective, DfOptionHighlightDirective], exports: [DfManageNavSelectDirective, DfManageBadgeEventsDirective, DfOptionHighlightDirective, NgSelectModule] }); }
|
|
5426
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSelectModule, imports: [NgSelectModule] }); }
|
|
5077
5427
|
}
|
|
5078
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSelectModule, decorators: [{
|
|
5079
5429
|
type: NgModule,
|
|
5080
5430
|
args: [{
|
|
5081
|
-
imports: [
|
|
5082
|
-
exports: [
|
|
5431
|
+
imports: [DfManageNavSelectDirective, DfManageBadgeEventsDirective, DfOptionHighlightDirective],
|
|
5432
|
+
exports: [DfManageNavSelectDirective, DfManageBadgeEventsDirective, DfOptionHighlightDirective, NgSelectModule]
|
|
5083
5433
|
}]
|
|
5084
5434
|
}] });
|
|
5085
5435
|
|
|
5086
|
-
|
|
5087
|
-
(
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5436
|
+
class DfStepperService {
|
|
5437
|
+
constructor() {
|
|
5438
|
+
this.setFocus = false;
|
|
5439
|
+
this._stepperState$ = new BehaviorSubject({
|
|
5440
|
+
steps: [],
|
|
5441
|
+
active: 0,
|
|
5442
|
+
isLinear: false,
|
|
5443
|
+
isInline: false,
|
|
5444
|
+
isVertical: false
|
|
5445
|
+
});
|
|
5446
|
+
this._state = {
|
|
5447
|
+
steps: [],
|
|
5448
|
+
active: 0,
|
|
5449
|
+
isLinear: false,
|
|
5450
|
+
isInline: false,
|
|
5451
|
+
isVertical: false
|
|
5452
|
+
};
|
|
5453
|
+
this._completedLabel = 'Completed';
|
|
5454
|
+
this._warningLabel = 'Warning';
|
|
5455
|
+
this._stepperAriaLabel = 'Stepper';
|
|
5095
5456
|
}
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
constructor(progressBarInput, position) {
|
|
5099
|
-
this.type = DfProgressIndicatorContentType.PROGRESSBAR;
|
|
5100
|
-
this.progressBarInput = progressBarInput;
|
|
5101
|
-
this.position = position || DfProgressIndicatorContentPosition.TOP;
|
|
5457
|
+
get stepperState$() {
|
|
5458
|
+
return this._stepperState$.asObservable();
|
|
5102
5459
|
}
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
DfProgressIndicatorContentPosition["TOP"] = "top";
|
|
5107
|
-
DfProgressIndicatorContentPosition["BOTTOM"] = "bottom";
|
|
5108
|
-
DfProgressIndicatorContentPosition["CENTERED"] = "centered";
|
|
5109
|
-
})(DfProgressIndicatorContentPosition || (DfProgressIndicatorContentPosition = {}));
|
|
5110
|
-
|
|
5111
|
-
class DfProgressIndicatorContainerComponent {
|
|
5112
|
-
constructor() {
|
|
5113
|
-
this.DEFAULT_CLASS_POSITION = 'df-progressindicator-centered';
|
|
5114
|
-
this.positionClass = this.DEFAULT_CLASS_POSITION;
|
|
5460
|
+
// initState must be used to push new Steps to the service
|
|
5461
|
+
get state() {
|
|
5462
|
+
return this._state;
|
|
5115
5463
|
}
|
|
5116
|
-
|
|
5117
|
-
|
|
5464
|
+
dispatchStepperState() {
|
|
5465
|
+
this._stepperState$.next(this._state);
|
|
5118
5466
|
}
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
this.positionClass = 'df-progressindicator-top';
|
|
5123
|
-
break;
|
|
5124
|
-
case DfProgressIndicatorContentPosition.BOTTOM:
|
|
5125
|
-
this.positionClass = 'df-progressindicator-bottom';
|
|
5126
|
-
break;
|
|
5127
|
-
default:
|
|
5128
|
-
this.positionClass = this.DEFAULT_CLASS_POSITION;
|
|
5129
|
-
}
|
|
5130
|
-
this._position = newPosition;
|
|
5467
|
+
updateStepperState() {
|
|
5468
|
+
this._state = this.normalizeState(this._state);
|
|
5469
|
+
this.dispatchStepperState();
|
|
5131
5470
|
}
|
|
5132
|
-
|
|
5133
|
-
|
|
5471
|
+
// API
|
|
5472
|
+
/**
|
|
5473
|
+
* Use this to init the list of Elements from your stepper
|
|
5474
|
+
*
|
|
5475
|
+
* Here we are not deep copying the array --> the function will change it
|
|
5476
|
+
*/
|
|
5477
|
+
initStepperState(state) {
|
|
5478
|
+
// normalize the steps here
|
|
5479
|
+
this._state = this.normalizeState(state);
|
|
5480
|
+
this.dispatchStepperState();
|
|
5134
5481
|
}
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
}
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
}
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
type: Input
|
|
5158
|
-
}] } });
|
|
5159
|
-
|
|
5160
|
-
class DfDefaultSpinnerComponent {
|
|
5161
|
-
constructor() {
|
|
5162
|
-
this.isGlobalSpinner = false;
|
|
5163
|
-
this.contentClass = 'spinner-border text-primary';
|
|
5482
|
+
/**
|
|
5483
|
+
* Use this to normalize the state of the stepper (completed, warning, current, future)
|
|
5484
|
+
* @param state
|
|
5485
|
+
* @returns
|
|
5486
|
+
*/
|
|
5487
|
+
normalizeState(state) {
|
|
5488
|
+
const stepsList = [];
|
|
5489
|
+
for (let i = 0; i < state.steps.length; i++) {
|
|
5490
|
+
if (state.steps[i].warning) {
|
|
5491
|
+
stepsList.push({ ...state.steps[i], type: 'warning' });
|
|
5492
|
+
}
|
|
5493
|
+
else if (i === state.active) {
|
|
5494
|
+
stepsList.push({ ...state.steps[i], type: 'current' });
|
|
5495
|
+
}
|
|
5496
|
+
else if (state.steps[i].completed) {
|
|
5497
|
+
stepsList.push({ ...state.steps[i], type: 'completed' });
|
|
5498
|
+
}
|
|
5499
|
+
else {
|
|
5500
|
+
stepsList.push({ ...state.steps[i], type: 'future' });
|
|
5501
|
+
}
|
|
5502
|
+
}
|
|
5503
|
+
return { ...state, steps: stepsList };
|
|
5164
5504
|
}
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
args: [{ selector: 'df-default-spinner', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule], template: "<div [ngClass]=\"contentClass\" [attr.role]=\"isGlobalSpinner ? 'alert' : 'status'\">\n <span class=\"visually-hidden\">\n <ng-container *ngIf=\"ariaLabel; else defaultAriaLabel\">{{ ariaLabel }}</ng-container>\n </span>\n</div>\n\n<ng-template #defaultAriaLabel>\n <ng-container i18n=\"@@df.progressindicator.default.spinner.ariaLabel\">Loading...</ng-container>\n</ng-template>\n" }]
|
|
5171
|
-
}], propDecorators: { isGlobalSpinner: [{
|
|
5172
|
-
type: Input
|
|
5173
|
-
}], contentClass: [{
|
|
5174
|
-
type: Input
|
|
5175
|
-
}], ariaLabel: [{
|
|
5176
|
-
type: Input
|
|
5177
|
-
}] } });
|
|
5178
|
-
|
|
5179
|
-
class DfProgressIndicatorBackdropComponent {
|
|
5180
|
-
constructor() {
|
|
5181
|
-
this.isGlobalBackdrop = true;
|
|
5505
|
+
/**
|
|
5506
|
+
* Internal to get the stepper aria label in the template
|
|
5507
|
+
*/
|
|
5508
|
+
get stepperAriaLabel() {
|
|
5509
|
+
return this._stepperAriaLabel;
|
|
5182
5510
|
}
|
|
5183
|
-
|
|
5184
|
-
|
|
5511
|
+
/**
|
|
5512
|
+
* Use this to set the stepper aria label (i18n)
|
|
5513
|
+
*/
|
|
5514
|
+
set stepperAriaLabel(label) {
|
|
5515
|
+
this._stepperAriaLabel = label;
|
|
5185
5516
|
}
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
args: [{
|
|
5192
|
-
selector: 'df-progressindicator-backdrop',
|
|
5193
|
-
template: '',
|
|
5194
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5195
|
-
standalone: true
|
|
5196
|
-
}]
|
|
5197
|
-
}], propDecorators: { classes: [{
|
|
5198
|
-
type: HostBinding,
|
|
5199
|
-
args: ['class']
|
|
5200
|
-
}], backdropClass: [{
|
|
5201
|
-
type: Input
|
|
5202
|
-
}], isGlobalBackdrop: [{
|
|
5203
|
-
type: Input
|
|
5204
|
-
}] } });
|
|
5205
|
-
|
|
5206
|
-
class DfProgressIndicatorRef {
|
|
5207
|
-
constructor(containerRef, contentRef, backdropRef) {
|
|
5208
|
-
this.containerRef = containerRef;
|
|
5209
|
-
this.contentRef = contentRef;
|
|
5210
|
-
this.backdropRef = backdropRef;
|
|
5517
|
+
/**
|
|
5518
|
+
* Internal to get the completed label in the template
|
|
5519
|
+
*/
|
|
5520
|
+
get completedLabel() {
|
|
5521
|
+
return this._completedLabel;
|
|
5211
5522
|
}
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
*
|
|
5218
|
-
* It allows to compensate the lack of a vertical scrollbar by adding an
|
|
5219
|
-
* equivalent padding on the right of the body, and to remove this compensation.
|
|
5220
|
-
*
|
|
5221
|
-
* It is a copy of https://github.com/ng-bootstrap/ng-bootstrap/blob/master/src/util/scrollbar.ts
|
|
5222
|
-
*/
|
|
5223
|
-
class ScrollBar {
|
|
5224
|
-
constructor(_document) {
|
|
5225
|
-
this._document = _document;
|
|
5523
|
+
/**
|
|
5524
|
+
* Internal to get the waring label in the template
|
|
5525
|
+
*/
|
|
5526
|
+
get warningLabel() {
|
|
5527
|
+
return this._warningLabel;
|
|
5226
5528
|
}
|
|
5227
5529
|
/**
|
|
5228
|
-
*
|
|
5229
|
-
*
|
|
5230
|
-
* - if there was a scrollbar, adds some compensation padding to the body
|
|
5231
|
-
* to keep the same layout as when the scrollbar is there
|
|
5232
|
-
* - if there was none, there is nothing to do
|
|
5233
|
-
*
|
|
5234
|
-
* @return a callback used to revert the compensation (noop if there was none,
|
|
5235
|
-
* otherwise a function removing the padding)
|
|
5530
|
+
* Use this to set the completed label (i18n)
|
|
5236
5531
|
*/
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
return !this._isPresent(width) ? noop : this._adjustBody(width);
|
|
5532
|
+
set completedLabel(label) {
|
|
5533
|
+
this._completedLabel = label;
|
|
5240
5534
|
}
|
|
5241
5535
|
/**
|
|
5242
|
-
*
|
|
5243
|
-
*
|
|
5244
|
-
* @return a callback used to revert the padding to its previous value
|
|
5536
|
+
* Use this to set the warning label (i18n)
|
|
5245
5537
|
*/
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
const userSetPaddingStyle = body.style.paddingRight;
|
|
5249
|
-
const paddingRight = 'padding-right';
|
|
5250
|
-
const actualPadding = parseFloat(window.getComputedStyle(body)[paddingRight]);
|
|
5251
|
-
body.style[paddingRight] = `${actualPadding + scrollbarWidth}px`;
|
|
5252
|
-
return () => (body.style[paddingRight] = userSetPaddingStyle);
|
|
5538
|
+
set warningLabel(label) {
|
|
5539
|
+
this._warningLabel = label;
|
|
5253
5540
|
}
|
|
5254
5541
|
/**
|
|
5255
|
-
*
|
|
5256
|
-
*
|
|
5257
|
-
* @
|
|
5542
|
+
* TODO make it customizable
|
|
5543
|
+
* @param index - index of the step
|
|
5544
|
+
* @returns - string of the step number to display
|
|
5258
5545
|
*/
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5546
|
+
getStepNumberLabel(index) {
|
|
5547
|
+
return `${index + 1}`;
|
|
5548
|
+
}
|
|
5549
|
+
resetFocus() {
|
|
5550
|
+
this.setFocus = false;
|
|
5264
5551
|
}
|
|
5265
5552
|
/**
|
|
5266
|
-
* Calculates and returns the width of a scrollbar.
|
|
5267
5553
|
*
|
|
5268
|
-
* @
|
|
5554
|
+
* @param isLinear - true if the stepper is linear
|
|
5269
5555
|
*/
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
const body = this._document.body;
|
|
5274
|
-
body.appendChild(measurer);
|
|
5275
|
-
const width = measurer.getBoundingClientRect().width - measurer.clientWidth;
|
|
5276
|
-
body.removeChild(measurer);
|
|
5277
|
-
return width;
|
|
5556
|
+
setLinear(isLinear) {
|
|
5557
|
+
this._state.isLinear = isLinear;
|
|
5558
|
+
this.dispatchStepperState();
|
|
5278
5559
|
}
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
type: Inject,
|
|
5287
|
-
args: [DOCUMENT]
|
|
5288
|
-
}] }]; } });
|
|
5289
|
-
|
|
5290
|
-
class DfProgressIndicatorService {
|
|
5291
|
-
constructor(document, rendererFactory, componentFactoryResolver, appRef, injector, scrollbar) {
|
|
5292
|
-
this.document = document;
|
|
5293
|
-
this.rendererFactory = rendererFactory;
|
|
5294
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
5295
|
-
this.appRef = appRef;
|
|
5296
|
-
this.injector = injector;
|
|
5297
|
-
this.scrollbar = scrollbar;
|
|
5298
|
-
this.BODY_CLASS = 'df-progressindicator-open';
|
|
5299
|
-
// TODO - Remove it when https://github.com/angular/angular/issues/22567
|
|
5300
|
-
this.containerAttributes = ['containerClass', 'position'];
|
|
5301
|
-
this.backdropAttributes = ['backdropClass', 'isGlobalBackdrop'];
|
|
5302
|
-
this.defaultSpinnerAttributes = ['contentClass', 'ariaLabel', 'isGlobalSpinner'];
|
|
5303
|
-
this.defaultProgressBarAttributes = ['infiniteAnimation', 'ariaLabel'];
|
|
5304
|
-
this.activeInstances = [];
|
|
5305
|
-
this.renderer = this.rendererFactory.createRenderer(null, null);
|
|
5560
|
+
/**
|
|
5561
|
+
*
|
|
5562
|
+
* @param isInline - true if the stepper is inline
|
|
5563
|
+
*/
|
|
5564
|
+
setInline(isInline) {
|
|
5565
|
+
this._state.isInline = isInline;
|
|
5566
|
+
this.dispatchStepperState();
|
|
5306
5567
|
}
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
const backdropRef = options?.backdrop !== false
|
|
5315
|
-
? this.createComponent(DfProgressIndicatorBackdropComponent, this.componentFactoryResolver, undefined, containerElt)
|
|
5316
|
-
: undefined;
|
|
5317
|
-
const contentRef = this.getContent(content, this.componentFactoryResolver, containerElt);
|
|
5318
|
-
const containerCmpRef = this.createComponent(DfProgressIndicatorContainerComponent, this.componentFactoryResolver, contentRef, containerElt);
|
|
5319
|
-
const onDestroyOperations = [];
|
|
5320
|
-
// Add aria attributes on the container
|
|
5321
|
-
this.renderer.setAttribute(containerElt, 'aria-busy', 'true');
|
|
5322
|
-
onDestroyOperations.push(() => {
|
|
5323
|
-
this.renderer.removeAttribute(containerElt, 'aria-busy');
|
|
5324
|
-
});
|
|
5325
|
-
// Override some styles if body is the container
|
|
5326
|
-
if (containerElt === this.document.body) {
|
|
5327
|
-
const scrollCompensation = this.scrollbar.compensate();
|
|
5328
|
-
this.renderer.addClass(this.document.body, this.BODY_CLASS);
|
|
5329
|
-
this.renderer.setAttribute(this.document.body, 'aria-busy', 'true');
|
|
5330
|
-
onDestroyOperations.push(() => {
|
|
5331
|
-
scrollCompensation();
|
|
5332
|
-
this.renderer.removeClass(this.document.body, this.BODY_CLASS);
|
|
5333
|
-
});
|
|
5334
|
-
}
|
|
5335
|
-
if (onDestroyOperations.length > 0) {
|
|
5336
|
-
containerCmpRef.onDestroy(() => {
|
|
5337
|
-
onDestroyOperations.forEach(operation => {
|
|
5338
|
-
operation();
|
|
5339
|
-
});
|
|
5340
|
-
});
|
|
5341
|
-
}
|
|
5342
|
-
// Force override of position in case of the use of a progress bar component
|
|
5343
|
-
if (content instanceof DfProgressIndicatorContentProgressBar) {
|
|
5344
|
-
options = {
|
|
5345
|
-
...options,
|
|
5346
|
-
position: content.position
|
|
5347
|
-
};
|
|
5568
|
+
/**
|
|
5569
|
+
*
|
|
5570
|
+
* @param index - index of the step to select start at 0
|
|
5571
|
+
*/
|
|
5572
|
+
selectStep(index) {
|
|
5573
|
+
if (index < 0 || index >= this._state.steps.length) {
|
|
5574
|
+
return;
|
|
5348
5575
|
}
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5576
|
+
this._state.active = index;
|
|
5577
|
+
this.updateStepperState();
|
|
5578
|
+
}
|
|
5579
|
+
/**
|
|
5580
|
+
* Same as selectStep but with focus on the step selected
|
|
5581
|
+
* @param index - index of the step to select start at 0
|
|
5582
|
+
*/
|
|
5583
|
+
selectWithFocus(index) {
|
|
5584
|
+
if (index < 0 || index >= this._state.steps.length) {
|
|
5585
|
+
return;
|
|
5352
5586
|
}
|
|
5353
|
-
this.
|
|
5354
|
-
|
|
5355
|
-
this.activeInstances.push(progressIndicatorRef);
|
|
5356
|
-
return progressIndicatorRef;
|
|
5587
|
+
this.setFocus = true;
|
|
5588
|
+
this.selectStep(index);
|
|
5357
5589
|
}
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
progressIndicatorRef[key] = undefined;
|
|
5366
|
-
}
|
|
5367
|
-
});
|
|
5368
|
-
this.activeInstances.splice(instanceIndex, 1);
|
|
5590
|
+
/**
|
|
5591
|
+
*
|
|
5592
|
+
* @param index - index of the step to complete start at 0
|
|
5593
|
+
*/
|
|
5594
|
+
completeStep(index) {
|
|
5595
|
+
if (index < 0 || index >= this._state.steps.length) {
|
|
5596
|
+
return;
|
|
5369
5597
|
}
|
|
5370
|
-
|
|
5371
|
-
|
|
5598
|
+
this._state.steps[index].completed = true;
|
|
5599
|
+
this._state.steps[index].warning = false;
|
|
5600
|
+
this.updateStepperState();
|
|
5601
|
+
}
|
|
5602
|
+
/**
|
|
5603
|
+
*
|
|
5604
|
+
* @param index - index of the step to complete start at 0
|
|
5605
|
+
*/
|
|
5606
|
+
completeStepAndGoNext(index) {
|
|
5607
|
+
this.completeStep(index);
|
|
5608
|
+
this.selectStep(index + 1);
|
|
5609
|
+
}
|
|
5610
|
+
/**
|
|
5611
|
+
* Attention if the step was completed it will be uncompleted after.
|
|
5612
|
+
* @param index - index of the step to make Warning start at 0
|
|
5613
|
+
* @param warningLabel - label to display in the warning by default it will take the warningLabel if it exists or the label
|
|
5614
|
+
*/
|
|
5615
|
+
makeWarning(index, warningLabel) {
|
|
5616
|
+
if (index < 0 || index >= this._state.steps.length) {
|
|
5617
|
+
return;
|
|
5372
5618
|
}
|
|
5619
|
+
this._state.steps[index].warning = true;
|
|
5620
|
+
this._state.steps[index].completed = false;
|
|
5621
|
+
this._state.steps[index].warningLabel = warningLabel
|
|
5622
|
+
? warningLabel
|
|
5623
|
+
: this._state.steps[index].warningLabel
|
|
5624
|
+
? this._state.steps[index].warningLabel
|
|
5625
|
+
: this._state.steps[index].label;
|
|
5626
|
+
this.updateStepperState();
|
|
5373
5627
|
}
|
|
5374
5628
|
/**
|
|
5375
|
-
*
|
|
5629
|
+
*
|
|
5630
|
+
* @param index - index of the step to remove Warning start at 0
|
|
5376
5631
|
*/
|
|
5377
|
-
|
|
5378
|
-
if (
|
|
5379
|
-
return
|
|
5632
|
+
removeWarning(index) {
|
|
5633
|
+
if (index < 0 || index >= this._state.steps.length) {
|
|
5634
|
+
return;
|
|
5380
5635
|
}
|
|
5381
|
-
|
|
5636
|
+
this._state.steps[index].warning = false;
|
|
5637
|
+
this.updateStepperState();
|
|
5382
5638
|
}
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5639
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5640
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperService }); }
|
|
5641
|
+
}
|
|
5642
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperService, decorators: [{
|
|
5643
|
+
type: Injectable
|
|
5644
|
+
}] });
|
|
5645
|
+
|
|
5646
|
+
const DF_STEP_CLASS = 'df-stepper-step';
|
|
5647
|
+
class DfStepperStepDirective {
|
|
5648
|
+
constructor() {
|
|
5649
|
+
this.unlistener = [];
|
|
5650
|
+
this.renderer2 = inject(Renderer2);
|
|
5651
|
+
this.element = inject(ElementRef);
|
|
5652
|
+
}
|
|
5653
|
+
ngOnInit() {
|
|
5654
|
+
this.unlistener.push(this.renderer2.listen(this.element.nativeElement, 'focus', () => {
|
|
5655
|
+
this.handleFocusTabIndex();
|
|
5656
|
+
}));
|
|
5657
|
+
this.unlistener.push(this.renderer2.listen(this.element.nativeElement, 'blur', (event) => {
|
|
5658
|
+
this.handleBlurTabIndex(event);
|
|
5659
|
+
}));
|
|
5660
|
+
}
|
|
5661
|
+
handleFocusTabIndex() {
|
|
5662
|
+
this.element.nativeElement.tabIndex = 0;
|
|
5663
|
+
}
|
|
5664
|
+
handleBlurTabIndex(event) {
|
|
5665
|
+
if (event.relatedTarget &&
|
|
5666
|
+
'classList' in event.relatedTarget &&
|
|
5667
|
+
event.relatedTarget.classList.contains(DF_STEP_CLASS)) {
|
|
5668
|
+
this.element.nativeElement.tabIndex = -1;
|
|
5386
5669
|
}
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5670
|
+
}
|
|
5671
|
+
ngOnDestroy() {
|
|
5672
|
+
this.unlistener.forEach((ul) => ul());
|
|
5673
|
+
}
|
|
5674
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperStepDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5675
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DfStepperStepDirective, isStandalone: true, selector: "[dfStepperStep]", exportAs: ["dfStepperStep"], ngImport: i0 }); }
|
|
5676
|
+
}
|
|
5677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperStepDirective, decorators: [{
|
|
5678
|
+
type: Directive,
|
|
5679
|
+
args: [{
|
|
5680
|
+
selector: '[dfStepperStep]',
|
|
5681
|
+
exportAs: 'dfStepperStep',
|
|
5682
|
+
standalone: true
|
|
5683
|
+
}]
|
|
5684
|
+
}] });
|
|
5685
|
+
class DfStepperDirective {
|
|
5686
|
+
constructor() {
|
|
5687
|
+
this.stepperService = inject(DfStepperService);
|
|
5688
|
+
this.element = inject(ElementRef);
|
|
5689
|
+
this.rtlDirectionService = inject(DfDirectionDetectionService);
|
|
5690
|
+
}
|
|
5691
|
+
ngOnInit() {
|
|
5692
|
+
this.direction = this.rtlDirectionService.getPageDirection(this.element);
|
|
5693
|
+
}
|
|
5694
|
+
handleEnterDown() {
|
|
5695
|
+
this.handleSelect();
|
|
5696
|
+
}
|
|
5697
|
+
handleSpaceDown() {
|
|
5698
|
+
this.handleSelect();
|
|
5699
|
+
}
|
|
5700
|
+
handleGoPrevious() {
|
|
5701
|
+
if (this.direction === RightToLeftDirectionEnum.LeftToRight) {
|
|
5702
|
+
this.arrowLeftInnerHandler();
|
|
5391
5703
|
}
|
|
5392
|
-
else
|
|
5393
|
-
|
|
5394
|
-
this.applyOptions(cmpRef, this.defaultProgressBarAttributes, { ...content.progressBarInput, infiniteAnimation: true });
|
|
5395
|
-
return cmpRef;
|
|
5704
|
+
else {
|
|
5705
|
+
this.arrowRightInnerHandler();
|
|
5396
5706
|
}
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5707
|
+
}
|
|
5708
|
+
handleGoNext() {
|
|
5709
|
+
if (this.direction === RightToLeftDirectionEnum.LeftToRight) {
|
|
5710
|
+
this.arrowRightInnerHandler();
|
|
5401
5711
|
}
|
|
5402
5712
|
else {
|
|
5403
|
-
|
|
5713
|
+
this.arrowLeftInnerHandler();
|
|
5404
5714
|
}
|
|
5405
5715
|
}
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
if (childrenProjectables instanceof ComponentRef) {
|
|
5411
|
-
cmpRef = cmpFactory.create(this.injector, [[childrenProjectables.location.nativeElement]]);
|
|
5412
|
-
}
|
|
5413
|
-
else {
|
|
5414
|
-
cmpRef = cmpFactory.create(this.injector, [childrenProjectables.rootNodes]);
|
|
5415
|
-
}
|
|
5716
|
+
handleKeyDownRight(event) {
|
|
5717
|
+
if (!this.stepperService.state.isVertical) {
|
|
5718
|
+
this.handleGoNext();
|
|
5719
|
+
event.preventDefault();
|
|
5416
5720
|
}
|
|
5417
|
-
|
|
5418
|
-
|
|
5721
|
+
}
|
|
5722
|
+
handleKeyDown(event) {
|
|
5723
|
+
if (!this.stepperService.state.isVertical) {
|
|
5724
|
+
this.handleGoPrevious();
|
|
5725
|
+
event.preventDefault();
|
|
5419
5726
|
}
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5727
|
+
}
|
|
5728
|
+
handleKeyDownUp(event) {
|
|
5729
|
+
if (this.stepperService.state.isVertical) {
|
|
5730
|
+
this.handleGoNext();
|
|
5731
|
+
event.preventDefault();
|
|
5423
5732
|
}
|
|
5424
|
-
return cmpRef;
|
|
5425
5733
|
}
|
|
5426
|
-
|
|
5427
|
-
if (
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
const optionValue = options[option];
|
|
5431
|
-
if (optionValue !== null && optionValue !== undefined) {
|
|
5432
|
-
cmpInst[option] = optionValue;
|
|
5433
|
-
}
|
|
5434
|
-
});
|
|
5734
|
+
handleKeyDownDown(event) {
|
|
5735
|
+
if (this.stepperService.state.isVertical) {
|
|
5736
|
+
this.handleGoPrevious();
|
|
5737
|
+
event.preventDefault();
|
|
5435
5738
|
}
|
|
5436
5739
|
}
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
}
|
|
5440
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfProgressIndicatorService, decorators: [{
|
|
5441
|
-
type: Injectable,
|
|
5442
|
-
args: [{
|
|
5443
|
-
providedIn: 'root'
|
|
5444
|
-
}]
|
|
5445
|
-
}], ctorParameters: function () { return [{ type: Document, decorators: [{
|
|
5446
|
-
type: Inject,
|
|
5447
|
-
args: [DOCUMENT]
|
|
5448
|
-
}] }, { type: i0.RendererFactory2 }, { type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: ScrollBar }]; } });
|
|
5449
|
-
|
|
5450
|
-
class DfProgressIndicatorDirective {
|
|
5451
|
-
constructor(elementRef, progressService) {
|
|
5452
|
-
this.elementRef = elementRef;
|
|
5453
|
-
this.progressService = progressService;
|
|
5740
|
+
getSteps() {
|
|
5741
|
+
return this.element.nativeElement.querySelectorAll(`:scope .${DF_STEP_CLASS}`);
|
|
5454
5742
|
}
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5743
|
+
handleSelect() {
|
|
5744
|
+
const listStep = this.getSteps();
|
|
5745
|
+
const currentPos = Array.prototype.indexOf.call(listStep, document.activeElement);
|
|
5746
|
+
if (currentPos !== -1) {
|
|
5747
|
+
listStep[currentPos].click();
|
|
5748
|
+
}
|
|
5749
|
+
}
|
|
5750
|
+
arrowRightInnerHandler() {
|
|
5751
|
+
const listStep = this.getSteps();
|
|
5752
|
+
const currentPos = Array.prototype.indexOf.call(listStep, document.activeElement);
|
|
5753
|
+
// Test if the focus is in the list (otherwise we do nothing)
|
|
5754
|
+
if (currentPos !== -1) {
|
|
5755
|
+
// we put the focus on the next element.
|
|
5756
|
+
if (currentPos === listStep.length - 1) {
|
|
5757
|
+
listStep[0].focus();
|
|
5464
5758
|
}
|
|
5465
|
-
else
|
|
5466
|
-
|
|
5467
|
-
this.progressIndicatorRef = undefined;
|
|
5759
|
+
else {
|
|
5760
|
+
listStep[currentPos + 1].focus();
|
|
5468
5761
|
}
|
|
5469
5762
|
}
|
|
5470
5763
|
}
|
|
5471
|
-
|
|
5472
|
-
|
|
5764
|
+
arrowLeftInnerHandler() {
|
|
5765
|
+
const listStep = this.getSteps();
|
|
5766
|
+
const currentPos = Array.prototype.indexOf.call(listStep, document.activeElement);
|
|
5767
|
+
// Test if the focus is in the list (otherwise we do nothing)
|
|
5768
|
+
if (currentPos !== -1) {
|
|
5769
|
+
// we put the focus on the next element.
|
|
5770
|
+
if (currentPos === 0) {
|
|
5771
|
+
listStep[listStep.length - 1].focus();
|
|
5772
|
+
}
|
|
5773
|
+
else {
|
|
5774
|
+
listStep[currentPos - 1].focus();
|
|
5775
|
+
}
|
|
5776
|
+
}
|
|
5777
|
+
}
|
|
5778
|
+
ngAfterViewChecked() {
|
|
5779
|
+
// Put back the focus on the active elements
|
|
5780
|
+
if (this.stepperService.setFocus) {
|
|
5781
|
+
const listStep = this.getSteps();
|
|
5782
|
+
listStep[this.stepperService.state.active].focus();
|
|
5783
|
+
this.stepperService.resetFocus();
|
|
5784
|
+
}
|
|
5785
|
+
}
|
|
5786
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5787
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DfStepperDirective, isStandalone: true, selector: "[dfStepperLogic]", host: { listeners: { "keydown.Enter": "handleEnterDown()", "keydown.Space": "handleSpaceDown()", "keydown.arrowRight": "handleKeyDownRight($event)", "keydown.arrowLeft": "handleKeyDown($event)", "keydown.arrowDown": "handleKeyDownUp($event)", "keydown.arrowUp": "handleKeyDownDown($event)" } }, exportAs: ["dfStepperLogic"], ngImport: i0 }); }
|
|
5473
5788
|
}
|
|
5474
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5789
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperDirective, decorators: [{
|
|
5475
5790
|
type: Directive,
|
|
5476
5791
|
args: [{
|
|
5477
|
-
selector: '[
|
|
5792
|
+
selector: '[dfStepperLogic]',
|
|
5793
|
+
exportAs: 'dfStepperLogic',
|
|
5478
5794
|
standalone: true
|
|
5479
5795
|
}]
|
|
5480
|
-
}],
|
|
5481
|
-
type:
|
|
5482
|
-
|
|
5483
|
-
|
|
5796
|
+
}], propDecorators: { handleEnterDown: [{
|
|
5797
|
+
type: HostListener,
|
|
5798
|
+
args: ['keydown.Enter']
|
|
5799
|
+
}], handleSpaceDown: [{
|
|
5800
|
+
type: HostListener,
|
|
5801
|
+
args: ['keydown.Space']
|
|
5802
|
+
}], handleKeyDownRight: [{
|
|
5803
|
+
type: HostListener,
|
|
5804
|
+
args: ['keydown.arrowRight', ['$event']]
|
|
5805
|
+
}], handleKeyDown: [{
|
|
5806
|
+
type: HostListener,
|
|
5807
|
+
args: ['keydown.arrowLeft', ['$event']]
|
|
5808
|
+
}], handleKeyDownUp: [{
|
|
5809
|
+
type: HostListener,
|
|
5810
|
+
args: ['keydown.arrowDown', ['$event']]
|
|
5811
|
+
}], handleKeyDownDown: [{
|
|
5812
|
+
type: HostListener,
|
|
5813
|
+
args: ['keydown.arrowUp', ['$event']]
|
|
5484
5814
|
}] } });
|
|
5485
5815
|
|
|
5486
|
-
class
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
static { this.ɵ
|
|
5498
|
-
DfProgressbarModule, DfProgressbarModule] }); }
|
|
5816
|
+
class DfStepperStepContentDirective {
|
|
5817
|
+
constructor() {
|
|
5818
|
+
this.templateRef = inject(TemplateRef);
|
|
5819
|
+
/**
|
|
5820
|
+
* The step index
|
|
5821
|
+
* -1 means that the input index is not set
|
|
5822
|
+
*/
|
|
5823
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
5824
|
+
this.dfStepperStepContent = -1;
|
|
5825
|
+
}
|
|
5826
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperStepContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5827
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DfStepperStepContentDirective, isStandalone: true, selector: "ng-template[dfStepperStepContent]", inputs: { dfStepperStepContent: ["dfStepperStepContent", "dfStepperStepContent", (value) => numberAttribute(value, -1)] }, ngImport: i0 }); }
|
|
5499
5828
|
}
|
|
5500
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5829
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperStepContentDirective, decorators: [{
|
|
5830
|
+
type: Directive,
|
|
5831
|
+
args: [{ selector: 'ng-template[dfStepperStepContent]', standalone: true }]
|
|
5832
|
+
}], propDecorators: { dfStepperStepContent: [{
|
|
5833
|
+
type: Input,
|
|
5834
|
+
args: [{ transform: (value) => numberAttribute(value, -1) }]
|
|
5835
|
+
}] } });
|
|
5836
|
+
/**
|
|
5837
|
+
* Stepper component is a component to provide a step by step navigation
|
|
5838
|
+
* You have two ways to navigate through the steps:
|
|
5839
|
+
* - Using the linear navigation, where you can only go to the next step
|
|
5840
|
+
* - Using the non-linear navigation, where you can go to any step
|
|
5841
|
+
*/
|
|
5842
|
+
class DfStepperComponent {
|
|
5843
|
+
constructor() {
|
|
5844
|
+
this.stepperService = inject(DfStepperService);
|
|
5845
|
+
this.mapStepToContent = new Map();
|
|
5846
|
+
this.stepperService.stepperState$.subscribe((state) => {
|
|
5847
|
+
this.state = state;
|
|
5848
|
+
});
|
|
5849
|
+
}
|
|
5850
|
+
ngAfterContentInit() {
|
|
5851
|
+
this.tplStepsContent.forEach((tplStepContent) => {
|
|
5852
|
+
if (tplStepContent.dfStepperStepContent !== -1) {
|
|
5853
|
+
this.mapStepToContent.set(tplStepContent.dfStepperStepContent, tplStepContent.templateRef);
|
|
5854
|
+
}
|
|
5855
|
+
});
|
|
5856
|
+
}
|
|
5857
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5858
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DfStepperComponent, isStandalone: true, selector: "[dfStepper]", host: { attributes: { "role": "tablist" }, properties: { "class.df-vertical-stepper": "state?.isVertical", "attr.aria-label": "stepperService.stepperAriaLabel", "attr.aria-orientation": "state?.isVertical ? \"vertical\": null" }, classAttribute: "df-stepper mb-2" }, queries: [{ propertyName: "tplStepsContent", predicate: DfStepperStepContentDirective }], hostDirectives: [{ directive: DfStepperDirective }], ngImport: i0, template: "<ng-template #myStepperLine>\n <div class=\"df-stepper-line-wrapper\">\n <div class=\"df-stepper-line\">\n <div class=\"df-stepper-horizontal-line\"></div>\n </div>\n <div class=\"df-stepper-line d-none d-sm-flex\">\n <div class=\"flex-grow-1\"></div>\n </div>\n </div>\n</ng-template>\n<ng-container *ngIf=\"state\">\n <ng-template ngFor let-step [ngForOf]=\"state.steps\" let-i=\"index\">\n <button #stepbasic class=\"btn btn-link df-stepper-step\"\n dfStepperStep\n [class.active]=\"i === state.active\"\n [class.flex-row]=\"state.isInline\"\n [attr.tabIndex]=\"i === state.active ? 0 : -1\"\n [class.df-stepper-step-warning]=\"step.type === 'warning'\"\n [class.df-stepper-step-completed]=\"step.type === 'completed'\"\n [class.df-stepper-step-current]=\"step.type === 'current'\"\n [class.df-stepper-step-future]=\"step.type === 'future'\"\n [disabled]=\"state.isLinear && (step.type === 'future' || step.type === 'completed')\"\n role=\"tab\"\n [attr.aria-selected]=\"i === state.active ? 'true': 'false'\"\n [attr.aria-posinset]=\"i + 1\"\n [attr.aria-setsize]=\"state.steps.length\" [attr.aria-controls]=\"step.ariaControl\" (click)=\"stepperService.selectWithFocus(i)\">\n <div\n [class.df-stepper-number-current]=\"step.type === 'current'\"\n [class.df-stepper-outline-icon]=\"step.type === 'warning'\"\n [class.icon-exclamation-triangle]=\"step.type === 'warning'\"\n [class.df-stepper-icon]=\"step.type === 'completed'\"\n [class.icon-check]=\"step.type === 'completed'\"\n [class.df-stepper-outline-number-future]=\"step.type === 'future'\"\n >\n <span aria-hidden=\"true\">{{stepperService.getStepNumberLabel(i)}}</span>\n </div>\n <div [class.align-items-center]=\"!state.isInline\"\n [class.flex-column]=\"state.isInline\"\n [class.mt-1]=\"!state.isInline\"\n [class.d-none]=\"!state.isVertical\"\n [class.d-sm-flex]=\"!state.isVertical\"\n [class.d-flex]=\"state.isVertical\">\n <span *ngIf=\"step.type === 'warning'\" class=\"visually-hidden\">{{stepperService.warningLabel}}</span>\n <span class=\"df-stepper-label\">{{step.label}}</span>\n <span *ngIf=\"state.isInline && step.optionalLabel\" class=\"df-stepper-optional-label\">{{step.optionalLabel}}</span>\n <span *ngIf=\"step.completed\" class=\"visually-hidden\">{{stepperService.completedLabel}}</span>\n </div>\n </button>\n <ng-container *ngIf=\"!state.isVertical && i < state.steps.length - 1 \" [ngTemplateOutlet]=\"myStepperLine\"></ng-container>\n <div *ngIf=\"state.isVertical && i < state.steps.length\" [class.d-none]=\"state.steps.length - 1 === i\" role=\"tabpanel\" [id]=\"step.ariaControl\" class=\"df-vertical-stepper-panel df-vertical-stepper-line\">\n <ng-template *ngIf=\"mapStepToContent.has(i) && state.active === i\" [ngTemplateOutlet]=\"mapStepToContent.get(i) || null\" [ngTemplateOutletContext]=\"{state, index: i, service: stepperService}\"></ng-template>\n </div>\n </ng-template>\n</ng-container>\n<div class=\"text-primary mb-2\"\n [class.d-block]=\"!state.isVertical\"\n [class.d-sm-none]=\"!state.isVertical\"\n [class.d-none]=\"state.isVertical\"\n *ngIf=\"stepperService.stepperState$ | async as state\">\n <span class=\"df-stepper-label\">{{state.steps[state.active].label}}</span>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "directive", type: DfStepperStepDirective, selector: "[dfStepperStep]", exportAs: ["dfStepperStep"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5859
|
+
}
|
|
5860
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperComponent, decorators: [{
|
|
5861
|
+
type: Component,
|
|
5862
|
+
args: [{ selector: '[dfStepper]', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, DfStepperDirective, DfStepperStepDirective], hostDirectives: [DfStepperDirective], host: {
|
|
5863
|
+
role: 'tablist',
|
|
5864
|
+
class: 'df-stepper mb-2',
|
|
5865
|
+
'[class.df-vertical-stepper]': 'state?.isVertical',
|
|
5866
|
+
'[attr.aria-label]': 'stepperService.stepperAriaLabel',
|
|
5867
|
+
'[attr.aria-orientation]': 'state?.isVertical ? "vertical": null'
|
|
5868
|
+
}, template: "<ng-template #myStepperLine>\n <div class=\"df-stepper-line-wrapper\">\n <div class=\"df-stepper-line\">\n <div class=\"df-stepper-horizontal-line\"></div>\n </div>\n <div class=\"df-stepper-line d-none d-sm-flex\">\n <div class=\"flex-grow-1\"></div>\n </div>\n </div>\n</ng-template>\n<ng-container *ngIf=\"state\">\n <ng-template ngFor let-step [ngForOf]=\"state.steps\" let-i=\"index\">\n <button #stepbasic class=\"btn btn-link df-stepper-step\"\n dfStepperStep\n [class.active]=\"i === state.active\"\n [class.flex-row]=\"state.isInline\"\n [attr.tabIndex]=\"i === state.active ? 0 : -1\"\n [class.df-stepper-step-warning]=\"step.type === 'warning'\"\n [class.df-stepper-step-completed]=\"step.type === 'completed'\"\n [class.df-stepper-step-current]=\"step.type === 'current'\"\n [class.df-stepper-step-future]=\"step.type === 'future'\"\n [disabled]=\"state.isLinear && (step.type === 'future' || step.type === 'completed')\"\n role=\"tab\"\n [attr.aria-selected]=\"i === state.active ? 'true': 'false'\"\n [attr.aria-posinset]=\"i + 1\"\n [attr.aria-setsize]=\"state.steps.length\" [attr.aria-controls]=\"step.ariaControl\" (click)=\"stepperService.selectWithFocus(i)\">\n <div\n [class.df-stepper-number-current]=\"step.type === 'current'\"\n [class.df-stepper-outline-icon]=\"step.type === 'warning'\"\n [class.icon-exclamation-triangle]=\"step.type === 'warning'\"\n [class.df-stepper-icon]=\"step.type === 'completed'\"\n [class.icon-check]=\"step.type === 'completed'\"\n [class.df-stepper-outline-number-future]=\"step.type === 'future'\"\n >\n <span aria-hidden=\"true\">{{stepperService.getStepNumberLabel(i)}}</span>\n </div>\n <div [class.align-items-center]=\"!state.isInline\"\n [class.flex-column]=\"state.isInline\"\n [class.mt-1]=\"!state.isInline\"\n [class.d-none]=\"!state.isVertical\"\n [class.d-sm-flex]=\"!state.isVertical\"\n [class.d-flex]=\"state.isVertical\">\n <span *ngIf=\"step.type === 'warning'\" class=\"visually-hidden\">{{stepperService.warningLabel}}</span>\n <span class=\"df-stepper-label\">{{step.label}}</span>\n <span *ngIf=\"state.isInline && step.optionalLabel\" class=\"df-stepper-optional-label\">{{step.optionalLabel}}</span>\n <span *ngIf=\"step.completed\" class=\"visually-hidden\">{{stepperService.completedLabel}}</span>\n </div>\n </button>\n <ng-container *ngIf=\"!state.isVertical && i < state.steps.length - 1 \" [ngTemplateOutlet]=\"myStepperLine\"></ng-container>\n <div *ngIf=\"state.isVertical && i < state.steps.length\" [class.d-none]=\"state.steps.length - 1 === i\" role=\"tabpanel\" [id]=\"step.ariaControl\" class=\"df-vertical-stepper-panel df-vertical-stepper-line\">\n <ng-template *ngIf=\"mapStepToContent.has(i) && state.active === i\" [ngTemplateOutlet]=\"mapStepToContent.get(i) || null\" [ngTemplateOutletContext]=\"{state, index: i, service: stepperService}\"></ng-template>\n </div>\n </ng-template>\n</ng-container>\n<div class=\"text-primary mb-2\"\n [class.d-block]=\"!state.isVertical\"\n [class.d-sm-none]=\"!state.isVertical\"\n [class.d-none]=\"state.isVertical\"\n *ngIf=\"stepperService.stepperState$ | async as state\">\n <span class=\"df-stepper-label\">{{state.steps[state.active].label}}</span>\n</div>" }]
|
|
5869
|
+
}], ctorParameters: function () { return []; }, propDecorators: { tplStepsContent: [{
|
|
5870
|
+
type: ContentChildren,
|
|
5871
|
+
args: [DfStepperStepContentDirective]
|
|
5872
|
+
}] } });
|
|
5873
|
+
|
|
5874
|
+
class DfStepperModule {
|
|
5875
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5876
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfStepperModule, imports: [DfStepperDirective, DfStepperStepDirective, DfStepperComponent, DfStepperStepContentDirective], exports: [DfStepperDirective, DfStepperStepDirective, DfStepperComponent, DfStepperStepContentDirective] }); }
|
|
5877
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperModule, imports: [DfStepperComponent] }); }
|
|
5878
|
+
}
|
|
5879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfStepperModule, decorators: [{
|
|
5501
5880
|
type: NgModule,
|
|
5502
5881
|
args: [{
|
|
5503
|
-
imports: [
|
|
5504
|
-
|
|
5505
|
-
DfProgressbarModule,
|
|
5506
|
-
DfProgressIndicatorBackdropComponent,
|
|
5507
|
-
DfProgressIndicatorContainerComponent,
|
|
5508
|
-
DfProgressIndicatorDirective
|
|
5509
|
-
],
|
|
5510
|
-
exports: [
|
|
5511
|
-
DfProgressbarModule,
|
|
5512
|
-
DfProgressIndicatorContainerComponent,
|
|
5513
|
-
DfProgressIndicatorDirective,
|
|
5514
|
-
DfProgressIndicatorBackdropComponent,
|
|
5515
|
-
DfDefaultSpinnerComponent
|
|
5516
|
-
]
|
|
5882
|
+
imports: [DfStepperDirective, DfStepperStepDirective, DfStepperComponent, DfStepperStepContentDirective],
|
|
5883
|
+
exports: [DfStepperDirective, DfStepperStepDirective, DfStepperComponent, DfStepperStepContentDirective]
|
|
5517
5884
|
}]
|
|
5518
5885
|
}] });
|
|
5519
5886
|
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5887
|
+
/**
|
|
5888
|
+
* My dfTooltipTruncate directive
|
|
5889
|
+
*/
|
|
5890
|
+
class DfTooltipTruncateDirective {
|
|
5891
|
+
constructor(tooltip, elementRef, renderer) {
|
|
5892
|
+
this.tooltip = tooltip;
|
|
5893
|
+
this.elementRef = elementRef;
|
|
5894
|
+
this.renderer = renderer;
|
|
5895
|
+
}
|
|
5896
|
+
ngOnInit() {
|
|
5897
|
+
this.renderer.addClass(this.elementRef.nativeElement, 'text-truncate');
|
|
5898
|
+
}
|
|
5899
|
+
ngDoCheck() {
|
|
5900
|
+
this.tooltip.disableTooltip = !this.hasOverflow(this.elementRef.nativeElement);
|
|
5901
|
+
}
|
|
5902
|
+
hasOverflow(element) {
|
|
5903
|
+
return element?.offsetHeight < element?.scrollHeight || element?.offsetWidth < element?.scrollWidth;
|
|
5904
|
+
}
|
|
5905
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfTooltipTruncateDirective, deps: [{ token: i1.NgbTooltip }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5906
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DfTooltipTruncateDirective, isStandalone: true, selector: "[dfTooltipTruncate]", exportAs: ["dfTooltipTruncate"], ngImport: i0 }); }
|
|
5524
5907
|
}
|
|
5525
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5908
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfTooltipTruncateDirective, decorators: [{
|
|
5909
|
+
type: Directive,
|
|
5910
|
+
args: [{
|
|
5911
|
+
exportAs: 'dfTooltipTruncate',
|
|
5912
|
+
selector: '[dfTooltipTruncate]',
|
|
5913
|
+
standalone: true
|
|
5914
|
+
}]
|
|
5915
|
+
}], ctorParameters: function () { return [{ type: i1.NgbTooltip }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; } });
|
|
5916
|
+
|
|
5917
|
+
class DfTooltipModule {
|
|
5918
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5919
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfTooltipModule, imports: [DfTooltipTruncateDirective], exports: [DfTooltipTruncateDirective, NgbTooltipModule] }); }
|
|
5920
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfTooltipModule, imports: [NgbTooltipModule] }); }
|
|
5921
|
+
}
|
|
5922
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfTooltipModule, decorators: [{
|
|
5526
5923
|
type: NgModule,
|
|
5527
5924
|
args: [{
|
|
5528
|
-
imports: [
|
|
5529
|
-
exports: [
|
|
5925
|
+
imports: [DfTooltipTruncateDirective],
|
|
5926
|
+
exports: [DfTooltipTruncateDirective, NgbTooltipModule]
|
|
5530
5927
|
}]
|
|
5531
5928
|
}] });
|
|
5532
5929
|
|
|
5533
|
-
class
|
|
5534
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5535
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5536
|
-
|
|
5930
|
+
class DfSideNavModule {
|
|
5931
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5932
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavModule, imports: [DfManageSideNavDirective,
|
|
5933
|
+
DfSideNavComponent,
|
|
5934
|
+
DfSideNavHeaderDirective,
|
|
5935
|
+
DfExcludeTrapDirective,
|
|
5936
|
+
DfSideNavIconDirective,
|
|
5937
|
+
DfSideNavItemDirective], exports: [DfManageSideNavDirective,
|
|
5938
|
+
DfSideNavComponent,
|
|
5939
|
+
DfSideNavHeaderDirective,
|
|
5940
|
+
DfExcludeTrapDirective,
|
|
5941
|
+
DfSideNavIconDirective,
|
|
5942
|
+
DfSideNavItemDirective,
|
|
5943
|
+
DfSideNavCollapseModule,
|
|
5944
|
+
DfMediaModule] }); }
|
|
5945
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavModule, imports: [DfSideNavComponent, DfSideNavCollapseModule,
|
|
5946
|
+
DfMediaModule] }); }
|
|
5537
5947
|
}
|
|
5538
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5948
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfSideNavModule, decorators: [{
|
|
5539
5949
|
type: NgModule,
|
|
5540
5950
|
args: [{
|
|
5541
|
-
imports: [
|
|
5542
|
-
|
|
5951
|
+
imports: [
|
|
5952
|
+
DfManageSideNavDirective,
|
|
5953
|
+
DfSideNavComponent,
|
|
5954
|
+
DfSideNavHeaderDirective,
|
|
5955
|
+
DfExcludeTrapDirective,
|
|
5956
|
+
DfSideNavIconDirective,
|
|
5957
|
+
DfSideNavItemDirective
|
|
5958
|
+
],
|
|
5959
|
+
exports: [
|
|
5960
|
+
DfManageSideNavDirective,
|
|
5961
|
+
DfSideNavComponent,
|
|
5962
|
+
DfSideNavHeaderDirective,
|
|
5963
|
+
DfExcludeTrapDirective,
|
|
5964
|
+
DfSideNavIconDirective,
|
|
5965
|
+
DfSideNavItemDirective,
|
|
5966
|
+
DfSideNavCollapseModule,
|
|
5967
|
+
DfMediaModule
|
|
5968
|
+
]
|
|
5543
5969
|
}]
|
|
5544
5970
|
}] });
|
|
5545
5971
|
|
|
5546
|
-
class
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5972
|
+
class DfManageCardSelectionDirective {
|
|
5973
|
+
set dfManageCardSelected(isSelected) {
|
|
5974
|
+
const selectedClass = 'df-card-selected';
|
|
5975
|
+
if (isSelected === true) {
|
|
5976
|
+
this.renderer.addClass(this.element.nativeElement, selectedClass);
|
|
5977
|
+
}
|
|
5978
|
+
else {
|
|
5979
|
+
this.renderer.removeClass(this.element.nativeElement, selectedClass);
|
|
5980
|
+
}
|
|
5551
5981
|
}
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5982
|
+
constructor(element, renderer) {
|
|
5983
|
+
this.element = element;
|
|
5984
|
+
this.renderer = renderer;
|
|
5985
|
+
}
|
|
5986
|
+
ngAfterViewInit() {
|
|
5987
|
+
this.input = this.element.nativeElement.querySelector('.form-check-input');
|
|
5988
|
+
this.renderer.setAttribute(this.input, 'tabIndex', '-1');
|
|
5989
|
+
}
|
|
5990
|
+
click(event) {
|
|
5991
|
+
const target = event.target;
|
|
5992
|
+
// If the input or the label is clicked then the selection is already made
|
|
5993
|
+
// The card must have only one input
|
|
5994
|
+
if (!(target.classList.contains('form-check-input') || target.classList.contains('form-check-label'))) {
|
|
5995
|
+
this.input.click();
|
|
5556
5996
|
}
|
|
5557
5997
|
else {
|
|
5558
|
-
|
|
5998
|
+
this.element.nativeElement.focus();
|
|
5559
5999
|
}
|
|
5560
|
-
// we add the 'df-modal-open' class to the body when the modal is open. We remove it when the modal is closed/dismissed
|
|
5561
|
-
this.renderer.addClass(document.body, 'df-modal-open');
|
|
5562
|
-
modalRef.result.then(() => {
|
|
5563
|
-
this.renderer.removeClass(document.body, 'df-modal-open');
|
|
5564
|
-
}, () => {
|
|
5565
|
-
this.renderer.removeClass(document.body, 'df-modal-open');
|
|
5566
|
-
});
|
|
5567
|
-
return modalRef;
|
|
5568
6000
|
}
|
|
5569
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5570
|
-
static { this.ɵ
|
|
6001
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfManageCardSelectionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6002
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DfManageCardSelectionDirective, isStandalone: true, selector: "[dfManageCardSelected]", inputs: { dfManageCardSelected: "dfManageCardSelected" }, host: { listeners: { "click": "click($event)" } }, ngImport: i0 }); }
|
|
5571
6003
|
}
|
|
5572
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
5573
|
-
type:
|
|
6004
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfManageCardSelectionDirective, decorators: [{
|
|
6005
|
+
type: Directive,
|
|
5574
6006
|
args: [{
|
|
5575
|
-
|
|
6007
|
+
selector: '[dfManageCardSelected]',
|
|
6008
|
+
standalone: true
|
|
5576
6009
|
}]
|
|
5577
|
-
}], ctorParameters: function () { return [{ type:
|
|
6010
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { dfManageCardSelected: [{
|
|
6011
|
+
type: Input
|
|
6012
|
+
}], click: [{
|
|
6013
|
+
type: HostListener,
|
|
6014
|
+
args: ['click', ['$event']]
|
|
6015
|
+
}] } });
|
|
6016
|
+
|
|
6017
|
+
class DfAdvancedCardModule {
|
|
6018
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfAdvancedCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6019
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfAdvancedCardModule, imports: [DfManageCardSelectionDirective], exports: [DfManageCardSelectionDirective] }); }
|
|
6020
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfAdvancedCardModule }); }
|
|
6021
|
+
}
|
|
6022
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfAdvancedCardModule, decorators: [{
|
|
6023
|
+
type: NgModule,
|
|
6024
|
+
args: [{
|
|
6025
|
+
imports: [DfManageCardSelectionDirective],
|
|
6026
|
+
exports: [DfManageCardSelectionDirective]
|
|
6027
|
+
}]
|
|
6028
|
+
}] });
|
|
5578
6029
|
|
|
5579
6030
|
const DF_MODULES = [
|
|
5580
6031
|
DfAlertModule,
|
|
@@ -5592,8 +6043,12 @@ const DF_MODULES = [
|
|
|
5592
6043
|
DfSideNavCollapseModule,
|
|
5593
6044
|
DfAdvancedCardModule,
|
|
5594
6045
|
DfFooterModule,
|
|
5595
|
-
DfToastModule
|
|
6046
|
+
DfToastModule,
|
|
6047
|
+
DfStepperModule
|
|
5596
6048
|
];
|
|
6049
|
+
/**
|
|
6050
|
+
* @deprecated Import only the needed modules or use standalone components instead of DfModule
|
|
6051
|
+
*/
|
|
5597
6052
|
class DfModule {
|
|
5598
6053
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5599
6054
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: DfModule, imports: [DfAlertModule,
|
|
@@ -5611,7 +6066,8 @@ class DfModule {
|
|
|
5611
6066
|
DfSideNavCollapseModule,
|
|
5612
6067
|
DfAdvancedCardModule,
|
|
5613
6068
|
DfFooterModule,
|
|
5614
|
-
DfToastModule
|
|
6069
|
+
DfToastModule,
|
|
6070
|
+
DfStepperModule], exports: [DfAlertModule,
|
|
5615
6071
|
DfDatePickerModule,
|
|
5616
6072
|
DfSelectModule,
|
|
5617
6073
|
DfProgressbarModule,
|
|
@@ -5626,7 +6082,8 @@ class DfModule {
|
|
|
5626
6082
|
DfSideNavCollapseModule,
|
|
5627
6083
|
DfAdvancedCardModule,
|
|
5628
6084
|
DfFooterModule,
|
|
5629
|
-
DfToastModule
|
|
6085
|
+
DfToastModule,
|
|
6086
|
+
DfStepperModule] }); }
|
|
5630
6087
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfModule, imports: [DF_MODULES, DfAlertModule,
|
|
5631
6088
|
DfDatePickerModule,
|
|
5632
6089
|
DfSelectModule,
|
|
@@ -5642,7 +6099,8 @@ class DfModule {
|
|
|
5642
6099
|
DfSideNavCollapseModule,
|
|
5643
6100
|
DfAdvancedCardModule,
|
|
5644
6101
|
DfFooterModule,
|
|
5645
|
-
DfToastModule
|
|
6102
|
+
DfToastModule,
|
|
6103
|
+
DfStepperModule] }); }
|
|
5646
6104
|
}
|
|
5647
6105
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DfModule, decorators: [{
|
|
5648
6106
|
type: NgModule,
|
|
@@ -5652,6 +6110,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImpor
|
|
|
5652
6110
|
}]
|
|
5653
6111
|
}] });
|
|
5654
6112
|
|
|
6113
|
+
// Accessibility
|
|
6114
|
+
|
|
5655
6115
|
/**
|
|
5656
6116
|
* Public API Surface of design-factory
|
|
5657
6117
|
*/
|
|
@@ -5660,5 +6120,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImpor
|
|
|
5660
6120
|
* Generated bundle index. Do not edit.
|
|
5661
6121
|
*/
|
|
5662
6122
|
|
|
5663
|
-
export { BREAKPOINTS_VARS, ChangeContext, CloseInputDatePickerDirective, DF_BREAKPOINTS_VAR_DEFAULT, DfAccessibilityModule, DfAdvancedCardModule, DfAdvancedInputModule, DfAlertModule, DfAmadeusIconComponent, DfBreakpoints, DfDatePickerModule, DfDatepickerRangeDirective, DfDatepickerRangeService, DfDefaultSpinnerComponent, DfDirectionDetectionService, DfExcludeTrapDirective, DfFooterModule, DfIconModule, DfIfMediaDirective, DfInputIconDirective, DfInsertIconDirective, DfInsertIconModule, DfManageBadgeEventsDirective, DfManageCardSelectionDirective, DfManageNavSelectDirective, DfManageSideNavDirective, DfMedia, DfMediaModule, DfMediaObserver, DfMediaQuery, DfModalService, DfModule, DfNavItemType, DfOptionHighlightDirective, DfPopoverConfig, DfPopoverModule, DfProgressIndicatorBackdropComponent, DfProgressIndicatorContainerComponent, DfProgressIndicatorContentPosition, DfProgressIndicatorContentProgressBar, DfProgressIndicatorContentSpinner, DfProgressIndicatorContentType, DfProgressIndicatorDirective, DfProgressIndicatorModule, DfProgressIndicatorRef, DfProgressIndicatorService, DfProgressbarComponent, DfProgressbarModule, DfSelectModule, DfSideNavCollapseDirective, DfSideNavCollapseModule, DfSideNavCollapseService, DfSideNavComponent, DfSideNavHeaderDirective, DfSideNavIconDirective, DfSideNavItemDirective, DfSideNavModule, DfSideNavService, DfSliderDirectionDirective, DfSliderModule, DfToastModule, DfTooltipModule, DfTooltipTruncateDirective, DfTriggerClickDirective, LabelType, Options, PointerType, RightToLeftDirectionEnum, SkipLinkDirective, SkipLinksContainerComponent, SliderComponent };
|
|
6123
|
+
export { BREAKPOINTS_VARS, ChangeContext, CloseInputDatePickerDirective, DF_BREAKPOINTS_VAR_DEFAULT, DfAccessibilityModule, DfAdvancedCardModule, DfAdvancedInputModule, DfAlertModule, DfAmadeusIconComponent, DfBreakpoints, DfDatePickerModule, DfDatepickerRangeDirective, DfDatepickerRangeService, DfDefaultSpinnerComponent, DfDirectionDetectionService, DfExcludeTrapDirective, DfFooterModule, DfIconModule, DfIfMediaDirective, DfInputIconDirective, DfInsertIconDirective, DfInsertIconModule, DfManageBadgeEventsDirective, DfManageCardSelectionDirective, DfManageNavSelectDirective, DfManageSideNavDirective, DfMedia, DfMediaModule, DfMediaObserver, DfMediaQuery, DfModalService, DfModule, DfNavItemType, DfOptionHighlightDirective, DfPopoverConfig, DfPopoverModule, DfProgressIndicatorBackdropComponent, DfProgressIndicatorContainerComponent, DfProgressIndicatorContentPosition, DfProgressIndicatorContentProgressBar, DfProgressIndicatorContentSpinner, DfProgressIndicatorContentType, DfProgressIndicatorDirective, DfProgressIndicatorModule, DfProgressIndicatorRef, DfProgressIndicatorService, DfProgressbarComponent, DfProgressbarModule, DfSelectModule, DfSideNavCollapseDirective, DfSideNavCollapseModule, DfSideNavCollapseService, DfSideNavComponent, DfSideNavHeaderDirective, DfSideNavIconDirective, DfSideNavItemDirective, DfSideNavModule, DfSideNavService, DfSliderDirectionDirective, DfSliderModule, DfStepperComponent, DfStepperDirective, DfStepperModule, DfStepperService, DfStepperStepContentDirective, DfStepperStepDirective, DfToastModule, DfTooltipModule, DfTooltipTruncateDirective, DfTriggerClickDirective, LabelType, Options, PointerType, RightToLeftDirectionEnum, SkipLinkDirective, SkipLinksContainerComponent, SliderComponent };
|
|
5664
6124
|
//# sourceMappingURL=design-factory.mjs.map
|