@softheon/armature 21.11.0 → 21.12.0
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,9 +1,9 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule, NgStyle, DatePipe } from '@angular/common';
|
|
3
3
|
import * as i1$1 from '@angular/common/http';
|
|
4
|
-
import { HttpHeaders, provideHttpClient, withInterceptorsFromDi, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
4
|
+
import { HttpHeaders, provideHttpClient, withInterceptorsFromDi, HTTP_INTERCEPTORS, HttpClient } from '@angular/common/http';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { InjectionToken, Injectable, ViewChild, Input, Optional, Inject, Component, NgModule, EventEmitter, Output, ViewChildren, signal, inject, ChangeDetectionStrategy, DOCUMENT, isDevMode, HostListener, Directive, Renderer2, ElementRef, Pipe, ViewEncapsulation, Self, Host, APP_INITIALIZER, Injector, computed, DestroyRef, effect, ChangeDetectorRef, ErrorHandler, input, NgZone } from '@angular/core';
|
|
6
|
+
import { InjectionToken, Injectable, ViewChild, Input, Optional, Inject, Component, NgModule, EventEmitter, Output, ViewChildren, signal, inject, ChangeDetectionStrategy, DOCUMENT, isDevMode, HostListener, Directive, Renderer2, ElementRef, Pipe, ViewEncapsulation, Self, Host, APP_INITIALIZER, Injector, computed, DestroyRef, effect, ChangeDetectorRef, ErrorHandler, input, output, NgZone } from '@angular/core';
|
|
7
7
|
import * as i1$4 from '@angular/router';
|
|
8
8
|
import { NavigationEnd, Router, RouterModule, NavigationStart, NavigationError } from '@angular/router';
|
|
9
9
|
import { FlexLayoutModule } from '@ngbracket/ngx-layout';
|
|
@@ -10192,6 +10192,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
10192
10192
|
args: ['window:resize']
|
|
10193
10193
|
}] } });
|
|
10194
10194
|
|
|
10195
|
+
/**
|
|
10196
|
+
* SVG Loader component that fetches and displays SVG images from a URL.
|
|
10197
|
+
* Injects the svg as innerHTML allowing theme variables to take effect.
|
|
10198
|
+
*/
|
|
10199
|
+
class SofSvgLoaderComponent {
|
|
10200
|
+
/** Initializes the component and watches for URL changes */
|
|
10201
|
+
constructor() {
|
|
10202
|
+
/** The URL of the SVG to load. *required */
|
|
10203
|
+
this.url = input.required(...(ngDevMode ? [{ debugName: "url" }] : []));
|
|
10204
|
+
/** Accessibility label for the SVG image. When provided, adds role="img" and aria-label. When empty, adds aria-hidden="true" */
|
|
10205
|
+
this.ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
10206
|
+
/** Whether an ariaLabel has been provided */
|
|
10207
|
+
this.hasAriaLabel = computed(() => {
|
|
10208
|
+
const label = this.ariaLabel();
|
|
10209
|
+
return label !== undefined && label !== null && label.trim() !== '';
|
|
10210
|
+
}, ...(ngDevMode ? [{ debugName: "hasAriaLabel" }] : []));
|
|
10211
|
+
/** Emitted when the SVG has been successfully fetched and injected */
|
|
10212
|
+
this.loadComplete = output();
|
|
10213
|
+
/** Emitted when the SVG fetch fails */
|
|
10214
|
+
this.loadError = output();
|
|
10215
|
+
this.http = inject(HttpClient);
|
|
10216
|
+
this.hostElement = inject((ElementRef));
|
|
10217
|
+
effect(() => {
|
|
10218
|
+
const currentUrl = this.url();
|
|
10219
|
+
if (currentUrl) {
|
|
10220
|
+
this.fetchAndInjectSvg(currentUrl);
|
|
10221
|
+
}
|
|
10222
|
+
});
|
|
10223
|
+
}
|
|
10224
|
+
/**
|
|
10225
|
+
* Fetches SVG content from URL and injects into the host element
|
|
10226
|
+
* @param url url string to fetch the svg by
|
|
10227
|
+
*/
|
|
10228
|
+
fetchAndInjectSvg(url) {
|
|
10229
|
+
this.http.get(url, { responseType: 'text' }).subscribe({
|
|
10230
|
+
next: (svgContent) => {
|
|
10231
|
+
this.hostElement.nativeElement.innerHTML = svgContent;
|
|
10232
|
+
this.loadComplete.emit();
|
|
10233
|
+
},
|
|
10234
|
+
error: (error) => {
|
|
10235
|
+
this.loadError.emit(error);
|
|
10236
|
+
},
|
|
10237
|
+
});
|
|
10238
|
+
}
|
|
10239
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: SofSvgLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10240
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.3", type: SofSvgLoaderComponent, isStandalone: true, selector: "sof-svg-loader", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loadComplete: "loadComplete", loadError: "loadError" }, host: { properties: { "style.display": "\"block\"", "attr.role": "hasAriaLabel() ? \"img\" : null", "attr.aria-label": "hasAriaLabel() ? ariaLabel() : null", "attr.aria-hidden": "hasAriaLabel() ? null : \"true\"" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10241
|
+
}
|
|
10242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: SofSvgLoaderComponent, decorators: [{
|
|
10243
|
+
type: Component,
|
|
10244
|
+
args: [{
|
|
10245
|
+
selector: 'sof-svg-loader',
|
|
10246
|
+
template: '',
|
|
10247
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10248
|
+
host: {
|
|
10249
|
+
'[style.display]': '"block"',
|
|
10250
|
+
'[attr.role]': 'hasAriaLabel() ? "img" : null',
|
|
10251
|
+
'[attr.aria-label]': 'hasAriaLabel() ? ariaLabel() : null',
|
|
10252
|
+
'[attr.aria-hidden]': 'hasAriaLabel() ? null : "true"',
|
|
10253
|
+
},
|
|
10254
|
+
}]
|
|
10255
|
+
}], ctorParameters: () => [], propDecorators: { url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], loadComplete: [{ type: i0.Output, args: ["loadComplete"] }], loadError: [{ type: i0.Output, args: ["loadError"] }] } });
|
|
10256
|
+
|
|
10195
10257
|
/** sof-skeleton-loader component */
|
|
10196
10258
|
class SofSkeletonLoaderComponent {
|
|
10197
10259
|
constructor() {
|
|
@@ -11664,5 +11726,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
11664
11726
|
* Generated bundle index. Do not edit.
|
|
11665
11727
|
*/
|
|
11666
11728
|
|
|
11667
|
-
export { ALERT_BANNER_CONFIG, AbstractSamlEntryService, AbstractSamlService, AbstractStartupService, AccessTokenClaims, AlertBannerComponent, AlertBannerModule, AlertBannerService, AlertService, AlphaNumericDirective, AppTemplateComponent, ApplicationUserModel, ArRoleNavService, ArmError, ArmatureFooterComponent, ArmatureFooterModule, ArmatureHeaderComponent, ArmatureHeaderModule, ArmatureModule, ArmatureNavigationComponent, ArmatureResizePanelsModule, Attribute, AuthorizationService, B2bNavComponent, BannerService, BannerType, BaseComponentModule, BaseConfigService, CacheExpirationType, ComponentSavePrintComponent, ComponentSavePrintService, Configuration, ConfirmAddressData, CoverageDetail, CssOverride, CssOverrideDirective, CustomAuthConfigService, DISABLE_ACCESS_FOR_NO_PAGES_ROLE, DISTRIBUTED_CACHE_BASE_PATH, DataStoreConfig, DateInputFilterDirective, DecodedAccessToken, DefaultConfigService, DialogResult, DistributedCacheModule, ENTITY_SESSION_STORAGE_PREFIX, ENTITY_SS_CONFIG_PREFIX, EntityBaseComponent, EntityHelperService, EntityInjectWrapperComponent, FAQ, FAQConfig, FEDERATED_MODULE_ID, FaqComponent, FaqModule, FeedbackToolComponent, FeedbackToolModule, FooterConfig, FormsModule, HYBRID_SAML_OAUTH_CONFIG, HeaderAuthSettings, HybridSamlOAuthConfig, HybridSamlOauthService, InputTrimDirective, LINE_OF_COVERAGE, LettersCharactersDirective, LettersOnlyDirective, MarketSelectionConfig, MarketSelectionService, MfeModule, MobileHeaderMenuComponent, ModalData, NavigationModule, NumbersOnlyDirective, Oauth2RoleService, OauthModule, PhoneFormatPipe, PolicyPerson, RBAC_CONFIG, RbacActionDirective, RbacConfig, RbacModule, RedirectSamlComponent, RedirectSamlRequest, RedirectSessionConfigs, ResizePanelsComponent, RoleAccess, RoleNavService, RoutePath, RumConfig, RumModule, RumService, SESSION_CONFIG, SOF_BLANK_LANGUAGE_OVERRIDE, SOF_DATE_PIPE_FORMATS, STATUS, SamlModule, SamlService, SelectedMarketContext, ServerCacheService, SessionConfig, SessionService, SharedErrorService, SiteMapComponent, SiteMapDirection, SnackbarService, SofAddressComponent, SofAlertComponent, SofArComponentSavePrintModule, SofBadgeComponent, SofBannerComponent, SofBlankPipe, SofBottomSheetComponent, SofBreadcrumbsHierarchyComponent, SofBreadcrumbsHistoryComponent, SofButtonToggleGroupComponent, SofCalloutComponent, SofChartSkeletonLoaderComponent, SofChipComponent, SofCompareAddressPipe, SofConfirmAddressComponent, SofConfirmAddressCountyChangeComponent, SofContextComponent, SofDatePipe, SofDropdownButtonComponent, SofErrorCommonComponent, SofHandleComponent, SofHeaderComponent, SofImageCheckboxComponent, SofInputStepperComponent, SofModalComponent, SofNavPanelComponent, SofPipeModule, SofProgressBarComponent, SofRadioCardComponent, SofSegmentedControlComponent, SofSelectComponent, SofSimpleAlertComponent, SofSkeletonLoaderComponent, SofSnackbarComponent, SofSsnPipe, SofStarRatingComponent, SofSubNavigationComponent, SofTabsComponent, SofToastComponent, SofUtilityButtonComponent, SoftheonErrorHandlerService, SsoGatewayEntryService, SsoGatewayModel, States, TextOverflowEllipsisTooltipDirective, ThemeModule, ThemeService, ToastService, TypedSession, USER_ENTITY_SERVICE_CONFIG, UserEntityService, UserEntityServiceConfig, ValidationKeys, WINDOW, httpVerb, initializerFactory, keyPathPrefix, languageStorageKey, newGuid, pascalToCamel, preSignInRouteStorageKey, removeMenuRole, routeToPreLoginRoute, sessionBasePathFactory, userInitialsPipe };
|
|
11729
|
+
export { ALERT_BANNER_CONFIG, AbstractSamlEntryService, AbstractSamlService, AbstractStartupService, AccessTokenClaims, AlertBannerComponent, AlertBannerModule, AlertBannerService, AlertService, AlphaNumericDirective, AppTemplateComponent, ApplicationUserModel, ArRoleNavService, ArmError, ArmatureFooterComponent, ArmatureFooterModule, ArmatureHeaderComponent, ArmatureHeaderModule, ArmatureModule, ArmatureNavigationComponent, ArmatureResizePanelsModule, Attribute, AuthorizationService, B2bNavComponent, BannerService, BannerType, BaseComponentModule, BaseConfigService, CacheExpirationType, ComponentSavePrintComponent, ComponentSavePrintService, Configuration, ConfirmAddressData, CoverageDetail, CssOverride, CssOverrideDirective, CustomAuthConfigService, DISABLE_ACCESS_FOR_NO_PAGES_ROLE, DISTRIBUTED_CACHE_BASE_PATH, DataStoreConfig, DateInputFilterDirective, DecodedAccessToken, DefaultConfigService, DialogResult, DistributedCacheModule, ENTITY_SESSION_STORAGE_PREFIX, ENTITY_SS_CONFIG_PREFIX, EntityBaseComponent, EntityHelperService, EntityInjectWrapperComponent, FAQ, FAQConfig, FEDERATED_MODULE_ID, FaqComponent, FaqModule, FeedbackToolComponent, FeedbackToolModule, FooterConfig, FormsModule, HYBRID_SAML_OAUTH_CONFIG, HeaderAuthSettings, HybridSamlOAuthConfig, HybridSamlOauthService, InputTrimDirective, LINE_OF_COVERAGE, LettersCharactersDirective, LettersOnlyDirective, MarketSelectionConfig, MarketSelectionService, MfeModule, MobileHeaderMenuComponent, ModalData, NavigationModule, NumbersOnlyDirective, Oauth2RoleService, OauthModule, PhoneFormatPipe, PolicyPerson, RBAC_CONFIG, RbacActionDirective, RbacConfig, RbacModule, RedirectSamlComponent, RedirectSamlRequest, RedirectSessionConfigs, ResizePanelsComponent, RoleAccess, RoleNavService, RoutePath, RumConfig, RumModule, RumService, SESSION_CONFIG, SOF_BLANK_LANGUAGE_OVERRIDE, SOF_DATE_PIPE_FORMATS, STATUS, SamlModule, SamlService, SelectedMarketContext, ServerCacheService, SessionConfig, SessionService, SharedErrorService, SiteMapComponent, SiteMapDirection, SnackbarService, SofAddressComponent, SofAlertComponent, SofArComponentSavePrintModule, SofBadgeComponent, SofBannerComponent, SofBlankPipe, SofBottomSheetComponent, SofBreadcrumbsHierarchyComponent, SofBreadcrumbsHistoryComponent, SofButtonToggleGroupComponent, SofCalloutComponent, SofChartSkeletonLoaderComponent, SofChipComponent, SofCompareAddressPipe, SofConfirmAddressComponent, SofConfirmAddressCountyChangeComponent, SofContextComponent, SofDatePipe, SofDropdownButtonComponent, SofErrorCommonComponent, SofHandleComponent, SofHeaderComponent, SofImageCheckboxComponent, SofInputStepperComponent, SofModalComponent, SofNavPanelComponent, SofPipeModule, SofProgressBarComponent, SofRadioCardComponent, SofSegmentedControlComponent, SofSelectComponent, SofSimpleAlertComponent, SofSkeletonLoaderComponent, SofSnackbarComponent, SofSsnPipe, SofStarRatingComponent, SofSubNavigationComponent, SofSvgLoaderComponent, SofTabsComponent, SofToastComponent, SofUtilityButtonComponent, SoftheonErrorHandlerService, SsoGatewayEntryService, SsoGatewayModel, States, TextOverflowEllipsisTooltipDirective, ThemeModule, ThemeService, ToastService, TypedSession, USER_ENTITY_SERVICE_CONFIG, UserEntityService, UserEntityServiceConfig, ValidationKeys, WINDOW, httpVerb, initializerFactory, keyPathPrefix, languageStorageKey, newGuid, pascalToCamel, preSignInRouteStorageKey, removeMenuRole, routeToPreLoginRoute, sessionBasePathFactory, userInitialsPipe };
|
|
11668
11730
|
//# sourceMappingURL=softheon-armature.mjs.map
|