@coreui/angular-pro 5.7.11 → 5.7.13
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,7 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, Directive, input, Renderer2, effect, TemplateRef, booleanAttribute, untracked, NgModule, computed, Injectable, Component,
|
|
2
|
+
import { inject, ElementRef, Directive, input, Renderer2, effect, TemplateRef, booleanAttribute, untracked, NgModule, computed, Injectable, Component, linkedSignal, output, signal, contentChildren, DestroyRef, forwardRef, DOCUMENT, NgZone, ChangeDetectorRef, contentChild, afterNextRender, Input, IterableDiffers, numberAttribute, ViewChild, ContentChildren, ViewChildren, ChangeDetectionStrategy, PLATFORM_ID, RendererFactory2, viewChildren, viewChild, Injector, ViewContainerRef, inputBinding, outputBinding, MAX_ANIMATION_TIMEOUT, KeyValueDiffers, Pipe, HostBinding, model, afterEveryRender, afterRenderEffect, HostListener, runInInjectionContext, ViewEncapsulation } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet, I18nPluralPipe, NgStyle, AsyncPipe, isPlatformServer, isPlatformBrowser, formatDate } from '@angular/common';
|
|
4
|
-
import { animation, animate, style, AnimationBuilder, useAnimation, trigger, state, transition, group, query, animateChild } from '@angular/animations';
|
|
5
4
|
import { toObservable, takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
|
6
5
|
import * as i1 from '@angular/forms';
|
|
7
6
|
import { FormsModule, NG_VALUE_ACCESSOR, FormGroup, FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
@@ -15,6 +14,7 @@ import { DomPortal, CdkPortalOutlet } from '@angular/cdk/portal';
|
|
|
15
14
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
16
15
|
import * as i1$1 from '@angular/router';
|
|
17
16
|
import { RouterModule, Router, ActivatedRoute, NavigationEnd, RouterLink } from '@angular/router';
|
|
17
|
+
import { animation, group, query, animate, style, trigger, state, transition, useAnimation, animateChild } from '@angular/animations';
|
|
18
18
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
19
19
|
import { IconDirective } from '@coreui/icons-angular';
|
|
20
20
|
|
|
@@ -266,74 +266,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
266
266
|
args: [{ selector: 'c-accordion', template: '<ng-content />', exportAs: 'cAccordionItem', providers: [AccordionService], host: { '[class]': 'hostClasses()' }, styles: [":host{display:block}\n"] }]
|
|
267
267
|
}], propDecorators: { flush: [{ type: i0.Input, args: [{ isSignal: true, alias: "flush", required: false }] }], alwaysOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "alwaysOpen", required: false }] }] } });
|
|
268
268
|
|
|
269
|
-
const expandAnimation = animation([animate('{{ time }} {{ easing }}')]);
|
|
270
|
-
const collapseAnimation = animation([
|
|
271
|
-
style({ height: '*', minHeight: '*' }),
|
|
272
|
-
animate('{{ time }} {{ easing }}', style({ height: 0, minHeight: 0 }))
|
|
273
|
-
]);
|
|
274
|
-
const expandHorizontalAnimation = animation([animate('{{ time }} {{ easing }}')]);
|
|
275
|
-
const collapseHorizontalAnimation = animation([animate('{{ time }} {{ easing }}')]);
|
|
276
|
-
|
|
277
269
|
class CollapseDirective {
|
|
278
|
-
|
|
270
|
+
static ngAcceptInputType_animate;
|
|
271
|
+
static ngAcceptInputType_horizontal;
|
|
272
|
+
static ngAcceptInputType_navbar;
|
|
273
|
+
static ngAcceptInputType_visible;
|
|
279
274
|
#hostElement = inject(ElementRef);
|
|
280
275
|
#renderer = inject(Renderer2);
|
|
281
|
-
#
|
|
282
|
-
|
|
283
|
-
afterNextRender({
|
|
284
|
-
read: () => {
|
|
285
|
-
this.#initialized.set(true);
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
}
|
|
276
|
+
#unlistenTransitionEnd;
|
|
277
|
+
#isFirstChange = true;
|
|
289
278
|
/**
|
|
290
|
-
* @ignore
|
|
279
|
+
* @ignore internal
|
|
291
280
|
*/
|
|
292
281
|
animateInput = input(true, { ...(ngDevMode ? { debugName: "animateInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'animate' });
|
|
293
|
-
animate = linkedSignal(
|
|
294
|
-
|
|
282
|
+
animate = linkedSignal(this.animateInput, /* @ts-ignore */
|
|
283
|
+
...(ngDevMode ? [{ debugName: "animate" }] : /* istanbul ignore next */ []));
|
|
295
284
|
/**
|
|
296
285
|
* Set horizontal collapsing to transition the width instead of height.
|
|
297
|
-
* @
|
|
286
|
+
* @return boolean
|
|
298
287
|
* @default false
|
|
299
288
|
*/
|
|
300
289
|
horizontal = input(false, { ...(ngDevMode ? { debugName: "horizontal" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
301
290
|
/**
|
|
302
|
-
* Toggle the visibility of collapsible element.
|
|
303
|
-
* @
|
|
291
|
+
* Toggle the visibility of a collapsible element.
|
|
292
|
+
* @return boolean
|
|
304
293
|
* @default false
|
|
305
294
|
*/
|
|
306
295
|
visibleInput = input(false, { ...(ngDevMode ? { debugName: "visibleInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'visible' });
|
|
296
|
+
/**
|
|
297
|
+
* Event emitted on visibility change. [docs]
|
|
298
|
+
* @return boolean
|
|
299
|
+
*/
|
|
307
300
|
visibleChange = output();
|
|
308
|
-
visible = linkedSignal(
|
|
309
|
-
|
|
310
|
-
...(ngDevMode ? [{ debugName: "#initialized" }] : /* istanbul ignore next */ []));
|
|
301
|
+
visible = linkedSignal(this.visibleInput, /* @ts-ignore */
|
|
302
|
+
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
311
303
|
#visibleEffect = effect(() => {
|
|
312
304
|
const visible = this.visible();
|
|
313
|
-
if (this.#
|
|
314
|
-
|
|
305
|
+
if (this.#isFirstChange || !untracked(() => this.animate())) {
|
|
306
|
+
// no transition
|
|
307
|
+
this.#isFirstChange = false;
|
|
308
|
+
this.setInitialState(visible);
|
|
309
|
+
return;
|
|
315
310
|
}
|
|
311
|
+
untracked(() => {
|
|
312
|
+
this.runTransition(visible);
|
|
313
|
+
});
|
|
316
314
|
}, /* @ts-ignore */
|
|
317
315
|
...(ngDevMode ? [{ debugName: "#visibleEffect" }] : /* istanbul ignore next */ []));
|
|
318
316
|
/**
|
|
319
|
-
* Add `navbar` prop for grouping and hiding navbar contents by a parent breakpoint.
|
|
320
|
-
* @
|
|
317
|
+
* Add a `navbar` prop for grouping and hiding navbar contents by a parent breakpoint.
|
|
318
|
+
* @return boolean
|
|
321
319
|
* @default false
|
|
322
320
|
*/
|
|
323
321
|
navbar = input(false, { ...(ngDevMode ? { debugName: "navbar" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
324
|
-
/**
|
|
325
|
-
* @ignore
|
|
326
|
-
*/
|
|
327
|
-
duration = input('350ms', /* @ts-ignore */
|
|
328
|
-
...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
|
|
329
|
-
/**
|
|
330
|
-
* @ignore
|
|
331
|
-
*/
|
|
332
|
-
transition = input('ease', /* @ts-ignore */
|
|
333
|
-
...(ngDevMode ? [{ debugName: "transition" }] : /* istanbul ignore next */ []));
|
|
334
322
|
/**
|
|
335
323
|
* Event emitted on visibility change. [docs]
|
|
336
|
-
* @
|
|
324
|
+
* @return string
|
|
337
325
|
*/
|
|
338
326
|
collapseChange = output();
|
|
339
327
|
hostClasses = computed(() => {
|
|
@@ -344,60 +332,88 @@ class CollapseDirective {
|
|
|
344
332
|
}, /* @ts-ignore */
|
|
345
333
|
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
346
334
|
ngOnDestroy() {
|
|
347
|
-
this.
|
|
335
|
+
this.clearPendingCallbacks();
|
|
348
336
|
}
|
|
349
337
|
toggle(visible = !this.visible()) {
|
|
350
338
|
this.visible.set(visible);
|
|
351
339
|
}
|
|
352
|
-
|
|
353
|
-
this.#
|
|
354
|
-
this.#
|
|
340
|
+
clearPendingCallbacks() {
|
|
341
|
+
this.#unlistenTransitionEnd?.();
|
|
342
|
+
this.#unlistenTransitionEnd = undefined;
|
|
355
343
|
}
|
|
356
|
-
|
|
357
|
-
if (this.#player?.hasStarted()) {
|
|
358
|
-
this.destroyPlayer();
|
|
359
|
-
}
|
|
344
|
+
setInitialState(visible) {
|
|
360
345
|
const host = this.#hostElement.nativeElement;
|
|
346
|
+
this.#renderer.addClass(host, 'collapse');
|
|
347
|
+
this.#renderer.removeClass(host, 'collapsing');
|
|
361
348
|
if (visible) {
|
|
362
|
-
this.#renderer.
|
|
349
|
+
this.#renderer.addClass(host, 'show');
|
|
363
350
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
351
|
+
else {
|
|
352
|
+
this.#renderer.removeClass(host, 'show');
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
runTransition(visible) {
|
|
356
|
+
this.clearPendingCallbacks();
|
|
357
|
+
const host = this.#hostElement.nativeElement;
|
|
367
358
|
const dimension = this.horizontal() ? 'width' : 'height';
|
|
368
359
|
const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
|
369
360
|
const scrollSize = `scroll${capitalizedDimension}`;
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
!visible && host.offsetHeight && host.style[dimension] && host.scrollHeight;
|
|
373
|
-
this.#renderer.setStyle(host, dimension, visible ? 0 : `${host.getBoundingClientRect()[dimension]}px`);
|
|
374
|
-
this.#player.onStart(() => {
|
|
361
|
+
const animate = this.animate();
|
|
362
|
+
if (visible) {
|
|
375
363
|
this.setMaxSize();
|
|
364
|
+
// Switch off `collapse`/`show` before we measure its scroll size below.
|
|
376
365
|
this.#renderer.removeClass(host, 'collapse');
|
|
366
|
+
this.#renderer.removeClass(host, 'show');
|
|
377
367
|
this.#renderer.addClass(host, 'collapsing');
|
|
368
|
+
this.collapseChange?.emit('opening');
|
|
369
|
+
// Reading scrollHeight/scrollWidth forces a synchronous reflow, committing the 0-size
|
|
370
|
+
// starting point before we set the target size below, so the browser animates the change.
|
|
371
|
+
const targetSize = host[scrollSize];
|
|
372
|
+
this.#renderer.setStyle(host, dimension, `${targetSize}px`);
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
// Lock in the current pixel size first so the browser has a committed starting point,
|
|
376
|
+
// then switch to the collapsing state and clear it so the size can animate down to 0.
|
|
377
|
+
const startSize = host.getBoundingClientRect()[dimension];
|
|
378
|
+
this.#renderer.setStyle(host, dimension, `${startSize}px`);
|
|
379
|
+
// Force a reflow so the browser registers the starting size before the next style change.
|
|
380
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
381
|
+
host.offsetHeight;
|
|
382
|
+
this.#renderer.removeClass(host, 'collapse');
|
|
378
383
|
this.#renderer.removeClass(host, 'show');
|
|
379
|
-
this.#renderer.
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
this.#
|
|
384
|
+
this.#renderer.addClass(host, 'collapsing');
|
|
385
|
+
this.collapseChange?.emit('collapsing');
|
|
386
|
+
// Now that the starting size is committed, set the target size (0) so the browser
|
|
387
|
+
// animates the transition down.
|
|
388
|
+
this.#renderer.setStyle(host, dimension, '0px');
|
|
389
|
+
}
|
|
390
|
+
const finish = () => this.finishTransition(visible, host, dimension);
|
|
391
|
+
if (animate) {
|
|
392
|
+
this.#unlistenTransitionEnd = this.#renderer.listen(host, 'transitionend', (event) => {
|
|
393
|
+
// Ignore bubbled transitionend events from descendant elements.
|
|
394
|
+
if (event.target === host && event.propertyName === dimension) {
|
|
395
|
+
finish();
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
finish();
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
finishTransition(visible, host, dimension) {
|
|
404
|
+
this.clearPendingCallbacks();
|
|
405
|
+
this.#renderer.removeClass(host, 'collapsing');
|
|
406
|
+
this.#renderer.addClass(host, 'collapse');
|
|
407
|
+
if (visible) {
|
|
408
|
+
this.#renderer.addClass(host, 'show');
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
this.#renderer.removeClass(host, 'show');
|
|
412
|
+
}
|
|
413
|
+
this.#renderer.removeStyle(host, 'transition');
|
|
414
|
+
this.#renderer.removeStyle(host, dimension);
|
|
415
|
+
this.collapseChange?.emit(visible ? 'open' : 'collapsed');
|
|
416
|
+
this.visibleChange?.emit(visible);
|
|
401
417
|
}
|
|
402
418
|
setMaxSize() {
|
|
403
419
|
const host = this.#hostElement.nativeElement;
|
|
@@ -408,16 +424,16 @@ class CollapseDirective {
|
|
|
408
424
|
}
|
|
409
425
|
}
|
|
410
426
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CollapseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
411
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", 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 }
|
|
427
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", 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 } }, outputs: { visibleChange: "visibleChange", collapseChange: "collapseChange" }, host: { properties: { "class": "hostClasses()" } }, exportAs: ["cCollapse"], ngImport: i0 });
|
|
412
428
|
}
|
|
413
429
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CollapseDirective, decorators: [{
|
|
414
430
|
type: Directive,
|
|
415
431
|
args: [{
|
|
416
432
|
selector: '[cCollapse]',
|
|
417
433
|
exportAs: 'cCollapse',
|
|
418
|
-
host: { '[class]': 'hostClasses()'
|
|
434
|
+
host: { '[class]': 'hostClasses()' }
|
|
419
435
|
}]
|
|
420
|
-
}],
|
|
436
|
+
}], propDecorators: { animateInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], horizontal: [{ type: i0.Input, args: [{ isSignal: true, alias: "horizontal", required: false }] }], visibleInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }], visibleChange: [{ type: i0.Output, args: ["visibleChange"] }], navbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "navbar", required: false }] }], collapseChange: [{ type: i0.Output, args: ["collapseChange"] }] } });
|
|
421
437
|
|
|
422
438
|
class CollapseModule {
|
|
423
439
|
static forRoot() {
|
|
@@ -478,7 +494,7 @@ class AccordionItemComponent {
|
|
|
478
494
|
this.#accordionService.toggleItem(this);
|
|
479
495
|
}
|
|
480
496
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
481
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.0", type: AccordionItemComponent, isStandalone: true, selector: "c-accordion-item", inputs: { visibleInput: { classPropertyName: "visibleInput", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "accordion-item" }, queries: [{ propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true, isSignal: true }], exportAs: ["cAccordionItem"], ngImport: i0, template: "@let tmpl = templates();\n<ng-container>\n <div class=\"accordion-header\">\n <ng-container *ngTemplateOutlet=\"tmpl['accordionHeaderTemplate'] || defaultAccordionHeaderTemplate; context: itemContext\" />\n </div>\n <div class=\"accordion-collapse\" cCollapse [visible]=\"itemVisible()\" [attr.aria-expanded]=\"itemVisible()\" [id]=\"contentId\">\n <ng-container *ngTemplateOutlet=\"tmpl['accordionBodyTemplate'] || defaultAccordionBodyTemplate; context: itemContext\" />\n </div>\n</ng-container>\n\n<ng-template #defaultAccordionHeaderTemplate>\n <button cAccordionButton [collapsed]=\"!itemVisible()\" [attr.aria-controls]=\"contentId\" (click)=\"toggleItem()\">\n <ng-container *ngTemplateOutlet=\"tmpl['accordionHeader'] || defaultAccordionHeaderContentTemplate; context: itemContext\" />\n </button>\n</ng-template>\n\n<ng-template #defaultAccordionHeaderContentTemplate>\n <ng-content />\n</ng-template>\n\n<ng-template #defaultAccordionBodyTemplate>\n <div class=\"accordion-body\">\n <ng-container *ngTemplateOutlet=\"tmpl['accordionBody'] || defaultAccordionBodyContentTemplate; context: itemContext\" />\n </div>\n</ng-template>\n\n<ng-template #defaultAccordionBodyContentTemplate>\n <ng-content />\n</ng-template>\n", styles: [":host{display:block;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: AccordionButtonDirective, selector: "[cAccordionButton]", inputs: ["collapsed", "type"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CollapseDirective, selector: "[cCollapse]", inputs: ["animate", "horizontal", "visible", "navbar"
|
|
497
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.0", type: AccordionItemComponent, isStandalone: true, selector: "c-accordion-item", inputs: { visibleInput: { classPropertyName: "visibleInput", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "accordion-item" }, queries: [{ propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true, isSignal: true }], exportAs: ["cAccordionItem"], ngImport: i0, template: "@let tmpl = templates();\n<ng-container>\n <div class=\"accordion-header\">\n <ng-container *ngTemplateOutlet=\"tmpl['accordionHeaderTemplate'] || defaultAccordionHeaderTemplate; context: itemContext\" />\n </div>\n <div class=\"accordion-collapse\" cCollapse [visible]=\"itemVisible()\" [attr.aria-expanded]=\"itemVisible()\" [id]=\"contentId\">\n <ng-container *ngTemplateOutlet=\"tmpl['accordionBodyTemplate'] || defaultAccordionBodyTemplate; context: itemContext\" />\n </div>\n</ng-container>\n\n<ng-template #defaultAccordionHeaderTemplate>\n <button cAccordionButton [collapsed]=\"!itemVisible()\" [attr.aria-controls]=\"contentId\" (click)=\"toggleItem()\">\n <ng-container *ngTemplateOutlet=\"tmpl['accordionHeader'] || defaultAccordionHeaderContentTemplate; context: itemContext\" />\n </button>\n</ng-template>\n\n<ng-template #defaultAccordionHeaderContentTemplate>\n <ng-content />\n</ng-template>\n\n<ng-template #defaultAccordionBodyTemplate>\n <div class=\"accordion-body\">\n <ng-container *ngTemplateOutlet=\"tmpl['accordionBody'] || defaultAccordionBodyContentTemplate; context: itemContext\" />\n </div>\n</ng-template>\n\n<ng-template #defaultAccordionBodyContentTemplate>\n <ng-content />\n</ng-template>\n", styles: [":host{display:block;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: AccordionButtonDirective, selector: "[cAccordionButton]", inputs: ["collapsed", "type"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CollapseDirective, selector: "[cCollapse]", inputs: ["animate", "horizontal", "visible", "navbar"], outputs: ["visibleChange", "collapseChange"], exportAs: ["cCollapse"] }] });
|
|
482
498
|
}
|
|
483
499
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
484
500
|
type: Component,
|
|
@@ -5013,6 +5029,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
5013
5029
|
}] });
|
|
5014
5030
|
|
|
5015
5031
|
class AlertComponent {
|
|
5032
|
+
#hostElement = inject(ElementRef);
|
|
5033
|
+
#maxAnimationTimeout = inject(MAX_ANIMATION_TIMEOUT);
|
|
5016
5034
|
/**
|
|
5017
5035
|
* Sets the color context of the component to one of CoreUI’s themed colors.
|
|
5018
5036
|
* @return Colors
|
|
@@ -5034,50 +5052,42 @@ class AlertComponent {
|
|
|
5034
5052
|
variant = input(/* @ts-ignore */
|
|
5035
5053
|
...(ngDevMode ? [undefined, { debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
5036
5054
|
/**
|
|
5037
|
-
* Optionally adds a close button to alert and allow it to self
|
|
5055
|
+
* Optionally adds a close button to the alert and allow it to self-dismiss.
|
|
5038
5056
|
* @return boolean
|
|
5039
5057
|
* @default false
|
|
5040
5058
|
*/
|
|
5041
|
-
|
|
5042
|
-
#dismissible = linkedSignal({ ...(ngDevMode ? { debugName: "#dismissible" } : /* istanbul ignore next */ {}), source: this.dismissibleInput,
|
|
5043
|
-
computation: (value) => {
|
|
5044
|
-
return value;
|
|
5045
|
-
} });
|
|
5046
|
-
set dismissible(value) {
|
|
5047
|
-
this.#dismissible.set(value);
|
|
5048
|
-
}
|
|
5049
|
-
get dismissible() {
|
|
5050
|
-
return this.#dismissible();
|
|
5051
|
-
}
|
|
5059
|
+
dismissible = input(false, { ...(ngDevMode ? { debugName: "dismissible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
5052
5060
|
/**
|
|
5053
5061
|
* Adds animation for dismissible alert.
|
|
5054
5062
|
* @return boolean
|
|
5055
5063
|
*/
|
|
5056
5064
|
fade = input(false, { ...(ngDevMode ? { debugName: "fade" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
5057
5065
|
/**
|
|
5058
|
-
* Toggle the visibility of alert component.
|
|
5066
|
+
* Toggle the visibility of the alert component.
|
|
5059
5067
|
* @return boolean
|
|
5060
5068
|
*/
|
|
5061
5069
|
visibleInput = input(true, { ...(ngDevMode ? { debugName: "visibleInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'visible' });
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
return value;
|
|
5065
|
-
} });
|
|
5066
|
-
set visible(value) {
|
|
5067
|
-
if (this.#visible() !== value) {
|
|
5068
|
-
this.#visible.set(value);
|
|
5069
|
-
this.visibleChange?.emit(value);
|
|
5070
|
-
}
|
|
5071
|
-
}
|
|
5072
|
-
get visible() {
|
|
5073
|
-
return this.#visible();
|
|
5074
|
-
}
|
|
5075
|
-
hide = signal(false, /* @ts-ignore */
|
|
5076
|
-
...(ngDevMode ? [{ debugName: "hide" }] : /* istanbul ignore next */ []));
|
|
5070
|
+
visible = linkedSignal(this.visibleInput, /* @ts-ignore */
|
|
5071
|
+
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
5077
5072
|
/**
|
|
5078
|
-
* Event triggered on the alert
|
|
5073
|
+
* Event triggered on the alert visibility change.
|
|
5074
|
+
* @return boolean
|
|
5079
5075
|
*/
|
|
5080
5076
|
visibleChange = output();
|
|
5077
|
+
hide = signal(false, /* @ts-ignore */
|
|
5078
|
+
...(ngDevMode ? [{ debugName: "hide" }] : /* istanbul ignore next */ []));
|
|
5079
|
+
#visibleEffect = effect(() => {
|
|
5080
|
+
const visible = this.visible();
|
|
5081
|
+
if (visible) {
|
|
5082
|
+
this.hide.set(false);
|
|
5083
|
+
}
|
|
5084
|
+
}, /* @ts-ignore */
|
|
5085
|
+
...(ngDevMode ? [{ debugName: "#visibleEffect" }] : /* istanbul ignore next */ []));
|
|
5086
|
+
#hideEffect = effect(() => {
|
|
5087
|
+
const hide = this.hide();
|
|
5088
|
+
this.visibleChange.emit(!hide);
|
|
5089
|
+
}, /* @ts-ignore */
|
|
5090
|
+
...(ngDevMode ? [{ debugName: "#hideEffect" }] : /* istanbul ignore next */ []));
|
|
5081
5091
|
contentTemplates = contentChildren(TemplateIdDirective, { ...(ngDevMode ? { debugName: "contentTemplates" } : /* istanbul ignore next */ {}), descendants: true });
|
|
5082
5092
|
templates = computed(() => {
|
|
5083
5093
|
return this.contentTemplates().reduce((acc, child) => {
|
|
@@ -5086,72 +5096,58 @@ class AlertComponent {
|
|
|
5086
5096
|
}, {});
|
|
5087
5097
|
}, /* @ts-ignore */
|
|
5088
5098
|
...(ngDevMode ? [{ debugName: "templates" }] : /* istanbul ignore next */ []));
|
|
5089
|
-
get animateType() {
|
|
5090
|
-
return this.visible ? 'show' : 'hide';
|
|
5091
|
-
}
|
|
5092
5099
|
hostClasses = computed(() => {
|
|
5093
5100
|
const color = this.color();
|
|
5094
5101
|
const variant = this.variant();
|
|
5102
|
+
const visible = this.visible();
|
|
5095
5103
|
return {
|
|
5096
5104
|
alert: true,
|
|
5097
|
-
'alert-dismissible': this.dismissible,
|
|
5105
|
+
'alert-dismissible': this.dismissible(),
|
|
5098
5106
|
fade: this.fade(),
|
|
5099
|
-
show:
|
|
5107
|
+
show: visible,
|
|
5108
|
+
'd-none': this.hide() && !visible,
|
|
5100
5109
|
[`alert-${color}`]: !!color && variant !== 'solid',
|
|
5101
5110
|
[`bg-${color}`]: !!color && variant === 'solid',
|
|
5102
5111
|
'text-white': !!color && variant === 'solid'
|
|
5103
5112
|
};
|
|
5104
5113
|
}, /* @ts-ignore */
|
|
5105
5114
|
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
onAnimationDone($event) {
|
|
5110
|
-
this.onAnimationEvent($event);
|
|
5111
|
-
}
|
|
5112
|
-
onAnimationEvent(event) {
|
|
5113
|
-
this.hide.set(event.phaseName === 'start' && event.toState === 'show');
|
|
5114
|
-
if (event.phaseName === 'done') {
|
|
5115
|
-
this.hide.set(event.toState === 'hide' || event.toState === 'void');
|
|
5116
|
-
if (event.toState === 'show') {
|
|
5115
|
+
onTransitionStart($event) {
|
|
5116
|
+
if ($event.propertyName === 'opacity') {
|
|
5117
|
+
if (this.visible()) {
|
|
5117
5118
|
this.hide.set(false);
|
|
5118
5119
|
}
|
|
5119
5120
|
}
|
|
5120
5121
|
}
|
|
5122
|
+
onTransitionEnd($event) {
|
|
5123
|
+
if ($event.propertyName === 'opacity') {
|
|
5124
|
+
this.hide.set(!this.visible());
|
|
5125
|
+
}
|
|
5126
|
+
}
|
|
5127
|
+
#leavingInProgress = false;
|
|
5128
|
+
handleLeaving($event) {
|
|
5129
|
+
if (this.#leavingInProgress)
|
|
5130
|
+
return;
|
|
5131
|
+
this.#leavingInProgress = true;
|
|
5132
|
+
this.#hostElement.nativeElement.classList.remove('show');
|
|
5133
|
+
setTimeout(() => {
|
|
5134
|
+
$event.animationComplete();
|
|
5135
|
+
}, this.#maxAnimationTimeout);
|
|
5136
|
+
}
|
|
5121
5137
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5122
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: AlertComponent, isStandalone: true, selector: "c-alert", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null },
|
|
5123
|
-
trigger('fadeInOut', [
|
|
5124
|
-
state('show', style({ opacity: 1, height: '*', padding: '*', border: '*', margin: '*' })),
|
|
5125
|
-
state('hide', style({ opacity: 0, height: 0, padding: 0, border: 0, margin: 0 })),
|
|
5126
|
-
state('void', style({ opacity: 0, height: 0, padding: 0, border: 0, margin: 0 })),
|
|
5127
|
-
transition('show => hide', [animate('.3s ease-out')]),
|
|
5128
|
-
transition('hide => show', [animate('.3s ease-in')]),
|
|
5129
|
-
transition('show => void', [animate('.3s ease-out')]),
|
|
5130
|
-
transition('void => show', [animate('.3s ease-in')])
|
|
5131
|
-
])
|
|
5132
|
-
] });
|
|
5138
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: AlertComponent, isStandalone: true, selector: "c-alert", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, fade: { classPropertyName: "fade", publicName: "fade", isSignal: true, isRequired: false, transformFunction: null }, visibleInput: { classPropertyName: "visibleInput", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visibleChange: "visibleChange" }, host: { listeners: { "animate.leave": "handleLeaving($event)", "transitionend": "onTransitionEnd($event)", "transitionstart": "onTransitionStart($event)" }, properties: { "attr.role": "role()", "class": "hostClasses()", "attr.hidden": "hide() ? \"\" : null" } }, providers: [{ provide: MAX_ANIMATION_TIMEOUT, useValue: 300 }], queries: [{ propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true, isSignal: true }], exportAs: ["cAlert"], ngImport: i0, template: "@if (visible() || !hide()) {\n @if (dismissible()) {\n <ng-container *ngTemplateOutlet=\"templates()?.['alertButtonCloseTemplate'] || defaultAlertButtonCloseTemplate\" />\n }\n <ng-content />\n}\n<ng-template #defaultAlertButtonCloseTemplate>\n <button (click)=\"visible.set(false)\" aria-label=\"Close\" cButtonClose></button>\n</ng-template>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ButtonCloseDirective, selector: "[cButtonClose]", inputs: ["white"] }] });
|
|
5133
5139
|
}
|
|
5134
5140
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AlertComponent, decorators: [{
|
|
5135
5141
|
type: Component,
|
|
5136
|
-
args: [{ selector: 'c-alert', exportAs: 'cAlert', imports: [NgTemplateOutlet, ButtonCloseDirective],
|
|
5137
|
-
trigger('fadeInOut', [
|
|
5138
|
-
state('show', style({ opacity: 1, height: '*', padding: '*', border: '*', margin: '*' })),
|
|
5139
|
-
state('hide', style({ opacity: 0, height: 0, padding: 0, border: 0, margin: 0 })),
|
|
5140
|
-
state('void', style({ opacity: 0, height: 0, padding: 0, border: 0, margin: 0 })),
|
|
5141
|
-
transition('show => hide', [animate('.3s ease-out')]),
|
|
5142
|
-
transition('hide => show', [animate('.3s ease-in')]),
|
|
5143
|
-
transition('show => void', [animate('.3s ease-out')]),
|
|
5144
|
-
transition('void => show', [animate('.3s ease-in')])
|
|
5145
|
-
])
|
|
5146
|
-
], host: {
|
|
5147
|
-
'[@.disabled]': '!fade()',
|
|
5148
|
-
'[@fadeInOut]': 'animateType',
|
|
5142
|
+
args: [{ selector: 'c-alert', exportAs: 'cAlert', imports: [NgTemplateOutlet, ButtonCloseDirective], host: {
|
|
5149
5143
|
'[attr.role]': 'role()',
|
|
5150
5144
|
'[class]': 'hostClasses()',
|
|
5151
|
-
'(
|
|
5152
|
-
'(
|
|
5153
|
-
|
|
5154
|
-
|
|
5145
|
+
'(animate.leave)': 'handleLeaving($event)',
|
|
5146
|
+
'(transitionend)': 'onTransitionEnd($event)',
|
|
5147
|
+
'(transitionstart)': 'onTransitionStart($event)',
|
|
5148
|
+
'[attr.hidden]': 'hide() ? "" : null'
|
|
5149
|
+
}, providers: [{ provide: MAX_ANIMATION_TIMEOUT, useValue: 300 }], template: "@if (visible() || !hide()) {\n @if (dismissible()) {\n <ng-container *ngTemplateOutlet=\"templates()?.['alertButtonCloseTemplate'] || defaultAlertButtonCloseTemplate\" />\n }\n <ng-content />\n}\n<ng-template #defaultAlertButtonCloseTemplate>\n <button (click)=\"visible.set(false)\" aria-label=\"Close\" cButtonClose></button>\n</ng-template>\n", styles: [":host{display:block}\n"] }]
|
|
5150
|
+
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], fade: [{ type: i0.Input, args: [{ isSignal: true, alias: "fade", required: false }] }], visibleInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }], visibleChange: [{ type: i0.Output, args: ["visibleChange"] }], contentTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TemplateIdDirective), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
5155
5151
|
|
|
5156
5152
|
class AlertModule {
|
|
5157
5153
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -12484,46 +12480,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
12484
12480
|
}]
|
|
12485
12481
|
}] });
|
|
12486
12482
|
|
|
12487
|
-
const loadingButtonAnimation = trigger('loadingButton', [
|
|
12488
|
-
transition(':enter', [
|
|
12489
|
-
style({
|
|
12490
|
-
opacity: 0,
|
|
12491
|
-
marginRight: '1rem',
|
|
12492
|
-
marginLeft: '-2rem'
|
|
12493
|
-
}),
|
|
12494
|
-
animate('.15s ease-in-out', style({
|
|
12495
|
-
opacity: 1,
|
|
12496
|
-
marginRight: '1rem',
|
|
12497
|
-
marginLeft: '0rem'
|
|
12498
|
-
}))
|
|
12499
|
-
]),
|
|
12500
|
-
transition(':leave', [
|
|
12501
|
-
style({
|
|
12502
|
-
opacity: 1
|
|
12503
|
-
}),
|
|
12504
|
-
animate('.15s ease-in-out', style({
|
|
12505
|
-
opacity: 0,
|
|
12506
|
-
marginRight: '1rem',
|
|
12507
|
-
marginLeft: '-2rem'
|
|
12508
|
-
}))
|
|
12509
|
-
])
|
|
12510
|
-
]);
|
|
12511
|
-
|
|
12512
12483
|
class LoadingButtonComponent extends ButtonDirective {
|
|
12513
12484
|
/**
|
|
12514
|
-
* Makes button disabled when loading.
|
|
12515
|
-
* @
|
|
12485
|
+
* Makes a button disabled when loading.
|
|
12486
|
+
* @return boolean
|
|
12516
12487
|
* @default false
|
|
12517
12488
|
*/
|
|
12518
12489
|
disabledOnLoading = input(false, { ...(ngDevMode ? { debugName: "disabledOnLoading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
12519
12490
|
/**
|
|
12520
12491
|
* Loading state (set to true to start animation).
|
|
12521
|
-
* @
|
|
12492
|
+
* @return boolean
|
|
12522
12493
|
*/
|
|
12523
12494
|
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
12524
12495
|
/**
|
|
12525
12496
|
* Event emitted on loading change
|
|
12526
|
-
* @
|
|
12497
|
+
* @return boolean
|
|
12527
12498
|
*/
|
|
12528
12499
|
loadingChange = output();
|
|
12529
12500
|
loadingEffect = effect(() => {
|
|
@@ -12531,8 +12502,8 @@ class LoadingButtonComponent extends ButtonDirective {
|
|
|
12531
12502
|
}, /* @ts-ignore */
|
|
12532
12503
|
...(ngDevMode ? [{ debugName: "loadingEffect" }] : /* istanbul ignore next */ []));
|
|
12533
12504
|
/**
|
|
12534
|
-
* Sets type of spinner.
|
|
12535
|
-
* @
|
|
12505
|
+
* Sets a type of spinner.
|
|
12506
|
+
* @return {'border' | 'grow'}
|
|
12536
12507
|
*/
|
|
12537
12508
|
spinnerType = input('border', /* @ts-ignore */
|
|
12538
12509
|
...(ngDevMode ? [{ debugName: "spinnerType" }] : /* istanbul ignore next */ []));
|
|
@@ -12561,11 +12532,22 @@ class LoadingButtonComponent extends ButtonDirective {
|
|
|
12561
12532
|
}, /* @ts-ignore */
|
|
12562
12533
|
...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
12563
12534
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: LoadingButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12564
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: LoadingButtonComponent, isStandalone: true, selector: "button[cLoadingButton], a[cLoadingButton]", inputs: { disabledOnLoading: { classPropertyName: "disabledOnLoading", publicName: "disabledOnLoading", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, spinnerType: { classPropertyName: "spinnerType", publicName: "spinnerType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loadingChange: "loadingChange" }, host: { properties: { "class": "hostClasses()", "attr.aria-disabled": "ariaDisabled()", "attr.aria-pressed": "isActive()", "attr.disabled": "attrDisabled()", "attr.tabindex": "tabIndex()", "attr.type": "type()" }, classAttribute: "btn-loading" }, exportAs: ["cLoadingButton"], usesInheritance: true, ngImport: i0, template:
|
|
12535
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: LoadingButtonComponent, isStandalone: true, selector: "button[cLoadingButton], a[cLoadingButton]", inputs: { disabledOnLoading: { classPropertyName: "disabledOnLoading", publicName: "disabledOnLoading", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, spinnerType: { classPropertyName: "spinnerType", publicName: "spinnerType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loadingChange: "loadingChange" }, host: { properties: { "class": "hostClasses()", "attr.aria-disabled": "ariaDisabled()", "attr.aria-pressed": "isActive()", "attr.disabled": "attrDisabled()", "attr.tabindex": "tabIndex()", "attr.type": "type()" }, classAttribute: "btn-loading" }, exportAs: ["cLoadingButton"], usesInheritance: true, ngImport: i0, template: `
|
|
12536
|
+
@if (loading()) {
|
|
12537
|
+
<c-spinner
|
|
12538
|
+
[variant]="spinnerType()"
|
|
12539
|
+
size="sm"
|
|
12540
|
+
class="btn-loading-spinner"
|
|
12541
|
+
animate.enter="spinner-enter"
|
|
12542
|
+
animate.leave="spinner-leave"
|
|
12543
|
+
/>
|
|
12544
|
+
}
|
|
12545
|
+
<ng-content />
|
|
12546
|
+
`, isInline: true, styles: [":host ::ng-deep .btn-loading-spinner{margin-inline-end:1rem;margin-inline-start:0}.spinner-enter{animation:spinnerEnter .15s ease-in-out}@keyframes spinnerEnter{0%{opacity:0;margin-inline-start:-2rem}to{opacity:1;margin-inline-start:0}}.spinner-leave{animation:spinnerLeave .15s ease-in-out}@keyframes spinnerLeave{0%{opacity:1;margin-inline-start:0}to{opacity:0;margin-inline-start:-2rem}}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "c-spinner", inputs: ["color", "label", "size", "variant", "role"] }] });
|
|
12565
12547
|
}
|
|
12566
12548
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: LoadingButtonComponent, decorators: [{
|
|
12567
12549
|
type: Component,
|
|
12568
|
-
args: [{ selector: 'button[cLoadingButton], a[cLoadingButton]', exportAs: 'cLoadingButton', imports: [SpinnerComponent],
|
|
12550
|
+
args: [{ selector: 'button[cLoadingButton], a[cLoadingButton]', exportAs: 'cLoadingButton', imports: [SpinnerComponent], host: {
|
|
12569
12551
|
class: 'btn-loading',
|
|
12570
12552
|
'[class]': 'hostClasses()',
|
|
12571
12553
|
'[attr.aria-disabled]': 'ariaDisabled()',
|
|
@@ -12573,7 +12555,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
12573
12555
|
'[attr.disabled]': 'attrDisabled()',
|
|
12574
12556
|
'[attr.tabindex]': 'tabIndex()',
|
|
12575
12557
|
'[attr.type]': 'type()'
|
|
12576
|
-
}, template:
|
|
12558
|
+
}, template: `
|
|
12559
|
+
@if (loading()) {
|
|
12560
|
+
<c-spinner
|
|
12561
|
+
[variant]="spinnerType()"
|
|
12562
|
+
size="sm"
|
|
12563
|
+
class="btn-loading-spinner"
|
|
12564
|
+
animate.enter="spinner-enter"
|
|
12565
|
+
animate.leave="spinner-leave"
|
|
12566
|
+
/>
|
|
12567
|
+
}
|
|
12568
|
+
<ng-content />
|
|
12569
|
+
`, styles: [":host ::ng-deep .btn-loading-spinner{margin-inline-end:1rem;margin-inline-start:0}.spinner-enter{animation:spinnerEnter .15s ease-in-out}@keyframes spinnerEnter{0%{opacity:0;margin-inline-start:-2rem}to{opacity:1;margin-inline-start:0}}.spinner-leave{animation:spinnerLeave .15s ease-in-out}@keyframes spinnerLeave{0%{opacity:1;margin-inline-start:0}to{opacity:0;margin-inline-start:-2rem}}\n"] }]
|
|
12577
12570
|
}], ctorParameters: () => [], propDecorators: { disabledOnLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledOnLoading", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingChange: [{ type: i0.Output, args: ["loadingChange"] }], spinnerType: [{ type: i0.Input, args: [{ isSignal: true, alias: "spinnerType", required: false }] }] } });
|
|
12578
12571
|
|
|
12579
12572
|
class LoadingButtonModule {
|
|
@@ -12907,12 +12900,11 @@ class NavbarComponent {
|
|
|
12907
12900
|
if (!collapse) {
|
|
12908
12901
|
return;
|
|
12909
12902
|
}
|
|
12910
|
-
const animate = collapse.animate();
|
|
12911
12903
|
collapse.animate.set(false);
|
|
12912
12904
|
collapse.toggle(false);
|
|
12913
12905
|
setTimeout(() => {
|
|
12914
12906
|
collapse.toggle(result.matches);
|
|
12915
|
-
setTimeout(() => collapse.animate.set(
|
|
12907
|
+
setTimeout(() => collapse.animate.set(collapse.animateInput()));
|
|
12916
12908
|
});
|
|
12917
12909
|
});
|
|
12918
12910
|
onCleanup(() => subscription.unsubscribe());
|
|
@@ -12993,27 +12985,29 @@ class NavbarTogglerDirective {
|
|
|
12993
12985
|
}
|
|
12994
12986
|
/**
|
|
12995
12987
|
* Reference to navbar collapse element (via # template variable) . [docs]
|
|
12996
|
-
* @
|
|
12988
|
+
* @return string
|
|
12997
12989
|
* @default 'button'
|
|
12998
12990
|
*/
|
|
12999
12991
|
collapseRef = input(undefined, { ...(ngDevMode ? { debugName: "collapseRef" } : /* istanbul ignore next */ {}), alias: 'cNavbarToggler' });
|
|
13000
12992
|
/**
|
|
13001
12993
|
* Default type for navbar-toggler. [docs]
|
|
13002
|
-
* @
|
|
12994
|
+
* @return string
|
|
13003
12995
|
* @default 'button'
|
|
13004
12996
|
*/
|
|
13005
12997
|
type = input('button', /* @ts-ignore */
|
|
13006
12998
|
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
13007
12999
|
/**
|
|
13008
13000
|
* Default aria-label attr for navbar-toggler. [docs]
|
|
13009
|
-
* @
|
|
13001
|
+
* @return string
|
|
13010
13002
|
* @default 'Toggle navigation'
|
|
13011
13003
|
*/
|
|
13012
13004
|
ariaLabel = input('Toggle navigation', /* @ts-ignore */
|
|
13013
13005
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
13014
13006
|
handleClick($event) {
|
|
13015
13007
|
const collapseRef = this.collapseRef();
|
|
13016
|
-
|
|
13008
|
+
if (collapseRef) {
|
|
13009
|
+
collapseRef?.toggle(!collapseRef?.visible());
|
|
13010
|
+
}
|
|
13017
13011
|
}
|
|
13018
13012
|
addDefaultIcon() {
|
|
13019
13013
|
const span = this.#renderer.createElement('span');
|
|
@@ -13913,6 +13907,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
13913
13907
|
}] });
|
|
13914
13908
|
|
|
13915
13909
|
class OtpService {
|
|
13910
|
+
count = signal(0, /* @ts-ignore */
|
|
13911
|
+
...(ngDevMode ? [{ debugName: "count" }] : /* istanbul ignore next */ []));
|
|
13916
13912
|
disabled = signal(false, /* @ts-ignore */
|
|
13917
13913
|
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
13918
13914
|
masked = signal(false, /* @ts-ignore */
|
|
@@ -13986,12 +13982,22 @@ class OtpDirective {
|
|
|
13986
13982
|
...(ngDevMode ? [{ debugName: "tabIndex" }] : /* istanbul ignore next */ []));
|
|
13987
13983
|
index = signal(undefined, /* @ts-ignore */
|
|
13988
13984
|
...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
|
|
13985
|
+
// Only the first slot advertises the one-time code, so SMS autofill and
|
|
13986
|
+
// password managers target a single field instead of every slot.
|
|
13987
|
+
autocomplete = computed(() => (this.index() === 0 ? 'one-time-code' : 'off'), /* @ts-ignore */
|
|
13988
|
+
...(ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []));
|
|
13989
|
+
// An empty first slot is where autofill lands, so it has to accept the whole
|
|
13990
|
+
// code; once it holds a character, it behaves like every other slot.
|
|
13991
|
+
maxLength = computed(() => (this.index() === 0 && !this.value() ? this.#otpService.count() || 1 : 1), /* @ts-ignore */
|
|
13992
|
+
...(ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []));
|
|
13993
|
+
enterKeyHint = computed(() => (this.index() === this.#otpService.count() - 1 ? 'done' : 'next'), /* @ts-ignore */
|
|
13994
|
+
...(ngDevMode ? [{ debugName: "enterKeyHint" }] : /* istanbul ignore next */ []));
|
|
13989
13995
|
focus(origin) {
|
|
13990
13996
|
if (!this.disabled) {
|
|
13991
13997
|
this.hostElement.nativeElement.focus();
|
|
13992
13998
|
this.focusable.set(true);
|
|
13993
13999
|
}
|
|
13994
|
-
// console.log('focus called with origin:', origin, this.index());
|
|
14000
|
+
// console.log('focus called with origin: ', origin, this.index());
|
|
13995
14001
|
}
|
|
13996
14002
|
#otpServiceEffect = effect(() => {
|
|
13997
14003
|
this.#disabled.set(this.#otpService.disabled());
|
|
@@ -14017,7 +14023,7 @@ class OtpDirective {
|
|
|
14017
14023
|
}
|
|
14018
14024
|
}
|
|
14019
14025
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OtpDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14020
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: OtpDirective, isStandalone: true, selector: "input[cOtp]", inputs: { placeholderInput: { classPropertyName: "placeholderInput", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "selectionchange": "handleSelectionChange($event)" }, properties: { "class": "hostClasses()", "attr.inputMode": "inputMode()", "attr.maxLength": "
|
|
14026
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: OtpDirective, isStandalone: true, selector: "input[cOtp]", inputs: { placeholderInput: { classPropertyName: "placeholderInput", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "selectionchange": "handleSelectionChange($event)" }, properties: { "class": "hostClasses()", "attr.inputMode": "inputMode()", "attr.maxLength": "maxLength()", "autocomplete": "autocomplete()", "attr.autocapitalize": "\"off\"", "attr.autocorrect": "\"off\"", "attr.enterkeyhint": "enterKeyHint()", "attr.spellcheck": "\"false\"", "attr.pattern": "pattern()", "placeholder": "placeholder()", "readOnly": "readOnly()", "tabIndex": "tabIndex()", "attr.type": "inputType()" }, classAttribute: "form-otp-control" }, ngImport: i0 });
|
|
14021
14027
|
}
|
|
14022
14028
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OtpDirective, decorators: [{
|
|
14023
14029
|
type: Directive,
|
|
@@ -14028,8 +14034,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
14028
14034
|
class: 'form-otp-control',
|
|
14029
14035
|
'[class]': 'hostClasses()',
|
|
14030
14036
|
'[attr.inputMode]': 'inputMode()',
|
|
14031
|
-
'[attr.maxLength]': '
|
|
14032
|
-
'[autocomplete]': '
|
|
14037
|
+
'[attr.maxLength]': 'maxLength()',
|
|
14038
|
+
'[autocomplete]': 'autocomplete()',
|
|
14039
|
+
'[attr.autocapitalize]': '"off"',
|
|
14040
|
+
'[attr.autocorrect]': '"off"',
|
|
14041
|
+
'[attr.enterkeyhint]': 'enterKeyHint()',
|
|
14042
|
+
'[attr.spellcheck]': '"false"',
|
|
14033
14043
|
'[attr.pattern]': 'pattern()',
|
|
14034
14044
|
'[placeholder]': 'placeholder()',
|
|
14035
14045
|
'[readOnly]': 'readOnly()',
|
|
@@ -14107,19 +14117,18 @@ class OneTimePasswordComponent {
|
|
|
14107
14117
|
ariaLabel = input((index, total) => `Digit ${index + 1} of ${total}`, /* @ts-ignore */
|
|
14108
14118
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
14109
14119
|
/**
|
|
14110
|
-
* Automatically submit the form when all one
|
|
14120
|
+
* Automatically submit the form when all one-time password fields are filled.
|
|
14111
14121
|
* @default: false
|
|
14112
14122
|
*/
|
|
14113
14123
|
autoSubmit = input(false, { ...(ngDevMode ? { debugName: "autoSubmit" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
14114
|
-
// readonly children = input();
|
|
14115
14124
|
/**
|
|
14116
|
-
* Initial value for Angular one
|
|
14125
|
+
* Initial value for Angular one-time password input.
|
|
14117
14126
|
* @default: undefined
|
|
14118
14127
|
*/
|
|
14119
14128
|
defaultValue = input(/* @ts-ignore */
|
|
14120
14129
|
...(ngDevMode ? [undefined, { debugName: "defaultValue" }] : /* istanbul ignore next */ []));
|
|
14121
14130
|
/**
|
|
14122
|
-
* Disable all one
|
|
14131
|
+
* Disable all one-time password (OTP) input fields.
|
|
14123
14132
|
* @default: false
|
|
14124
14133
|
*/
|
|
14125
14134
|
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'disabled' });
|
|
@@ -14131,7 +14140,7 @@ class OneTimePasswordComponent {
|
|
|
14131
14140
|
*/
|
|
14132
14141
|
linear = input(true, { ...(ngDevMode ? { debugName: "linear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
14133
14142
|
/**
|
|
14134
|
-
* Show input as password (masked characters).
|
|
14143
|
+
* Show input as a password (masked characters).
|
|
14135
14144
|
* @default: false
|
|
14136
14145
|
*/
|
|
14137
14146
|
masked = input(false, { ...(ngDevMode ? { debugName: "masked" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
@@ -14142,12 +14151,12 @@ class OneTimePasswordComponent {
|
|
|
14142
14151
|
placeholder = input('', /* @ts-ignore */
|
|
14143
14152
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
14144
14153
|
/**
|
|
14145
|
-
* Make Angular OTP input component read-only.
|
|
14154
|
+
* Make the Angular OTP input component read-only.
|
|
14146
14155
|
* @default: false
|
|
14147
14156
|
*/
|
|
14148
14157
|
readOnly = input(false, { ...(ngDevMode ? { debugName: "readOnly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
14149
14158
|
/**
|
|
14150
|
-
* Sets the visual size of the
|
|
14159
|
+
* Sets the visual size of the Angular one-time password (OTP) input. Use 'sm' for small or 'lg' for large input fields.
|
|
14151
14160
|
* @default: undefined
|
|
14152
14161
|
*/
|
|
14153
14162
|
sizing = input(/* @ts-ignore */
|
|
@@ -14196,14 +14205,15 @@ class OneTimePasswordComponent {
|
|
|
14196
14205
|
}, /* @ts-ignore */
|
|
14197
14206
|
...(ngDevMode ? [{ debugName: "#valueEffect" }] : /* istanbul ignore next */ []));
|
|
14198
14207
|
/**
|
|
14199
|
-
* Event triggered when the Angular one
|
|
14208
|
+
* Event triggered when the Angular one-time password (OTP) value changes.
|
|
14200
14209
|
*/
|
|
14201
14210
|
valueChange = output();
|
|
14202
14211
|
/**
|
|
14203
|
-
* Callback triggered when all Angular one
|
|
14212
|
+
* Callback triggered when all Angular one-time password (OTP) fields are filled.
|
|
14204
14213
|
*/
|
|
14205
14214
|
complete = output();
|
|
14206
14215
|
#otpServiceEffect = effect(() => {
|
|
14216
|
+
this.#otpService.count.set(this.inputCount());
|
|
14207
14217
|
this.#otpService.disabled.set(this.disabled());
|
|
14208
14218
|
this.#otpService.masked.set(this.masked());
|
|
14209
14219
|
this.#otpService.placeholder.set(this.placeholder());
|
|
@@ -14223,7 +14233,6 @@ class OneTimePasswordComponent {
|
|
|
14223
14233
|
};
|
|
14224
14234
|
}, /* @ts-ignore */
|
|
14225
14235
|
...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
14226
|
-
// protected readonly inputElementRefs = contentChildren(OtpDirective, { read: ElementRef<HTMLInputElement>, descendants: true });
|
|
14227
14236
|
inputRefs = contentChildren(OtpDirective, { ...(ngDevMode ? { debugName: "inputRefs" } : /* istanbul ignore next */ {}), descendants: true });
|
|
14228
14237
|
inputCount = computed(() => this.inputRefs().length, /* @ts-ignore */
|
|
14229
14238
|
...(ngDevMode ? [{ debugName: "inputCount" }] : /* istanbul ignore next */ []));
|
|
@@ -14302,9 +14311,48 @@ class OneTimePasswordComponent {
|
|
|
14302
14311
|
});
|
|
14303
14312
|
}, /* @ts-ignore */
|
|
14304
14313
|
...(ngDevMode ? [{ debugName: "#inputsArrayEffect" }] : /* istanbul ignore next */ []));
|
|
14314
|
+
// Write `chars` across the slots starting at `startIndex`, then move focus.
|
|
14315
|
+
// Shared by paste and by multi-character `input` events.
|
|
14316
|
+
#distributeChars(startIndex, chars) {
|
|
14317
|
+
const inputCount = this.inputCount();
|
|
14318
|
+
if (!inputCount) {
|
|
14319
|
+
return;
|
|
14320
|
+
}
|
|
14321
|
+
// A value at least as long as the field is a complete code: fill from the
|
|
14322
|
+
// first slot, whichever slot happens to be focused.
|
|
14323
|
+
const start = chars.length >= inputCount ? 0 : startIndex;
|
|
14324
|
+
const newValues = [...this.#inputValues()];
|
|
14325
|
+
for (let i = 0; i < chars.length && start + i < inputCount; i++) {
|
|
14326
|
+
newValues[start + i] = chars[i];
|
|
14327
|
+
}
|
|
14328
|
+
this.#inputValues.set(newValues);
|
|
14329
|
+
setTimeout(() => {
|
|
14330
|
+
// Focus the next empty input or the last filled one
|
|
14331
|
+
const nextEmptyIndex = start + chars.length;
|
|
14332
|
+
if (nextEmptyIndex < inputCount) {
|
|
14333
|
+
this.#focusKeyManager.setActiveItem(nextEmptyIndex);
|
|
14334
|
+
}
|
|
14335
|
+
else {
|
|
14336
|
+
this.#focusKeyManager.setLastItemActive();
|
|
14337
|
+
}
|
|
14338
|
+
});
|
|
14339
|
+
}
|
|
14305
14340
|
handleInputChange($event, index) {
|
|
14306
14341
|
this.#focusKeyManager.updateActiveItem(index);
|
|
14307
14342
|
const inputValue = $event.target.value;
|
|
14343
|
+
// SMS autofill, password managers, dictation and IME commits insert the
|
|
14344
|
+
// whole code at once and fire `input`, not `paste`. Spread it across the
|
|
14345
|
+
// slots instead of leaving it in one of them.
|
|
14346
|
+
if (inputValue.length > 1) {
|
|
14347
|
+
const chars = extractValidChars(inputValue, this.type());
|
|
14348
|
+
// The slot is written from the state, so restore what it holds — an
|
|
14349
|
+
// all-invalid value leaves the state untouched.
|
|
14350
|
+
$event.target.value = this.#inputValues()[index] ?? '';
|
|
14351
|
+
if (chars) {
|
|
14352
|
+
this.#distributeChars(index, chars);
|
|
14353
|
+
}
|
|
14354
|
+
return;
|
|
14355
|
+
}
|
|
14308
14356
|
if (inputValue.length === 1 && !isValidInput(inputValue, this.type())) {
|
|
14309
14357
|
$event.target.value = '';
|
|
14310
14358
|
this.#inputValues.update((value) => {
|
|
@@ -14376,30 +14424,11 @@ class OneTimePasswordComponent {
|
|
|
14376
14424
|
}
|
|
14377
14425
|
handlePaste($event, index) {
|
|
14378
14426
|
$event.preventDefault();
|
|
14379
|
-
const inputCount = this.inputCount();
|
|
14380
14427
|
const pastedData = $event.clipboardData?.getData('text') ?? '';
|
|
14381
14428
|
const validChars = extractValidChars(pastedData, this.type());
|
|
14382
14429
|
if (!validChars)
|
|
14383
14430
|
return;
|
|
14384
|
-
|
|
14385
|
-
const startIndex = index;
|
|
14386
|
-
for (let i = 0; i < validChars.length && startIndex + i < inputCount; i++) {
|
|
14387
|
-
newValues[startIndex + i] = validChars[i];
|
|
14388
|
-
}
|
|
14389
|
-
// untracked(() => {
|
|
14390
|
-
this.#inputValues.set(newValues);
|
|
14391
|
-
// });
|
|
14392
|
-
setTimeout(() => {
|
|
14393
|
-
// Focus the next empty input or the last filled input
|
|
14394
|
-
const nextEmptyIndex = startIndex + validChars.length;
|
|
14395
|
-
if (nextEmptyIndex < inputCount) {
|
|
14396
|
-
this.#focusKeyManager.setActiveItem(nextEmptyIndex);
|
|
14397
|
-
// this.#focusKeyManager.setNextItemActive();
|
|
14398
|
-
}
|
|
14399
|
-
else {
|
|
14400
|
-
this.#focusKeyManager.setLastItemActive();
|
|
14401
|
-
}
|
|
14402
|
-
});
|
|
14431
|
+
this.#distributeChars(index, validChars);
|
|
14403
14432
|
}
|
|
14404
14433
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OneTimePasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14405
14434
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.0", type: OneTimePasswordComponent, isStandalone: true, selector: "c-one-time-password", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, autoSubmit: { classPropertyName: "autoSubmit", publicName: "autoSubmit", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, masked: { classPropertyName: "masked", publicName: "masked", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, sizing: { classPropertyName: "sizing", publicName: "sizing", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, valid: { classPropertyName: "valid", publicName: "valid", isSignal: true, isRequired: false, transformFunction: null }, valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", complete: "complete" }, host: { attributes: { "role": "group" }, properties: { "class": "hostClasses()" } }, providers: [
|
|
@@ -14439,8 +14468,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
14439
14468
|
}]
|
|
14440
14469
|
}] });
|
|
14441
14470
|
|
|
14442
|
-
// export * from './one-time-password.types';
|
|
14443
|
-
|
|
14444
14471
|
class PageLinkDirective {
|
|
14445
14472
|
static ngAcceptInputType_disabled;
|
|
14446
14473
|
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
@@ -19558,7 +19585,7 @@ class StepperComponent {
|
|
|
19558
19585
|
}, /* @ts-ignore */
|
|
19559
19586
|
...(ngDevMode ? [{ debugName: "allStepsValid" }] : /* istanbul ignore next */ []));
|
|
19560
19587
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: StepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19561
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: StepperComponent, isStandalone: true, selector: "c-stepper", inputs: { activeStepIndexInput: { classPropertyName: "activeStepIndexInput", publicName: "activeStepIndex", isSignal: true, isRequired: false, transformFunction: null }, defaultActiveStepIndex: { classPropertyName: "defaultActiveStepIndex", publicName: "defaultActiveStepIndex", isSignal: true, isRequired: false, transformFunction: null }, idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, stepButtonLayout: { classPropertyName: "stepButtonLayout", publicName: "stepButtonLayout", isSignal: true, isRequired: false, transformFunction: null }, validation: { classPropertyName: "validation", publicName: "validation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { finished: "finished", onReset: "onReset", activeStepIndexChange: "activeStepIndexChange" }, host: { properties: { "class": "hostClasses()", "id": "id()" }, classAttribute: "stepper" }, queries: [{ propertyName: "stepsContent", predicate: StepperStepComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "stepButtons", predicate: StepButtonDirective, descendants: true, isSignal: true }], exportAs: ["cStepper"], ngImport: i0, template: "@let isVertical = layout() === 'vertical';\n@let activeIdx = activeStepIndex();\n@let finished = finishing();\n<ol [attr.aria-orientation]=\"layout()\" class=\"stepper-steps\" role=\"tablist\">\n @for (step of steps(); track step.id; let idx = $index, last = $last) {\n @let isActive = !finished && activeIdx === idx;\n @let isComplete = finished || idx < activeIdx;\n @let isDisabled = step.disabled || finished || (linear() && idx > activeIdx + 1 && step.disabled);\n @let stepId = step.id;\n @let panelId = `${step.id}-panel`;\n <li [class]=\"['stepper-step', stepButtonLayout()]\" role=\"presentation\">\n <button\n #stepButton\n cStepButton\n [attr.inert]=\"step.disabled || null\"\n [attr.aria-selected]=\"isActive || null\"\n [attr.aria-controls]=\"panelId\"\n [tabindex]=\"isActive ? 0 : -1\"\n [disabled]=\"isDisabled\"\n [class]=\"{ 'stepper-step-button': true, active: isActive, complete: isComplete }\"\n id=\"{{ stepId }}\"\n type=\"button\"\n role=\"tab\"\n (click)=\"step.disabled || handleStepClick($event, idx)\"\n (keydown)=\"handleKeyDown($event)\"\n >\n <span class=\"stepper-step-indicator\">\n @if (isComplete) {\n <span class=\"stepper-step-indicator-icon\"></span>\n } @else {\n <span class=\"stepper-step-indicator-text\">\n <ng-container\n [ngTemplateOutlet]=\"step.indicatorRef || indicatorTpl\"\n [ngTemplateOutletContext]=\"step.indicatorCtx\"\n />\n <ng-template #indicatorTpl>{{ step.indicator }}</ng-template>\n </span>\n }\n </span>\n <span class=\"stepper-step-label\">\n <ng-container [ngTemplateOutlet]=\"step.labelRef || labelTpl\" [ngTemplateOutletContext]=\"step.labelCtx\" />\n <ng-template #labelTpl>{{ step.label }}</ng-template>\n </span>\n </button>\n @if (!last) {\n <div class=\"stepper-step-connector\"></div>\n }\n @if (isVertical) {\n <div\n class=\"stepper-step-content\"\n cCollapse\n [visible]=\"!resetting() && isActive\"\n [attr.inert]=\"isActive ? null : true\"\n id=\"{{ panelId }}\"\n role=\"tabpanel\"\n [attr.aria-hidden]=\"!isActive || null\"\n [attr.aria-labelledby]=\"stepId\"\n aria-live=\"polite\"\n >\n <ng-container *ngTemplateOutlet=\"step.templateRef ?? emptyTpl\" />\n </div>\n }\n </li>\n }\n</ol>\n@if (!isVertical) {\n <div class=\"stepper-content\">\n @for (step of steps(); track step.id; let idx = $index) {\n @let isActive = !finished && activeIdx === idx;\n @let stepId = step.id;\n @let panelId = `${step.id}-panel`;\n <div\n [attr.inert]=\"isActive ? null : true\"\n [class]=\"{ 'stepper-pane': true, show: isActive, active: isActive }\"\n id=\"{{ panelId }}\"\n role=\"tabpanel\"\n [attr.aria-hidden]=\"!isActive || null\"\n [attr.aria-labelledby]=\"stepId\"\n aria-live=\"polite\"\n >\n <ng-container *ngTemplateOutlet=\"step.templateRef ?? emptyTpl\" />\n </div>\n }\n </div>\n}\n\n<ng-template #contentTpl>\n <ng-content />\n</ng-template>\n<ng-template #emptyTpl />\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: StepButtonDirective, selector: "button[cStepButton]", exportAs: ["cStepButton"] }, { kind: "directive", type: CollapseDirective, selector: "[cCollapse]", inputs: ["animate", "horizontal", "visible", "navbar"
|
|
19588
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: StepperComponent, isStandalone: true, selector: "c-stepper", inputs: { activeStepIndexInput: { classPropertyName: "activeStepIndexInput", publicName: "activeStepIndex", isSignal: true, isRequired: false, transformFunction: null }, defaultActiveStepIndex: { classPropertyName: "defaultActiveStepIndex", publicName: "defaultActiveStepIndex", isSignal: true, isRequired: false, transformFunction: null }, idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, stepButtonLayout: { classPropertyName: "stepButtonLayout", publicName: "stepButtonLayout", isSignal: true, isRequired: false, transformFunction: null }, validation: { classPropertyName: "validation", publicName: "validation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { finished: "finished", onReset: "onReset", activeStepIndexChange: "activeStepIndexChange" }, host: { properties: { "class": "hostClasses()", "id": "id()" }, classAttribute: "stepper" }, queries: [{ propertyName: "stepsContent", predicate: StepperStepComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "stepButtons", predicate: StepButtonDirective, descendants: true, isSignal: true }], exportAs: ["cStepper"], ngImport: i0, template: "@let isVertical = layout() === 'vertical';\n@let activeIdx = activeStepIndex();\n@let finished = finishing();\n<ol [attr.aria-orientation]=\"layout()\" class=\"stepper-steps\" role=\"tablist\">\n @for (step of steps(); track step.id; let idx = $index, last = $last) {\n @let isActive = !finished && activeIdx === idx;\n @let isComplete = finished || idx < activeIdx;\n @let isDisabled = step.disabled || finished || (linear() && idx > activeIdx + 1 && step.disabled);\n @let stepId = step.id;\n @let panelId = `${step.id}-panel`;\n <li [class]=\"['stepper-step', stepButtonLayout()]\" role=\"presentation\">\n <button\n #stepButton\n cStepButton\n [attr.inert]=\"step.disabled || null\"\n [attr.aria-selected]=\"isActive || null\"\n [attr.aria-controls]=\"panelId\"\n [tabindex]=\"isActive ? 0 : -1\"\n [disabled]=\"isDisabled\"\n [class]=\"{ 'stepper-step-button': true, active: isActive, complete: isComplete }\"\n id=\"{{ stepId }}\"\n type=\"button\"\n role=\"tab\"\n (click)=\"step.disabled || handleStepClick($event, idx)\"\n (keydown)=\"handleKeyDown($event)\"\n >\n <span class=\"stepper-step-indicator\">\n @if (isComplete) {\n <span class=\"stepper-step-indicator-icon\"></span>\n } @else {\n <span class=\"stepper-step-indicator-text\">\n <ng-container\n [ngTemplateOutlet]=\"step.indicatorRef || indicatorTpl\"\n [ngTemplateOutletContext]=\"step.indicatorCtx\"\n />\n <ng-template #indicatorTpl>{{ step.indicator }}</ng-template>\n </span>\n }\n </span>\n <span class=\"stepper-step-label\">\n <ng-container [ngTemplateOutlet]=\"step.labelRef || labelTpl\" [ngTemplateOutletContext]=\"step.labelCtx\" />\n <ng-template #labelTpl>{{ step.label }}</ng-template>\n </span>\n </button>\n @if (!last) {\n <div class=\"stepper-step-connector\"></div>\n }\n @if (isVertical) {\n <div\n class=\"stepper-step-content\"\n cCollapse\n [visible]=\"!resetting() && isActive\"\n [attr.inert]=\"isActive ? null : true\"\n id=\"{{ panelId }}\"\n role=\"tabpanel\"\n [attr.aria-hidden]=\"!isActive || null\"\n [attr.aria-labelledby]=\"stepId\"\n aria-live=\"polite\"\n >\n <ng-container *ngTemplateOutlet=\"step.templateRef ?? emptyTpl\" />\n </div>\n }\n </li>\n }\n</ol>\n@if (!isVertical) {\n <div class=\"stepper-content\">\n @for (step of steps(); track step.id; let idx = $index) {\n @let isActive = !finished && activeIdx === idx;\n @let stepId = step.id;\n @let panelId = `${step.id}-panel`;\n <div\n [attr.inert]=\"isActive ? null : true\"\n [class]=\"{ 'stepper-pane': true, show: isActive, active: isActive }\"\n id=\"{{ panelId }}\"\n role=\"tabpanel\"\n [attr.aria-hidden]=\"!isActive || null\"\n [attr.aria-labelledby]=\"stepId\"\n aria-live=\"polite\"\n >\n <ng-container *ngTemplateOutlet=\"step.templateRef ?? emptyTpl\" />\n </div>\n }\n </div>\n}\n\n<ng-template #contentTpl>\n <ng-content />\n</ng-template>\n<ng-template #emptyTpl />\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: StepButtonDirective, selector: "button[cStepButton]", exportAs: ["cStepButton"] }, { kind: "directive", type: CollapseDirective, selector: "[cCollapse]", inputs: ["animate", "horizontal", "visible", "navbar"], outputs: ["visibleChange", "collapseChange"], exportAs: ["cCollapse"] }] });
|
|
19562
19589
|
}
|
|
19563
19590
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: StepperComponent, decorators: [{
|
|
19564
19591
|
type: Component,
|