@coreui/angular 5.7.8 → 5.7.9
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.
|
@@ -5550,7 +5550,7 @@ class ModalComponent {
|
|
|
5550
5550
|
this.show = this.visible();
|
|
5551
5551
|
});
|
|
5552
5552
|
}
|
|
5553
|
-
|
|
5553
|
+
onKeyDownHandler(event) {
|
|
5554
5554
|
if (event.key === 'Escape' && this.keyboard() && this.visible()) {
|
|
5555
5555
|
if (this.backdrop() === 'static') {
|
|
5556
5556
|
this.setStaticBackdrop();
|
|
@@ -5631,7 +5631,7 @@ class ModalComponent {
|
|
|
5631
5631
|
}
|
|
5632
5632
|
}
|
|
5633
5633
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5634
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.7", 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: { "mousedown": "onMouseDownHandler($event)", "click": "onClickHandler($event)", "document:
|
|
5634
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.7", 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: { "mousedown": "onMouseDownHandler($event)", "click": "onClickHandler($event)", "document:keydown": "onKeyDownHandler($event)" }, properties: { "class": "hostClasses()", "attr.role": "visible() ? role() : null", "attr.inert": "ariaHidden()", "attr.id": "id", "attr.aria-modal": "ariaModal()", "attr.aria-hidden": "ariaHidden()", "attr.tabindex": "-1" }, classAttribute: "modal" }, viewQueries: [{ propertyName: "modalContentRef", first: true, predicate: ["modalContentRef"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "modalDialogRef", first: true, predicate: ModalDialogComponent, descendants: true, read: ElementRef, isSignal: true }], exportAs: ["cModal"], ngImport: i0, template: "@let isVisible = visible();\n<c-modal-dialog\n [alignment]=\"alignment()\"\n [fullscreen]=\"fullscreen()\"\n [scrollable]=\"scrollable()\"\n [size]=\"size()\">\n <c-modal-content>\n <div #modalContentRef [cdkTrapFocusAutoCapture]=\"isVisible\" [cdkTrapFocus]=\"isVisible\" style=\"display: contents;\">\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$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
|
|
5635
5635
|
}
|
|
5636
5636
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ModalComponent, decorators: [{
|
|
5637
5637
|
type: Component,
|
|
@@ -5646,7 +5646,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
5646
5646
|
'[attr.tabindex]': '-1',
|
|
5647
5647
|
'(mousedown)': 'onMouseDownHandler($event)',
|
|
5648
5648
|
'(click)': 'onClickHandler($event)',
|
|
5649
|
-
'(document:
|
|
5649
|
+
'(document:keydown)': 'onKeyDownHandler($event)'
|
|
5650
5650
|
}, template: "@let isVisible = visible();\n<c-modal-dialog\n [alignment]=\"alignment()\"\n [fullscreen]=\"fullscreen()\"\n [scrollable]=\"scrollable()\"\n [size]=\"size()\">\n <c-modal-content>\n <div #modalContentRef [cdkTrapFocusAutoCapture]=\"isVisible\" [cdkTrapFocus]=\"isVisible\" style=\"display: contents;\">\n <ng-content />\n </div>\n </c-modal-content>\n</c-modal-dialog>\n" }]
|
|
5651
5651
|
}], 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 }] }], modalDialogRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ModalDialogComponent), { ...{ read: ElementRef }, isSignal: true }] }] } });
|
|
5652
5652
|
|
|
@@ -6440,6 +6440,25 @@ class PopoverDirective {
|
|
|
6440
6440
|
this.visible() ? this.addTooltipElement() : this.removeTooltipElement();
|
|
6441
6441
|
}
|
|
6442
6442
|
});
|
|
6443
|
+
#handleEscapeKey = (event) => {
|
|
6444
|
+
if (event.key !== 'Escape') {
|
|
6445
|
+
return;
|
|
6446
|
+
}
|
|
6447
|
+
event.preventDefault();
|
|
6448
|
+
event.stopPropagation();
|
|
6449
|
+
this.visible.set(false);
|
|
6450
|
+
};
|
|
6451
|
+
#escapeEffect = effect((onCleanup) => {
|
|
6452
|
+
if (!this.visible()) {
|
|
6453
|
+
return;
|
|
6454
|
+
}
|
|
6455
|
+
const useCapture = true;
|
|
6456
|
+
this.#document.addEventListener('keydown', this.#handleEscapeKey, useCapture);
|
|
6457
|
+
onCleanup(() => {
|
|
6458
|
+
this.#document.removeEventListener('keydown', this.#handleEscapeKey, useCapture);
|
|
6459
|
+
});
|
|
6460
|
+
}, /* @ts-ignore */
|
|
6461
|
+
...(ngDevMode ? [{ debugName: "#escapeEffect" }] : /* istanbul ignore next */ []));
|
|
6443
6462
|
get ariaDescribedBy() {
|
|
6444
6463
|
return this.tooltipId ? this.tooltipId : null;
|
|
6445
6464
|
}
|
|
@@ -9484,6 +9503,23 @@ class TooltipDirective {
|
|
|
9484
9503
|
this.visible() ? this.addTooltipElement() : this.removeTooltipElement();
|
|
9485
9504
|
}
|
|
9486
9505
|
});
|
|
9506
|
+
#handleEscapeKey = (event) => {
|
|
9507
|
+
if (event.key !== 'Escape') {
|
|
9508
|
+
return;
|
|
9509
|
+
}
|
|
9510
|
+
event.preventDefault();
|
|
9511
|
+
event.stopPropagation();
|
|
9512
|
+
this.visible.set(false);
|
|
9513
|
+
};
|
|
9514
|
+
#escapeEffect = effect((onCleanup) => {
|
|
9515
|
+
if (!this.visible()) {
|
|
9516
|
+
return;
|
|
9517
|
+
}
|
|
9518
|
+
const useCapture = true;
|
|
9519
|
+
this.#document.addEventListener('keydown', this.#handleEscapeKey, useCapture);
|
|
9520
|
+
onCleanup(() => this.#document.removeEventListener('keydown', this.#handleEscapeKey, useCapture));
|
|
9521
|
+
}, /* @ts-ignore */
|
|
9522
|
+
...(ngDevMode ? [{ debugName: "#escapeEffect" }] : /* istanbul ignore next */ []));
|
|
9487
9523
|
get ariaDescribedBy() {
|
|
9488
9524
|
return this.tooltipId ? this.tooltipId : null;
|
|
9489
9525
|
}
|