@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/fesm2020/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
|
// first trigger manually because the subscription lower only triggers after first change
|
|
652
653
|
if (!this.nestedDropdownChildren?.length) {
|
|
653
654
|
this.applyDropdownOverflowStyles();
|
|
@@ -669,14 +670,17 @@ class ClrDropdownOverflowDirective {
|
|
|
669
670
|
applyDropdownOverflowStyles() {
|
|
670
671
|
// the vertical position of our element in the current window
|
|
671
672
|
const y = this.elRef.nativeElement.getBoundingClientRect().y;
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
item
|
|
673
|
+
if (y !== 0 && !this.alreadyChecked) {
|
|
674
|
+
const itemMinHeightPx = this.getItemMinHeight(this.clrDropdownMenuItemMinHeight);
|
|
675
|
+
// see https://stackoverflow.com/questions/22754315/for-loop-for-htmlcollection-elements
|
|
676
|
+
for (const item of this.getAllChildDropdownMenuItems()) {
|
|
677
|
+
item.style.minHeight = itemMinHeightPx + 'px';
|
|
678
|
+
}
|
|
679
|
+
this.elRef.nativeElement.style.maxHeight =
|
|
680
|
+
this.getMenuMaxHeight(this.clrDropdownMenuMaxHeight, window.innerHeight - y - this.convertRemToPixels(this.marginBottomRem)) + 'px';
|
|
681
|
+
this.elRef.nativeElement.style.overflowY = 'auto';
|
|
682
|
+
this.alreadyChecked = true;
|
|
676
683
|
}
|
|
677
|
-
this.elRef.nativeElement.style.maxHeight =
|
|
678
|
-
this.getMenuMaxHeight(this.clrDropdownMenuMaxHeight, window.innerHeight - y - this.convertRemToPixels(this.marginBottomRem)) + 'px';
|
|
679
|
-
this.elRef.nativeElement.style.overflowY = 'auto';
|
|
680
684
|
}
|
|
681
685
|
removeDropdownOverflowStyles() {
|
|
682
686
|
for (const item of this.getAllChildDropdownMenuItems()) {
|
|
@@ -877,7 +881,7 @@ class ClrFlowBar {
|
|
|
877
881
|
}
|
|
878
882
|
}
|
|
879
883
|
ClrFlowBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrFlowBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
880
|
-
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:
|
|
884
|
+
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" }] });
|
|
881
885
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrFlowBar, decorators: [{
|
|
882
886
|
type: Component,
|
|
883
887
|
args: [{ selector: 'clr-flow-bar', host: {
|
|
@@ -988,7 +992,7 @@ class ClrGenericQuickList {
|
|
|
988
992
|
}
|
|
989
993
|
}
|
|
990
994
|
ClrGenericQuickList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrGenericQuickList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
991
|
-
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:
|
|
995
|
+
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" }] });
|
|
992
996
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrGenericQuickList, decorators: [{
|
|
993
997
|
type: Component,
|
|
994
998
|
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" }]
|
|
@@ -1276,7 +1280,7 @@ class ClrMainNavGroup {
|
|
|
1276
1280
|
}
|
|
1277
1281
|
}
|
|
1278
1282
|
ClrMainNavGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrMainNavGroup, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1279
|
-
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:
|
|
1283
|
+
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"] }] });
|
|
1280
1284
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrMainNavGroup, decorators: [{
|
|
1281
1285
|
type: Component,
|
|
1282
1286
|
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" }]
|
|
@@ -1692,7 +1696,7 @@ ClrMultilingualSelector.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
1692
1696
|
</clr-dropdown-menu>
|
|
1693
1697
|
</clr-dropdown>
|
|
1694
1698
|
</div>
|
|
1695
|
-
`, 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:
|
|
1699
|
+
`, 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" }] });
|
|
1696
1700
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrMultilingualSelector, decorators: [{
|
|
1697
1701
|
type: Component,
|
|
1698
1702
|
args: [{
|
|
@@ -1754,7 +1758,7 @@ ClrMultilingualInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
1754
1758
|
multi: true,
|
|
1755
1759
|
},
|
|
1756
1760
|
ControlIdService,
|
|
1757
|
-
], 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:
|
|
1761
|
+
], 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"] }] });
|
|
1758
1762
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrMultilingualInput, decorators: [{
|
|
1759
1763
|
type: Component,
|
|
1760
1764
|
args: [{ selector: 'clr-multilingual-input', providers: [
|
|
@@ -1785,7 +1789,7 @@ ClrMultilingualTextarea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
1785
1789
|
multi: true,
|
|
1786
1790
|
},
|
|
1787
1791
|
ControlIdService,
|
|
1788
|
-
], 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:
|
|
1792
|
+
], 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"] }] });
|
|
1789
1793
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrMultilingualTextarea, decorators: [{
|
|
1790
1794
|
type: Component,
|
|
1791
1795
|
args: [{ selector: 'clr-multilingual-textarea', providers: [
|
|
@@ -1959,7 +1963,7 @@ class ClrNotification {
|
|
|
1959
1963
|
}
|
|
1960
1964
|
}
|
|
1961
1965
|
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 });
|
|
1962
|
-
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:
|
|
1966
|
+
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: [
|
|
1963
1967
|
trigger('slideDown', [
|
|
1964
1968
|
transition(':enter', [
|
|
1965
1969
|
style({ transform: 'translateY(-200%)' }),
|
|
@@ -2669,7 +2673,7 @@ class ClrPager {
|
|
|
2669
2673
|
}
|
|
2670
2674
|
}
|
|
2671
2675
|
ClrPager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrPager, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2672
|
-
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:
|
|
2676
|
+
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" }] });
|
|
2673
2677
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrPager, decorators: [{
|
|
2674
2678
|
type: Component,
|
|
2675
2679
|
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" }]
|
|
@@ -2907,7 +2911,7 @@ class ClrAddOption {
|
|
|
2907
2911
|
}
|
|
2908
2912
|
}
|
|
2909
2913
|
ClrAddOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddOption, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2910
|
-
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:
|
|
2914
|
+
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" }] });
|
|
2911
2915
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddOption, decorators: [{
|
|
2912
2916
|
type: Component,
|
|
2913
2917
|
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" }]
|
|
@@ -3221,7 +3225,7 @@ class ClrTreetableActionOverflow {
|
|
|
3221
3225
|
this.destroyed$.complete();
|
|
3222
3226
|
}
|
|
3223
3227
|
}
|
|
3224
|
-
ClrTreetableActionOverflow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrTreetableActionOverflow, deps: [{ token:
|
|
3228
|
+
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 });
|
|
3225
3229
|
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: `
|
|
3226
3230
|
<ng-container *ngIf="!empty">
|
|
3227
3231
|
<button class="treetable-action-trigger" clrPopoverAnchor clrPopoverOpenCloseButton>
|
|
@@ -3236,7 +3240,7 @@ ClrTreetableActionOverflow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
3236
3240
|
<ng-content></ng-content>
|
|
3237
3241
|
</div>
|
|
3238
3242
|
</ng-container>
|
|
3239
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
3243
|
+
`, 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"] }] });
|
|
3240
3244
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrTreetableActionOverflow, decorators: [{
|
|
3241
3245
|
type: Component,
|
|
3242
3246
|
args: [{
|
|
@@ -3263,7 +3267,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
3263
3267
|
role: 'cell',
|
|
3264
3268
|
},
|
|
3265
3269
|
}]
|
|
3266
|
-
}], ctorParameters: function () { return [{ type:
|
|
3270
|
+
}], ctorParameters: function () { return [{ type: i1$1.ClrPopoverToggleService }, { type: i0.NgZone }]; }, propDecorators: { empty: [{
|
|
3267
3271
|
type: Input
|
|
3268
3272
|
}] } });
|
|
3269
3273
|
|
|
@@ -3315,7 +3319,7 @@ class ClrTreetableRow {
|
|
|
3315
3319
|
}
|
|
3316
3320
|
}
|
|
3317
3321
|
ClrTreetableRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrTreetableRow, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3318
|
-
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:
|
|
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: i1$1.ClrIconCustomTag, selector: "clr-icon" }, { kind: "component", type: ClrTreetableActionOverflow, selector: "clr-tt-action-overflow", inputs: ["empty"] }], animations: [
|
|
3319
3323
|
trigger('collapseExpandAnimation', [
|
|
3320
3324
|
state('false', style({ display: 'none' })),
|
|
3321
3325
|
state('true', style({ display: 'block' })),
|
|
@@ -3796,7 +3800,7 @@ class ClrViewEditSection {
|
|
|
3796
3800
|
}
|
|
3797
3801
|
}
|
|
3798
3802
|
ClrViewEditSection.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrViewEditSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3799
|
-
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:
|
|
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: 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: [
|
|
3800
3804
|
trigger('collapseExpandAnimation', [
|
|
3801
3805
|
transition(':enter', [
|
|
3802
3806
|
style({ opacity: 0, height: 0, overflow: 'hidden' }),
|
|
@@ -4146,7 +4150,7 @@ class ClrHistory {
|
|
|
4146
4150
|
}
|
|
4147
4151
|
}
|
|
4148
4152
|
ClrHistory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrHistory, deps: [{ token: ClrHistoryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4149
|
-
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:
|
|
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: 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"] }] });
|
|
4150
4154
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrHistory, decorators: [{
|
|
4151
4155
|
type: Component,
|
|
4152
4156
|
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" }]
|
|
@@ -4318,7 +4322,7 @@ class ClrBrandAvatar {
|
|
|
4318
4322
|
}
|
|
4319
4323
|
ClrBrandAvatar.DEFAULT_ICON_SHAPE = 'new-car-private';
|
|
4320
4324
|
ClrBrandAvatar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrBrandAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4321
|
-
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:
|
|
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: i1$1.ClrIconCustomTag, selector: "clr-icon" }] });
|
|
4322
4326
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrBrandAvatar, decorators: [{
|
|
4323
4327
|
type: Component,
|
|
4324
4328
|
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" }]
|
|
@@ -4496,7 +4500,7 @@ class LocationBarNodeComponent {
|
|
|
4496
4500
|
}
|
|
4497
4501
|
}
|
|
4498
4502
|
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 });
|
|
4499
|
-
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:
|
|
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: 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"] }] });
|
|
4500
4504
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: LocationBarNodeComponent, decorators: [{
|
|
4501
4505
|
type: Component,
|
|
4502
4506
|
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" }]
|
|
@@ -4532,7 +4536,7 @@ class LocationBarComponent {
|
|
|
4532
4536
|
}
|
|
4533
4537
|
}
|
|
4534
4538
|
LocationBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: LocationBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4535
|
-
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:
|
|
4539
|
+
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" }] });
|
|
4536
4540
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: LocationBarComponent, decorators: [{
|
|
4537
4541
|
type: Component,
|
|
4538
4542
|
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" }]
|
|
@@ -4837,14 +4841,14 @@ class StatePersistenceKeyDirective {
|
|
|
4837
4841
|
this.destroy$.complete();
|
|
4838
4842
|
}
|
|
4839
4843
|
}
|
|
4840
|
-
StatePersistenceKeyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: StatePersistenceKeyDirective, deps: [{ token:
|
|
4844
|
+
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 });
|
|
4841
4845
|
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 });
|
|
4842
4846
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: StatePersistenceKeyDirective, decorators: [{
|
|
4843
4847
|
type: Directive,
|
|
4844
4848
|
args: [{
|
|
4845
4849
|
selector: '[clrStatePersistenceKey]',
|
|
4846
4850
|
}]
|
|
4847
|
-
}], ctorParameters: function () { return [{ type:
|
|
4851
|
+
}], ctorParameters: function () { return [{ type: i1$1.ClrDatagrid }]; }, propDecorators: { options: [{
|
|
4848
4852
|
type: Input,
|
|
4849
4853
|
args: ['clrStatePersistenceKey']
|
|
4850
4854
|
}], useLocalStoreOnly: [{
|
|
@@ -4921,7 +4925,7 @@ class ColumnHiddenStatePersistenceDirective {
|
|
|
4921
4925
|
this.destroy$.complete();
|
|
4922
4926
|
}
|
|
4923
4927
|
}
|
|
4924
|
-
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:
|
|
4928
|
+
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 });
|
|
4925
4929
|
ColumnHiddenStatePersistenceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ColumnHiddenStatePersistenceDirective, selector: "[clrDgHideableColumn]", ngImport: i0 });
|
|
4926
4930
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ColumnHiddenStatePersistenceDirective, decorators: [{
|
|
4927
4931
|
type: Directive,
|
|
@@ -4932,7 +4936,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
4932
4936
|
type: Optional
|
|
4933
4937
|
}] }, { type: StatePersistenceKeyDirective, decorators: [{
|
|
4934
4938
|
type: Optional
|
|
4935
|
-
}] }, { type:
|
|
4939
|
+
}] }, { type: i1$1.ClrDatagrid }, { type: i1$1.ClrDatagridHideableColumn }]; } });
|
|
4936
4940
|
|
|
4937
4941
|
class ClrDatagridStatePersistenceModule {
|
|
4938
4942
|
}
|
|
@@ -5002,12 +5006,12 @@ class ClrEnumFilterComponent {
|
|
|
5002
5006
|
this.destroyed$.complete();
|
|
5003
5007
|
}
|
|
5004
5008
|
}
|
|
5005
|
-
ClrEnumFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrEnumFilterComponent, deps: [{ token:
|
|
5006
|
-
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:
|
|
5009
|
+
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 });
|
|
5010
|
+
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"] }] });
|
|
5007
5011
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrEnumFilterComponent, decorators: [{
|
|
5008
5012
|
type: Component,
|
|
5009
5013
|
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"] }]
|
|
5010
|
-
}], ctorParameters: function () { return [{ type:
|
|
5014
|
+
}], ctorParameters: function () { return [{ type: i1$1.ClrDatagridFilter }, { type: i1$1.ClrDatagrid }]; }, propDecorators: { property: [{
|
|
5011
5015
|
type: Input,
|
|
5012
5016
|
args: ['clrProperty']
|
|
5013
5017
|
}], value: [{
|
|
@@ -5183,12 +5187,12 @@ class ClrDateFilterComponent {
|
|
|
5183
5187
|
return other === this;
|
|
5184
5188
|
}
|
|
5185
5189
|
}
|
|
5186
|
-
ClrDateFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDateFilterComponent, deps: [{ token:
|
|
5187
|
-
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:
|
|
5190
|
+
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 });
|
|
5191
|
+
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]" }] });
|
|
5188
5192
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDateFilterComponent, decorators: [{
|
|
5189
5193
|
type: Component,
|
|
5190
5194
|
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" }]
|
|
5191
|
-
}], ctorParameters: function () { return [{ type:
|
|
5195
|
+
}], ctorParameters: function () { return [{ type: i1$1.ClrCommonStringsService }, { type: i1$1.ClrPopoverEventsService }, { type: i1$1.ClrDatagridFilter }]; }, propDecorators: { property: [{
|
|
5192
5196
|
type: Input,
|
|
5193
5197
|
args: ['clrProperty']
|
|
5194
5198
|
}], maxPlaceholder: [{
|
|
@@ -5219,235 +5223,1867 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
5219
5223
|
}]
|
|
5220
5224
|
}] });
|
|
5221
5225
|
|
|
5222
|
-
/*
|
|
5223
|
-
* Copyright (c) 2018-2022 Porsche Informatik. All Rights Reserved.
|
|
5224
|
-
* This software is released under MIT license.
|
|
5225
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5226
|
-
*/
|
|
5227
|
-
class ClrAddonsModule {
|
|
5228
|
-
}
|
|
5229
|
-
ClrAddonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5230
|
-
ClrAddonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, exports: [ClrViewEditSectionModule,
|
|
5231
|
-
ClrPagerModule,
|
|
5232
|
-
ClrDotPagerModule,
|
|
5233
|
-
ClrPagedSearchResultListModule,
|
|
5234
|
-
ClrCollapseExpandSectionModule,
|
|
5235
|
-
ClrBreadcrumbModule,
|
|
5236
|
-
ClrMainNavGroupModule,
|
|
5237
|
-
ClrContentPanelModule,
|
|
5238
|
-
ClrNotificationModule,
|
|
5239
|
-
ClrFlowBarModule,
|
|
5240
|
-
ClrBackButtonModule,
|
|
5241
|
-
ClrNumericFieldModule,
|
|
5242
|
-
ClrSearchFieldModule,
|
|
5243
|
-
ClrTreetableModule,
|
|
5244
|
-
ClrProgressSpinnerModule,
|
|
5245
|
-
ClrDateTimeModule,
|
|
5246
|
-
ClrQuickListModule,
|
|
5247
|
-
ClrLetterAvatarModule,
|
|
5248
|
-
ClrMultilingualModule,
|
|
5249
|
-
ClrGenericQuickListModule,
|
|
5250
|
-
ClrDataListValidatorModule,
|
|
5251
|
-
ClrHistoryModule,
|
|
5252
|
-
ClrAutocompleteOffModule,
|
|
5253
|
-
ClrBrandAvatarModule,
|
|
5254
|
-
ClrLocationBarModule,
|
|
5255
|
-
ClrFormModule,
|
|
5256
|
-
ClrDropdownOverflowModule,
|
|
5257
|
-
ClrDatagridStatePersistenceModule,
|
|
5258
|
-
ClrEnumFilterModule,
|
|
5259
|
-
ClrDateFilterModule] });
|
|
5260
|
-
ClrAddonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, imports: [ClrViewEditSectionModule,
|
|
5261
|
-
ClrPagerModule,
|
|
5262
|
-
ClrDotPagerModule,
|
|
5263
|
-
ClrPagedSearchResultListModule,
|
|
5264
|
-
ClrCollapseExpandSectionModule,
|
|
5265
|
-
ClrBreadcrumbModule,
|
|
5266
|
-
ClrMainNavGroupModule,
|
|
5267
|
-
ClrContentPanelModule,
|
|
5268
|
-
ClrNotificationModule,
|
|
5269
|
-
ClrFlowBarModule,
|
|
5270
|
-
ClrBackButtonModule,
|
|
5271
|
-
ClrNumericFieldModule,
|
|
5272
|
-
ClrSearchFieldModule,
|
|
5273
|
-
ClrTreetableModule,
|
|
5274
|
-
ClrProgressSpinnerModule,
|
|
5275
|
-
ClrDateTimeModule,
|
|
5276
|
-
ClrQuickListModule,
|
|
5277
|
-
ClrLetterAvatarModule,
|
|
5278
|
-
ClrMultilingualModule,
|
|
5279
|
-
ClrGenericQuickListModule,
|
|
5280
|
-
ClrDataListValidatorModule,
|
|
5281
|
-
ClrHistoryModule,
|
|
5282
|
-
ClrAutocompleteOffModule,
|
|
5283
|
-
ClrBrandAvatarModule,
|
|
5284
|
-
ClrLocationBarModule,
|
|
5285
|
-
ClrFormModule,
|
|
5286
|
-
ClrDropdownOverflowModule,
|
|
5287
|
-
ClrDatagridStatePersistenceModule,
|
|
5288
|
-
ClrEnumFilterModule,
|
|
5289
|
-
ClrDateFilterModule] });
|
|
5290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, decorators: [{
|
|
5291
|
-
type: NgModule,
|
|
5292
|
-
args: [{
|
|
5293
|
-
exports: [
|
|
5294
|
-
ClrViewEditSectionModule,
|
|
5295
|
-
ClrPagerModule,
|
|
5296
|
-
ClrDotPagerModule,
|
|
5297
|
-
ClrPagedSearchResultListModule,
|
|
5298
|
-
ClrCollapseExpandSectionModule,
|
|
5299
|
-
ClrBreadcrumbModule,
|
|
5300
|
-
ClrMainNavGroupModule,
|
|
5301
|
-
ClrContentPanelModule,
|
|
5302
|
-
ClrNotificationModule,
|
|
5303
|
-
ClrFlowBarModule,
|
|
5304
|
-
ClrBackButtonModule,
|
|
5305
|
-
ClrNumericFieldModule,
|
|
5306
|
-
ClrSearchFieldModule,
|
|
5307
|
-
ClrTreetableModule,
|
|
5308
|
-
ClrProgressSpinnerModule,
|
|
5309
|
-
ClrDateTimeModule,
|
|
5310
|
-
ClrQuickListModule,
|
|
5311
|
-
ClrLetterAvatarModule,
|
|
5312
|
-
ClrMultilingualModule,
|
|
5313
|
-
ClrGenericQuickListModule,
|
|
5314
|
-
ClrDataListValidatorModule,
|
|
5315
|
-
ClrHistoryModule,
|
|
5316
|
-
ClrAutocompleteOffModule,
|
|
5317
|
-
ClrBrandAvatarModule,
|
|
5318
|
-
ClrLocationBarModule,
|
|
5319
|
-
ClrFormModule,
|
|
5320
|
-
ClrDropdownOverflowModule,
|
|
5321
|
-
ClrDatagridStatePersistenceModule,
|
|
5322
|
-
ClrEnumFilterModule,
|
|
5323
|
-
ClrDateFilterModule,
|
|
5324
|
-
],
|
|
5325
|
-
}]
|
|
5326
|
-
}] });
|
|
5327
|
-
|
|
5328
|
-
/*
|
|
5329
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5330
|
-
* This software is released under MIT license.
|
|
5331
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5332
|
-
*/
|
|
5333
|
-
|
|
5334
|
-
/*
|
|
5335
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5336
|
-
* This software is released under MIT license.
|
|
5337
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5338
|
-
*/
|
|
5339
|
-
|
|
5340
|
-
/*
|
|
5341
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5342
|
-
* This software is released under MIT license.
|
|
5343
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5344
|
-
*/
|
|
5345
|
-
|
|
5346
|
-
/*
|
|
5347
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5348
|
-
* This software is released under MIT license.
|
|
5349
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5350
|
-
*/
|
|
5351
|
-
|
|
5352
|
-
/*
|
|
5353
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5354
|
-
* This software is released under MIT license.
|
|
5355
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5356
|
-
*/
|
|
5357
|
-
|
|
5358
|
-
/*
|
|
5359
|
-
* Copyright (c) 2018-2020 Porsche Informatik. All Rights Reserved.
|
|
5360
|
-
* This software is released under MIT license.
|
|
5361
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5362
|
-
*/
|
|
5363
|
-
|
|
5364
|
-
/*
|
|
5365
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5366
|
-
* This software is released under MIT license.
|
|
5367
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5368
|
-
*/
|
|
5369
|
-
|
|
5370
|
-
/*
|
|
5371
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5372
|
-
* This software is released under MIT license.
|
|
5373
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5374
|
-
*/
|
|
5375
|
-
|
|
5376
|
-
/*
|
|
5377
|
-
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
5378
|
-
* This software is released under MIT license.
|
|
5379
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5380
|
-
*/
|
|
5381
|
-
|
|
5382
|
-
/*
|
|
5383
|
-
* Copyright (c) 2018-2021 Porsche Informatik. All Rights Reserved.
|
|
5384
|
-
* This software is released under MIT license.
|
|
5385
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5386
|
-
*/
|
|
5387
|
-
/*
|
|
5388
|
-
* Copyright (c) 2018-2021 Porsche Informatik. All Rights Reserved.
|
|
5389
|
-
* This software is released under MIT license.
|
|
5390
|
-
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5391
|
-
*/
|
|
5392
5226
|
/**
|
|
5393
|
-
*
|
|
5394
|
-
*
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5227
|
+
* Day model.
|
|
5228
|
+
* Takes care of keeping records of full days, without the times & timezone issues.
|
|
5229
|
+
*/
|
|
5230
|
+
class DayModel {
|
|
5231
|
+
constructor(...args) {
|
|
5232
|
+
if (args[0] instanceof Date) {
|
|
5233
|
+
const date = args[0];
|
|
5234
|
+
this.year = date.getFullYear();
|
|
5235
|
+
this.month = date.getMonth();
|
|
5236
|
+
this.date = date.getDate();
|
|
5237
|
+
}
|
|
5238
|
+
else if (typeof args[0] === 'string') {
|
|
5239
|
+
const [year, month, day] = args[0].split('-').map(n => parseInt(n, 10));
|
|
5240
|
+
this.year = year;
|
|
5241
|
+
this.month = month - 1;
|
|
5242
|
+
this.date = day;
|
|
5243
|
+
}
|
|
5244
|
+
else {
|
|
5245
|
+
this.year = args[0];
|
|
5246
|
+
this.month = args[1];
|
|
5247
|
+
this.date = args[2];
|
|
5248
|
+
}
|
|
5249
|
+
}
|
|
5250
|
+
/**
|
|
5251
|
+
* Checks if the passed value is equal to current day model.
|
|
5252
|
+
* @param value - Day model.
|
|
5253
|
+
* @returns Wether value is equal to current day model.
|
|
5254
|
+
*/
|
|
5255
|
+
isEqual(value) {
|
|
5256
|
+
if (value) {
|
|
5257
|
+
return this.year === value.year && this.month === value.month && this.date === value.date;
|
|
5258
|
+
}
|
|
5259
|
+
return false;
|
|
5260
|
+
}
|
|
5261
|
+
/**
|
|
5262
|
+
* Increment day model with date value.
|
|
5263
|
+
* @param value - Incremental date value.
|
|
5264
|
+
* @returns Updated day model with incremented date value.
|
|
5265
|
+
*/
|
|
5266
|
+
incrementBy(value) {
|
|
5267
|
+
// Creating new Javascript Date object to increment because
|
|
5268
|
+
// it will automatically take care of switching to next or previous
|
|
5269
|
+
// months & years without we having to worry about it.
|
|
5270
|
+
const date = new Date(this.year, this.month, this.date + value);
|
|
5271
|
+
this.year = date.getFullYear();
|
|
5272
|
+
this.month = date.getMonth();
|
|
5273
|
+
this.date = date.getDate();
|
|
5274
|
+
return this;
|
|
5275
|
+
}
|
|
5276
|
+
/**
|
|
5277
|
+
* Checks if current day model is after value.
|
|
5278
|
+
* @param value - Day model.
|
|
5279
|
+
* @returns Wether current day model is after value.
|
|
5280
|
+
*/
|
|
5281
|
+
isAfter(value) {
|
|
5282
|
+
return this.toDate() > value.toDate();
|
|
5283
|
+
}
|
|
5284
|
+
/**
|
|
5285
|
+
* Checks if current day model is before value.
|
|
5286
|
+
* @param value - Day model.
|
|
5287
|
+
* @returns Wether current day model is before value.
|
|
5288
|
+
*/
|
|
5289
|
+
isBefore(value) {
|
|
5290
|
+
return this.toDate() < value.toDate();
|
|
5291
|
+
}
|
|
5292
|
+
/**
|
|
5293
|
+
* Clones the current day model.
|
|
5294
|
+
* @returns Cloned day model.
|
|
5295
|
+
*/
|
|
5296
|
+
clone() {
|
|
5297
|
+
return new DayModel(this.year, this.month, this.date);
|
|
5298
|
+
}
|
|
5299
|
+
/**
|
|
5300
|
+
* Convert to Javascript Date object.
|
|
5301
|
+
* @returns Javascript Date object.
|
|
5302
|
+
*/
|
|
5303
|
+
toDate() {
|
|
5304
|
+
return new Date(this.year, this.month, this.date);
|
|
5305
|
+
}
|
|
5306
|
+
/**
|
|
5307
|
+
* To HTML5 date spec string.
|
|
5308
|
+
* See https://clarity.design/documentation/datepicker
|
|
5309
|
+
* @returns Date as HTML5 spec string.
|
|
5310
|
+
*/
|
|
5311
|
+
toHTML5SpecDateString() {
|
|
5312
|
+
// The clarity date picker uses the format 'YYYY-MM-DD'.
|
|
5313
|
+
return `${this.year}-${this.pad(this.month + 1)}-${this.pad(this.date)}`;
|
|
5314
|
+
}
|
|
5315
|
+
/**
|
|
5316
|
+
* String padding with zeros.
|
|
5317
|
+
* @param num - Number to pad.
|
|
5318
|
+
* @returns Padded string.
|
|
5319
|
+
*/
|
|
5320
|
+
pad(num) {
|
|
5321
|
+
return num < 10 ? `0${num}` : `${num}`;
|
|
5404
5322
|
}
|
|
5405
5323
|
}
|
|
5324
|
+
|
|
5406
5325
|
/**
|
|
5407
|
-
*
|
|
5326
|
+
* Keeps track of how many Clarity Datepicker there are open.
|
|
5327
|
+
* This is needed for the ClrDaterangepickerContainerComponent, to know when to close the popover.
|
|
5408
5328
|
*/
|
|
5409
|
-
class
|
|
5410
|
-
constructor(
|
|
5411
|
-
this.
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
this.result = new Promise(resolve => {
|
|
5417
|
-
this._resolve = resolve;
|
|
5418
|
-
});
|
|
5419
|
-
this.result.then(null);
|
|
5329
|
+
class OpenedDatepickersTrackerService {
|
|
5330
|
+
constructor() {
|
|
5331
|
+
this.openedDatepickersCount = 0;
|
|
5332
|
+
/**
|
|
5333
|
+
* Event triggered when value changes.
|
|
5334
|
+
*/
|
|
5335
|
+
this.valueChange = new EventEmitter();
|
|
5420
5336
|
}
|
|
5421
5337
|
/**
|
|
5422
|
-
*
|
|
5338
|
+
* Tracks an opened datepicker.
|
|
5339
|
+
* @param opened - Opened state.
|
|
5423
5340
|
*/
|
|
5424
|
-
|
|
5425
|
-
if (
|
|
5426
|
-
this.
|
|
5427
|
-
this._removeModalElements();
|
|
5341
|
+
track(opened) {
|
|
5342
|
+
if (opened) {
|
|
5343
|
+
this.openedDatepickersCount++;
|
|
5428
5344
|
}
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
const notificationNativeEl = this._notificationCmptRef.location.nativeElement;
|
|
5432
|
-
notificationNativeEl.parentNode.removeChild(notificationNativeEl);
|
|
5433
|
-
this._notificationCmptRef.destroy();
|
|
5434
|
-
if (this._contentRef && this._contentRef.viewRef) {
|
|
5435
|
-
this._contentRef.viewRef.destroy();
|
|
5345
|
+
else {
|
|
5346
|
+
this.openedDatepickersCount--;
|
|
5436
5347
|
}
|
|
5437
|
-
this.
|
|
5438
|
-
this.
|
|
5348
|
+
this.openedDatepickersCount = Math.max(0, this.openedDatepickersCount);
|
|
5349
|
+
this.valueChange.emit(this.openedDatepickersCount !== 0);
|
|
5439
5350
|
}
|
|
5440
5351
|
}
|
|
5352
|
+
OpenedDatepickersTrackerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: OpenedDatepickersTrackerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5353
|
+
OpenedDatepickersTrackerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: OpenedDatepickersTrackerService, providedIn: 'root' });
|
|
5354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: OpenedDatepickersTrackerService, decorators: [{
|
|
5355
|
+
type: Injectable,
|
|
5356
|
+
args: [{ providedIn: 'root' }]
|
|
5357
|
+
}] });
|
|
5441
5358
|
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5359
|
+
class ClrDatepickerComponent {
|
|
5360
|
+
constructor(openedDatepickersTrackerService) {
|
|
5361
|
+
this.openedDatepickersTrackerService = openedDatepickersTrackerService;
|
|
5362
|
+
/**
|
|
5363
|
+
* Text label.
|
|
5364
|
+
*/
|
|
5365
|
+
this.label = 'Date';
|
|
5366
|
+
/**
|
|
5367
|
+
* Minimum date that can be selected.
|
|
5368
|
+
*/
|
|
5369
|
+
this.minDate = undefined;
|
|
5370
|
+
/**
|
|
5371
|
+
* Maximum date that can be selected.
|
|
5372
|
+
*/
|
|
5373
|
+
this.maxDate = undefined;
|
|
5374
|
+
/**
|
|
5375
|
+
* Event triggered when value changes.
|
|
5376
|
+
*/
|
|
5377
|
+
this.valueChange = new EventEmitter();
|
|
5378
|
+
/** List of subscriptions to later destroy. */
|
|
5379
|
+
this.subscriptions = [];
|
|
5380
|
+
}
|
|
5381
|
+
/**
|
|
5382
|
+
* Get date.
|
|
5383
|
+
* @returns JavaScript Date object.
|
|
5384
|
+
*/
|
|
5385
|
+
get date() {
|
|
5386
|
+
return this.value?.toDate();
|
|
5387
|
+
}
|
|
5388
|
+
/**
|
|
5389
|
+
* Set date.
|
|
5390
|
+
*/
|
|
5391
|
+
set date(val) {
|
|
5392
|
+
this.value = val == null ? null : new DayModel(val);
|
|
5393
|
+
this.valueChange.emit(this.value);
|
|
5394
|
+
}
|
|
5395
|
+
/**
|
|
5396
|
+
* Minimum date as attribute string.
|
|
5397
|
+
* @returns Minimum date as attribute string.
|
|
5398
|
+
*/
|
|
5399
|
+
get minDateAttr() {
|
|
5400
|
+
return this.minDate?.toHTML5SpecDateString();
|
|
5401
|
+
}
|
|
5402
|
+
/**
|
|
5403
|
+
* Maximum date as attribute string.
|
|
5404
|
+
* @returns Maximum date as attribute string.
|
|
5405
|
+
*/
|
|
5406
|
+
get maxDateAttr() {
|
|
5407
|
+
return this.maxDate?.toHTML5SpecDateString();
|
|
5408
|
+
}
|
|
5409
|
+
ngAfterViewInit() {
|
|
5410
|
+
// eslint-disable-next-line dot-notation -- Need access to this private property.
|
|
5411
|
+
const toggleService = this.clrDateContainer['toggleService'];
|
|
5412
|
+
this.subscriptions.push(toggleService.openChange.subscribe(openState => {
|
|
5413
|
+
this.openedDatepickersTrackerService.track(openState);
|
|
5414
|
+
}));
|
|
5415
|
+
}
|
|
5416
|
+
ngOnDestroy() {
|
|
5417
|
+
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
5418
|
+
}
|
|
5419
|
+
/**
|
|
5420
|
+
* Focus input.
|
|
5421
|
+
*/
|
|
5422
|
+
focus() {
|
|
5423
|
+
this.inputElm.nativeElement.focus();
|
|
5424
|
+
}
|
|
5425
|
+
}
|
|
5426
|
+
ClrDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDatepickerComponent, deps: [{ token: OpenedDatepickersTrackerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5427
|
+
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]" }] });
|
|
5428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDatepickerComponent, decorators: [{
|
|
5429
|
+
type: Component,
|
|
5430
|
+
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" }]
|
|
5431
|
+
}], ctorParameters: function () { return [{ type: OpenedDatepickersTrackerService }]; }, propDecorators: { value: [{
|
|
5432
|
+
type: Input
|
|
5433
|
+
}], label: [{
|
|
5434
|
+
type: Input
|
|
5435
|
+
}], minDate: [{
|
|
5436
|
+
type: Input
|
|
5437
|
+
}], maxDate: [{
|
|
5438
|
+
type: Input
|
|
5439
|
+
}], inputElm: [{
|
|
5440
|
+
type: ViewChild,
|
|
5441
|
+
args: ['inputElm']
|
|
5442
|
+
}], clrDateContainer: [{
|
|
5443
|
+
type: ViewChild,
|
|
5444
|
+
args: [ClrDateContainer]
|
|
5445
|
+
}], valueChange: [{
|
|
5446
|
+
type: Output
|
|
5447
|
+
}] } });
|
|
5448
|
+
|
|
5449
|
+
const USER_INPUT_REGEX = /\d+/g;
|
|
5450
|
+
// https://en.wikipedia.org/wiki/Date_format_by_country
|
|
5451
|
+
const LITTLE_ENDIAN_REGEX = /d+.+m+.+y+/i;
|
|
5452
|
+
const MIDDLE_ENDIAN_REGEX = /m+.+d+.+y+/i;
|
|
5453
|
+
const DELIMITER_REGEX = /d+|m+|y+/i;
|
|
5454
|
+
const YEAR = 'YYYY';
|
|
5455
|
+
const MONTH = 'MM';
|
|
5456
|
+
const DATE = 'DD';
|
|
5457
|
+
const LITTLE_ENDIAN = {
|
|
5458
|
+
name: 'LITTLE_ENDIAN',
|
|
5459
|
+
format: [DATE, MONTH, YEAR],
|
|
5460
|
+
};
|
|
5461
|
+
const MIDDLE_ENDIAN = {
|
|
5462
|
+
name: 'MIDDLE_ENDIAN',
|
|
5463
|
+
format: [MONTH, DATE, YEAR],
|
|
5464
|
+
};
|
|
5465
|
+
const BIG_ENDIAN = {
|
|
5466
|
+
name: 'BIG_ENDIAN',
|
|
5467
|
+
format: [YEAR, MONTH, DATE],
|
|
5468
|
+
};
|
|
5469
|
+
/** Default separator text. */
|
|
5470
|
+
const SEPARATOR_TEXT_DEFAULT = ' - ';
|
|
5471
|
+
const TRANSLATIONS = {
|
|
5472
|
+
from: 'From',
|
|
5473
|
+
to: 'To',
|
|
5474
|
+
};
|
|
5475
|
+
|
|
5476
|
+
/**
|
|
5477
|
+
* Popover positions.
|
|
5478
|
+
* https://github.com/vmware-clarity/ng-clarity/blob/f1a668086bf88bcf5ef1cd36b0d150e45e88def7/projects/angular/src/utils/popover/enums/positions.enum.ts
|
|
5479
|
+
*/
|
|
5480
|
+
class PopoverPositions {
|
|
5481
|
+
}
|
|
5482
|
+
PopoverPositions.options = [
|
|
5483
|
+
'bottom-left',
|
|
5484
|
+
'bottom-right',
|
|
5485
|
+
'left-bottom',
|
|
5486
|
+
'left-top',
|
|
5487
|
+
'right-bottom',
|
|
5488
|
+
'right-top',
|
|
5489
|
+
'top-left',
|
|
5490
|
+
'top-right',
|
|
5491
|
+
];
|
|
5492
|
+
PopoverPositions['bottom-left'] = {
|
|
5493
|
+
axis: ClrAxis.VERTICAL,
|
|
5494
|
+
side: ClrSide.AFTER,
|
|
5495
|
+
anchor: ClrAlignment.START,
|
|
5496
|
+
content: ClrAlignment.START,
|
|
5497
|
+
};
|
|
5498
|
+
PopoverPositions['bottom-right'] = {
|
|
5499
|
+
axis: ClrAxis.VERTICAL,
|
|
5500
|
+
side: ClrSide.AFTER,
|
|
5501
|
+
anchor: ClrAlignment.END,
|
|
5502
|
+
content: ClrAlignment.END,
|
|
5503
|
+
};
|
|
5504
|
+
PopoverPositions['left-bottom'] = {
|
|
5505
|
+
axis: ClrAxis.HORIZONTAL,
|
|
5506
|
+
side: ClrSide.BEFORE,
|
|
5507
|
+
anchor: ClrAlignment.START,
|
|
5508
|
+
content: ClrAlignment.START,
|
|
5509
|
+
};
|
|
5510
|
+
PopoverPositions['left-top'] = {
|
|
5511
|
+
axis: ClrAxis.HORIZONTAL,
|
|
5512
|
+
side: ClrSide.BEFORE,
|
|
5513
|
+
anchor: ClrAlignment.CENTER,
|
|
5514
|
+
content: ClrAlignment.END,
|
|
5515
|
+
};
|
|
5516
|
+
PopoverPositions['right-bottom'] = {
|
|
5517
|
+
axis: ClrAxis.HORIZONTAL,
|
|
5518
|
+
side: ClrSide.AFTER,
|
|
5519
|
+
anchor: ClrAlignment.START,
|
|
5520
|
+
content: ClrAlignment.START,
|
|
5521
|
+
};
|
|
5522
|
+
PopoverPositions['right-top'] = {
|
|
5523
|
+
axis: ClrAxis.HORIZONTAL,
|
|
5524
|
+
side: ClrSide.AFTER,
|
|
5525
|
+
anchor: ClrAlignment.CENTER,
|
|
5526
|
+
content: ClrAlignment.END,
|
|
5527
|
+
};
|
|
5528
|
+
PopoverPositions['top-left'] = {
|
|
5529
|
+
axis: ClrAxis.VERTICAL,
|
|
5530
|
+
side: ClrSide.BEFORE,
|
|
5531
|
+
anchor: ClrAlignment.START,
|
|
5532
|
+
content: ClrAlignment.START,
|
|
5533
|
+
};
|
|
5534
|
+
PopoverPositions['top-right'] = {
|
|
5535
|
+
axis: ClrAxis.VERTICAL,
|
|
5536
|
+
side: ClrSide.BEFORE,
|
|
5537
|
+
anchor: ClrAlignment.END,
|
|
5538
|
+
content: ClrAlignment.END,
|
|
5539
|
+
};
|
|
5540
|
+
|
|
5541
|
+
/**
|
|
5542
|
+
* Daterange control state service.
|
|
5543
|
+
* Stores data for communication between daterange container and input.
|
|
5544
|
+
*/
|
|
5545
|
+
class DaterangeControlStateService {
|
|
5546
|
+
constructor() {
|
|
5547
|
+
/** Disabled control state. */
|
|
5548
|
+
this.disabled = false;
|
|
5549
|
+
/** Focused. */
|
|
5550
|
+
this.focused = false;
|
|
5551
|
+
/** List of validation errors. */
|
|
5552
|
+
this.errors = null;
|
|
5553
|
+
this._invalid = false;
|
|
5554
|
+
this._touched = false;
|
|
5555
|
+
/**
|
|
5556
|
+
* Event triggered when status changes.
|
|
5557
|
+
*/
|
|
5558
|
+
this.statusChange = new EventEmitter();
|
|
5559
|
+
}
|
|
5560
|
+
/**
|
|
5561
|
+
* Control invalid status.
|
|
5562
|
+
* @returns Control invalid status.
|
|
5563
|
+
*/
|
|
5564
|
+
get invalid() {
|
|
5565
|
+
return this._invalid;
|
|
5566
|
+
}
|
|
5567
|
+
/**
|
|
5568
|
+
* Touched.
|
|
5569
|
+
* @returns Touched.
|
|
5570
|
+
*/
|
|
5571
|
+
get touched() {
|
|
5572
|
+
return this._touched;
|
|
5573
|
+
}
|
|
5574
|
+
/**
|
|
5575
|
+
* Update status.
|
|
5576
|
+
* Only for valid & invalid status changes.
|
|
5577
|
+
* And only if there was a real change.
|
|
5578
|
+
* Also updates errors list.
|
|
5579
|
+
* Emits `statusChange` event.
|
|
5580
|
+
* @param control
|
|
5581
|
+
*/
|
|
5582
|
+
updateStatus(control) {
|
|
5583
|
+
this._touched = control.touched;
|
|
5584
|
+
// We only care about valid & invalid status changes.
|
|
5585
|
+
// There is an bug where `ClrDaterangepickerDirective.writeValue` is called twice with same value (`null`).
|
|
5586
|
+
// Setting ` && (control.touched || control.dirty)` in next if-statement will hide the errors,
|
|
5587
|
+
// but the control will still be invalid with errors (just hidden).
|
|
5588
|
+
if (['VALID', 'INVALID'].includes(control.status)) {
|
|
5589
|
+
this.errors = control.errors;
|
|
5590
|
+
this._invalid = control.invalid;
|
|
5591
|
+
this.statusChange.emit(this._invalid);
|
|
5592
|
+
}
|
|
5593
|
+
}
|
|
5594
|
+
}
|
|
5595
|
+
DaterangeControlStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeControlStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5596
|
+
DaterangeControlStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeControlStateService });
|
|
5597
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeControlStateService, decorators: [{
|
|
5598
|
+
type: Injectable
|
|
5599
|
+
}] });
|
|
5600
|
+
|
|
5601
|
+
/**
|
|
5602
|
+
* Daterange parsing service.
|
|
5603
|
+
* Heavy inspired by `date-io.service.ts` from Clarity.
|
|
5604
|
+
* https://github.com/vmware-clarity/ng-clarity/blob/a21fe726fe91ae3c929b8f016359afe354bb89c6/projects/angular/src/forms/datepicker/providers/date-io.service.ts
|
|
5605
|
+
*/
|
|
5606
|
+
class DaterangeParsingService {
|
|
5607
|
+
constructor(locale) {
|
|
5608
|
+
this.locale = locale;
|
|
5609
|
+
this.localeDelimiter = [];
|
|
5610
|
+
const localeFormat = getLocaleDateFormat(this.locale, FormatWidth.Short);
|
|
5611
|
+
const format = localeFormat.toLocaleLowerCase();
|
|
5612
|
+
if (LITTLE_ENDIAN_REGEX.test(format)) {
|
|
5613
|
+
this.localeDisplayFormat = LITTLE_ENDIAN;
|
|
5614
|
+
}
|
|
5615
|
+
else if (MIDDLE_ENDIAN_REGEX.test(format)) {
|
|
5616
|
+
this.localeDisplayFormat = MIDDLE_ENDIAN;
|
|
5617
|
+
}
|
|
5618
|
+
else {
|
|
5619
|
+
this.localeDisplayFormat = BIG_ENDIAN;
|
|
5620
|
+
}
|
|
5621
|
+
// Splitting it by date, month and year, leaves us with the delimiters.
|
|
5622
|
+
// E.g. `"dd/MM/y".split(/d+|m+|y+/i)` results in `["", "/", "/", ""]`.
|
|
5623
|
+
const delimiters = localeFormat.split(DELIMITER_REGEX);
|
|
5624
|
+
this.localeDelimiter = [delimiters[1], delimiters[2]];
|
|
5625
|
+
}
|
|
5626
|
+
/** Locale format. */
|
|
5627
|
+
get localeFormat() {
|
|
5628
|
+
return (this.localeDisplayFormat.format[0] +
|
|
5629
|
+
this.localeDelimiter[0] +
|
|
5630
|
+
this.localeDisplayFormat.format[1] +
|
|
5631
|
+
this.localeDelimiter[1] +
|
|
5632
|
+
this.localeDisplayFormat.format[2]);
|
|
5633
|
+
}
|
|
5634
|
+
/**
|
|
5635
|
+
* Convert daterange to locale friendly text.
|
|
5636
|
+
* @param daterange - Daterange.
|
|
5637
|
+
* @param separator - Separator between 'from' and 'to' dates.
|
|
5638
|
+
* @returns Friendly daterange text.
|
|
5639
|
+
*/
|
|
5640
|
+
toLocaleString(daterange, separator = SEPARATOR_TEXT_DEFAULT) {
|
|
5641
|
+
if (daterange == null) {
|
|
5642
|
+
return '';
|
|
5643
|
+
}
|
|
5644
|
+
const { from, to } = daterange;
|
|
5645
|
+
if (from == null || to == null) {
|
|
5646
|
+
return '';
|
|
5647
|
+
}
|
|
5648
|
+
const fromDate = from.toDate();
|
|
5649
|
+
const toDate = to.toDate();
|
|
5650
|
+
const fromDateStr = this.toLocaleDisplayFormatString(fromDate);
|
|
5651
|
+
const toDateStr = this.toLocaleDisplayFormatString(toDate);
|
|
5652
|
+
return fromDateStr + separator + toDateStr;
|
|
5653
|
+
}
|
|
5654
|
+
/**
|
|
5655
|
+
* Convert date to locale display format string.
|
|
5656
|
+
* @param date - Javascript Date object.
|
|
5657
|
+
* @returns Locale display format string.
|
|
5658
|
+
*/
|
|
5659
|
+
toLocaleDisplayFormatString(date) {
|
|
5660
|
+
const dateNo = date.getDate();
|
|
5661
|
+
const monthNo = date.getMonth() + 1;
|
|
5662
|
+
const yearNo = date.getFullYear();
|
|
5663
|
+
const dateStr = this.pad(dateNo);
|
|
5664
|
+
const monthStr = this.pad(monthNo);
|
|
5665
|
+
const delim1 = this.localeDelimiter[0];
|
|
5666
|
+
const delim2 = this.localeDelimiter[1];
|
|
5667
|
+
if (this.localeDisplayFormat === LITTLE_ENDIAN) {
|
|
5668
|
+
return dateStr + delim1 + monthStr + delim2 + yearNo;
|
|
5669
|
+
}
|
|
5670
|
+
else if (this.localeDisplayFormat === MIDDLE_ENDIAN) {
|
|
5671
|
+
return monthStr + delim1 + dateStr + delim2 + yearNo;
|
|
5672
|
+
}
|
|
5673
|
+
else {
|
|
5674
|
+
return yearNo + delim1 + monthStr + delim2 + dateStr;
|
|
5675
|
+
}
|
|
5676
|
+
}
|
|
5677
|
+
/**
|
|
5678
|
+
* String padding with zeros.
|
|
5679
|
+
* @param num - Number to pad.
|
|
5680
|
+
* @returns Padded string.
|
|
5681
|
+
*/
|
|
5682
|
+
pad(num) {
|
|
5683
|
+
return num < 10 ? `0${num}` : `${num}`;
|
|
5684
|
+
}
|
|
5685
|
+
/**
|
|
5686
|
+
* Parse daterange string to daterange object.
|
|
5687
|
+
* @param daterangeString - Daterange string.
|
|
5688
|
+
* @param separator - Separator text.
|
|
5689
|
+
* @returns Daterange object.
|
|
5690
|
+
*/
|
|
5691
|
+
parse(daterangeString, separator = SEPARATOR_TEXT_DEFAULT) {
|
|
5692
|
+
if (daterangeString == null || daterangeString === '') {
|
|
5693
|
+
return null;
|
|
5694
|
+
}
|
|
5695
|
+
const [fromString, toString] = daterangeString.split(separator);
|
|
5696
|
+
const from = this.getDayModelFromDateString(fromString);
|
|
5697
|
+
const to = this.getDayModelFromDateString(toString);
|
|
5698
|
+
if (from == null && to == null) {
|
|
5699
|
+
return null;
|
|
5700
|
+
}
|
|
5701
|
+
return { from, to };
|
|
5702
|
+
}
|
|
5703
|
+
/**
|
|
5704
|
+
* Get `DayModel` from date string.
|
|
5705
|
+
* @param dateString - Date string.
|
|
5706
|
+
* @returns DayModel.
|
|
5707
|
+
*/
|
|
5708
|
+
getDayModelFromDateString(dateString) {
|
|
5709
|
+
if (dateString == null || dateString === '') {
|
|
5710
|
+
return null;
|
|
5711
|
+
}
|
|
5712
|
+
const dateParts = dateString.match(USER_INPUT_REGEX);
|
|
5713
|
+
if (dateParts == null || dateParts.length !== 3) {
|
|
5714
|
+
return null;
|
|
5715
|
+
}
|
|
5716
|
+
const [firstPart, secondPart, thirdPart] = dateParts;
|
|
5717
|
+
if (this.localeDisplayFormat === LITTLE_ENDIAN) {
|
|
5718
|
+
// secondPart is month && firstPart is date.
|
|
5719
|
+
return this.getDayModelFromDateParts(thirdPart, secondPart, firstPart);
|
|
5720
|
+
}
|
|
5721
|
+
else if (this.localeDisplayFormat === MIDDLE_ENDIAN) {
|
|
5722
|
+
// firstPart is month && secondPart is date.
|
|
5723
|
+
return this.getDayModelFromDateParts(thirdPart, firstPart, secondPart);
|
|
5724
|
+
}
|
|
5725
|
+
else {
|
|
5726
|
+
// secondPart is month && thirdPart is date.
|
|
5727
|
+
return this.getDayModelFromDateParts(firstPart, secondPart, thirdPart);
|
|
5728
|
+
}
|
|
5729
|
+
}
|
|
5730
|
+
/**
|
|
5731
|
+
* Get `DayModel` from date string parts.
|
|
5732
|
+
* @param yearString - Year string.
|
|
5733
|
+
* @param monthString - Month string.
|
|
5734
|
+
* @param dateString - Date string.
|
|
5735
|
+
* @returns DayModel.
|
|
5736
|
+
*/
|
|
5737
|
+
getDayModelFromDateParts(yearString, monthString, dateString) {
|
|
5738
|
+
// Check for valid date part strings.
|
|
5739
|
+
let year = parseInt(yearString);
|
|
5740
|
+
if (isNaN(year)) {
|
|
5741
|
+
return null;
|
|
5742
|
+
}
|
|
5743
|
+
let month = parseInt(monthString);
|
|
5744
|
+
if (isNaN(month)) {
|
|
5745
|
+
return null;
|
|
5746
|
+
}
|
|
5747
|
+
const date = parseInt(dateString);
|
|
5748
|
+
if (isNaN(date)) {
|
|
5749
|
+
return null;
|
|
5750
|
+
}
|
|
5751
|
+
// Convert year to 4 digit year.
|
|
5752
|
+
year = this.parseToFourDigitYear(year);
|
|
5753
|
+
if (year == null) {
|
|
5754
|
+
return null;
|
|
5755
|
+
}
|
|
5756
|
+
// Month is zero-indexed.
|
|
5757
|
+
month -= 1;
|
|
5758
|
+
// Creating new Javascript Date object, because it will automatically take care of
|
|
5759
|
+
// switching to next or previous months & years without we having to worry about it.
|
|
5760
|
+
const parsedDate = new Date(year, month, date);
|
|
5761
|
+
if (isNaN(parsedDate.getTime())) {
|
|
5762
|
+
return null;
|
|
5763
|
+
}
|
|
5764
|
+
return new DayModel(parsedDate);
|
|
5765
|
+
}
|
|
5766
|
+
/**
|
|
5767
|
+
* Takes in a year and if it is a 2 digit year, returns the corresponding 4 digit year.
|
|
5768
|
+
* Window of 80 years before and 20 years after the present year.
|
|
5769
|
+
* Credit: https://github.com/globalizejs/globalize/blob/e1b31cd6a4f1cff75b185b68b7a32220aac5196f/src/date/parse.js
|
|
5770
|
+
* @param year - Year.
|
|
5771
|
+
* @returns Four-digit year.
|
|
5772
|
+
*/
|
|
5773
|
+
parseToFourDigitYear(year) {
|
|
5774
|
+
// Impossible years.
|
|
5775
|
+
if (year > 9999 || (year > 100 && year < 999) || year < 10) {
|
|
5776
|
+
return null;
|
|
5777
|
+
}
|
|
5778
|
+
if (year > 999) {
|
|
5779
|
+
return year;
|
|
5780
|
+
}
|
|
5781
|
+
const currYear = new Date().getFullYear();
|
|
5782
|
+
const century = Math.floor(currYear / 100) * 100;
|
|
5783
|
+
let result = year + century;
|
|
5784
|
+
if (result > currYear + 20) {
|
|
5785
|
+
result = result - 100;
|
|
5786
|
+
}
|
|
5787
|
+
return result;
|
|
5788
|
+
}
|
|
5789
|
+
}
|
|
5790
|
+
DaterangeParsingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeParsingService, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5791
|
+
DaterangeParsingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeParsingService, providedIn: 'root' });
|
|
5792
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeParsingService, decorators: [{
|
|
5793
|
+
type: Injectable,
|
|
5794
|
+
args: [{
|
|
5795
|
+
providedIn: 'root',
|
|
5796
|
+
}]
|
|
5797
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
5798
|
+
type: Inject,
|
|
5799
|
+
args: [LOCALE_ID]
|
|
5800
|
+
}] }]; } });
|
|
5801
|
+
|
|
5802
|
+
/**
|
|
5803
|
+
* Daterange service.
|
|
5804
|
+
* Keeps track of daterange related values.
|
|
5805
|
+
*/
|
|
5806
|
+
class DaterangeService {
|
|
5807
|
+
constructor() {
|
|
5808
|
+
/** Minimum date that can be selected. */
|
|
5809
|
+
this.minDate = null;
|
|
5810
|
+
/** Maximum date that can be selected. */
|
|
5811
|
+
this.maxDate = null;
|
|
5812
|
+
this._selectedDaterange = null;
|
|
5813
|
+
/**
|
|
5814
|
+
* Event triggered when value changes.
|
|
5815
|
+
*/
|
|
5816
|
+
this.valueChange = new EventEmitter();
|
|
5817
|
+
}
|
|
5818
|
+
/**
|
|
5819
|
+
* Selected daterange value.
|
|
5820
|
+
* @returns Selected daterange value.
|
|
5821
|
+
*/
|
|
5822
|
+
get selectedDaterange() {
|
|
5823
|
+
return this._selectedDaterange;
|
|
5824
|
+
}
|
|
5825
|
+
/**
|
|
5826
|
+
* Set selected daterange value.
|
|
5827
|
+
* @param value - New selected daterange value.
|
|
5828
|
+
* @param triggerEvent - Trigger change event (default true).
|
|
5829
|
+
*/
|
|
5830
|
+
updateSelectedDaterange(value, triggerEvent = true) {
|
|
5831
|
+
this._selectedDaterange = value;
|
|
5832
|
+
if (triggerEvent) {
|
|
5833
|
+
this.valueChange.emit(value);
|
|
5834
|
+
}
|
|
5835
|
+
}
|
|
5836
|
+
/**
|
|
5837
|
+
* Checks if daterange is valid.
|
|
5838
|
+
* Daterange is considered invalid when it's empty, or when one of it's properties is absent.
|
|
5839
|
+
* @returns Wether daterange is valid.
|
|
5840
|
+
*/
|
|
5841
|
+
isValid() {
|
|
5842
|
+
if (this._selectedDaterange == null || this._selectedDaterange.from == null || this._selectedDaterange.to == null) {
|
|
5843
|
+
return false;
|
|
5844
|
+
}
|
|
5845
|
+
return true;
|
|
5846
|
+
}
|
|
5847
|
+
}
|
|
5848
|
+
DaterangeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5849
|
+
DaterangeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeService });
|
|
5850
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: DaterangeService, decorators: [{
|
|
5851
|
+
type: Injectable
|
|
5852
|
+
}] });
|
|
5853
|
+
|
|
5854
|
+
class ClrAbstractContainer {
|
|
5855
|
+
constructor(clrLayout, daterangeControlStateService) {
|
|
5856
|
+
this.clrLayout = clrLayout;
|
|
5857
|
+
this.daterangeControlStateService = daterangeControlStateService;
|
|
5858
|
+
this.isFormControl = true;
|
|
5859
|
+
}
|
|
5860
|
+
/**
|
|
5861
|
+
* Detect if container is not part of an vertical form to apply correct grid classes.
|
|
5862
|
+
*/
|
|
5863
|
+
get addLayoutGrid() {
|
|
5864
|
+
return !this.clrLayout?.layoutService?.isVertical();
|
|
5865
|
+
}
|
|
5866
|
+
/**
|
|
5867
|
+
* Wether to show the helper control.
|
|
5868
|
+
* @returns Wether to show the helper control.
|
|
5869
|
+
*/
|
|
5870
|
+
get showHelper() {
|
|
5871
|
+
if (this.controlHelperComponent == null) {
|
|
5872
|
+
return false;
|
|
5873
|
+
}
|
|
5874
|
+
// Helper Component exist and the state of the form is NONE (not touched).
|
|
5875
|
+
if (!this.daterangeControlStateService.touched) {
|
|
5876
|
+
return true;
|
|
5877
|
+
}
|
|
5878
|
+
// Or there is no success component but the state of the form is VALID - show helper information.
|
|
5879
|
+
if (this.controlSuccessComponent == null &&
|
|
5880
|
+
this.daterangeControlStateService.touched &&
|
|
5881
|
+
!this.daterangeControlStateService.invalid) {
|
|
5882
|
+
return true;
|
|
5883
|
+
}
|
|
5884
|
+
// Or there is no error component but the state of the form is INVALID - show helper information.
|
|
5885
|
+
if (this.controlErrorComponent == null && this.daterangeControlStateService.invalid) {
|
|
5886
|
+
return true;
|
|
5887
|
+
}
|
|
5888
|
+
return false;
|
|
5889
|
+
}
|
|
5890
|
+
/**
|
|
5891
|
+
* Wether to show the valid control.
|
|
5892
|
+
* @returns Wether to show the valid control.
|
|
5893
|
+
*/
|
|
5894
|
+
get showValid() {
|
|
5895
|
+
return !this.daterangeControlStateService.invalid && !!this.controlSuccessComponent;
|
|
5896
|
+
}
|
|
5897
|
+
/**
|
|
5898
|
+
* Wether to show the invalid control.
|
|
5899
|
+
* @returns Wether to show the invalid control.
|
|
5900
|
+
*/
|
|
5901
|
+
get showInvalid() {
|
|
5902
|
+
return this.daterangeControlStateService.invalid && !!this.controlErrorComponent;
|
|
5903
|
+
}
|
|
5904
|
+
/**
|
|
5905
|
+
* Disabled state.
|
|
5906
|
+
* @returns Disabled state.
|
|
5907
|
+
*/
|
|
5908
|
+
get disabled() {
|
|
5909
|
+
return this.daterangeControlStateService.disabled;
|
|
5910
|
+
}
|
|
5911
|
+
/**
|
|
5912
|
+
* If control is focused.
|
|
5913
|
+
* @returns Wether control is focused.
|
|
5914
|
+
*/
|
|
5915
|
+
get focus() {
|
|
5916
|
+
return this.daterangeControlStateService.focused;
|
|
5917
|
+
}
|
|
5918
|
+
/**
|
|
5919
|
+
* Wether control is invalid.
|
|
5920
|
+
* @returns Wether control is invalid.
|
|
5921
|
+
*/
|
|
5922
|
+
get isInvalid() {
|
|
5923
|
+
return this.daterangeControlStateService.invalid;
|
|
5924
|
+
}
|
|
5925
|
+
}
|
|
5926
|
+
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 });
|
|
5927
|
+
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 });
|
|
5928
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAbstractContainer, decorators: [{
|
|
5929
|
+
type: Directive
|
|
5930
|
+
}], ctorParameters: function () { return [{ type: i1$1.ClrLayout, decorators: [{
|
|
5931
|
+
type: Optional
|
|
5932
|
+
}] }, { type: DaterangeControlStateService }]; }, propDecorators: { isFormControl: [{
|
|
5933
|
+
type: HostBinding,
|
|
5934
|
+
args: ['class.clr-form-control']
|
|
5935
|
+
}], addLayoutGrid: [{
|
|
5936
|
+
type: HostBinding,
|
|
5937
|
+
args: ['class.clr-row']
|
|
5938
|
+
}], labelComponent: [{
|
|
5939
|
+
type: ContentChild,
|
|
5940
|
+
args: [ClrLabel]
|
|
5941
|
+
}], controlHelperComponent: [{
|
|
5942
|
+
type: ContentChild,
|
|
5943
|
+
args: [ClrControlHelper]
|
|
5944
|
+
}], controlErrorComponent: [{
|
|
5945
|
+
type: ContentChild,
|
|
5946
|
+
args: [ClrControlError]
|
|
5947
|
+
}], controlSuccessComponent: [{
|
|
5948
|
+
type: ContentChild,
|
|
5949
|
+
args: [ClrControlSuccess]
|
|
5950
|
+
}] } });
|
|
5951
|
+
|
|
5952
|
+
/**
|
|
5953
|
+
* Daterangepicker.
|
|
5954
|
+
*/
|
|
5955
|
+
class ClrDaterangepickerDirective {
|
|
5956
|
+
constructor(control, element, renderer, daterangeControlStateService, controlIdService, daterangeService, daterangeParsingService) {
|
|
5957
|
+
this.control = control;
|
|
5958
|
+
this.element = element;
|
|
5959
|
+
this.renderer = renderer;
|
|
5960
|
+
this.daterangeControlStateService = daterangeControlStateService;
|
|
5961
|
+
this.controlIdService = controlIdService;
|
|
5962
|
+
this.daterangeService = daterangeService;
|
|
5963
|
+
this.daterangeParsingService = daterangeParsingService;
|
|
5964
|
+
/**
|
|
5965
|
+
* Locale text between 'from' and 'to' dateranges.
|
|
5966
|
+
*/
|
|
5967
|
+
this.separatorText = SEPARATOR_TEXT_DEFAULT;
|
|
5968
|
+
/**
|
|
5969
|
+
* Event that is triggered when value changes.
|
|
5970
|
+
*/
|
|
5971
|
+
this.valueChange = new EventEmitter();
|
|
5972
|
+
/** Set the `type` attribute always to "text", to not get the native datepicker. */
|
|
5973
|
+
this.inputType = 'text';
|
|
5974
|
+
this.inputClass = true;
|
|
5975
|
+
/** List of subscriptions to later destroy. */
|
|
5976
|
+
this.subscriptions = [];
|
|
5977
|
+
this.onChanged = (_value) => undefined;
|
|
5978
|
+
this.onTouched = (_value) => undefined;
|
|
5979
|
+
// To get access to the NgControl, we had to remove the `NG_VALUE_ACCESSOR`
|
|
5980
|
+
// provider and set them manually, while still keeping the interfaces.
|
|
5981
|
+
this.control.valueAccessor = this;
|
|
5982
|
+
}
|
|
5983
|
+
/**
|
|
5984
|
+
* Minimum date that can be selected.
|
|
5985
|
+
*/
|
|
5986
|
+
set min(value) {
|
|
5987
|
+
this.daterangeService.minDate = !value ? null : new DayModel(value);
|
|
5988
|
+
}
|
|
5989
|
+
/**
|
|
5990
|
+
* Maximum date that can be selected.
|
|
5991
|
+
*/
|
|
5992
|
+
set max(value) {
|
|
5993
|
+
this.daterangeService.maxDate = !value ? null : new DayModel(value);
|
|
5994
|
+
}
|
|
5995
|
+
get placeholderText() {
|
|
5996
|
+
return (this.placeholder ??
|
|
5997
|
+
this.daterangeParsingService.localeFormat + this.separatorText + this.daterangeParsingService.localeFormat);
|
|
5998
|
+
}
|
|
5999
|
+
/**
|
|
6000
|
+
* Id-attribute.
|
|
6001
|
+
*/
|
|
6002
|
+
get id() {
|
|
6003
|
+
return this.controlIdService.id;
|
|
6004
|
+
}
|
|
6005
|
+
/**
|
|
6006
|
+
* Id-attribute.
|
|
6007
|
+
* @returns Id-attribute.
|
|
6008
|
+
*/
|
|
6009
|
+
set id(value) {
|
|
6010
|
+
this.controlIdService.id = value;
|
|
6011
|
+
}
|
|
6012
|
+
/**
|
|
6013
|
+
* Disable control.
|
|
6014
|
+
*/
|
|
6015
|
+
set disabled(value) {
|
|
6016
|
+
this.daterangeControlStateService.disabled = value;
|
|
6017
|
+
}
|
|
6018
|
+
/**
|
|
6019
|
+
* Disabled state.
|
|
6020
|
+
* @returns Disabled state.
|
|
6021
|
+
*/
|
|
6022
|
+
get disabled() {
|
|
6023
|
+
return this.daterangeControlStateService.disabled;
|
|
6024
|
+
}
|
|
6025
|
+
ngOnInit() {
|
|
6026
|
+
this.listenForDaterangeValueChanges();
|
|
6027
|
+
this.listenForControlStatusChanges();
|
|
6028
|
+
}
|
|
6029
|
+
ngOnDestroy() {
|
|
6030
|
+
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
6031
|
+
}
|
|
6032
|
+
/**
|
|
6033
|
+
* Listen for daterange value changes.
|
|
6034
|
+
*/
|
|
6035
|
+
listenForDaterangeValueChanges() {
|
|
6036
|
+
this.subscriptions.push(this.daterangeService.valueChange.subscribe((_daterange) => {
|
|
6037
|
+
this.triggerChange();
|
|
6038
|
+
}));
|
|
6039
|
+
}
|
|
6040
|
+
/**
|
|
6041
|
+
* Listen for control status changes.
|
|
6042
|
+
*/
|
|
6043
|
+
listenForControlStatusChanges() {
|
|
6044
|
+
this.subscriptions.push(this.control.statusChanges.subscribe((_status) => {
|
|
6045
|
+
this.daterangeControlStateService.updateStatus(this.control.control);
|
|
6046
|
+
}));
|
|
6047
|
+
}
|
|
6048
|
+
/**
|
|
6049
|
+
* Listen to manual changes to the input.
|
|
6050
|
+
* @param target - Input element.
|
|
6051
|
+
*/
|
|
6052
|
+
onChangeEvent(target) {
|
|
6053
|
+
// Remove 'invalid' error.
|
|
6054
|
+
if (this.control.control.hasError('invalid')) {
|
|
6055
|
+
delete this.control.control.errors.invalid;
|
|
6056
|
+
}
|
|
6057
|
+
// If there is nothing to parse, `ClrDaterangeRequiredValidator` will take care of this.
|
|
6058
|
+
if (!target.value) {
|
|
6059
|
+
this.daterangeService.updateSelectedDaterange(null, true);
|
|
6060
|
+
return;
|
|
6061
|
+
}
|
|
6062
|
+
const daterange = this.daterangeParsingService.parse(target.value, this.separatorText);
|
|
6063
|
+
const invalidDaterange = daterange == null || daterange.from == null || daterange.to == null;
|
|
6064
|
+
// Invalid manual daterange specified.
|
|
6065
|
+
if (invalidDaterange) {
|
|
6066
|
+
this.control.control.setErrors({
|
|
6067
|
+
invalid: target.value,
|
|
6068
|
+
});
|
|
6069
|
+
}
|
|
6070
|
+
// Update selected daterange, but only notify when valid.
|
|
6071
|
+
this.daterangeService.updateSelectedDaterange(daterange, !invalidDaterange);
|
|
6072
|
+
}
|
|
6073
|
+
/**
|
|
6074
|
+
* Listen to focus event.
|
|
6075
|
+
*/
|
|
6076
|
+
focusEvent() {
|
|
6077
|
+
this.daterangeControlStateService.focused = true;
|
|
6078
|
+
}
|
|
6079
|
+
/**
|
|
6080
|
+
* Listen to blur event.
|
|
6081
|
+
*/
|
|
6082
|
+
blurEvent() {
|
|
6083
|
+
this.daterangeControlStateService.focused = false;
|
|
6084
|
+
}
|
|
6085
|
+
/**
|
|
6086
|
+
* Focus input.
|
|
6087
|
+
*/
|
|
6088
|
+
focus() {
|
|
6089
|
+
this.element.nativeElement.focus();
|
|
6090
|
+
}
|
|
6091
|
+
/**
|
|
6092
|
+
* Trigger events to notify form controls, trigger validation and update attributes/properties.
|
|
6093
|
+
*/
|
|
6094
|
+
triggerChange() {
|
|
6095
|
+
let daterange = this.daterangeService.selectedDaterange;
|
|
6096
|
+
// When `from` or `to` properties are not set, return null.
|
|
6097
|
+
// This will trigger the `required` validator (if present).
|
|
6098
|
+
if (!this.daterangeService.isValid()) {
|
|
6099
|
+
daterange = null;
|
|
6100
|
+
}
|
|
6101
|
+
// Mark control dirty.
|
|
6102
|
+
this.onTouched(daterange);
|
|
6103
|
+
// Update NgModel.
|
|
6104
|
+
this.onChanged(daterange);
|
|
6105
|
+
// Notify parent.
|
|
6106
|
+
this.valueChange.emit(daterange);
|
|
6107
|
+
// Update attributes/properties.
|
|
6108
|
+
this.updateInput();
|
|
6109
|
+
}
|
|
6110
|
+
/**
|
|
6111
|
+
* Update input with friendly daterange text.
|
|
6112
|
+
*/
|
|
6113
|
+
updateInput() {
|
|
6114
|
+
const dateString = this.daterangeParsingService.toLocaleString(this.daterangeService.selectedDaterange, this.separatorText);
|
|
6115
|
+
this.renderer.setProperty(this.element.nativeElement, 'value', dateString);
|
|
6116
|
+
}
|
|
6117
|
+
/**
|
|
6118
|
+
* ControlValueAccessor method. Set value from NgModel.
|
|
6119
|
+
* @param value - Daterange value.
|
|
6120
|
+
*/
|
|
6121
|
+
writeValue(value) {
|
|
6122
|
+
this.daterangeService.updateSelectedDaterange(value);
|
|
6123
|
+
}
|
|
6124
|
+
/**
|
|
6125
|
+
* ControlValueAccessor method. Register change event. When value changes.
|
|
6126
|
+
* @param fn - Change event.
|
|
6127
|
+
*/
|
|
6128
|
+
registerOnChange(fn) {
|
|
6129
|
+
this.onChanged = fn;
|
|
6130
|
+
}
|
|
6131
|
+
/**
|
|
6132
|
+
* ControlValueAccessor method. Register touch event. When control is dirty.
|
|
6133
|
+
* @param fn - Touch event.
|
|
6134
|
+
*/
|
|
6135
|
+
registerOnTouched(fn) {
|
|
6136
|
+
this.onTouched = fn;
|
|
6137
|
+
}
|
|
6138
|
+
/**
|
|
6139
|
+
* ControlValueAccessor method. Set disabled state.
|
|
6140
|
+
* @param disabled - Disabled state.
|
|
6141
|
+
*/
|
|
6142
|
+
setDisabledState(disabled) {
|
|
6143
|
+
this.daterangeControlStateService.disabled = disabled;
|
|
6144
|
+
}
|
|
6145
|
+
}
|
|
6146
|
+
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 });
|
|
6147
|
+
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 });
|
|
6148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerDirective, decorators: [{
|
|
6149
|
+
type: Directive,
|
|
6150
|
+
args: [{
|
|
6151
|
+
selector: '[clrDaterangepicker]',
|
|
6152
|
+
}]
|
|
6153
|
+
}], ctorParameters: function () { return [{ type: i3$1.NgControl, decorators: [{
|
|
6154
|
+
type: Self
|
|
6155
|
+
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: DaterangeControlStateService }, { type: ControlIdService }, { type: DaterangeService }, { type: DaterangeParsingService }]; }, propDecorators: { min: [{
|
|
6156
|
+
type: Input
|
|
6157
|
+
}], max: [{
|
|
6158
|
+
type: Input
|
|
6159
|
+
}], separatorText: [{
|
|
6160
|
+
type: Input
|
|
6161
|
+
}], placeholder: [{
|
|
6162
|
+
type: Input
|
|
6163
|
+
}], placeholderText: [{
|
|
6164
|
+
type: HostBinding,
|
|
6165
|
+
args: ['attr.placeholder']
|
|
6166
|
+
}], id: [{
|
|
6167
|
+
type: HostBinding
|
|
6168
|
+
}, {
|
|
6169
|
+
type: Input
|
|
6170
|
+
}], disabled: [{
|
|
6171
|
+
type: HostBinding,
|
|
6172
|
+
args: ['disabled']
|
|
6173
|
+
}, {
|
|
6174
|
+
type: Input
|
|
6175
|
+
}], valueChange: [{
|
|
6176
|
+
type: Output
|
|
6177
|
+
}], inputType: [{
|
|
6178
|
+
type: HostBinding,
|
|
6179
|
+
args: ['attr.type']
|
|
6180
|
+
}], inputClass: [{
|
|
6181
|
+
type: HostBinding,
|
|
6182
|
+
args: ['class.clr-input']
|
|
6183
|
+
}], onChangeEvent: [{
|
|
6184
|
+
type: HostListener,
|
|
6185
|
+
args: ['change', ['$event.target']]
|
|
6186
|
+
}], focusEvent: [{
|
|
6187
|
+
type: HostListener,
|
|
6188
|
+
args: ['focus']
|
|
6189
|
+
}], blurEvent: [{
|
|
6190
|
+
type: HostListener,
|
|
6191
|
+
args: ['blur']
|
|
6192
|
+
}] } });
|
|
6193
|
+
|
|
6194
|
+
ClarityIcons.addIcons(calendarIcon, exclamationCircleIcon, checkCircleIcon, windowCloseIcon);
|
|
6195
|
+
/**
|
|
6196
|
+
* Daterangepicker container.
|
|
6197
|
+
*/
|
|
6198
|
+
class ClrDaterangepickerContainerComponent extends ClrAbstractContainer {
|
|
6199
|
+
constructor(clrPopoverEventsService, clrPopoverToggleService, clrCommonStringsService, clrLayout, daterangeControlStateService, openedDatepickersTrackerService, daterangeService, daterangeParsingService) {
|
|
6200
|
+
super(clrLayout, daterangeControlStateService);
|
|
6201
|
+
this.clrPopoverEventsService = clrPopoverEventsService;
|
|
6202
|
+
this.clrPopoverToggleService = clrPopoverToggleService;
|
|
6203
|
+
this.clrCommonStringsService = clrCommonStringsService;
|
|
6204
|
+
this.clrLayout = clrLayout;
|
|
6205
|
+
this.daterangeControlStateService = daterangeControlStateService;
|
|
6206
|
+
this.openedDatepickersTrackerService = openedDatepickersTrackerService;
|
|
6207
|
+
this.daterangeService = daterangeService;
|
|
6208
|
+
this.daterangeParsingService = daterangeParsingService;
|
|
6209
|
+
/**
|
|
6210
|
+
* List of presets.
|
|
6211
|
+
*/
|
|
6212
|
+
this.presets = [];
|
|
6213
|
+
/**
|
|
6214
|
+
* Text for the 'from' label.
|
|
6215
|
+
*/
|
|
6216
|
+
this.labelFrom = TRANSLATIONS.from;
|
|
6217
|
+
/**
|
|
6218
|
+
* Text for the 'to' label.
|
|
6219
|
+
*/
|
|
6220
|
+
this.labelTo = TRANSLATIONS.to;
|
|
6221
|
+
/** CSS classes. */
|
|
6222
|
+
this.classes = 'clr-date-container';
|
|
6223
|
+
/**
|
|
6224
|
+
* Popover open state.
|
|
6225
|
+
*/
|
|
6226
|
+
this.open = false;
|
|
6227
|
+
/**
|
|
6228
|
+
* Popover position config.
|
|
6229
|
+
*/
|
|
6230
|
+
this.popoverPosition = PopoverPositions['bottom-left'];
|
|
6231
|
+
/** List of subscriptions to later destroy. */
|
|
6232
|
+
this.subscriptions = [];
|
|
6233
|
+
}
|
|
6234
|
+
/**
|
|
6235
|
+
* Set popover position.
|
|
6236
|
+
*/
|
|
6237
|
+
set clrPosition(position) {
|
|
6238
|
+
if (position && PopoverPositions[position]) {
|
|
6239
|
+
this.popoverPosition = PopoverPositions[position];
|
|
6240
|
+
}
|
|
6241
|
+
}
|
|
6242
|
+
/**
|
|
6243
|
+
* Date from.
|
|
6244
|
+
* @returns Date from.
|
|
6245
|
+
*/
|
|
6246
|
+
get dateFrom() {
|
|
6247
|
+
return this.daterangeService.selectedDaterange?.from;
|
|
6248
|
+
}
|
|
6249
|
+
/**
|
|
6250
|
+
* Date to.
|
|
6251
|
+
* @returns Date to.
|
|
6252
|
+
*/
|
|
6253
|
+
get dateTo() {
|
|
6254
|
+
return this.daterangeService.selectedDaterange?.to;
|
|
6255
|
+
}
|
|
6256
|
+
/**
|
|
6257
|
+
* Minimum date that can be selected.
|
|
6258
|
+
* @returns Minimum date that can be selected.
|
|
6259
|
+
*/
|
|
6260
|
+
get minDate() {
|
|
6261
|
+
return this.daterangeService.minDate;
|
|
6262
|
+
}
|
|
6263
|
+
/**
|
|
6264
|
+
* Maximum date that can be selected.
|
|
6265
|
+
* @returns Maximum date that can be selected.
|
|
6266
|
+
*/
|
|
6267
|
+
get maxDate() {
|
|
6268
|
+
return this.daterangeService.maxDate;
|
|
6269
|
+
}
|
|
6270
|
+
/**
|
|
6271
|
+
* Get friendly daterange text.
|
|
6272
|
+
* @returns Friendly daterange text.
|
|
6273
|
+
*/
|
|
6274
|
+
get friendlyDaterange() {
|
|
6275
|
+
return this._friendlyDaterange || this.commonStrings.datepickerToggleChooseDateLabel;
|
|
6276
|
+
}
|
|
6277
|
+
/**
|
|
6278
|
+
* List of common translation keys.
|
|
6279
|
+
*/
|
|
6280
|
+
get commonStrings() {
|
|
6281
|
+
return this.clrCommonStringsService.keys;
|
|
6282
|
+
}
|
|
6283
|
+
ngAfterViewInit() {
|
|
6284
|
+
if (this.daterangepickerDirective == null) {
|
|
6285
|
+
throw new Error('`ClrDaterangepickerContainerComponent` requires an child `ClrDaterangepickerDirective`');
|
|
6286
|
+
}
|
|
6287
|
+
this.listenForDaterangeValueChanges();
|
|
6288
|
+
this.listenForOpenedDatepickersTrackerChanges();
|
|
6289
|
+
this.listenForPopoverToggleChanges();
|
|
6290
|
+
}
|
|
6291
|
+
ngOnDestroy() {
|
|
6292
|
+
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
6293
|
+
}
|
|
6294
|
+
/**
|
|
6295
|
+
* Listen for daterange value changes.
|
|
6296
|
+
*/
|
|
6297
|
+
listenForDaterangeValueChanges() {
|
|
6298
|
+
this.subscriptions.push(this.daterangeService.valueChange.subscribe((daterange) => {
|
|
6299
|
+
this._friendlyDaterange = this.daterangeParsingService.toLocaleString(daterange, this.daterangepickerDirective.separatorText);
|
|
6300
|
+
}));
|
|
6301
|
+
}
|
|
6302
|
+
/**
|
|
6303
|
+
* Listen for any opened datepickers tracker state changes.
|
|
6304
|
+
*/
|
|
6305
|
+
listenForOpenedDatepickersTrackerChanges() {
|
|
6306
|
+
this.subscriptions.push(this.openedDatepickersTrackerService.valueChange.subscribe(hasOpenDatePickers => {
|
|
6307
|
+
// When choosing an date in the DatePicker calender, all popovers are closed. Even our own popover.
|
|
6308
|
+
// Therefor we have to remove the ability to close our own popover.
|
|
6309
|
+
// Simply changing the `outsideClickClose` property after initialization does nothing.
|
|
6310
|
+
// We need to manually remove the listener, change the `outsideClickClose` property and re-attach the click listener.
|
|
6311
|
+
// Steps to reproduce with 2 daterangepickers:
|
|
6312
|
+
// 1. Click on second daterangepicker action icon to open the popover.
|
|
6313
|
+
// 2. Click on one of the datepickers to open calender.
|
|
6314
|
+
// 3. Close datepicker.
|
|
6315
|
+
// 4. Click on first daterangepicker action icon. Error.
|
|
6316
|
+
this.clrPopoverEventsService.removeClickListener();
|
|
6317
|
+
this.clrPopoverEventsService.outsideClickClose = !hasOpenDatePickers;
|
|
6318
|
+
// We need to wait before we attach the click listener.
|
|
6319
|
+
requestAnimationFrame(() => {
|
|
6320
|
+
this.clrPopoverEventsService.addClickListener();
|
|
6321
|
+
});
|
|
6322
|
+
}));
|
|
6323
|
+
}
|
|
6324
|
+
/**
|
|
6325
|
+
* Listen for popover toggle changes.
|
|
6326
|
+
*/
|
|
6327
|
+
listenForPopoverToggleChanges() {
|
|
6328
|
+
this.subscriptions.push(this.clrPopoverToggleService.openChange.subscribe(opened => {
|
|
6329
|
+
// Focus first datepicker when popover opens.
|
|
6330
|
+
// Focus back to input when popover is closed.
|
|
6331
|
+
if (opened) {
|
|
6332
|
+
// Wait for the datepicker components to be rendered.
|
|
6333
|
+
requestAnimationFrame(() => {
|
|
6334
|
+
this.datepickerComponents.first.focus();
|
|
6335
|
+
});
|
|
6336
|
+
}
|
|
6337
|
+
else {
|
|
6338
|
+
this.daterangepickerDirective.focus();
|
|
6339
|
+
// When closing popover modal and daterange is not valid, reset model.
|
|
6340
|
+
if (!this.daterangeService.isValid()) {
|
|
6341
|
+
this.daterangeService.updateSelectedDaterange(null);
|
|
6342
|
+
}
|
|
6343
|
+
}
|
|
6344
|
+
}));
|
|
6345
|
+
}
|
|
6346
|
+
/**
|
|
6347
|
+
* Event triggered when date from changed.
|
|
6348
|
+
* @param value - Date from.
|
|
6349
|
+
*/
|
|
6350
|
+
onDateFromChange(value) {
|
|
6351
|
+
this.daterangeService.updateSelectedDaterange({
|
|
6352
|
+
from: value,
|
|
6353
|
+
to: this.dateTo,
|
|
6354
|
+
});
|
|
6355
|
+
}
|
|
6356
|
+
/**
|
|
6357
|
+
* Event triggered when date to changed.
|
|
6358
|
+
* @param value - Date to.
|
|
6359
|
+
*/
|
|
6360
|
+
onDateToChange(value) {
|
|
6361
|
+
this.daterangeService.updateSelectedDaterange({
|
|
6362
|
+
from: this.dateFrom,
|
|
6363
|
+
to: value,
|
|
6364
|
+
});
|
|
6365
|
+
}
|
|
6366
|
+
/**
|
|
6367
|
+
* Apply selected preset.
|
|
6368
|
+
* @param preset - Selected preset.
|
|
6369
|
+
*/
|
|
6370
|
+
applyPreset(preset) {
|
|
6371
|
+
const range = preset.range();
|
|
6372
|
+
this.daterangeService.updateSelectedDaterange(range);
|
|
6373
|
+
// Close popover here, because it's not possible to conditionally
|
|
6374
|
+
// apply `clrPopoverCloseButton` directive on preset button.
|
|
6375
|
+
if (this.daterangeService.isValid()) {
|
|
6376
|
+
this.clrPopoverToggleService.open = false;
|
|
6377
|
+
}
|
|
6378
|
+
}
|
|
6379
|
+
}
|
|
6380
|
+
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 });
|
|
6381
|
+
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: [
|
|
6382
|
+
ClrPopoverToggleService,
|
|
6383
|
+
ClrPopoverEventsService,
|
|
6384
|
+
ClrPopoverPositionService,
|
|
6385
|
+
DaterangeControlStateService,
|
|
6386
|
+
DaterangeService,
|
|
6387
|
+
OpenedDatepickersTrackerService,
|
|
6388
|
+
ControlIdService,
|
|
6389
|
+
], 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"] }] });
|
|
6390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerContainerComponent, decorators: [{
|
|
6391
|
+
type: Component,
|
|
6392
|
+
args: [{ selector: 'clr-daterangepicker-container', providers: [
|
|
6393
|
+
ClrPopoverToggleService,
|
|
6394
|
+
ClrPopoverEventsService,
|
|
6395
|
+
ClrPopoverPositionService,
|
|
6396
|
+
DaterangeControlStateService,
|
|
6397
|
+
DaterangeService,
|
|
6398
|
+
OpenedDatepickersTrackerService,
|
|
6399
|
+
ControlIdService,
|
|
6400
|
+
], 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"] }]
|
|
6401
|
+
}], ctorParameters: function () { return [{ type: i1$1.ClrPopoverEventsService }, { type: i1$1.ClrPopoverToggleService }, { type: i1$1.ClrCommonStringsService }, { type: i1$1.ClrLayout, decorators: [{
|
|
6402
|
+
type: Optional
|
|
6403
|
+
}] }, { type: DaterangeControlStateService }, { type: OpenedDatepickersTrackerService }, { type: DaterangeService }, { type: DaterangeParsingService }]; }, propDecorators: { presets: [{
|
|
6404
|
+
type: Input
|
|
6405
|
+
}], clrPosition: [{
|
|
6406
|
+
type: Input
|
|
6407
|
+
}], labelFrom: [{
|
|
6408
|
+
type: Input
|
|
6409
|
+
}], labelTo: [{
|
|
6410
|
+
type: Input
|
|
6411
|
+
}], datepickerComponents: [{
|
|
6412
|
+
type: ViewChildren,
|
|
6413
|
+
args: [ClrDatepickerComponent]
|
|
6414
|
+
}], daterangepickerDirective: [{
|
|
6415
|
+
type: ContentChild,
|
|
6416
|
+
args: [ClrDaterangepickerDirective]
|
|
6417
|
+
}], classes: [{
|
|
6418
|
+
type: HostBinding,
|
|
6419
|
+
args: ['class']
|
|
6420
|
+
}] } });
|
|
6421
|
+
|
|
6422
|
+
/**
|
|
6423
|
+
* Directive for multiple error messages.
|
|
6424
|
+
* It works the same as Clarity `ClrIfError`, but for customized `ClrDaterangepickerContainerComponent`.
|
|
6425
|
+
* Using Clarity `ClrIfError` requires the container to have service implemented that are not publicly exported.
|
|
6426
|
+
*
|
|
6427
|
+
* @see https://clarity.design/documentation/forms (section "Multiple error messages").
|
|
6428
|
+
*
|
|
6429
|
+
* Altered version from https://github.com/vmware-clarity/ng-clarity/blob/138a6dd95fdc4ffb67b054391c44ce5fa3c44660/projects/angular/src/forms/common/if-control-state/if-error.ts
|
|
6430
|
+
*/
|
|
6431
|
+
class ClrIfDaterangeErrorDirective {
|
|
6432
|
+
constructor(template, container, daterangeControlStateService, daterangepickerContainerComponent) {
|
|
6433
|
+
this.template = template;
|
|
6434
|
+
this.container = container;
|
|
6435
|
+
this.daterangeControlStateService = daterangeControlStateService;
|
|
6436
|
+
this.daterangepickerContainerComponent = daterangepickerContainerComponent;
|
|
6437
|
+
/** Flag to remember if content is displayed. */
|
|
6438
|
+
this.displayedContent = false;
|
|
6439
|
+
/** List of subscriptions to later destroy. */
|
|
6440
|
+
this.subscriptions = [];
|
|
6441
|
+
// This directive only works inside `clr-daterangepicker-container`.
|
|
6442
|
+
if (this.daterangeControlStateService == null || this.daterangepickerContainerComponent == null) {
|
|
6443
|
+
throw new Error('`ClrIfDaterangeErrorDirective` can only be used within `ClrDaterangepickerContainerComponent`');
|
|
6444
|
+
}
|
|
6445
|
+
// Listen to status changes to toggle error visibility.
|
|
6446
|
+
this.subscriptions.push(this.daterangeControlStateService.statusChange.subscribe((_status) => {
|
|
6447
|
+
this.handleState();
|
|
6448
|
+
}));
|
|
6449
|
+
}
|
|
6450
|
+
ngOnDestroy() {
|
|
6451
|
+
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
6452
|
+
}
|
|
6453
|
+
/**
|
|
6454
|
+
* Handle error depending on states.
|
|
6455
|
+
*/
|
|
6456
|
+
handleState() {
|
|
6457
|
+
if (!this.daterangeControlStateService.invalid) {
|
|
6458
|
+
// If control is not invalid, hide all errors.
|
|
6459
|
+
this.toggleErrorVisibility(false);
|
|
6460
|
+
}
|
|
6461
|
+
else if (this.clrIfDaterangeError) {
|
|
6462
|
+
// Display error only if error input is list of errors.
|
|
6463
|
+
const hasError = this.clrIfDaterangeError in this.daterangeControlStateService.errors;
|
|
6464
|
+
this.toggleErrorVisibility(hasError);
|
|
6465
|
+
}
|
|
6466
|
+
else {
|
|
6467
|
+
// Display error.
|
|
6468
|
+
this.toggleErrorVisibility(true);
|
|
6469
|
+
}
|
|
6470
|
+
}
|
|
6471
|
+
/**
|
|
6472
|
+
* Display/hide error.
|
|
6473
|
+
* @param displayError - Wether to show/hide error.
|
|
6474
|
+
*/
|
|
6475
|
+
toggleErrorVisibility(displayError) {
|
|
6476
|
+
if (displayError) {
|
|
6477
|
+
const error = this.daterangeControlStateService.errors[this.clrIfDaterangeError];
|
|
6478
|
+
if (this.displayedContent === false) {
|
|
6479
|
+
this.embeddedViewRef = this.container.createEmbeddedView(this.template, {
|
|
6480
|
+
error,
|
|
6481
|
+
});
|
|
6482
|
+
this.displayedContent = true;
|
|
6483
|
+
}
|
|
6484
|
+
else if (this.embeddedViewRef && this.embeddedViewRef.context) {
|
|
6485
|
+
// If view is already rendered, update the error object to keep it in sync.
|
|
6486
|
+
this.embeddedViewRef.context.error = error;
|
|
6487
|
+
}
|
|
6488
|
+
}
|
|
6489
|
+
else {
|
|
6490
|
+
this.container.clear();
|
|
6491
|
+
this.displayedContent = false;
|
|
6492
|
+
}
|
|
6493
|
+
}
|
|
6494
|
+
}
|
|
6495
|
+
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 });
|
|
6496
|
+
ClrIfDaterangeErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ClrIfDaterangeErrorDirective, selector: "[clrIfDaterangeError]", inputs: { clrIfDaterangeError: "clrIfDaterangeError" }, ngImport: i0 });
|
|
6497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrIfDaterangeErrorDirective, decorators: [{
|
|
6498
|
+
type: Directive,
|
|
6499
|
+
args: [{
|
|
6500
|
+
selector: '[clrIfDaterangeError]',
|
|
6501
|
+
}]
|
|
6502
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: DaterangeControlStateService, decorators: [{
|
|
6503
|
+
type: Optional
|
|
6504
|
+
}] }, { type: ClrDaterangepickerContainerComponent, decorators: [{
|
|
6505
|
+
type: Optional
|
|
6506
|
+
}] }]; }, propDecorators: { clrIfDaterangeError: [{
|
|
6507
|
+
type: Input
|
|
6508
|
+
}] } });
|
|
6509
|
+
|
|
6510
|
+
/**
|
|
6511
|
+
* Validator for daterangepicker to validate that 'to' date is not after 'max' value.
|
|
6512
|
+
* Otherwise will throw corresponding `max` validation error.
|
|
6513
|
+
*
|
|
6514
|
+
* Validator is applied to the ClrDaterangepickerDirective with `max` attribute.
|
|
6515
|
+
* Or when set manually with `clrDaterangeMax` attribute.
|
|
6516
|
+
*
|
|
6517
|
+
* Validator is active by default when applied. It can be disabled with: `[clrDaterangeMax]="false"`
|
|
6518
|
+
*/
|
|
6519
|
+
class ClrDaterangeMaxValidator {
|
|
6520
|
+
constructor(daterangeService) {
|
|
6521
|
+
this.daterangeService = daterangeService;
|
|
6522
|
+
this._active = true;
|
|
6523
|
+
}
|
|
6524
|
+
/**
|
|
6525
|
+
* Disable validator by setting value to `false`.
|
|
6526
|
+
*/
|
|
6527
|
+
set active(active) {
|
|
6528
|
+
this._active = active == null || (active !== false && `${active}` !== 'false');
|
|
6529
|
+
}
|
|
6530
|
+
/**
|
|
6531
|
+
* Validator method. Method that performs synchronous validation against the provided control.
|
|
6532
|
+
* @param control - The control to validate against.
|
|
6533
|
+
* @returns A map of validation errors if validation fails, otherwise null.
|
|
6534
|
+
*/
|
|
6535
|
+
validate(control) {
|
|
6536
|
+
if (!this._active) {
|
|
6537
|
+
return null;
|
|
6538
|
+
}
|
|
6539
|
+
if (control.value == null) {
|
|
6540
|
+
return null;
|
|
6541
|
+
}
|
|
6542
|
+
const max = this.daterangeService.maxDate;
|
|
6543
|
+
if (max == null) {
|
|
6544
|
+
return null;
|
|
6545
|
+
}
|
|
6546
|
+
const { to } = control.value;
|
|
6547
|
+
if (to == null) {
|
|
6548
|
+
return null;
|
|
6549
|
+
}
|
|
6550
|
+
if (to.isAfter(max)) {
|
|
6551
|
+
return {
|
|
6552
|
+
[ClrDaterangeMaxValidator.validationErrorName]: {
|
|
6553
|
+
max,
|
|
6554
|
+
actual: to,
|
|
6555
|
+
},
|
|
6556
|
+
};
|
|
6557
|
+
}
|
|
6558
|
+
return null;
|
|
6559
|
+
}
|
|
6560
|
+
}
|
|
6561
|
+
/** Validation error name. */
|
|
6562
|
+
ClrDaterangeMaxValidator.validationErrorName = 'max';
|
|
6563
|
+
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 });
|
|
6564
|
+
ClrDaterangeMaxValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ClrDaterangeMaxValidator, selector: "[clrDaterangepicker][max], [clrDaterangeMax]", inputs: { active: ["clrDaterangeMax", "active"] }, providers: [
|
|
6565
|
+
{
|
|
6566
|
+
provide: NG_VALIDATORS,
|
|
6567
|
+
useExisting: forwardRef(() => ClrDaterangeMaxValidator),
|
|
6568
|
+
multi: true,
|
|
6569
|
+
},
|
|
6570
|
+
], ngImport: i0 });
|
|
6571
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeMaxValidator, decorators: [{
|
|
6572
|
+
type: Directive,
|
|
6573
|
+
args: [{
|
|
6574
|
+
selector: '[clrDaterangepicker][max], [clrDaterangeMax]',
|
|
6575
|
+
providers: [
|
|
6576
|
+
{
|
|
6577
|
+
provide: NG_VALIDATORS,
|
|
6578
|
+
useExisting: forwardRef(() => ClrDaterangeMaxValidator),
|
|
6579
|
+
multi: true,
|
|
6580
|
+
},
|
|
6581
|
+
],
|
|
6582
|
+
}]
|
|
6583
|
+
}], ctorParameters: function () { return [{ type: DaterangeService, decorators: [{
|
|
6584
|
+
type: Optional
|
|
6585
|
+
}] }]; }, propDecorators: { active: [{
|
|
6586
|
+
type: Input,
|
|
6587
|
+
args: ['clrDaterangeMax']
|
|
6588
|
+
}] } });
|
|
6589
|
+
|
|
6590
|
+
/**
|
|
6591
|
+
* Validator for daterangepicker to validate that 'from' date is not before 'min' value.
|
|
6592
|
+
* Otherwise will throw corresponding `min` validation error.
|
|
6593
|
+
*
|
|
6594
|
+
* Validator is applied to the ClrDaterangepickerDirective with `min` attribute.
|
|
6595
|
+
* Or when set manually with `clrDaterangeMin` attribute.
|
|
6596
|
+
*
|
|
6597
|
+
* Validator is active by default when applied. It can be disabled with: `[clrDaterangeMin]="false"`
|
|
6598
|
+
*/
|
|
6599
|
+
class ClrDaterangeMinValidator {
|
|
6600
|
+
constructor(daterangeService) {
|
|
6601
|
+
this.daterangeService = daterangeService;
|
|
6602
|
+
this._active = true;
|
|
6603
|
+
}
|
|
6604
|
+
/**
|
|
6605
|
+
* Disable validator by setting value to `false`.
|
|
6606
|
+
*/
|
|
6607
|
+
set active(active) {
|
|
6608
|
+
this._active = active == null || (active !== false && `${active}` !== 'false');
|
|
6609
|
+
}
|
|
6610
|
+
/**
|
|
6611
|
+
* Validator method. Method that performs synchronous validation against the provided control.
|
|
6612
|
+
* @param control - The control to validate against.
|
|
6613
|
+
* @returns A map of validation errors if validation fails, otherwise null.
|
|
6614
|
+
*/
|
|
6615
|
+
validate(control) {
|
|
6616
|
+
if (!this._active) {
|
|
6617
|
+
return null;
|
|
6618
|
+
}
|
|
6619
|
+
if (control.value == null) {
|
|
6620
|
+
return null;
|
|
6621
|
+
}
|
|
6622
|
+
const min = this.daterangeService.minDate;
|
|
6623
|
+
if (min == null) {
|
|
6624
|
+
return null;
|
|
6625
|
+
}
|
|
6626
|
+
const { from } = control.value;
|
|
6627
|
+
if (from == null) {
|
|
6628
|
+
return null;
|
|
6629
|
+
}
|
|
6630
|
+
if (from.isBefore(min)) {
|
|
6631
|
+
return {
|
|
6632
|
+
[ClrDaterangeMinValidator.validationErrorName]: {
|
|
6633
|
+
min,
|
|
6634
|
+
actual: from,
|
|
6635
|
+
},
|
|
6636
|
+
};
|
|
6637
|
+
}
|
|
6638
|
+
return null;
|
|
6639
|
+
}
|
|
6640
|
+
}
|
|
6641
|
+
/** Validation error name. */
|
|
6642
|
+
ClrDaterangeMinValidator.validationErrorName = 'min';
|
|
6643
|
+
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 });
|
|
6644
|
+
ClrDaterangeMinValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ClrDaterangeMinValidator, selector: "[clrDaterangepicker][min], [clrDaterangeMin]", inputs: { active: ["clrDaterangeMin", "active"] }, providers: [
|
|
6645
|
+
{
|
|
6646
|
+
provide: NG_VALIDATORS,
|
|
6647
|
+
useExisting: forwardRef(() => ClrDaterangeMinValidator),
|
|
6648
|
+
multi: true,
|
|
6649
|
+
},
|
|
6650
|
+
], ngImport: i0 });
|
|
6651
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeMinValidator, decorators: [{
|
|
6652
|
+
type: Directive,
|
|
6653
|
+
args: [{
|
|
6654
|
+
selector: '[clrDaterangepicker][min], [clrDaterangeMin]',
|
|
6655
|
+
providers: [
|
|
6656
|
+
{
|
|
6657
|
+
provide: NG_VALIDATORS,
|
|
6658
|
+
useExisting: forwardRef(() => ClrDaterangeMinValidator),
|
|
6659
|
+
multi: true,
|
|
6660
|
+
},
|
|
6661
|
+
],
|
|
6662
|
+
}]
|
|
6663
|
+
}], ctorParameters: function () { return [{ type: DaterangeService, decorators: [{
|
|
6664
|
+
type: Optional
|
|
6665
|
+
}] }]; }, propDecorators: { active: [{
|
|
6666
|
+
type: Input,
|
|
6667
|
+
args: ['clrDaterangeMin']
|
|
6668
|
+
}] } });
|
|
6669
|
+
|
|
6670
|
+
/**
|
|
6671
|
+
* Validator for daterangepicker to validate that 'from' date is before 'to' date.
|
|
6672
|
+
* Otherwise will throw `fromIsAfterTo` validation error.
|
|
6673
|
+
*
|
|
6674
|
+
* This validator is applied automatically on ClrDaterangepickerDirective.
|
|
6675
|
+
* Or when set manually with `clrDaterangeOrder` attribute.
|
|
6676
|
+
*
|
|
6677
|
+
* Validator is active by default when applied. It can be disabled with: `[clrDaterangeOrder]="false"`
|
|
6678
|
+
*/
|
|
6679
|
+
class ClrDaterangeOrderValidator {
|
|
6680
|
+
constructor() {
|
|
6681
|
+
this._active = true;
|
|
6682
|
+
}
|
|
6683
|
+
/**
|
|
6684
|
+
* Disable validator by setting value to `false`.
|
|
6685
|
+
*/
|
|
6686
|
+
set active(active) {
|
|
6687
|
+
this._active = active == null || (active !== false && `${active}` !== 'false');
|
|
6688
|
+
}
|
|
6689
|
+
/**
|
|
6690
|
+
* Validator method. Method that performs synchronous validation against the provided control.
|
|
6691
|
+
* @param control - The control to validate against.
|
|
6692
|
+
* @returns A map of validation errors if validation fails, otherwise null.
|
|
6693
|
+
*/
|
|
6694
|
+
validate(control) {
|
|
6695
|
+
if (!this._active) {
|
|
6696
|
+
return null;
|
|
6697
|
+
}
|
|
6698
|
+
// Validation with `null` value is done with the regular required validator.
|
|
6699
|
+
if (control.value == null) {
|
|
6700
|
+
return null;
|
|
6701
|
+
}
|
|
6702
|
+
const { from, to } = control.value;
|
|
6703
|
+
// Validation with `null` values from 'from' & 'to' is done with the ClrDaterangeRequiredValidator.
|
|
6704
|
+
if (from == null || to == null) {
|
|
6705
|
+
return null;
|
|
6706
|
+
}
|
|
6707
|
+
if (from.isAfter(to)) {
|
|
6708
|
+
return {
|
|
6709
|
+
[ClrDaterangeOrderValidator.validationErrorName]: control.value,
|
|
6710
|
+
};
|
|
6711
|
+
}
|
|
6712
|
+
return null;
|
|
6713
|
+
}
|
|
6714
|
+
}
|
|
6715
|
+
/** Validation error name. */
|
|
6716
|
+
ClrDaterangeOrderValidator.validationErrorName = 'fromIsAfterTo';
|
|
6717
|
+
ClrDaterangeOrderValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeOrderValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6718
|
+
ClrDaterangeOrderValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ClrDaterangeOrderValidator, selector: "[clrDaterangepicker], [clrDaterangeOrder]", inputs: { active: ["clrDaterangeOrder", "active"] }, providers: [
|
|
6719
|
+
{
|
|
6720
|
+
provide: NG_VALIDATORS,
|
|
6721
|
+
useExisting: forwardRef(() => ClrDaterangeOrderValidator),
|
|
6722
|
+
multi: true,
|
|
6723
|
+
},
|
|
6724
|
+
], ngImport: i0 });
|
|
6725
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeOrderValidator, decorators: [{
|
|
6726
|
+
type: Directive,
|
|
6727
|
+
args: [{
|
|
6728
|
+
selector: '[clrDaterangepicker], [clrDaterangeOrder]',
|
|
6729
|
+
providers: [
|
|
6730
|
+
{
|
|
6731
|
+
provide: NG_VALIDATORS,
|
|
6732
|
+
useExisting: forwardRef(() => ClrDaterangeOrderValidator),
|
|
6733
|
+
multi: true,
|
|
6734
|
+
},
|
|
6735
|
+
],
|
|
6736
|
+
}]
|
|
6737
|
+
}], propDecorators: { active: [{
|
|
6738
|
+
type: Input,
|
|
6739
|
+
args: ['clrDaterangeOrder']
|
|
6740
|
+
}] } });
|
|
6741
|
+
|
|
6742
|
+
/**
|
|
6743
|
+
* Validator for daterangepicker to validate that 'from' *AND* 'to' date are not `null`.
|
|
6744
|
+
* Will throw `required` validation error.
|
|
6745
|
+
*
|
|
6746
|
+
* Validator is applied to the ClrDaterangepickerDirective with `required` attribute.
|
|
6747
|
+
* Or when set manually with `clrDaterangeRequired` attribute.
|
|
6748
|
+
*
|
|
6749
|
+
* Validator is active by default when applied. It can be disabled with: `[clrDaterangeRequired]="false"`
|
|
6750
|
+
*/
|
|
6751
|
+
class ClrDaterangeRequiredValidator {
|
|
6752
|
+
constructor() {
|
|
6753
|
+
this._active = true;
|
|
6754
|
+
}
|
|
6755
|
+
/**
|
|
6756
|
+
* Disable validator by setting value to `false`.
|
|
6757
|
+
*/
|
|
6758
|
+
set active(active) {
|
|
6759
|
+
this._active = active == null || (active !== false && `${active}` !== 'false');
|
|
6760
|
+
}
|
|
6761
|
+
/**
|
|
6762
|
+
* Validator method. Method that performs synchronous validation against the provided control.
|
|
6763
|
+
* @param control - The control to validate against.
|
|
6764
|
+
* @returns A map of validation errors if validation fails, otherwise null.
|
|
6765
|
+
*/
|
|
6766
|
+
validate(control) {
|
|
6767
|
+
if (!this._active) {
|
|
6768
|
+
return null;
|
|
6769
|
+
}
|
|
6770
|
+
// Validation with `null` value is done with the regular required validator.
|
|
6771
|
+
if (control.value == null) {
|
|
6772
|
+
return null;
|
|
6773
|
+
}
|
|
6774
|
+
const { from, to } = control.value;
|
|
6775
|
+
if (from == null || to == null) {
|
|
6776
|
+
return {
|
|
6777
|
+
[ClrDaterangeRequiredValidator.validationErrorName]: control.value,
|
|
6778
|
+
};
|
|
6779
|
+
}
|
|
6780
|
+
return null;
|
|
6781
|
+
}
|
|
6782
|
+
}
|
|
6783
|
+
/** Validation error name. */
|
|
6784
|
+
ClrDaterangeRequiredValidator.validationErrorName = 'required';
|
|
6785
|
+
ClrDaterangeRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeRequiredValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6786
|
+
ClrDaterangeRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: ClrDaterangeRequiredValidator, selector: "[clrDaterangepicker][required], [clrDaterangeRequired]", inputs: { active: ["clrDaterangeRequired", "active"] }, providers: [
|
|
6787
|
+
{
|
|
6788
|
+
provide: NG_VALIDATORS,
|
|
6789
|
+
useExisting: forwardRef(() => ClrDaterangeRequiredValidator),
|
|
6790
|
+
multi: true,
|
|
6791
|
+
},
|
|
6792
|
+
], ngImport: i0 });
|
|
6793
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangeRequiredValidator, decorators: [{
|
|
6794
|
+
type: Directive,
|
|
6795
|
+
args: [{
|
|
6796
|
+
selector: '[clrDaterangepicker][required], [clrDaterangeRequired]',
|
|
6797
|
+
providers: [
|
|
6798
|
+
{
|
|
6799
|
+
provide: NG_VALIDATORS,
|
|
6800
|
+
useExisting: forwardRef(() => ClrDaterangeRequiredValidator),
|
|
6801
|
+
multi: true,
|
|
6802
|
+
},
|
|
6803
|
+
],
|
|
6804
|
+
}]
|
|
6805
|
+
}], propDecorators: { active: [{
|
|
6806
|
+
type: Input,
|
|
6807
|
+
args: ['clrDaterangeRequired']
|
|
6808
|
+
}] } });
|
|
6809
|
+
|
|
6810
|
+
class ClrDaterangepickerModule {
|
|
6811
|
+
}
|
|
6812
|
+
ClrDaterangepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6813
|
+
ClrDaterangepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerModule, declarations: [ClrDatepickerComponent,
|
|
6814
|
+
ClrDaterangeMaxValidator,
|
|
6815
|
+
ClrDaterangeMinValidator,
|
|
6816
|
+
ClrDaterangeOrderValidator,
|
|
6817
|
+
ClrDaterangepickerContainerComponent,
|
|
6818
|
+
ClrDaterangepickerDirective,
|
|
6819
|
+
ClrDaterangeRequiredValidator,
|
|
6820
|
+
ClrIfDaterangeErrorDirective], imports: [CommonModule, FormsModule, ClarityModule, ClrDatepickerModule, ClrIconModule], exports: [ClrDaterangeMaxValidator,
|
|
6821
|
+
ClrDaterangeMinValidator,
|
|
6822
|
+
ClrDaterangeOrderValidator,
|
|
6823
|
+
ClrDaterangepickerContainerComponent,
|
|
6824
|
+
ClrDaterangepickerDirective,
|
|
6825
|
+
ClrDaterangeRequiredValidator,
|
|
6826
|
+
ClrIfDaterangeErrorDirective] });
|
|
6827
|
+
ClrDaterangepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerModule, imports: [CommonModule, FormsModule, ClarityModule, ClrDatepickerModule, ClrIconModule] });
|
|
6828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrDaterangepickerModule, decorators: [{
|
|
6829
|
+
type: NgModule,
|
|
6830
|
+
args: [{
|
|
6831
|
+
imports: [CommonModule, FormsModule, ClarityModule, ClrDatepickerModule, ClrIconModule],
|
|
6832
|
+
declarations: [
|
|
6833
|
+
ClrDatepickerComponent,
|
|
6834
|
+
ClrDaterangeMaxValidator,
|
|
6835
|
+
ClrDaterangeMinValidator,
|
|
6836
|
+
ClrDaterangeOrderValidator,
|
|
6837
|
+
ClrDaterangepickerContainerComponent,
|
|
6838
|
+
ClrDaterangepickerDirective,
|
|
6839
|
+
ClrDaterangeRequiredValidator,
|
|
6840
|
+
ClrIfDaterangeErrorDirective,
|
|
6841
|
+
],
|
|
6842
|
+
entryComponents: [ClrDatepickerComponent],
|
|
6843
|
+
exports: [
|
|
6844
|
+
ClrDaterangeMaxValidator,
|
|
6845
|
+
ClrDaterangeMinValidator,
|
|
6846
|
+
ClrDaterangeOrderValidator,
|
|
6847
|
+
ClrDaterangepickerContainerComponent,
|
|
6848
|
+
ClrDaterangepickerDirective,
|
|
6849
|
+
ClrDaterangeRequiredValidator,
|
|
6850
|
+
ClrIfDaterangeErrorDirective,
|
|
6851
|
+
],
|
|
6852
|
+
}]
|
|
6853
|
+
}] });
|
|
6854
|
+
|
|
6855
|
+
/*
|
|
6856
|
+
* Copyright (c) 2018-2023 Porsche Informatik. All Rights Reserved.
|
|
6857
|
+
* This software is released under MIT license.
|
|
6858
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
6859
|
+
*/
|
|
6860
|
+
class ClrAddonsModule {
|
|
6861
|
+
}
|
|
6862
|
+
ClrAddonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6863
|
+
ClrAddonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, exports: [ClrViewEditSectionModule,
|
|
6864
|
+
ClrPagerModule,
|
|
6865
|
+
ClrDotPagerModule,
|
|
6866
|
+
ClrPagedSearchResultListModule,
|
|
6867
|
+
ClrCollapseExpandSectionModule,
|
|
6868
|
+
ClrBreadcrumbModule,
|
|
6869
|
+
ClrMainNavGroupModule,
|
|
6870
|
+
ClrContentPanelModule,
|
|
6871
|
+
ClrNotificationModule,
|
|
6872
|
+
ClrFlowBarModule,
|
|
6873
|
+
ClrBackButtonModule,
|
|
6874
|
+
ClrNumericFieldModule,
|
|
6875
|
+
ClrSearchFieldModule,
|
|
6876
|
+
ClrTreetableModule,
|
|
6877
|
+
ClrProgressSpinnerModule,
|
|
6878
|
+
ClrDateTimeModule,
|
|
6879
|
+
ClrQuickListModule,
|
|
6880
|
+
ClrLetterAvatarModule,
|
|
6881
|
+
ClrMultilingualModule,
|
|
6882
|
+
ClrGenericQuickListModule,
|
|
6883
|
+
ClrDataListValidatorModule,
|
|
6884
|
+
ClrHistoryModule,
|
|
6885
|
+
ClrAutocompleteOffModule,
|
|
6886
|
+
ClrBrandAvatarModule,
|
|
6887
|
+
ClrLocationBarModule,
|
|
6888
|
+
ClrFormModule,
|
|
6889
|
+
ClrDropdownOverflowModule,
|
|
6890
|
+
ClrDatagridStatePersistenceModule,
|
|
6891
|
+
ClrEnumFilterModule,
|
|
6892
|
+
ClrDateFilterModule,
|
|
6893
|
+
ClrDaterangepickerModule] });
|
|
6894
|
+
ClrAddonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, imports: [ClrViewEditSectionModule,
|
|
6895
|
+
ClrPagerModule,
|
|
6896
|
+
ClrDotPagerModule,
|
|
6897
|
+
ClrPagedSearchResultListModule,
|
|
6898
|
+
ClrCollapseExpandSectionModule,
|
|
6899
|
+
ClrBreadcrumbModule,
|
|
6900
|
+
ClrMainNavGroupModule,
|
|
6901
|
+
ClrContentPanelModule,
|
|
6902
|
+
ClrNotificationModule,
|
|
6903
|
+
ClrFlowBarModule,
|
|
6904
|
+
ClrBackButtonModule,
|
|
6905
|
+
ClrNumericFieldModule,
|
|
6906
|
+
ClrSearchFieldModule,
|
|
6907
|
+
ClrTreetableModule,
|
|
6908
|
+
ClrProgressSpinnerModule,
|
|
6909
|
+
ClrDateTimeModule,
|
|
6910
|
+
ClrQuickListModule,
|
|
6911
|
+
ClrLetterAvatarModule,
|
|
6912
|
+
ClrMultilingualModule,
|
|
6913
|
+
ClrGenericQuickListModule,
|
|
6914
|
+
ClrDataListValidatorModule,
|
|
6915
|
+
ClrHistoryModule,
|
|
6916
|
+
ClrAutocompleteOffModule,
|
|
6917
|
+
ClrBrandAvatarModule,
|
|
6918
|
+
ClrLocationBarModule,
|
|
6919
|
+
ClrFormModule,
|
|
6920
|
+
ClrDropdownOverflowModule,
|
|
6921
|
+
ClrDatagridStatePersistenceModule,
|
|
6922
|
+
ClrEnumFilterModule,
|
|
6923
|
+
ClrDateFilterModule,
|
|
6924
|
+
ClrDaterangepickerModule] });
|
|
6925
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: ClrAddonsModule, decorators: [{
|
|
6926
|
+
type: NgModule,
|
|
6927
|
+
args: [{
|
|
6928
|
+
exports: [
|
|
6929
|
+
ClrViewEditSectionModule,
|
|
6930
|
+
ClrPagerModule,
|
|
6931
|
+
ClrDotPagerModule,
|
|
6932
|
+
ClrPagedSearchResultListModule,
|
|
6933
|
+
ClrCollapseExpandSectionModule,
|
|
6934
|
+
ClrBreadcrumbModule,
|
|
6935
|
+
ClrMainNavGroupModule,
|
|
6936
|
+
ClrContentPanelModule,
|
|
6937
|
+
ClrNotificationModule,
|
|
6938
|
+
ClrFlowBarModule,
|
|
6939
|
+
ClrBackButtonModule,
|
|
6940
|
+
ClrNumericFieldModule,
|
|
6941
|
+
ClrSearchFieldModule,
|
|
6942
|
+
ClrTreetableModule,
|
|
6943
|
+
ClrProgressSpinnerModule,
|
|
6944
|
+
ClrDateTimeModule,
|
|
6945
|
+
ClrQuickListModule,
|
|
6946
|
+
ClrLetterAvatarModule,
|
|
6947
|
+
ClrMultilingualModule,
|
|
6948
|
+
ClrGenericQuickListModule,
|
|
6949
|
+
ClrDataListValidatorModule,
|
|
6950
|
+
ClrHistoryModule,
|
|
6951
|
+
ClrAutocompleteOffModule,
|
|
6952
|
+
ClrBrandAvatarModule,
|
|
6953
|
+
ClrLocationBarModule,
|
|
6954
|
+
ClrFormModule,
|
|
6955
|
+
ClrDropdownOverflowModule,
|
|
6956
|
+
ClrDatagridStatePersistenceModule,
|
|
6957
|
+
ClrEnumFilterModule,
|
|
6958
|
+
ClrDateFilterModule,
|
|
6959
|
+
ClrDaterangepickerModule,
|
|
6960
|
+
],
|
|
6961
|
+
}]
|
|
6962
|
+
}] });
|
|
6963
|
+
|
|
6964
|
+
/*
|
|
6965
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
6966
|
+
* This software is released under MIT license.
|
|
6967
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
6968
|
+
*/
|
|
6969
|
+
|
|
6970
|
+
/*
|
|
6971
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
6972
|
+
* This software is released under MIT license.
|
|
6973
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
6974
|
+
*/
|
|
6975
|
+
|
|
6976
|
+
/*
|
|
6977
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
6978
|
+
* This software is released under MIT license.
|
|
6979
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
6980
|
+
*/
|
|
6981
|
+
|
|
6982
|
+
/*
|
|
6983
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
6984
|
+
* This software is released under MIT license.
|
|
6985
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
6986
|
+
*/
|
|
6987
|
+
|
|
6988
|
+
/*
|
|
6989
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
6990
|
+
* This software is released under MIT license.
|
|
6991
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
6992
|
+
*/
|
|
6993
|
+
|
|
6994
|
+
/*
|
|
6995
|
+
* Copyright (c) 2018-2020 Porsche Informatik. All Rights Reserved.
|
|
6996
|
+
* This software is released under MIT license.
|
|
6997
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
6998
|
+
*/
|
|
6999
|
+
|
|
7000
|
+
/*
|
|
7001
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
7002
|
+
* This software is released under MIT license.
|
|
7003
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7004
|
+
*/
|
|
7005
|
+
|
|
7006
|
+
/*
|
|
7007
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
7008
|
+
* This software is released under MIT license.
|
|
7009
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7010
|
+
*/
|
|
7011
|
+
|
|
7012
|
+
/*
|
|
7013
|
+
* Copyright (c) 2018-2019 Porsche Informatik. All Rights Reserved.
|
|
7014
|
+
* This software is released under MIT license.
|
|
7015
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7016
|
+
*/
|
|
7017
|
+
|
|
7018
|
+
/*
|
|
7019
|
+
* Copyright (c) 2018-2021 Porsche Informatik. All Rights Reserved.
|
|
7020
|
+
* This software is released under MIT license.
|
|
7021
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7022
|
+
*/
|
|
7023
|
+
/*
|
|
7024
|
+
* Copyright (c) 2018-2021 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
|
+
* A reference to an active (currently opened) notification.
|
|
7030
|
+
*
|
|
7031
|
+
* @deprecated not used anymore.
|
|
7032
|
+
*/
|
|
7033
|
+
class ClrActiveNotification {
|
|
7034
|
+
}
|
|
7035
|
+
class ClrContentRef {
|
|
7036
|
+
constructor(nodes, viewRef, componentRef) {
|
|
7037
|
+
this.nodes = nodes;
|
|
7038
|
+
this.viewRef = viewRef;
|
|
7039
|
+
this.componentRef = componentRef;
|
|
7040
|
+
}
|
|
7041
|
+
}
|
|
7042
|
+
/**
|
|
7043
|
+
* A reference to a newly opened notification.
|
|
7044
|
+
*/
|
|
7045
|
+
class ClrNotificationRef {
|
|
7046
|
+
constructor(_notificationCmptRef, _contentRef) {
|
|
7047
|
+
this._notificationCmptRef = _notificationCmptRef;
|
|
7048
|
+
this._contentRef = _contentRef;
|
|
7049
|
+
_notificationCmptRef.instance.closed.pipe(take(1)).subscribe(() => {
|
|
7050
|
+
this.close();
|
|
7051
|
+
});
|
|
7052
|
+
this.result = new Promise(resolve => {
|
|
7053
|
+
this._resolve = resolve;
|
|
7054
|
+
});
|
|
7055
|
+
this.result.then(null);
|
|
7056
|
+
}
|
|
7057
|
+
/**
|
|
7058
|
+
* Can be used to close a notification
|
|
7059
|
+
*/
|
|
7060
|
+
close() {
|
|
7061
|
+
if (this._notificationCmptRef) {
|
|
7062
|
+
this._resolve();
|
|
7063
|
+
this._removeModalElements();
|
|
7064
|
+
}
|
|
7065
|
+
}
|
|
7066
|
+
_removeModalElements() {
|
|
7067
|
+
const notificationNativeEl = this._notificationCmptRef.location.nativeElement;
|
|
7068
|
+
notificationNativeEl.parentNode.removeChild(notificationNativeEl);
|
|
7069
|
+
this._notificationCmptRef.destroy();
|
|
7070
|
+
if (this._contentRef && this._contentRef.viewRef) {
|
|
7071
|
+
this._contentRef.viewRef.destroy();
|
|
7072
|
+
}
|
|
7073
|
+
this._notificationCmptRef = null;
|
|
7074
|
+
this._contentRef = null;
|
|
7075
|
+
}
|
|
7076
|
+
}
|
|
7077
|
+
|
|
7078
|
+
/*
|
|
7079
|
+
* Copyright (c) 2018-2021 Porsche Informatik. All Rights Reserved.
|
|
7080
|
+
* This software is released under MIT license.
|
|
7081
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
7082
|
+
*/
|
|
7083
|
+
class ClrNotificationService {
|
|
7084
|
+
constructor(_injector, _applicationRef, _componentFactoryResolver, _document) {
|
|
7085
|
+
this._injector = _injector;
|
|
7086
|
+
this._applicationRef = _applicationRef;
|
|
5451
7087
|
this._componentFactoryResolver = _componentFactoryResolver;
|
|
5452
7088
|
this._document = _document;
|
|
5453
7089
|
this.elements = new Set();
|
|
@@ -5961,7 +7597,7 @@ const ClrAddonsIconShapes = {
|
|
|
5961
7597
|
*/
|
|
5962
7598
|
|
|
5963
7599
|
/*
|
|
5964
|
-
* Copyright (c) 2018-
|
|
7600
|
+
* Copyright (c) 2018-2023 Porsche Informatik. All Rights Reserved.
|
|
5965
7601
|
* This software is released under MIT license.
|
|
5966
7602
|
* The full license information can be found in LICENSE in the root directory of this project.
|
|
5967
7603
|
*/
|
|
@@ -5970,5 +7606,5 @@ const ClrAddonsIconShapes = {
|
|
|
5970
7606
|
* Generated bundle index. Do not edit.
|
|
5971
7607
|
*/
|
|
5972
7608
|
|
|
5973
|
-
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 };
|
|
7609
|
+
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 };
|
|
5974
7610
|
//# sourceMappingURL=clr-addons.mjs.map
|