@coreui/angular-pro 5.5.23 → 5.5.24
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.
|
@@ -12467,6 +12467,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImpo
|
|
|
12467
12467
|
}] });
|
|
12468
12468
|
|
|
12469
12469
|
class ModalComponent {
|
|
12470
|
+
static ngAcceptInputType_ariaModalInput;
|
|
12471
|
+
static ngAcceptInputType_scrollable;
|
|
12472
|
+
static ngAcceptInputType_visibleInput;
|
|
12470
12473
|
#document = inject(DOCUMENT);
|
|
12471
12474
|
#renderer = inject(Renderer2);
|
|
12472
12475
|
#hostElement = inject(ElementRef);
|
|
@@ -12525,7 +12528,7 @@ class ModalComponent {
|
|
|
12525
12528
|
*/
|
|
12526
12529
|
ariaModalInput = input(false, ...(ngDevMode ? [{ debugName: "ariaModalInput", transform: booleanAttribute, alias: 'ariaModal' }] : [{ transform: booleanAttribute, alias: 'ariaModal' }]));
|
|
12527
12530
|
ariaModal = computed(() => {
|
|
12528
|
-
return this.visible || this.ariaModalInput() ? true : null;
|
|
12531
|
+
return this.visible() || this.ariaModalInput() ? true : null;
|
|
12529
12532
|
}, ...(ngDevMode ? [{ debugName: "ariaModal" }] : []));
|
|
12530
12533
|
/**
|
|
12531
12534
|
* Create a scrollable modal that allows scrolling the modal body.
|
|
@@ -12539,27 +12542,18 @@ class ModalComponent {
|
|
|
12539
12542
|
* @default false
|
|
12540
12543
|
*/
|
|
12541
12544
|
visibleInput = input(false, ...(ngDevMode ? [{ debugName: "visibleInput", transform: booleanAttribute, alias: 'visible' }] : [{ transform: booleanAttribute, alias: 'visible' }]));
|
|
12545
|
+
visible = linkedSignal(this.visibleInput, ...(ngDevMode ? [{ debugName: "visible" }] : []));
|
|
12542
12546
|
#visibleInputEffect = effect(() => {
|
|
12543
|
-
const visible = this.
|
|
12547
|
+
const visible = this.visible();
|
|
12544
12548
|
untracked(() => {
|
|
12545
|
-
this.visible
|
|
12549
|
+
this.setBodyStyles(visible);
|
|
12550
|
+
this.setBackdrop(this.backdrop() !== false && visible);
|
|
12551
|
+
this.visibleChange?.emit(visible);
|
|
12546
12552
|
});
|
|
12547
12553
|
}, ...(ngDevMode ? [{ debugName: "#visibleInputEffect" }] : []));
|
|
12548
|
-
set visible(value) {
|
|
12549
|
-
if (this.#visible() !== value) {
|
|
12550
|
-
this.#visible.set(value);
|
|
12551
|
-
this.setBodyStyles(value);
|
|
12552
|
-
this.setBackdrop(this.backdrop() !== false && value);
|
|
12553
|
-
this.visibleChange?.emit(value);
|
|
12554
|
-
}
|
|
12555
|
-
}
|
|
12556
|
-
get visible() {
|
|
12557
|
-
return this.#visible();
|
|
12558
|
-
}
|
|
12559
|
-
#visible = signal(false, ...(ngDevMode ? [{ debugName: "#visible" }] : []));
|
|
12560
12554
|
#activeElement = signal(null, ...(ngDevMode ? [{ debugName: "#activeElement" }] : []));
|
|
12561
12555
|
#visibleEffect = effect(() => {
|
|
12562
|
-
const visible = this
|
|
12556
|
+
const visible = this.visible();
|
|
12563
12557
|
const afterViewInit = this.#afterViewInit();
|
|
12564
12558
|
untracked(() => {
|
|
12565
12559
|
if (visible && afterViewInit) {
|
|
@@ -12603,13 +12597,13 @@ class ModalComponent {
|
|
|
12603
12597
|
};
|
|
12604
12598
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
|
|
12605
12599
|
get ariaHidden() {
|
|
12606
|
-
return this.visible ? null : true;
|
|
12600
|
+
return this.visible() ? null : true;
|
|
12607
12601
|
}
|
|
12608
12602
|
animateTrigger = computed(() => {
|
|
12609
|
-
return this.visible ? 'visible' : 'hidden';
|
|
12603
|
+
return this.visible() ? 'visible' : 'hidden';
|
|
12610
12604
|
}, ...(ngDevMode ? [{ debugName: "animateTrigger" }] : []));
|
|
12611
12605
|
get show() {
|
|
12612
|
-
return this.visible && this.#show();
|
|
12606
|
+
return this.visible() && this.#show();
|
|
12613
12607
|
}
|
|
12614
12608
|
set show(value) {
|
|
12615
12609
|
this.#show.set(value);
|
|
@@ -12633,10 +12627,10 @@ class ModalComponent {
|
|
|
12633
12627
|
this.#backdropService.resetScrollbar();
|
|
12634
12628
|
}
|
|
12635
12629
|
});
|
|
12636
|
-
this.show = this.visible;
|
|
12630
|
+
this.show = this.visible();
|
|
12637
12631
|
}
|
|
12638
12632
|
onKeyUpHandler(event) {
|
|
12639
|
-
if (event.key === 'Escape' && this.keyboard() && this.visible) {
|
|
12633
|
+
if (event.key === 'Escape' && this.keyboard() && this.visible()) {
|
|
12640
12634
|
if (this.backdrop() === 'static') {
|
|
12641
12635
|
this.setStaticBackdrop();
|
|
12642
12636
|
}
|
|
@@ -12678,12 +12672,12 @@ class ModalComponent {
|
|
|
12678
12672
|
this.#modalService.modalState$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((action) => {
|
|
12679
12673
|
if (this === action.modal || this.id === action.id) {
|
|
12680
12674
|
if ('show' in action) {
|
|
12681
|
-
this.visible
|
|
12675
|
+
this.visible.update((visible) => (action?.show === 'toggle' ? !visible : action.show));
|
|
12682
12676
|
}
|
|
12683
12677
|
}
|
|
12684
12678
|
else {
|
|
12685
|
-
if (this.visible) {
|
|
12686
|
-
this.visible
|
|
12679
|
+
if (this.visible()) {
|
|
12680
|
+
this.visible.set(false);
|
|
12687
12681
|
}
|
|
12688
12682
|
}
|
|
12689
12683
|
});
|
|
@@ -12714,7 +12708,7 @@ class ModalComponent {
|
|
|
12714
12708
|
}
|
|
12715
12709
|
}
|
|
12716
12710
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12717
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.13", type: ModalComponent, isStandalone: true, selector: "c-modal", inputs: { alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, backdrop: { classPropertyName: "backdrop", publicName: "backdrop", isSignal: true, isRequired: false, transformFunction: null }, fullscreen: { classPropertyName: "fullscreen", publicName: "fullscreen", isSignal: true, isRequired: false, transformFunction: null }, keyboard: { classPropertyName: "keyboard", publicName: "keyboard", isSignal: true, isRequired: false, transformFunction: null }, attrId: { classPropertyName: "attrId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, transition: { classPropertyName: "transition", publicName: "transition", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, ariaModalInput: { classPropertyName: "ariaModalInput", publicName: "ariaModal", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, visibleInput: { classPropertyName: "visibleInput", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visibleChange: "visibleChange" }, host: { listeners: { "@showHide.start": "animateStart($event)", "@showHide.done": "animateDone($event)", "mousedown": "onMouseDownHandler($event)", "click": "onClickHandler($event)", "document:keyup": "onKeyUpHandler($event)" }, properties: { "class": "hostClasses()", "attr.role": "role()", "attr.inert": "ariaHidden", "attr.id": "id", "attr.aria-modal": "ariaModal()", "attr.tabindex": "-1", "@showHide": "animateTrigger()" }, classAttribute: "modal" }, viewQueries: [{ propertyName: "modalContentRef", first: true, predicate: ["modalContentRef"], descendants: true, read: ElementRef, isSignal: true }], exportAs: ["cModal"], ngImport: i0, template: "<c-modal-dialog\n [alignment]=\"alignment()\"\n [fullscreen]=\"fullscreen()\"\n [scrollable]=\"scrollable()\"\n [size]=\"size()\">\n <c-modal-content>\n <div [cdkTrapFocus]=\"
|
|
12711
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.13", type: ModalComponent, isStandalone: true, selector: "c-modal", inputs: { alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, backdrop: { classPropertyName: "backdrop", publicName: "backdrop", isSignal: true, isRequired: false, transformFunction: null }, fullscreen: { classPropertyName: "fullscreen", publicName: "fullscreen", isSignal: true, isRequired: false, transformFunction: null }, keyboard: { classPropertyName: "keyboard", publicName: "keyboard", isSignal: true, isRequired: false, transformFunction: null }, attrId: { classPropertyName: "attrId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, transition: { classPropertyName: "transition", publicName: "transition", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, ariaModalInput: { classPropertyName: "ariaModalInput", publicName: "ariaModal", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, visibleInput: { classPropertyName: "visibleInput", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visibleChange: "visibleChange" }, host: { listeners: { "@showHide.start": "animateStart($event)", "@showHide.done": "animateDone($event)", "mousedown": "onMouseDownHandler($event)", "click": "onClickHandler($event)", "document:keyup": "onKeyUpHandler($event)" }, properties: { "class": "hostClasses()", "attr.role": "role()", "attr.inert": "ariaHidden", "attr.id": "id", "attr.aria-modal": "ariaModal()", "attr.tabindex": "-1", "@showHide": "animateTrigger()" }, classAttribute: "modal" }, viewQueries: [{ propertyName: "modalContentRef", first: true, predicate: ["modalContentRef"], descendants: true, read: ElementRef, isSignal: true }], exportAs: ["cModal"], ngImport: i0, template: "<c-modal-dialog\n [alignment]=\"alignment()\"\n [fullscreen]=\"fullscreen()\"\n [scrollable]=\"scrollable()\"\n [size]=\"size()\">\n <c-modal-content>\n @let isVisible = visible();\n <div [cdkTrapFocus]=\"isVisible\" [cdkTrapFocusAutoCapture]=\"isVisible\" style=\"display: contents;\" #modalContentRef>\n <ng-content />\n </div>\n </c-modal-content>\n</c-modal-dialog>\n", dependencies: [{ kind: "component", type: ModalDialogComponent, selector: "c-modal-dialog", inputs: ["alignment", "fullscreen", "scrollable", "size"] }, { kind: "component", type: ModalContentComponent, selector: "c-modal-content" }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [
|
|
12718
12712
|
trigger('showHide', [
|
|
12719
12713
|
state('visible', style({
|
|
12720
12714
|
// display: 'block'
|
|
@@ -12752,7 +12746,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImpo
|
|
|
12752
12746
|
'(mousedown)': 'onMouseDownHandler($event)',
|
|
12753
12747
|
'(click)': 'onClickHandler($event)',
|
|
12754
12748
|
'(document:keyup)': 'onKeyUpHandler($event)'
|
|
12755
|
-
}, template: "<c-modal-dialog\n [alignment]=\"alignment()\"\n [fullscreen]=\"fullscreen()\"\n [scrollable]=\"scrollable()\"\n [size]=\"size()\">\n <c-modal-content>\n <div [cdkTrapFocus]=\"
|
|
12749
|
+
}, template: "<c-modal-dialog\n [alignment]=\"alignment()\"\n [fullscreen]=\"fullscreen()\"\n [scrollable]=\"scrollable()\"\n [size]=\"size()\">\n <c-modal-content>\n @let isVisible = visible();\n <div [cdkTrapFocus]=\"isVisible\" [cdkTrapFocusAutoCapture]=\"isVisible\" style=\"display: contents;\" #modalContentRef>\n <ng-content />\n </div>\n </c-modal-content>\n</c-modal-dialog>\n" }]
|
|
12756
12750
|
}], propDecorators: { alignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignment", required: false }] }], backdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdrop", required: false }] }], fullscreen: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullscreen", required: false }] }], keyboard: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyboard", required: false }] }], attrId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], transition: [{ type: i0.Input, args: [{ isSignal: true, alias: "transition", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], ariaModalInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaModal", required: false }] }], scrollable: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollable", required: false }] }], visibleInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }], visibleChange: [{ type: i0.Output, args: ["visibleChange"] }], modalContentRef: [{ type: i0.ViewChild, args: ['modalContentRef', { ...{ read: ElementRef }, isSignal: true }] }] } });
|
|
12757
12751
|
|
|
12758
12752
|
class ModalModule {
|