@coreui/angular-pro 5.3.12 → 5.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/coreui-angular-pro.mjs +296 -302
- package/fesm2022/coreui-angular-pro.mjs.map +1 -1
- package/lib/carousel/carousel-control/carousel-control.component.d.ts +0 -3
- package/lib/carousel/carousel-inner/carousel-inner.component.d.ts +2 -0
- package/lib/carousel/carousel-item/carousel-item.component.d.ts +7 -1
- package/lib/carousel/carousel-state.type.d.ts +4 -3
- package/lib/dropdown/dropdown/dropdown.component.d.ts +43 -39
- package/lib/dropdown/dropdown-close/dropdown-close.directive.d.ts +11 -12
- package/lib/dropdown/dropdown-item/dropdown-item.directive.d.ts +17 -15
- package/lib/dropdown/dropdown-menu/dropdown-menu.directive.d.ts +8 -10
- package/lib/progress/progress-bar.directive.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, Directive, input, Renderer2, effect, TemplateRef, Input, booleanAttribute, NgModule, computed, Injectable, Component, linkedSignal, output, signal, afterNextRender, contentChildren, DestroyRef,
|
|
2
|
+
import { inject, ElementRef, Directive, input, Renderer2, effect, TemplateRef, Input, booleanAttribute, untracked, NgModule, computed, Injectable, Component, linkedSignal, output, signal, afterNextRender, contentChildren, DestroyRef, HostBinding, RendererFactory2, numberAttribute, Pipe, ViewChildren, model, PLATFORM_ID, Inject, ContentChildren, forwardRef, ContentChild, contentChild, EventEmitter, Output, HostListener, ViewChild, viewChild, ChangeDetectionStrategy, ChangeDetectorRef, NgZone, afterRender, ViewContainerRef, viewChildren, Injector, runInInjectionContext } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet, DOCUMENT, NgClass, AsyncPipe, NgStyle, isPlatformServer, isPlatformBrowser, formatDate, I18nPluralPipe } from '@angular/common';
|
|
4
4
|
import { animation, animate, style, AnimationBuilder, useAnimation, trigger, state, transition, group, query, animateChild } from '@angular/animations';
|
|
5
5
|
import { takeUntilDestroyed, toObservable, toSignal } from '@angular/core/rxjs-interop';
|
|
@@ -127,7 +127,7 @@ class ThemeDirective {
|
|
|
127
127
|
});
|
|
128
128
|
this.dark = input(false, { transform: booleanAttribute });
|
|
129
129
|
this.#darkChange = effect(() => {
|
|
130
|
-
const darkTheme = this.dark();
|
|
130
|
+
const darkTheme = this.dark() || untracked(this.colorScheme) === 'dark';
|
|
131
131
|
darkTheme ? this.setTheme('dark') : this.unsetTheme();
|
|
132
132
|
});
|
|
133
133
|
}
|
|
@@ -4066,7 +4066,8 @@ class CarouselState {
|
|
|
4066
4066
|
animate: true,
|
|
4067
4067
|
items: [],
|
|
4068
4068
|
direction: 'next',
|
|
4069
|
-
transition: 'slide'
|
|
4069
|
+
transition: 'slide',
|
|
4070
|
+
interval: 0
|
|
4070
4071
|
};
|
|
4071
4072
|
get state() {
|
|
4072
4073
|
return this.#state;
|
|
@@ -4125,7 +4126,8 @@ class CarouselState {
|
|
|
4125
4126
|
animate: true,
|
|
4126
4127
|
items: [],
|
|
4127
4128
|
direction: 'next',
|
|
4128
|
-
transition: 'slide'
|
|
4129
|
+
transition: 'slide',
|
|
4130
|
+
interval: 0
|
|
4129
4131
|
};
|
|
4130
4132
|
}
|
|
4131
4133
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CarouselState, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -4144,7 +4146,7 @@ class CarouselConfig {
|
|
|
4144
4146
|
/* Default direction of auto changing of slides */
|
|
4145
4147
|
this.direction = 'next';
|
|
4146
4148
|
/* Default interval of auto changing of slides */
|
|
4147
|
-
this.interval =
|
|
4149
|
+
this.interval = 0;
|
|
4148
4150
|
}
|
|
4149
4151
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CarouselConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4150
4152
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CarouselConfig, providedIn: 'root' }); }
|
|
@@ -4205,7 +4207,9 @@ class CarouselComponent {
|
|
|
4205
4207
|
computation: (value) => value
|
|
4206
4208
|
});
|
|
4207
4209
|
this.#intervalEffect = effect(() => {
|
|
4208
|
-
|
|
4210
|
+
const interval = this.interval();
|
|
4211
|
+
this.#carouselState.state = { interval: interval };
|
|
4212
|
+
interval ? this.setTimer() : this.resetTimer();
|
|
4209
4213
|
});
|
|
4210
4214
|
/**
|
|
4211
4215
|
* Sets which event handlers you’d like provided to your pause prop. You can specify one trigger or an array of them.
|
|
@@ -4261,6 +4265,7 @@ class CarouselComponent {
|
|
|
4261
4265
|
this.#carouselState.state = {
|
|
4262
4266
|
activeItemIndex: this.activeIndex(),
|
|
4263
4267
|
animate: this.animate(),
|
|
4268
|
+
interval: this.interval(),
|
|
4264
4269
|
transition: this.transition()
|
|
4265
4270
|
};
|
|
4266
4271
|
this.setListeners();
|
|
@@ -4290,7 +4295,7 @@ class CarouselComponent {
|
|
|
4290
4295
|
}
|
|
4291
4296
|
#visible;
|
|
4292
4297
|
setTimer() {
|
|
4293
|
-
const interval = this.activeItemInterval ||
|
|
4298
|
+
const interval = this.activeItemInterval || this.interval();
|
|
4294
4299
|
const direction = this.direction();
|
|
4295
4300
|
this.resetTimer();
|
|
4296
4301
|
if (interval > 0) {
|
|
@@ -4405,10 +4410,6 @@ class CarouselControlComponent {
|
|
|
4405
4410
|
this.carouselControlIconClass = computed(() => {
|
|
4406
4411
|
return `carousel-control-${this.direction()}-icon`;
|
|
4407
4412
|
});
|
|
4408
|
-
this.content = viewChild('content', { read: ElementRef });
|
|
4409
|
-
this.hasContent = computed(() => {
|
|
4410
|
-
return this.content()?.nativeElement.childNodes.length ?? false;
|
|
4411
|
-
});
|
|
4412
4413
|
}
|
|
4413
4414
|
#carouselState;
|
|
4414
4415
|
onKeyUp($event) {
|
|
@@ -4430,7 +4431,7 @@ class CarouselControlComponent {
|
|
|
4430
4431
|
this.#carouselState.state = { activeItemIndex: nextIndex };
|
|
4431
4432
|
}
|
|
4432
4433
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CarouselControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4433
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
4434
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.5", type: CarouselControlComponent, isStandalone: true, selector: "c-carousel-control", inputs: { captionInput: { classPropertyName: "captionInput", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keyup": "onKeyUp($event)", "click": "onClick($event)" }, properties: { "attr.role": "role()", "class": "hostClasses()" } }, exportAs: ["cCarouselControl"], ngImport: i0, template: "<ng-content>\n <span [attr.aria-hidden]=\"true\" [class]=\"carouselControlIconClass()\"></span>\n <span class=\"visually-hidden\">{{ caption() }}</span>\n</ng-content>\n" }); }
|
|
4434
4435
|
}
|
|
4435
4436
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CarouselControlComponent, decorators: [{
|
|
4436
4437
|
type: Component,
|
|
@@ -4439,7 +4440,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
4439
4440
|
'[class]': 'hostClasses()',
|
|
4440
4441
|
'(keyup)': 'onKeyUp($event)',
|
|
4441
4442
|
'(click)': 'onClick($event)'
|
|
4442
|
-
}, template: "
|
|
4443
|
+
}, template: "<ng-content>\n <span [attr.aria-hidden]=\"true\" [class]=\"carouselControlIconClass()\"></span>\n <span class=\"visually-hidden\">{{ caption() }}</span>\n</ng-content>\n" }]
|
|
4443
4444
|
}] });
|
|
4444
4445
|
|
|
4445
4446
|
class CarouselIndicatorsComponent {
|
|
@@ -4504,6 +4505,12 @@ class CarouselItemComponent {
|
|
|
4504
4505
|
* @default -1
|
|
4505
4506
|
*/
|
|
4506
4507
|
this.interval = input(-1);
|
|
4508
|
+
/**
|
|
4509
|
+
* Carousel item role.
|
|
4510
|
+
* @return string
|
|
4511
|
+
* @default 'group'
|
|
4512
|
+
*/
|
|
4513
|
+
this.role = input('group');
|
|
4507
4514
|
this.#carouselService.carouselIndex$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((nextIndex) => {
|
|
4508
4515
|
if ('active' in nextIndex) {
|
|
4509
4516
|
this.active.set(nextIndex.active === this.index);
|
|
@@ -4511,13 +4518,14 @@ class CarouselItemComponent {
|
|
|
4511
4518
|
});
|
|
4512
4519
|
}
|
|
4513
4520
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CarouselItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4514
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: CarouselItemComponent, isStandalone: true, selector: "c-carousel-item", inputs: { activeInput: { classPropertyName: "activeInput", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.active": "active()" }, classAttribute: "carousel-item" }, exportAs: ["cCarouselItem"], ngImport: i0, template: "@if (active()) {\n <ng-content />\n}\n", styles: [":host{display:block}\n"] }); }
|
|
4521
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: CarouselItemComponent, isStandalone: true, selector: "c-carousel-item", inputs: { activeInput: { classPropertyName: "activeInput", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.active": "active()", "attr.role": "role()" }, classAttribute: "carousel-item" }, exportAs: ["cCarouselItem"], ngImport: i0, template: "@if (active()) {\n <ng-content />\n}\n", styles: [":host{display:block}\n"] }); }
|
|
4515
4522
|
}
|
|
4516
4523
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CarouselItemComponent, decorators: [{
|
|
4517
4524
|
type: Component,
|
|
4518
4525
|
args: [{ selector: 'c-carousel-item', exportAs: 'cCarouselItem', host: {
|
|
4519
4526
|
class: 'carousel-item',
|
|
4520
|
-
'[class.active]': 'active()'
|
|
4527
|
+
'[class.active]': 'active()',
|
|
4528
|
+
'[attr.role]': 'role()'
|
|
4521
4529
|
}, template: "@if (active()) {\n <ng-content />\n}\n", styles: [":host{display:block}\n"] }]
|
|
4522
4530
|
}], ctorParameters: () => [] });
|
|
4523
4531
|
|
|
@@ -4602,11 +4610,15 @@ class CarouselInnerComponent {
|
|
|
4602
4610
|
this.#carouselState = inject(CarouselState);
|
|
4603
4611
|
this.activeIndex = signal(undefined);
|
|
4604
4612
|
this.animate = signal(true);
|
|
4613
|
+
this.interval = signal(0);
|
|
4605
4614
|
this.slide = signal({ left: true });
|
|
4606
4615
|
this.transition = signal('crossfade');
|
|
4607
4616
|
this.slideType = computed(() => {
|
|
4608
4617
|
return { left: this.slide().left, type: this.transition() };
|
|
4609
4618
|
});
|
|
4619
|
+
this.ariaLive = computed(() => {
|
|
4620
|
+
return this.interval() ? 'off' : 'polite';
|
|
4621
|
+
});
|
|
4610
4622
|
this.contentItems = contentChildren(CarouselItemComponent);
|
|
4611
4623
|
this.#prevContentItems = signal([]);
|
|
4612
4624
|
}
|
|
@@ -4622,8 +4634,9 @@ class CarouselInnerComponent {
|
|
|
4622
4634
|
const nextDirection = state?.direction;
|
|
4623
4635
|
if (this.activeIndex() !== nextIndex) {
|
|
4624
4636
|
this.animate.set(state?.animate ?? false);
|
|
4625
|
-
this.slide.set({ left: nextDirection === 'next' });
|
|
4626
4637
|
this.activeIndex.set(state?.activeItemIndex);
|
|
4638
|
+
this.interval.set(state?.interval ?? 0);
|
|
4639
|
+
this.slide.set({ left: nextDirection === 'next' });
|
|
4627
4640
|
this.transition.set(state?.transition ?? 'slide');
|
|
4628
4641
|
}
|
|
4629
4642
|
}
|
|
@@ -4635,14 +4648,15 @@ class CarouselInnerComponent {
|
|
|
4635
4648
|
}
|
|
4636
4649
|
}
|
|
4637
4650
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CarouselInnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4638
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.1.5", type: CarouselInnerComponent, isStandalone: true, selector: "c-carousel-inner", host: { properties: { "@carouselPlay": "slideType()", "@.disabled": "!animate()" }, classAttribute: "carousel-inner" }, queries: [{ propertyName: "contentItems", predicate: CarouselItemComponent, isSignal: true }], ngImport: i0, template: '<ng-content />', isInline: true, styles: [":host{display:block}\n"], animations: [carouselPlay] }); }
|
|
4651
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.1.5", type: CarouselInnerComponent, isStandalone: true, selector: "c-carousel-inner", host: { properties: { "@carouselPlay": "slideType()", "@.disabled": "!animate()", "attr.aria-live": "ariaLive()" }, classAttribute: "carousel-inner" }, queries: [{ propertyName: "contentItems", predicate: CarouselItemComponent, isSignal: true }], ngImport: i0, template: '<ng-content />', isInline: true, styles: [":host{display:block}\n"], animations: [carouselPlay] }); }
|
|
4639
4652
|
}
|
|
4640
4653
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CarouselInnerComponent, decorators: [{
|
|
4641
4654
|
type: Component,
|
|
4642
4655
|
args: [{ selector: 'c-carousel-inner', animations: [carouselPlay], template: '<ng-content />', host: {
|
|
4643
4656
|
class: 'carousel-inner',
|
|
4644
4657
|
'[@carouselPlay]': 'slideType()',
|
|
4645
|
-
'[@.disabled]': '!animate()'
|
|
4658
|
+
'[@.disabled]': '!animate()',
|
|
4659
|
+
'[attr.aria-live]': 'ariaLive()'
|
|
4646
4660
|
}, styles: [":host{display:block}\n"] }]
|
|
4647
4661
|
}] });
|
|
4648
4662
|
|
|
@@ -4731,31 +4745,43 @@ class DropdownMenuDirective {
|
|
|
4731
4745
|
this.#destroyRef = inject(DestroyRef);
|
|
4732
4746
|
this.elementRef = inject(ElementRef);
|
|
4733
4747
|
this.#dropdownService = inject(DropdownService);
|
|
4748
|
+
/**
|
|
4749
|
+
* Set alignment of dropdown menu.
|
|
4750
|
+
* @return 'start' | 'end'
|
|
4751
|
+
*/
|
|
4752
|
+
this.alignment = input();
|
|
4734
4753
|
/**
|
|
4735
4754
|
* Toggle the visibility of dropdown menu component.
|
|
4736
|
-
* @
|
|
4755
|
+
* @return boolean
|
|
4737
4756
|
*/
|
|
4738
|
-
this.
|
|
4757
|
+
this.visibleInput = input(false, { transform: booleanAttribute, alias: 'visible' });
|
|
4758
|
+
this.visible = linkedSignal({
|
|
4759
|
+
source: () => this.visibleInput(),
|
|
4760
|
+
computation: (value) => value
|
|
4761
|
+
});
|
|
4762
|
+
this.hostClasses = computed(() => {
|
|
4763
|
+
const alignment = this.alignment();
|
|
4764
|
+
const visible = this.visible();
|
|
4765
|
+
return {
|
|
4766
|
+
'dropdown-menu': true,
|
|
4767
|
+
[`dropdown-menu-${alignment}`]: !!alignment,
|
|
4768
|
+
show: visible
|
|
4769
|
+
};
|
|
4770
|
+
});
|
|
4771
|
+
this.hostStyles = computed(() => {
|
|
4772
|
+
// workaround for popper position calculate (see also: dropdown.component)
|
|
4773
|
+
const visible = this.visible();
|
|
4774
|
+
return {
|
|
4775
|
+
visibility: visible ? null : '',
|
|
4776
|
+
display: visible ? null : ''
|
|
4777
|
+
};
|
|
4778
|
+
});
|
|
4739
4779
|
}
|
|
4740
4780
|
#destroyRef;
|
|
4741
4781
|
#dropdownService;
|
|
4742
4782
|
#focusKeyManager;
|
|
4743
|
-
get hostClasses() {
|
|
4744
|
-
return {
|
|
4745
|
-
'dropdown-menu': true,
|
|
4746
|
-
[`dropdown-menu-${this.alignment}`]: !!this.alignment,
|
|
4747
|
-
show: this.visible
|
|
4748
|
-
};
|
|
4749
|
-
}
|
|
4750
|
-
get hostStyles() {
|
|
4751
|
-
// workaround for popper position calculate (see also: dropdown.component)
|
|
4752
|
-
return {
|
|
4753
|
-
visibility: this.visible ? null : '',
|
|
4754
|
-
display: this.visible ? null : ''
|
|
4755
|
-
};
|
|
4756
|
-
}
|
|
4757
4783
|
onKeyDown($event) {
|
|
4758
|
-
if (!this.visible) {
|
|
4784
|
+
if (!this.visible()) {
|
|
4759
4785
|
return;
|
|
4760
4786
|
}
|
|
4761
4787
|
if (['Space', 'ArrowDown'].includes($event.code)) {
|
|
@@ -4764,7 +4790,7 @@ class DropdownMenuDirective {
|
|
|
4764
4790
|
this.#focusKeyManager.onKeydown($event);
|
|
4765
4791
|
}
|
|
4766
4792
|
onKeyUp($event) {
|
|
4767
|
-
if (!this.visible) {
|
|
4793
|
+
if (!this.visible()) {
|
|
4768
4794
|
return;
|
|
4769
4795
|
}
|
|
4770
4796
|
if (['Tab'].includes($event.key)) {
|
|
@@ -4788,8 +4814,8 @@ class DropdownMenuDirective {
|
|
|
4788
4814
|
this.#dropdownService.dropdownState$
|
|
4789
4815
|
.pipe(tap((state) => {
|
|
4790
4816
|
if ('visible' in state) {
|
|
4791
|
-
this.visible
|
|
4792
|
-
if (!this.visible) {
|
|
4817
|
+
this.visible.update((visible) => (state.visible === 'toggle' ? !visible : state.visible));
|
|
4818
|
+
if (!this.visible()) {
|
|
4793
4819
|
this.#focusKeyManager?.setActiveItem(-1);
|
|
4794
4820
|
}
|
|
4795
4821
|
}
|
|
@@ -4804,7 +4830,7 @@ class DropdownMenuDirective {
|
|
|
4804
4830
|
.skipPredicate((dropdownItem) => dropdownItem.disabled === true);
|
|
4805
4831
|
}
|
|
4806
4832
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DropdownMenuDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4807
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
4833
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.5", type: DropdownMenuDirective, isStandalone: true, selector: "[cDropdownMenu]", inputs: { alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, visibleInput: { classPropertyName: "visibleInput", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeyDown($event)", "keyup": "onKeyUp($event)" }, properties: { "class": "hostClasses()", "style": "hostStyles()" }, classAttribute: "dropdown-menu" }, queries: [{ propertyName: "dropdownItemsContent", predicate: i0.forwardRef(() => DropdownItemDirective), descendants: true }], exportAs: ["cDropdownMenu"], hostDirectives: [{ directive: ThemeDirective, inputs: ["dark", "dark"] }], ngImport: i0 }); }
|
|
4808
4834
|
}
|
|
4809
4835
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DropdownMenuDirective, decorators: [{
|
|
4810
4836
|
type: Directive,
|
|
@@ -4812,25 +4838,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
4812
4838
|
selector: '[cDropdownMenu]',
|
|
4813
4839
|
exportAs: 'cDropdownMenu',
|
|
4814
4840
|
hostDirectives: [{ directive: ThemeDirective, inputs: ['dark'] }],
|
|
4815
|
-
host: {
|
|
4841
|
+
host: {
|
|
4842
|
+
class: 'dropdown-menu',
|
|
4843
|
+
'[class]': 'hostClasses()',
|
|
4844
|
+
'[style]': 'hostStyles()',
|
|
4845
|
+
'(keydown)': 'onKeyDown($event)',
|
|
4846
|
+
'(keyup)': 'onKeyUp($event)'
|
|
4847
|
+
}
|
|
4816
4848
|
}]
|
|
4817
|
-
}], propDecorators: {
|
|
4818
|
-
type: Input
|
|
4819
|
-
}], visible: [{
|
|
4820
|
-
type: Input
|
|
4821
|
-
}], hostClasses: [{
|
|
4822
|
-
type: HostBinding,
|
|
4823
|
-
args: ['class']
|
|
4824
|
-
}], hostStyles: [{
|
|
4825
|
-
type: HostBinding,
|
|
4826
|
-
args: ['style']
|
|
4827
|
-
}], onKeyDown: [{
|
|
4828
|
-
type: HostListener,
|
|
4829
|
-
args: ['keydown', ['$event']]
|
|
4830
|
-
}], onKeyUp: [{
|
|
4831
|
-
type: HostListener,
|
|
4832
|
-
args: ['keyup', ['$event']]
|
|
4833
|
-
}], dropdownItemsContent: [{
|
|
4849
|
+
}], propDecorators: { dropdownItemsContent: [{
|
|
4834
4850
|
type: ContentChildren,
|
|
4835
4851
|
args: [forwardRef(() => DropdownItemDirective), { descendants: true }]
|
|
4836
4852
|
}] } });
|
|
@@ -4845,86 +4861,79 @@ class DropdownToggleDirective {
|
|
|
4845
4861
|
this.elementRef = inject(ElementRef);
|
|
4846
4862
|
this.#dropdownService = inject(DropdownService);
|
|
4847
4863
|
this.dropdown = inject(DropdownToken, { optional: true });
|
|
4864
|
+
/**
|
|
4865
|
+
* Reference to dropdown component.
|
|
4866
|
+
* @return DropdownComponent | undefined
|
|
4867
|
+
* @default undefined
|
|
4868
|
+
*/
|
|
4869
|
+
this.dropdownComponent = input();
|
|
4848
4870
|
/**
|
|
4849
4871
|
* Disables the toggler.
|
|
4850
|
-
* @
|
|
4872
|
+
* @return boolean
|
|
4851
4873
|
* @default false
|
|
4852
4874
|
*/
|
|
4853
|
-
this.disabled = false;
|
|
4875
|
+
this.disabled = input(false, { transform: booleanAttribute });
|
|
4854
4876
|
/**
|
|
4855
4877
|
* Enables pseudo element caret on toggler.
|
|
4856
|
-
* @
|
|
4878
|
+
* @return boolean
|
|
4857
4879
|
*/
|
|
4858
|
-
this.caret = true;
|
|
4880
|
+
this.caret = input(true);
|
|
4859
4881
|
/**
|
|
4860
4882
|
* Create split button dropdowns with virtually the same markup as single button dropdowns,
|
|
4861
4883
|
* but with the addition of `.dropdown-toggle-split` class for proper spacing around the dropdown caret.
|
|
4862
|
-
* @
|
|
4884
|
+
* @return boolean
|
|
4863
4885
|
* @default false
|
|
4864
4886
|
*/
|
|
4865
|
-
this.split = false;
|
|
4887
|
+
this.split = input(false, { transform: booleanAttribute });
|
|
4888
|
+
this.hostClasses = computed(() => {
|
|
4889
|
+
return {
|
|
4890
|
+
'dropdown-toggle': this.caret(),
|
|
4891
|
+
'dropdown-toggle-split': this.split(),
|
|
4892
|
+
disabled: this.disabled()
|
|
4893
|
+
};
|
|
4894
|
+
});
|
|
4866
4895
|
this.#ariaExpanded = signal(false);
|
|
4867
4896
|
}
|
|
4868
4897
|
// injections
|
|
4869
4898
|
#destroyRef;
|
|
4870
4899
|
#dropdownService;
|
|
4871
|
-
get hostClasses() {
|
|
4872
|
-
return {
|
|
4873
|
-
'dropdown-toggle': this.caret,
|
|
4874
|
-
'dropdown-toggle-split': this.split,
|
|
4875
|
-
disabled: this.disabled
|
|
4876
|
-
};
|
|
4877
|
-
}
|
|
4878
4900
|
#ariaExpanded;
|
|
4879
4901
|
get ariaExpanded() {
|
|
4880
4902
|
return this.#ariaExpanded();
|
|
4881
4903
|
}
|
|
4882
4904
|
onClick($event) {
|
|
4883
4905
|
$event.preventDefault();
|
|
4884
|
-
!this.disabled && this.#dropdownService.toggle({ visible: 'toggle', dropdown: this.dropdown });
|
|
4906
|
+
!this.disabled() && this.#dropdownService.toggle({ visible: 'toggle', dropdown: this.dropdown });
|
|
4885
4907
|
}
|
|
4886
4908
|
ngAfterViewInit() {
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
this
|
|
4909
|
+
const dropdownComponent = this.dropdownComponent();
|
|
4910
|
+
if (dropdownComponent) {
|
|
4911
|
+
this.dropdown = dropdownComponent;
|
|
4912
|
+
this.#dropdownService = dropdownComponent?.dropdownService;
|
|
4890
4913
|
}
|
|
4891
4914
|
if (this.dropdown) {
|
|
4892
4915
|
const dropdown = this.dropdown;
|
|
4893
|
-
dropdown?.visibleChange?.
|
|
4916
|
+
dropdown?.visibleChange?.subscribe((visible) => {
|
|
4894
4917
|
this.#ariaExpanded.set(visible);
|
|
4895
4918
|
});
|
|
4896
4919
|
}
|
|
4897
4920
|
}
|
|
4898
4921
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DropdownToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4899
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
4922
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.5", type: DropdownToggleDirective, isStandalone: true, selector: "[cDropdownToggle]", inputs: { dropdownComponent: { classPropertyName: "dropdownComponent", publicName: "dropdownComponent", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, caret: { classPropertyName: "caret", publicName: "caret", isSignal: true, isRequired: false, transformFunction: null }, split: { classPropertyName: "split", publicName: "split", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)" }, properties: { "class": "hostClasses()", "attr.aria-expanded": "ariaExpanded" } }, providers: [{ provide: DropdownToken, useExisting: forwardRef(() => DropdownComponent) }], exportAs: ["cDropdownToggle"], ngImport: i0 }); }
|
|
4900
4923
|
}
|
|
4901
4924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DropdownToggleDirective, decorators: [{
|
|
4902
4925
|
type: Directive,
|
|
4903
4926
|
args: [{
|
|
4904
4927
|
selector: '[cDropdownToggle]',
|
|
4905
4928
|
providers: [{ provide: DropdownToken, useExisting: forwardRef(() => DropdownComponent) }],
|
|
4906
|
-
exportAs: 'cDropdownToggle'
|
|
4929
|
+
exportAs: 'cDropdownToggle',
|
|
4930
|
+
host: {
|
|
4931
|
+
'[class]': 'hostClasses()',
|
|
4932
|
+
'[attr.aria-expanded]': 'ariaExpanded',
|
|
4933
|
+
'(click)': 'onClick($event)'
|
|
4934
|
+
}
|
|
4907
4935
|
}]
|
|
4908
|
-
}]
|
|
4909
|
-
type: Input
|
|
4910
|
-
}], disabled: [{
|
|
4911
|
-
type: Input,
|
|
4912
|
-
args: [{ transform: booleanAttribute }]
|
|
4913
|
-
}], caret: [{
|
|
4914
|
-
type: Input
|
|
4915
|
-
}], split: [{
|
|
4916
|
-
type: Input,
|
|
4917
|
-
args: [{ transform: booleanAttribute }]
|
|
4918
|
-
}], hostClasses: [{
|
|
4919
|
-
type: HostBinding,
|
|
4920
|
-
args: ['class']
|
|
4921
|
-
}], ariaExpanded: [{
|
|
4922
|
-
type: HostBinding,
|
|
4923
|
-
args: ['attr.aria-expanded']
|
|
4924
|
-
}], onClick: [{
|
|
4925
|
-
type: HostListener,
|
|
4926
|
-
args: ['click', ['$event']]
|
|
4927
|
-
}] } });
|
|
4936
|
+
}] });
|
|
4928
4937
|
class DropdownComponent {
|
|
4929
4938
|
constructor(document, elementRef, renderer, ngZone, changeDetectorRef, dropdownService) {
|
|
4930
4939
|
this.document = document;
|
|
@@ -4933,45 +4942,93 @@ class DropdownComponent {
|
|
|
4933
4942
|
this.ngZone = ngZone;
|
|
4934
4943
|
this.changeDetectorRef = changeDetectorRef;
|
|
4935
4944
|
this.dropdownService = dropdownService;
|
|
4936
|
-
|
|
4945
|
+
/**
|
|
4946
|
+
* Set alignment of dropdown menu.
|
|
4947
|
+
* @return {'start' | 'end' | { xs: 'start' | 'end' } | { sm: 'start' | 'end' } | { md: 'start' | 'end' } | { lg: 'start' | 'end' } | { xl: 'start' | 'end'} | { xxl: 'start' | 'end'}}
|
|
4948
|
+
*/
|
|
4949
|
+
this.alignment = input();
|
|
4950
|
+
/**
|
|
4951
|
+
* Automatically close dropdown when clicking outside the dropdown menu.
|
|
4952
|
+
*/
|
|
4953
|
+
this.autoClose = input(true);
|
|
4954
|
+
/**
|
|
4955
|
+
* Sets a specified direction and location of the dropdown menu.
|
|
4956
|
+
* @return 'dropup' | 'dropend' | 'dropstart'
|
|
4957
|
+
*/
|
|
4958
|
+
this.direction = input();
|
|
4937
4959
|
/**
|
|
4938
4960
|
* Describes the placement of your component after Popper.js has applied all the modifiers
|
|
4939
4961
|
* that may have flipped or altered the originally provided placement property.
|
|
4940
|
-
* @
|
|
4962
|
+
* @return Placement
|
|
4941
4963
|
*/
|
|
4942
|
-
this.placement = 'bottom-start';
|
|
4964
|
+
this.placement = input('bottom-start');
|
|
4943
4965
|
/**
|
|
4944
4966
|
* If you want to disable dynamic positioning set this property to `false`.
|
|
4945
|
-
* @
|
|
4967
|
+
* @return boolean
|
|
4946
4968
|
* @default true
|
|
4947
4969
|
*/
|
|
4948
|
-
this.popper = true;
|
|
4949
|
-
|
|
4950
|
-
|
|
4970
|
+
this.popper = input(true, { transform: booleanAttribute });
|
|
4971
|
+
/**
|
|
4972
|
+
* Optional popper Options object, placement prop takes precedence over
|
|
4973
|
+
* @return Partial<Options>
|
|
4974
|
+
*/
|
|
4975
|
+
this.popperOptionsInput = input({}, { alias: 'popperOptions' });
|
|
4976
|
+
this.popperOptionsEffect = effect(() => {
|
|
4977
|
+
this.popperOptions = { ...untracked(this.#popperOptions), ...this.popperOptionsInput() };
|
|
4978
|
+
});
|
|
4979
|
+
this.#popperOptions = signal({
|
|
4980
|
+
placement: this.placement(),
|
|
4951
4981
|
modifiers: [],
|
|
4952
4982
|
strategy: 'absolute'
|
|
4953
|
-
};
|
|
4983
|
+
});
|
|
4954
4984
|
/**
|
|
4955
4985
|
* Set the dropdown variant to a btn-group, dropdown, input-group, and nav-item.
|
|
4956
4986
|
*/
|
|
4957
|
-
this.variant = 'dropdown';
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4987
|
+
this.variant = input('dropdown');
|
|
4988
|
+
/**
|
|
4989
|
+
* Toggle the visibility of dropdown menu component.
|
|
4990
|
+
* @return boolean
|
|
4991
|
+
* @default false
|
|
4992
|
+
*/
|
|
4993
|
+
this.visibleInput = input(false, { transform: booleanAttribute, alias: 'visible' });
|
|
4994
|
+
this.visible = linkedSignal({
|
|
4995
|
+
source: () => this.visibleInput(),
|
|
4996
|
+
computation: (value) => value
|
|
4997
|
+
});
|
|
4998
|
+
this.visibleEffect = effect(() => {
|
|
4999
|
+
const visible = this.visible();
|
|
5000
|
+
this.activeTrap = visible;
|
|
5001
|
+
visible ? this.createPopperInstance() : this.destroyPopperInstance();
|
|
5002
|
+
this.setVisibleState(visible);
|
|
5003
|
+
this.visibleChange.emit(visible);
|
|
5004
|
+
});
|
|
5005
|
+
this.visibleChange = output();
|
|
5006
|
+
this.dropdownContext = { $implicit: this.visible() };
|
|
4961
5007
|
this.activeTrap = false;
|
|
4962
5008
|
this.listeners = [];
|
|
5009
|
+
this.hostClasses = computed(() => {
|
|
5010
|
+
const direction = this.direction();
|
|
5011
|
+
const variant = this.variant();
|
|
5012
|
+
return {
|
|
5013
|
+
dropdown: (variant === 'dropdown' || variant === 'nav-item') && !direction,
|
|
5014
|
+
[`${direction}`]: !!direction,
|
|
5015
|
+
[`${variant}`]: !!variant,
|
|
5016
|
+
dropup: direction === 'dropup' || direction === 'dropup-center',
|
|
5017
|
+
show: this.visible()
|
|
5018
|
+
};
|
|
5019
|
+
});
|
|
5020
|
+
// todo: find better solution
|
|
5021
|
+
this.hostStyle = computed(() => {
|
|
5022
|
+
return this.variant() === 'input-group' ? { display: 'contents' } : {};
|
|
5023
|
+
});
|
|
4963
5024
|
this.dropdownStateSubscribe();
|
|
4964
5025
|
}
|
|
4965
|
-
/**
|
|
4966
|
-
* Optional popper Options object, placement prop takes precedence over
|
|
4967
|
-
* @type Partial<Options>
|
|
4968
|
-
*/
|
|
4969
5026
|
set popperOptions(value) {
|
|
4970
|
-
this.
|
|
5027
|
+
this.#popperOptions.update((popperOptions) => ({ ...popperOptions, ...value }));
|
|
4971
5028
|
}
|
|
4972
5029
|
get popperOptions() {
|
|
4973
|
-
let placement = this.placement;
|
|
4974
|
-
switch (this.direction) {
|
|
5030
|
+
let placement = this.placement();
|
|
5031
|
+
switch (this.direction()) {
|
|
4975
5032
|
case 'dropup': {
|
|
4976
5033
|
placement = 'top-start';
|
|
4977
5034
|
break;
|
|
@@ -4993,42 +5050,13 @@ class DropdownComponent {
|
|
|
4993
5050
|
break;
|
|
4994
5051
|
}
|
|
4995
5052
|
}
|
|
4996
|
-
if (this.alignment === 'end') {
|
|
5053
|
+
if (this.alignment() === 'end') {
|
|
4997
5054
|
placement = 'bottom-end';
|
|
4998
5055
|
}
|
|
4999
|
-
this.
|
|
5000
|
-
return this
|
|
5001
|
-
}
|
|
5002
|
-
/**
|
|
5003
|
-
* Toggle the visibility of dropdown menu component.
|
|
5004
|
-
* @type boolean
|
|
5005
|
-
* @default false
|
|
5006
|
-
*/
|
|
5007
|
-
set visible(value) {
|
|
5008
|
-
const _value = value;
|
|
5009
|
-
if (_value !== this._visible) {
|
|
5010
|
-
this.activeTrap = _value;
|
|
5011
|
-
this._visible = _value;
|
|
5012
|
-
_value ? this.createPopperInstance() : this.destroyPopperInstance();
|
|
5013
|
-
this.visibleChange.emit(_value);
|
|
5014
|
-
}
|
|
5015
|
-
}
|
|
5016
|
-
get visible() {
|
|
5017
|
-
return this._visible;
|
|
5018
|
-
}
|
|
5019
|
-
get hostClasses() {
|
|
5020
|
-
return {
|
|
5021
|
-
dropdown: (this.variant === 'dropdown' || this.variant === 'nav-item') && !this.direction,
|
|
5022
|
-
[`${this.direction}`]: !!this.direction,
|
|
5023
|
-
[`${this.variant}`]: !!this.variant,
|
|
5024
|
-
dropup: this.direction === 'dropup' || this.direction === 'dropup-center',
|
|
5025
|
-
show: this.visible
|
|
5026
|
-
};
|
|
5027
|
-
}
|
|
5028
|
-
// todo: find better solution
|
|
5029
|
-
get hostStyle() {
|
|
5030
|
-
return this.variant === 'input-group' ? { display: 'contents' } : {};
|
|
5056
|
+
this.#popperOptions.update((value) => ({ ...value, placement: placement }));
|
|
5057
|
+
return this.#popperOptions();
|
|
5031
5058
|
}
|
|
5059
|
+
#popperOptions;
|
|
5032
5060
|
onHostClick($event) {
|
|
5033
5061
|
this.clickedTarget = $event.target;
|
|
5034
5062
|
}
|
|
@@ -5040,7 +5068,7 @@ class DropdownComponent {
|
|
|
5040
5068
|
}))
|
|
5041
5069
|
.subscribe((state) => {
|
|
5042
5070
|
if ('visible' in state) {
|
|
5043
|
-
state?.visible === 'toggle' ? this.toggleDropdown() :
|
|
5071
|
+
state?.visible === 'toggle' ? this.toggleDropdown() : this.visible.set(state.visible);
|
|
5044
5072
|
}
|
|
5045
5073
|
});
|
|
5046
5074
|
}
|
|
@@ -5049,7 +5077,7 @@ class DropdownComponent {
|
|
|
5049
5077
|
}
|
|
5050
5078
|
}
|
|
5051
5079
|
toggleDropdown() {
|
|
5052
|
-
this.visible
|
|
5080
|
+
this.visible.update((visible) => !visible);
|
|
5053
5081
|
}
|
|
5054
5082
|
onClick(event) {
|
|
5055
5083
|
if (!this._toggler?.elementRef.nativeElement.contains(event.target?.closest('[cDropdownToggle]'))) {
|
|
@@ -5057,17 +5085,12 @@ class DropdownComponent {
|
|
|
5057
5085
|
}
|
|
5058
5086
|
}
|
|
5059
5087
|
ngAfterContentInit() {
|
|
5060
|
-
if (this.variant === 'nav-item') {
|
|
5088
|
+
if (this.variant() === 'nav-item') {
|
|
5061
5089
|
this.renderer.addClass(this._toggler.elementRef.nativeElement, 'nav-link');
|
|
5062
5090
|
}
|
|
5063
5091
|
}
|
|
5064
5092
|
ngOnInit() {
|
|
5065
|
-
this.setVisibleState(this.visible);
|
|
5066
|
-
}
|
|
5067
|
-
ngOnChanges(changes) {
|
|
5068
|
-
if (changes['visible'] && !changes['visible'].firstChange) {
|
|
5069
|
-
this.setVisibleState(changes['visible'].currentValue);
|
|
5070
|
-
}
|
|
5093
|
+
this.setVisibleState(this.visible());
|
|
5071
5094
|
}
|
|
5072
5095
|
ngOnDestroy() {
|
|
5073
5096
|
this.clearListeners();
|
|
@@ -5084,7 +5107,7 @@ class DropdownComponent {
|
|
|
5084
5107
|
// workaround for popper position calculate (see also: dropdown-menu.component)
|
|
5085
5108
|
this._menu.elementRef.nativeElement.style.visibility = 'hidden';
|
|
5086
5109
|
this._menu.elementRef.nativeElement.style.display = 'block';
|
|
5087
|
-
if (this.popper) {
|
|
5110
|
+
if (this.popper()) {
|
|
5088
5111
|
this.popperInstance = createPopper(this._toggler.elementRef.nativeElement, this._menu.elementRef.nativeElement, { ...this.popperOptions });
|
|
5089
5112
|
}
|
|
5090
5113
|
this.ngZone.run(() => {
|
|
@@ -5110,28 +5133,31 @@ class DropdownComponent {
|
|
|
5110
5133
|
if (this._toggler?.elementRef.nativeElement.contains(event.target)) {
|
|
5111
5134
|
return;
|
|
5112
5135
|
}
|
|
5113
|
-
|
|
5136
|
+
const autoClose = this.autoClose();
|
|
5137
|
+
if (autoClose === true) {
|
|
5114
5138
|
this.setVisibleState(false);
|
|
5115
5139
|
return;
|
|
5116
5140
|
}
|
|
5117
|
-
if (this.clickedTarget === target &&
|
|
5141
|
+
if (this.clickedTarget === target && autoClose === 'inside') {
|
|
5118
5142
|
this.setVisibleState(false);
|
|
5119
5143
|
return;
|
|
5120
5144
|
}
|
|
5121
|
-
if (this.clickedTarget !== target &&
|
|
5145
|
+
if (this.clickedTarget !== target && autoClose === 'outside') {
|
|
5122
5146
|
this.setVisibleState(false);
|
|
5123
5147
|
return;
|
|
5124
5148
|
}
|
|
5125
5149
|
}));
|
|
5126
5150
|
this.listeners.push(this.renderer.listen(this.elementRef.nativeElement, 'keyup', (event) => {
|
|
5127
|
-
if (event.key === 'Escape' && this.autoClose !== false) {
|
|
5151
|
+
if (event.key === 'Escape' && this.autoClose() !== false) {
|
|
5128
5152
|
event.stopPropagation();
|
|
5129
5153
|
this.setVisibleState(false);
|
|
5130
5154
|
return;
|
|
5131
5155
|
}
|
|
5132
5156
|
}));
|
|
5133
5157
|
this.listeners.push(this.renderer.listen(this.document, 'keyup', (event) => {
|
|
5134
|
-
if (event.key === 'Tab' &&
|
|
5158
|
+
if (event.key === 'Tab' &&
|
|
5159
|
+
this.autoClose() !== false &&
|
|
5160
|
+
!this.elementRef.nativeElement.contains(event.target)) {
|
|
5135
5161
|
this.setVisibleState(false);
|
|
5136
5162
|
return;
|
|
5137
5163
|
}
|
|
@@ -5146,35 +5172,19 @@ class DropdownComponent {
|
|
|
5146
5172
|
this.listeners = [];
|
|
5147
5173
|
}
|
|
5148
5174
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DropdownComponent, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: DropdownService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5149
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
5175
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.5", type: DropdownComponent, isStandalone: true, selector: "c-dropdown", inputs: { alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, popper: { classPropertyName: "popper", publicName: "popper", isSignal: true, isRequired: false, transformFunction: null }, popperOptionsInput: { classPropertyName: "popperOptionsInput", publicName: "popperOptions", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, visibleInput: { classPropertyName: "visibleInput", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visibleChange: "visibleChange" }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class": "hostClasses()", "style": "hostStyle()" } }, providers: [DropdownService], queries: [{ propertyName: "_toggler", first: true, predicate: DropdownToggleDirective, descendants: true }, { propertyName: "_menu", first: true, predicate: DropdownMenuDirective, descendants: true }, { propertyName: "_menuElementRef", first: true, predicate: DropdownMenuDirective, descendants: true, read: ElementRef }], exportAs: ["cDropdown"], hostDirectives: [{ directive: ThemeDirective, inputs: ["dark", "dark"] }], ngImport: i0, template: '<ng-content />', isInline: true, styles: [":host-context(.dropdown,.dropup):not(.btn-group){display:block}:host-context(.dropstart,.dropend):not(.btn-group){display:inline-flex}:host-context(html:not([dir=rtl])) :host-context(.input-group) :host:first-child::ng-deep :first-child{border-top-right-radius:0;border-bottom-right-radius:0}:host-context(html:not([dir=rtl])) :host-context(.input-group) :host:first-child::ng-deep :not(:first-child):not(.dropdown-menu){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}:host-context(html:not([dir=rtl])) :host-context(.input-group) :host:first-child::ng-deep :not(:first-child):not(.dropdown-menu):not(:only-of-type){border-top-right-radius:0;border-bottom-right-radius:0}:host-context(html:not([dir=rtl])) :host-context(.input-group) :host:last-child::ng-deep :first-child{border-top-left-radius:0;border-bottom-left-radius:0}:host-context(html:not([dir=rtl])) :host-context(.input-group) :host:last-child::ng-deep :first-child:not(:only-of-type){border-top-right-radius:0;border-bottom-right-radius:0}:host-context(html:not([dir=rtl])) :host-context(.input-group) :host:last-child::ng-deep :not(:first-child):not(.dropdown-menu){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl] .input-group) :host{direction:rtl}:host-context([dir=rtl] .input-group) :host:first-child::ng-deep :first-child{border-top-left-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl] .input-group) :host:first-child::ng-deep :not(:first-child):not(.dropdown-menu){margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0}:host-context([dir=rtl] .input-group) :host:first-child::ng-deep :not(:first-child):not(.dropdown-menu):not(:only-of-type){border-top-left-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl] .input-group) :host:last-child::ng-deep :first-child{border-top-right-radius:0;border-bottom-right-radius:0}:host-context([dir=rtl] .input-group) :host:last-child::ng-deep :first-child:not(:only-of-type){border-top-left-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl] .input-group) :host:last-child::ng-deep :not(:first-child):not(.dropdown-menu){margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0}\n"] }); }
|
|
5150
5176
|
}
|
|
5151
5177
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
5152
5178
|
type: Component,
|
|
5153
|
-
args: [{ selector: 'c-dropdown', template: '<ng-content />', exportAs: 'cDropdown', providers: [DropdownService], hostDirectives: [{ directive: ThemeDirective, inputs: ['dark'] }],
|
|
5179
|
+
args: [{ selector: 'c-dropdown', template: '<ng-content />', exportAs: 'cDropdown', providers: [DropdownService], hostDirectives: [{ directive: ThemeDirective, inputs: ['dark'] }], host: {
|
|
5180
|
+
'[class]': 'hostClasses()',
|
|
5181
|
+
'[style]': 'hostStyle()',
|
|
5182
|
+
'(click)': 'onHostClick($event)'
|
|
5183
|
+
}, styles: [":host-context(.dropdown,.dropup):not(.btn-group){display:block}:host-context(.dropstart,.dropend):not(.btn-group){display:inline-flex}:host-context(html:not([dir=rtl])) :host-context(.input-group) :host:first-child::ng-deep :first-child{border-top-right-radius:0;border-bottom-right-radius:0}:host-context(html:not([dir=rtl])) :host-context(.input-group) :host:first-child::ng-deep :not(:first-child):not(.dropdown-menu){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}:host-context(html:not([dir=rtl])) :host-context(.input-group) :host:first-child::ng-deep :not(:first-child):not(.dropdown-menu):not(:only-of-type){border-top-right-radius:0;border-bottom-right-radius:0}:host-context(html:not([dir=rtl])) :host-context(.input-group) :host:last-child::ng-deep :first-child{border-top-left-radius:0;border-bottom-left-radius:0}:host-context(html:not([dir=rtl])) :host-context(.input-group) :host:last-child::ng-deep :first-child:not(:only-of-type){border-top-right-radius:0;border-bottom-right-radius:0}:host-context(html:not([dir=rtl])) :host-context(.input-group) :host:last-child::ng-deep :not(:first-child):not(.dropdown-menu){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl] .input-group) :host{direction:rtl}:host-context([dir=rtl] .input-group) :host:first-child::ng-deep :first-child{border-top-left-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl] .input-group) :host:first-child::ng-deep :not(:first-child):not(.dropdown-menu){margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0}:host-context([dir=rtl] .input-group) :host:first-child::ng-deep :not(:first-child):not(.dropdown-menu):not(:only-of-type){border-top-left-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl] .input-group) :host:last-child::ng-deep :first-child{border-top-right-radius:0;border-bottom-right-radius:0}:host-context([dir=rtl] .input-group) :host:last-child::ng-deep :first-child:not(:only-of-type){border-top-left-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl] .input-group) :host:last-child::ng-deep :not(:first-child):not(.dropdown-menu){margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0}\n"] }]
|
|
5154
5184
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
5155
5185
|
type: Inject,
|
|
5156
5186
|
args: [DOCUMENT]
|
|
5157
|
-
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: DropdownService }], propDecorators: {
|
|
5158
|
-
type: Input
|
|
5159
|
-
}], autoClose: [{
|
|
5160
|
-
type: Input
|
|
5161
|
-
}], direction: [{
|
|
5162
|
-
type: Input
|
|
5163
|
-
}], placement: [{
|
|
5164
|
-
type: Input
|
|
5165
|
-
}], popper: [{
|
|
5166
|
-
type: Input,
|
|
5167
|
-
args: [{ transform: booleanAttribute }]
|
|
5168
|
-
}], popperOptions: [{
|
|
5169
|
-
type: Input
|
|
5170
|
-
}], variant: [{
|
|
5171
|
-
type: Input
|
|
5172
|
-
}], visible: [{
|
|
5173
|
-
type: Input,
|
|
5174
|
-
args: [{ transform: booleanAttribute }]
|
|
5175
|
-
}], visibleChange: [{
|
|
5176
|
-
type: Output
|
|
5177
|
-
}], _toggler: [{
|
|
5187
|
+
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: DropdownService }], propDecorators: { _toggler: [{
|
|
5178
5188
|
type: ContentChild,
|
|
5179
5189
|
args: [DropdownToggleDirective]
|
|
5180
5190
|
}], _menu: [{
|
|
@@ -5183,15 +5193,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
5183
5193
|
}], _menuElementRef: [{
|
|
5184
5194
|
type: ContentChild,
|
|
5185
5195
|
args: [DropdownMenuDirective, { read: ElementRef }]
|
|
5186
|
-
}], hostClasses: [{
|
|
5187
|
-
type: HostBinding,
|
|
5188
|
-
args: ['class']
|
|
5189
|
-
}], hostStyle: [{
|
|
5190
|
-
type: HostBinding,
|
|
5191
|
-
args: ['style']
|
|
5192
|
-
}], onHostClick: [{
|
|
5193
|
-
type: HostListener,
|
|
5194
|
-
args: ['click', ['$event']]
|
|
5195
5196
|
}] } });
|
|
5196
5197
|
|
|
5197
5198
|
class DropdownItemDirective {
|
|
@@ -5199,90 +5200,90 @@ class DropdownItemDirective {
|
|
|
5199
5200
|
this.#elementRef = inject(ElementRef);
|
|
5200
5201
|
this.#dropdownService = inject(DropdownService);
|
|
5201
5202
|
this.dropdown = inject(DropdownComponent, { optional: true });
|
|
5203
|
+
/**
|
|
5204
|
+
* Set active state to a dropdown-item.
|
|
5205
|
+
* @return boolean
|
|
5206
|
+
* @default undefined
|
|
5207
|
+
*/
|
|
5208
|
+
this.active = input();
|
|
5202
5209
|
/**
|
|
5203
5210
|
* Configure dropdown-item close dropdown behavior.
|
|
5204
|
-
* @
|
|
5211
|
+
* @return boolean
|
|
5205
5212
|
* @default true
|
|
5206
5213
|
*/
|
|
5207
|
-
this.autoClose = true;
|
|
5208
|
-
|
|
5214
|
+
this.autoClose = input(true);
|
|
5215
|
+
/**
|
|
5216
|
+
* Disables a dropdown-item.
|
|
5217
|
+
* @return boolean
|
|
5218
|
+
* @default undefined
|
|
5219
|
+
*/
|
|
5220
|
+
this.disabledInput = input(false, { transform: booleanAttribute, alias: 'disabled' });
|
|
5221
|
+
this.disabledEffect = linkedSignal({
|
|
5222
|
+
source: this.disabledInput,
|
|
5223
|
+
computation: (value) => value
|
|
5224
|
+
});
|
|
5225
|
+
this.ariaCurrent = computed(() => {
|
|
5226
|
+
return this.active() ? 'true' : null;
|
|
5227
|
+
});
|
|
5228
|
+
this.hostClasses = computed(() => {
|
|
5229
|
+
return {
|
|
5230
|
+
'dropdown-item': true,
|
|
5231
|
+
active: this.active(),
|
|
5232
|
+
disabled: this.disabled
|
|
5233
|
+
};
|
|
5234
|
+
});
|
|
5235
|
+
this.tabIndexInput = input(null, { alias: 'tabIndex' });
|
|
5236
|
+
this.tabIndex = linkedSignal({
|
|
5237
|
+
source: this.tabIndexInput,
|
|
5238
|
+
computation: (value) => (this.disabled ? '-1' : value)
|
|
5239
|
+
});
|
|
5209
5240
|
}
|
|
5210
5241
|
#elementRef;
|
|
5211
5242
|
#dropdownService;
|
|
5243
|
+
set disabled(value) {
|
|
5244
|
+
this.disabledEffect.set(value);
|
|
5245
|
+
}
|
|
5246
|
+
get disabled() {
|
|
5247
|
+
return this.disabledEffect();
|
|
5248
|
+
}
|
|
5212
5249
|
focus(origin) {
|
|
5213
5250
|
this.#elementRef?.nativeElement?.focus();
|
|
5214
5251
|
}
|
|
5215
5252
|
getLabel() {
|
|
5216
5253
|
return this.#elementRef?.nativeElement?.textContent.trim();
|
|
5217
5254
|
}
|
|
5218
|
-
get ariaCurrent() {
|
|
5219
|
-
return this.active ? 'true' : null;
|
|
5220
|
-
}
|
|
5221
|
-
get hostClasses() {
|
|
5222
|
-
return {
|
|
5223
|
-
'dropdown-item': true,
|
|
5224
|
-
active: this.active,
|
|
5225
|
-
disabled: this.disabled
|
|
5226
|
-
};
|
|
5227
|
-
}
|
|
5228
|
-
set tabIndex(value) {
|
|
5229
|
-
this._tabIndex = value;
|
|
5230
|
-
}
|
|
5231
|
-
get tabIndex() {
|
|
5232
|
-
return this.disabled ? '-1' : this._tabIndex;
|
|
5233
|
-
}
|
|
5234
|
-
get isDisabled() {
|
|
5235
|
-
return this.disabled || null;
|
|
5236
|
-
}
|
|
5237
5255
|
onClick($event) {
|
|
5238
|
-
|
|
5239
|
-
this.#dropdownService.toggle({ visible: 'toggle', dropdown: this.dropdown });
|
|
5240
|
-
}
|
|
5256
|
+
this.handleInteraction();
|
|
5241
5257
|
}
|
|
5242
5258
|
onKeyUp($event) {
|
|
5243
5259
|
if ($event.key === 'Enter') {
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5260
|
+
this.handleInteraction();
|
|
5261
|
+
}
|
|
5262
|
+
}
|
|
5263
|
+
handleInteraction() {
|
|
5264
|
+
if (this.autoClose()) {
|
|
5265
|
+
this.#dropdownService.toggle({ visible: 'toggle', dropdown: this.dropdown });
|
|
5247
5266
|
}
|
|
5248
5267
|
}
|
|
5249
5268
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DropdownItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5250
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
5269
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.5", type: DropdownItemDirective, isStandalone: true, selector: "[cDropdownItem]", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tabIndexInput: { classPropertyName: "tabIndexInput", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "keyup": "onKeyUp($event)" }, properties: { "class": "hostClasses()", "attr.tabindex": "tabIndex()", "attr.aria-current": "ariaCurrent()", "attr.aria-disabled": "disabled || null" }, classAttribute: "dropdown-item" }, exportAs: ["cDropdownItem"], ngImport: i0 }); }
|
|
5251
5270
|
}
|
|
5252
5271
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DropdownItemDirective, decorators: [{
|
|
5253
5272
|
type: Directive,
|
|
5254
5273
|
args: [{
|
|
5255
5274
|
selector: '[cDropdownItem]',
|
|
5256
5275
|
exportAs: 'cDropdownItem',
|
|
5257
|
-
host: {
|
|
5276
|
+
host: {
|
|
5277
|
+
class: 'dropdown-item',
|
|
5278
|
+
'[class]': 'hostClasses()',
|
|
5279
|
+
'[attr.tabindex]': 'tabIndex()',
|
|
5280
|
+
'[attr.aria-current]': 'ariaCurrent()',
|
|
5281
|
+
'[attr.aria-disabled]': 'disabled || null',
|
|
5282
|
+
'(click)': 'onClick($event)',
|
|
5283
|
+
'(keyup)': 'onKeyUp($event)'
|
|
5284
|
+
}
|
|
5258
5285
|
}]
|
|
5259
|
-
}]
|
|
5260
|
-
type: Input
|
|
5261
|
-
}], autoClose: [{
|
|
5262
|
-
type: Input
|
|
5263
|
-
}], disabled: [{
|
|
5264
|
-
type: Input
|
|
5265
|
-
}], ariaCurrent: [{
|
|
5266
|
-
type: HostBinding,
|
|
5267
|
-
args: ['attr.aria-current']
|
|
5268
|
-
}], hostClasses: [{
|
|
5269
|
-
type: HostBinding,
|
|
5270
|
-
args: ['class']
|
|
5271
|
-
}], tabIndex: [{
|
|
5272
|
-
type: HostBinding,
|
|
5273
|
-
args: ['attr.tabindex']
|
|
5274
|
-
}, {
|
|
5275
|
-
type: Input
|
|
5276
|
-
}], isDisabled: [{
|
|
5277
|
-
type: HostBinding,
|
|
5278
|
-
args: ['attr.aria-disabled']
|
|
5279
|
-
}], onClick: [{
|
|
5280
|
-
type: HostListener,
|
|
5281
|
-
args: ['click', ['$event']]
|
|
5282
|
-
}], onKeyUp: [{
|
|
5283
|
-
type: HostListener,
|
|
5284
|
-
args: ['keyup', ['$event']]
|
|
5285
|
-
}] } });
|
|
5286
|
+
}] });
|
|
5286
5287
|
|
|
5287
5288
|
class DropdownItemPlainDirective {
|
|
5288
5289
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DropdownItemPlainDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -5300,68 +5301,61 @@ class DropdownCloseDirective {
|
|
|
5300
5301
|
constructor() {
|
|
5301
5302
|
this.#dropdownService = inject(DropdownService);
|
|
5302
5303
|
this.dropdown = inject(DropdownComponent, { optional: true });
|
|
5303
|
-
|
|
5304
|
+
/**
|
|
5305
|
+
* Disables a dropdown-close directive.
|
|
5306
|
+
* @return boolean
|
|
5307
|
+
* @default false
|
|
5308
|
+
*/
|
|
5309
|
+
this.disabledInput = input(false, { transform: booleanAttribute, alias: 'disabled' });
|
|
5310
|
+
this.disabled = linkedSignal({
|
|
5311
|
+
source: this.disabledInput,
|
|
5312
|
+
computation: (value) => value || null
|
|
5313
|
+
});
|
|
5314
|
+
this.dropdownComponent = input();
|
|
5315
|
+
this.tabIndexInput = input(null, { alias: 'tabIndex' });
|
|
5316
|
+
this.tabIndex = linkedSignal({
|
|
5317
|
+
source: this.tabIndexInput,
|
|
5318
|
+
computation: (value) => (this.disabled() ? '-1' : value)
|
|
5319
|
+
});
|
|
5304
5320
|
}
|
|
5305
5321
|
#dropdownService;
|
|
5306
5322
|
ngAfterViewInit() {
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
this
|
|
5323
|
+
const dropdownComponent = this.dropdownComponent();
|
|
5324
|
+
if (dropdownComponent) {
|
|
5325
|
+
this.dropdown = dropdownComponent;
|
|
5326
|
+
this.#dropdownService = dropdownComponent?.dropdownService;
|
|
5310
5327
|
}
|
|
5311
5328
|
}
|
|
5312
|
-
get hostClasses() {
|
|
5313
|
-
return {
|
|
5314
|
-
disabled: this.disabled
|
|
5315
|
-
};
|
|
5316
|
-
}
|
|
5317
|
-
set tabIndex(value) {
|
|
5318
|
-
this._tabIndex = value;
|
|
5319
|
-
}
|
|
5320
|
-
get tabIndex() {
|
|
5321
|
-
return this.disabled ? '-1' : this._tabIndex;
|
|
5322
|
-
}
|
|
5323
|
-
get isDisabled() {
|
|
5324
|
-
return this.disabled || null;
|
|
5325
|
-
}
|
|
5326
5329
|
onClick($event) {
|
|
5327
|
-
|
|
5330
|
+
this.handleToggle();
|
|
5328
5331
|
}
|
|
5329
5332
|
onKeyUp($event) {
|
|
5330
5333
|
if ($event.key === 'Enter') {
|
|
5331
|
-
|
|
5334
|
+
this.handleToggle();
|
|
5335
|
+
}
|
|
5336
|
+
}
|
|
5337
|
+
handleToggle() {
|
|
5338
|
+
if (!this.disabled()) {
|
|
5339
|
+
this.#dropdownService.toggle({ visible: false, dropdown: this.dropdown });
|
|
5332
5340
|
}
|
|
5333
5341
|
}
|
|
5334
5342
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DropdownCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5335
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
5343
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.5", type: DropdownCloseDirective, isStandalone: true, selector: "[cDropdownClose]", inputs: { disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, dropdownComponent: { classPropertyName: "dropdownComponent", publicName: "dropdownComponent", isSignal: true, isRequired: false, transformFunction: null }, tabIndexInput: { classPropertyName: "tabIndexInput", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "keyup": "onKeyUp($event)" }, properties: { "class.disabled": "disabled()", "attr.aria-disabled": "disabled() || null", "attr.tabindex": "tabIndex()" } }, exportAs: ["cDropdownClose"], ngImport: i0 }); }
|
|
5336
5344
|
}
|
|
5337
5345
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DropdownCloseDirective, decorators: [{
|
|
5338
5346
|
type: Directive,
|
|
5339
5347
|
args: [{
|
|
5340
5348
|
selector: '[cDropdownClose]',
|
|
5341
|
-
exportAs: 'cDropdownClose'
|
|
5349
|
+
exportAs: 'cDropdownClose',
|
|
5350
|
+
host: {
|
|
5351
|
+
'[class.disabled]': 'disabled()',
|
|
5352
|
+
'[attr.aria-disabled]': 'disabled() || null',
|
|
5353
|
+
'[attr.tabindex]': 'tabIndex()',
|
|
5354
|
+
'(click)': 'onClick($event)',
|
|
5355
|
+
'(keyup)': 'onKeyUp($event)'
|
|
5356
|
+
}
|
|
5342
5357
|
}]
|
|
5343
|
-
}]
|
|
5344
|
-
type: Input
|
|
5345
|
-
}], dropdownComponent: [{
|
|
5346
|
-
type: Input
|
|
5347
|
-
}], hostClasses: [{
|
|
5348
|
-
type: HostBinding,
|
|
5349
|
-
args: ['class']
|
|
5350
|
-
}], tabIndex: [{
|
|
5351
|
-
type: HostBinding,
|
|
5352
|
-
args: ['attr.tabindex']
|
|
5353
|
-
}, {
|
|
5354
|
-
type: Input
|
|
5355
|
-
}], isDisabled: [{
|
|
5356
|
-
type: HostBinding,
|
|
5357
|
-
args: ['attr.aria-disabled']
|
|
5358
|
-
}], onClick: [{
|
|
5359
|
-
type: HostListener,
|
|
5360
|
-
args: ['click', ['$event']]
|
|
5361
|
-
}], onKeyUp: [{
|
|
5362
|
-
type: HostListener,
|
|
5363
|
-
args: ['keyup', ['$event']]
|
|
5364
|
-
}] } });
|
|
5358
|
+
}] });
|
|
5365
5359
|
|
|
5366
5360
|
class DropdownModule {
|
|
5367
5361
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: DropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -7167,7 +7161,7 @@ class TimePickerComponent {
|
|
|
7167
7161
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
7168
7162
|
multi: true
|
|
7169
7163
|
}
|
|
7170
|
-
], queries: [{ propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true }], viewQueries: [{ propertyName: "dropdownRef", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }], exportAs: ["cTimePicker"], usesOnChanges: true, ngImport: i0, template: "@if (variant === 'select') {\n <div class=\"date-picker-timepickers\">\n <div class=\"picker time-picker\">\n <div [formGroup]=\"selectTime\" [ngClass]=\"timePickerClasses\" class=\"time-picker-body\">\n <span class=\"time-picker-inline-icon\"></span>\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectHours\">\n @for (hour of listOfHours12; track hour; let i = $index) {\n <option [attr.disabled]=\"hour.disabled || null\" [ngValue]=\"hour.value\">\n {{ hour.label }}\n </option>\n }\n </select>\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectMinutes\">\n @for (minute of listOfMinutes; track minute; let i = $index) {\n <option [attr.disabled]=\"minute.disabled || null\" [ngValue]=\"minute.value\">\n {{ minute.label }}\n </option>\n }\n </select>\n @if (seconds) {\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectSeconds\">\n @for (second of listOfSeconds; track second; let i = $index) {\n <option [attr.disabled]=\"second.disabled || null\" [ngValue]=\"second.value\">\n {{ second.label }}\n </option>\n }\n </select>\n }\n @if (hour12) {\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectDayPeriod\">\n @for (dayPeriod of dayPeriods; track dayPeriod) {\n <option [ngValue]=\"dayPeriod.value\" class=\"time-picker-roll-cell\">\n {{ dayPeriod.label }}\n </option>\n }\n </select>\n }\n </div>\n </div>\n </div>\n}\n@if (variant === 'roll') {\n <c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" [ngClass]=\"timePickerClasses\" [visible]=\"visible\">\n <div [caret]=\"false\" cDropdownToggle class=\"time-picker-input-group\">\n <input (blur)=\"handleBlur($event);\"\n (change)=\"handleTimeInputChange($event)\"\n (focus)=\"handleFocus($event)\"\n [attr.disabled]=\"disabled ?? dropdown.visible ? '' : null\"\n [attr.pattern]=\"hour12 ? '(((0[1-9])|(1[0-2])):([0-5])([0-9])\\\\s(A|P)M)' : '([01]?[0-9]|2[0-3]):[0-5][0-9]'\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n [formControl]=\"timeInput\"\n [placeholder]=\"placeholder\"\n [readonly]=\"inputReadOnly ?? null\"\n class=\"time-picker-input\"\n >\n @if (indicator) {\n <div class=\"time-picker-indicator\"></div>\n }\n @if (cleaner && time && !disabled) {\n <div (click)=\"!disabled && handleClear($event)\" class=\"time-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" cDropdownMenu class=\"time-picker-dropdown py-0\">\n <div class=\"time-picker-body time-picker-roll\" style=\"position: relative;\">\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'hour')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfHours12\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"hour\"\n role=\"listbox\"\n />\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'minute')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfMinutes\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"minute\"\n role=\"listbox\"\n />\n @if (seconds) {\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'second')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfSeconds\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"second\"\n role=\"listbox\"\n />\n }\n @if (hour12) {\n <c-time-picker-roll-am-pm\n (selectedChange)=\"handleSelectDayPeriodChange($event)\"\n [disabled]=\"disabled\"\n [elements]=\"dayPeriods\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"dayPeriod\"\n role=\"listbox\"\n />\n }\n </div>\n @if (templates?.timePickerFooter) {\n <div class=\"time-picker-footer\">\n <ng-container *ngTemplateOutlet=\"templates?.timePickerFooter; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n </c-dropdown>\n}\n", styles: [".disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible"], exportAs: ["cDropdownMenu"] }, { kind: "directive", type: FormSelectDirective, selector: "select[cSelect]", inputs: ["sizing", "valid"] }, { kind: "component", type: TimePickerRollColComponent, selector: "c-time-picker-roll-col", inputs: ["disabled", "elements", "onClick", "selected", "refresh"], outputs: ["selectedChange"], exportAs: ["cTimePickerRollCol"] }, { kind: "component", type: TimePickerRollAmPmComponent, selector: "c-time-picker-roll-am-pm", inputs: ["disabled", "elements", "onClick", "selected", "refresh"], outputs: ["selectedChange"] }] }); }
|
|
7164
|
+
], queries: [{ propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true }], viewQueries: [{ propertyName: "dropdownRef", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }], exportAs: ["cTimePicker"], usesOnChanges: true, ngImport: i0, template: "@if (variant === 'select') {\n <div class=\"date-picker-timepickers\">\n <div class=\"picker time-picker\">\n <div [formGroup]=\"selectTime\" [ngClass]=\"timePickerClasses\" class=\"time-picker-body\">\n <span class=\"time-picker-inline-icon\"></span>\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectHours\">\n @for (hour of listOfHours12; track hour; let i = $index) {\n <option [attr.disabled]=\"hour.disabled || null\" [ngValue]=\"hour.value\">\n {{ hour.label }}\n </option>\n }\n </select>\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectMinutes\">\n @for (minute of listOfMinutes; track minute; let i = $index) {\n <option [attr.disabled]=\"minute.disabled || null\" [ngValue]=\"minute.value\">\n {{ minute.label }}\n </option>\n }\n </select>\n @if (seconds) {\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectSeconds\">\n @for (second of listOfSeconds; track second; let i = $index) {\n <option [attr.disabled]=\"second.disabled || null\" [ngValue]=\"second.value\">\n {{ second.label }}\n </option>\n }\n </select>\n }\n @if (hour12) {\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectDayPeriod\">\n @for (dayPeriod of dayPeriods; track dayPeriod) {\n <option [ngValue]=\"dayPeriod.value\" class=\"time-picker-roll-cell\">\n {{ dayPeriod.label }}\n </option>\n }\n </select>\n }\n </div>\n </div>\n </div>\n}\n@if (variant === 'roll') {\n <c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" [ngClass]=\"timePickerClasses\" [visible]=\"visible\">\n <div [caret]=\"false\" cDropdownToggle class=\"time-picker-input-group\">\n <input (blur)=\"handleBlur($event);\"\n (change)=\"handleTimeInputChange($event)\"\n (focus)=\"handleFocus($event)\"\n [attr.disabled]=\"disabled ?? dropdown.visible() ? '' : null\"\n [attr.pattern]=\"hour12 ? '(((0[1-9])|(1[0-2])):([0-5])([0-9])\\\\s(A|P)M)' : '([01]?[0-9]|2[0-3]):[0-5][0-9]'\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n [formControl]=\"timeInput\"\n [placeholder]=\"placeholder\"\n [readonly]=\"inputReadOnly ?? null\"\n class=\"time-picker-input\"\n >\n @if (indicator) {\n <div class=\"time-picker-indicator\"></div>\n }\n @if (cleaner && time && !disabled) {\n <div (click)=\"!disabled && handleClear($event)\" class=\"time-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" cDropdownMenu class=\"time-picker-dropdown py-0\">\n <div class=\"time-picker-body time-picker-roll\" style=\"position: relative;\">\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'hour')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfHours12\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"hour\"\n role=\"listbox\"\n />\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'minute')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfMinutes\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"minute\"\n role=\"listbox\"\n />\n @if (seconds) {\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'second')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfSeconds\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"second\"\n role=\"listbox\"\n />\n }\n @if (hour12) {\n <c-time-picker-roll-am-pm\n (selectedChange)=\"handleSelectDayPeriodChange($event)\"\n [disabled]=\"disabled\"\n [elements]=\"dayPeriods\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"dayPeriod\"\n role=\"listbox\"\n />\n }\n </div>\n @if (templates?.timePickerFooter) {\n <div class=\"time-picker-footer\">\n <ng-container *ngTemplateOutlet=\"templates?.timePickerFooter; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n </c-dropdown>\n}\n", styles: [".disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible"], exportAs: ["cDropdownMenu"] }, { kind: "directive", type: FormSelectDirective, selector: "select[cSelect]", inputs: ["sizing", "valid"] }, { kind: "component", type: TimePickerRollColComponent, selector: "c-time-picker-roll-col", inputs: ["disabled", "elements", "onClick", "selected", "refresh"], outputs: ["selectedChange"], exportAs: ["cTimePickerRollCol"] }, { kind: "component", type: TimePickerRollAmPmComponent, selector: "c-time-picker-roll-am-pm", inputs: ["disabled", "elements", "onClick", "selected", "refresh"], outputs: ["selectedChange"] }] }); }
|
|
7171
7165
|
}
|
|
7172
7166
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
7173
7167
|
type: Component,
|
|
@@ -7187,7 +7181,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
7187
7181
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
7188
7182
|
multi: true
|
|
7189
7183
|
}
|
|
7190
|
-
], template: "@if (variant === 'select') {\n <div class=\"date-picker-timepickers\">\n <div class=\"picker time-picker\">\n <div [formGroup]=\"selectTime\" [ngClass]=\"timePickerClasses\" class=\"time-picker-body\">\n <span class=\"time-picker-inline-icon\"></span>\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectHours\">\n @for (hour of listOfHours12; track hour; let i = $index) {\n <option [attr.disabled]=\"hour.disabled || null\" [ngValue]=\"hour.value\">\n {{ hour.label }}\n </option>\n }\n </select>\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectMinutes\">\n @for (minute of listOfMinutes; track minute; let i = $index) {\n <option [attr.disabled]=\"minute.disabled || null\" [ngValue]=\"minute.value\">\n {{ minute.label }}\n </option>\n }\n </select>\n @if (seconds) {\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectSeconds\">\n @for (second of listOfSeconds; track second; let i = $index) {\n <option [attr.disabled]=\"second.disabled || null\" [ngValue]=\"second.value\">\n {{ second.label }}\n </option>\n }\n </select>\n }\n @if (hour12) {\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectDayPeriod\">\n @for (dayPeriod of dayPeriods; track dayPeriod) {\n <option [ngValue]=\"dayPeriod.value\" class=\"time-picker-roll-cell\">\n {{ dayPeriod.label }}\n </option>\n }\n </select>\n }\n </div>\n </div>\n </div>\n}\n@if (variant === 'roll') {\n <c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" [ngClass]=\"timePickerClasses\" [visible]=\"visible\">\n <div [caret]=\"false\" cDropdownToggle class=\"time-picker-input-group\">\n <input (blur)=\"handleBlur($event);\"\n (change)=\"handleTimeInputChange($event)\"\n (focus)=\"handleFocus($event)\"\n [attr.disabled]=\"disabled ?? dropdown.visible ? '' : null\"\n [attr.pattern]=\"hour12 ? '(((0[1-9])|(1[0-2])):([0-5])([0-9])\\\\s(A|P)M)' : '([01]?[0-9]|2[0-3]):[0-5][0-9]'\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n [formControl]=\"timeInput\"\n [placeholder]=\"placeholder\"\n [readonly]=\"inputReadOnly ?? null\"\n class=\"time-picker-input\"\n >\n @if (indicator) {\n <div class=\"time-picker-indicator\"></div>\n }\n @if (cleaner && time && !disabled) {\n <div (click)=\"!disabled && handleClear($event)\" class=\"time-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" cDropdownMenu class=\"time-picker-dropdown py-0\">\n <div class=\"time-picker-body time-picker-roll\" style=\"position: relative;\">\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'hour')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfHours12\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"hour\"\n role=\"listbox\"\n />\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'minute')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfMinutes\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"minute\"\n role=\"listbox\"\n />\n @if (seconds) {\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'second')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfSeconds\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"second\"\n role=\"listbox\"\n />\n }\n @if (hour12) {\n <c-time-picker-roll-am-pm\n (selectedChange)=\"handleSelectDayPeriodChange($event)\"\n [disabled]=\"disabled\"\n [elements]=\"dayPeriods\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"dayPeriod\"\n role=\"listbox\"\n />\n }\n </div>\n @if (templates?.timePickerFooter) {\n <div class=\"time-picker-footer\">\n <ng-container *ngTemplateOutlet=\"templates?.timePickerFooter; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n </c-dropdown>\n}\n", styles: [".disabled{pointer-events:none}\n"] }]
|
|
7184
|
+
], template: "@if (variant === 'select') {\n <div class=\"date-picker-timepickers\">\n <div class=\"picker time-picker\">\n <div [formGroup]=\"selectTime\" [ngClass]=\"timePickerClasses\" class=\"time-picker-body\">\n <span class=\"time-picker-inline-icon\"></span>\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectHours\">\n @for (hour of listOfHours12; track hour; let i = $index) {\n <option [attr.disabled]=\"hour.disabled || null\" [ngValue]=\"hour.value\">\n {{ hour.label }}\n </option>\n }\n </select>\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectMinutes\">\n @for (minute of listOfMinutes; track minute; let i = $index) {\n <option [attr.disabled]=\"minute.disabled || null\" [ngValue]=\"minute.value\">\n {{ minute.label }}\n </option>\n }\n </select>\n @if (seconds) {\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectSeconds\">\n @for (second of listOfSeconds; track second; let i = $index) {\n <option [attr.disabled]=\"second.disabled || null\" [ngValue]=\"second.value\">\n {{ second.label }}\n </option>\n }\n </select>\n }\n @if (hour12) {\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectDayPeriod\">\n @for (dayPeriod of dayPeriods; track dayPeriod) {\n <option [ngValue]=\"dayPeriod.value\" class=\"time-picker-roll-cell\">\n {{ dayPeriod.label }}\n </option>\n }\n </select>\n }\n </div>\n </div>\n </div>\n}\n@if (variant === 'roll') {\n <c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" [ngClass]=\"timePickerClasses\" [visible]=\"visible\">\n <div [caret]=\"false\" cDropdownToggle class=\"time-picker-input-group\">\n <input (blur)=\"handleBlur($event);\"\n (change)=\"handleTimeInputChange($event)\"\n (focus)=\"handleFocus($event)\"\n [attr.disabled]=\"disabled ?? dropdown.visible() ? '' : null\"\n [attr.pattern]=\"hour12 ? '(((0[1-9])|(1[0-2])):([0-5])([0-9])\\\\s(A|P)M)' : '([01]?[0-9]|2[0-3]):[0-5][0-9]'\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n [formControl]=\"timeInput\"\n [placeholder]=\"placeholder\"\n [readonly]=\"inputReadOnly ?? null\"\n class=\"time-picker-input\"\n >\n @if (indicator) {\n <div class=\"time-picker-indicator\"></div>\n }\n @if (cleaner && time && !disabled) {\n <div (click)=\"!disabled && handleClear($event)\" class=\"time-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" cDropdownMenu class=\"time-picker-dropdown py-0\">\n <div class=\"time-picker-body time-picker-roll\" style=\"position: relative;\">\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'hour')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfHours12\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"hour\"\n role=\"listbox\"\n />\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'minute')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfMinutes\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"minute\"\n role=\"listbox\"\n />\n @if (seconds) {\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'second')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfSeconds\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"second\"\n role=\"listbox\"\n />\n }\n @if (hour12) {\n <c-time-picker-roll-am-pm\n (selectedChange)=\"handleSelectDayPeriodChange($event)\"\n [disabled]=\"disabled\"\n [elements]=\"dayPeriods\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"dayPeriod\"\n role=\"listbox\"\n />\n }\n </div>\n @if (templates?.timePickerFooter) {\n <div class=\"time-picker-footer\">\n <ng-container *ngTemplateOutlet=\"templates?.timePickerFooter; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n </c-dropdown>\n}\n", styles: [".disabled{pointer-events:none}\n"] }]
|
|
7191
7185
|
}], propDecorators: { cleaner: [{
|
|
7192
7186
|
type: Input,
|
|
7193
7187
|
args: [{ transform: booleanAttribute }]
|
|
@@ -10585,7 +10579,7 @@ class MultiSelectComponent {
|
|
|
10585
10579
|
useExisting: forwardRef(() => MultiSelectComponent),
|
|
10586
10580
|
multi: true
|
|
10587
10581
|
}
|
|
10588
|
-
], queries: [{ propertyName: "multiSelectOptionsContent", predicate: MultiSelectOptionComponent, descendants: true }, { propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true }], viewQueries: [{ propertyName: "optionsElementRef", first: true, predicate: ["options"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "dropdownMenu", first: true, predicate: DropdownMenuDirective, descendants: true, read: ElementRef }, { propertyName: "dropdown", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }, { propertyName: "dropdownToggle", first: true, predicate: DropdownToggleDirective, descendants: true, read: ElementRef }, { propertyName: "multiSelectOptionsView", predicate: MultiSelectOptionComponent, descendants: true }, { propertyName: "scrollViewportView", predicate: ["scrollViewport"], descendants: true }], exportAs: ["cMultiSelect"], usesOnChanges: true, ngImport: i0, template: "<c-dropdown #dropdown=\"cDropdown\"\n [(visible)]=\"visible\"\n [autoClose]=\"'outside'\"\n [ngClass]=\"multiselectClasses\"\n [popperOptions]=\"popperOptions\">\n <div #dropdownToggle=\"cDropdownToggle\" [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle role=\"button\"\n class=\"form-multi-select-input-group\">\n <span\n [ngClass]=\"{'form-multi-select-selection': true, 'form-multi-select-selection-tags': (selectionType === 'tags' && selectedOptions.length)}\">\n @if (selectionType === 'tags') {\n @if (optionsSelected$ | async; as optionTags) {\n @for (option of optionTags; track option.value; let i = $index) {\n <c-multi-select-tag\n (remove)=\"handleTagRemove($event)\"\n [disabled]=\"option.disabled ?? false\"\n [label]=\"option.label ?? option.value?.toString()\"\n [option]=\"option\"\n [value]=\"option.value\"\n class=\"form-multi-select-tag text-truncate\"\n tabindex=\"-1\"\n />\n }\n }\n } @else if (selectionType === 'text' && !!selectedOptions.length) {\n @for (option of selectedOptions; track option.value; let i = $index, last = $last) {\n <span class=\"form-multi-select-text text-truncate\">{{ option.label }}{{ last ? ' ' : ', ' }}</span>\n }\n }\n @if (!search) {\n <span class=\"text-placeholder text-truncate\">\n {{ optionsSelected.size === 0 ? placeholder : counterPlaceholderText }}\n </span>\n }\n @if (search) {\n <input\n #inputElement\n (keydown)=\"handleSearchKeyDown($event)\"\n (valueChange)=\"handleSearchValueChange($event)\"\n [attr.placeholder]=\"selectedOptions.length === 0 ? placeholder : counterPlaceholderText\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search), 'text-truncate': true }\"\n [ngModel]=\"searchValue\"\n [value]=\"searchValue\"\n autocomplete=\"off\"\n cMultiSelectSearch\n size=\"2\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n type=\"text\"\n >\n }\n </span>\n <div class=\"form-multi-select-buttons\">\n @if (!!cleaner && optionsSelected.size > 0 && !disabled) {\n <button\n (click)=\"clearAllOptions($event)\"\n [disabled]=\"disabled || (!isDropdownVisible && cleaner !== 'active')\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-cleaner\"\n type=\"button\"\n ></button>\n }\n <button (click)=\"handleIndicatorClick($event)\"\n [disabled]=\"disabled\"\n class=\"form-multi-select-indicator\"\n type=\"button\">\n </button>\n </div>\n </div>\n @if (!disabled) {\n <div #dropdownMenu=\"cDropdownMenu\" [visible]=\"dropdown.visible\" cDropdownMenu\n class=\"form-multi-select-dropdown\" role=\"menu\">\n @if (visibleOptions() && options.length > 0) {\n @if (selectAll && multiple && !virtualScroller) {\n <button\n (click)=\"selectAllOptions()\"\n class=\"form-multi-select-all\"\n type=\"button\"\n tabindex=\"0\"\n >\n {{ selectAllLabel }}\n </button>\n }\n }\n @if ((visibleOptions() && options.length > 0) || isLoading()) {\n <ng-container *ngTemplateOutlet=\"virtualScroller ? multiselectVirtualScroller : multiselectOptionsDiv\" />\n } @else {\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n }\n @if (isLoading()) {\n <c-element-cover [ngStyle]=\"{'border-radius': '6px', 'z-index': 2}\" />\n }\n </div>\n }\n</c-dropdown>\n\n<ng-template #multiselectVirtualScroller>\n @defer (on immediate) {\n @if ((optionsArray$ | async); as optionsArray) {\n <cdk-virtual-scroll-viewport\n #scrollViewport\n (scrolledIndexChange)=\"handleScrolledIndexChange($event, scrollViewport)\"\n [itemSize]=\"itemSize\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'height.px': optionsMaxHeight, 'maxHeight.px': optionsMaxHeight, 'minWidth.px': minWidth(), overflowX: 'hidden' } : { 'minWidth.px': minWidth(), overflowX: 'hidden'}\"\n maxBufferPx=\"{{itemSize * visibleItems}}\"\n minBufferPx=\"{{itemSize * visibleItems}}\"\n class=\"form-multi-select-options\"\n tabindex=\"-1\"\n >\n <ng-container\n #cdkVirtualFor\n *cdkVirtualFor=\"let option of optionsArray; trackBy: trackByFn; templateCacheSize: 0; even as even; odd as odd; index as index; count as count; first as first; last as last;\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n />\n </cdk-virtual-scroll-viewport>\n }\n }\n</ng-template>\n\n<ng-template #multiselectOptionsDiv>\n <div\n [ngClass]=\"{'form-multi-select-options': visibleOptions()}\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflowY: 'scroll' } : {}\"\n >\n <ng-content />\n <ng-container [ngTemplateOutlet]=\"userOptionsTemplate\" />\n </div>\n</ng-template>\n\n<ng-template #defaultMultiSelectOptionTemplate let-option>\n <c-multi-select-option\n [disabled]=\"option.disabled\"\n [label]=\"option.label\"\n [text]=\"option.text\"\n [value]=\"option.value\"\n [visible]=\"option.visible\"\n >\n {{ option.text }}\n </c-multi-select-option>\n</ng-template>\n\n<ng-template #userOptionsTemplate>\n @for (option of userOptionsArray$ | async; track option; let even = $even, odd = $odd, index = $index, count = $count, first = $first, last = $last) {\n <ng-container\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n />\n }\n</ng-template>\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{outline:none;box-shadow:0 0 0 var(--cui-focus-ring-width) var(--cui-focus-ring-color);border-radius:var(--cui-border-radius, .375rem)}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){display:none}:host .form-multi-select .form-multi-select-selection{display:flex;flex:1 1 auto;flex-wrap:wrap}:host .form-multi-select .form-multi-select-selection .text-placeholder,:host .form-multi-select .form-multi-select-selection .form-multi-select-search::placeholder{color:var(--cui-form-multi-select-color);opacity:.8}:host .form-multi-select .form-multi-select-search[size]{display:flex}:host ::ng-deep .cdk-virtual-scroll-content-wrapper{padding:var(--cui-form-multi-select-options-padding-y) var(--cui-form-multi-select-options-padding-x);font-size:1rem;color:var(--cui-form-multi-select-options-color)}:host .cdk-virtual-scroll-viewport{width:var(--cui-dropdown-min-width)}:host .dropdown-menu{--cui-dropdown-padding-y: 0}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MultiSelectTagComponent, selector: "c-multi-select-tag", inputs: ["option", "disabled", "label", "value"], outputs: ["remove"] }, { kind: "component", type: MultiSelectOptionComponent, selector: "c-multi-select-option", inputs: ["optionsStyle", "label", "text", "visible", "disabled", "selected", "value", "active", "role"], outputs: ["selectedChange", "focusChange"], exportAs: ["cMultiSelectOption"] }, { kind: "directive", type: MultiSelectSearchDirective, selector: "[cMultiSelectSearch]", inputs: ["delay", "value"], outputs: ["valueChange"], exportAs: ["cMultiSelectSearch"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible"], exportAs: ["cDropdownMenu"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "component", type: ElementCoverComponent, selector: "c-element-cover, [cElementCover]", inputs: ["boundaries", "opacity"] }], deferBlockDependencies: [() => [AsyncPipe,
|
|
10582
|
+
], queries: [{ propertyName: "multiSelectOptionsContent", predicate: MultiSelectOptionComponent, descendants: true }, { propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true }], viewQueries: [{ propertyName: "optionsElementRef", first: true, predicate: ["options"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "dropdownMenu", first: true, predicate: DropdownMenuDirective, descendants: true, read: ElementRef }, { propertyName: "dropdown", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }, { propertyName: "dropdownToggle", first: true, predicate: DropdownToggleDirective, descendants: true, read: ElementRef }, { propertyName: "multiSelectOptionsView", predicate: MultiSelectOptionComponent, descendants: true }, { propertyName: "scrollViewportView", predicate: ["scrollViewport"], descendants: true }], exportAs: ["cMultiSelect"], usesOnChanges: true, ngImport: i0, template: "<c-dropdown #dropdown=\"cDropdown\"\n [(visible)]=\"visible\"\n [autoClose]=\"'outside'\"\n [ngClass]=\"multiselectClasses\"\n [popperOptions]=\"popperOptions\">\n <div #dropdownToggle=\"cDropdownToggle\" [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle role=\"button\"\n class=\"form-multi-select-input-group\">\n <span\n [ngClass]=\"{'form-multi-select-selection': true, 'form-multi-select-selection-tags': (selectionType === 'tags' && selectedOptions.length)}\">\n @if (selectionType === 'tags') {\n @if (optionsSelected$ | async; as optionTags) {\n @for (option of optionTags; track option.value; let i = $index) {\n <c-multi-select-tag\n (remove)=\"handleTagRemove($event)\"\n [disabled]=\"option.disabled ?? false\"\n [label]=\"option.label ?? option.value?.toString()\"\n [option]=\"option\"\n [value]=\"option.value\"\n class=\"form-multi-select-tag text-truncate\"\n tabindex=\"-1\"\n />\n }\n }\n } @else if (selectionType === 'text' && !!selectedOptions.length) {\n @for (option of selectedOptions; track option.value; let i = $index, last = $last) {\n <span class=\"form-multi-select-text text-truncate\">{{ option.label }}{{ last ? ' ' : ', ' }}</span>\n }\n }\n @if (!search) {\n <span class=\"text-placeholder text-truncate\">\n {{ optionsSelected.size === 0 ? placeholder : counterPlaceholderText }}\n </span>\n }\n @if (search) {\n <input\n #inputElement\n (keydown)=\"handleSearchKeyDown($event)\"\n (valueChange)=\"handleSearchValueChange($event)\"\n [attr.placeholder]=\"selectedOptions.length === 0 ? placeholder : counterPlaceholderText\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search), 'text-truncate': true }\"\n [ngModel]=\"searchValue\"\n [value]=\"searchValue\"\n autocomplete=\"off\"\n cMultiSelectSearch\n size=\"2\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n type=\"text\"\n >\n }\n </span>\n <div class=\"form-multi-select-buttons\">\n @if (!!cleaner && optionsSelected.size > 0 && !disabled) {\n <button\n (click)=\"clearAllOptions($event)\"\n [disabled]=\"disabled || (!isDropdownVisible && cleaner !== 'active')\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-cleaner\"\n type=\"button\"\n ></button>\n }\n <button (click)=\"handleIndicatorClick($event)\"\n [disabled]=\"disabled\"\n class=\"form-multi-select-indicator\"\n type=\"button\">\n </button>\n </div>\n </div>\n @if (!disabled) {\n <div #dropdownMenu=\"cDropdownMenu\" [visible]=\"dropdown.visible()\" cDropdownMenu\n class=\"form-multi-select-dropdown\" role=\"menu\">\n @if (visibleOptions() && options.length > 0) {\n @if (selectAll && multiple && !virtualScroller) {\n <button\n (click)=\"selectAllOptions()\"\n class=\"form-multi-select-all\"\n type=\"button\"\n tabindex=\"0\"\n >\n {{ selectAllLabel }}\n </button>\n }\n }\n @if ((visibleOptions() && options.length > 0) || isLoading()) {\n <ng-container *ngTemplateOutlet=\"virtualScroller ? multiselectVirtualScroller : multiselectOptionsDiv\" />\n } @else {\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n }\n @if (isLoading()) {\n <c-element-cover [ngStyle]=\"{'border-radius': '6px', 'z-index': 2}\" />\n }\n </div>\n }\n</c-dropdown>\n\n<ng-template #multiselectVirtualScroller>\n @defer (on immediate) {\n @if ((optionsArray$ | async); as optionsArray) {\n <cdk-virtual-scroll-viewport\n #scrollViewport\n (scrolledIndexChange)=\"handleScrolledIndexChange($event, scrollViewport)\"\n [itemSize]=\"itemSize\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'height.px': optionsMaxHeight, 'maxHeight.px': optionsMaxHeight, 'minWidth.px': minWidth(), overflowX: 'hidden' } : { 'minWidth.px': minWidth(), overflowX: 'hidden'}\"\n maxBufferPx=\"{{itemSize * visibleItems}}\"\n minBufferPx=\"{{itemSize * visibleItems}}\"\n class=\"form-multi-select-options\"\n tabindex=\"-1\"\n >\n <ng-container\n #cdkVirtualFor\n *cdkVirtualFor=\"let option of optionsArray; trackBy: trackByFn; templateCacheSize: 0; even as even; odd as odd; index as index; count as count; first as first; last as last;\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n />\n </cdk-virtual-scroll-viewport>\n }\n }\n</ng-template>\n\n<ng-template #multiselectOptionsDiv>\n <div\n [ngClass]=\"{'form-multi-select-options': visibleOptions()}\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflowY: 'scroll' } : {}\"\n >\n <ng-content />\n <ng-container [ngTemplateOutlet]=\"userOptionsTemplate\" />\n </div>\n</ng-template>\n\n<ng-template #defaultMultiSelectOptionTemplate let-option>\n <c-multi-select-option\n [disabled]=\"option.disabled\"\n [label]=\"option.label\"\n [text]=\"option.text\"\n [value]=\"option.value\"\n [visible]=\"option.visible\"\n >\n {{ option.text }}\n </c-multi-select-option>\n</ng-template>\n\n<ng-template #userOptionsTemplate>\n @for (option of userOptionsArray$ | async; track option; let even = $even, odd = $odd, index = $index, count = $count, first = $first, last = $last) {\n <ng-container\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n />\n }\n</ng-template>\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{outline:none;box-shadow:0 0 0 var(--cui-focus-ring-width) var(--cui-focus-ring-color);border-radius:var(--cui-border-radius, .375rem)}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){display:none}:host .form-multi-select .form-multi-select-selection{display:flex;flex:1 1 auto;flex-wrap:wrap}:host .form-multi-select .form-multi-select-selection .text-placeholder,:host .form-multi-select .form-multi-select-selection .form-multi-select-search::placeholder{color:var(--cui-form-multi-select-color);opacity:.8}:host .form-multi-select .form-multi-select-search[size]{display:flex}:host ::ng-deep .cdk-virtual-scroll-content-wrapper{padding:var(--cui-form-multi-select-options-padding-y) var(--cui-form-multi-select-options-padding-x);font-size:1rem;color:var(--cui-form-multi-select-options-color)}:host .cdk-virtual-scroll-viewport{width:var(--cui-dropdown-min-width)}:host .dropdown-menu{--cui-dropdown-padding-y: 0}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MultiSelectTagComponent, selector: "c-multi-select-tag", inputs: ["option", "disabled", "label", "value"], outputs: ["remove"] }, { kind: "component", type: MultiSelectOptionComponent, selector: "c-multi-select-option", inputs: ["optionsStyle", "label", "text", "visible", "disabled", "selected", "value", "active", "role"], outputs: ["selectedChange", "focusChange"], exportAs: ["cMultiSelectOption"] }, { kind: "directive", type: MultiSelectSearchDirective, selector: "[cMultiSelectSearch]", inputs: ["delay", "value"], outputs: ["valueChange"], exportAs: ["cMultiSelectSearch"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible"], exportAs: ["cDropdownMenu"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "component", type: ElementCoverComponent, selector: "c-element-cover, [cElementCover]", inputs: ["boundaries", "opacity"] }], deferBlockDependencies: [() => [AsyncPipe,
|
|
10589
10583
|
NgStyle,
|
|
10590
10584
|
NgTemplateOutlet, import('@angular/cdk/scrolling').then(m => m.CdkFixedSizeVirtualScroll), import('@angular/cdk/scrolling').then(m => m.CdkVirtualScrollViewport), import('@angular/cdk/scrolling').then(m => m.CdkVirtualForOf)]] }); }
|
|
10591
10585
|
}
|
|
@@ -10615,7 +10609,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.1.5", ng
|
|
|
10615
10609
|
DropdownMenuDirective,
|
|
10616
10610
|
DropdownToggleDirective,
|
|
10617
10611
|
ElementCoverComponent
|
|
10618
|
-
], template: "<c-dropdown #dropdown=\"cDropdown\"\n [(visible)]=\"visible\"\n [autoClose]=\"'outside'\"\n [ngClass]=\"multiselectClasses\"\n [popperOptions]=\"popperOptions\">\n <div #dropdownToggle=\"cDropdownToggle\" [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle role=\"button\"\n class=\"form-multi-select-input-group\">\n <span\n [ngClass]=\"{'form-multi-select-selection': true, 'form-multi-select-selection-tags': (selectionType === 'tags' && selectedOptions.length)}\">\n @if (selectionType === 'tags') {\n @if (optionsSelected$ | async; as optionTags) {\n @for (option of optionTags; track option.value; let i = $index) {\n <c-multi-select-tag\n (remove)=\"handleTagRemove($event)\"\n [disabled]=\"option.disabled ?? false\"\n [label]=\"option.label ?? option.value?.toString()\"\n [option]=\"option\"\n [value]=\"option.value\"\n class=\"form-multi-select-tag text-truncate\"\n tabindex=\"-1\"\n />\n }\n }\n } @else if (selectionType === 'text' && !!selectedOptions.length) {\n @for (option of selectedOptions; track option.value; let i = $index, last = $last) {\n <span class=\"form-multi-select-text text-truncate\">{{ option.label }}{{ last ? ' ' : ', ' }}</span>\n }\n }\n @if (!search) {\n <span class=\"text-placeholder text-truncate\">\n {{ optionsSelected.size === 0 ? placeholder : counterPlaceholderText }}\n </span>\n }\n @if (search) {\n <input\n #inputElement\n (keydown)=\"handleSearchKeyDown($event)\"\n (valueChange)=\"handleSearchValueChange($event)\"\n [attr.placeholder]=\"selectedOptions.length === 0 ? placeholder : counterPlaceholderText\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search), 'text-truncate': true }\"\n [ngModel]=\"searchValue\"\n [value]=\"searchValue\"\n autocomplete=\"off\"\n cMultiSelectSearch\n size=\"2\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n type=\"text\"\n >\n }\n </span>\n <div class=\"form-multi-select-buttons\">\n @if (!!cleaner && optionsSelected.size > 0 && !disabled) {\n <button\n (click)=\"clearAllOptions($event)\"\n [disabled]=\"disabled || (!isDropdownVisible && cleaner !== 'active')\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-cleaner\"\n type=\"button\"\n ></button>\n }\n <button (click)=\"handleIndicatorClick($event)\"\n [disabled]=\"disabled\"\n class=\"form-multi-select-indicator\"\n type=\"button\">\n </button>\n </div>\n </div>\n @if (!disabled) {\n <div #dropdownMenu=\"cDropdownMenu\" [visible]=\"dropdown.visible\" cDropdownMenu\n class=\"form-multi-select-dropdown\" role=\"menu\">\n @if (visibleOptions() && options.length > 0) {\n @if (selectAll && multiple && !virtualScroller) {\n <button\n (click)=\"selectAllOptions()\"\n class=\"form-multi-select-all\"\n type=\"button\"\n tabindex=\"0\"\n >\n {{ selectAllLabel }}\n </button>\n }\n }\n @if ((visibleOptions() && options.length > 0) || isLoading()) {\n <ng-container *ngTemplateOutlet=\"virtualScroller ? multiselectVirtualScroller : multiselectOptionsDiv\" />\n } @else {\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n }\n @if (isLoading()) {\n <c-element-cover [ngStyle]=\"{'border-radius': '6px', 'z-index': 2}\" />\n }\n </div>\n }\n</c-dropdown>\n\n<ng-template #multiselectVirtualScroller>\n @defer (on immediate) {\n @if ((optionsArray$ | async); as optionsArray) {\n <cdk-virtual-scroll-viewport\n #scrollViewport\n (scrolledIndexChange)=\"handleScrolledIndexChange($event, scrollViewport)\"\n [itemSize]=\"itemSize\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'height.px': optionsMaxHeight, 'maxHeight.px': optionsMaxHeight, 'minWidth.px': minWidth(), overflowX: 'hidden' } : { 'minWidth.px': minWidth(), overflowX: 'hidden'}\"\n maxBufferPx=\"{{itemSize * visibleItems}}\"\n minBufferPx=\"{{itemSize * visibleItems}}\"\n class=\"form-multi-select-options\"\n tabindex=\"-1\"\n >\n <ng-container\n #cdkVirtualFor\n *cdkVirtualFor=\"let option of optionsArray; trackBy: trackByFn; templateCacheSize: 0; even as even; odd as odd; index as index; count as count; first as first; last as last;\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n />\n </cdk-virtual-scroll-viewport>\n }\n }\n</ng-template>\n\n<ng-template #multiselectOptionsDiv>\n <div\n [ngClass]=\"{'form-multi-select-options': visibleOptions()}\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflowY: 'scroll' } : {}\"\n >\n <ng-content />\n <ng-container [ngTemplateOutlet]=\"userOptionsTemplate\" />\n </div>\n</ng-template>\n\n<ng-template #defaultMultiSelectOptionTemplate let-option>\n <c-multi-select-option\n [disabled]=\"option.disabled\"\n [label]=\"option.label\"\n [text]=\"option.text\"\n [value]=\"option.value\"\n [visible]=\"option.visible\"\n >\n {{ option.text }}\n </c-multi-select-option>\n</ng-template>\n\n<ng-template #userOptionsTemplate>\n @for (option of userOptionsArray$ | async; track option; let even = $even, odd = $odd, index = $index, count = $count, first = $first, last = $last) {\n <ng-container\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n />\n }\n</ng-template>\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{outline:none;box-shadow:0 0 0 var(--cui-focus-ring-width) var(--cui-focus-ring-color);border-radius:var(--cui-border-radius, .375rem)}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){display:none}:host .form-multi-select .form-multi-select-selection{display:flex;flex:1 1 auto;flex-wrap:wrap}:host .form-multi-select .form-multi-select-selection .text-placeholder,:host .form-multi-select .form-multi-select-selection .form-multi-select-search::placeholder{color:var(--cui-form-multi-select-color);opacity:.8}:host .form-multi-select .form-multi-select-search[size]{display:flex}:host ::ng-deep .cdk-virtual-scroll-content-wrapper{padding:var(--cui-form-multi-select-options-padding-y) var(--cui-form-multi-select-options-padding-x);font-size:1rem;color:var(--cui-form-multi-select-options-color)}:host .cdk-virtual-scroll-viewport{width:var(--cui-dropdown-min-width)}:host .dropdown-menu{--cui-dropdown-padding-y: 0}\n"] }]
|
|
10612
|
+
], template: "<c-dropdown #dropdown=\"cDropdown\"\n [(visible)]=\"visible\"\n [autoClose]=\"'outside'\"\n [ngClass]=\"multiselectClasses\"\n [popperOptions]=\"popperOptions\">\n <div #dropdownToggle=\"cDropdownToggle\" [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle role=\"button\"\n class=\"form-multi-select-input-group\">\n <span\n [ngClass]=\"{'form-multi-select-selection': true, 'form-multi-select-selection-tags': (selectionType === 'tags' && selectedOptions.length)}\">\n @if (selectionType === 'tags') {\n @if (optionsSelected$ | async; as optionTags) {\n @for (option of optionTags; track option.value; let i = $index) {\n <c-multi-select-tag\n (remove)=\"handleTagRemove($event)\"\n [disabled]=\"option.disabled ?? false\"\n [label]=\"option.label ?? option.value?.toString()\"\n [option]=\"option\"\n [value]=\"option.value\"\n class=\"form-multi-select-tag text-truncate\"\n tabindex=\"-1\"\n />\n }\n }\n } @else if (selectionType === 'text' && !!selectedOptions.length) {\n @for (option of selectedOptions; track option.value; let i = $index, last = $last) {\n <span class=\"form-multi-select-text text-truncate\">{{ option.label }}{{ last ? ' ' : ', ' }}</span>\n }\n }\n @if (!search) {\n <span class=\"text-placeholder text-truncate\">\n {{ optionsSelected.size === 0 ? placeholder : counterPlaceholderText }}\n </span>\n }\n @if (search) {\n <input\n #inputElement\n (keydown)=\"handleSearchKeyDown($event)\"\n (valueChange)=\"handleSearchValueChange($event)\"\n [attr.placeholder]=\"selectedOptions.length === 0 ? placeholder : counterPlaceholderText\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search), 'text-truncate': true }\"\n [ngModel]=\"searchValue\"\n [value]=\"searchValue\"\n autocomplete=\"off\"\n cMultiSelectSearch\n size=\"2\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n type=\"text\"\n >\n }\n </span>\n <div class=\"form-multi-select-buttons\">\n @if (!!cleaner && optionsSelected.size > 0 && !disabled) {\n <button\n (click)=\"clearAllOptions($event)\"\n [disabled]=\"disabled || (!isDropdownVisible && cleaner !== 'active')\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-cleaner\"\n type=\"button\"\n ></button>\n }\n <button (click)=\"handleIndicatorClick($event)\"\n [disabled]=\"disabled\"\n class=\"form-multi-select-indicator\"\n type=\"button\">\n </button>\n </div>\n </div>\n @if (!disabled) {\n <div #dropdownMenu=\"cDropdownMenu\" [visible]=\"dropdown.visible()\" cDropdownMenu\n class=\"form-multi-select-dropdown\" role=\"menu\">\n @if (visibleOptions() && options.length > 0) {\n @if (selectAll && multiple && !virtualScroller) {\n <button\n (click)=\"selectAllOptions()\"\n class=\"form-multi-select-all\"\n type=\"button\"\n tabindex=\"0\"\n >\n {{ selectAllLabel }}\n </button>\n }\n }\n @if ((visibleOptions() && options.length > 0) || isLoading()) {\n <ng-container *ngTemplateOutlet=\"virtualScroller ? multiselectVirtualScroller : multiselectOptionsDiv\" />\n } @else {\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n }\n @if (isLoading()) {\n <c-element-cover [ngStyle]=\"{'border-radius': '6px', 'z-index': 2}\" />\n }\n </div>\n }\n</c-dropdown>\n\n<ng-template #multiselectVirtualScroller>\n @defer (on immediate) {\n @if ((optionsArray$ | async); as optionsArray) {\n <cdk-virtual-scroll-viewport\n #scrollViewport\n (scrolledIndexChange)=\"handleScrolledIndexChange($event, scrollViewport)\"\n [itemSize]=\"itemSize\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'height.px': optionsMaxHeight, 'maxHeight.px': optionsMaxHeight, 'minWidth.px': minWidth(), overflowX: 'hidden' } : { 'minWidth.px': minWidth(), overflowX: 'hidden'}\"\n maxBufferPx=\"{{itemSize * visibleItems}}\"\n minBufferPx=\"{{itemSize * visibleItems}}\"\n class=\"form-multi-select-options\"\n tabindex=\"-1\"\n >\n <ng-container\n #cdkVirtualFor\n *cdkVirtualFor=\"let option of optionsArray; trackBy: trackByFn; templateCacheSize: 0; even as even; odd as odd; index as index; count as count; first as first; last as last;\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n />\n </cdk-virtual-scroll-viewport>\n }\n }\n</ng-template>\n\n<ng-template #multiselectOptionsDiv>\n <div\n [ngClass]=\"{'form-multi-select-options': visibleOptions()}\"\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflowY: 'scroll' } : {}\"\n >\n <ng-content />\n <ng-container [ngTemplateOutlet]=\"userOptionsTemplate\" />\n </div>\n</ng-template>\n\n<ng-template #defaultMultiSelectOptionTemplate let-option>\n <c-multi-select-option\n [disabled]=\"option.disabled\"\n [label]=\"option.label\"\n [text]=\"option.text\"\n [value]=\"option.value\"\n [visible]=\"option.visible\"\n >\n {{ option.text }}\n </c-multi-select-option>\n</ng-template>\n\n<ng-template #userOptionsTemplate>\n @for (option of userOptionsArray$ | async; track option; let even = $even, odd = $odd, index = $index, count = $count, first = $first, last = $last) {\n <ng-container\n [ngTemplateOutlet]=\"templates['multiSelectOptionTemplate'] || defaultMultiSelectOptionTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: option, even, odd, index, count, first, last}\"\n />\n }\n</ng-template>\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{outline:none;box-shadow:0 0 0 var(--cui-focus-ring-width) var(--cui-focus-ring-color);border-radius:var(--cui-border-radius, .375rem)}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){display:none}:host .form-multi-select .form-multi-select-selection{display:flex;flex:1 1 auto;flex-wrap:wrap}:host .form-multi-select .form-multi-select-selection .text-placeholder,:host .form-multi-select .form-multi-select-selection .form-multi-select-search::placeholder{color:var(--cui-form-multi-select-color);opacity:.8}:host .form-multi-select .form-multi-select-search[size]{display:flex}:host ::ng-deep .cdk-virtual-scroll-content-wrapper{padding:var(--cui-form-multi-select-options-padding-y) var(--cui-form-multi-select-options-padding-x);font-size:1rem;color:var(--cui-form-multi-select-options-color)}:host .cdk-virtual-scroll-viewport{width:var(--cui-dropdown-min-width)}:host .dropdown-menu{--cui-dropdown-padding-y: 0}\n"] }]
|
|
10619
10613
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }, { type: i1$1.FocusMonitor }, { type: MultiSelectService }, { type: i0.IterableDiffers }], propDecorators: { allowCreateOptions: [{
|
|
10620
10614
|
type: Input,
|
|
10621
10615
|
args: [{ transform: booleanAttribute }]
|
|
@@ -12606,7 +12600,7 @@ class ProgressBarDirective {
|
|
|
12606
12600
|
* @return number
|
|
12607
12601
|
* @default 0
|
|
12608
12602
|
*/
|
|
12609
|
-
this.value = input(
|
|
12603
|
+
this.value = input(0, { transform: numberAttribute });
|
|
12610
12604
|
/**
|
|
12611
12605
|
* Set the progress bar variant to optional striped.
|
|
12612
12606
|
* @values 'striped'
|