@coreui/angular 5.3.5 → 5.3.7
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.
|
@@ -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, signal, output, contentChildren, EventEmitter, HostBinding, Output, ContentChildren, HostListener, DestroyRef, RendererFactory2, PLATFORM_ID,
|
|
2
|
+
import { inject, ElementRef, Directive, input, Renderer2, effect, TemplateRef, Input, booleanAttribute, NgModule, computed, Injectable, Component, signal, output, afterNextRender, contentChildren, EventEmitter, HostBinding, Output, ContentChildren, HostListener, DestroyRef, RendererFactory2, PLATFORM_ID, Inject, ChangeDetectorRef, ViewChild, forwardRef, ContentChild, contentChild, afterRender, viewChild, ViewContainerRef, model, numberAttribute, ChangeDetectionStrategy, Pipe, Injector, untracked, runInInjectionContext } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet, DOCUMENT, NgClass, AsyncPipe, isPlatformServer, isPlatformBrowser, NgStyle } 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 } from '@angular/core/rxjs-interop';
|
|
@@ -273,6 +273,10 @@ const expandHorizontalAnimation = animation([animate('{{ time }} {{ easing }}')]
|
|
|
273
273
|
const collapseHorizontalAnimation = animation([animate('{{ time }} {{ easing }}')]);
|
|
274
274
|
|
|
275
275
|
class CollapseDirective {
|
|
276
|
+
#hostElement;
|
|
277
|
+
#renderer;
|
|
278
|
+
#animationBuilder;
|
|
279
|
+
#player;
|
|
276
280
|
constructor() {
|
|
277
281
|
this.#hostElement = inject(ElementRef);
|
|
278
282
|
this.#renderer = inject(Renderer2);
|
|
@@ -283,7 +287,7 @@ class CollapseDirective {
|
|
|
283
287
|
*/
|
|
284
288
|
this.animateInput = input(true, { transform: booleanAttribute, alias: 'animate' });
|
|
285
289
|
this.animate = signal(true);
|
|
286
|
-
this
|
|
290
|
+
this.#animateInputEffect = effect(() => {
|
|
287
291
|
this.animate.set(this.animateInput());
|
|
288
292
|
});
|
|
289
293
|
/**
|
|
@@ -299,15 +303,15 @@ class CollapseDirective {
|
|
|
299
303
|
*/
|
|
300
304
|
this.visibleInput = input(false, { transform: booleanAttribute, alias: 'visible' });
|
|
301
305
|
this.visibleChange = output();
|
|
302
|
-
this
|
|
306
|
+
this.#visibleInputEffect = effect(() => {
|
|
303
307
|
this.visible.set(this.visibleInput());
|
|
304
308
|
});
|
|
305
309
|
this.visible = signal(false);
|
|
306
|
-
this.#
|
|
307
|
-
this
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
310
|
+
this.#initialized = signal(false);
|
|
311
|
+
this.#visibleEffect = effect(() => {
|
|
312
|
+
if (this.#initialized()) {
|
|
313
|
+
this.createPlayer(this.visible());
|
|
314
|
+
}
|
|
311
315
|
});
|
|
312
316
|
/**
|
|
313
317
|
* Add `navbar` prop for grouping and hiding navbar contents by a parent breakpoint.
|
|
@@ -334,12 +338,16 @@ class CollapseDirective {
|
|
|
334
338
|
'collapse-horizontal': this.horizontal()
|
|
335
339
|
};
|
|
336
340
|
});
|
|
341
|
+
afterNextRender({
|
|
342
|
+
read: () => {
|
|
343
|
+
this.#initialized.set(true);
|
|
344
|
+
}
|
|
345
|
+
});
|
|
337
346
|
}
|
|
338
|
-
#
|
|
339
|
-
#
|
|
340
|
-
#
|
|
341
|
-
#
|
|
342
|
-
#init;
|
|
347
|
+
#animateInputEffect;
|
|
348
|
+
#visibleInputEffect;
|
|
349
|
+
#initialized;
|
|
350
|
+
#visibleEffect;
|
|
343
351
|
ngOnDestroy() {
|
|
344
352
|
this.destroyPlayer();
|
|
345
353
|
}
|
|
@@ -401,16 +409,16 @@ class CollapseDirective {
|
|
|
401
409
|
}
|
|
402
410
|
}
|
|
403
411
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CollapseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
404
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.5", type: CollapseDirective, isStandalone: true, selector: "[cCollapse]", inputs: { animateInput: { classPropertyName: "animateInput", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null }, visibleInput: { classPropertyName: "visibleInput", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, navbar: { classPropertyName: "navbar", publicName: "navbar", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, transition: { classPropertyName: "transition", publicName: "transition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visibleChange: "visibleChange", collapseChange: "collapseChange" }, host: { properties: { "class": "hostClasses()", "style": "{display: \"none\"}" } }, exportAs: ["cCollapse"], ngImport: i0 }); }
|
|
412
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.5", type: CollapseDirective, isStandalone: true, selector: "[cCollapse]", inputs: { animateInput: { classPropertyName: "animateInput", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null }, visibleInput: { classPropertyName: "visibleInput", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, navbar: { classPropertyName: "navbar", publicName: "navbar", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, transition: { classPropertyName: "transition", publicName: "transition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visibleChange: "visibleChange", collapseChange: "collapseChange" }, host: { properties: { "class": "hostClasses()", "style": "{ display: \"none\" }" } }, exportAs: ["cCollapse"], ngImport: i0 }); }
|
|
405
413
|
}
|
|
406
414
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CollapseDirective, decorators: [{
|
|
407
415
|
type: Directive,
|
|
408
416
|
args: [{
|
|
409
417
|
selector: '[cCollapse]',
|
|
410
418
|
exportAs: 'cCollapse',
|
|
411
|
-
host: { '[class]': 'hostClasses()', '[style]': '{display: "none"}' }
|
|
419
|
+
host: { '[class]': 'hostClasses()', '[style]': '{ display: "none" }' }
|
|
412
420
|
}]
|
|
413
|
-
}] });
|
|
421
|
+
}], ctorParameters: () => [] });
|
|
414
422
|
|
|
415
423
|
class CollapseModule {
|
|
416
424
|
static forRoot() {
|
|
@@ -5938,6 +5946,7 @@ class OffcanvasComponent {
|
|
|
5938
5946
|
show: this.show
|
|
5939
5947
|
};
|
|
5940
5948
|
}
|
|
5949
|
+
// @HostBinding('attr.aria-hidden')
|
|
5941
5950
|
get ariaHidden() {
|
|
5942
5951
|
return this.visible ? null : true;
|
|
5943
5952
|
}
|
|
@@ -6053,7 +6062,7 @@ class OffcanvasComponent {
|
|
|
6053
6062
|
}
|
|
6054
6063
|
}
|
|
6055
6064
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OffcanvasComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6056
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.0.5", type: OffcanvasComponent, isStandalone: true, selector: "c-offcanvas", inputs: { backdrop: "backdrop", keyboard: ["keyboard", "keyboard", booleanAttribute], placement: "placement", responsive: "responsive", id: "id", role: "role", ariaModal: ["ariaModal", "ariaModal", booleanAttribute], scroll: ["scroll", "scroll", booleanAttribute], visible: ["visible", "visible", booleanAttribute] }, outputs: { visibleChange: "visibleChange" }, host: { attributes: { "ngSkipHydration": "true" }, listeners: { "@showHide.start": "animateStart($event)", "@showHide.done": "animateDone($event)", "document:keydown": "onKeyDownHandler($event)" }, properties: { "attr.role": "this.role", "attr.aria-modal": "this.ariaModal", "class": "this.hostClasses", "attr.
|
|
6065
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.0.5", type: OffcanvasComponent, isStandalone: true, selector: "c-offcanvas", inputs: { backdrop: "backdrop", keyboard: ["keyboard", "keyboard", booleanAttribute], placement: "placement", responsive: "responsive", id: "id", role: "role", ariaModal: ["ariaModal", "ariaModal", booleanAttribute], scroll: ["scroll", "scroll", booleanAttribute], visible: ["visible", "visible", booleanAttribute] }, outputs: { visibleChange: "visibleChange" }, host: { attributes: { "ngSkipHydration": "true" }, listeners: { "@showHide.start": "animateStart($event)", "@showHide.done": "animateDone($event)", "document:keydown": "onKeyDownHandler($event)" }, properties: { "attr.inert": "ariaHidden || null", "attr.role": "this.role", "attr.aria-modal": "this.ariaModal", "class": "this.hostClasses", "attr.tabindex": "this.tabIndex", "@showHide": "this.animateTrigger" } }, exportAs: ["cOffcanvas"], hostDirectives: [{ directive: ThemeDirective, inputs: ["dark", "dark"] }], ngImport: i0, template: "<div cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content />\n</div>\n\n", styles: [":host{display:none}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [
|
|
6057
6066
|
trigger('showHide', [
|
|
6058
6067
|
state('visible', style({
|
|
6059
6068
|
// visibility: 'visible'
|
|
@@ -6077,7 +6086,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
6077
6086
|
})),
|
|
6078
6087
|
transition('visible <=> *', [animate('300ms')])
|
|
6079
6088
|
])
|
|
6080
|
-
], exportAs: 'cOffcanvas', imports: [A11yModule], hostDirectives: [{ directive: ThemeDirective, inputs: ['dark'] }], host: { ngSkipHydration: 'true' }, template: "<div cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content />\n</div>\n\n", styles: [":host{display:none}\n"] }]
|
|
6089
|
+
], exportAs: 'cOffcanvas', imports: [A11yModule], hostDirectives: [{ directive: ThemeDirective, inputs: ['dark'] }], host: { ngSkipHydration: 'true', '[attr.inert]': 'ariaHidden || null' }, template: "<div cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content />\n</div>\n\n", styles: [":host{display:none}\n"] }]
|
|
6081
6090
|
}], propDecorators: { backdrop: [{
|
|
6082
6091
|
type: Input
|
|
6083
6092
|
}], keyboard: [{
|
|
@@ -6111,9 +6120,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
6111
6120
|
}], hostClasses: [{
|
|
6112
6121
|
type: HostBinding,
|
|
6113
6122
|
args: ['class']
|
|
6114
|
-
}], ariaHidden: [{
|
|
6115
|
-
type: HostBinding,
|
|
6116
|
-
args: ['attr.aria-hidden']
|
|
6117
6123
|
}], tabIndex: [{
|
|
6118
6124
|
type: HostBinding,
|
|
6119
6125
|
args: ['attr.tabindex']
|