@coreui/angular-pro 5.3.6 → 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, numberAttribute, Pipe, ViewChildren, model, 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, numberAttribute, Pipe, ViewChildren, model, PLATFORM_ID, Inject, ChangeDetectorRef, ViewChild, forwardRef, ContentChild, viewChild, ChangeDetectionStrategy, NgZone, contentChild, afterRender, ViewContainerRef, viewChildren, untracked, linkedSignal, 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';
|
|
@@ -276,6 +276,10 @@ const expandHorizontalAnimation = animation([animate('{{ time }} {{ easing }}')]
|
|
|
276
276
|
const collapseHorizontalAnimation = animation([animate('{{ time }} {{ easing }}')]);
|
|
277
277
|
|
|
278
278
|
class CollapseDirective {
|
|
279
|
+
#hostElement;
|
|
280
|
+
#renderer;
|
|
281
|
+
#animationBuilder;
|
|
282
|
+
#player;
|
|
279
283
|
constructor() {
|
|
280
284
|
this.#hostElement = inject(ElementRef);
|
|
281
285
|
this.#renderer = inject(Renderer2);
|
|
@@ -286,7 +290,7 @@ class CollapseDirective {
|
|
|
286
290
|
*/
|
|
287
291
|
this.animateInput = input(true, { transform: booleanAttribute, alias: 'animate' });
|
|
288
292
|
this.animate = signal(true);
|
|
289
|
-
this
|
|
293
|
+
this.#animateInputEffect = effect(() => {
|
|
290
294
|
this.animate.set(this.animateInput());
|
|
291
295
|
});
|
|
292
296
|
/**
|
|
@@ -302,15 +306,15 @@ class CollapseDirective {
|
|
|
302
306
|
*/
|
|
303
307
|
this.visibleInput = input(false, { transform: booleanAttribute, alias: 'visible' });
|
|
304
308
|
this.visibleChange = output();
|
|
305
|
-
this
|
|
309
|
+
this.#visibleInputEffect = effect(() => {
|
|
306
310
|
this.visible.set(this.visibleInput());
|
|
307
311
|
});
|
|
308
312
|
this.visible = signal(false);
|
|
309
|
-
this.#
|
|
310
|
-
this
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
313
|
+
this.#initialized = signal(false);
|
|
314
|
+
this.#visibleEffect = effect(() => {
|
|
315
|
+
if (this.#initialized()) {
|
|
316
|
+
this.createPlayer(this.visible());
|
|
317
|
+
}
|
|
314
318
|
});
|
|
315
319
|
/**
|
|
316
320
|
* Add `navbar` prop for grouping and hiding navbar contents by a parent breakpoint.
|
|
@@ -337,12 +341,16 @@ class CollapseDirective {
|
|
|
337
341
|
'collapse-horizontal': this.horizontal()
|
|
338
342
|
};
|
|
339
343
|
});
|
|
344
|
+
afterNextRender({
|
|
345
|
+
read: () => {
|
|
346
|
+
this.#initialized.set(true);
|
|
347
|
+
}
|
|
348
|
+
});
|
|
340
349
|
}
|
|
341
|
-
#
|
|
342
|
-
#
|
|
343
|
-
#
|
|
344
|
-
#
|
|
345
|
-
#init;
|
|
350
|
+
#animateInputEffect;
|
|
351
|
+
#visibleInputEffect;
|
|
352
|
+
#initialized;
|
|
353
|
+
#visibleEffect;
|
|
346
354
|
ngOnDestroy() {
|
|
347
355
|
this.destroyPlayer();
|
|
348
356
|
}
|
|
@@ -404,16 +412,16 @@ class CollapseDirective {
|
|
|
404
412
|
}
|
|
405
413
|
}
|
|
406
414
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CollapseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
407
|
-
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 }); }
|
|
415
|
+
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 }); }
|
|
408
416
|
}
|
|
409
417
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CollapseDirective, decorators: [{
|
|
410
418
|
type: Directive,
|
|
411
419
|
args: [{
|
|
412
420
|
selector: '[cCollapse]',
|
|
413
421
|
exportAs: 'cCollapse',
|
|
414
|
-
host: { '[class]': 'hostClasses()', '[style]': '{display: "none"}' }
|
|
422
|
+
host: { '[class]': 'hostClasses()', '[style]': '{ display: "none" }' }
|
|
415
423
|
}]
|
|
416
|
-
}] });
|
|
424
|
+
}], ctorParameters: () => [] });
|
|
417
425
|
|
|
418
426
|
class CollapseModule {
|
|
419
427
|
static forRoot() {
|
|
@@ -11877,6 +11885,7 @@ class OffcanvasComponent {
|
|
|
11877
11885
|
show: this.show
|
|
11878
11886
|
};
|
|
11879
11887
|
}
|
|
11888
|
+
// @HostBinding('attr.aria-hidden')
|
|
11880
11889
|
get ariaHidden() {
|
|
11881
11890
|
return this.visible ? null : true;
|
|
11882
11891
|
}
|
|
@@ -11992,7 +12001,7 @@ class OffcanvasComponent {
|
|
|
11992
12001
|
}
|
|
11993
12002
|
}
|
|
11994
12003
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OffcanvasComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11995
|
-
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.
|
|
12004
|
+
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: [
|
|
11996
12005
|
trigger('showHide', [
|
|
11997
12006
|
state('visible', style({
|
|
11998
12007
|
// visibility: 'visible'
|
|
@@ -12016,7 +12025,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
12016
12025
|
})),
|
|
12017
12026
|
transition('visible <=> *', [animate('300ms')])
|
|
12018
12027
|
])
|
|
12019
|
-
], 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"] }]
|
|
12028
|
+
], 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"] }]
|
|
12020
12029
|
}], propDecorators: { backdrop: [{
|
|
12021
12030
|
type: Input
|
|
12022
12031
|
}], keyboard: [{
|
|
@@ -12050,9 +12059,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
12050
12059
|
}], hostClasses: [{
|
|
12051
12060
|
type: HostBinding,
|
|
12052
12061
|
args: ['class']
|
|
12053
|
-
}], ariaHidden: [{
|
|
12054
|
-
type: HostBinding,
|
|
12055
|
-
args: ['attr.aria-hidden']
|
|
12056
12062
|
}], tabIndex: [{
|
|
12057
12063
|
type: HostBinding,
|
|
12058
12064
|
args: ['attr.tabindex']
|