@porscheinformatik/clr-addons 15.0.1 → 15.2.1
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/clr-addons.module.d.ts +2 -1
- package/daterangepicker/daterange.constants.d.ts +21 -0
- package/daterangepicker/daterangepicker.module.d.ts +17 -0
- package/daterangepicker/directives/abstract-container.component.d.ts +53 -0
- package/daterangepicker/directives/datepicker/datepicker.component.d.ts +65 -0
- package/daterangepicker/directives/daterangepicker/daterangepicker.directive.d.ts +127 -0
- package/daterangepicker/directives/daterangepicker-container/daterangepicker-container.component.d.ts +118 -0
- package/daterangepicker/directives/if-daterange-error.directive.d.ts +40 -0
- package/daterangepicker/index.d.ts +13 -0
- package/daterangepicker/interfaces/daterange-preset.interface.d.ts +8 -0
- package/daterangepicker/interfaces/daterange.interface.d.ts +12 -0
- package/daterangepicker/models/day.model.d.ts +80 -0
- package/daterangepicker/models/popover-positions.model.d.ts +20 -0
- package/daterangepicker/providers/daterange-control-state.service.d.ts +42 -0
- package/daterangepicker/providers/daterange-parsing.service.d.ts +66 -0
- package/daterangepicker/providers/daterange.service.d.ts +38 -0
- package/daterangepicker/providers/opened-datepickers-tracker.service.d.ts +20 -0
- package/daterangepicker/validators/daterange-max.validator.d.ts +32 -0
- package/daterangepicker/validators/daterange-min.validator.d.ts +32 -0
- package/daterangepicker/validators/daterange-order.validator.d.ts +29 -0
- package/daterangepicker/validators/daterange-required.validator.d.ts +29 -0
- package/dropdown/clr-dropdown-overflow.directive.d.ts +4 -3
- package/esm2020/clr-addons.module.mjs +8 -4
- package/esm2020/daterangepicker/daterange.constants.mjs +27 -0
- package/esm2020/daterangepicker/daterangepicker.module.mjs +58 -0
- package/esm2020/daterangepicker/directives/abstract-container.component.mjs +104 -0
- package/esm2020/daterangepicker/directives/datepicker/datepicker.component.mjs +97 -0
- package/esm2020/daterangepicker/directives/daterangepicker/daterangepicker.directive.mjs +256 -0
- package/esm2020/daterangepicker/directives/daterangepicker-container/daterangepicker-container.component.mjs +251 -0
- package/esm2020/daterangepicker/directives/if-daterange-error.directive.mjs +94 -0
- package/esm2020/daterangepicker/index.mjs +14 -0
- package/esm2020/daterangepicker/interfaces/daterange-preset.interface.mjs +2 -0
- package/esm2020/daterangepicker/interfaces/daterange.interface.mjs +2 -0
- package/esm2020/daterangepicker/models/day.model.mjs +99 -0
- package/esm2020/daterangepicker/models/popover-positions.model.mjs +66 -0
- package/esm2020/daterangepicker/providers/daterange-control-state.service.mjs +62 -0
- package/esm2020/daterangepicker/providers/daterange-parsing.service.mjs +206 -0
- package/esm2020/daterangepicker/providers/daterange.service.mjs +54 -0
- package/esm2020/daterangepicker/providers/opened-datepickers-tracker.service.mjs +36 -0
- package/esm2020/daterangepicker/validators/daterange-max.validator.mjs +85 -0
- package/esm2020/daterangepicker/validators/daterange-min.validator.mjs +85 -0
- package/esm2020/daterangepicker/validators/daterange-order.validator.mjs +75 -0
- package/esm2020/daterangepicker/validators/daterange-required.validator.mjs +71 -0
- package/esm2020/dropdown/clr-dropdown-overflow.directive.mjs +15 -11
- package/esm2020/index.mjs +3 -2
- package/fesm2015/clr-addons.mjs +1920 -264
- package/fesm2015/clr-addons.mjs.map +1 -1
- package/fesm2020/clr-addons.mjs +1900 -264
- package/fesm2020/clr-addons.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +3 -3
package/fesm2015/clr-addons.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, NgModule, Injectable, EventEmitter, Input, Output, Directive, ViewChild, ContentChildren, TemplateRef, ViewChildren, HostBinding, ElementRef, Renderer2, forwardRef, ContentChild, Optional, HostListener, InjectionToken, Inject } from '@angular/core';
|
|
2
|
+
import { Component, NgModule, Injectable, EventEmitter, Input, Output, Directive, ViewChild, ContentChildren, TemplateRef, ViewChildren, HostBinding, ElementRef, Renderer2, forwardRef, ContentChild, Optional, HostListener, InjectionToken, Inject, LOCALE_ID, Self } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
4
|
+
import { CommonModule, getLocaleDateFormat, FormatWidth, DOCUMENT } from '@angular/common';
|
|
5
5
|
import * as i3$1 from '@angular/forms';
|
|
6
6
|
import { FormsModule, NG_VALIDATORS, NgControl, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
|
-
import * as
|
|
8
|
-
import { ClarityModule, ClrFormsModule, ClrDropdown, ClrForm, ClrAlert, ClrAxis, ClrSide, ClrAlignment, ClrPopoverToggleService, ClrPopoverEventsService, ClrPopoverPositionService, ClrIconModule, ClrDropdownModule, ClrDatagridSortOrder, DatagridPropertyComparator, ClrDatagridPagination, ClrDatagridFilter } from '@clr/angular';
|
|
7
|
+
import * as i1$1 from '@clr/angular';
|
|
8
|
+
import { ClarityModule, ClrFormsModule, ClrDropdown, ClrForm, ClrAlert, ClrAxis, ClrSide, ClrAlignment, ClrPopoverToggleService, ClrPopoverEventsService, ClrPopoverPositionService, ClrIconModule, ClrDropdownModule, ClrDatagridSortOrder, DatagridPropertyComparator, ClrDatagridPagination, ClrDatagridFilter, ClrDateContainer, ClrLabel, ClrControlHelper, ClrControlError, ClrControlSuccess, ClrDatepickerModule } from '@clr/angular';
|
|
9
9
|
import { Subject, BehaviorSubject, timer, asyncScheduler, interval, of, ReplaySubject, takeUntil as takeUntil$1, delay } from 'rxjs';
|
|
10
10
|
import { takeUntil, observeOn, take } from 'rxjs/operators';
|
|
11
11
|
import * as i3 from '@angular/router';
|
|
12
12
|
import { RouterModule } from '@angular/router';
|
|
13
13
|
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
14
|
-
import { ClarityIcons, treeViewIcon, angleIcon, organizationIcon } from '@cds/core/icon';
|
|
14
|
+
import { ClarityIcons, treeViewIcon, angleIcon, organizationIcon, calendarIcon, exclamationCircleIcon, checkCircleIcon, windowCloseIcon } from '@cds/core/icon';
|
|
15
15
|
import '@cds/core/icon/register.js';
|
|
16
16
|
|
|
17
17
|
/*
|
|
@@ -28,7 +28,7 @@ class ClrBackButton {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
ClrBackButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrBackButton, deps: [{ token: i1.Location }], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
-
ClrBackButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrBackButton, selector: "clr-back-button", ngImport: i0, template: "<button type=\"button\" class=\"btn btn-icon btn-link back-button\" (click)=\"back()\">\n <clr-icon shape=\"arrow\" dir=\"left\" size=\"36\"></clr-icon>\n</button>\n", dependencies: [{ kind: "directive", type:
|
|
31
|
+
ClrBackButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrBackButton, selector: "clr-back-button", ngImport: i0, template: "<button type=\"button\" class=\"btn btn-icon btn-link back-button\" (click)=\"back()\">\n <clr-icon shape=\"arrow\" dir=\"left\" size=\"36\"></clr-icon>\n</button>\n", dependencies: [{ kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }] });
|
|
32
32
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrBackButton, decorators: [{
|
|
33
33
|
type: Component,
|
|
34
34
|
args: [{ selector: 'clr-back-button', template: "<button type=\"button\" class=\"btn btn-icon btn-link back-button\" (click)=\"back()\">\n <clr-icon shape=\"arrow\" dir=\"left\" size=\"36\"></clr-icon>\n</button>\n" }]
|
|
@@ -147,7 +147,7 @@ class ClrCollapseExpandSection {
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
ClrCollapseExpandSection.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrCollapseExpandSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
150
|
-
ClrCollapseExpandSection.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrCollapseExpandSection, selector: "clr-collapse-expand-section", inputs: { isCollapsed: ["clrIsCollapsed", "isCollapsed"], disableHeaderStyles: ["clrDisableHeaderStyles", "disableHeaderStyles"] }, outputs: { collapsed: "clrCollapsed", expanded: "clrExpanded" }, ngImport: i0, template: "<div class=\"ces\">\n <div class=\"ces-title\" [class.disabled-header-styles]=\"disableHeaderStyles\">\n <h2 *ngIf=\"!disableHeaderStyles; else title\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </h2>\n <ng-template #title>\n <ng-content select=\"[clr-ces-title]\"></ng-content>\n <button type=\"button\" (click)=\"onCollapseExpand()\" class=\"btn btn-icon btn-link ces-caret-btn\">\n <clr-icon shape=\"caret up\" size=\"28\" class=\"ces-caret-icon\" [@rotateIcon]=\"isCollapsed\"></clr-icon>\n </button>\n </ng-template>\n </div>\n <div class=\"ces-subtitle\">\n <h4 *ngIf=\"!disableHeaderStyles; else subtitle\">\n <ng-container *ngTemplateOutlet=\"subtitle\"></ng-container>\n </h4>\n <ng-template #subtitle>\n <ng-content select=\"[clr-ces-subtitle]\"></ng-content>\n </ng-template>\n </div>\n <div [@collapseExpandAnimation] *ngIf=\"!isCollapsed\">\n <ng-content select=\"[clr-ces-content]\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type:
|
|
150
|
+
ClrCollapseExpandSection.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrCollapseExpandSection, selector: "clr-collapse-expand-section", inputs: { isCollapsed: ["clrIsCollapsed", "isCollapsed"], disableHeaderStyles: ["clrDisableHeaderStyles", "disableHeaderStyles"] }, outputs: { collapsed: "clrCollapsed", expanded: "clrExpanded" }, ngImport: i0, template: "<div class=\"ces\">\n <div class=\"ces-title\" [class.disabled-header-styles]=\"disableHeaderStyles\">\n <h2 *ngIf=\"!disableHeaderStyles; else title\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </h2>\n <ng-template #title>\n <ng-content select=\"[clr-ces-title]\"></ng-content>\n <button type=\"button\" (click)=\"onCollapseExpand()\" class=\"btn btn-icon btn-link ces-caret-btn\">\n <clr-icon shape=\"caret up\" size=\"28\" class=\"ces-caret-icon\" [@rotateIcon]=\"isCollapsed\"></clr-icon>\n </button>\n </ng-template>\n </div>\n <div class=\"ces-subtitle\">\n <h4 *ngIf=\"!disableHeaderStyles; else subtitle\">\n <ng-container *ngTemplateOutlet=\"subtitle\"></ng-container>\n </h4>\n <ng-template #subtitle>\n <ng-content select=\"[clr-ces-subtitle]\"></ng-content>\n </ng-template>\n </div>\n <div [@collapseExpandAnimation] *ngIf=\"!isCollapsed\">\n <ng-content select=\"[clr-ces-content]\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }], animations: [
|
|
151
151
|
trigger('collapseExpandAnimation', [
|
|
152
152
|
transition(':enter', [
|
|
153
153
|
style({ opacity: 0, height: 0, overflow: 'hidden' }),
|
|
@@ -260,7 +260,7 @@ class ClrContentPanel {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
ClrContentPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrContentPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
263
|
-
ClrContentPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrContentPanel, selector: "clr-content-panel", outputs: { opened: "clrOpened", closed: "clrClosed" }, host: { properties: { "class.content-panel": "true" } }, ngImport: i0, template: "<ng-container *ngIf=\"_open\">\n <div [@slideIn] class=\"content-panel-content-wrapper\" (@slideIn.done)=\"resizeWindow()\">\n <h3 class=\"content-panel-title\">\n <button type=\"button\" class=\"close content-panel-close-btn\" (click)=\"close()\">\n <clr-icon class=\"content-panel-close-icon\" shape=\"close\" size=\"36\"></clr-icon>\n </button>\n <ng-content select=\"[clr-content-panel-title]\"></ng-content>\n </h3>\n <ng-content select=\"[clr-content-panel-content]\"></ng-content>\n </div>\n <div [@fade] class=\"content-panel-backdrop\" (click)=\"close()\" (@fade.done)=\"resizeWindow()\"></div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
263
|
+
ClrContentPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrContentPanel, selector: "clr-content-panel", outputs: { opened: "clrOpened", closed: "clrClosed" }, host: { properties: { "class.content-panel": "true" } }, ngImport: i0, template: "<ng-container *ngIf=\"_open\">\n <div [@slideIn] class=\"content-panel-content-wrapper\" (@slideIn.done)=\"resizeWindow()\">\n <h3 class=\"content-panel-title\">\n <button type=\"button\" class=\"close content-panel-close-btn\" (click)=\"close()\">\n <clr-icon class=\"content-panel-close-icon\" shape=\"close\" size=\"36\"></clr-icon>\n </button>\n <ng-content select=\"[clr-content-panel-title]\"></ng-content>\n </h3>\n <ng-content select=\"[clr-content-panel-content]\"></ng-content>\n </div>\n <div [@fade] class=\"content-panel-backdrop\" (click)=\"close()\" (@fade.done)=\"resizeWindow()\"></div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }], animations: [
|
|
264
264
|
trigger('slideIn', [
|
|
265
265
|
transition(':enter', [style({ opacity: 0, width: 0 }), animate('0.2s', style({ opacity: 1, width: '*' }))]),
|
|
266
266
|
transition(':leave', [style({ opacity: 1, width: '*' }), animate('0.2s', style({ opacity: 0, width: 0 }))]),
|
|
@@ -601,7 +601,7 @@ class ClrDotPager {
|
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
ClrDotPager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDotPager, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
604
|
-
ClrDotPager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrDotPager, selector: "clr-dot-pager", inputs: { pages: ["clrPages", "pages"], currentPage: ["clrCurrentPage", "currentPage"] }, outputs: { currentPageChange: "clrCurrentPageChange" }, host: { properties: { "class.dot-pager": "true" } }, ngImport: i0, template: "<clr-radio-container *ngIf=\"pages > 0\" clrInline>\n <clr-radio-wrapper *ngFor=\"let a of pageArray(); let page = index\">\n <input clrRadio type=\"radio\" [value]=\"page+1\" [(ngModel)]=\"currentPage\" name=\"{{uniqueName}}\" />\n <label> </label>\n </clr-radio-wrapper>\n</clr-radio-container>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
604
|
+
ClrDotPager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrDotPager, selector: "clr-dot-pager", inputs: { pages: ["clrPages", "pages"], currentPage: ["clrCurrentPage", "currentPage"] }, outputs: { currentPageChange: "clrCurrentPageChange" }, host: { properties: { "class.dot-pager": "true" } }, ngImport: i0, template: "<clr-radio-container *ngIf=\"pages > 0\" clrInline>\n <clr-radio-wrapper *ngFor=\"let a of pageArray(); let page = index\">\n <input clrRadio type=\"radio\" [value]=\"page+1\" [(ngModel)]=\"currentPage\" name=\"{{uniqueName}}\" />\n <label> </label>\n </clr-radio-wrapper>\n</clr-radio-container>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i1$1.ClrRadio, selector: "[clrRadio]" }, { kind: "component", type: i1$1.ClrRadioContainer, selector: "clr-radio-container", inputs: ["clrInline"] }, { kind: "component", type: i1$1.ClrRadioWrapper, selector: "clr-radio-wrapper" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
605
605
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDotPager, decorators: [{
|
|
606
606
|
type: Component,
|
|
607
607
|
args: [{ selector: 'clr-dot-pager', host: { '[class.dot-pager]': 'true' }, template: "<clr-radio-container *ngIf=\"pages > 0\" clrInline>\n <clr-radio-wrapper *ngFor=\"let a of pageArray(); let page = index\">\n <input clrRadio type=\"radio\" [value]=\"page+1\" [(ngModel)]=\"currentPage\" name=\"{{uniqueName}}\" />\n <label> </label>\n </clr-radio-wrapper>\n</clr-radio-container>\n" }]
|
|
@@ -636,7 +636,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
636
636
|
}] });
|
|
637
637
|
|
|
638
638
|
/*
|
|
639
|
-
* Copyright (c) 2018-
|
|
639
|
+
* Copyright (c) 2018-2023 Porsche Informatik. All Rights Reserved.
|
|
640
640
|
* This software is released under MIT license.
|
|
641
641
|
* The full license information can be found in LICENSE in the root directory of this project.
|
|
642
642
|
*/
|
|
@@ -646,8 +646,9 @@ class ClrDropdownOverflowDirective {
|
|
|
646
646
|
this.defaultItemMinHeightRem = 1.5;
|
|
647
647
|
this.marginBottomRem = 0.1;
|
|
648
648
|
this.destroy$ = new Subject();
|
|
649
|
+
this.alreadyChecked = false;
|
|
649
650
|
}
|
|
650
|
-
|
|
651
|
+
ngAfterContentChecked() {
|
|
651
652
|
var _a;
|
|
652
653
|
// first trigger manually because the subscription lower only triggers after first change
|
|
653
654
|
if (!((_a = this.nestedDropdownChildren) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
@@ -670,14 +671,17 @@ class ClrDropdownOverflowDirective {
|
|
|
670
671
|
applyDropdownOverflowStyles() {
|
|
671
672
|
// the vertical position of our element in the current window
|
|
672
673
|
const y = this.elRef.nativeElement.getBoundingClientRect().y;
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
item
|
|
674
|
+
if (y !== 0 && !this.alreadyChecked) {
|
|
675
|
+
const itemMinHeightPx = this.getItemMinHeight(this.clrDropdownMenuItemMinHeight);
|
|
676
|
+
// see https://stackoverflow.com/questions/22754315/for-loop-for-htmlcollection-elements
|
|
677
|
+
for (const item of this.getAllChildDropdownMenuItems()) {
|
|
678
|
+
item.style.minHeight = itemMinHeightPx + 'px';
|
|
679
|
+
}
|
|
680
|
+
this.elRef.nativeElement.style.maxHeight =
|
|
681
|
+
this.getMenuMaxHeight(this.clrDropdownMenuMaxHeight, window.innerHeight - y - this.convertRemToPixels(this.marginBottomRem)) + 'px';
|
|
682
|
+
this.elRef.nativeElement.style.overflowY = 'auto';
|
|
683
|
+
this.alreadyChecked = true;
|
|
677
684
|
}
|
|
678
|
-
this.elRef.nativeElement.style.maxHeight =
|
|
679
|
-
this.getMenuMaxHeight(this.clrDropdownMenuMaxHeight, window.innerHeight - y - this.convertRemToPixels(this.marginBottomRem)) + 'px';
|
|
680
|
-
this.elRef.nativeElement.style.overflowY = 'auto';
|
|
681
685
|
}
|
|
682
686
|
removeDropdownOverflowStyles() {
|
|
683
687
|
for (const item of this.getAllChildDropdownMenuItems()) {
|
|
@@ -878,7 +882,7 @@ class ClrFlowBar {
|
|
|
878
882
|
}
|
|
879
883
|
}
|
|
880
884
|
ClrFlowBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrFlowBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
881
|
-
ClrFlowBar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrFlowBar, selector: "clr-flow-bar", inputs: { _steps: ["clrSteps", "_steps"], _activeStep: ["clrActiveStep", "_activeStep"] }, outputs: { _activeStepChange: "clrActiveStepChange" }, host: { properties: { "class.flow-bar": "true" } }, ngImport: i0, template: "<div class=\"flow-bar-wrapper\">\n <ng-container *ngFor=\"let step of _steps; let index = index; let last = last\">\n <div class=\"flow-bar-step\" [class.active]=\"step === _activeStep\">\n <button\n class=\"btn btn-link flow-bar-btn\"\n [disabled]=\"!step.enabled\"\n [class.active]=\"step === _activeStep\"\n (click)=\"changeActiveStep(step)\"\n >\n {{index + 1}}. {{(step.title | async)}}\n </button>\n <clr-icon shape=\"caret right\" *ngIf=\"!last\"></clr-icon>\n </div>\n </ng-container>\n</div>\n<clr-dropdown class=\"flow-bar-dropdown clr-flex-fill\">\n <button type=\"button\" class=\"btn btn-outline-primary\" clrDropdownTrigger>\n {{_steps.indexOf(_activeStep) + 1}}. {{_activeStep?.title | async}}\n <clr-icon shape=\"caret down\"></clr-icon>\n </button>\n <clr-dropdown-menu>\n <ng-container *ngFor=\"let step of _steps; let index = index; let last = last\">\n <button clrDropdownItem type=\"button\" class=\"btn\" [disabled]=\"!step.enabled\" (click)=\"changeActiveStep(step)\">\n {{index + 1}}. {{step.title | async}}\n </button>\n </ng-container>\n </clr-dropdown-menu>\n</clr-dropdown>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
885
|
+
ClrFlowBar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrFlowBar, selector: "clr-flow-bar", inputs: { _steps: ["clrSteps", "_steps"], _activeStep: ["clrActiveStep", "_activeStep"] }, outputs: { _activeStepChange: "clrActiveStepChange" }, host: { properties: { "class.flow-bar": "true" } }, ngImport: i0, template: "<div class=\"flow-bar-wrapper\">\n <ng-container *ngFor=\"let step of _steps; let index = index; let last = last\">\n <div class=\"flow-bar-step\" [class.active]=\"step === _activeStep\">\n <button\n class=\"btn btn-link flow-bar-btn\"\n [disabled]=\"!step.enabled\"\n [class.active]=\"step === _activeStep\"\n (click)=\"changeActiveStep(step)\"\n >\n {{index + 1}}. {{(step.title | async)}}\n </button>\n <clr-icon shape=\"caret right\" *ngIf=\"!last\"></clr-icon>\n </div>\n </ng-container>\n</div>\n<clr-dropdown class=\"flow-bar-dropdown clr-flex-fill\">\n <button type=\"button\" class=\"btn btn-outline-primary\" clrDropdownTrigger>\n {{_steps.indexOf(_activeStep) + 1}}. {{_activeStep?.title | async}}\n <clr-icon shape=\"caret down\"></clr-icon>\n </button>\n <clr-dropdown-menu>\n <ng-container *ngFor=\"let step of _steps; let index = index; let last = last\">\n <button clrDropdownItem type=\"button\" class=\"btn\" [disabled]=\"!step.enabled\" (click)=\"changeActiveStep(step)\">\n {{index + 1}}. {{step.title | async}}\n </button>\n </ng-container>\n </clr-dropdown-menu>\n</clr-dropdown>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }, { kind: "component", type: i1$1.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { kind: "component", type: i1$1.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }, { kind: "directive", type: i1$1.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { kind: "directive", type: i1$1.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "id"] }, { kind: "directive", type: ClrDropdownOverflowDirective, selector: "clr-dropdown-menu", inputs: ["clrDropdownMenuMaxHeight", "clrDropdownMenuItemMinHeight"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
|
|
882
886
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrFlowBar, decorators: [{
|
|
883
887
|
type: Component,
|
|
884
888
|
args: [{ selector: 'clr-flow-bar', host: {
|
|
@@ -989,7 +993,7 @@ class ClrGenericQuickList {
|
|
|
989
993
|
}
|
|
990
994
|
}
|
|
991
995
|
ClrGenericQuickList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrGenericQuickList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
992
|
-
ClrGenericQuickList.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrGenericQuickList, selector: "clr-generic-quick-list", inputs: { allItems: ["clrAllItems", "allItems"], addLabel: ["clrAddLabel", "addLabel"], addPossible: ["clrAddPossible", "addPossible"], blankItem: ["clrBlankItem", "blankItem"], controlClasses: ["clrControlClasses", "controlClasses"], required: ["clrMandatory", "required"], readonly: "readonly" }, outputs: { added: "clrAdded", removed: "clrRemoved" }, host: { properties: { "class.generic-quick-list": "true", "class.clr-form-control": "true" } }, queries: [{ propertyName: "itemTemplate", predicate: TemplateRef }], viewQueries: [{ propertyName: "itemRows", predicate: ["row"], descendants: true }], ngImport: i0, template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <ng-content select=\".header-container\"></ng-content>\n\n <ng-container *ngFor=\"let item of allItems\">\n <div class=\"controls-wrapper\">\n <div class=\"controls-container\" *ngIf=\"itemTemplate\" #row>\n <ng-container *ngTemplateOutlet=\"itemTemplate.get(0); context: {$implicit:item}\"></ng-container>\n </div>\n <button\n *ngIf=\"!(readonly || readonly === '')\"\n type=\"button\"\n class=\"btn btn-icon btn-link btn-trash\"\n [disabled]=\"required && allItems.length === 1\"\n (click)=\"removeItem(item)\"\n >\n <clr-icon shape=\"trash\"></clr-icon>\n </button>\n </div>\n </ng-container>\n\n <button\n *ngIf=\"!(readonly || readonly === '')\"\n type=\"button\"\n class=\"btn btn-link btn-sm btn-add\"\n (click)=\"addItem()\"\n [disabled]=\"!addPossible\"\n >\n {{addLabel}}\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type:
|
|
996
|
+
ClrGenericQuickList.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrGenericQuickList, selector: "clr-generic-quick-list", inputs: { allItems: ["clrAllItems", "allItems"], addLabel: ["clrAddLabel", "addLabel"], addPossible: ["clrAddPossible", "addPossible"], blankItem: ["clrBlankItem", "blankItem"], controlClasses: ["clrControlClasses", "controlClasses"], required: ["clrMandatory", "required"], readonly: "readonly" }, outputs: { added: "clrAdded", removed: "clrRemoved" }, host: { properties: { "class.generic-quick-list": "true", "class.clr-form-control": "true" } }, queries: [{ propertyName: "itemTemplate", predicate: TemplateRef }], viewQueries: [{ propertyName: "itemRows", predicate: ["row"], descendants: true }], ngImport: i0, template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <ng-content select=\".header-container\"></ng-content>\n\n <ng-container *ngFor=\"let item of allItems\">\n <div class=\"controls-wrapper\">\n <div class=\"controls-container\" *ngIf=\"itemTemplate\" #row>\n <ng-container *ngTemplateOutlet=\"itemTemplate.get(0); context: {$implicit:item}\"></ng-container>\n </div>\n <button\n *ngIf=\"!(readonly || readonly === '')\"\n type=\"button\"\n class=\"btn btn-icon btn-link btn-trash\"\n [disabled]=\"required && allItems.length === 1\"\n (click)=\"removeItem(item)\"\n >\n <clr-icon shape=\"trash\"></clr-icon>\n </button>\n </div>\n </ng-container>\n\n <button\n *ngIf=\"!(readonly || readonly === '')\"\n type=\"button\"\n class=\"btn btn-link btn-sm btn-add\"\n (click)=\"addItem()\"\n [disabled]=\"!addPossible\"\n >\n {{addLabel}}\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }] });
|
|
993
997
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrGenericQuickList, decorators: [{
|
|
994
998
|
type: Component,
|
|
995
999
|
args: [{ selector: 'clr-generic-quick-list', host: { '[class.generic-quick-list]': 'true', '[class.clr-form-control]': 'true' }, template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <ng-content select=\".header-container\"></ng-content>\n\n <ng-container *ngFor=\"let item of allItems\">\n <div class=\"controls-wrapper\">\n <div class=\"controls-container\" *ngIf=\"itemTemplate\" #row>\n <ng-container *ngTemplateOutlet=\"itemTemplate.get(0); context: {$implicit:item}\"></ng-container>\n </div>\n <button\n *ngIf=\"!(readonly || readonly === '')\"\n type=\"button\"\n class=\"btn btn-icon btn-link btn-trash\"\n [disabled]=\"required && allItems.length === 1\"\n (click)=\"removeItem(item)\"\n >\n <clr-icon shape=\"trash\"></clr-icon>\n </button>\n </div>\n </ng-container>\n\n <button\n *ngIf=\"!(readonly || readonly === '')\"\n type=\"button\"\n class=\"btn btn-link btn-sm btn-add\"\n (click)=\"addItem()\"\n [disabled]=\"!addPossible\"\n >\n {{addLabel}}\n </button>\n</div>\n" }]
|
|
@@ -1277,7 +1281,7 @@ class ClrMainNavGroup {
|
|
|
1277
1281
|
}
|
|
1278
1282
|
}
|
|
1279
1283
|
ClrMainNavGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrMainNavGroup, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1280
|
-
ClrMainNavGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrMainNavGroup, selector: "clr-main-nav-group", inputs: { title: ["clrTitle", "title"] }, host: { properties: { "class.main-nav-group": "true" } }, queries: [{ propertyName: "items", predicate: ClrMainNavGroupItem }], ngImport: i0, template: "<section\n class=\"nav-link collapsible\"\n (click)=\"onClick($event)\"\n (keydown.enter)=\"onClick($event)\"\n (keydown.space)=\"onClick($event)\"\n [class.active]=\"isActive()\"\n tabindex=\"0\"\n>\n <input id=\"{{prefix}}{{id}}\" type=\"checkbox\" [checked]=\"isChecked()\" />\n <label class=\"nav-text nav-trigger\" for=\"{{prefix}}{{id}}\">{{title}}<clr-icon shape=\"caret down\"></clr-icon></label>\n <div class=\"nav-list dropdown-menu\">\n <ng-content></ng-content>\n </div>\n</section>\n", dependencies: [{ kind: "directive", type:
|
|
1284
|
+
ClrMainNavGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrMainNavGroup, selector: "clr-main-nav-group", inputs: { title: ["clrTitle", "title"] }, host: { properties: { "class.main-nav-group": "true" } }, queries: [{ propertyName: "items", predicate: ClrMainNavGroupItem }], ngImport: i0, template: "<section\n class=\"nav-link collapsible\"\n (click)=\"onClick($event)\"\n (keydown.enter)=\"onClick($event)\"\n (keydown.space)=\"onClick($event)\"\n [class.active]=\"isActive()\"\n tabindex=\"0\"\n>\n <input id=\"{{prefix}}{{id}}\" type=\"checkbox\" [checked]=\"isChecked()\" />\n <label class=\"nav-text nav-trigger\" for=\"{{prefix}}{{id}}\">{{title}}<clr-icon shape=\"caret down\"></clr-icon></label>\n <div class=\"nav-list dropdown-menu\">\n <ng-content></ng-content>\n </div>\n</section>\n", dependencies: [{ kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i1$1.ClrLabel, selector: "label", inputs: ["for"] }] });
|
|
1281
1285
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrMainNavGroup, decorators: [{
|
|
1282
1286
|
type: Component,
|
|
1283
1287
|
args: [{ selector: 'clr-main-nav-group', host: { '[class.main-nav-group]': 'true' }, template: "<section\n class=\"nav-link collapsible\"\n (click)=\"onClick($event)\"\n (keydown.enter)=\"onClick($event)\"\n (keydown.space)=\"onClick($event)\"\n [class.active]=\"isActive()\"\n tabindex=\"0\"\n>\n <input id=\"{{prefix}}{{id}}\" type=\"checkbox\" [checked]=\"isChecked()\" />\n <label class=\"nav-text nav-trigger\" for=\"{{prefix}}{{id}}\">{{title}}<clr-icon shape=\"caret down\"></clr-icon></label>\n <div class=\"nav-list dropdown-menu\">\n <ng-content></ng-content>\n </div>\n</section>\n" }]
|
|
@@ -1694,7 +1698,7 @@ ClrMultilingualSelector.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
1694
1698
|
</clr-dropdown-menu>
|
|
1695
1699
|
</clr-dropdown>
|
|
1696
1700
|
</div>
|
|
1697
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
1701
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i1$1.ClrIfOpen, selector: "[clrIfOpen]", inputs: ["clrIfOpen"], outputs: ["clrIfOpenChange"] }, { kind: "component", type: i1$1.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { kind: "component", type: i1$1.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }, { kind: "directive", type: i1$1.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { kind: "directive", type: i1$1.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "id"] }, { kind: "directive", type: ClrDropdownOverflowDirective, selector: "clr-dropdown-menu", inputs: ["clrDropdownMenuMaxHeight", "clrDropdownMenuItemMinHeight"] }, { kind: "pipe", type: i1.KeyValuePipe, name: "keyvalue" }] });
|
|
1698
1702
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrMultilingualSelector, decorators: [{
|
|
1699
1703
|
type: Component,
|
|
1700
1704
|
args: [{
|
|
@@ -1756,7 +1760,7 @@ ClrMultilingualInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
1756
1760
|
multi: true,
|
|
1757
1761
|
},
|
|
1758
1762
|
ControlIdService,
|
|
1759
|
-
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <clr-multilingual-selector\n *ngIf=\"showLanguageSelector()\"\n [disabled]=\"disabled\"\n [texts]=\"shownTexts\"\n [selectedLang]=\"selectedLang\"\n (selectedLangChange)=\"changeLanguage($event)\"\n >\n </clr-multilingual-selector>\n <div class=\"clr-multi-input-wrapper\">\n <div class=\"clr-input-wrapper\">\n <input\n class=\"clr-input\"\n type=\"text\"\n [id]=\"inputId\"\n [ngModel]=\"!!shownTexts && !!selectedLang ? shownTexts.get(selectedLang) : ''\"\n (ngModelChange)=\"setText(selectedLang, $event)\"\n (blur)=\"onTouch()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readonly === ''\"\n autocomplete=\"off\"\n [maxlength]=\"maxlength || null\"\n #input\n />\n <clr-icon *ngIf=\"showError\" class=\"clr-validate-icon\" shape=\"exclamation-circle\" aria-hidden=\"true\"></clr-icon>\n </div>\n <ng-content select=\"clr-control-helper\" *ngIf=\"!showError\"></ng-content>\n <ng-content select=\"clr-control-error\" *ngIf=\"showError\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
1763
|
+
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <clr-multilingual-selector\n *ngIf=\"showLanguageSelector()\"\n [disabled]=\"disabled\"\n [texts]=\"shownTexts\"\n [selectedLang]=\"selectedLang\"\n (selectedLangChange)=\"changeLanguage($event)\"\n >\n </clr-multilingual-selector>\n <div class=\"clr-multi-input-wrapper\">\n <div class=\"clr-input-wrapper\">\n <input\n class=\"clr-input\"\n type=\"text\"\n [id]=\"inputId\"\n [ngModel]=\"!!shownTexts && !!selectedLang ? shownTexts.get(selectedLang) : ''\"\n (ngModelChange)=\"setText(selectedLang, $event)\"\n (blur)=\"onTouch()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readonly === ''\"\n autocomplete=\"off\"\n [maxlength]=\"maxlength || null\"\n #input\n />\n <clr-icon *ngIf=\"showError\" class=\"clr-validate-icon\" shape=\"exclamation-circle\" aria-hidden=\"true\"></clr-icon>\n </div>\n <ng-content select=\"clr-control-helper\" *ngIf=\"!showError\"></ng-content>\n <ng-content select=\"clr-control-error\" *ngIf=\"showError\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ClrMultilingualSelector, selector: "clr-multilingual-selector", inputs: ["disabled", "texts", "selectedLang"], outputs: ["selectedLangChange"] }] });
|
|
1760
1764
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrMultilingualInput, decorators: [{
|
|
1761
1765
|
type: Component,
|
|
1762
1766
|
args: [{ selector: 'clr-multilingual-input', providers: [
|
|
@@ -1787,7 +1791,7 @@ ClrMultilingualTextarea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
1787
1791
|
multi: true,
|
|
1788
1792
|
},
|
|
1789
1793
|
ControlIdService,
|
|
1790
|
-
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <clr-multilingual-selector\n *ngIf=\"showLanguageSelector()\"\n [disabled]=\"disabled\"\n [texts]=\"shownTexts\"\n [selectedLang]=\"selectedLang\"\n (selectedLangChange)=\"changeLanguage($event)\"\n >\n </clr-multilingual-selector>\n <div class=\"clr-multi-input-wrapper\">\n <div class=\"clr-textarea-wrapper\">\n <textarea\n class=\"clr-textarea\"\n [id]=\"inputId\"\n [ngModel]=\"!!shownTexts && !!selectedLang ? shownTexts.get(selectedLang) : ''\"\n (ngModelChange)=\"setText(selectedLang, $event)\"\n (blur)=\"onTouch()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readonly === ''\"\n [maxlength]=\"maxlength || null\"\n [rows]=\"rows || 1\"\n #input\n ></textarea>\n <clr-icon *ngIf=\"showError\" class=\"clr-validate-icon\" shape=\"exclamation-circle\" aria-hidden=\"true\"></clr-icon>\n </div>\n <ng-content select=\"clr-control-helper\" *ngIf=\"!showError\"></ng-content>\n <ng-content select=\"clr-control-error\" *ngIf=\"showError\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
1794
|
+
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"label\"></ng-content>\n<div class=\"clr-control-container\" [ngClass]=\"controlClasses\">\n <clr-multilingual-selector\n *ngIf=\"showLanguageSelector()\"\n [disabled]=\"disabled\"\n [texts]=\"shownTexts\"\n [selectedLang]=\"selectedLang\"\n (selectedLangChange)=\"changeLanguage($event)\"\n >\n </clr-multilingual-selector>\n <div class=\"clr-multi-input-wrapper\">\n <div class=\"clr-textarea-wrapper\">\n <textarea\n class=\"clr-textarea\"\n [id]=\"inputId\"\n [ngModel]=\"!!shownTexts && !!selectedLang ? shownTexts.get(selectedLang) : ''\"\n (ngModelChange)=\"setText(selectedLang, $event)\"\n (blur)=\"onTouch()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readonly === ''\"\n [maxlength]=\"maxlength || null\"\n [rows]=\"rows || 1\"\n #input\n ></textarea>\n <clr-icon *ngIf=\"showError\" class=\"clr-validate-icon\" shape=\"exclamation-circle\" aria-hidden=\"true\"></clr-icon>\n </div>\n <ng-content select=\"clr-control-helper\" *ngIf=\"!showError\"></ng-content>\n <ng-content select=\"clr-control-error\" *ngIf=\"showError\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ClrMultilingualSelector, selector: "clr-multilingual-selector", inputs: ["disabled", "texts", "selectedLang"], outputs: ["selectedLangChange"] }] });
|
|
1791
1795
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrMultilingualTextarea, decorators: [{
|
|
1792
1796
|
type: Component,
|
|
1793
1797
|
args: [{ selector: 'clr-multilingual-textarea', providers: [
|
|
@@ -1961,7 +1965,7 @@ class ClrNotification {
|
|
|
1961
1965
|
}
|
|
1962
1966
|
}
|
|
1963
1967
|
ClrNotification.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrNotification, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1964
|
-
ClrNotification.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrNotification, selector: "clr-notification", inputs: { timeout: "timeout", notificationType: "notificationType", dismissable: "dismissable", progressbar: "progressbar" }, outputs: { closed: "closed" }, host: { properties: { "class.notification": "true" } }, viewQueries: [{ propertyName: "clrAlert", first: true, predicate: ClrAlert, descendants: true, static: true }], ngImport: i0, template: "<div class=\"notification__wrapper\" [@slideDown] [@move]=\"state\" [@fade]=\"state\">\n <div class=\"progress top\" [ngClass]=\"notificationType\" *ngIf=\"progressbar && timeout > 0\">\n <progress class=\"progress\" [max]=\"timeout\" [value]=\"progressStatus\"></progress>\n </div>\n <clr-alert\n [clrAlertType]=\"notificationType\"\n [clrAlertAppLevel]=\"true\"\n [clrAlertClosable]=\"dismissable\"\n (clrAlertClosedChange)=\"close()\"\n >\n <div class=\"alert-item\">\n <span class=\"alert-text\">\n <ng-content select=\"[clr-notification-message]\"></ng-content>\n </span>\n </div>\n </clr-alert>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type:
|
|
1968
|
+
ClrNotification.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrNotification, selector: "clr-notification", inputs: { timeout: "timeout", notificationType: "notificationType", dismissable: "dismissable", progressbar: "progressbar" }, outputs: { closed: "closed" }, host: { properties: { "class.notification": "true" } }, viewQueries: [{ propertyName: "clrAlert", first: true, predicate: ClrAlert, descendants: true, static: true }], ngImport: i0, template: "<div class=\"notification__wrapper\" [@slideDown] [@move]=\"state\" [@fade]=\"state\">\n <div class=\"progress top\" [ngClass]=\"notificationType\" *ngIf=\"progressbar && timeout > 0\">\n <progress class=\"progress\" [max]=\"timeout\" [value]=\"progressStatus\"></progress>\n </div>\n <clr-alert\n [clrAlertType]=\"notificationType\"\n [clrAlertAppLevel]=\"true\"\n [clrAlertClosable]=\"dismissable\"\n (clrAlertClosedChange)=\"close()\"\n >\n <div class=\"alert-item\">\n <span class=\"alert-text\">\n <ng-content select=\"[clr-notification-message]\"></ng-content>\n </span>\n </div>\n </clr-alert>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$1.ClrAlert, selector: "clr-alert", inputs: ["clrAlertSizeSmall", "clrAlertClosable", "clrAlertAppLevel", "clrCloseButtonAriaLabel", "clrAlertClosed", "clrAlertType", "clrAlertIcon"], outputs: ["clrAlertClosedChange"] }, { kind: "directive", type: i1$1.ClrAlertText, selector: ".alert-text" }], animations: [
|
|
1965
1969
|
trigger('slideDown', [
|
|
1966
1970
|
transition(':enter', [
|
|
1967
1971
|
style({ transform: 'translateY(-200%)' }),
|
|
@@ -2671,7 +2675,7 @@ class ClrPager {
|
|
|
2671
2675
|
}
|
|
2672
2676
|
}
|
|
2673
2677
|
ClrPager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrPager, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2674
|
-
ClrPager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrPager, selector: "clr-pager", inputs: { pageSize: ["clrPageSize", "pageSize"], totalItems: ["clrTotalItems", "totalItems"], last: ["clrLast", "last"], page: ["clrPage", "page"] }, outputs: { pageChange: "clrPageChange" }, host: { properties: { "class.pager": "true" } }, ngImport: i0, template: "<div class=\"btn-group\" *ngIf=\"last > 1\">\n <button class=\"btn pagination-previous\" (click)=\"previous()\" [disabled]=\"page == 1\">\n <clr-icon shape=\"angle left\"></clr-icon>\n </button>\n <button *ngIf=\"page > 2\" class=\"btn\" (click)=\"page = 1\">1</button>\n <button *ngIf=\"page > 3\" class=\"btn\" disabled>...</button>\n\n <ng-container *ngFor=\"let pageNum of middlePages\">\n <button *ngIf=\"pageNum !== page; else activePage\" class=\"btn\" (click)=\"page = pageNum\">{{pageNum}}</button>\n <ng-template #activePage>\n <button class=\"btn btn-primary\" type=\"button\">{{pageNum}}</button>\n </ng-template>\n </ng-container>\n\n <button *ngIf=\"page < last - 2\" class=\"btn\" disabled>...</button>\n <button *ngIf=\"page < last - 1\" class=\"btn\" (click)=\"page = last\">{{last}}</button>\n <button class=\"btn pagination-next\" (click)=\"next()\" [disabled]=\"page == last\">\n <clr-icon shape=\"angle right\"></clr-icon>\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
2678
|
+
ClrPager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrPager, selector: "clr-pager", inputs: { pageSize: ["clrPageSize", "pageSize"], totalItems: ["clrTotalItems", "totalItems"], last: ["clrLast", "last"], page: ["clrPage", "page"] }, outputs: { pageChange: "clrPageChange" }, host: { properties: { "class.pager": "true" } }, ngImport: i0, template: "<div class=\"btn-group\" *ngIf=\"last > 1\">\n <button class=\"btn pagination-previous\" (click)=\"previous()\" [disabled]=\"page == 1\">\n <clr-icon shape=\"angle left\"></clr-icon>\n </button>\n <button *ngIf=\"page > 2\" class=\"btn\" (click)=\"page = 1\">1</button>\n <button *ngIf=\"page > 3\" class=\"btn\" disabled>...</button>\n\n <ng-container *ngFor=\"let pageNum of middlePages\">\n <button *ngIf=\"pageNum !== page; else activePage\" class=\"btn\" (click)=\"page = pageNum\">{{pageNum}}</button>\n <ng-template #activePage>\n <button class=\"btn btn-primary\" type=\"button\">{{pageNum}}</button>\n </ng-template>\n </ng-container>\n\n <button *ngIf=\"page < last - 2\" class=\"btn\" disabled>...</button>\n <button *ngIf=\"page < last - 1\" class=\"btn\" (click)=\"page = last\">{{last}}</button>\n <button class=\"btn pagination-next\" (click)=\"next()\" [disabled]=\"page == last\">\n <clr-icon shape=\"angle right\"></clr-icon>\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }] });
|
|
2675
2679
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrPager, decorators: [{
|
|
2676
2680
|
type: Component,
|
|
2677
2681
|
args: [{ selector: 'clr-pager', host: { '[class.pager]': 'true' }, template: "<div class=\"btn-group\" *ngIf=\"last > 1\">\n <button class=\"btn pagination-previous\" (click)=\"previous()\" [disabled]=\"page == 1\">\n <clr-icon shape=\"angle left\"></clr-icon>\n </button>\n <button *ngIf=\"page > 2\" class=\"btn\" (click)=\"page = 1\">1</button>\n <button *ngIf=\"page > 3\" class=\"btn\" disabled>...</button>\n\n <ng-container *ngFor=\"let pageNum of middlePages\">\n <button *ngIf=\"pageNum !== page; else activePage\" class=\"btn\" (click)=\"page = pageNum\">{{pageNum}}</button>\n <ng-template #activePage>\n <button class=\"btn btn-primary\" type=\"button\">{{pageNum}}</button>\n </ng-template>\n </ng-container>\n\n <button *ngIf=\"page < last - 2\" class=\"btn\" disabled>...</button>\n <button *ngIf=\"page < last - 1\" class=\"btn\" (click)=\"page = last\">{{last}}</button>\n <button class=\"btn pagination-next\" (click)=\"next()\" [disabled]=\"page == last\">\n <clr-icon shape=\"angle right\"></clr-icon>\n </button>\n</div>\n" }]
|
|
@@ -2909,7 +2913,7 @@ class ClrAddOption {
|
|
|
2909
2913
|
}
|
|
2910
2914
|
}
|
|
2911
2915
|
ClrAddOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddOption, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2912
|
-
ClrAddOption.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrAddOption, selector: "clr-add-option", inputs: { blankOption: "blankOption", value: "value", mandatory: "mandatory", allValues: "allValues", excludedValues: "excludedValues", readonly: "readonly", disabled: "disabled" }, outputs: { valueChanged: "valueChanged", remove: "remove" }, host: { properties: { "class.quick-list-option": "true" } }, viewQueries: [{ propertyName: "select", first: true, predicate: ["select"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"!(readonly || readonly === ''); else readonlyView\" class=\"clr-select-wrapper quick-list-input\">\n <select #select clr-select class=\"quick-list-select\" name=\"options\" [(ngModel)]=\"selectedValue\" [disabled]=\"disabled\">\n <option *ngIf=\"blankOption.id === selectedValue\" [selected]=\"true\" [disabled]=\"true\" [ngValue]=\"blankOption.id\">\n {{blankOption.label}}\n </option>\n <option *ngFor=\"let val of getValues()\" [selected]=\"val.id === selectedValue\" [ngValue]=\"val.id\">\n {{val.label}}\n </option>\n </select>\n</div>\n\n<ng-template #readonlyView>\n <span>{{value.label}}</span>\n</ng-template>\n\n<button\n *ngIf=\"!(readonly || readonly === '')\"\n type=\"button\"\n class=\"btn btn-icon btn-link quick-list-trash\"\n [disabled]=\"trashDisabled() || disabled\"\n (click)=\"remove.emit()\"\n>\n <clr-icon shape=\"trash\"></clr-icon>\n</button>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type:
|
|
2916
|
+
ClrAddOption.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrAddOption, selector: "clr-add-option", inputs: { blankOption: "blankOption", value: "value", mandatory: "mandatory", allValues: "allValues", excludedValues: "excludedValues", readonly: "readonly", disabled: "disabled" }, outputs: { valueChanged: "valueChanged", remove: "remove" }, host: { properties: { "class.quick-list-option": "true" } }, viewQueries: [{ propertyName: "select", first: true, predicate: ["select"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"!(readonly || readonly === ''); else readonlyView\" class=\"clr-select-wrapper quick-list-input\">\n <select #select clr-select class=\"quick-list-select\" name=\"options\" [(ngModel)]=\"selectedValue\" [disabled]=\"disabled\">\n <option *ngIf=\"blankOption.id === selectedValue\" [selected]=\"true\" [disabled]=\"true\" [ngValue]=\"blankOption.id\">\n {{blankOption.label}}\n </option>\n <option *ngFor=\"let val of getValues()\" [selected]=\"val.id === selectedValue\" [ngValue]=\"val.id\">\n {{val.label}}\n </option>\n </select>\n</div>\n\n<ng-template #readonlyView>\n <span>{{value.label}}</span>\n</ng-template>\n\n<button\n *ngIf=\"!(readonly || readonly === '')\"\n type=\"button\"\n class=\"btn btn-icon btn-link quick-list-trash\"\n [disabled]=\"trashDisabled() || disabled\"\n (click)=\"remove.emit()\"\n>\n <clr-icon shape=\"trash\"></clr-icon>\n</button>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }] });
|
|
2913
2917
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddOption, decorators: [{
|
|
2914
2918
|
type: Component,
|
|
2915
2919
|
args: [{ selector: 'clr-add-option', host: { '[class.quick-list-option]': 'true' }, template: "<div *ngIf=\"!(readonly || readonly === ''); else readonlyView\" class=\"clr-select-wrapper quick-list-input\">\n <select #select clr-select class=\"quick-list-select\" name=\"options\" [(ngModel)]=\"selectedValue\" [disabled]=\"disabled\">\n <option *ngIf=\"blankOption.id === selectedValue\" [selected]=\"true\" [disabled]=\"true\" [ngValue]=\"blankOption.id\">\n {{blankOption.label}}\n </option>\n <option *ngFor=\"let val of getValues()\" [selected]=\"val.id === selectedValue\" [ngValue]=\"val.id\">\n {{val.label}}\n </option>\n </select>\n</div>\n\n<ng-template #readonlyView>\n <span>{{value.label}}</span>\n</ng-template>\n\n<button\n *ngIf=\"!(readonly || readonly === '')\"\n type=\"button\"\n class=\"btn btn-icon btn-link quick-list-trash\"\n [disabled]=\"trashDisabled() || disabled\"\n (click)=\"remove.emit()\"\n>\n <clr-icon shape=\"trash\"></clr-icon>\n</button>\n" }]
|
|
@@ -3225,7 +3229,7 @@ class ClrTreetableActionOverflow {
|
|
|
3225
3229
|
this.destroyed$.complete();
|
|
3226
3230
|
}
|
|
3227
3231
|
}
|
|
3228
|
-
ClrTreetableActionOverflow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrTreetableActionOverflow, deps: [{ token:
|
|
3232
|
+
ClrTreetableActionOverflow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrTreetableActionOverflow, deps: [{ token: i1$1.ClrPopoverToggleService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
3229
3233
|
ClrTreetableActionOverflow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrTreetableActionOverflow, selector: "clr-tt-action-overflow", inputs: { empty: "empty" }, host: { attributes: { "role": "cell" }, properties: { "class.treetable-row-actions": "true", "class.treetable-cell": "true" } }, providers: [ClrPopoverToggleService, ClrPopoverEventsService, ClrPopoverPositionService], ngImport: i0, template: `
|
|
3230
3234
|
<ng-container *ngIf="!empty">
|
|
3231
3235
|
<button class="treetable-action-trigger" clrPopoverAnchor clrPopoverOpenCloseButton>
|
|
@@ -3240,7 +3244,7 @@ ClrTreetableActionOverflow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
3240
3244
|
<ng-content></ng-content>
|
|
3241
3245
|
</div>
|
|
3242
3246
|
</ng-container>
|
|
3243
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
3247
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i1$1.ClrPopoverAnchor, selector: "[clrPopoverAnchor]" }, { kind: "directive", type: i1$1.ÇlrClrPopoverOpenCloseButton, selector: "[clrPopoverOpenCloseButton]", outputs: ["clrPopoverOpenCloseChange"] }, { kind: "directive", type: i1$1.ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose"] }] });
|
|
3244
3248
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrTreetableActionOverflow, decorators: [{
|
|
3245
3249
|
type: Component,
|
|
3246
3250
|
args: [{
|
|
@@ -3267,7 +3271,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
3267
3271
|
role: 'cell',
|
|
3268
3272
|
},
|
|
3269
3273
|
}]
|
|
3270
|
-
}], ctorParameters: function () { return [{ type:
|
|
3274
|
+
}], ctorParameters: function () { return [{ type: i1$1.ClrPopoverToggleService }, { type: i0.NgZone }]; }, propDecorators: { empty: [{
|
|
3271
3275
|
type: Input
|
|
3272
3276
|
}] } });
|
|
3273
3277
|
|
|
@@ -3319,7 +3323,7 @@ class ClrTreetableRow {
|
|
|
3319
3323
|
}
|
|
3320
3324
|
}
|
|
3321
3325
|
ClrTreetableRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrTreetableRow, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3322
|
-
ClrTreetableRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrTreetableRow, selector: "clr-tt-row", inputs: { expanded: ["clrExpanded", "expanded"], clickable: ["clrClickable", "clickable"], clrExpandable: "clrExpandable" }, outputs: { hasActionOverflow: "hasActionOverflow", expandedChange: "clrExpandedChange" }, host: { properties: { "class.treetable-row-wrapper": "true" } }, queries: [{ propertyName: "actionOverflow", first: true, predicate: ClrTreetableActionOverflow, descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2018-2021 Porsche Informatik. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n [ngClass]=\"{'clr-row-clickable': clickable && expandable}\"\n class=\"clr-tt-node-content treetable-row\"\n (click)=\"onRowClick($event)\"\n>\n <ng-content select=\"clr-tt-action-overflow\"></ng-content>\n <clr-tt-action-overflow *ngIf=\"showActionOverflow && showEmptyActionOverflow\" [empty]=\"true\"></clr-tt-action-overflow>\n <div class=\"treetable-scrolling-cells\">\n <div class=\"treetable-expandable-caret\" *ngIf=\"isExpandable()\">\n <button type=\"button\" class=\"treetable-expandable-caret-button\" (click)=\"onCaretClick()\">\n <clr-icon\n shape=\"caret\"\n [attr.dir]=\"expanded ? 'down' : 'right'\"\n class=\"treetable-expandable-caret-icon\"\n ></clr-icon>\n </button>\n </div>\n\n <ng-content select=\"clr-tt-cell\"></ng-content>\n </div>\n</div>\n<div [@collapseExpandAnimation]=\"expanded\">\n <ng-content select=\"clr-tt-row\"></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
3326
|
+
ClrTreetableRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrTreetableRow, selector: "clr-tt-row", inputs: { expanded: ["clrExpanded", "expanded"], clickable: ["clrClickable", "clickable"], clrExpandable: "clrExpandable" }, outputs: { hasActionOverflow: "hasActionOverflow", expandedChange: "clrExpandedChange" }, host: { properties: { "class.treetable-row-wrapper": "true" } }, queries: [{ propertyName: "actionOverflow", first: true, predicate: ClrTreetableActionOverflow, descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2018-2021 Porsche Informatik. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n [ngClass]=\"{'clr-row-clickable': clickable && expandable}\"\n class=\"clr-tt-node-content treetable-row\"\n (click)=\"onRowClick($event)\"\n>\n <ng-content select=\"clr-tt-action-overflow\"></ng-content>\n <clr-tt-action-overflow *ngIf=\"showActionOverflow && showEmptyActionOverflow\" [empty]=\"true\"></clr-tt-action-overflow>\n <div class=\"treetable-scrolling-cells\">\n <div class=\"treetable-expandable-caret\" *ngIf=\"isExpandable()\">\n <button type=\"button\" class=\"treetable-expandable-caret-button\" (click)=\"onCaretClick()\">\n <clr-icon\n shape=\"caret\"\n [attr.dir]=\"expanded ? 'down' : 'right'\"\n class=\"treetable-expandable-caret-icon\"\n ></clr-icon>\n </button>\n </div>\n\n <ng-content select=\"clr-tt-cell\"></ng-content>\n </div>\n</div>\n<div [@collapseExpandAnimation]=\"expanded\">\n <ng-content select=\"clr-tt-row\"></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }, { kind: "component", type: ClrTreetableActionOverflow, selector: "clr-tt-action-overflow", inputs: ["empty"] }], animations: [
|
|
3323
3327
|
trigger('collapseExpandAnimation', [
|
|
3324
3328
|
state('false', style({ display: 'none' })),
|
|
3325
3329
|
state('true', style({ display: 'block' })),
|
|
@@ -3800,7 +3804,7 @@ class ClrViewEditSection {
|
|
|
3800
3804
|
}
|
|
3801
3805
|
}
|
|
3802
3806
|
ClrViewEditSection.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrViewEditSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3803
|
-
ClrViewEditSection.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrViewEditSection, selector: "clr-view-edit-section", inputs: { _title: ["clrTitle", "_title"], _saveText: ["clrSaveText", "_saveText"], _preventSave: ["clrPreventModeChangeOnSave", "_preventSave"], _cancelText: ["clrCancelText", "_cancelText"], _editable: ["clrEditable", "_editable"], _editIcon: ["clrEditIcon", "_editIcon"], _isCollapsible: ["clrIsCollapsible", "_isCollapsible"], _isCollapsed: ["clrIsCollapsed", "_isCollapsed"], viewRef: ["clrViewRef", "viewRef"], editRef: ["clrEditRef", "editRef"], editMode: ["clrEditMode", "editMode"] }, outputs: { _isCollapsedChange: "clrIsCollapsedChange", _editModeChanged: "clrEditModeChange", _submitted: "clrSectionSubmitted", _cancelled: "clrSectionEditCancelled" }, ngImport: i0, template: "<div class=\"card view-edit-section\" (keyup.escape)=\"onCancel()\">\n <div class=\"card-block\">\n <div class=\"card-title\">\n {{_title}}\n <button\n type=\"button\"\n (click)=\"onCollapseExpand()\"\n class=\"btn btn-icon btn-link ces-caret-btn\"\n *ngIf=\"_isCollapsible && !editMode\"\n >\n <clr-icon shape=\"caret up\" size=\"20\" class=\"ces-caret-icon\" [@rotateIcon]=\"_isCollapsed\"></clr-icon>\n </button>\n <div class=\"ves-actions\">\n <button\n type=\"button\"\n (click)=\"onEdit()\"\n class=\"btn btn-icon btn-link ves-action\"\n *ngIf=\"_editable && !editMode && actionBlock.children.length == 0\"\n >\n <clr-icon class=\"ves-edit-icon\" [attr.shape]=\"_editIcon\" size=\"20\"></clr-icon>\n </button>\n <div #actionBlock>\n <ng-content select=\"[action-block]\"></ng-content>\n </div>\n </div>\n </div>\n <div class=\"card-text\" [@collapseExpandAnimation] *ngIf=\"!(_isCollapsed && _isCollapsible)\">\n <ng-template [ngTemplateOutlet]=\"viewRef\" *ngIf=\"!editMode\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"editRef\" *ngIf=\"editMode\"></ng-template>\n <ng-container *ngIf=\"editMode\">\n <form clrForm (ngSubmit)=\"onSubmit()\" class=\"button-bar\">\n <button class=\"btn btn-primary ves-save\" type=\"submit\">{{_saveText}}</button>\n <button class=\"btn ves-cancel\" (click)=\"onCancel()\" type=\"button\">{{_cancelText}}</button>\n </form>\n </ng-container>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type:
|
|
3807
|
+
ClrViewEditSection.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrViewEditSection, selector: "clr-view-edit-section", inputs: { _title: ["clrTitle", "_title"], _saveText: ["clrSaveText", "_saveText"], _preventSave: ["clrPreventModeChangeOnSave", "_preventSave"], _cancelText: ["clrCancelText", "_cancelText"], _editable: ["clrEditable", "_editable"], _editIcon: ["clrEditIcon", "_editIcon"], _isCollapsible: ["clrIsCollapsible", "_isCollapsible"], _isCollapsed: ["clrIsCollapsed", "_isCollapsed"], viewRef: ["clrViewRef", "viewRef"], editRef: ["clrEditRef", "editRef"], editMode: ["clrEditMode", "editMode"] }, outputs: { _isCollapsedChange: "clrIsCollapsedChange", _editModeChanged: "clrEditModeChange", _submitted: "clrSectionSubmitted", _cancelled: "clrSectionEditCancelled" }, ngImport: i0, template: "<div class=\"card view-edit-section\" (keyup.escape)=\"onCancel()\">\n <div class=\"card-block\">\n <div class=\"card-title\">\n {{_title}}\n <button\n type=\"button\"\n (click)=\"onCollapseExpand()\"\n class=\"btn btn-icon btn-link ces-caret-btn\"\n *ngIf=\"_isCollapsible && !editMode\"\n >\n <clr-icon shape=\"caret up\" size=\"20\" class=\"ces-caret-icon\" [@rotateIcon]=\"_isCollapsed\"></clr-icon>\n </button>\n <div class=\"ves-actions\">\n <button\n type=\"button\"\n (click)=\"onEdit()\"\n class=\"btn btn-icon btn-link ves-action\"\n *ngIf=\"_editable && !editMode && actionBlock.children.length == 0\"\n >\n <clr-icon class=\"ves-edit-icon\" [attr.shape]=\"_editIcon\" size=\"20\"></clr-icon>\n </button>\n <div #actionBlock>\n <ng-content select=\"[action-block]\"></ng-content>\n </div>\n </div>\n </div>\n <div class=\"card-text\" [@collapseExpandAnimation] *ngIf=\"!(_isCollapsed && _isCollapsible)\">\n <ng-template [ngTemplateOutlet]=\"viewRef\" *ngIf=\"!editMode\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"editRef\" *ngIf=\"editMode\"></ng-template>\n <ng-container *ngIf=\"editMode\">\n <form clrForm (ngSubmit)=\"onSubmit()\" class=\"button-bar\">\n <button class=\"btn btn-primary ves-save\" type=\"submit\">{{_saveText}}</button>\n <button class=\"btn ves-cancel\" (click)=\"onCancel()\" type=\"button\">{{_cancelText}}</button>\n </form>\n </ng-container>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i1$1.ClrForm, selector: "[clrForm]", inputs: ["clrLabelSize"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], animations: [
|
|
3804
3808
|
trigger('collapseExpandAnimation', [
|
|
3805
3809
|
transition(':enter', [
|
|
3806
3810
|
style({ opacity: 0, height: 0, overflow: 'hidden' }),
|
|
@@ -4150,7 +4154,7 @@ class ClrHistory {
|
|
|
4150
4154
|
}
|
|
4151
4155
|
}
|
|
4152
4156
|
ClrHistory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrHistory, deps: [{ token: ClrHistoryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4153
|
-
ClrHistory.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrHistory, selector: "clr-history", inputs: { username: ["clrUsername", "username"], context: ["clrContext", "context"], pinActive: ["clrPinActive", "pinActive"], dropdownHeader: ["clrDropdownHeader", "dropdownHeader"], dropdownPin: ["clrDropdownPin", "dropdownPin"], dropdownUnpin: ["clrDropdownUnpin", "dropdownUnpin"], domain: ["clrDomain", "domain"], position: ["clrPosition", "position"] }, ngImport: i0, template: "<clr-dropdown>\n <button type=\"button\" class=\"btn btn-icon btn-link\" clrDropdownTrigger>\n <clr-icon shape=\"history\" size=\"24\"></clr-icon>\n <clr-icon shape=\"caret down\" size=\"12\"></clr-icon>\n </button>\n <clr-dropdown-menu [clrPosition]=\"position\" *clrIfOpen>\n <label class=\"dropdown-header\" aria-hidden=\"true\">{{dropdownHeader}}</label>\n <button type=\"button\" clrDropdownItem *ngFor=\"let history of historyElements\" (click)=\"select(history)\">\n {{history.title}}\n </button>\n <div *ngIf=\"pinActive\" class=\"dropdown-divider\" role=\"separator\" aria-hidden=\"true\"></div>\n <button clrDropdownItem (click)=\"togglePinHistory()\">\n <span *ngIf=\"pinActive && !pinActivated\">{{dropdownPin}}</span>\n <span *ngIf=\"pinActive && pinActivated\">{{dropdownUnpin}}</span>\n </button>\n </clr-dropdown-menu>\n</clr-dropdown>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
4157
|
+
ClrHistory.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrHistory, selector: "clr-history", inputs: { username: ["clrUsername", "username"], context: ["clrContext", "context"], pinActive: ["clrPinActive", "pinActive"], dropdownHeader: ["clrDropdownHeader", "dropdownHeader"], dropdownPin: ["clrDropdownPin", "dropdownPin"], dropdownUnpin: ["clrDropdownUnpin", "dropdownUnpin"], domain: ["clrDomain", "domain"], position: ["clrPosition", "position"] }, ngImport: i0, template: "<clr-dropdown>\n <button type=\"button\" class=\"btn btn-icon btn-link\" clrDropdownTrigger>\n <clr-icon shape=\"history\" size=\"24\"></clr-icon>\n <clr-icon shape=\"caret down\" size=\"12\"></clr-icon>\n </button>\n <clr-dropdown-menu [clrPosition]=\"position\" *clrIfOpen>\n <label class=\"dropdown-header\" aria-hidden=\"true\">{{dropdownHeader}}</label>\n <button type=\"button\" clrDropdownItem *ngFor=\"let history of historyElements\" (click)=\"select(history)\">\n {{history.title}}\n </button>\n <div *ngIf=\"pinActive\" class=\"dropdown-divider\" role=\"separator\" aria-hidden=\"true\"></div>\n <button clrDropdownItem (click)=\"togglePinHistory()\">\n <span *ngIf=\"pinActive && !pinActivated\">{{dropdownPin}}</span>\n <span *ngIf=\"pinActive && pinActivated\">{{dropdownUnpin}}</span>\n </button>\n </clr-dropdown-menu>\n</clr-dropdown>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i1$1.ClrIfOpen, selector: "[clrIfOpen]", inputs: ["clrIfOpen"], outputs: ["clrIfOpenChange"] }, { kind: "directive", type: i1$1.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "component", type: i1$1.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { kind: "component", type: i1$1.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }, { kind: "directive", type: i1$1.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { kind: "directive", type: i1$1.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "id"] }, { kind: "directive", type: ClrDropdownOverflowDirective, selector: "clr-dropdown-menu", inputs: ["clrDropdownMenuMaxHeight", "clrDropdownMenuItemMinHeight"] }] });
|
|
4154
4158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrHistory, decorators: [{
|
|
4155
4159
|
type: Component,
|
|
4156
4160
|
args: [{ selector: 'clr-history', template: "<clr-dropdown>\n <button type=\"button\" class=\"btn btn-icon btn-link\" clrDropdownTrigger>\n <clr-icon shape=\"history\" size=\"24\"></clr-icon>\n <clr-icon shape=\"caret down\" size=\"12\"></clr-icon>\n </button>\n <clr-dropdown-menu [clrPosition]=\"position\" *clrIfOpen>\n <label class=\"dropdown-header\" aria-hidden=\"true\">{{dropdownHeader}}</label>\n <button type=\"button\" clrDropdownItem *ngFor=\"let history of historyElements\" (click)=\"select(history)\">\n {{history.title}}\n </button>\n <div *ngIf=\"pinActive\" class=\"dropdown-divider\" role=\"separator\" aria-hidden=\"true\"></div>\n <button clrDropdownItem (click)=\"togglePinHistory()\">\n <span *ngIf=\"pinActive && !pinActivated\">{{dropdownPin}}</span>\n <span *ngIf=\"pinActive && pinActivated\">{{dropdownUnpin}}</span>\n </button>\n </clr-dropdown-menu>\n</clr-dropdown>\n" }]
|
|
@@ -4322,7 +4326,7 @@ class ClrBrandAvatar {
|
|
|
4322
4326
|
}
|
|
4323
4327
|
ClrBrandAvatar.DEFAULT_ICON_SHAPE = 'new-car-private';
|
|
4324
4328
|
ClrBrandAvatar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrBrandAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4325
|
-
ClrBrandAvatar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrBrandAvatar, selector: "clr-brand-avatar", inputs: { brand: ["clrBrand", "brand"] }, host: { properties: { "class.clr-brand-avatar": "this.avatar" } }, viewQueries: [{ propertyName: "avatarElement", first: true, predicate: ["avatar"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"brand-avatar-rectangle\">\n <div #avatar class=\"brand-avatar-icon-container\">\n <clr-icon [attr.size]=\"23\" [attr.shape]=\"getShape()\"></clr-icon>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type:
|
|
4329
|
+
ClrBrandAvatar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrBrandAvatar, selector: "clr-brand-avatar", inputs: { brand: ["clrBrand", "brand"] }, host: { properties: { "class.clr-brand-avatar": "this.avatar" } }, viewQueries: [{ propertyName: "avatarElement", first: true, predicate: ["avatar"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"brand-avatar-rectangle\">\n <div #avatar class=\"brand-avatar-icon-container\">\n <clr-icon [attr.size]=\"23\" [attr.shape]=\"getShape()\"></clr-icon>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.ClrIconCustomTag, selector: "clr-icon" }] });
|
|
4326
4330
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrBrandAvatar, decorators: [{
|
|
4327
4331
|
type: Component,
|
|
4328
4332
|
args: [{ selector: 'clr-brand-avatar', template: "<div class=\"brand-avatar-rectangle\">\n <div #avatar class=\"brand-avatar-icon-container\">\n <clr-icon [attr.size]=\"23\" [attr.shape]=\"getShape()\"></clr-icon>\n </div>\n</div>\n" }]
|
|
@@ -4500,7 +4504,7 @@ class LocationBarNodeComponent {
|
|
|
4500
4504
|
}
|
|
4501
4505
|
}
|
|
4502
4506
|
LocationBarNodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: LocationBarNodeComponent, deps: [{ token: CONTENT_PROVIDER, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
4503
|
-
LocationBarNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: LocationBarNodeComponent, selector: "clr-location-bar-node", inputs: { parentNode: "parentNode" }, outputs: { selectionChanged: "selectionChanged" }, host: { properties: { "class.location-bar-node": "true" } }, ngImport: i0, template: "<ng-container *ngIf=\"parentNode\">\n <ng-content *ngIf=\"parentNode.getChildren()?.length > 0\"></ng-content>\n\n <ng-container\n *ngIf=\"\n (selectableChilds.length > 0 && !parentNode.getSelectedChild()) || selectableChilds.length > 1;\n else singleSelected\n \"\n >\n <clr-dropdown>\n <button class=\"btn btn-link btn-sm\" (blur)=\"focus = false\" (focus)=\"focus = true\" clrDropdownTrigger>\n <ng-container *ngIf=\"parentNode.getSelectedChild() as node; else unselected\">\n <span\n class=\"text-truncate\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ node.label }}\"\n >\n {{ node.label }}\n </span>\n <cds-icon shape=\"angle\" direction=\"down\" size=\"xs\" class=\"caret-icon\"></cds-icon>\n </ng-container>\n <ng-template #unselected>\n <cds-icon class=\"unselected\" size=\"18\" [attr.solid]=\"focus\" shape=\"tree-view\"></cds-icon> ...\n </ng-template>\n </button>\n <clr-dropdown-menu [clrPosition]=\"'bottom-left'\" *clrIfOpen>\n <button\n *ngFor=\"let item of selectableChilds\"\n type=\"button\"\n clrDropdownItem\n class=\"text-truncate\"\n [class.selected-child]=\"item.id === parentNode.getSelectedChild()?.id\"\n (click)=\"selectNode(item)\"\n title=\"{{ item.label }}\"\n >\n {{ item.label }}\n </button>\n </clr-dropdown-menu>\n </clr-dropdown>\n </ng-container>\n\n <ng-template #singleSelected>\n <ng-container *ngIf=\"parentNode.getSelectedChild()\">\n <ng-container *ngIf=\"parentNode.getSelectedChild().selectable; else unselectable\">\n <button\n class=\"btn btn-link btn-sm\"\n (click)=\"selectNode(parentNode.getSelectedChild())\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ parentNode.getSelectedChild().label }}\"\n >\n {{ parentNode.getSelectedChild().label }}\n </button>\n </ng-container>\n <ng-template #unselectable>\n <span\n class=\"unselectable-node text-truncate\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ parentNode.getSelectedChild().label }}\"\n >\n {{ parentNode.getSelectedChild().label }}\n </span>\n </ng-template>\n </ng-container>\n </ng-template>\n\n <clr-location-bar-node\n *ngIf=\"parentNode.getSelectedChild() && parentNode.getChildren().length > 0\"\n [parentNode]=\"parentNode.getSelectedChild()\"\n (selectionChanged)=\"onSelectionChanged($event)\"\n >\n <span>/</span>\n </clr-location-bar-node>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
4507
|
+
LocationBarNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: LocationBarNodeComponent, selector: "clr-location-bar-node", inputs: { parentNode: "parentNode" }, outputs: { selectionChanged: "selectionChanged" }, host: { properties: { "class.location-bar-node": "true" } }, ngImport: i0, template: "<ng-container *ngIf=\"parentNode\">\n <ng-content *ngIf=\"parentNode.getChildren()?.length > 0\"></ng-content>\n\n <ng-container\n *ngIf=\"\n (selectableChilds.length > 0 && !parentNode.getSelectedChild()) || selectableChilds.length > 1;\n else singleSelected\n \"\n >\n <clr-dropdown>\n <button class=\"btn btn-link btn-sm\" (blur)=\"focus = false\" (focus)=\"focus = true\" clrDropdownTrigger>\n <ng-container *ngIf=\"parentNode.getSelectedChild() as node; else unselected\">\n <span\n class=\"text-truncate\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ node.label }}\"\n >\n {{ node.label }}\n </span>\n <cds-icon shape=\"angle\" direction=\"down\" size=\"xs\" class=\"caret-icon\"></cds-icon>\n </ng-container>\n <ng-template #unselected>\n <cds-icon class=\"unselected\" size=\"18\" [attr.solid]=\"focus\" shape=\"tree-view\"></cds-icon> ...\n </ng-template>\n </button>\n <clr-dropdown-menu [clrPosition]=\"'bottom-left'\" *clrIfOpen>\n <button\n *ngFor=\"let item of selectableChilds\"\n type=\"button\"\n clrDropdownItem\n class=\"text-truncate\"\n [class.selected-child]=\"item.id === parentNode.getSelectedChild()?.id\"\n (click)=\"selectNode(item)\"\n title=\"{{ item.label }}\"\n >\n {{ item.label }}\n </button>\n </clr-dropdown-menu>\n </clr-dropdown>\n </ng-container>\n\n <ng-template #singleSelected>\n <ng-container *ngIf=\"parentNode.getSelectedChild()\">\n <ng-container *ngIf=\"parentNode.getSelectedChild().selectable; else unselectable\">\n <button\n class=\"btn btn-link btn-sm\"\n (click)=\"selectNode(parentNode.getSelectedChild())\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ parentNode.getSelectedChild().label }}\"\n >\n {{ parentNode.getSelectedChild().label }}\n </button>\n </ng-container>\n <ng-template #unselectable>\n <span\n class=\"unselectable-node text-truncate\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ parentNode.getSelectedChild().label }}\"\n >\n {{ parentNode.getSelectedChild().label }}\n </span>\n </ng-template>\n </ng-container>\n </ng-template>\n\n <clr-location-bar-node\n *ngIf=\"parentNode.getSelectedChild() && parentNode.getChildren().length > 0\"\n [parentNode]=\"parentNode.getSelectedChild()\"\n (selectionChanged)=\"onSelectionChanged($event)\"\n >\n <span>/</span>\n </clr-location-bar-node>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.CdsIconCustomTag, selector: "cds-icon" }, { kind: "component", type: i1$1.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { kind: "component", type: i1$1.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }, { kind: "directive", type: i1$1.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { kind: "directive", type: i1$1.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "id"] }, { kind: "directive", type: i1$1.ClrIfOpen, selector: "[clrIfOpen]", inputs: ["clrIfOpen"], outputs: ["clrIfOpenChange"] }, { kind: "directive", type: ClrDropdownOverflowDirective, selector: "clr-dropdown-menu", inputs: ["clrDropdownMenuMaxHeight", "clrDropdownMenuItemMinHeight"] }, { kind: "component", type: LocationBarNodeComponent, selector: "clr-location-bar-node", inputs: ["parentNode"], outputs: ["selectionChanged"] }] });
|
|
4504
4508
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: LocationBarNodeComponent, decorators: [{
|
|
4505
4509
|
type: Component,
|
|
4506
4510
|
args: [{ selector: 'clr-location-bar-node', host: { '[class.location-bar-node]': 'true' }, template: "<ng-container *ngIf=\"parentNode\">\n <ng-content *ngIf=\"parentNode.getChildren()?.length > 0\"></ng-content>\n\n <ng-container\n *ngIf=\"\n (selectableChilds.length > 0 && !parentNode.getSelectedChild()) || selectableChilds.length > 1;\n else singleSelected\n \"\n >\n <clr-dropdown>\n <button class=\"btn btn-link btn-sm\" (blur)=\"focus = false\" (focus)=\"focus = true\" clrDropdownTrigger>\n <ng-container *ngIf=\"parentNode.getSelectedChild() as node; else unselected\">\n <span\n class=\"text-truncate\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ node.label }}\"\n >\n {{ node.label }}\n </span>\n <cds-icon shape=\"angle\" direction=\"down\" size=\"xs\" class=\"caret-icon\"></cds-icon>\n </ng-container>\n <ng-template #unselected>\n <cds-icon class=\"unselected\" size=\"18\" [attr.solid]=\"focus\" shape=\"tree-view\"></cds-icon> ...\n </ng-template>\n </button>\n <clr-dropdown-menu [clrPosition]=\"'bottom-left'\" *clrIfOpen>\n <button\n *ngFor=\"let item of selectableChilds\"\n type=\"button\"\n clrDropdownItem\n class=\"text-truncate\"\n [class.selected-child]=\"item.id === parentNode.getSelectedChild()?.id\"\n (click)=\"selectNode(item)\"\n title=\"{{ item.label }}\"\n >\n {{ item.label }}\n </button>\n </clr-dropdown-menu>\n </clr-dropdown>\n </ng-container>\n\n <ng-template #singleSelected>\n <ng-container *ngIf=\"parentNode.getSelectedChild()\">\n <ng-container *ngIf=\"parentNode.getSelectedChild().selectable; else unselectable\">\n <button\n class=\"btn btn-link btn-sm\"\n (click)=\"selectNode(parentNode.getSelectedChild())\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ parentNode.getSelectedChild().label }}\"\n >\n {{ parentNode.getSelectedChild().label }}\n </button>\n </ng-container>\n <ng-template #unselectable>\n <span\n class=\"unselectable-node text-truncate\"\n [class.last-level]=\"!parentNode.getSelectedChild().getSelectedChild()\"\n title=\"{{ parentNode.getSelectedChild().label }}\"\n >\n {{ parentNode.getSelectedChild().label }}\n </span>\n </ng-template>\n </ng-container>\n </ng-template>\n\n <clr-location-bar-node\n *ngIf=\"parentNode.getSelectedChild() && parentNode.getChildren().length > 0\"\n [parentNode]=\"parentNode.getSelectedChild()\"\n (selectionChanged)=\"onSelectionChanged($event)\"\n >\n <span>/</span>\n </clr-location-bar-node>\n</ng-container>\n" }]
|
|
@@ -4538,7 +4542,7 @@ class LocationBarComponent {
|
|
|
4538
4542
|
}
|
|
4539
4543
|
}
|
|
4540
4544
|
LocationBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: LocationBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4541
|
-
LocationBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: LocationBarComponent, selector: "clr-location-bar", inputs: { iconShape: ["clrIconShape", "iconShape"], iconTitle: ["clrIconTitle", "iconTitle"], roots: ["clrRoots", "roots"] }, outputs: { selectionChanged: "clrSelectionChanged" }, ngImport: i0, template: "<cds-icon *ngIf=\"iconShape\" [attr.shape]=\"iconShape\" [title]=\"iconTitle\"></cds-icon>\n<clr-location-bar-node (selectionChanged)=\"onSelectionChanged($event)\" [parentNode]=\"root$ | async\">\n</clr-location-bar-node>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
4545
|
+
LocationBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: LocationBarComponent, selector: "clr-location-bar", inputs: { iconShape: ["clrIconShape", "iconShape"], iconTitle: ["clrIconTitle", "iconTitle"], roots: ["clrRoots", "roots"] }, outputs: { selectionChanged: "clrSelectionChanged" }, ngImport: i0, template: "<cds-icon *ngIf=\"iconShape\" [attr.shape]=\"iconShape\" [title]=\"iconTitle\"></cds-icon>\n<clr-location-bar-node (selectionChanged)=\"onSelectionChanged($event)\" [parentNode]=\"root$ | async\">\n</clr-location-bar-node>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.CdsIconCustomTag, selector: "cds-icon" }, { kind: "component", type: LocationBarNodeComponent, selector: "clr-location-bar-node", inputs: ["parentNode"], outputs: ["selectionChanged"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
|
|
4542
4546
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: LocationBarComponent, decorators: [{
|
|
4543
4547
|
type: Component,
|
|
4544
4548
|
args: [{ selector: 'clr-location-bar', template: "<cds-icon *ngIf=\"iconShape\" [attr.shape]=\"iconShape\" [title]=\"iconTitle\"></cds-icon>\n<clr-location-bar-node (selectionChanged)=\"onSelectionChanged($event)\" [parentNode]=\"root$ | async\">\n</clr-location-bar-node>\n" }]
|
|
@@ -4853,14 +4857,14 @@ class StatePersistenceKeyDirective {
|
|
|
4853
4857
|
this.destroy$.complete();
|
|
4854
4858
|
}
|
|
4855
4859
|
}
|
|
4856
|
-
StatePersistenceKeyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: StatePersistenceKeyDirective, deps: [{ token:
|
|
4860
|
+
StatePersistenceKeyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: StatePersistenceKeyDirective, deps: [{ token: i1$1.ClrDatagrid }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4857
4861
|
StatePersistenceKeyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: StatePersistenceKeyDirective, selector: "[clrStatePersistenceKey]", inputs: { options: ["clrStatePersistenceKey", "options"], useLocalStoreOnly: ["clrUseLocalStoreOnly", "useLocalStoreOnly"], paginationDescription: ["clrPaginationDescription", "paginationDescription"] }, queries: [{ propertyName: "pagination", first: true, predicate: ClrDatagridPagination, descendants: true }, { propertyName: "paginationElem", first: true, predicate: ClrDatagridPagination, descendants: true, read: ElementRef }, { propertyName: "customFilters", predicate: ClrDatagridFilter, descendants: true }], ngImport: i0 });
|
|
4858
4862
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: StatePersistenceKeyDirective, decorators: [{
|
|
4859
4863
|
type: Directive,
|
|
4860
4864
|
args: [{
|
|
4861
4865
|
selector: '[clrStatePersistenceKey]',
|
|
4862
4866
|
}]
|
|
4863
|
-
}], ctorParameters: function () { return [{ type:
|
|
4867
|
+
}], ctorParameters: function () { return [{ type: i1$1.ClrDatagrid }]; }, propDecorators: { options: [{
|
|
4864
4868
|
type: Input,
|
|
4865
4869
|
args: ['clrStatePersistenceKey']
|
|
4866
4870
|
}], useLocalStoreOnly: [{
|
|
@@ -4940,7 +4944,7 @@ class ColumnHiddenStatePersistenceDirective {
|
|
|
4940
4944
|
this.destroy$.complete();
|
|
4941
4945
|
}
|
|
4942
4946
|
}
|
|
4943
|
-
ColumnHiddenStatePersistenceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ColumnHiddenStatePersistenceDirective, deps: [{ token: DatagridFieldDirective, optional: true }, { token: StatePersistenceKeyDirective, optional: true }, { token:
|
|
4947
|
+
ColumnHiddenStatePersistenceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ColumnHiddenStatePersistenceDirective, deps: [{ token: DatagridFieldDirective, optional: true }, { token: StatePersistenceKeyDirective, optional: true }, { token: i1$1.ClrDatagrid }, { token: i1$1.ClrDatagridHideableColumn }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4944
4948
|
ColumnHiddenStatePersistenceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ColumnHiddenStatePersistenceDirective, selector: "[clrDgHideableColumn]", ngImport: i0 });
|
|
4945
4949
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ColumnHiddenStatePersistenceDirective, decorators: [{
|
|
4946
4950
|
type: Directive,
|
|
@@ -4952,7 +4956,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
4952
4956
|
type: Optional
|
|
4953
4957
|
}] }, { type: StatePersistenceKeyDirective, decorators: [{
|
|
4954
4958
|
type: Optional
|
|
4955
|
-
}] }, { type:
|
|
4959
|
+
}] }, { type: i1$1.ClrDatagrid }, { type: i1$1.ClrDatagridHideableColumn }];
|
|
4956
4960
|
} });
|
|
4957
4961
|
|
|
4958
4962
|
class ClrDatagridStatePersistenceModule {
|
|
@@ -5023,12 +5027,12 @@ class ClrEnumFilterComponent {
|
|
|
5023
5027
|
this.destroyed$.complete();
|
|
5024
5028
|
}
|
|
5025
5029
|
}
|
|
5026
|
-
ClrEnumFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrEnumFilterComponent, deps: [{ token:
|
|
5027
|
-
ClrEnumFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrEnumFilterComponent, selector: "clr-enum-filter", inputs: { property: ["clrProperty", "property"], value: ["clrFilterValues", "value"], clrPossibleValues: "clrPossibleValues" }, outputs: { clrFilterValuesChange: "clrFilterValuesChange" }, ngImport: i0, template: "<clr-checkbox-container class=\"filter-selection\">\n <clr-checkbox-wrapper *ngFor=\"let possibleValue of possibleValues\">\n <input\n type=\"checkbox\"\n clrCheckbox\n value=\"{{ possibleValue }}\"\n name=\"possibleValue\"\n [ngModel]=\"filteredValues.includes(possibleValue)\"\n (ngModelChange)=\"onChange(possibleValue, $event)\"\n />\n <label>{{ possibleValue }}</label>\n </clr-checkbox-wrapper>\n</clr-checkbox-container>\n", styles: [".filter-selection{margin-top:0}\n"], dependencies: [{ kind: "directive", type:
|
|
5030
|
+
ClrEnumFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrEnumFilterComponent, deps: [{ token: i1$1.ClrDatagridFilter }, { token: i1$1.ClrDatagrid }], target: i0.ɵɵFactoryTarget.Component });
|
|
5031
|
+
ClrEnumFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrEnumFilterComponent, selector: "clr-enum-filter", inputs: { property: ["clrProperty", "property"], value: ["clrFilterValues", "value"], clrPossibleValues: "clrPossibleValues" }, outputs: { clrFilterValuesChange: "clrFilterValuesChange" }, ngImport: i0, template: "<clr-checkbox-container class=\"filter-selection\">\n <clr-checkbox-wrapper *ngFor=\"let possibleValue of possibleValues\">\n <input\n type=\"checkbox\"\n clrCheckbox\n value=\"{{ possibleValue }}\"\n name=\"possibleValue\"\n [ngModel]=\"filteredValues.includes(possibleValue)\"\n (ngModelChange)=\"onChange(possibleValue, $event)\"\n />\n <label>{{ possibleValue }}</label>\n </clr-checkbox-wrapper>\n</clr-checkbox-container>\n", styles: [".filter-selection{margin-top:0}\n"], dependencies: [{ kind: "directive", type: i1$1.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i1$1.ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "component", type: i1$1.ClrCheckboxContainer, selector: "clr-checkbox-container,clr-toggle-container", inputs: ["clrInline"] }, { kind: "component", type: i1$1.ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
5028
5032
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrEnumFilterComponent, decorators: [{
|
|
5029
5033
|
type: Component,
|
|
5030
5034
|
args: [{ selector: 'clr-enum-filter', template: "<clr-checkbox-container class=\"filter-selection\">\n <clr-checkbox-wrapper *ngFor=\"let possibleValue of possibleValues\">\n <input\n type=\"checkbox\"\n clrCheckbox\n value=\"{{ possibleValue }}\"\n name=\"possibleValue\"\n [ngModel]=\"filteredValues.includes(possibleValue)\"\n (ngModelChange)=\"onChange(possibleValue, $event)\"\n />\n <label>{{ possibleValue }}</label>\n </clr-checkbox-wrapper>\n</clr-checkbox-container>\n", styles: [".filter-selection{margin-top:0}\n"] }]
|
|
5031
|
-
}], ctorParameters: function () { return [{ type:
|
|
5035
|
+
}], ctorParameters: function () { return [{ type: i1$1.ClrDatagridFilter }, { type: i1$1.ClrDatagrid }]; }, propDecorators: { property: [{
|
|
5032
5036
|
type: Input,
|
|
5033
5037
|
args: ['clrProperty']
|
|
5034
5038
|
}], value: [{
|
|
@@ -5204,12 +5208,12 @@ class ClrDateFilterComponent {
|
|
|
5204
5208
|
return other === this;
|
|
5205
5209
|
}
|
|
5206
5210
|
}
|
|
5207
|
-
ClrDateFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDateFilterComponent, deps: [{ token:
|
|
5208
|
-
ClrDateFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrDateFilterComponent, selector: "clr-date-filter", inputs: { property: ["clrProperty", "property"], maxPlaceholder: ["clrFilterMaxPlaceholder", "maxPlaceholder"], minPlaceholder: ["clrFilterMinPlaceholder", "minPlaceholder"], value: ["clrFilterValue", "value"] }, outputs: { filterValueChange: "clrFilterValueChange" }, ngImport: i0, template: "<clr-date-container>\n <input\n #input_from\n type=\"date\"\n name=\"from\"\n class=\"datagrid-date-filter-input\"\n [(clrDate)]=\"from\"\n [placeholder]=\"minPlaceholderValue\"\n [attr.aria-label]=\"minPlaceholderValue\"\n />\n</clr-date-container>\n<clr-date-container>\n <input\n type=\"date\"\n name=\"to\"\n class=\"datagrid-date-filter-input\"\n [(clrDate)]=\"to\"\n [placeholder]=\"maxPlaceholderValue\"\n [attr.aria-label]=\"maxPlaceholderValue\"\n />\n</clr-date-container>\n", styles: [""], dependencies: [{ kind: "component", type:
|
|
5211
|
+
ClrDateFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDateFilterComponent, deps: [{ token: i1$1.ClrCommonStringsService }, { token: i1$1.ClrPopoverEventsService }, { token: i1$1.ClrDatagridFilter }], target: i0.ɵɵFactoryTarget.Component });
|
|
5212
|
+
ClrDateFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrDateFilterComponent, selector: "clr-date-filter", inputs: { property: ["clrProperty", "property"], maxPlaceholder: ["clrFilterMaxPlaceholder", "maxPlaceholder"], minPlaceholder: ["clrFilterMinPlaceholder", "minPlaceholder"], value: ["clrFilterValue", "value"] }, outputs: { filterValueChange: "clrFilterValueChange" }, ngImport: i0, template: "<clr-date-container>\n <input\n #input_from\n type=\"date\"\n name=\"from\"\n class=\"datagrid-date-filter-input\"\n [(clrDate)]=\"from\"\n [placeholder]=\"minPlaceholderValue\"\n [attr.aria-label]=\"minPlaceholderValue\"\n />\n</clr-date-container>\n<clr-date-container>\n <input\n type=\"date\"\n name=\"to\"\n class=\"datagrid-date-filter-input\"\n [(clrDate)]=\"to\"\n [placeholder]=\"maxPlaceholderValue\"\n [attr.aria-label]=\"maxPlaceholderValue\"\n />\n</clr-date-container>\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.ClrDateContainer, selector: "clr-date-container", inputs: ["clrPosition"] }, { kind: "directive", type: i1$1.ClrDateInput, selector: "[clrDate]", inputs: ["placeholder", "clrDate", "min", "max", "disabled"], outputs: ["clrDateChange"] }, { kind: "directive", type: i1$1.ClrDateInputValidator, selector: "[clrDate]" }] });
|
|
5209
5213
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDateFilterComponent, decorators: [{
|
|
5210
5214
|
type: Component,
|
|
5211
5215
|
args: [{ selector: 'clr-date-filter', template: "<clr-date-container>\n <input\n #input_from\n type=\"date\"\n name=\"from\"\n class=\"datagrid-date-filter-input\"\n [(clrDate)]=\"from\"\n [placeholder]=\"minPlaceholderValue\"\n [attr.aria-label]=\"minPlaceholderValue\"\n />\n</clr-date-container>\n<clr-date-container>\n <input\n type=\"date\"\n name=\"to\"\n class=\"datagrid-date-filter-input\"\n [(clrDate)]=\"to\"\n [placeholder]=\"maxPlaceholderValue\"\n [attr.aria-label]=\"maxPlaceholderValue\"\n />\n</clr-date-container>\n" }]
|
|
5212
|
-
}], ctorParameters: function () { return [{ type:
|
|
5216
|
+
}], ctorParameters: function () { return [{ type: i1$1.ClrCommonStringsService }, { type: i1$1.ClrPopoverEventsService }, { type: i1$1.ClrDatagridFilter }]; }, propDecorators: { property: [{
|
|
5213
5217
|
type: Input,
|
|
5214
5218
|
args: ['clrProperty']
|
|
5215
5219
|
}], maxPlaceholder: [{
|
|
@@ -5240,236 +5244,1888 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
5240
5244
|
}]
|
|
5241
5245
|
}] });
|
|
5242
5246
|
|
|
5243
|
-
/*
|
|
5244
|
-
* Copyright (c) 2018-2022 Porsche Informatik. All Rights Reserved.
|
|
5245
|
-
* This software is released under MIT license.
|
|
5246
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5247
|
-
*/
|
|
5248
|
-
class ClrAddonsModule {
|
|
5249
|
-
}
|
|
5250
|
-
ClrAddonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5251
|
-
ClrAddonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, exports: [ClrViewEditSectionModule,
|
|
5252
|
-
ClrPagerModule,
|
|
5253
|
-
ClrDotPagerModule,
|
|
5254
|
-
ClrPagedSearchResultListModule,
|
|
5255
|
-
ClrCollapseExpandSectionModule,
|
|
5256
|
-
ClrBreadcrumbModule,
|
|
5257
|
-
ClrMainNavGroupModule,
|
|
5258
|
-
ClrContentPanelModule,
|
|
5259
|
-
ClrNotificationModule,
|
|
5260
|
-
ClrFlowBarModule,
|
|
5261
|
-
ClrBackButtonModule,
|
|
5262
|
-
ClrNumericFieldModule,
|
|
5263
|
-
ClrSearchFieldModule,
|
|
5264
|
-
ClrTreetableModule,
|
|
5265
|
-
ClrProgressSpinnerModule,
|
|
5266
|
-
ClrDateTimeModule,
|
|
5267
|
-
ClrQuickListModule,
|
|
5268
|
-
ClrLetterAvatarModule,
|
|
5269
|
-
ClrMultilingualModule,
|
|
5270
|
-
ClrGenericQuickListModule,
|
|
5271
|
-
ClrDataListValidatorModule,
|
|
5272
|
-
ClrHistoryModule,
|
|
5273
|
-
ClrAutocompleteOffModule,
|
|
5274
|
-
ClrBrandAvatarModule,
|
|
5275
|
-
ClrLocationBarModule,
|
|
5276
|
-
ClrFormModule,
|
|
5277
|
-
ClrDropdownOverflowModule,
|
|
5278
|
-
ClrDatagridStatePersistenceModule,
|
|
5279
|
-
ClrEnumFilterModule,
|
|
5280
|
-
ClrDateFilterModule] });
|
|
5281
|
-
ClrAddonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, imports: [ClrViewEditSectionModule,
|
|
5282
|
-
ClrPagerModule,
|
|
5283
|
-
ClrDotPagerModule,
|
|
5284
|
-
ClrPagedSearchResultListModule,
|
|
5285
|
-
ClrCollapseExpandSectionModule,
|
|
5286
|
-
ClrBreadcrumbModule,
|
|
5287
|
-
ClrMainNavGroupModule,
|
|
5288
|
-
ClrContentPanelModule,
|
|
5289
|
-
ClrNotificationModule,
|
|
5290
|
-
ClrFlowBarModule,
|
|
5291
|
-
ClrBackButtonModule,
|
|
5292
|
-
ClrNumericFieldModule,
|
|
5293
|
-
ClrSearchFieldModule,
|
|
5294
|
-
ClrTreetableModule,
|
|
5295
|
-
ClrProgressSpinnerModule,
|
|
5296
|
-
ClrDateTimeModule,
|
|
5297
|
-
ClrQuickListModule,
|
|
5298
|
-
ClrLetterAvatarModule,
|
|
5299
|
-
ClrMultilingualModule,
|
|
5300
|
-
ClrGenericQuickListModule,
|
|
5301
|
-
ClrDataListValidatorModule,
|
|
5302
|
-
ClrHistoryModule,
|
|
5303
|
-
ClrAutocompleteOffModule,
|
|
5304
|
-
ClrBrandAvatarModule,
|
|
5305
|
-
ClrLocationBarModule,
|
|
5306
|
-
ClrFormModule,
|
|
5307
|
-
ClrDropdownOverflowModule,
|
|
5308
|
-
ClrDatagridStatePersistenceModule,
|
|
5309
|
-
ClrEnumFilterModule,
|
|
5310
|
-
ClrDateFilterModule] });
|
|
5311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, decorators: [{
|
|
5312
|
-
type: NgModule,
|
|
5313
|
-
args: [{
|
|
5314
|
-
exports: [
|
|
5315
|
-
ClrViewEditSectionModule,
|
|
5316
|
-
ClrPagerModule,
|
|
5317
|
-
ClrDotPagerModule,
|
|
5318
|
-
ClrPagedSearchResultListModule,
|
|
5319
|
-
ClrCollapseExpandSectionModule,
|
|
5320
|
-
ClrBreadcrumbModule,
|
|
5321
|
-
ClrMainNavGroupModule,
|
|
5322
|
-
ClrContentPanelModule,
|
|
5323
|
-
ClrNotificationModule,
|
|
5324
|
-
ClrFlowBarModule,
|
|
5325
|
-
ClrBackButtonModule,
|
|
5326
|
-
ClrNumericFieldModule,
|
|
5327
|
-
ClrSearchFieldModule,
|
|
5328
|
-
ClrTreetableModule,
|
|
5329
|
-
ClrProgressSpinnerModule,
|
|
5330
|
-
ClrDateTimeModule,
|
|
5331
|
-
ClrQuickListModule,
|
|
5332
|
-
ClrLetterAvatarModule,
|
|
5333
|
-
ClrMultilingualModule,
|
|
5334
|
-
ClrGenericQuickListModule,
|
|
5335
|
-
ClrDataListValidatorModule,
|
|
5336
|
-
ClrHistoryModule,
|
|
5337
|
-
ClrAutocompleteOffModule,
|
|
5338
|
-
ClrBrandAvatarModule,
|
|
5339
|
-
ClrLocationBarModule,
|
|
5340
|
-
ClrFormModule,
|
|
5341
|
-
ClrDropdownOverflowModule,
|
|
5342
|
-
ClrDatagridStatePersistenceModule,
|
|
5343
|
-
ClrEnumFilterModule,
|
|
5344
|
-
ClrDateFilterModule,
|
|
5345
|
-
],
|
|
5346
|
-
}]
|
|
5347
|
-
}] });
|
|
5348
|
-
|
|
5349
|
-
/*
|
|
5350
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5351
|
-
* This software is released under MIT license.
|
|
5352
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5353
|
-
*/
|
|
5354
|
-
|
|
5355
|
-
/*
|
|
5356
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5357
|
-
* This software is released under MIT license.
|
|
5358
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5359
|
-
*/
|
|
5360
|
-
|
|
5361
|
-
/*
|
|
5362
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5363
|
-
* This software is released under MIT license.
|
|
5364
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5365
|
-
*/
|
|
5366
|
-
|
|
5367
|
-
/*
|
|
5368
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5369
|
-
* This software is released under MIT license.
|
|
5370
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5371
|
-
*/
|
|
5372
|
-
|
|
5373
|
-
/*
|
|
5374
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5375
|
-
* This software is released under MIT license.
|
|
5376
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5377
|
-
*/
|
|
5378
|
-
|
|
5379
|
-
/*
|
|
5380
|
-
* Copyright (c) 2018-2020 Porsche Informatik. All Rights Reserved.
|
|
5381
|
-
* This software is released under MIT license.
|
|
5382
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5383
|
-
*/
|
|
5384
|
-
|
|
5385
|
-
/*
|
|
5386
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5387
|
-
* This software is released under MIT license.
|
|
5388
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5389
|
-
*/
|
|
5390
|
-
|
|
5391
|
-
/*
|
|
5392
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5393
|
-
* This software is released under MIT license.
|
|
5394
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5395
|
-
*/
|
|
5396
|
-
|
|
5397
|
-
/*
|
|
5398
|
-
* Copyright (c) 2018-2021 Porsche Informatik. All Rights Reserved.
|
|
5399
|
-
* This software is released under MIT license.
|
|
5400
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5401
|
-
*/
|
|
5402
|
-
/*
|
|
5403
|
-
* Copyright (c) 2018-2021 Porsche Informatik. All Rights Reserved.
|
|
5404
|
-
* This software is released under MIT license.
|
|
5405
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5406
|
-
*/
|
|
5407
5247
|
/**
|
|
5408
|
-
*
|
|
5409
|
-
*
|
|
5410
|
-
* @deprecated not used anymore.
|
|
5248
|
+
* Day model.
|
|
5249
|
+
* Takes care of keeping records of full days, without the times & timezone issues.
|
|
5411
5250
|
*/
|
|
5412
|
-
class
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5251
|
+
class DayModel {
|
|
5252
|
+
constructor(...args) {
|
|
5253
|
+
if (args[0] instanceof Date) {
|
|
5254
|
+
const date = args[0];
|
|
5255
|
+
this.year = date.getFullYear();
|
|
5256
|
+
this.month = date.getMonth();
|
|
5257
|
+
this.date = date.getDate();
|
|
5258
|
+
}
|
|
5259
|
+
else if (typeof args[0] === 'string') {
|
|
5260
|
+
const [year, month, day] = args[0].split('-').map(n => parseInt(n, 10));
|
|
5261
|
+
this.year = year;
|
|
5262
|
+
this.month = month - 1;
|
|
5263
|
+
this.date = day;
|
|
5264
|
+
}
|
|
5265
|
+
else {
|
|
5266
|
+
this.year = args[0];
|
|
5267
|
+
this.month = args[1];
|
|
5268
|
+
this.date = args[2];
|
|
5269
|
+
}
|
|
5270
|
+
}
|
|
5271
|
+
/**
|
|
5272
|
+
* Checks if the passed value is equal to current day model.
|
|
5273
|
+
* @param value - Day model.
|
|
5274
|
+
* @returns Wether value is equal to current day model.
|
|
5275
|
+
*/
|
|
5276
|
+
isEqual(value) {
|
|
5277
|
+
if (value) {
|
|
5278
|
+
return this.year === value.year && this.month === value.month && this.date === value.date;
|
|
5279
|
+
}
|
|
5280
|
+
return false;
|
|
5281
|
+
}
|
|
5282
|
+
/**
|
|
5283
|
+
* Increment day model with date value.
|
|
5284
|
+
* @param value - Incremental date value.
|
|
5285
|
+
* @returns Updated day model with incremented date value.
|
|
5286
|
+
*/
|
|
5287
|
+
incrementBy(value) {
|
|
5288
|
+
// Creating new Javascript Date object to increment because
|
|
5289
|
+
// it will automatically take care of switching to next or previous
|
|
5290
|
+
// months & years without we having to worry about it.
|
|
5291
|
+
const date = new Date(this.year, this.month, this.date + value);
|
|
5292
|
+
this.year = date.getFullYear();
|
|
5293
|
+
this.month = date.getMonth();
|
|
5294
|
+
this.date = date.getDate();
|
|
5295
|
+
return this;
|
|
5296
|
+
}
|
|
5297
|
+
/**
|
|
5298
|
+
* Checks if current day model is after value.
|
|
5299
|
+
* @param value - Day model.
|
|
5300
|
+
* @returns Wether current day model is after value.
|
|
5301
|
+
*/
|
|
5302
|
+
isAfter(value) {
|
|
5303
|
+
return this.toDate() > value.toDate();
|
|
5304
|
+
}
|
|
5305
|
+
/**
|
|
5306
|
+
* Checks if current day model is before value.
|
|
5307
|
+
* @param value - Day model.
|
|
5308
|
+
* @returns Wether current day model is before value.
|
|
5309
|
+
*/
|
|
5310
|
+
isBefore(value) {
|
|
5311
|
+
return this.toDate() < value.toDate();
|
|
5312
|
+
}
|
|
5313
|
+
/**
|
|
5314
|
+
* Clones the current day model.
|
|
5315
|
+
* @returns Cloned day model.
|
|
5316
|
+
*/
|
|
5317
|
+
clone() {
|
|
5318
|
+
return new DayModel(this.year, this.month, this.date);
|
|
5319
|
+
}
|
|
5320
|
+
/**
|
|
5321
|
+
* Convert to Javascript Date object.
|
|
5322
|
+
* @returns Javascript Date object.
|
|
5323
|
+
*/
|
|
5324
|
+
toDate() {
|
|
5325
|
+
return new Date(this.year, this.month, this.date);
|
|
5326
|
+
}
|
|
5327
|
+
/**
|
|
5328
|
+
* To HTML5 date spec string.
|
|
5329
|
+
* See https://clarity.design/documentation/datepicker
|
|
5330
|
+
* @returns Date as HTML5 spec string.
|
|
5331
|
+
*/
|
|
5332
|
+
toHTML5SpecDateString() {
|
|
5333
|
+
// The clarity date picker uses the format 'YYYY-MM-DD'.
|
|
5334
|
+
return `${this.year}-${this.pad(this.month + 1)}-${this.pad(this.date)}`;
|
|
5335
|
+
}
|
|
5336
|
+
/**
|
|
5337
|
+
* String padding with zeros.
|
|
5338
|
+
* @param num - Number to pad.
|
|
5339
|
+
* @returns Padded string.
|
|
5340
|
+
*/
|
|
5341
|
+
pad(num) {
|
|
5342
|
+
return num < 10 ? `0${num}` : `${num}`;
|
|
5419
5343
|
}
|
|
5420
5344
|
}
|
|
5345
|
+
|
|
5421
5346
|
/**
|
|
5422
|
-
*
|
|
5347
|
+
* Keeps track of how many Clarity Datepicker there are open.
|
|
5348
|
+
* This is needed for the ClrDaterangepickerContainerComponent, to know when to close the popover.
|
|
5423
5349
|
*/
|
|
5424
|
-
class
|
|
5425
|
-
constructor(
|
|
5426
|
-
this.
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
this.result = new Promise(resolve => {
|
|
5432
|
-
this._resolve = resolve;
|
|
5433
|
-
});
|
|
5434
|
-
this.result.then(null);
|
|
5350
|
+
class OpenedDatepickersTrackerService {
|
|
5351
|
+
constructor() {
|
|
5352
|
+
this.openedDatepickersCount = 0;
|
|
5353
|
+
/**
|
|
5354
|
+
* Event triggered when value changes.
|
|
5355
|
+
*/
|
|
5356
|
+
this.valueChange = new EventEmitter();
|
|
5435
5357
|
}
|
|
5436
5358
|
/**
|
|
5437
|
-
*
|
|
5359
|
+
* Tracks an opened datepicker.
|
|
5360
|
+
* @param opened - Opened state.
|
|
5438
5361
|
*/
|
|
5439
|
-
|
|
5440
|
-
if (
|
|
5441
|
-
this.
|
|
5442
|
-
this._removeModalElements();
|
|
5362
|
+
track(opened) {
|
|
5363
|
+
if (opened) {
|
|
5364
|
+
this.openedDatepickersCount++;
|
|
5443
5365
|
}
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
const notificationNativeEl = this._notificationCmptRef.location.nativeElement;
|
|
5447
|
-
notificationNativeEl.parentNode.removeChild(notificationNativeEl);
|
|
5448
|
-
this._notificationCmptRef.destroy();
|
|
5449
|
-
if (this._contentRef && this._contentRef.viewRef) {
|
|
5450
|
-
this._contentRef.viewRef.destroy();
|
|
5366
|
+
else {
|
|
5367
|
+
this.openedDatepickersCount--;
|
|
5451
5368
|
}
|
|
5452
|
-
this.
|
|
5453
|
-
this.
|
|
5369
|
+
this.openedDatepickersCount = Math.max(0, this.openedDatepickersCount);
|
|
5370
|
+
this.valueChange.emit(this.openedDatepickersCount !== 0);
|
|
5454
5371
|
}
|
|
5455
5372
|
}
|
|
5373
|
+
OpenedDatepickersTrackerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: OpenedDatepickersTrackerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5374
|
+
OpenedDatepickersTrackerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: OpenedDatepickersTrackerService, providedIn: 'root' });
|
|
5375
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: OpenedDatepickersTrackerService, decorators: [{
|
|
5376
|
+
type: Injectable,
|
|
5377
|
+
args: [{ providedIn: 'root' }]
|
|
5378
|
+
}] });
|
|
5456
5379
|
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
this.
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5380
|
+
class ClrDatepickerComponent {
|
|
5381
|
+
constructor(openedDatepickersTrackerService) {
|
|
5382
|
+
this.openedDatepickersTrackerService = openedDatepickersTrackerService;
|
|
5383
|
+
/**
|
|
5384
|
+
* Text label.
|
|
5385
|
+
*/
|
|
5386
|
+
this.label = 'Date';
|
|
5387
|
+
/**
|
|
5388
|
+
* Minimum date that can be selected.
|
|
5389
|
+
*/
|
|
5390
|
+
this.minDate = undefined;
|
|
5391
|
+
/**
|
|
5392
|
+
* Maximum date that can be selected.
|
|
5393
|
+
*/
|
|
5394
|
+
this.maxDate = undefined;
|
|
5395
|
+
/**
|
|
5396
|
+
* Event triggered when value changes.
|
|
5397
|
+
*/
|
|
5398
|
+
this.valueChange = new EventEmitter();
|
|
5399
|
+
/** List of subscriptions to later destroy. */
|
|
5400
|
+
this.subscriptions = [];
|
|
5401
|
+
}
|
|
5402
|
+
/**
|
|
5403
|
+
* Get date.
|
|
5404
|
+
* @returns JavaScript Date object.
|
|
5405
|
+
*/
|
|
5406
|
+
get date() {
|
|
5407
|
+
var _a;
|
|
5408
|
+
return (_a = this.value) === null || _a === void 0 ? void 0 : _a.toDate();
|
|
5409
|
+
}
|
|
5410
|
+
/**
|
|
5411
|
+
* Set date.
|
|
5412
|
+
*/
|
|
5413
|
+
set date(val) {
|
|
5414
|
+
this.value = val == null ? null : new DayModel(val);
|
|
5415
|
+
this.valueChange.emit(this.value);
|
|
5416
|
+
}
|
|
5417
|
+
/**
|
|
5418
|
+
* Minimum date as attribute string.
|
|
5419
|
+
* @returns Minimum date as attribute string.
|
|
5420
|
+
*/
|
|
5421
|
+
get minDateAttr() {
|
|
5422
|
+
var _a;
|
|
5423
|
+
return (_a = this.minDate) === null || _a === void 0 ? void 0 : _a.toHTML5SpecDateString();
|
|
5424
|
+
}
|
|
5425
|
+
/**
|
|
5426
|
+
* Maximum date as attribute string.
|
|
5427
|
+
* @returns Maximum date as attribute string.
|
|
5428
|
+
*/
|
|
5429
|
+
get maxDateAttr() {
|
|
5430
|
+
var _a;
|
|
5431
|
+
return (_a = this.maxDate) === null || _a === void 0 ? void 0 : _a.toHTML5SpecDateString();
|
|
5432
|
+
}
|
|
5433
|
+
ngAfterViewInit() {
|
|
5434
|
+
// eslint-disable-next-line dot-notation -- Need access to this private property.
|
|
5435
|
+
const toggleService = this.clrDateContainer['toggleService'];
|
|
5436
|
+
this.subscriptions.push(toggleService.openChange.subscribe(openState => {
|
|
5437
|
+
this.openedDatepickersTrackerService.track(openState);
|
|
5438
|
+
}));
|
|
5439
|
+
}
|
|
5440
|
+
ngOnDestroy() {
|
|
5441
|
+
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
5442
|
+
}
|
|
5443
|
+
/**
|
|
5444
|
+
* Focus input.
|
|
5445
|
+
*/
|
|
5446
|
+
focus() {
|
|
5447
|
+
this.inputElm.nativeElement.focus();
|
|
5448
|
+
}
|
|
5449
|
+
}
|
|
5450
|
+
ClrDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDatepickerComponent, deps: [{ token: OpenedDatepickersTrackerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5451
|
+
ClrDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrDatepickerComponent, selector: "clr-datepicker", inputs: { value: "value", label: "label", minDate: "minDate", maxDate: "maxDate" }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "inputElm", first: true, predicate: ["inputElm"], descendants: true }, { propertyName: "clrDateContainer", first: true, predicate: ClrDateContainer, descendants: true }], ngImport: i0, template: "<clr-date-container>\n <label>{{ this.label }}</label>\n <input #inputElm clrDate [(clrDate)]=\"this.date\" [min]=\"this.minDateAttr\" [max]=\"this.maxDateAttr\" />\n</clr-date-container>\n", dependencies: [{ kind: "directive", type: i1$1.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "component", type: i1$1.ClrDateContainer, selector: "clr-date-container", inputs: ["clrPosition"] }, { kind: "directive", type: i1$1.ClrDateInput, selector: "[clrDate]", inputs: ["placeholder", "clrDate", "min", "max", "disabled"], outputs: ["clrDateChange"] }, { kind: "directive", type: i1$1.ClrDateInputValidator, selector: "[clrDate]" }] });
|
|
5452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDatepickerComponent, decorators: [{
|
|
5453
|
+
type: Component,
|
|
5454
|
+
args: [{ selector: 'clr-datepicker', template: "<clr-date-container>\n <label>{{ this.label }}</label>\n <input #inputElm clrDate [(clrDate)]=\"this.date\" [min]=\"this.minDateAttr\" [max]=\"this.maxDateAttr\" />\n</clr-date-container>\n" }]
|
|
5455
|
+
}], ctorParameters: function () { return [{ type: OpenedDatepickersTrackerService }]; }, propDecorators: { value: [{
|
|
5456
|
+
type: Input
|
|
5457
|
+
}], label: [{
|
|
5458
|
+
type: Input
|
|
5459
|
+
}], minDate: [{
|
|
5460
|
+
type: Input
|
|
5461
|
+
}], maxDate: [{
|
|
5462
|
+
type: Input
|
|
5463
|
+
}], inputElm: [{
|
|
5464
|
+
type: ViewChild,
|
|
5465
|
+
args: ['inputElm']
|
|
5466
|
+
}], clrDateContainer: [{
|
|
5467
|
+
type: ViewChild,
|
|
5468
|
+
args: [ClrDateContainer]
|
|
5469
|
+
}], valueChange: [{
|
|
5470
|
+
type: Output
|
|
5471
|
+
}] } });
|
|
5472
|
+
|
|
5473
|
+
const USER_INPUT_REGEX = /\d+/g;
|
|
5474
|
+
// https://en.wikipedia.org/wiki/Date_format_by_country
|
|
5475
|
+
const LITTLE_ENDIAN_REGEX = /d+.+m+.+y+/i;
|
|
5476
|
+
const MIDDLE_ENDIAN_REGEX = /m+.+d+.+y+/i;
|
|
5477
|
+
const DELIMITER_REGEX = /d+|m+|y+/i;
|
|
5478
|
+
const YEAR = 'YYYY';
|
|
5479
|
+
const MONTH = 'MM';
|
|
5480
|
+
const DATE = 'DD';
|
|
5481
|
+
const LITTLE_ENDIAN = {
|
|
5482
|
+
name: 'LITTLE_ENDIAN',
|
|
5483
|
+
format: [DATE, MONTH, YEAR],
|
|
5484
|
+
};
|
|
5485
|
+
const MIDDLE_ENDIAN = {
|
|
5486
|
+
name: 'MIDDLE_ENDIAN',
|
|
5487
|
+
format: [MONTH, DATE, YEAR],
|
|
5488
|
+
};
|
|
5489
|
+
const BIG_ENDIAN = {
|
|
5490
|
+
name: 'BIG_ENDIAN',
|
|
5491
|
+
format: [YEAR, MONTH, DATE],
|
|
5492
|
+
};
|
|
5493
|
+
/** Default separator text. */
|
|
5494
|
+
const SEPARATOR_TEXT_DEFAULT = ' - ';
|
|
5495
|
+
const TRANSLATIONS = {
|
|
5496
|
+
from: 'From',
|
|
5497
|
+
to: 'To',
|
|
5498
|
+
};
|
|
5499
|
+
|
|
5500
|
+
/**
|
|
5501
|
+
* Popover positions.
|
|
5502
|
+
* https://github.com/vmware-clarity/ng-clarity/blob/f1a668086bf88bcf5ef1cd36b0d150e45e88def7/projects/angular/src/utils/popover/enums/positions.enum.ts
|
|
5503
|
+
*/
|
|
5504
|
+
class PopoverPositions {
|
|
5505
|
+
}
|
|
5506
|
+
PopoverPositions.options = [
|
|
5507
|
+
'bottom-left',
|
|
5508
|
+
'bottom-right',
|
|
5509
|
+
'left-bottom',
|
|
5510
|
+
'left-top',
|
|
5511
|
+
'right-bottom',
|
|
5512
|
+
'right-top',
|
|
5513
|
+
'top-left',
|
|
5514
|
+
'top-right',
|
|
5515
|
+
];
|
|
5516
|
+
PopoverPositions['bottom-left'] = {
|
|
5517
|
+
axis: ClrAxis.VERTICAL,
|
|
5518
|
+
side: ClrSide.AFTER,
|
|
5519
|
+
anchor: ClrAlignment.START,
|
|
5520
|
+
content: ClrAlignment.START,
|
|
5521
|
+
};
|
|
5522
|
+
PopoverPositions['bottom-right'] = {
|
|
5523
|
+
axis: ClrAxis.VERTICAL,
|
|
5524
|
+
side: ClrSide.AFTER,
|
|
5525
|
+
anchor: ClrAlignment.END,
|
|
5526
|
+
content: ClrAlignment.END,
|
|
5527
|
+
};
|
|
5528
|
+
PopoverPositions['left-bottom'] = {
|
|
5529
|
+
axis: ClrAxis.HORIZONTAL,
|
|
5530
|
+
side: ClrSide.BEFORE,
|
|
5531
|
+
anchor: ClrAlignment.START,
|
|
5532
|
+
content: ClrAlignment.START,
|
|
5533
|
+
};
|
|
5534
|
+
PopoverPositions['left-top'] = {
|
|
5535
|
+
axis: ClrAxis.HORIZONTAL,
|
|
5536
|
+
side: ClrSide.BEFORE,
|
|
5537
|
+
anchor: ClrAlignment.CENTER,
|
|
5538
|
+
content: ClrAlignment.END,
|
|
5539
|
+
};
|
|
5540
|
+
PopoverPositions['right-bottom'] = {
|
|
5541
|
+
axis: ClrAxis.HORIZONTAL,
|
|
5542
|
+
side: ClrSide.AFTER,
|
|
5543
|
+
anchor: ClrAlignment.START,
|
|
5544
|
+
content: ClrAlignment.START,
|
|
5545
|
+
};
|
|
5546
|
+
PopoverPositions['right-top'] = {
|
|
5547
|
+
axis: ClrAxis.HORIZONTAL,
|
|
5548
|
+
side: ClrSide.AFTER,
|
|
5549
|
+
anchor: ClrAlignment.CENTER,
|
|
5550
|
+
content: ClrAlignment.END,
|
|
5551
|
+
};
|
|
5552
|
+
PopoverPositions['top-left'] = {
|
|
5553
|
+
axis: ClrAxis.VERTICAL,
|
|
5554
|
+
side: ClrSide.BEFORE,
|
|
5555
|
+
anchor: ClrAlignment.START,
|
|
5556
|
+
content: ClrAlignment.START,
|
|
5557
|
+
};
|
|
5558
|
+
PopoverPositions['top-right'] = {
|
|
5559
|
+
axis: ClrAxis.VERTICAL,
|
|
5560
|
+
side: ClrSide.BEFORE,
|
|
5561
|
+
anchor: ClrAlignment.END,
|
|
5562
|
+
content: ClrAlignment.END,
|
|
5563
|
+
};
|
|
5564
|
+
|
|
5565
|
+
/**
|
|
5566
|
+
* Daterange control state service.
|
|
5567
|
+
* Stores data for communication between daterange container and input.
|
|
5568
|
+
*/
|
|
5569
|
+
class DaterangeControlStateService {
|
|
5570
|
+
constructor() {
|
|
5571
|
+
/** Disabled control state. */
|
|
5572
|
+
this.disabled = false;
|
|
5573
|
+
/** Focused. */
|
|
5574
|
+
this.focused = false;
|
|
5575
|
+
/** List of validation errors. */
|
|
5576
|
+
this.errors = null;
|
|
5577
|
+
this._invalid = false;
|
|
5578
|
+
this._touched = false;
|
|
5579
|
+
/**
|
|
5580
|
+
* Event triggered when status changes.
|
|
5581
|
+
*/
|
|
5582
|
+
this.statusChange = new EventEmitter();
|
|
5583
|
+
}
|
|
5584
|
+
/**
|
|
5585
|
+
* Control invalid status.
|
|
5586
|
+
* @returns Control invalid status.
|
|
5587
|
+
*/
|
|
5588
|
+
get invalid() {
|
|
5589
|
+
return this._invalid;
|
|
5590
|
+
}
|
|
5591
|
+
/**
|
|
5592
|
+
* Touched.
|
|
5593
|
+
* @returns Touched.
|
|
5594
|
+
*/
|
|
5595
|
+
get touched() {
|
|
5596
|
+
return this._touched;
|
|
5597
|
+
}
|
|
5598
|
+
/**
|
|
5599
|
+
* Update status.
|
|
5600
|
+
* Only for valid & invalid status changes.
|
|
5601
|
+
* And only if there was a real change.
|
|
5602
|
+
* Also updates errors list.
|
|
5603
|
+
* Emits `statusChange` event.
|
|
5604
|
+
* @param control
|
|
5605
|
+
*/
|
|
5606
|
+
updateStatus(control) {
|
|
5607
|
+
this._touched = control.touched;
|
|
5608
|
+
// We only care about valid & invalid status changes.
|
|
5609
|
+
// There is an bug where `ClrDaterangepickerDirective.writeValue` is called twice with same value (`null`).
|
|
5610
|
+
// Setting ` && (control.touched || control.dirty)` in next if-statement will hide the errors,
|
|
5611
|
+
// but the control will still be invalid with errors (just hidden).
|
|
5612
|
+
if (['VALID', 'INVALID'].includes(control.status)) {
|
|
5613
|
+
this.errors = control.errors;
|
|
5614
|
+
this._invalid = control.invalid;
|
|
5615
|
+
this.statusChange.emit(this._invalid);
|
|
5616
|
+
}
|
|
5617
|
+
}
|
|
5618
|
+
}
|
|
5619
|
+
DaterangeControlStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeControlStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5620
|
+
DaterangeControlStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeControlStateService });
|
|
5621
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeControlStateService, decorators: [{
|
|
5622
|
+
type: Injectable
|
|
5623
|
+
}] });
|
|
5624
|
+
|
|
5625
|
+
/**
|
|
5626
|
+
* Daterange service.
|
|
5627
|
+
* Keeps track of daterange related values.
|
|
5628
|
+
*/
|
|
5629
|
+
class DaterangeService {
|
|
5630
|
+
constructor() {
|
|
5631
|
+
/** Minimum date that can be selected. */
|
|
5632
|
+
this.minDate = null;
|
|
5633
|
+
/** Maximum date that can be selected. */
|
|
5634
|
+
this.maxDate = null;
|
|
5635
|
+
this._selectedDaterange = null;
|
|
5636
|
+
/**
|
|
5637
|
+
* Event triggered when value changes.
|
|
5638
|
+
*/
|
|
5639
|
+
this.valueChange = new EventEmitter();
|
|
5640
|
+
}
|
|
5641
|
+
/**
|
|
5642
|
+
* Selected daterange value.
|
|
5643
|
+
* @returns Selected daterange value.
|
|
5644
|
+
*/
|
|
5645
|
+
get selectedDaterange() {
|
|
5646
|
+
return this._selectedDaterange;
|
|
5647
|
+
}
|
|
5648
|
+
/**
|
|
5649
|
+
* Set selected daterange value.
|
|
5650
|
+
* @param value - New selected daterange value.
|
|
5651
|
+
* @param triggerEvent - Trigger change event (default true).
|
|
5652
|
+
*/
|
|
5653
|
+
updateSelectedDaterange(value, triggerEvent = true) {
|
|
5654
|
+
this._selectedDaterange = value;
|
|
5655
|
+
if (triggerEvent) {
|
|
5656
|
+
this.valueChange.emit(value);
|
|
5657
|
+
}
|
|
5658
|
+
}
|
|
5659
|
+
/**
|
|
5660
|
+
* Checks if daterange is valid.
|
|
5661
|
+
* Daterange is considered invalid when it's empty, or when one of it's properties is absent.
|
|
5662
|
+
* @returns Wether daterange is valid.
|
|
5663
|
+
*/
|
|
5664
|
+
isValid() {
|
|
5665
|
+
if (this._selectedDaterange == null || this._selectedDaterange.from == null || this._selectedDaterange.to == null) {
|
|
5666
|
+
return false;
|
|
5667
|
+
}
|
|
5668
|
+
return true;
|
|
5669
|
+
}
|
|
5670
|
+
}
|
|
5671
|
+
DaterangeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5672
|
+
DaterangeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeService });
|
|
5673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeService, decorators: [{
|
|
5674
|
+
type: Injectable
|
|
5675
|
+
}] });
|
|
5676
|
+
|
|
5677
|
+
class ClrAbstractContainer {
|
|
5678
|
+
constructor(clrLayout, daterangeControlStateService) {
|
|
5679
|
+
this.clrLayout = clrLayout;
|
|
5680
|
+
this.daterangeControlStateService = daterangeControlStateService;
|
|
5681
|
+
this.isFormControl = true;
|
|
5682
|
+
}
|
|
5683
|
+
/**
|
|
5684
|
+
* Detect if container is not part of an vertical form to apply correct grid classes.
|
|
5685
|
+
*/
|
|
5686
|
+
get addLayoutGrid() {
|
|
5687
|
+
var _a, _b;
|
|
5688
|
+
return !((_b = (_a = this.clrLayout) === null || _a === void 0 ? void 0 : _a.layoutService) === null || _b === void 0 ? void 0 : _b.isVertical());
|
|
5689
|
+
}
|
|
5690
|
+
/**
|
|
5691
|
+
* Wether to show the helper control.
|
|
5692
|
+
* @returns Wether to show the helper control.
|
|
5693
|
+
*/
|
|
5694
|
+
get showHelper() {
|
|
5695
|
+
if (this.controlHelperComponent == null) {
|
|
5696
|
+
return false;
|
|
5697
|
+
}
|
|
5698
|
+
// Helper Component exist and the state of the form is NONE (not touched).
|
|
5699
|
+
if (!this.daterangeControlStateService.touched) {
|
|
5700
|
+
return true;
|
|
5701
|
+
}
|
|
5702
|
+
// Or there is no success component but the state of the form is VALID - show helper information.
|
|
5703
|
+
if (this.controlSuccessComponent == null &&
|
|
5704
|
+
this.daterangeControlStateService.touched &&
|
|
5705
|
+
!this.daterangeControlStateService.invalid) {
|
|
5706
|
+
return true;
|
|
5707
|
+
}
|
|
5708
|
+
// Or there is no error component but the state of the form is INVALID - show helper information.
|
|
5709
|
+
if (this.controlErrorComponent == null && this.daterangeControlStateService.invalid) {
|
|
5710
|
+
return true;
|
|
5711
|
+
}
|
|
5712
|
+
return false;
|
|
5713
|
+
}
|
|
5714
|
+
/**
|
|
5715
|
+
* Wether to show the valid control.
|
|
5716
|
+
* @returns Wether to show the valid control.
|
|
5717
|
+
*/
|
|
5718
|
+
get showValid() {
|
|
5719
|
+
return !this.daterangeControlStateService.invalid && !!this.controlSuccessComponent;
|
|
5720
|
+
}
|
|
5721
|
+
/**
|
|
5722
|
+
* Wether to show the invalid control.
|
|
5723
|
+
* @returns Wether to show the invalid control.
|
|
5724
|
+
*/
|
|
5725
|
+
get showInvalid() {
|
|
5726
|
+
return this.daterangeControlStateService.invalid && !!this.controlErrorComponent;
|
|
5727
|
+
}
|
|
5728
|
+
/**
|
|
5729
|
+
* Disabled state.
|
|
5730
|
+
* @returns Disabled state.
|
|
5731
|
+
*/
|
|
5732
|
+
get disabled() {
|
|
5733
|
+
return this.daterangeControlStateService.disabled;
|
|
5734
|
+
}
|
|
5735
|
+
/**
|
|
5736
|
+
* If control is focused.
|
|
5737
|
+
* @returns Wether control is focused.
|
|
5738
|
+
*/
|
|
5739
|
+
get focus() {
|
|
5740
|
+
return this.daterangeControlStateService.focused;
|
|
5741
|
+
}
|
|
5742
|
+
/**
|
|
5743
|
+
* Wether control is invalid.
|
|
5744
|
+
* @returns Wether control is invalid.
|
|
5745
|
+
*/
|
|
5746
|
+
get isInvalid() {
|
|
5747
|
+
return this.daterangeControlStateService.invalid;
|
|
5748
|
+
}
|
|
5749
|
+
}
|
|
5750
|
+
ClrAbstractContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAbstractContainer, deps: [{ token: i1$1.ClrLayout, optional: true }, { token: DaterangeControlStateService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5751
|
+
ClrAbstractContainer.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ClrAbstractContainer, host: { properties: { "class.clr-form-control": "this.isFormControl", "class.clr-row": "this.addLayoutGrid" } }, queries: [{ propertyName: "labelComponent", first: true, predicate: ClrLabel, descendants: true }, { propertyName: "controlHelperComponent", first: true, predicate: ClrControlHelper, descendants: true }, { propertyName: "controlErrorComponent", first: true, predicate: ClrControlError, descendants: true }, { propertyName: "controlSuccessComponent", first: true, predicate: ClrControlSuccess, descendants: true }], ngImport: i0 });
|
|
5752
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAbstractContainer, decorators: [{
|
|
5753
|
+
type: Directive
|
|
5754
|
+
}], ctorParameters: function () {
|
|
5755
|
+
return [{ type: i1$1.ClrLayout, decorators: [{
|
|
5756
|
+
type: Optional
|
|
5757
|
+
}] }, { type: DaterangeControlStateService }];
|
|
5758
|
+
}, propDecorators: { isFormControl: [{
|
|
5759
|
+
type: HostBinding,
|
|
5760
|
+
args: ['class.clr-form-control']
|
|
5761
|
+
}], addLayoutGrid: [{
|
|
5762
|
+
type: HostBinding,
|
|
5763
|
+
args: ['class.clr-row']
|
|
5764
|
+
}], labelComponent: [{
|
|
5765
|
+
type: ContentChild,
|
|
5766
|
+
args: [ClrLabel]
|
|
5767
|
+
}], controlHelperComponent: [{
|
|
5768
|
+
type: ContentChild,
|
|
5769
|
+
args: [ClrControlHelper]
|
|
5770
|
+
}], controlErrorComponent: [{
|
|
5771
|
+
type: ContentChild,
|
|
5772
|
+
args: [ClrControlError]
|
|
5773
|
+
}], controlSuccessComponent: [{
|
|
5774
|
+
type: ContentChild,
|
|
5775
|
+
args: [ClrControlSuccess]
|
|
5776
|
+
}] } });
|
|
5777
|
+
|
|
5778
|
+
/**
|
|
5779
|
+
* Daterange parsing service.
|
|
5780
|
+
* Heavy inspired by `date-io.service.ts` from Clarity.
|
|
5781
|
+
* https://github.com/vmware-clarity/ng-clarity/blob/a21fe726fe91ae3c929b8f016359afe354bb89c6/projects/angular/src/forms/datepicker/providers/date-io.service.ts
|
|
5782
|
+
*/
|
|
5783
|
+
class DaterangeParsingService {
|
|
5784
|
+
constructor(locale) {
|
|
5785
|
+
this.locale = locale;
|
|
5786
|
+
this.localeDelimiter = [];
|
|
5787
|
+
const localeFormat = getLocaleDateFormat(this.locale, FormatWidth.Short);
|
|
5788
|
+
const format = localeFormat.toLocaleLowerCase();
|
|
5789
|
+
if (LITTLE_ENDIAN_REGEX.test(format)) {
|
|
5790
|
+
this.localeDisplayFormat = LITTLE_ENDIAN;
|
|
5791
|
+
}
|
|
5792
|
+
else if (MIDDLE_ENDIAN_REGEX.test(format)) {
|
|
5793
|
+
this.localeDisplayFormat = MIDDLE_ENDIAN;
|
|
5794
|
+
}
|
|
5795
|
+
else {
|
|
5796
|
+
this.localeDisplayFormat = BIG_ENDIAN;
|
|
5797
|
+
}
|
|
5798
|
+
// Splitting it by date, month and year, leaves us with the delimiters.
|
|
5799
|
+
// E.g. `"dd/MM/y".split(/d+|m+|y+/i)` results in `["", "/", "/", ""]`.
|
|
5800
|
+
const delimiters = localeFormat.split(DELIMITER_REGEX);
|
|
5801
|
+
this.localeDelimiter = [delimiters[1], delimiters[2]];
|
|
5802
|
+
}
|
|
5803
|
+
/** Locale format. */
|
|
5804
|
+
get localeFormat() {
|
|
5805
|
+
return (this.localeDisplayFormat.format[0] +
|
|
5806
|
+
this.localeDelimiter[0] +
|
|
5807
|
+
this.localeDisplayFormat.format[1] +
|
|
5808
|
+
this.localeDelimiter[1] +
|
|
5809
|
+
this.localeDisplayFormat.format[2]);
|
|
5810
|
+
}
|
|
5811
|
+
/**
|
|
5812
|
+
* Convert daterange to locale friendly text.
|
|
5813
|
+
* @param daterange - Daterange.
|
|
5814
|
+
* @param separator - Separator between 'from' and 'to' dates.
|
|
5815
|
+
* @returns Friendly daterange text.
|
|
5816
|
+
*/
|
|
5817
|
+
toLocaleString(daterange, separator = SEPARATOR_TEXT_DEFAULT) {
|
|
5818
|
+
if (daterange == null) {
|
|
5819
|
+
return '';
|
|
5820
|
+
}
|
|
5821
|
+
const { from, to } = daterange;
|
|
5822
|
+
if (from == null || to == null) {
|
|
5823
|
+
return '';
|
|
5824
|
+
}
|
|
5825
|
+
const fromDate = from.toDate();
|
|
5826
|
+
const toDate = to.toDate();
|
|
5827
|
+
const fromDateStr = this.toLocaleDisplayFormatString(fromDate);
|
|
5828
|
+
const toDateStr = this.toLocaleDisplayFormatString(toDate);
|
|
5829
|
+
return fromDateStr + separator + toDateStr;
|
|
5830
|
+
}
|
|
5831
|
+
/**
|
|
5832
|
+
* Convert date to locale display format string.
|
|
5833
|
+
* @param date - Javascript Date object.
|
|
5834
|
+
* @returns Locale display format string.
|
|
5835
|
+
*/
|
|
5836
|
+
toLocaleDisplayFormatString(date) {
|
|
5837
|
+
const dateNo = date.getDate();
|
|
5838
|
+
const monthNo = date.getMonth() + 1;
|
|
5839
|
+
const yearNo = date.getFullYear();
|
|
5840
|
+
const dateStr = this.pad(dateNo);
|
|
5841
|
+
const monthStr = this.pad(monthNo);
|
|
5842
|
+
const delim1 = this.localeDelimiter[0];
|
|
5843
|
+
const delim2 = this.localeDelimiter[1];
|
|
5844
|
+
if (this.localeDisplayFormat === LITTLE_ENDIAN) {
|
|
5845
|
+
return dateStr + delim1 + monthStr + delim2 + yearNo;
|
|
5846
|
+
}
|
|
5847
|
+
else if (this.localeDisplayFormat === MIDDLE_ENDIAN) {
|
|
5848
|
+
return monthStr + delim1 + dateStr + delim2 + yearNo;
|
|
5849
|
+
}
|
|
5850
|
+
else {
|
|
5851
|
+
return yearNo + delim1 + monthStr + delim2 + dateStr;
|
|
5852
|
+
}
|
|
5853
|
+
}
|
|
5854
|
+
/**
|
|
5855
|
+
* String padding with zeros.
|
|
5856
|
+
* @param num - Number to pad.
|
|
5857
|
+
* @returns Padded string.
|
|
5858
|
+
*/
|
|
5859
|
+
pad(num) {
|
|
5860
|
+
return num < 10 ? `0${num}` : `${num}`;
|
|
5861
|
+
}
|
|
5862
|
+
/**
|
|
5863
|
+
* Parse daterange string to daterange object.
|
|
5864
|
+
* @param daterangeString - Daterange string.
|
|
5865
|
+
* @param separator - Separator text.
|
|
5866
|
+
* @returns Daterange object.
|
|
5867
|
+
*/
|
|
5868
|
+
parse(daterangeString, separator = SEPARATOR_TEXT_DEFAULT) {
|
|
5869
|
+
if (daterangeString == null || daterangeString === '') {
|
|
5870
|
+
return null;
|
|
5871
|
+
}
|
|
5872
|
+
const [fromString, toString] = daterangeString.split(separator);
|
|
5873
|
+
const from = this.getDayModelFromDateString(fromString);
|
|
5874
|
+
const to = this.getDayModelFromDateString(toString);
|
|
5875
|
+
if (from == null && to == null) {
|
|
5876
|
+
return null;
|
|
5877
|
+
}
|
|
5878
|
+
return { from, to };
|
|
5879
|
+
}
|
|
5880
|
+
/**
|
|
5881
|
+
* Get `DayModel` from date string.
|
|
5882
|
+
* @param dateString - Date string.
|
|
5883
|
+
* @returns DayModel.
|
|
5884
|
+
*/
|
|
5885
|
+
getDayModelFromDateString(dateString) {
|
|
5886
|
+
if (dateString == null || dateString === '') {
|
|
5887
|
+
return null;
|
|
5888
|
+
}
|
|
5889
|
+
const dateParts = dateString.match(USER_INPUT_REGEX);
|
|
5890
|
+
if (dateParts == null || dateParts.length !== 3) {
|
|
5891
|
+
return null;
|
|
5892
|
+
}
|
|
5893
|
+
const [firstPart, secondPart, thirdPart] = dateParts;
|
|
5894
|
+
if (this.localeDisplayFormat === LITTLE_ENDIAN) {
|
|
5895
|
+
// secondPart is month && firstPart is date.
|
|
5896
|
+
return this.getDayModelFromDateParts(thirdPart, secondPart, firstPart);
|
|
5897
|
+
}
|
|
5898
|
+
else if (this.localeDisplayFormat === MIDDLE_ENDIAN) {
|
|
5899
|
+
// firstPart is month && secondPart is date.
|
|
5900
|
+
return this.getDayModelFromDateParts(thirdPart, firstPart, secondPart);
|
|
5901
|
+
}
|
|
5902
|
+
else {
|
|
5903
|
+
// secondPart is month && thirdPart is date.
|
|
5904
|
+
return this.getDayModelFromDateParts(firstPart, secondPart, thirdPart);
|
|
5905
|
+
}
|
|
5906
|
+
}
|
|
5907
|
+
/**
|
|
5908
|
+
* Get `DayModel` from date string parts.
|
|
5909
|
+
* @param yearString - Year string.
|
|
5910
|
+
* @param monthString - Month string.
|
|
5911
|
+
* @param dateString - Date string.
|
|
5912
|
+
* @returns DayModel.
|
|
5913
|
+
*/
|
|
5914
|
+
getDayModelFromDateParts(yearString, monthString, dateString) {
|
|
5915
|
+
// Check for valid date part strings.
|
|
5916
|
+
let year = parseInt(yearString);
|
|
5917
|
+
if (isNaN(year)) {
|
|
5918
|
+
return null;
|
|
5919
|
+
}
|
|
5920
|
+
let month = parseInt(monthString);
|
|
5921
|
+
if (isNaN(month)) {
|
|
5922
|
+
return null;
|
|
5923
|
+
}
|
|
5924
|
+
const date = parseInt(dateString);
|
|
5925
|
+
if (isNaN(date)) {
|
|
5926
|
+
return null;
|
|
5927
|
+
}
|
|
5928
|
+
// Convert year to 4 digit year.
|
|
5929
|
+
year = this.parseToFourDigitYear(year);
|
|
5930
|
+
if (year == null) {
|
|
5931
|
+
return null;
|
|
5932
|
+
}
|
|
5933
|
+
// Month is zero-indexed.
|
|
5934
|
+
month -= 1;
|
|
5935
|
+
// Creating new Javascript Date object, because it will automatically take care of
|
|
5936
|
+
// switching to next or previous months & years without we having to worry about it.
|
|
5937
|
+
const parsedDate = new Date(year, month, date);
|
|
5938
|
+
if (isNaN(parsedDate.getTime())) {
|
|
5939
|
+
return null;
|
|
5940
|
+
}
|
|
5941
|
+
return new DayModel(parsedDate);
|
|
5942
|
+
}
|
|
5943
|
+
/**
|
|
5944
|
+
* Takes in a year and if it is a 2 digit year, returns the corresponding 4 digit year.
|
|
5945
|
+
* Window of 80 years before and 20 years after the present year.
|
|
5946
|
+
* Credit: https://github.com/globalizejs/globalize/blob/e1b31cd6a4f1cff75b185b68b7a32220aac5196f/src/date/parse.js
|
|
5947
|
+
* @param year - Year.
|
|
5948
|
+
* @returns Four-digit year.
|
|
5949
|
+
*/
|
|
5950
|
+
parseToFourDigitYear(year) {
|
|
5951
|
+
// Impossible years.
|
|
5952
|
+
if (year > 9999 || (year > 100 && year < 999) || year < 10) {
|
|
5953
|
+
return null;
|
|
5954
|
+
}
|
|
5955
|
+
if (year > 999) {
|
|
5956
|
+
return year;
|
|
5957
|
+
}
|
|
5958
|
+
const currYear = new Date().getFullYear();
|
|
5959
|
+
const century = Math.floor(currYear / 100) * 100;
|
|
5960
|
+
let result = year + century;
|
|
5961
|
+
if (result > currYear + 20) {
|
|
5962
|
+
result = result - 100;
|
|
5963
|
+
}
|
|
5964
|
+
return result;
|
|
5965
|
+
}
|
|
5966
|
+
}
|
|
5967
|
+
DaterangeParsingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeParsingService, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5968
|
+
DaterangeParsingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeParsingService, providedIn: 'root' });
|
|
5969
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeParsingService, decorators: [{
|
|
5970
|
+
type: Injectable,
|
|
5971
|
+
args: [{
|
|
5972
|
+
providedIn: 'root',
|
|
5973
|
+
}]
|
|
5974
|
+
}], ctorParameters: function () {
|
|
5975
|
+
return [{ type: undefined, decorators: [{
|
|
5976
|
+
type: Inject,
|
|
5977
|
+
args: [LOCALE_ID]
|
|
5978
|
+
}] }];
|
|
5979
|
+
} });
|
|
5980
|
+
|
|
5981
|
+
/**
|
|
5982
|
+
* Daterangepicker.
|
|
5983
|
+
*/
|
|
5984
|
+
class ClrDaterangepickerDirective {
|
|
5985
|
+
constructor(control, element, renderer, daterangeControlStateService, controlIdService, daterangeService, daterangeParsingService) {
|
|
5986
|
+
this.control = control;
|
|
5987
|
+
this.element = element;
|
|
5988
|
+
this.renderer = renderer;
|
|
5989
|
+
this.daterangeControlStateService = daterangeControlStateService;
|
|
5990
|
+
this.controlIdService = controlIdService;
|
|
5991
|
+
this.daterangeService = daterangeService;
|
|
5992
|
+
this.daterangeParsingService = daterangeParsingService;
|
|
5993
|
+
/**
|
|
5994
|
+
* Locale text between 'from' and 'to' dateranges.
|
|
5995
|
+
*/
|
|
5996
|
+
this.separatorText = SEPARATOR_TEXT_DEFAULT;
|
|
5997
|
+
/**
|
|
5998
|
+
* Event that is triggered when value changes.
|
|
5999
|
+
*/
|
|
6000
|
+
this.valueChange = new EventEmitter();
|
|
6001
|
+
/** Set the `type` attribute always to "text", to not get the native datepicker. */
|
|
6002
|
+
this.inputType = 'text';
|
|
6003
|
+
this.inputClass = true;
|
|
6004
|
+
/** List of subscriptions to later destroy. */
|
|
6005
|
+
this.subscriptions = [];
|
|
6006
|
+
this.onChanged = (_value) => undefined;
|
|
6007
|
+
this.onTouched = (_value) => undefined;
|
|
6008
|
+
// To get access to the NgControl, we had to remove the `NG_VALUE_ACCESSOR`
|
|
6009
|
+
// provider and set them manually, while still keeping the interfaces.
|
|
6010
|
+
this.control.valueAccessor = this;
|
|
6011
|
+
}
|
|
6012
|
+
/**
|
|
6013
|
+
* Minimum date that can be selected.
|
|
6014
|
+
*/
|
|
6015
|
+
set min(value) {
|
|
6016
|
+
this.daterangeService.minDate = !value ? null : new DayModel(value);
|
|
6017
|
+
}
|
|
6018
|
+
/**
|
|
6019
|
+
* Maximum date that can be selected.
|
|
6020
|
+
*/
|
|
6021
|
+
set max(value) {
|
|
6022
|
+
this.daterangeService.maxDate = !value ? null : new DayModel(value);
|
|
6023
|
+
}
|
|
6024
|
+
get placeholderText() {
|
|
6025
|
+
var _a;
|
|
6026
|
+
return ((_a = this.placeholder) !== null && _a !== void 0 ? _a : this.daterangeParsingService.localeFormat + this.separatorText + this.daterangeParsingService.localeFormat);
|
|
6027
|
+
}
|
|
6028
|
+
/**
|
|
6029
|
+
* Id-attribute.
|
|
6030
|
+
*/
|
|
6031
|
+
get id() {
|
|
6032
|
+
return this.controlIdService.id;
|
|
6033
|
+
}
|
|
6034
|
+
/**
|
|
6035
|
+
* Id-attribute.
|
|
6036
|
+
* @returns Id-attribute.
|
|
6037
|
+
*/
|
|
6038
|
+
set id(value) {
|
|
6039
|
+
this.controlIdService.id = value;
|
|
6040
|
+
}
|
|
6041
|
+
/**
|
|
6042
|
+
* Disable control.
|
|
6043
|
+
*/
|
|
6044
|
+
set disabled(value) {
|
|
6045
|
+
this.daterangeControlStateService.disabled = value;
|
|
6046
|
+
}
|
|
6047
|
+
/**
|
|
6048
|
+
* Disabled state.
|
|
6049
|
+
* @returns Disabled state.
|
|
6050
|
+
*/
|
|
6051
|
+
get disabled() {
|
|
6052
|
+
return this.daterangeControlStateService.disabled;
|
|
6053
|
+
}
|
|
6054
|
+
ngOnInit() {
|
|
6055
|
+
this.listenForDaterangeValueChanges();
|
|
6056
|
+
this.listenForControlStatusChanges();
|
|
6057
|
+
}
|
|
6058
|
+
ngOnDestroy() {
|
|
6059
|
+
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
6060
|
+
}
|
|
6061
|
+
/**
|
|
6062
|
+
* Listen for daterange value changes.
|
|
6063
|
+
*/
|
|
6064
|
+
listenForDaterangeValueChanges() {
|
|
6065
|
+
this.subscriptions.push(this.daterangeService.valueChange.subscribe((_daterange) => {
|
|
6066
|
+
this.triggerChange();
|
|
6067
|
+
}));
|
|
6068
|
+
}
|
|
6069
|
+
/**
|
|
6070
|
+
* Listen for control status changes.
|
|
6071
|
+
*/
|
|
6072
|
+
listenForControlStatusChanges() {
|
|
6073
|
+
this.subscriptions.push(this.control.statusChanges.subscribe((_status) => {
|
|
6074
|
+
this.daterangeControlStateService.updateStatus(this.control.control);
|
|
6075
|
+
}));
|
|
6076
|
+
}
|
|
6077
|
+
/**
|
|
6078
|
+
* Listen to manual changes to the input.
|
|
6079
|
+
* @param target - Input element.
|
|
6080
|
+
*/
|
|
6081
|
+
onChangeEvent(target) {
|
|
6082
|
+
// Remove 'invalid' error.
|
|
6083
|
+
if (this.control.control.hasError('invalid')) {
|
|
6084
|
+
delete this.control.control.errors.invalid;
|
|
6085
|
+
}
|
|
6086
|
+
// If there is nothing to parse, `ClrDaterangeRequiredValidator` will take care of this.
|
|
6087
|
+
if (!target.value) {
|
|
6088
|
+
this.daterangeService.updateSelectedDaterange(null, true);
|
|
6089
|
+
return;
|
|
6090
|
+
}
|
|
6091
|
+
const daterange = this.daterangeParsingService.parse(target.value, this.separatorText);
|
|
6092
|
+
const invalidDaterange = daterange == null || daterange.from == null || daterange.to == null;
|
|
6093
|
+
// Invalid manual daterange specified.
|
|
6094
|
+
if (invalidDaterange) {
|
|
6095
|
+
this.control.control.setErrors({
|
|
6096
|
+
invalid: target.value,
|
|
6097
|
+
});
|
|
6098
|
+
}
|
|
6099
|
+
// Update selected daterange, but only notify when valid.
|
|
6100
|
+
this.daterangeService.updateSelectedDaterange(daterange, !invalidDaterange);
|
|
6101
|
+
}
|
|
6102
|
+
/**
|
|
6103
|
+
* Listen to focus event.
|
|
6104
|
+
*/
|
|
6105
|
+
focusEvent() {
|
|
6106
|
+
this.daterangeControlStateService.focused = true;
|
|
6107
|
+
}
|
|
6108
|
+
/**
|
|
6109
|
+
* Listen to blur event.
|
|
6110
|
+
*/
|
|
6111
|
+
blurEvent() {
|
|
6112
|
+
this.daterangeControlStateService.focused = false;
|
|
6113
|
+
}
|
|
6114
|
+
/**
|
|
6115
|
+
* Focus input.
|
|
6116
|
+
*/
|
|
6117
|
+
focus() {
|
|
6118
|
+
this.element.nativeElement.focus();
|
|
6119
|
+
}
|
|
6120
|
+
/**
|
|
6121
|
+
* Trigger events to notify form controls, trigger validation and update attributes/properties.
|
|
6122
|
+
*/
|
|
6123
|
+
triggerChange() {
|
|
6124
|
+
let daterange = this.daterangeService.selectedDaterange;
|
|
6125
|
+
// When `from` or `to` properties are not set, return null.
|
|
6126
|
+
// This will trigger the `required` validator (if present).
|
|
6127
|
+
if (!this.daterangeService.isValid()) {
|
|
6128
|
+
daterange = null;
|
|
6129
|
+
}
|
|
6130
|
+
// Mark control dirty.
|
|
6131
|
+
this.onTouched(daterange);
|
|
6132
|
+
// Update NgModel.
|
|
6133
|
+
this.onChanged(daterange);
|
|
6134
|
+
// Notify parent.
|
|
6135
|
+
this.valueChange.emit(daterange);
|
|
6136
|
+
// Update attributes/properties.
|
|
6137
|
+
this.updateInput();
|
|
6138
|
+
}
|
|
6139
|
+
/**
|
|
6140
|
+
* Update input with friendly daterange text.
|
|
6141
|
+
*/
|
|
6142
|
+
updateInput() {
|
|
6143
|
+
const dateString = this.daterangeParsingService.toLocaleString(this.daterangeService.selectedDaterange, this.separatorText);
|
|
6144
|
+
this.renderer.setProperty(this.element.nativeElement, 'value', dateString);
|
|
6145
|
+
}
|
|
6146
|
+
/**
|
|
6147
|
+
* ControlValueAccessor method. Set value from NgModel.
|
|
6148
|
+
* @param value - Daterange value.
|
|
6149
|
+
*/
|
|
6150
|
+
writeValue(value) {
|
|
6151
|
+
this.daterangeService.updateSelectedDaterange(value);
|
|
6152
|
+
}
|
|
6153
|
+
/**
|
|
6154
|
+
* ControlValueAccessor method. Register change event. When value changes.
|
|
6155
|
+
* @param fn - Change event.
|
|
6156
|
+
*/
|
|
6157
|
+
registerOnChange(fn) {
|
|
6158
|
+
this.onChanged = fn;
|
|
6159
|
+
}
|
|
6160
|
+
/**
|
|
6161
|
+
* ControlValueAccessor method. Register touch event. When control is dirty.
|
|
6162
|
+
* @param fn - Touch event.
|
|
6163
|
+
*/
|
|
6164
|
+
registerOnTouched(fn) {
|
|
6165
|
+
this.onTouched = fn;
|
|
6166
|
+
}
|
|
6167
|
+
/**
|
|
6168
|
+
* ControlValueAccessor method. Set disabled state.
|
|
6169
|
+
* @param disabled - Disabled state.
|
|
6170
|
+
*/
|
|
6171
|
+
setDisabledState(disabled) {
|
|
6172
|
+
this.daterangeControlStateService.disabled = disabled;
|
|
6173
|
+
}
|
|
6174
|
+
}
|
|
6175
|
+
ClrDaterangepickerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerDirective, deps: [{ token: i3$1.NgControl, self: true }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DaterangeControlStateService }, { token: ControlIdService }, { token: DaterangeService }, { token: DaterangeParsingService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6176
|
+
ClrDaterangepickerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ClrDaterangepickerDirective, selector: "[clrDaterangepicker]", inputs: { min: "min", max: "max", separatorText: "separatorText", placeholder: "placeholder", id: "id", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "change": "onChangeEvent($event.target)", "focus": "focusEvent()", "blur": "blurEvent()" }, properties: { "attr.placeholder": "this.placeholderText", "id": "this.id", "disabled": "this.disabled", "attr.type": "this.inputType", "class.clr-input": "this.inputClass" } }, ngImport: i0 });
|
|
6177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerDirective, decorators: [{
|
|
6178
|
+
type: Directive,
|
|
6179
|
+
args: [{
|
|
6180
|
+
selector: '[clrDaterangepicker]',
|
|
6181
|
+
}]
|
|
6182
|
+
}], ctorParameters: function () {
|
|
6183
|
+
return [{ type: i3$1.NgControl, decorators: [{
|
|
6184
|
+
type: Self
|
|
6185
|
+
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: DaterangeControlStateService }, { type: ControlIdService }, { type: DaterangeService }, { type: DaterangeParsingService }];
|
|
6186
|
+
}, propDecorators: { min: [{
|
|
6187
|
+
type: Input
|
|
6188
|
+
}], max: [{
|
|
6189
|
+
type: Input
|
|
6190
|
+
}], separatorText: [{
|
|
6191
|
+
type: Input
|
|
6192
|
+
}], placeholder: [{
|
|
6193
|
+
type: Input
|
|
6194
|
+
}], placeholderText: [{
|
|
6195
|
+
type: HostBinding,
|
|
6196
|
+
args: ['attr.placeholder']
|
|
6197
|
+
}], id: [{
|
|
6198
|
+
type: HostBinding
|
|
6199
|
+
}, {
|
|
6200
|
+
type: Input
|
|
6201
|
+
}], disabled: [{
|
|
6202
|
+
type: HostBinding,
|
|
6203
|
+
args: ['disabled']
|
|
6204
|
+
}, {
|
|
6205
|
+
type: Input
|
|
6206
|
+
}], valueChange: [{
|
|
6207
|
+
type: Output
|
|
6208
|
+
}], inputType: [{
|
|
6209
|
+
type: HostBinding,
|
|
6210
|
+
args: ['attr.type']
|
|
6211
|
+
}], inputClass: [{
|
|
6212
|
+
type: HostBinding,
|
|
6213
|
+
args: ['class.clr-input']
|
|
6214
|
+
}], onChangeEvent: [{
|
|
6215
|
+
type: HostListener,
|
|
6216
|
+
args: ['change', ['$event.target']]
|
|
6217
|
+
}], focusEvent: [{
|
|
6218
|
+
type: HostListener,
|
|
6219
|
+
args: ['focus']
|
|
6220
|
+
}], blurEvent: [{
|
|
6221
|
+
type: HostListener,
|
|
6222
|
+
args: ['blur']
|
|
6223
|
+
}] } });
|
|
6224
|
+
|
|
6225
|
+
ClarityIcons.addIcons(calendarIcon, exclamationCircleIcon, checkCircleIcon, windowCloseIcon);
|
|
6226
|
+
/**
|
|
6227
|
+
* Daterangepicker container.
|
|
6228
|
+
*/
|
|
6229
|
+
class ClrDaterangepickerContainerComponent extends ClrAbstractContainer {
|
|
6230
|
+
constructor(clrPopoverEventsService, clrPopoverToggleService, clrCommonStringsService, clrLayout, daterangeControlStateService, openedDatepickersTrackerService, daterangeService, daterangeParsingService) {
|
|
6231
|
+
super(clrLayout, daterangeControlStateService);
|
|
6232
|
+
this.clrPopoverEventsService = clrPopoverEventsService;
|
|
6233
|
+
this.clrPopoverToggleService = clrPopoverToggleService;
|
|
6234
|
+
this.clrCommonStringsService = clrCommonStringsService;
|
|
6235
|
+
this.clrLayout = clrLayout;
|
|
6236
|
+
this.daterangeControlStateService = daterangeControlStateService;
|
|
6237
|
+
this.openedDatepickersTrackerService = openedDatepickersTrackerService;
|
|
6238
|
+
this.daterangeService = daterangeService;
|
|
6239
|
+
this.daterangeParsingService = daterangeParsingService;
|
|
6240
|
+
/**
|
|
6241
|
+
* List of presets.
|
|
6242
|
+
*/
|
|
6243
|
+
this.presets = [];
|
|
6244
|
+
/**
|
|
6245
|
+
* Text for the 'from' label.
|
|
6246
|
+
*/
|
|
6247
|
+
this.labelFrom = TRANSLATIONS.from;
|
|
6248
|
+
/**
|
|
6249
|
+
* Text for the 'to' label.
|
|
6250
|
+
*/
|
|
6251
|
+
this.labelTo = TRANSLATIONS.to;
|
|
6252
|
+
/** CSS classes. */
|
|
6253
|
+
this.classes = 'clr-date-container';
|
|
6254
|
+
/**
|
|
6255
|
+
* Popover open state.
|
|
6256
|
+
*/
|
|
6257
|
+
this.open = false;
|
|
6258
|
+
/**
|
|
6259
|
+
* Popover position config.
|
|
6260
|
+
*/
|
|
6261
|
+
this.popoverPosition = PopoverPositions['bottom-left'];
|
|
6262
|
+
/** List of subscriptions to later destroy. */
|
|
6263
|
+
this.subscriptions = [];
|
|
6264
|
+
}
|
|
6265
|
+
/**
|
|
6266
|
+
* Set popover position.
|
|
6267
|
+
*/
|
|
6268
|
+
set clrPosition(position) {
|
|
6269
|
+
if (position && PopoverPositions[position]) {
|
|
6270
|
+
this.popoverPosition = PopoverPositions[position];
|
|
6271
|
+
}
|
|
6272
|
+
}
|
|
6273
|
+
/**
|
|
6274
|
+
* Date from.
|
|
6275
|
+
* @returns Date from.
|
|
6276
|
+
*/
|
|
6277
|
+
get dateFrom() {
|
|
6278
|
+
var _a;
|
|
6279
|
+
return (_a = this.daterangeService.selectedDaterange) === null || _a === void 0 ? void 0 : _a.from;
|
|
6280
|
+
}
|
|
6281
|
+
/**
|
|
6282
|
+
* Date to.
|
|
6283
|
+
* @returns Date to.
|
|
6284
|
+
*/
|
|
6285
|
+
get dateTo() {
|
|
6286
|
+
var _a;
|
|
6287
|
+
return (_a = this.daterangeService.selectedDaterange) === null || _a === void 0 ? void 0 : _a.to;
|
|
6288
|
+
}
|
|
6289
|
+
/**
|
|
6290
|
+
* Minimum date that can be selected.
|
|
6291
|
+
* @returns Minimum date that can be selected.
|
|
6292
|
+
*/
|
|
6293
|
+
get minDate() {
|
|
6294
|
+
return this.daterangeService.minDate;
|
|
6295
|
+
}
|
|
6296
|
+
/**
|
|
6297
|
+
* Maximum date that can be selected.
|
|
6298
|
+
* @returns Maximum date that can be selected.
|
|
6299
|
+
*/
|
|
6300
|
+
get maxDate() {
|
|
6301
|
+
return this.daterangeService.maxDate;
|
|
6302
|
+
}
|
|
6303
|
+
/**
|
|
6304
|
+
* Get friendly daterange text.
|
|
6305
|
+
* @returns Friendly daterange text.
|
|
6306
|
+
*/
|
|
6307
|
+
get friendlyDaterange() {
|
|
6308
|
+
return this._friendlyDaterange || this.commonStrings.datepickerToggleChooseDateLabel;
|
|
6309
|
+
}
|
|
6310
|
+
/**
|
|
6311
|
+
* List of common translation keys.
|
|
6312
|
+
*/
|
|
6313
|
+
get commonStrings() {
|
|
6314
|
+
return this.clrCommonStringsService.keys;
|
|
6315
|
+
}
|
|
6316
|
+
ngAfterViewInit() {
|
|
6317
|
+
if (this.daterangepickerDirective == null) {
|
|
6318
|
+
throw new Error('`ClrDaterangepickerContainerComponent` requires an child `ClrDaterangepickerDirective`');
|
|
6319
|
+
}
|
|
6320
|
+
this.listenForDaterangeValueChanges();
|
|
6321
|
+
this.listenForOpenedDatepickersTrackerChanges();
|
|
6322
|
+
this.listenForPopoverToggleChanges();
|
|
6323
|
+
}
|
|
6324
|
+
ngOnDestroy() {
|
|
6325
|
+
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
6326
|
+
}
|
|
6327
|
+
/**
|
|
6328
|
+
* Listen for daterange value changes.
|
|
6329
|
+
*/
|
|
6330
|
+
listenForDaterangeValueChanges() {
|
|
6331
|
+
this.subscriptions.push(this.daterangeService.valueChange.subscribe((daterange) => {
|
|
6332
|
+
this._friendlyDaterange = this.daterangeParsingService.toLocaleString(daterange, this.daterangepickerDirective.separatorText);
|
|
6333
|
+
}));
|
|
6334
|
+
}
|
|
6335
|
+
/**
|
|
6336
|
+
* Listen for any opened datepickers tracker state changes.
|
|
6337
|
+
*/
|
|
6338
|
+
listenForOpenedDatepickersTrackerChanges() {
|
|
6339
|
+
this.subscriptions.push(this.openedDatepickersTrackerService.valueChange.subscribe(hasOpenDatePickers => {
|
|
6340
|
+
// When choosing an date in the DatePicker calender, all popovers are closed. Even our own popover.
|
|
6341
|
+
// Therefor we have to remove the ability to close our own popover.
|
|
6342
|
+
// Simply changing the `outsideClickClose` property after initialization does nothing.
|
|
6343
|
+
// We need to manually remove the listener, change the `outsideClickClose` property and re-attach the click listener.
|
|
6344
|
+
// Steps to reproduce with 2 daterangepickers:
|
|
6345
|
+
// 1. Click on second daterangepicker action icon to open the popover.
|
|
6346
|
+
// 2. Click on one of the datepickers to open calender.
|
|
6347
|
+
// 3. Close datepicker.
|
|
6348
|
+
// 4. Click on first daterangepicker action icon. Error.
|
|
6349
|
+
this.clrPopoverEventsService.removeClickListener();
|
|
6350
|
+
this.clrPopoverEventsService.outsideClickClose = !hasOpenDatePickers;
|
|
6351
|
+
// We need to wait before we attach the click listener.
|
|
6352
|
+
requestAnimationFrame(() => {
|
|
6353
|
+
this.clrPopoverEventsService.addClickListener();
|
|
6354
|
+
});
|
|
6355
|
+
}));
|
|
6356
|
+
}
|
|
6357
|
+
/**
|
|
6358
|
+
* Listen for popover toggle changes.
|
|
6359
|
+
*/
|
|
6360
|
+
listenForPopoverToggleChanges() {
|
|
6361
|
+
this.subscriptions.push(this.clrPopoverToggleService.openChange.subscribe(opened => {
|
|
6362
|
+
// Focus first datepicker when popover opens.
|
|
6363
|
+
// Focus back to input when popover is closed.
|
|
6364
|
+
if (opened) {
|
|
6365
|
+
// Wait for the datepicker components to be rendered.
|
|
6366
|
+
requestAnimationFrame(() => {
|
|
6367
|
+
this.datepickerComponents.first.focus();
|
|
6368
|
+
});
|
|
6369
|
+
}
|
|
6370
|
+
else {
|
|
6371
|
+
this.daterangepickerDirective.focus();
|
|
6372
|
+
// When closing popover modal and daterange is not valid, reset model.
|
|
6373
|
+
if (!this.daterangeService.isValid()) {
|
|
6374
|
+
this.daterangeService.updateSelectedDaterange(null);
|
|
6375
|
+
}
|
|
6376
|
+
}
|
|
6377
|
+
}));
|
|
6378
|
+
}
|
|
6379
|
+
/**
|
|
6380
|
+
* Event triggered when date from changed.
|
|
6381
|
+
* @param value - Date from.
|
|
6382
|
+
*/
|
|
6383
|
+
onDateFromChange(value) {
|
|
6384
|
+
this.daterangeService.updateSelectedDaterange({
|
|
6385
|
+
from: value,
|
|
6386
|
+
to: this.dateTo,
|
|
6387
|
+
});
|
|
6388
|
+
}
|
|
6389
|
+
/**
|
|
6390
|
+
* Event triggered when date to changed.
|
|
6391
|
+
* @param value - Date to.
|
|
6392
|
+
*/
|
|
6393
|
+
onDateToChange(value) {
|
|
6394
|
+
this.daterangeService.updateSelectedDaterange({
|
|
6395
|
+
from: this.dateFrom,
|
|
6396
|
+
to: value,
|
|
6397
|
+
});
|
|
6398
|
+
}
|
|
6399
|
+
/**
|
|
6400
|
+
* Apply selected preset.
|
|
6401
|
+
* @param preset - Selected preset.
|
|
6402
|
+
*/
|
|
6403
|
+
applyPreset(preset) {
|
|
6404
|
+
const range = preset.range();
|
|
6405
|
+
this.daterangeService.updateSelectedDaterange(range);
|
|
6406
|
+
// Close popover here, because it's not possible to conditionally
|
|
6407
|
+
// apply `clrPopoverCloseButton` directive on preset button.
|
|
6408
|
+
if (this.daterangeService.isValid()) {
|
|
6409
|
+
this.clrPopoverToggleService.open = false;
|
|
6410
|
+
}
|
|
6411
|
+
}
|
|
6412
|
+
}
|
|
6413
|
+
ClrDaterangepickerContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerContainerComponent, deps: [{ token: i1$1.ClrPopoverEventsService }, { token: i1$1.ClrPopoverToggleService }, { token: i1$1.ClrCommonStringsService }, { token: i1$1.ClrLayout, optional: true }, { token: DaterangeControlStateService }, { token: OpenedDatepickersTrackerService }, { token: DaterangeService }, { token: DaterangeParsingService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6414
|
+
ClrDaterangepickerContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: ClrDaterangepickerContainerComponent, selector: "clr-daterangepicker-container", inputs: { presets: "presets", clrPosition: "clrPosition", labelFrom: "labelFrom", labelTo: "labelTo" }, host: { properties: { "class": "this.classes" } }, providers: [
|
|
6415
|
+
ClrPopoverToggleService,
|
|
6416
|
+
ClrPopoverEventsService,
|
|
6417
|
+
ClrPopoverPositionService,
|
|
6418
|
+
DaterangeControlStateService,
|
|
6419
|
+
DaterangeService,
|
|
6420
|
+
OpenedDatepickersTrackerService,
|
|
6421
|
+
ControlIdService,
|
|
6422
|
+
], queries: [{ propertyName: "daterangepickerDirective", first: true, predicate: ClrDaterangepickerDirective, descendants: true }], viewQueries: [{ propertyName: "datepickerComponents", predicate: ClrDatepickerComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"label\"></ng-content>\n<label *ngIf=\"!this.labelComponent && this.addLayoutGrid\"></label>\n<div\n class=\"clr-control-container\"\n [class.clr-error]=\"this.isInvalid\"\n [class.clr-col-12]=\"this.addLayoutGrid\"\n [class.clr-col-md-10]=\"this.addLayoutGrid\"\n>\n <div class=\"clr-input-wrapper\" clrPopoverAnchor>\n <div class=\"clr-input-group\" [class.clr-focus]=\"this.focus\">\n <ng-content select=\"[clrDaterangepicker]\"></ng-content>\n <button\n type=\"button\"\n class=\"clr-input-group-icon-action\"\n [disabled]=\"this.disabled\"\n [title]=\"this.friendlyDaterange\"\n [attr.aria-label]=\"this.friendlyDaterange\"\n clrPopoverOpenCloseButton\n >\n <cds-icon status=\"info\" shape=\"calendar\"></cds-icon>\n </button>\n </div>\n <cds-icon\n *ngIf=\"this.isInvalid\"\n class=\"clr-validate-icon\"\n shape=\"exclamation-circle\"\n status=\"danger\"\n aria-hidden=\"true\"\n ></cds-icon>\n <cds-icon\n *ngIf=\"!this.isInvalid\"\n class=\"clr-validate-icon\"\n shape=\"check-circle\"\n status=\"success\"\n aria-hidden=\"true\"\n ></cds-icon>\n </div>\n <ng-content select=\"clr-control-helper\" *ngIf=\"this.showHelper\"></ng-content>\n <ng-content select=\"clr-control-error\" *ngIf=\"this.showInvalid\"></ng-content>\n <ng-content select=\"clr-control-success\" *ngIf=\"this.showValid\"></ng-content>\n\n <div\n class=\"clr-daterangepicker-container-popup datepicker\"\n *clrPopoverContent=\"this.open; at: this.popoverPosition; outsideClickToClose: true; scrollToClose: true\"\n >\n <button\n class=\"btn btn-sm btn-link close\"\n clrPopoverCloseButton\n type=\"button\"\n [attr.aria-label]=\"this.commonStrings.close\"\n >\n <cds-icon shape=\"window-close\" aria-hidden=\"true\" [attr.title]=\"this.commonStrings.close\"></cds-icon>\n <span class=\"clr-sr-only\">{{ this.commonStrings.close }}</span>\n </button>\n <div class=\"clr-daterangepicker-container-popup-content\">\n <form clrForm [clrLayout]=\"'vertical'\">\n <clr-datepicker\n class=\"clr-datepicker\"\n [label]=\"this.labelFrom\"\n [value]=\"this.dateFrom\"\n [minDate]=\"this.minDate\"\n [maxDate]=\"this.maxDate\"\n (valueChange)=\"this.onDateFromChange($event)\"\n >\n </clr-datepicker>\n <clr-datepicker\n class=\"clr-datepicker\"\n [label]=\"this.labelTo\"\n [value]=\"this.dateTo\"\n [minDate]=\"this.minDate\"\n [maxDate]=\"this.maxDate\"\n (valueChange)=\"this.onDateToChange($event)\"\n >\n </clr-datepicker>\n </form>\n <div class=\"clr-daterangepicker-container-popup-content-presets\" *ngIf=\"this.presets?.length > 0\">\n <ng-container *ngFor=\"let preset of this.presets\">\n <button class=\"btn btn-outline btn-sm btn-block\" type=\"button\" (click)=\"this.applyPreset(preset)\">\n {{ preset.text }}\n </button>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n", styles: [".clr-input-wrapper>.clr-input-group{max-width:-moz-fit-content;max-width:fit-content;padding-right:1.5rem}.clr-input-wrapper>.clr-input-group ::ng-deep>.clr-input{width:100%;padding:0 .3rem}.clr-daterangepicker-container-popup.datepicker{padding:0;width:auto;height:auto;display:block}.clr-daterangepicker-container-popup.datepicker .clr-smart-close-button{min-width:1.2rem;margin:0;padding:0;position:absolute;right:0}.clr-daterangepicker-container-popup.datepicker .clr-daterangepicker-container-popup-content{padding:.6rem;display:flex;flex-direction:row}.clr-daterangepicker-container-popup.datepicker .clr-daterangepicker-container-popup-content .clr-form ::ng-deep clr-datepicker:first-of-type ::ng-deep clr-date-container{margin-top:0}.clr-daterangepicker-container-popup.datepicker .clr-daterangepicker-container-popup-content .clr-daterangepicker-container-popup-content-presets{margin-left:.6rem;padding:.3rem}.clr-daterangepicker-container-popup.datepicker .clr-daterangepicker-container-popup-content .clr-daterangepicker-container-popup-content-presets .btn{margin-right:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: i1$1.ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i1$1.ClrForm, selector: "[clrForm]", inputs: ["clrLabelSize"] }, { kind: "directive", type: i1$1.ClrLayout, selector: "[clrForm][clrLayout]", inputs: ["clrLayout"] }, { kind: "directive", type: i1$1.ClrPopoverAnchor, selector: "[clrPopoverAnchor]" }, { kind: "directive", type: i1$1.ÇlrClrPopoverCloseButton, selector: "[clrPopoverCloseButton]", outputs: ["clrPopoverOnCloseChange"] }, { kind: "directive", type: i1$1.ÇlrClrPopoverOpenCloseButton, selector: "[clrPopoverOpenCloseButton]", outputs: ["clrPopoverOpenCloseChange"] }, { kind: "directive", type: i1$1.ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose"] }, { kind: "component", type: ClrDatepickerComponent, selector: "clr-datepicker", inputs: ["value", "label", "minDate", "maxDate"], outputs: ["valueChange"] }] });
|
|
6423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerContainerComponent, decorators: [{
|
|
6424
|
+
type: Component,
|
|
6425
|
+
args: [{ selector: 'clr-daterangepicker-container', providers: [
|
|
6426
|
+
ClrPopoverToggleService,
|
|
6427
|
+
ClrPopoverEventsService,
|
|
6428
|
+
ClrPopoverPositionService,
|
|
6429
|
+
DaterangeControlStateService,
|
|
6430
|
+
DaterangeService,
|
|
6431
|
+
OpenedDatepickersTrackerService,
|
|
6432
|
+
ControlIdService,
|
|
6433
|
+
], template: "<ng-content select=\"label\"></ng-content>\n<label *ngIf=\"!this.labelComponent && this.addLayoutGrid\"></label>\n<div\n class=\"clr-control-container\"\n [class.clr-error]=\"this.isInvalid\"\n [class.clr-col-12]=\"this.addLayoutGrid\"\n [class.clr-col-md-10]=\"this.addLayoutGrid\"\n>\n <div class=\"clr-input-wrapper\" clrPopoverAnchor>\n <div class=\"clr-input-group\" [class.clr-focus]=\"this.focus\">\n <ng-content select=\"[clrDaterangepicker]\"></ng-content>\n <button\n type=\"button\"\n class=\"clr-input-group-icon-action\"\n [disabled]=\"this.disabled\"\n [title]=\"this.friendlyDaterange\"\n [attr.aria-label]=\"this.friendlyDaterange\"\n clrPopoverOpenCloseButton\n >\n <cds-icon status=\"info\" shape=\"calendar\"></cds-icon>\n </button>\n </div>\n <cds-icon\n *ngIf=\"this.isInvalid\"\n class=\"clr-validate-icon\"\n shape=\"exclamation-circle\"\n status=\"danger\"\n aria-hidden=\"true\"\n ></cds-icon>\n <cds-icon\n *ngIf=\"!this.isInvalid\"\n class=\"clr-validate-icon\"\n shape=\"check-circle\"\n status=\"success\"\n aria-hidden=\"true\"\n ></cds-icon>\n </div>\n <ng-content select=\"clr-control-helper\" *ngIf=\"this.showHelper\"></ng-content>\n <ng-content select=\"clr-control-error\" *ngIf=\"this.showInvalid\"></ng-content>\n <ng-content select=\"clr-control-success\" *ngIf=\"this.showValid\"></ng-content>\n\n <div\n class=\"clr-daterangepicker-container-popup datepicker\"\n *clrPopoverContent=\"this.open; at: this.popoverPosition; outsideClickToClose: true; scrollToClose: true\"\n >\n <button\n class=\"btn btn-sm btn-link close\"\n clrPopoverCloseButton\n type=\"button\"\n [attr.aria-label]=\"this.commonStrings.close\"\n >\n <cds-icon shape=\"window-close\" aria-hidden=\"true\" [attr.title]=\"this.commonStrings.close\"></cds-icon>\n <span class=\"clr-sr-only\">{{ this.commonStrings.close }}</span>\n </button>\n <div class=\"clr-daterangepicker-container-popup-content\">\n <form clrForm [clrLayout]=\"'vertical'\">\n <clr-datepicker\n class=\"clr-datepicker\"\n [label]=\"this.labelFrom\"\n [value]=\"this.dateFrom\"\n [minDate]=\"this.minDate\"\n [maxDate]=\"this.maxDate\"\n (valueChange)=\"this.onDateFromChange($event)\"\n >\n </clr-datepicker>\n <clr-datepicker\n class=\"clr-datepicker\"\n [label]=\"this.labelTo\"\n [value]=\"this.dateTo\"\n [minDate]=\"this.minDate\"\n [maxDate]=\"this.maxDate\"\n (valueChange)=\"this.onDateToChange($event)\"\n >\n </clr-datepicker>\n </form>\n <div class=\"clr-daterangepicker-container-popup-content-presets\" *ngIf=\"this.presets?.length > 0\">\n <ng-container *ngFor=\"let preset of this.presets\">\n <button class=\"btn btn-outline btn-sm btn-block\" type=\"button\" (click)=\"this.applyPreset(preset)\">\n {{ preset.text }}\n </button>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n", styles: [".clr-input-wrapper>.clr-input-group{max-width:-moz-fit-content;max-width:fit-content;padding-right:1.5rem}.clr-input-wrapper>.clr-input-group ::ng-deep>.clr-input{width:100%;padding:0 .3rem}.clr-daterangepicker-container-popup.datepicker{padding:0;width:auto;height:auto;display:block}.clr-daterangepicker-container-popup.datepicker .clr-smart-close-button{min-width:1.2rem;margin:0;padding:0;position:absolute;right:0}.clr-daterangepicker-container-popup.datepicker .clr-daterangepicker-container-popup-content{padding:.6rem;display:flex;flex-direction:row}.clr-daterangepicker-container-popup.datepicker .clr-daterangepicker-container-popup-content .clr-form ::ng-deep clr-datepicker:first-of-type ::ng-deep clr-date-container{margin-top:0}.clr-daterangepicker-container-popup.datepicker .clr-daterangepicker-container-popup-content .clr-daterangepicker-container-popup-content-presets{margin-left:.6rem;padding:.3rem}.clr-daterangepicker-container-popup.datepicker .clr-daterangepicker-container-popup-content .clr-daterangepicker-container-popup-content-presets .btn{margin-right:0}\n"] }]
|
|
6434
|
+
}], ctorParameters: function () {
|
|
6435
|
+
return [{ type: i1$1.ClrPopoverEventsService }, { type: i1$1.ClrPopoverToggleService }, { type: i1$1.ClrCommonStringsService }, { type: i1$1.ClrLayout, decorators: [{
|
|
6436
|
+
type: Optional
|
|
6437
|
+
}] }, { type: DaterangeControlStateService }, { type: OpenedDatepickersTrackerService }, { type: DaterangeService }, { type: DaterangeParsingService }];
|
|
6438
|
+
}, propDecorators: { presets: [{
|
|
6439
|
+
type: Input
|
|
6440
|
+
}], clrPosition: [{
|
|
6441
|
+
type: Input
|
|
6442
|
+
}], labelFrom: [{
|
|
6443
|
+
type: Input
|
|
6444
|
+
}], labelTo: [{
|
|
6445
|
+
type: Input
|
|
6446
|
+
}], datepickerComponents: [{
|
|
6447
|
+
type: ViewChildren,
|
|
6448
|
+
args: [ClrDatepickerComponent]
|
|
6449
|
+
}], daterangepickerDirective: [{
|
|
6450
|
+
type: ContentChild,
|
|
6451
|
+
args: [ClrDaterangepickerDirective]
|
|
6452
|
+
}], classes: [{
|
|
6453
|
+
type: HostBinding,
|
|
6454
|
+
args: ['class']
|
|
6455
|
+
}] } });
|
|
6456
|
+
|
|
6457
|
+
/**
|
|
6458
|
+
* Directive for multiple error messages.
|
|
6459
|
+
* It works the same as Clarity `ClrIfError`, but for customized `ClrDaterangepickerContainerComponent`.
|
|
6460
|
+
* Using Clarity `ClrIfError` requires the container to have service implemented that are not publicly exported.
|
|
6461
|
+
*
|
|
6462
|
+
* @see https://clarity.design/documentation/forms (section "Multiple error messages").
|
|
6463
|
+
*
|
|
6464
|
+
* Altered version from https://github.com/vmware-clarity/ng-clarity/blob/138a6dd95fdc4ffb67b054391c44ce5fa3c44660/projects/angular/src/forms/common/if-control-state/if-error.ts
|
|
6465
|
+
*/
|
|
6466
|
+
class ClrIfDaterangeErrorDirective {
|
|
6467
|
+
constructor(template, container, daterangeControlStateService, daterangepickerContainerComponent) {
|
|
6468
|
+
this.template = template;
|
|
6469
|
+
this.container = container;
|
|
6470
|
+
this.daterangeControlStateService = daterangeControlStateService;
|
|
6471
|
+
this.daterangepickerContainerComponent = daterangepickerContainerComponent;
|
|
6472
|
+
/** Flag to remember if content is displayed. */
|
|
6473
|
+
this.displayedContent = false;
|
|
6474
|
+
/** List of subscriptions to later destroy. */
|
|
6475
|
+
this.subscriptions = [];
|
|
6476
|
+
// This directive only works inside `clr-daterangepicker-container`.
|
|
6477
|
+
if (this.daterangeControlStateService == null || this.daterangepickerContainerComponent == null) {
|
|
6478
|
+
throw new Error('`ClrIfDaterangeErrorDirective` can only be used within `ClrDaterangepickerContainerComponent`');
|
|
6479
|
+
}
|
|
6480
|
+
// Listen to status changes to toggle error visibility.
|
|
6481
|
+
this.subscriptions.push(this.daterangeControlStateService.statusChange.subscribe((_status) => {
|
|
6482
|
+
this.handleState();
|
|
6483
|
+
}));
|
|
6484
|
+
}
|
|
6485
|
+
ngOnDestroy() {
|
|
6486
|
+
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
6487
|
+
}
|
|
6488
|
+
/**
|
|
6489
|
+
* Handle error depending on states.
|
|
6490
|
+
*/
|
|
6491
|
+
handleState() {
|
|
6492
|
+
if (!this.daterangeControlStateService.invalid) {
|
|
6493
|
+
// If control is not invalid, hide all errors.
|
|
6494
|
+
this.toggleErrorVisibility(false);
|
|
6495
|
+
}
|
|
6496
|
+
else if (this.clrIfDaterangeError) {
|
|
6497
|
+
// Display error only if error input is list of errors.
|
|
6498
|
+
const hasError = this.clrIfDaterangeError in this.daterangeControlStateService.errors;
|
|
6499
|
+
this.toggleErrorVisibility(hasError);
|
|
6500
|
+
}
|
|
6501
|
+
else {
|
|
6502
|
+
// Display error.
|
|
6503
|
+
this.toggleErrorVisibility(true);
|
|
6504
|
+
}
|
|
6505
|
+
}
|
|
6506
|
+
/**
|
|
6507
|
+
* Display/hide error.
|
|
6508
|
+
* @param displayError - Wether to show/hide error.
|
|
6509
|
+
*/
|
|
6510
|
+
toggleErrorVisibility(displayError) {
|
|
6511
|
+
if (displayError) {
|
|
6512
|
+
const error = this.daterangeControlStateService.errors[this.clrIfDaterangeError];
|
|
6513
|
+
if (this.displayedContent === false) {
|
|
6514
|
+
this.embeddedViewRef = this.container.createEmbeddedView(this.template, {
|
|
6515
|
+
error,
|
|
6516
|
+
});
|
|
6517
|
+
this.displayedContent = true;
|
|
6518
|
+
}
|
|
6519
|
+
else if (this.embeddedViewRef && this.embeddedViewRef.context) {
|
|
6520
|
+
// If view is already rendered, update the error object to keep it in sync.
|
|
6521
|
+
this.embeddedViewRef.context.error = error;
|
|
6522
|
+
}
|
|
6523
|
+
}
|
|
6524
|
+
else {
|
|
6525
|
+
this.container.clear();
|
|
6526
|
+
this.displayedContent = false;
|
|
6527
|
+
}
|
|
6528
|
+
}
|
|
6529
|
+
}
|
|
6530
|
+
ClrIfDaterangeErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrIfDaterangeErrorDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: DaterangeControlStateService, optional: true }, { token: ClrDaterangepickerContainerComponent, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6531
|
+
ClrIfDaterangeErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ClrIfDaterangeErrorDirective, selector: "[clrIfDaterangeError]", inputs: { clrIfDaterangeError: "clrIfDaterangeError" }, ngImport: i0 });
|
|
6532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrIfDaterangeErrorDirective, decorators: [{
|
|
6533
|
+
type: Directive,
|
|
6534
|
+
args: [{
|
|
6535
|
+
selector: '[clrIfDaterangeError]',
|
|
6536
|
+
}]
|
|
6537
|
+
}], ctorParameters: function () {
|
|
6538
|
+
return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: DaterangeControlStateService, decorators: [{
|
|
6539
|
+
type: Optional
|
|
6540
|
+
}] }, { type: ClrDaterangepickerContainerComponent, decorators: [{
|
|
6541
|
+
type: Optional
|
|
6542
|
+
}] }];
|
|
6543
|
+
}, propDecorators: { clrIfDaterangeError: [{
|
|
6544
|
+
type: Input
|
|
6545
|
+
}] } });
|
|
6546
|
+
|
|
6547
|
+
/**
|
|
6548
|
+
* Validator for daterangepicker to validate that 'to' date is not after 'max' value.
|
|
6549
|
+
* Otherwise will throw corresponding `max` validation error.
|
|
6550
|
+
*
|
|
6551
|
+
* Validator is applied to the ClrDaterangepickerDirective with `max` attribute.
|
|
6552
|
+
* Or when set manually with `clrDaterangeMax` attribute.
|
|
6553
|
+
*
|
|
6554
|
+
* Validator is active by default when applied. It can be disabled with: `[clrDaterangeMax]="false"`
|
|
6555
|
+
*/
|
|
6556
|
+
class ClrDaterangeMaxValidator {
|
|
6557
|
+
constructor(daterangeService) {
|
|
6558
|
+
this.daterangeService = daterangeService;
|
|
6559
|
+
this._active = true;
|
|
6560
|
+
}
|
|
6561
|
+
/**
|
|
6562
|
+
* Disable validator by setting value to `false`.
|
|
6563
|
+
*/
|
|
6564
|
+
set active(active) {
|
|
6565
|
+
this._active = active == null || (active !== false && `${active}` !== 'false');
|
|
6566
|
+
}
|
|
6567
|
+
/**
|
|
6568
|
+
* Validator method. Method that performs synchronous validation against the provided control.
|
|
6569
|
+
* @param control - The control to validate against.
|
|
6570
|
+
* @returns A map of validation errors if validation fails, otherwise null.
|
|
6571
|
+
*/
|
|
6572
|
+
validate(control) {
|
|
6573
|
+
if (!this._active) {
|
|
6574
|
+
return null;
|
|
6575
|
+
}
|
|
6576
|
+
if (control.value == null) {
|
|
6577
|
+
return null;
|
|
6578
|
+
}
|
|
6579
|
+
const max = this.daterangeService.maxDate;
|
|
6580
|
+
if (max == null) {
|
|
6581
|
+
return null;
|
|
6582
|
+
}
|
|
6583
|
+
const { to } = control.value;
|
|
6584
|
+
if (to == null) {
|
|
6585
|
+
return null;
|
|
6586
|
+
}
|
|
6587
|
+
if (to.isAfter(max)) {
|
|
6588
|
+
return {
|
|
6589
|
+
[ClrDaterangeMaxValidator.validationErrorName]: {
|
|
6590
|
+
max,
|
|
6591
|
+
actual: to,
|
|
6592
|
+
},
|
|
6593
|
+
};
|
|
6594
|
+
}
|
|
6595
|
+
return null;
|
|
6596
|
+
}
|
|
6597
|
+
}
|
|
6598
|
+
/** Validation error name. */
|
|
6599
|
+
ClrDaterangeMaxValidator.validationErrorName = 'max';
|
|
6600
|
+
ClrDaterangeMaxValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeMaxValidator, deps: [{ token: DaterangeService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6601
|
+
ClrDaterangeMaxValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ClrDaterangeMaxValidator, selector: "[clrDaterangepicker][max], [clrDaterangeMax]", inputs: { active: ["clrDaterangeMax", "active"] }, providers: [
|
|
6602
|
+
{
|
|
6603
|
+
provide: NG_VALIDATORS,
|
|
6604
|
+
useExisting: forwardRef(() => ClrDaterangeMaxValidator),
|
|
6605
|
+
multi: true,
|
|
6606
|
+
},
|
|
6607
|
+
], ngImport: i0 });
|
|
6608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeMaxValidator, decorators: [{
|
|
6609
|
+
type: Directive,
|
|
6610
|
+
args: [{
|
|
6611
|
+
selector: '[clrDaterangepicker][max], [clrDaterangeMax]',
|
|
6612
|
+
providers: [
|
|
6613
|
+
{
|
|
6614
|
+
provide: NG_VALIDATORS,
|
|
6615
|
+
useExisting: forwardRef(() => ClrDaterangeMaxValidator),
|
|
6616
|
+
multi: true,
|
|
6617
|
+
},
|
|
6618
|
+
],
|
|
6619
|
+
}]
|
|
6620
|
+
}], ctorParameters: function () {
|
|
6621
|
+
return [{ type: DaterangeService, decorators: [{
|
|
6622
|
+
type: Optional
|
|
6623
|
+
}] }];
|
|
6624
|
+
}, propDecorators: { active: [{
|
|
6625
|
+
type: Input,
|
|
6626
|
+
args: ['clrDaterangeMax']
|
|
6627
|
+
}] } });
|
|
6628
|
+
|
|
6629
|
+
/**
|
|
6630
|
+
* Validator for daterangepicker to validate that 'from' date is not before 'min' value.
|
|
6631
|
+
* Otherwise will throw corresponding `min` validation error.
|
|
6632
|
+
*
|
|
6633
|
+
* Validator is applied to the ClrDaterangepickerDirective with `min` attribute.
|
|
6634
|
+
* Or when set manually with `clrDaterangeMin` attribute.
|
|
6635
|
+
*
|
|
6636
|
+
* Validator is active by default when applied. It can be disabled with: `[clrDaterangeMin]="false"`
|
|
6637
|
+
*/
|
|
6638
|
+
class ClrDaterangeMinValidator {
|
|
6639
|
+
constructor(daterangeService) {
|
|
6640
|
+
this.daterangeService = daterangeService;
|
|
6641
|
+
this._active = true;
|
|
6642
|
+
}
|
|
6643
|
+
/**
|
|
6644
|
+
* Disable validator by setting value to `false`.
|
|
6645
|
+
*/
|
|
6646
|
+
set active(active) {
|
|
6647
|
+
this._active = active == null || (active !== false && `${active}` !== 'false');
|
|
6648
|
+
}
|
|
6649
|
+
/**
|
|
6650
|
+
* Validator method. Method that performs synchronous validation against the provided control.
|
|
6651
|
+
* @param control - The control to validate against.
|
|
6652
|
+
* @returns A map of validation errors if validation fails, otherwise null.
|
|
6653
|
+
*/
|
|
6654
|
+
validate(control) {
|
|
6655
|
+
if (!this._active) {
|
|
6656
|
+
return null;
|
|
6657
|
+
}
|
|
6658
|
+
if (control.value == null) {
|
|
6659
|
+
return null;
|
|
6660
|
+
}
|
|
6661
|
+
const min = this.daterangeService.minDate;
|
|
6662
|
+
if (min == null) {
|
|
6663
|
+
return null;
|
|
6664
|
+
}
|
|
6665
|
+
const { from } = control.value;
|
|
6666
|
+
if (from == null) {
|
|
6667
|
+
return null;
|
|
6668
|
+
}
|
|
6669
|
+
if (from.isBefore(min)) {
|
|
6670
|
+
return {
|
|
6671
|
+
[ClrDaterangeMinValidator.validationErrorName]: {
|
|
6672
|
+
min,
|
|
6673
|
+
actual: from,
|
|
6674
|
+
},
|
|
6675
|
+
};
|
|
6676
|
+
}
|
|
6677
|
+
return null;
|
|
6678
|
+
}
|
|
6679
|
+
}
|
|
6680
|
+
/** Validation error name. */
|
|
6681
|
+
ClrDaterangeMinValidator.validationErrorName = 'min';
|
|
6682
|
+
ClrDaterangeMinValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeMinValidator, deps: [{ token: DaterangeService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6683
|
+
ClrDaterangeMinValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ClrDaterangeMinValidator, selector: "[clrDaterangepicker][min], [clrDaterangeMin]", inputs: { active: ["clrDaterangeMin", "active"] }, providers: [
|
|
6684
|
+
{
|
|
6685
|
+
provide: NG_VALIDATORS,
|
|
6686
|
+
useExisting: forwardRef(() => ClrDaterangeMinValidator),
|
|
6687
|
+
multi: true,
|
|
6688
|
+
},
|
|
6689
|
+
], ngImport: i0 });
|
|
6690
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeMinValidator, decorators: [{
|
|
6691
|
+
type: Directive,
|
|
6692
|
+
args: [{
|
|
6693
|
+
selector: '[clrDaterangepicker][min], [clrDaterangeMin]',
|
|
6694
|
+
providers: [
|
|
6695
|
+
{
|
|
6696
|
+
provide: NG_VALIDATORS,
|
|
6697
|
+
useExisting: forwardRef(() => ClrDaterangeMinValidator),
|
|
6698
|
+
multi: true,
|
|
6699
|
+
},
|
|
6700
|
+
],
|
|
6701
|
+
}]
|
|
6702
|
+
}], ctorParameters: function () {
|
|
6703
|
+
return [{ type: DaterangeService, decorators: [{
|
|
6704
|
+
type: Optional
|
|
6705
|
+
}] }];
|
|
6706
|
+
}, propDecorators: { active: [{
|
|
6707
|
+
type: Input,
|
|
6708
|
+
args: ['clrDaterangeMin']
|
|
6709
|
+
}] } });
|
|
6710
|
+
|
|
6711
|
+
/**
|
|
6712
|
+
* Validator for daterangepicker to validate that 'from' date is before 'to' date.
|
|
6713
|
+
* Otherwise will throw `fromIsAfterTo` validation error.
|
|
6714
|
+
*
|
|
6715
|
+
* This validator is applied automatically on ClrDaterangepickerDirective.
|
|
6716
|
+
* Or when set manually with `clrDaterangeOrder` attribute.
|
|
6717
|
+
*
|
|
6718
|
+
* Validator is active by default when applied. It can be disabled with: `[clrDaterangeOrder]="false"`
|
|
6719
|
+
*/
|
|
6720
|
+
class ClrDaterangeOrderValidator {
|
|
6721
|
+
constructor() {
|
|
6722
|
+
this._active = true;
|
|
6723
|
+
}
|
|
6724
|
+
/**
|
|
6725
|
+
* Disable validator by setting value to `false`.
|
|
6726
|
+
*/
|
|
6727
|
+
set active(active) {
|
|
6728
|
+
this._active = active == null || (active !== false && `${active}` !== 'false');
|
|
6729
|
+
}
|
|
6730
|
+
/**
|
|
6731
|
+
* Validator method. Method that performs synchronous validation against the provided control.
|
|
6732
|
+
* @param control - The control to validate against.
|
|
6733
|
+
* @returns A map of validation errors if validation fails, otherwise null.
|
|
6734
|
+
*/
|
|
6735
|
+
validate(control) {
|
|
6736
|
+
if (!this._active) {
|
|
6737
|
+
return null;
|
|
6738
|
+
}
|
|
6739
|
+
// Validation with `null` value is done with the regular required validator.
|
|
6740
|
+
if (control.value == null) {
|
|
6741
|
+
return null;
|
|
6742
|
+
}
|
|
6743
|
+
const { from, to } = control.value;
|
|
6744
|
+
// Validation with `null` values from 'from' & 'to' is done with the ClrDaterangeRequiredValidator.
|
|
6745
|
+
if (from == null || to == null) {
|
|
6746
|
+
return null;
|
|
6747
|
+
}
|
|
6748
|
+
if (from.isAfter(to)) {
|
|
6749
|
+
return {
|
|
6750
|
+
[ClrDaterangeOrderValidator.validationErrorName]: control.value,
|
|
6751
|
+
};
|
|
6752
|
+
}
|
|
6753
|
+
return null;
|
|
6754
|
+
}
|
|
6755
|
+
}
|
|
6756
|
+
/** Validation error name. */
|
|
6757
|
+
ClrDaterangeOrderValidator.validationErrorName = 'fromIsAfterTo';
|
|
6758
|
+
ClrDaterangeOrderValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeOrderValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6759
|
+
ClrDaterangeOrderValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ClrDaterangeOrderValidator, selector: "[clrDaterangepicker], [clrDaterangeOrder]", inputs: { active: ["clrDaterangeOrder", "active"] }, providers: [
|
|
6760
|
+
{
|
|
6761
|
+
provide: NG_VALIDATORS,
|
|
6762
|
+
useExisting: forwardRef(() => ClrDaterangeOrderValidator),
|
|
6763
|
+
multi: true,
|
|
6764
|
+
},
|
|
6765
|
+
], ngImport: i0 });
|
|
6766
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeOrderValidator, decorators: [{
|
|
6767
|
+
type: Directive,
|
|
6768
|
+
args: [{
|
|
6769
|
+
selector: '[clrDaterangepicker], [clrDaterangeOrder]',
|
|
6770
|
+
providers: [
|
|
6771
|
+
{
|
|
6772
|
+
provide: NG_VALIDATORS,
|
|
6773
|
+
useExisting: forwardRef(() => ClrDaterangeOrderValidator),
|
|
6774
|
+
multi: true,
|
|
6775
|
+
},
|
|
6776
|
+
],
|
|
6777
|
+
}]
|
|
6778
|
+
}], propDecorators: { active: [{
|
|
6779
|
+
type: Input,
|
|
6780
|
+
args: ['clrDaterangeOrder']
|
|
6781
|
+
}] } });
|
|
6782
|
+
|
|
6783
|
+
/**
|
|
6784
|
+
* Validator for daterangepicker to validate that 'from' *AND* 'to' date are not `null`.
|
|
6785
|
+
* Will throw `required` validation error.
|
|
6786
|
+
*
|
|
6787
|
+
* Validator is applied to the ClrDaterangepickerDirective with `required` attribute.
|
|
6788
|
+
* Or when set manually with `clrDaterangeRequired` attribute.
|
|
6789
|
+
*
|
|
6790
|
+
* Validator is active by default when applied. It can be disabled with: `[clrDaterangeRequired]="false"`
|
|
6791
|
+
*/
|
|
6792
|
+
class ClrDaterangeRequiredValidator {
|
|
6793
|
+
constructor() {
|
|
6794
|
+
this._active = true;
|
|
6795
|
+
}
|
|
6796
|
+
/**
|
|
6797
|
+
* Disable validator by setting value to `false`.
|
|
6798
|
+
*/
|
|
6799
|
+
set active(active) {
|
|
6800
|
+
this._active = active == null || (active !== false && `${active}` !== 'false');
|
|
6801
|
+
}
|
|
6802
|
+
/**
|
|
6803
|
+
* Validator method. Method that performs synchronous validation against the provided control.
|
|
6804
|
+
* @param control - The control to validate against.
|
|
6805
|
+
* @returns A map of validation errors if validation fails, otherwise null.
|
|
6806
|
+
*/
|
|
6807
|
+
validate(control) {
|
|
6808
|
+
if (!this._active) {
|
|
6809
|
+
return null;
|
|
6810
|
+
}
|
|
6811
|
+
// Validation with `null` value is done with the regular required validator.
|
|
6812
|
+
if (control.value == null) {
|
|
6813
|
+
return null;
|
|
6814
|
+
}
|
|
6815
|
+
const { from, to } = control.value;
|
|
6816
|
+
if (from == null || to == null) {
|
|
6817
|
+
return {
|
|
6818
|
+
[ClrDaterangeRequiredValidator.validationErrorName]: control.value,
|
|
6819
|
+
};
|
|
6820
|
+
}
|
|
6821
|
+
return null;
|
|
6822
|
+
}
|
|
6823
|
+
}
|
|
6824
|
+
/** Validation error name. */
|
|
6825
|
+
ClrDaterangeRequiredValidator.validationErrorName = 'required';
|
|
6826
|
+
ClrDaterangeRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeRequiredValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6827
|
+
ClrDaterangeRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ClrDaterangeRequiredValidator, selector: "[clrDaterangepicker][required], [clrDaterangeRequired]", inputs: { active: ["clrDaterangeRequired", "active"] }, providers: [
|
|
6828
|
+
{
|
|
6829
|
+
provide: NG_VALIDATORS,
|
|
6830
|
+
useExisting: forwardRef(() => ClrDaterangeRequiredValidator),
|
|
6831
|
+
multi: true,
|
|
6832
|
+
},
|
|
6833
|
+
], ngImport: i0 });
|
|
6834
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeRequiredValidator, decorators: [{
|
|
6835
|
+
type: Directive,
|
|
6836
|
+
args: [{
|
|
6837
|
+
selector: '[clrDaterangepicker][required], [clrDaterangeRequired]',
|
|
6838
|
+
providers: [
|
|
6839
|
+
{
|
|
6840
|
+
provide: NG_VALIDATORS,
|
|
6841
|
+
useExisting: forwardRef(() => ClrDaterangeRequiredValidator),
|
|
6842
|
+
multi: true,
|
|
6843
|
+
},
|
|
6844
|
+
],
|
|
6845
|
+
}]
|
|
6846
|
+
}], propDecorators: { active: [{
|
|
6847
|
+
type: Input,
|
|
6848
|
+
args: ['clrDaterangeRequired']
|
|
6849
|
+
}] } });
|
|
6850
|
+
|
|
6851
|
+
class ClrDaterangepickerModule {
|
|
6852
|
+
}
|
|
6853
|
+
ClrDaterangepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6854
|
+
ClrDaterangepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerModule, declarations: [ClrDatepickerComponent,
|
|
6855
|
+
ClrDaterangeMaxValidator,
|
|
6856
|
+
ClrDaterangeMinValidator,
|
|
6857
|
+
ClrDaterangeOrderValidator,
|
|
6858
|
+
ClrDaterangepickerContainerComponent,
|
|
6859
|
+
ClrDaterangepickerDirective,
|
|
6860
|
+
ClrDaterangeRequiredValidator,
|
|
6861
|
+
ClrIfDaterangeErrorDirective], imports: [CommonModule, FormsModule, ClarityModule, ClrDatepickerModule, ClrIconModule], exports: [ClrDaterangeMaxValidator,
|
|
6862
|
+
ClrDaterangeMinValidator,
|
|
6863
|
+
ClrDaterangeOrderValidator,
|
|
6864
|
+
ClrDaterangepickerContainerComponent,
|
|
6865
|
+
ClrDaterangepickerDirective,
|
|
6866
|
+
ClrDaterangeRequiredValidator,
|
|
6867
|
+
ClrIfDaterangeErrorDirective] });
|
|
6868
|
+
ClrDaterangepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerModule, imports: [CommonModule, FormsModule, ClarityModule, ClrDatepickerModule, ClrIconModule] });
|
|
6869
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerModule, decorators: [{
|
|
6870
|
+
type: NgModule,
|
|
6871
|
+
args: [{
|
|
6872
|
+
imports: [CommonModule, FormsModule, ClarityModule, ClrDatepickerModule, ClrIconModule],
|
|
6873
|
+
declarations: [
|
|
6874
|
+
ClrDatepickerComponent,
|
|
6875
|
+
ClrDaterangeMaxValidator,
|
|
6876
|
+
ClrDaterangeMinValidator,
|
|
6877
|
+
ClrDaterangeOrderValidator,
|
|
6878
|
+
ClrDaterangepickerContainerComponent,
|
|
6879
|
+
ClrDaterangepickerDirective,
|
|
6880
|
+
ClrDaterangeRequiredValidator,
|
|
6881
|
+
ClrIfDaterangeErrorDirective,
|
|
6882
|
+
],
|
|
6883
|
+
entryComponents: [ClrDatepickerComponent],
|
|
6884
|
+
exports: [
|
|
6885
|
+
ClrDaterangeMaxValidator,
|
|
6886
|
+
ClrDaterangeMinValidator,
|
|
6887
|
+
ClrDaterangeOrderValidator,
|
|
6888
|
+
ClrDaterangepickerContainerComponent,
|
|
6889
|
+
ClrDaterangepickerDirective,
|
|
6890
|
+
ClrDaterangeRequiredValidator,
|
|
6891
|
+
ClrIfDaterangeErrorDirective,
|
|
6892
|
+
],
|
|
6893
|
+
}]
|
|
6894
|
+
}] });
|
|
6895
|
+
|
|
6896
|
+
/*
|
|
6897
|
+
* Copyright (c) 2018-2023 Porsche Informatik. All Rights Reserved.
|
|
6898
|
+
* This software is released under MIT license.
|
|
6899
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
6900
|
+
*/
|
|
6901
|
+
class ClrAddonsModule {
|
|
6902
|
+
}
|
|
6903
|
+
ClrAddonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6904
|
+
ClrAddonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, exports: [ClrViewEditSectionModule,
|
|
6905
|
+
ClrPagerModule,
|
|
6906
|
+
ClrDotPagerModule,
|
|
6907
|
+
ClrPagedSearchResultListModule,
|
|
6908
|
+
ClrCollapseExpandSectionModule,
|
|
6909
|
+
ClrBreadcrumbModule,
|
|
6910
|
+
ClrMainNavGroupModule,
|
|
6911
|
+
ClrContentPanelModule,
|
|
6912
|
+
ClrNotificationModule,
|
|
6913
|
+
ClrFlowBarModule,
|
|
6914
|
+
ClrBackButtonModule,
|
|
6915
|
+
ClrNumericFieldModule,
|
|
6916
|
+
ClrSearchFieldModule,
|
|
6917
|
+
ClrTreetableModule,
|
|
6918
|
+
ClrProgressSpinnerModule,
|
|
6919
|
+
ClrDateTimeModule,
|
|
6920
|
+
ClrQuickListModule,
|
|
6921
|
+
ClrLetterAvatarModule,
|
|
6922
|
+
ClrMultilingualModule,
|
|
6923
|
+
ClrGenericQuickListModule,
|
|
6924
|
+
ClrDataListValidatorModule,
|
|
6925
|
+
ClrHistoryModule,
|
|
6926
|
+
ClrAutocompleteOffModule,
|
|
6927
|
+
ClrBrandAvatarModule,
|
|
6928
|
+
ClrLocationBarModule,
|
|
6929
|
+
ClrFormModule,
|
|
6930
|
+
ClrDropdownOverflowModule,
|
|
6931
|
+
ClrDatagridStatePersistenceModule,
|
|
6932
|
+
ClrEnumFilterModule,
|
|
6933
|
+
ClrDateFilterModule,
|
|
6934
|
+
ClrDaterangepickerModule] });
|
|
6935
|
+
ClrAddonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, imports: [ClrViewEditSectionModule,
|
|
6936
|
+
ClrPagerModule,
|
|
6937
|
+
ClrDotPagerModule,
|
|
6938
|
+
ClrPagedSearchResultListModule,
|
|
6939
|
+
ClrCollapseExpandSectionModule,
|
|
6940
|
+
ClrBreadcrumbModule,
|
|
6941
|
+
ClrMainNavGroupModule,
|
|
6942
|
+
ClrContentPanelModule,
|
|
6943
|
+
ClrNotificationModule,
|
|
6944
|
+
ClrFlowBarModule,
|
|
6945
|
+
ClrBackButtonModule,
|
|
6946
|
+
ClrNumericFieldModule,
|
|
6947
|
+
ClrSearchFieldModule,
|
|
6948
|
+
ClrTreetableModule,
|
|
6949
|
+
ClrProgressSpinnerModule,
|
|
6950
|
+
ClrDateTimeModule,
|
|
6951
|
+
ClrQuickListModule,
|
|
6952
|
+
ClrLetterAvatarModule,
|
|
6953
|
+
ClrMultilingualModule,
|
|
6954
|
+
ClrGenericQuickListModule,
|
|
6955
|
+
ClrDataListValidatorModule,
|
|
6956
|
+
ClrHistoryModule,
|
|
6957
|
+
ClrAutocompleteOffModule,
|
|
6958
|
+
ClrBrandAvatarModule,
|
|
6959
|
+
ClrLocationBarModule,
|
|
6960
|
+
ClrFormModule,
|
|
6961
|
+
ClrDropdownOverflowModule,
|
|
6962
|
+
ClrDatagridStatePersistenceModule,
|
|
6963
|
+
ClrEnumFilterModule,
|
|
6964
|
+
ClrDateFilterModule,
|
|
6965
|
+
ClrDaterangepickerModule] });
|
|
6966
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, decorators: [{
|
|
6967
|
+
type: NgModule,
|
|
6968
|
+
args: [{
|
|
6969
|
+
exports: [
|
|
6970
|
+
ClrViewEditSectionModule,
|
|
6971
|
+
ClrPagerModule,
|
|
6972
|
+
ClrDotPagerModule,
|
|
6973
|
+
ClrPagedSearchResultListModule,
|
|
6974
|
+
ClrCollapseExpandSectionModule,
|
|
6975
|
+
ClrBreadcrumbModule,
|
|
6976
|
+
ClrMainNavGroupModule,
|
|
6977
|
+
ClrContentPanelModule,
|
|
6978
|
+
ClrNotificationModule,
|
|
6979
|
+
ClrFlowBarModule,
|
|
6980
|
+
ClrBackButtonModule,
|
|
6981
|
+
ClrNumericFieldModule,
|
|
6982
|
+
ClrSearchFieldModule,
|
|
6983
|
+
ClrTreetableModule,
|
|
6984
|
+
ClrProgressSpinnerModule,
|
|
6985
|
+
ClrDateTimeModule,
|
|
6986
|
+
ClrQuickListModule,
|
|
6987
|
+
ClrLetterAvatarModule,
|
|
6988
|
+
ClrMultilingualModule,
|
|
6989
|
+
ClrGenericQuickListModule,
|
|
6990
|
+
ClrDataListValidatorModule,
|
|
6991
|
+
ClrHistoryModule,
|
|
6992
|
+
ClrAutocompleteOffModule,
|
|
6993
|
+
ClrBrandAvatarModule,
|
|
6994
|
+
ClrLocationBarModule,
|
|
6995
|
+
ClrFormModule,
|
|
6996
|
+
ClrDropdownOverflowModule,
|
|
6997
|
+
ClrDatagridStatePersistenceModule,
|
|
6998
|
+
ClrEnumFilterModule,
|
|
6999
|
+
ClrDateFilterModule,
|
|
7000
|
+
ClrDaterangepickerModule,
|
|
7001
|
+
],
|
|
7002
|
+
}]
|
|
7003
|
+
}] });
|
|
7004
|
+
|
|
7005
|
+
/*
|
|
7006
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
7007
|
+
* This software is released under MIT license.
|
|
7008
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7009
|
+
*/
|
|
7010
|
+
|
|
7011
|
+
/*
|
|
7012
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
7013
|
+
* This software is released under MIT license.
|
|
7014
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7015
|
+
*/
|
|
7016
|
+
|
|
7017
|
+
/*
|
|
7018
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
7019
|
+
* This software is released under MIT license.
|
|
7020
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7021
|
+
*/
|
|
7022
|
+
|
|
7023
|
+
/*
|
|
7024
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
7025
|
+
* This software is released under MIT license.
|
|
7026
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7027
|
+
*/
|
|
7028
|
+
|
|
7029
|
+
/*
|
|
7030
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
7031
|
+
* This software is released under MIT license.
|
|
7032
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7033
|
+
*/
|
|
7034
|
+
|
|
7035
|
+
/*
|
|
7036
|
+
* Copyright (c) 2018-2020 Porsche Informatik. All Rights Reserved.
|
|
7037
|
+
* This software is released under MIT license.
|
|
7038
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7039
|
+
*/
|
|
7040
|
+
|
|
7041
|
+
/*
|
|
7042
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
7043
|
+
* This software is released under MIT license.
|
|
7044
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7045
|
+
*/
|
|
7046
|
+
|
|
7047
|
+
/*
|
|
7048
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
7049
|
+
* This software is released under MIT license.
|
|
7050
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7051
|
+
*/
|
|
7052
|
+
|
|
7053
|
+
/*
|
|
7054
|
+
* Copyright (c) 2018-2021 Porsche Informatik. All Rights Reserved.
|
|
7055
|
+
* This software is released under MIT license.
|
|
7056
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7057
|
+
*/
|
|
7058
|
+
/*
|
|
7059
|
+
* Copyright (c) 2018-2021 Porsche Informatik. All Rights Reserved.
|
|
7060
|
+
* This software is released under MIT license.
|
|
7061
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7062
|
+
*/
|
|
7063
|
+
/**
|
|
7064
|
+
* A reference to an active (currently opened) notification.
|
|
7065
|
+
*
|
|
7066
|
+
* @deprecated not used anymore.
|
|
7067
|
+
*/
|
|
7068
|
+
class ClrActiveNotification {
|
|
7069
|
+
}
|
|
7070
|
+
class ClrContentRef {
|
|
7071
|
+
constructor(nodes, viewRef, componentRef) {
|
|
7072
|
+
this.nodes = nodes;
|
|
7073
|
+
this.viewRef = viewRef;
|
|
7074
|
+
this.componentRef = componentRef;
|
|
7075
|
+
}
|
|
7076
|
+
}
|
|
7077
|
+
/**
|
|
7078
|
+
* A reference to a newly opened notification.
|
|
7079
|
+
*/
|
|
7080
|
+
class ClrNotificationRef {
|
|
7081
|
+
constructor(_notificationCmptRef, _contentRef) {
|
|
7082
|
+
this._notificationCmptRef = _notificationCmptRef;
|
|
7083
|
+
this._contentRef = _contentRef;
|
|
7084
|
+
_notificationCmptRef.instance.closed.pipe(take(1)).subscribe(() => {
|
|
7085
|
+
this.close();
|
|
7086
|
+
});
|
|
7087
|
+
this.result = new Promise(resolve => {
|
|
7088
|
+
this._resolve = resolve;
|
|
7089
|
+
});
|
|
7090
|
+
this.result.then(null);
|
|
7091
|
+
}
|
|
7092
|
+
/**
|
|
7093
|
+
* Can be used to close a notification
|
|
7094
|
+
*/
|
|
7095
|
+
close() {
|
|
7096
|
+
if (this._notificationCmptRef) {
|
|
7097
|
+
this._resolve();
|
|
7098
|
+
this._removeModalElements();
|
|
7099
|
+
}
|
|
7100
|
+
}
|
|
7101
|
+
_removeModalElements() {
|
|
7102
|
+
const notificationNativeEl = this._notificationCmptRef.location.nativeElement;
|
|
7103
|
+
notificationNativeEl.parentNode.removeChild(notificationNativeEl);
|
|
7104
|
+
this._notificationCmptRef.destroy();
|
|
7105
|
+
if (this._contentRef && this._contentRef.viewRef) {
|
|
7106
|
+
this._contentRef.viewRef.destroy();
|
|
7107
|
+
}
|
|
7108
|
+
this._notificationCmptRef = null;
|
|
7109
|
+
this._contentRef = null;
|
|
7110
|
+
}
|
|
7111
|
+
}
|
|
7112
|
+
|
|
7113
|
+
/*
|
|
7114
|
+
* Copyright (c) 2018-2021 Porsche Informatik. All Rights Reserved.
|
|
7115
|
+
* This software is released under MIT license.
|
|
7116
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7117
|
+
*/
|
|
7118
|
+
class ClrNotificationService {
|
|
7119
|
+
constructor(_injector, _applicationRef, _componentFactoryResolver, _document) {
|
|
7120
|
+
this._injector = _injector;
|
|
7121
|
+
this._applicationRef = _applicationRef;
|
|
7122
|
+
this._componentFactoryResolver = _componentFactoryResolver;
|
|
7123
|
+
this._document = _document;
|
|
7124
|
+
this.elements = new Set();
|
|
7125
|
+
}
|
|
7126
|
+
openNotification(content, options = {}) {
|
|
7127
|
+
const contentRef = this._getContentRef(content, options);
|
|
7128
|
+
const notificationCmptRef = this._attachWindowComponent(this._document.body, contentRef);
|
|
5473
7129
|
const notificationRef = new ClrNotificationRef(notificationCmptRef, contentRef);
|
|
5474
7130
|
this._applyWindowOptions(notificationCmptRef.instance, options);
|
|
5475
7131
|
notificationCmptRef.instance.closed
|
|
@@ -5972,7 +7628,7 @@ const ClrAddonsIconShapes = {
|
|
|
5972
7628
|
*/
|
|
5973
7629
|
|
|
5974
7630
|
/*
|
|
5975
|
-
* Copyright (c) 2018-
|
|
7631
|
+
* Copyright (c) 2018-2023 Porsche Informatik. All Rights Reserved.
|
|
5976
7632
|
* This software is released under MIT license.
|
|
5977
7633
|
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5978
7634
|
*/
|
|
@@ -5981,5 +7637,5 @@ const ClrAddonsIconShapes = {
|
|
|
5981
7637
|
* Generated bundle index. Do not edit.
|
|
5982
7638
|
*/
|
|
5983
7639
|
|
|
5984
|
-
export { ACShape, AcceptedBrands, AccessoriesShape, AccessoryPartsShape, AudiBrandShape, AwardWinnerPremiumShape, BlocksGroupForwardShape, BrochureShape, BundleForwardShape, BusinessCustomersCommercialShape, BusinessCustomersPrivateShape, BusinessPartnerWithCar, CLR_BLANK_OPTION, CONTENT_PROVIDER, CalculatorForwardShape, CaliforniaServiceShape, CaliforniaSpecialistShape, CampaignOutdatedShape, CampaignShape, CarPickupServiceShape, CarWashShape, CertifiedRepairShape, CertifiedRetailerShape, ClrActiveNotification, ClrAddonsIconShapes, ClrAddonsLabel, ClrAddonsModule, ClrAutocompleteOff, ClrAutocompleteOffModule, ClrBackButton, ClrBackButtonModule, ClrBrandAvatar, ClrBrandAvatarModule, ClrBreadcrumb, ClrBreadcrumbModule, ClrBreadcrumbService, ClrCollapseExpandSection, ClrCollapseExpandSectionModule, ClrContentPanel, ClrContentPanelContainer, ClrContentPanelContainerContent, ClrContentPanelContainerFooter, ClrContentPanelModule, ClrContentRef, ClrDataListPredefinedValidatorDirective, ClrDataListValidatorModule, ClrDataListValidators, ClrDatagridStatePersistenceModule, ClrDateFilterComponent, ClrDateFilterModule, ClrDateTimeContainer, ClrDateTimeModule, ClrDotPager, ClrDotPagerModule, ClrDropdownOverflowDirective, ClrDropdownOverflowModule, ClrEnumFilterComponent, ClrEnumFilterModule, ClrFlowBar, ClrFlowBarModule, ClrFormModule, ClrGenericQuickList, ClrGenericQuickListModule, ClrHistory, ClrHistoryModule, ClrHistoryPinned, ClrHistoryService, ClrLetterAvatar, ClrLetterAvatarModule, ClrLocationBarModule, ClrMainNavGroup, ClrMainNavGroupItem, ClrMainNavGroupModule, ClrMaxNumeric, ClrMinNumeric, ClrMultilingualInput, ClrMultilingualInputValidators, ClrMultilingualModule, ClrMultilingualSelector, ClrMultilingualTextarea, ClrNotification, ClrNotificationModule, ClrNotificationRef, ClrNotificationService, ClrNumericField, ClrNumericFieldModule, ClrNumericFieldValidators, ClrPagedSearchResultList, ClrPagedSearchResultListModule, ClrPager, ClrPagerModule, ClrProgressSpinnerComponent, ClrProgressSpinnerModule, ClrQuickList, ClrQuickListModule, ClrRequiredAllMultilang, ClrRequiredOneMultilang, ClrSearchField, ClrSearchFieldModule, ClrTimeInput, ClrTreetable, ClrTreetableActionOverflow, ClrTreetableCell, ClrTreetableColumn, ClrTreetableModule, ClrTreetablePlaceholder, ClrTreetableRow, ClrViewEditSection, ClrViewEditSectionModule, ColumnHiddenStatePersistenceDirective, ConfiguratorCommercialShape, ConfiguratorPrivateShape, ConsumptionShape, ContactDealerShape, CupraBrandShape, CustomersCenterShape, DWABrandShape, DatagridFieldDirective, DieselShape, DollarBillForwardShape, DollarBillPartialShape, DriversAssistanceShape, EfficiencyShape, ElectricCarsServiceShape, ElectricCarsShape, ElectricityShape, EmissionShape, EnergyShape, EngineShape, ExpressServiceShape, ExteriorShape, ExternalPartForwardShape, FindACarShape, FleetServiceCommercialShape, FleetServicePrivateShape, GasCarsServiceShape, GasShape, HybridShape, InternalPartForwardShape, ItemsForwardShape, ItemsRecieveShape, LoadingVolumeShape, LocateShape, LocationBarComponent, LocationBarContentProvider, LocationBarNode, NewCarCommercialShape, NewCarPrivateShape, NewCarUtilityVehicleShape, NightServiceShape, NodeId, OffersShape, OnCallDutyShape, OpenSatShape, PaintMaterialForwardShape, PaintMaterialShape, PaintShopShape, PartNonStockForwardShape, PartsForwardShape, PartsNonStockShape, PartsShape, PayloadShape, PerformanceShape, PetrolShape, PlusServiceShape, PorscheBrandShape, PowerShape, PowerTrainShape, PriceTypeSwitchShape, QualifiedWorkshopShape, RoadsideAssistanceShape, RouteShape, SeatAirShape, SeatBrandShape, SeatShape, ServiceBellShape, ServiceShape, SizeShape, SkodaBrandShape, StatePersistenceKeyDirective, StockLocatorCommercialShape, StockLocatorPrivateShape, TaskAndAppointment, TaxiDealerShape, TextForward, TopcardShape, TouaregServiceShape, TransmissionAutomaticShape, TransmissionManualShape, TreetableCellRenderer, TreetableHeaderRenderer, TreetableMainRenderer, TreetableRowRenderer, UsedCarCommercialShape, UsedCarPrivateShape, VWBrandShape, VWNBrandShape, VWShape, VehicleConversionShape, View360Shape, VirtualRealityShape, WheelToWheelShape, WindscreenWashShape, WrenchForward, clrIconSVG, escapeHtml, escapeRegex };
|
|
7640
|
+
export { ACShape, AcceptedBrands, AccessoriesShape, AccessoryPartsShape, AudiBrandShape, AwardWinnerPremiumShape, BIG_ENDIAN, BlocksGroupForwardShape, BrochureShape, BundleForwardShape, BusinessCustomersCommercialShape, BusinessCustomersPrivateShape, BusinessPartnerWithCar, CLR_BLANK_OPTION, CONTENT_PROVIDER, CalculatorForwardShape, CaliforniaServiceShape, CaliforniaSpecialistShape, CampaignOutdatedShape, CampaignShape, CarPickupServiceShape, CarWashShape, CertifiedRepairShape, CertifiedRetailerShape, ClrActiveNotification, ClrAddonsIconShapes, ClrAddonsLabel, ClrAddonsModule, ClrAutocompleteOff, ClrAutocompleteOffModule, ClrBackButton, ClrBackButtonModule, ClrBrandAvatar, ClrBrandAvatarModule, ClrBreadcrumb, ClrBreadcrumbModule, ClrBreadcrumbService, ClrCollapseExpandSection, ClrCollapseExpandSectionModule, ClrContentPanel, ClrContentPanelContainer, ClrContentPanelContainerContent, ClrContentPanelContainerFooter, ClrContentPanelModule, ClrContentRef, ClrDataListPredefinedValidatorDirective, ClrDataListValidatorModule, ClrDataListValidators, ClrDatagridStatePersistenceModule, ClrDateFilterComponent, ClrDateFilterModule, ClrDateTimeContainer, ClrDateTimeModule, ClrDaterangeMaxValidator, ClrDaterangeMinValidator, ClrDaterangeOrderValidator, ClrDaterangeRequiredValidator, ClrDaterangepickerContainerComponent, ClrDaterangepickerDirective, ClrDaterangepickerModule, ClrDotPager, ClrDotPagerModule, ClrDropdownOverflowDirective, ClrDropdownOverflowModule, ClrEnumFilterComponent, ClrEnumFilterModule, ClrFlowBar, ClrFlowBarModule, ClrFormModule, ClrGenericQuickList, ClrGenericQuickListModule, ClrHistory, ClrHistoryModule, ClrHistoryPinned, ClrHistoryService, ClrIfDaterangeErrorDirective, ClrLetterAvatar, ClrLetterAvatarModule, ClrLocationBarModule, ClrMainNavGroup, ClrMainNavGroupItem, ClrMainNavGroupModule, ClrMaxNumeric, ClrMinNumeric, ClrMultilingualInput, ClrMultilingualInputValidators, ClrMultilingualModule, ClrMultilingualSelector, ClrMultilingualTextarea, ClrNotification, ClrNotificationModule, ClrNotificationRef, ClrNotificationService, ClrNumericField, ClrNumericFieldModule, ClrNumericFieldValidators, ClrPagedSearchResultList, ClrPagedSearchResultListModule, ClrPager, ClrPagerModule, ClrProgressSpinnerComponent, ClrProgressSpinnerModule, ClrQuickList, ClrQuickListModule, ClrRequiredAllMultilang, ClrRequiredOneMultilang, ClrSearchField, ClrSearchFieldModule, ClrTimeInput, ClrTreetable, ClrTreetableActionOverflow, ClrTreetableCell, ClrTreetableColumn, ClrTreetableModule, ClrTreetablePlaceholder, ClrTreetableRow, ClrViewEditSection, ClrViewEditSectionModule, ColumnHiddenStatePersistenceDirective, ConfiguratorCommercialShape, ConfiguratorPrivateShape, ConsumptionShape, ContactDealerShape, CupraBrandShape, CustomersCenterShape, DATE, DELIMITER_REGEX, DWABrandShape, DatagridFieldDirective, DayModel, DieselShape, DollarBillForwardShape, DollarBillPartialShape, DriversAssistanceShape, EfficiencyShape, ElectricCarsServiceShape, ElectricCarsShape, ElectricityShape, EmissionShape, EnergyShape, EngineShape, ExpressServiceShape, ExteriorShape, ExternalPartForwardShape, FindACarShape, FleetServiceCommercialShape, FleetServicePrivateShape, GasCarsServiceShape, GasShape, HybridShape, InternalPartForwardShape, ItemsForwardShape, ItemsRecieveShape, LITTLE_ENDIAN, LITTLE_ENDIAN_REGEX, LoadingVolumeShape, LocateShape, LocationBarComponent, LocationBarContentProvider, LocationBarNode, MIDDLE_ENDIAN, MIDDLE_ENDIAN_REGEX, MONTH, NewCarCommercialShape, NewCarPrivateShape, NewCarUtilityVehicleShape, NightServiceShape, NodeId, OffersShape, OnCallDutyShape, OpenSatShape, PaintMaterialForwardShape, PaintMaterialShape, PaintShopShape, PartNonStockForwardShape, PartsForwardShape, PartsNonStockShape, PartsShape, PayloadShape, PerformanceShape, PetrolShape, PlusServiceShape, PopoverPositions, PorscheBrandShape, PowerShape, PowerTrainShape, PriceTypeSwitchShape, QualifiedWorkshopShape, RoadsideAssistanceShape, RouteShape, SEPARATOR_TEXT_DEFAULT, SeatAirShape, SeatBrandShape, SeatShape, ServiceBellShape, ServiceShape, SizeShape, SkodaBrandShape, StatePersistenceKeyDirective, StockLocatorCommercialShape, StockLocatorPrivateShape, TRANSLATIONS, TaskAndAppointment, TaxiDealerShape, TextForward, TopcardShape, TouaregServiceShape, TransmissionAutomaticShape, TransmissionManualShape, TreetableCellRenderer, TreetableHeaderRenderer, TreetableMainRenderer, TreetableRowRenderer, USER_INPUT_REGEX, UsedCarCommercialShape, UsedCarPrivateShape, VWBrandShape, VWNBrandShape, VWShape, VehicleConversionShape, View360Shape, VirtualRealityShape, WheelToWheelShape, WindscreenWashShape, WrenchForward, YEAR, clrIconSVG, escapeHtml, escapeRegex };
|
|
5985
7641
|
//# sourceMappingURL=clr-addons.mjs.map
|