@coreui/angular-pro 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.
- package/fesm2022/coreui-angular-pro.mjs +43 -36
- package/fesm2022/coreui-angular-pro.mjs.map +1 -1
- package/lib/collapse/collapse.directive.d.ts +1 -3
- package/lib/smart-table/smart-table/smart-table.component.d.ts +2 -2
- package/lib/smart-table/smart-table-filter/filter-input.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, 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']
|
|
@@ -14062,10 +14068,11 @@ class RangeSliderComponent {
|
|
|
14062
14068
|
}
|
|
14063
14069
|
handleInputsContainerMouseDown($event) {
|
|
14064
14070
|
$event.preventDefault();
|
|
14065
|
-
if (!this.trackRef() ||
|
|
14066
|
-
|
|
14067
|
-
|
|
14068
|
-
|
|
14071
|
+
if (!this.trackRef() || $event.button !== 0 || this.disabledState()) {
|
|
14072
|
+
return;
|
|
14073
|
+
}
|
|
14074
|
+
const validTarget = [...this.inputRefs(), this.trackRef()];
|
|
14075
|
+
if (!validTarget.find((target) => target?.nativeElement === $event.target)) {
|
|
14069
14076
|
return;
|
|
14070
14077
|
}
|
|
14071
14078
|
const clickValue = calculateClickValue($event, this.trackRef()?.nativeElement, this.min(), this.max(), this.step(), this.vertical(), this.isRtl);
|
|
@@ -15443,8 +15450,6 @@ class FilterInputDirective {
|
|
|
15443
15450
|
this.valueChange = new EventEmitter();
|
|
15444
15451
|
}
|
|
15445
15452
|
#value;
|
|
15446
|
-
#valueSubscription;
|
|
15447
|
-
#inputSubscription;
|
|
15448
15453
|
set value(value) {
|
|
15449
15454
|
this.value$.next(value);
|
|
15450
15455
|
}
|
|
@@ -15452,9 +15457,7 @@ class FilterInputDirective {
|
|
|
15452
15457
|
this.setSubscription();
|
|
15453
15458
|
}
|
|
15454
15459
|
setSubscription() {
|
|
15455
|
-
this
|
|
15456
|
-
.pipe(distinctUntilChanged$1(), takeUntilDestroyed(this.destroyRef))
|
|
15457
|
-
.subscribe(value => {
|
|
15460
|
+
this.value$.pipe(distinctUntilChanged$1(), takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
|
|
15458
15461
|
if (this.#value !== value) {
|
|
15459
15462
|
this.#value = value;
|
|
15460
15463
|
this.emitObject = { ...this.emitObject, value: value, type: this.onEvent };
|
|
@@ -15462,8 +15465,8 @@ class FilterInputDirective {
|
|
|
15462
15465
|
}
|
|
15463
15466
|
});
|
|
15464
15467
|
const dueTime = this.onEvent === 'change' ? 0 : this.delay;
|
|
15465
|
-
|
|
15466
|
-
.pipe(map$1(event => {
|
|
15468
|
+
fromEvent(this.elementRef.nativeElement, this.onEvent)
|
|
15469
|
+
.pipe(map$1((event) => {
|
|
15467
15470
|
return event.target.value;
|
|
15468
15471
|
}), debounceTime$1(dueTime), takeUntilDestroyed(this.destroyRef))
|
|
15469
15472
|
.subscribe((value) => {
|
|
@@ -16250,9 +16253,6 @@ class SmartTableComponent {
|
|
|
16250
16253
|
this.itemsFilteredDiffer = this.iterableDiffers.find(this._columnFiltered).create();
|
|
16251
16254
|
this.columFilterValueDiffer = this.keyValueDiffers.find(this.columnFilterValue).create();
|
|
16252
16255
|
this.sorterValueDiffer = this.keyValueDiffers.find(this.sorterValue).create();
|
|
16253
|
-
setTimeout(() => {
|
|
16254
|
-
this.selectedAllSubject.next(this.selectedAll);
|
|
16255
|
-
}, 0);
|
|
16256
16256
|
}
|
|
16257
16257
|
set activePage(value) {
|
|
16258
16258
|
this._activePage = value || 1;
|
|
@@ -16365,10 +16365,13 @@ class SmartTableComponent {
|
|
|
16365
16365
|
});
|
|
16366
16366
|
this.columnFilterTemplates = { ...this.columnFilterTemplates };
|
|
16367
16367
|
this.columnLabelTemplates = { ...this.columnLabelTemplates };
|
|
16368
|
+
setTimeout(() => {
|
|
16369
|
+
this.selectedAllSubject.next(this.selectedAll);
|
|
16370
|
+
}, 0);
|
|
16368
16371
|
}
|
|
16369
16372
|
get selectedAll() {
|
|
16370
16373
|
const selected = this.items.some((item) => item._selected === true);
|
|
16371
|
-
const unselected = this.items.some((item) => item._selected
|
|
16374
|
+
const unselected = this.items.some((item) => item._selected !== true);
|
|
16372
16375
|
return selected && unselected ? 'indeterminate' : selected;
|
|
16373
16376
|
}
|
|
16374
16377
|
get tableFilterState() {
|
|
@@ -16561,7 +16564,11 @@ class SmartTableComponent {
|
|
|
16561
16564
|
}, 0);
|
|
16562
16565
|
}
|
|
16563
16566
|
handleSelectAllChange($event) {
|
|
16567
|
+
const tableFiltered = [...this.tableFiltered];
|
|
16564
16568
|
this._items = this.items.map((item) => {
|
|
16569
|
+
if (!tableFiltered.includes(item)) {
|
|
16570
|
+
return { ...item };
|
|
16571
|
+
}
|
|
16565
16572
|
return { ...item, _selected: item._selectable !== false ? $event : !!item._selected };
|
|
16566
16573
|
});
|
|
16567
16574
|
this.selectedAllSubject.next($event);
|