@ship-ui/core 0.14.5 → 0.14.6
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,6 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, Renderer2, ChangeDetectionStrategy, Component, signal, DestroyRef, input, computed, viewChild, effect, HostListener, NgModule, Injectable,
|
|
3
|
-
import { SHIP_CONFIG as SHIP_CONFIG$1 } from 'ship-ui';
|
|
2
|
+
import { inject, ElementRef, Renderer2, ChangeDetectionStrategy, Component, signal, DestroyRef, InjectionToken, input, computed, viewChild, effect, HostListener, NgModule, Injectable, model, output, ApplicationRef, createComponent, isSignal, OutputEmitterRef, contentChildren, afterNextRender, assertInInjectionContext, Injector, HostBinding, contentChild, TemplateRef, runInInjectionContext, Directive, ChangeDetectorRef, viewChildren, ViewContainerRef, EnvironmentInjector } from '@angular/core';
|
|
4
3
|
import { DatePipe, NgTemplateOutlet } from '@angular/common';
|
|
5
4
|
import { SIGNAL } from '@angular/core/primitives/signals';
|
|
6
5
|
|
|
@@ -56,10 +55,12 @@ function classMutationSignal() {
|
|
|
56
55
|
return classListSignal.asReadonly();
|
|
57
56
|
}
|
|
58
57
|
|
|
58
|
+
const SHIP_CONFIG = new InjectionToken('Ship UI Config');
|
|
59
|
+
|
|
59
60
|
const POSSIBLE_VARIANTS = ['simple', 'outlined', 'flat', 'raised'];
|
|
60
61
|
class ShipAlertComponent {
|
|
61
62
|
constructor() {
|
|
62
|
-
this.#shConfig = inject(SHIP_CONFIG
|
|
63
|
+
this.#shConfig = inject(SHIP_CONFIG, { optional: true });
|
|
63
64
|
this.variant = signal(this.#shConfig?.alertVariant ?? '', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
64
65
|
this._el = inject(ElementRef); // Used by alert container
|
|
65
66
|
this.alertService = input(null, ...(ngDevMode ? [{ debugName: "alertService" }] : []));
|
|
@@ -340,8 +341,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
340
341
|
}]
|
|
341
342
|
}] });
|
|
342
343
|
|
|
343
|
-
const SHIP_CONFIG = new InjectionToken('Ship UI Config');
|
|
344
|
-
|
|
345
344
|
const DEFAULT_OPTIONS$1 = {
|
|
346
345
|
class: 'default',
|
|
347
346
|
width: undefined,
|