chore: copia de libs/shared con prefijo Pi y APIs de terceros actualizadas
This commit is contained in:
29
libs/ui/src/lib/util/icon-registry/icon-registry.service.ts
Normal file
29
libs/ui/src/lib/util/icon-registry/icon-registry.service.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MatIconRegistry } from '@angular/material/icon';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { customIcons } from './icons.data';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class IconRegistryService {
|
||||
constructor(
|
||||
private matIconRegistry: MatIconRegistry,
|
||||
private domSanitizer: DomSanitizer
|
||||
) {}
|
||||
|
||||
init(): void {
|
||||
this.registerIcons(customIcons, 'assets/icons/');
|
||||
}
|
||||
|
||||
registerIcons(icons: Array<string>, path: string) {
|
||||
icons.forEach((icon) => {
|
||||
this.matIconRegistry.addSvgIcon(
|
||||
icon,
|
||||
this.domSanitizer.bypassSecurityTrustResourceUrl(path + icon + '.svg')
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
167
libs/ui/src/lib/util/icon-registry/icons.data.ts
Normal file
167
libs/ui/src/lib/util/icon-registry/icons.data.ts
Normal file
@@ -0,0 +1,167 @@
|
||||
export const customIcons = [
|
||||
'add-stroked',
|
||||
'add',
|
||||
'agriculture',
|
||||
'arrow-back',
|
||||
'arrow-down',
|
||||
'arrow-forward',
|
||||
'arrow-secondary-back',
|
||||
'arrow-secondary-down',
|
||||
'arrow-secondary-forward',
|
||||
'arrow-secondary-up',
|
||||
'arrow-up',
|
||||
'arrow-up-rounded',
|
||||
'attachment',
|
||||
'bankruptcy',
|
||||
'biotech',
|
||||
'briefcase',
|
||||
'box',
|
||||
'buildings',
|
||||
'calendar',
|
||||
'calendar-plus',
|
||||
'calendly',
|
||||
'caret',
|
||||
'chat',
|
||||
'check-rounded',
|
||||
'check',
|
||||
'chemistry-and-materials',
|
||||
'chevron-back',
|
||||
'chevron-down',
|
||||
'chevron-forward',
|
||||
'chevron-up',
|
||||
'choose',
|
||||
'circle',
|
||||
'click',
|
||||
'clip',
|
||||
'close-rounded',
|
||||
'close',
|
||||
'coin',
|
||||
'coins',
|
||||
'connect',
|
||||
'construction',
|
||||
'consumer',
|
||||
'dashboard',
|
||||
'dealbox',
|
||||
'details',
|
||||
'diagram',
|
||||
'dialog',
|
||||
'distribution',
|
||||
'document',
|
||||
'document-add',
|
||||
'document-search',
|
||||
'document-euro',
|
||||
'document-substract',
|
||||
'dollar',
|
||||
'double-chevron-back',
|
||||
'download-teaser',
|
||||
'download',
|
||||
'due-diligence',
|
||||
'e-commerce',
|
||||
'ebitda',
|
||||
'edit',
|
||||
'education',
|
||||
'email',
|
||||
'email-plus',
|
||||
'enter',
|
||||
'entertainment',
|
||||
'estimation-time',
|
||||
'euro',
|
||||
'exclamation',
|
||||
'exclusivity',
|
||||
'expand',
|
||||
'eye-off',
|
||||
'eye',
|
||||
'file-coins',
|
||||
'filter',
|
||||
'financial-services',
|
||||
'flag-grey',
|
||||
'focus',
|
||||
'globe',
|
||||
'google',
|
||||
'graphic',
|
||||
'grid',
|
||||
'hamburguer',
|
||||
'headquarters',
|
||||
'healthcare',
|
||||
'hospitality',
|
||||
'industrial',
|
||||
'info',
|
||||
'it-internet',
|
||||
'legal',
|
||||
'light-bulb',
|
||||
'link',
|
||||
'linkedin',
|
||||
'list',
|
||||
'location',
|
||||
'lock',
|
||||
'login',
|
||||
'logistics',
|
||||
'manufacturing',
|
||||
'marketing-media',
|
||||
'meeting',
|
||||
'messages',
|
||||
'messages-left',
|
||||
'messy-coin-stack',
|
||||
'metric-down-arrow',
|
||||
'metric-up-arrow',
|
||||
'mining',
|
||||
'mobility',
|
||||
'money-transfer',
|
||||
'more',
|
||||
'my-company',
|
||||
'nif-company',
|
||||
'notification-off',
|
||||
'notification-on',
|
||||
'operations',
|
||||
'opportunities',
|
||||
'optimum',
|
||||
'other-services',
|
||||
'percentage',
|
||||
'person-lines',
|
||||
'phone',
|
||||
'phone-arrow',
|
||||
'physical',
|
||||
'play-arrow',
|
||||
'premium',
|
||||
'pricing',
|
||||
'professional-services',
|
||||
'public-administration',
|
||||
'purchase-mandates',
|
||||
'question',
|
||||
'raw-materials',
|
||||
'real-estate',
|
||||
'search',
|
||||
'select',
|
||||
'sell-mandates',
|
||||
'send-information',
|
||||
'shareholders',
|
||||
'signature',
|
||||
'sort',
|
||||
'star-primary',
|
||||
'star-fill',
|
||||
'star-outline',
|
||||
'substract-stroked',
|
||||
'substract',
|
||||
'support',
|
||||
'telecomunications',
|
||||
'telephone',
|
||||
'telephone-fill',
|
||||
'time-detail',
|
||||
'time-zone',
|
||||
'transmission',
|
||||
'transport-logistics',
|
||||
'trash',
|
||||
'twitter',
|
||||
'upload',
|
||||
'user-profile',
|
||||
'user-profile-advisor',
|
||||
'user-profile-company',
|
||||
'user',
|
||||
'utilities',
|
||||
'verification-list',
|
||||
'verified-money',
|
||||
'website',
|
||||
'whatsapp',
|
||||
'youtube',
|
||||
'zoom',
|
||||
];
|
||||
3
libs/ui/src/lib/util/icon-registry/index.ts
Normal file
3
libs/ui/src/lib/util/icon-registry/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from './util-icon-registry.module';
|
||||
|
||||
export * from './icon-registry.service';
|
||||
@@ -0,0 +1,16 @@
|
||||
import { APP_INITIALIZER, NgModule } from '@angular/core';
|
||||
import { IconRegistryService } from './icon-registry.service';
|
||||
|
||||
@NgModule({
|
||||
providers: [
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useFactory: (iconRegistryService: IconRegistryService) => {
|
||||
return () => iconRegistryService.init();
|
||||
},
|
||||
deps: [IconRegistryService],
|
||||
multi: true,
|
||||
},
|
||||
],
|
||||
})
|
||||
export class PiSharedUtilIconRegistryModule {}
|
||||
Reference in New Issue
Block a user