@rolatech/angular-common
Advanced tools
| import * as i0 from '@angular/core'; | ||
| import { NgModule, Pipe, inject, HostListener, Directive, InjectionToken, PLATFORM_ID, APP_ID, importProvidersFrom, makeEnvironmentProviders } from '@angular/core'; | ||
| import { NgModule, Pipe, inject, ElementRef, HostListener, Directive, InjectionToken, PLATFORM_ID, APP_ID, importProvidersFrom, makeEnvironmentProviders } from '@angular/core'; | ||
| import { CommonModule, IMAGE_CONFIG } from '@angular/common'; | ||
@@ -12,7 +12,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; | ||
| class AngularCommonModule { | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: AngularCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); | ||
| static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: AngularCommonModule, imports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule], exports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule] }); | ||
| static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: AngularCommonModule, imports: [CommonModule, FormsModule, ReactiveFormsModule, CommonModule, FormsModule, ReactiveFormsModule] }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: AngularCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); | ||
| static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: AngularCommonModule, imports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule], exports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule] }); | ||
| static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: AngularCommonModule, imports: [CommonModule, FormsModule, ReactiveFormsModule, CommonModule, FormsModule, ReactiveFormsModule] }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: AngularCommonModule, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: AngularCommonModule, decorators: [{ | ||
| type: NgModule, | ||
@@ -34,6 +34,6 @@ args: [{ | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PrettyjsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: PrettyjsonPipe, isStandalone: true, name: "prettyjson" }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: PrettyjsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: PrettyjsonPipe, isStandalone: true, name: "prettyjson" }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PrettyjsonPipe, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: PrettyjsonPipe, decorators: [{ | ||
| type: Pipe, | ||
@@ -52,6 +52,6 @@ args: [{ | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: TimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: TimePipe, isStandalone: true, name: "time", pure: false }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: TimePipe, isStandalone: true, name: "time", pure: false }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: TimePipe, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TimePipe, decorators: [{ | ||
| type: Pipe, | ||
@@ -83,6 +83,6 @@ args: [{ name: 'time', pure: false }] | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: DurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: DurationPipe, isStandalone: true, name: "duration" }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: DurationPipe, isStandalone: true, name: "duration" }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: DurationPipe, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DurationPipe, decorators: [{ | ||
| type: Pipe, | ||
@@ -106,6 +106,6 @@ args: [{ | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OptionsFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: OptionsFormatPipe, isStandalone: true, name: "options" }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OptionsFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: OptionsFormatPipe, isStandalone: true, name: "options" }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OptionsFormatPipe, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OptionsFormatPipe, decorators: [{ | ||
| type: Pipe, | ||
@@ -124,6 +124,6 @@ args: [{ | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: AddressFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: AddressFormatPipe, isStandalone: true, name: "address" }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: AddressFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: AddressFormatPipe, isStandalone: true, name: "address" }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: AddressFormatPipe, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: AddressFormatPipe, decorators: [{ | ||
| type: Pipe, | ||
@@ -139,6 +139,6 @@ args: [{ | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FixedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: FixedPipe, isStandalone: true, name: "fixed" }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: FixedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: FixedPipe, isStandalone: true, name: "fixed" }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FixedPipe, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: FixedPipe, decorators: [{ | ||
| type: Pipe, | ||
@@ -162,6 +162,6 @@ args: [{ | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ShippingAddressPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: ShippingAddressPipe, isStandalone: true, name: "shippingAddress" }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ShippingAddressPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: ShippingAddressPipe, isStandalone: true, name: "shippingAddress" }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ShippingAddressPipe, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ShippingAddressPipe, decorators: [{ | ||
| type: Pipe, | ||
@@ -185,6 +185,6 @@ args: [{ | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PricePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: PricePipe, isStandalone: true, name: "price" }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: PricePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: PricePipe, isStandalone: true, name: "price" }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PricePipe, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: PricePipe, decorators: [{ | ||
| type: Pipe, | ||
@@ -205,6 +205,6 @@ args: [{ | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SafeUrlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: SafeUrlPipe, isStandalone: true, name: "safeUrl" }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: SafeUrlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); | ||
| static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: SafeUrlPipe, isStandalone: true, name: "safeUrl" }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SafeUrlPipe, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: SafeUrlPipe, decorators: [{ | ||
| type: Pipe, | ||
@@ -230,3 +230,2 @@ args: [{ | ||
| class DecimalDirective { | ||
| el; | ||
| regex = new RegExp(/^\d*\.?\d{0,2}$/g); | ||
@@ -238,5 +237,3 @@ // Test | ||
| specialKeys = ['Backspace', 'Tab', 'End', 'Home', 'ArrowLeft', 'ArrowRight', 'Del', 'Delete']; | ||
| constructor(el) { | ||
| this.el = el; | ||
| } | ||
| el = inject(ElementRef); | ||
| onKeyDown(event) { | ||
@@ -254,6 +251,6 @@ // Allow Backspace, tab, end, and home keys | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: DecimalDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); | ||
| static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: DecimalDirective, isStandalone: true, selector: "[rolatechDecimal]", host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0 }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DecimalDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); | ||
| static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: DecimalDirective, isStandalone: true, selector: "[rolatechDecimal]", host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0 }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: DecimalDirective, decorators: [{ | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DecimalDirective, decorators: [{ | ||
| type: Directive, | ||
@@ -263,3 +260,3 @@ args: [{ | ||
| }] | ||
| }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { onKeyDown: [{ | ||
| }], propDecorators: { onKeyDown: [{ | ||
| type: HostListener, | ||
@@ -313,2 +310,8 @@ args: ['keydown', ['$event']] | ||
| function provideAngularCommon(environment) { | ||
| const resolveConfig = () => { | ||
| const baseConfig = environment ?? {}; | ||
| const win = inject(WINDOW, { optional: true }); | ||
| const runtimeConfig = win?.__APP_CONFIG__ ?? {}; | ||
| return { ...baseConfig, ...runtimeConfig }; | ||
| }; | ||
| const providers = [ | ||
@@ -319,3 +322,3 @@ ...COMMON_PIPES, | ||
| provide: APP_CONFIG, | ||
| useValue: environment, | ||
| useFactory: resolveConfig, | ||
| }, | ||
@@ -331,3 +334,6 @@ { | ||
| provide: NOTIFICATIONS_CONFIG, | ||
| useValue: environment.notification, | ||
| useFactory: () => { | ||
| const config = inject(APP_CONFIG); | ||
| return config?.notification; | ||
| }, | ||
| }, | ||
@@ -334,0 +340,0 @@ { provide: APP_ID, useValue: 'serverApp' }, |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"rolatech-angular-common.mjs","sources":["../../../../packages/angular-common/src/lib/angular-common.module.ts","../../../../packages/angular-common/src/lib/pipes/prettyjson.pipe.ts","../../../../packages/angular-common/src/lib/pipes/time.pipe.ts","../../../../packages/angular-common/src/lib/pipes/duration.pipe.ts","../../../../packages/angular-common/src/lib/pipes/options.pipe.ts","../../../../packages/angular-common/src/lib/pipes/address.pipe.ts","../../../../packages/angular-common/src/lib/pipes/fixed.pipe.ts","../../../../packages/angular-common/src/lib/pipes/shipping-address.pipe.ts","../../../../packages/angular-common/src/lib/pipes/price.pipe.ts","../../../../packages/angular-common/src/lib/pipes/safe-url.pipe.ts","../../../../packages/angular-common/src/lib/pipes/index.ts","../../../../packages/angular-common/src/lib/directive/decimal.directive.ts","../../../../packages/angular-common/src/lib/directive/index.ts","../../../../packages/angular-common/src/lib/interfaces/auth.interface.ts","../../../../packages/angular-common/src/lib/router/username-matcher.ts","../../../../packages/angular-common/src/lib/tokens.ts","../../../../packages/angular-common/src/provider.ts","../../../../packages/angular-common/src/rolatech-angular-common.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';\n\n@NgModule({\n imports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule],\n exports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule],\n})\nexport class AngularCommonModule {}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'prettyjson',\n})\nexport class PrettyjsonPipe implements PipeTransform {\n transform(value: any, ...args: any[]): any {\n if (value) {\n return JSON.stringify(value, null, 4).replace(/ /g, ' ').replace(/\\n/g, '<br/>');\n } else {\n return '{}';\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'time', pure: false })\nexport class TimePipe implements PipeTransform {\n transform(date: string): string {\n return this.format(Date.parse(date));\n }\n\n format(date: number) {\n return moment(date).fromNow();\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'duration',\n})\nexport class DurationPipe implements PipeTransform {\n transform(value: number): string {\n if (!value || isNaN(value) || value < 0) {\n return '00:00';\n }\n const hours = Math.floor(value / 3600);\n const minutes = Math.floor((value % 3600) / 60);\n const seconds = Math.floor(value % 60);\n\n const formattedHours = this.padNumber(hours);\n const formattedMinutes = this.padNumber(minutes);\n const formattedSeconds = this.padNumber(seconds);\n if (formattedHours === '00') {\n return `${formattedMinutes}:${formattedSeconds}`;\n } else {\n return `${formattedHours}:${formattedMinutes}:${formattedSeconds}`;\n }\n }\n private padNumber(num: number): string {\n return num < 10 ? `0${num}` : `${num}`;\n // return num !== undefined && num !== null && num >= 0 && num < 10 ? `0${num}` : `${num}`;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'options',\n})\nexport class OptionsFormatPipe implements PipeTransform {\n transform(options: any[]): any {\n if (!options) {\n return;\n }\n let result = '';\n options.forEach((item, index) => {\n const tmp = index === options.length - 1 ? '' : ', ';\n result += item.value ? item.value.name + tmp : item.name + tmp;\n });\n return result;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'address',\n})\nexport class AddressFormatPipe implements PipeTransform {\n transform(address: any): any {\n if (address) {\n return address.province + ' ' + address.city + ' ' + address.district + ' ' + address.street + ' ' + address.detail;\n }\n return 'Unset';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'fixed',\n})\nexport class FixedPipe implements PipeTransform {\n transform(value: number, ...args: unknown[]): string {\n return value ? (value / 100).toFixed(2) : '0.00';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'shippingAddress',\n})\nexport class ShippingAddressPipe implements PipeTransform {\n transform(address: any, ...args: unknown[]): unknown {\n const includedKeys = ['province', 'city', 'district', 'street', 'detail', 'name', 'phone'];\n if (address) {\n return Object.entries(address)\n .filter(([key]) => includedKeys.includes(key))\n .sort(([keyA], [keyB]) => includedKeys.indexOf(keyA) - includedKeys.indexOf(keyB)) // Sort by includedKeys order\n .map(([key, value]) => value)\n .join(' ');\n }\n return '无';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'price',\n})\nexport class PricePipe implements PipeTransform {\n transform(value: number | string | null | undefined): string {\n if (value == null || value === '') return '£0.00';\n const amount = typeof value === 'string' ? parseFloat(value) : value;\n return new Intl.NumberFormat('en-GB', {\n style: 'currency',\n currency: 'GBP',\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n }).format(amount);\n }\n}\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';\n\n@Pipe({\n name: 'safeUrl',\n standalone: true,\n})\nexport class SafeUrlPipe implements PipeTransform {\n sanitizer = inject(DomSanitizer);\n\n transform(url: string | null | undefined): SafeUrl | SafeResourceUrl | null {\n if (!url) {\n return null;\n }\n // If you want to allow in [href], [src], [poster], [srcdoc], etc.\n return this.sanitizer.bypassSecurityTrustResourceUrl(url);\n }\n}\n","import { PrettyjsonPipe } from './prettyjson.pipe';\nimport { TimePipe } from '../pipes/time.pipe';\nimport { DurationPipe } from './duration.pipe';\nimport { OptionsFormatPipe } from './options.pipe';\nimport { AddressFormatPipe } from './address.pipe';\nimport { FixedPipe } from './fixed.pipe';\nimport { ShippingAddressPipe } from './shipping-address.pipe';\nimport { PricePipe } from './price.pipe';\nimport { SafeUrlPipe } from './safe-url.pipe';\nexport {\n PrettyjsonPipe,\n TimePipe,\n DurationPipe,\n OptionsFormatPipe,\n AddressFormatPipe,\n ShippingAddressPipe,\n FixedPipe,\n PricePipe,\n SafeUrlPipe,\n};\nexport const COMMON_PIPES = [\n PrettyjsonPipe,\n TimePipe,\n DurationPipe,\n OptionsFormatPipe,\n AddressFormatPipe,\n ShippingAddressPipe,\n FixedPipe,\n PricePipe,\n SafeUrlPipe,\n];\n","import { Directive, ElementRef, HostListener } from '@angular/core';\n\n@Directive({\n selector: '[rolatechDecimal]',\n})\nexport class DecimalDirective {\n private regex = new RegExp(/^\\d*\\.?\\d{0,2}$/g);\n\n // Test\n // Allow decimal numbers and negative values\n // Allow key codes for special events. Reflect :\n // Backspace, tab, end, home\n private specialKeys: Array<string> = ['Backspace', 'Tab', 'End', 'Home', 'ArrowLeft', 'ArrowRight', 'Del', 'Delete'];\n\n constructor(private el: ElementRef) {}\n @HostListener('keydown', ['$event'])\n onKeyDown(event: KeyboardEvent) {\n // Allow Backspace, tab, end, and home keys\n if (this.specialKeys.indexOf(event.key) !== -1) {\n return;\n }\n const current: string = this.el.nativeElement.value;\n const position = this.el.nativeElement.selectionStart;\n const next: string = [current.slice(0, position), event.key == 'Decimal' ? '.' : event.key, current.slice(position)].join(\n '',\n );\n if (next && !String(next).match(this.regex)) {\n event.preventDefault();\n }\n }\n}\n","import { Provider } from '@angular/core';\nimport { DecimalDirective } from './decimal.directive';\n\nexport { DecimalDirective };\n\nexport const COMMON_DIRECTIVES: Provider[] = [DecimalDirective];\n","export interface User {\n id?: string;\n name: string;\n username?: string;\n status: UserStatus;\n roles: Role[];\n avatar: string;\n firstName: string;\n lastName: string;\n email: string;\n phone: string;\n createdAt: string;\n}\nexport interface Role {\n id: string;\n name: string; // \"USER\"\n authority: string; // \"USER\"\n description?: string | null;\n permissions?: any[] | null;\n}\nexport interface PasswordChange {\n oldPassword: string;\n newPassword: string;\n ne2Password: string;\n}\nexport interface PasswordResetConfirmRequest {\n token: string;\n newPassword: string;\n}\nexport enum UserStatus {\n ACTIVE = 'Active',\n AWAITING = 'Pending',\n DELETED = 'Deleted',\n}\n","import { UrlSegment, UrlMatchResult } from '@angular/router';\n\nexport function UsernameMatcher(url: UrlSegment[]): UrlMatchResult | null {\n // const regex = /^@(\\w+)$/; // Matches strings like \"@username\"\n // const matched = regex.test(url[0].path);\n const matched = url[0].path.startsWith('@');\n if (!matched) {\n return null;\n }\n if (url.length === 1) {\n return { consumed: url, posParams: { username: new UrlSegment(url[0].path.substring(1), {}) } };\n }\n if (url.length === 2) {\n return {\n consumed: url.slice(0, 1),\n posParams: {\n username: new UrlSegment(url[0].path.substring(1), {}),\n path: url[1],\n },\n };\n }\n return { consumed: url };\n}\n","import { InjectionToken, PLATFORM_ID, inject } from '@angular/core';\nimport { Request, Response } from 'express';\nexport interface AppConfig {\n name: string;\n baseUrl: string;\n clientId: string;\n cookieName: string;\n accountsUrl: string;\n myaccountUrl: string;\n www: string;\n endpoint?: EndpointBasicAuth;\n wechat?: WeChatConfig\n}\nexport interface EndpointBasicAuth {\n username: string;\n password: string;\n}\nexport interface WeChatConfig {\n appId: string;\n}\nexport const APP_CONFIG = new InjectionToken<AppConfig | any>('@rolatech/angular-common config');\n\nexport const REQUEST: any = new InjectionToken<Request>('REQUEST');\nexport const RESPONSE: any = new InjectionToken<Response>('RESPONSE');\n\nexport const WINDOW = new InjectionToken<Window>('@rolatech/angular-common global Window object', {\n providedIn: 'root',\n factory: () => {\n const platform = inject(PLATFORM_ID);\n return platform === 'browser' ? window : ({} as Window);\n },\n});\n","import {\n APP_ID,\n EnvironmentProviders,\n InjectionToken,\n Provider,\n importProvidersFrom,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';\nimport { APP_CONFIG } from './lib/tokens';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { COMMON_PIPES } from './lib/pipes';\nimport { COMMON_DIRECTIVES } from './lib/directive';\nimport { CommonModule, IMAGE_CONFIG } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { MAT_ICON_DEFAULT_OPTIONS } from '@angular/material/icon';\nexport interface NotificationLink {\n name: string;\n icon: string;\n type?: string;\n}\nexport interface NotificationsConfig {\n title?: string;\n items: NotificationLink[];\n}\nexport const NOTIFICATIONS_CONFIG = new InjectionToken<NotificationsConfig>('NOTIFICATIONS_CONFIG');\n\nexport function provideAngularCommon(environment?: any): EnvironmentProviders {\n const providers: (Provider | EnvironmentProviders)[] = [\n ...COMMON_PIPES,\n ...COMMON_DIRECTIVES,\n {\n provide: APP_CONFIG,\n useValue: environment,\n },\n {\n provide: IMAGE_CONFIG,\n useValue: {\n disableImageSizeWarning: true,\n disableImageLazyLoadWarning: true,\n },\n },\n {\n provide: NOTIFICATIONS_CONFIG,\n useValue: environment.notification,\n },\n { provide: APP_ID, useValue: 'serverApp' },\n { provide: MAT_SNACK_BAR_DEFAULT_OPTIONS, useValue: { duration: 2000 } },\n { provide: MAT_ICON_DEFAULT_OPTIONS, useValue: { fontSet: 'material-symbols-outlined' } },\n importProvidersFrom(CommonModule, ReactiveFormsModule, FormsModule, RouterModule),\n ];\n return makeEnvironmentProviders(providers);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MASa,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAnB,mBAAmB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAC1F,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAA,EAAA,CAAA;wGAEzF,mBAAmB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAA8C,WAAW,EAAE,mBAAmB,EAC1F,YAAY,EAA8C,WAAW,EAAE,mBAAmB,CAAA,EAAA,CAAA;;2FAEzF,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAC;AACrG,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAC;AACtG,iBAAA;;;MCHY,cAAc,CAAA;AACzB,IAAA,SAAS,CAAC,KAAU,EAAE,GAAG,IAAW,EAAA;QAClC,IAAI,KAAK,EAAE;YACT,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE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AA,OAAO,EAAE,YAAY;AACrB,YAAA,QAAQ,EAAE;AACR,gBAAA,uBAAuB,EAAE,IAAI;AAC7B,gBAAA,2BAA2B,EAAE,IAAI;AAClC,aAAA;AACF,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,oBAAoB;YAC7B,QAAQ,EAAE,WAAW,CAAC,YAAY;AACnC,SAAA;AACD,QAAA,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE;QAC1C,EAAE,OAAO,EAAE,6BAA6B,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;QACxE,EAAE,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,EAAE;QACzF,mBAAmB,CAAC,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,CAAC;KAClF;AACD,IAAA,OAAO,wBAAwB,CAAC,SAAS,CAAC;AAC5C;;ACpDA;;AAEG;;;;"} | ||
| {"version":3,"file":"rolatech-angular-common.mjs","sources":["../../../../packages/angular-common/src/lib/angular-common.module.ts","../../../../packages/angular-common/src/lib/pipes/prettyjson.pipe.ts","../../../../packages/angular-common/src/lib/pipes/time.pipe.ts","../../../../packages/angular-common/src/lib/pipes/duration.pipe.ts","../../../../packages/angular-common/src/lib/pipes/options.pipe.ts","../../../../packages/angular-common/src/lib/pipes/address.pipe.ts","../../../../packages/angular-common/src/lib/pipes/fixed.pipe.ts","../../../../packages/angular-common/src/lib/pipes/shipping-address.pipe.ts","../../../../packages/angular-common/src/lib/pipes/price.pipe.ts","../../../../packages/angular-common/src/lib/pipes/safe-url.pipe.ts","../../../../packages/angular-common/src/lib/pipes/index.ts","../../../../packages/angular-common/src/lib/directive/decimal.directive.ts","../../../../packages/angular-common/src/lib/directive/index.ts","../../../../packages/angular-common/src/lib/interfaces/auth.interface.ts","../../../../packages/angular-common/src/lib/router/username-matcher.ts","../../../../packages/angular-common/src/lib/tokens.ts","../../../../packages/angular-common/src/provider.ts","../../../../packages/angular-common/src/rolatech-angular-common.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';\n\n@NgModule({\n imports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule],\n exports: [CommonModule, RouterLink, RouterLinkActive, RouterOutlet, FormsModule, ReactiveFormsModule],\n})\nexport class AngularCommonModule {}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'prettyjson',\n})\nexport class PrettyjsonPipe implements PipeTransform {\n transform(value: any, ...args: any[]): any {\n if (value) {\n return JSON.stringify(value, null, 4).replace(/ /g, ' ').replace(/\\n/g, '<br/>');\n } else {\n return '{}';\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport moment from 'moment';\n\n@Pipe({ name: 'time', pure: false })\nexport class TimePipe implements PipeTransform {\n transform(date: string): string {\n return this.format(Date.parse(date));\n }\n\n format(date: number) {\n return moment(date).fromNow();\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'duration',\n})\nexport class DurationPipe implements PipeTransform {\n transform(value: number): string {\n if (!value || isNaN(value) || value < 0) {\n return '00:00';\n }\n const hours = Math.floor(value / 3600);\n const minutes = Math.floor((value % 3600) / 60);\n const seconds = Math.floor(value % 60);\n\n const formattedHours = this.padNumber(hours);\n const formattedMinutes = this.padNumber(minutes);\n const formattedSeconds = this.padNumber(seconds);\n if (formattedHours === '00') {\n return `${formattedMinutes}:${formattedSeconds}`;\n } else {\n return `${formattedHours}:${formattedMinutes}:${formattedSeconds}`;\n }\n }\n private padNumber(num: number): string {\n return num < 10 ? `0${num}` : `${num}`;\n // return num !== undefined && num !== null && num >= 0 && num < 10 ? `0${num}` : `${num}`;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'options',\n})\nexport class OptionsFormatPipe implements PipeTransform {\n transform(options: any[]): any {\n if (!options) {\n return;\n }\n let result = '';\n options.forEach((item, index) => {\n const tmp = index === options.length - 1 ? '' : ', ';\n result += item.value ? item.value.name + tmp : item.name + tmp;\n });\n return result;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'address',\n})\nexport class AddressFormatPipe implements PipeTransform {\n transform(address: any): any {\n if (address) {\n return address.province + ' ' + address.city + ' ' + address.district + ' ' + address.street + ' ' + address.detail;\n }\n return 'Unset';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'fixed',\n})\nexport class FixedPipe implements PipeTransform {\n transform(value: number, ...args: unknown[]): string {\n return value ? (value / 100).toFixed(2) : '0.00';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'shippingAddress',\n})\nexport class ShippingAddressPipe implements PipeTransform {\n transform(address: any, ...args: unknown[]): unknown {\n const includedKeys = ['province', 'city', 'district', 'street', 'detail', 'name', 'phone'];\n if (address) {\n return Object.entries(address)\n .filter(([key]) => includedKeys.includes(key))\n .sort(([keyA], [keyB]) => includedKeys.indexOf(keyA) - includedKeys.indexOf(keyB)) // Sort by includedKeys order\n .map(([key, value]) => value)\n .join(' ');\n }\n return '无';\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'price',\n})\nexport class PricePipe implements PipeTransform {\n transform(value: number | string | null | undefined): string {\n if (value == null || value === '') return '£0.00';\n const amount = typeof value === 'string' ? parseFloat(value) : value;\n return new Intl.NumberFormat('en-GB', {\n style: 'currency',\n currency: 'GBP',\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n }).format(amount);\n }\n}\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';\n\n@Pipe({\n name: 'safeUrl',\n standalone: true,\n})\nexport class SafeUrlPipe implements PipeTransform {\n sanitizer = inject(DomSanitizer);\n\n transform(url: string | null | undefined): SafeUrl | SafeResourceUrl | null {\n if (!url) {\n return null;\n }\n // If you want to allow in [href], [src], [poster], [srcdoc], etc.\n return this.sanitizer.bypassSecurityTrustResourceUrl(url);\n }\n}\n","import { PrettyjsonPipe } from './prettyjson.pipe';\nimport { TimePipe } from '../pipes/time.pipe';\nimport { DurationPipe } from './duration.pipe';\nimport { OptionsFormatPipe } from './options.pipe';\nimport { AddressFormatPipe } from './address.pipe';\nimport { FixedPipe } from './fixed.pipe';\nimport { ShippingAddressPipe } from './shipping-address.pipe';\nimport { PricePipe } from './price.pipe';\nimport { SafeUrlPipe } from './safe-url.pipe';\nexport {\n PrettyjsonPipe,\n TimePipe,\n DurationPipe,\n OptionsFormatPipe,\n AddressFormatPipe,\n ShippingAddressPipe,\n FixedPipe,\n PricePipe,\n SafeUrlPipe,\n};\nexport const COMMON_PIPES = [\n PrettyjsonPipe,\n TimePipe,\n DurationPipe,\n OptionsFormatPipe,\n AddressFormatPipe,\n ShippingAddressPipe,\n FixedPipe,\n PricePipe,\n SafeUrlPipe,\n];\n","import { Directive, ElementRef, HostListener, inject } from '@angular/core';\n\n@Directive({\n selector: '[rolatechDecimal]',\n})\nexport class DecimalDirective {\n private regex = new RegExp(/^\\d*\\.?\\d{0,2}$/g);\n\n // Test\n // Allow decimal numbers and negative values\n // Allow key codes for special events. Reflect :\n // Backspace, tab, end, home\n private specialKeys: Array<string> = ['Backspace', 'Tab', 'End', 'Home', 'ArrowLeft', 'ArrowRight', 'Del', 'Delete'];\n\n private el = inject(ElementRef);\n @HostListener('keydown', ['$event'])\n onKeyDown(event: KeyboardEvent) {\n // Allow Backspace, tab, end, and home keys\n if (this.specialKeys.indexOf(event.key) !== -1) {\n return;\n }\n const current: string = this.el.nativeElement.value;\n const position = this.el.nativeElement.selectionStart;\n const next: string = [current.slice(0, position), event.key == 'Decimal' ? '.' : event.key, current.slice(position)].join(\n '',\n );\n if (next && !String(next).match(this.regex)) {\n event.preventDefault();\n }\n }\n}\n","import { Provider } from '@angular/core';\nimport { DecimalDirective } from './decimal.directive';\n\nexport { DecimalDirective };\n\nexport const COMMON_DIRECTIVES: Provider[] = [DecimalDirective];\n","export interface User {\n id?: string;\n name: string;\n username?: string;\n status: UserStatus;\n roles: Role[];\n avatar: string;\n firstName: string;\n lastName: string;\n email: string;\n phone: string;\n createdAt: string;\n}\nexport interface Role {\n id: string;\n name: string; // \"USER\"\n authority: string; // \"USER\"\n description?: string | null;\n permissions?: any[] | null;\n}\nexport interface PasswordChange {\n oldPassword: string;\n newPassword: string;\n ne2Password: string;\n}\nexport interface PasswordResetConfirmRequest {\n token: string;\n newPassword: string;\n}\nexport enum UserStatus {\n ACTIVE = 'Active',\n AWAITING = 'Pending',\n DELETED = 'Deleted',\n}\n","import { UrlSegment, UrlMatchResult } from '@angular/router';\n\nexport function UsernameMatcher(url: UrlSegment[]): UrlMatchResult | null {\n // const regex = /^@(\\w+)$/; // Matches strings like \"@username\"\n // const matched = regex.test(url[0].path);\n const matched = url[0].path.startsWith('@');\n if (!matched) {\n return null;\n }\n if (url.length === 1) {\n return { consumed: url, posParams: { username: new UrlSegment(url[0].path.substring(1), {}) } };\n }\n if (url.length === 2) {\n return {\n consumed: url.slice(0, 1),\n posParams: {\n username: new UrlSegment(url[0].path.substring(1), {}),\n path: url[1],\n },\n };\n }\n return { consumed: url };\n}\n","import { InjectionToken, PLATFORM_ID, inject } from '@angular/core';\nimport { Request, Response } from 'express';\nexport interface AppConfig {\n name: string;\n baseUrl: string;\n clientId: string;\n cookieName: string;\n accountsUrl: string;\n myaccountUrl: string;\n www: string;\n endpoint?: EndpointBasicAuth;\n wechat?: WeChatConfig\n}\nexport interface EndpointBasicAuth {\n username: string;\n password: string;\n}\nexport interface WeChatConfig {\n appId: string;\n}\nexport const APP_CONFIG = new InjectionToken<AppConfig | any>('@rolatech/angular-common config');\n\nexport const REQUEST: any = new InjectionToken<Request>('REQUEST');\nexport const RESPONSE: any = new InjectionToken<Response>('RESPONSE');\n\nexport const WINDOW = new InjectionToken<Window>('@rolatech/angular-common global Window object', {\n providedIn: 'root',\n factory: () => {\n const platform = inject(PLATFORM_ID);\n return platform === 'browser' ? window : ({} as Window);\n },\n});\n","import {\n APP_ID,\n EnvironmentProviders,\n InjectionToken,\n Provider,\n importProvidersFrom,\n inject,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';\nimport { APP_CONFIG, WINDOW } from './lib/tokens';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { COMMON_PIPES } from './lib/pipes';\nimport { COMMON_DIRECTIVES } from './lib/directive';\nimport { CommonModule, IMAGE_CONFIG } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { MAT_ICON_DEFAULT_OPTIONS } from '@angular/material/icon';\nexport interface NotificationLink {\n name: string;\n icon: string;\n type?: string;\n}\nexport interface NotificationsConfig {\n title?: string;\n items: NotificationLink[];\n}\nexport const NOTIFICATIONS_CONFIG = new InjectionToken<NotificationsConfig>('NOTIFICATIONS_CONFIG');\n\nexport function provideAngularCommon(environment?: any): EnvironmentProviders {\n const resolveConfig = () => {\n const baseConfig = environment ?? {};\n const win = inject(WINDOW, { optional: true });\n const runtimeConfig = (win as any)?.__APP_CONFIG__ ?? {};\n return { ...baseConfig, ...runtimeConfig };\n };\n\n const providers: (Provider | EnvironmentProviders)[] = [\n ...COMMON_PIPES,\n ...COMMON_DIRECTIVES,\n {\n provide: APP_CONFIG,\n useFactory: resolveConfig,\n },\n {\n provide: IMAGE_CONFIG,\n useValue: {\n disableImageSizeWarning: true,\n disableImageLazyLoadWarning: true,\n },\n },\n {\n provide: NOTIFICATIONS_CONFIG,\n useFactory: () => {\n const config = inject(APP_CONFIG);\n return config?.notification;\n },\n },\n { provide: APP_ID, useValue: 'serverApp' },\n { provide: MAT_SNACK_BAR_DEFAULT_OPTIONS, useValue: { duration: 2000 } },\n { provide: MAT_ICON_DEFAULT_OPTIONS, useValue: { fontSet: 'material-symbols-outlined' } },\n importProvidersFrom(CommonModule, ReactiveFormsModule, FormsModule, RouterModule),\n ];\n return makeEnvironmentProviders(providers);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MASa,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAnB,mBAAmB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAC1F,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAA,EAAA,CAAA;wGAEzF,mBAAmB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAA8C,WAAW,EAAE,mBAAmB,EAC1F,YAAY,EAA8C,WAAW,EAAE,mBAAmB,CAAA,EAAA,CAAA;;2FAEzF,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAC;AACrG,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,CAAC;AACtG,iBAAA;;;MCHY,cAAc,CAAA;AACzB,IAAA,SAAS,CAAC,KAAU,EAAE,GAAG,IAAW,EAAA;QAClC,IAAI,KAAK,EAAE;YACT,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,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EAAE,GAAG,aAAa,EAAE;AAC5C,IAAA,CAAC;AAED,IAAA,MAAM,SAAS,GAAwC;AACrD,QAAA,GAAG,YAAY;AACf,QAAA,GAAG,iBAAiB;AACpB,QAAA;AACE,YAAA,OAAO,EAAE,UAAU;AACnB,YAAA,UAAU,EAAE,aAAa;AAC1B,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,YAAY;AACrB,YAAA,QAAQ,EAAE;AACR,gBAAA,uBAAuB,EAAE,IAAI;AAC7B,gBAAA,2BAA2B,EAAE,IAAI;AAClC,aAAA;AACF,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,oBAAoB;YAC7B,UAAU,EAAE,MAAK;AACf,gBAAA,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;gBACjC,OAAO,MAAM,EAAE,YAAY;YAC7B,CAAC;AACF,SAAA;AACD,QAAA,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE;QAC1C,EAAE,OAAO,EAAE,6BAA6B,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;QACxE,EAAE,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,EAAE;QACzF,mBAAmB,CAAC,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,CAAC;KAClF;AACD,IAAA,OAAO,wBAAwB,CAAC,SAAS,CAAC;AAC5C;;AC/DA;;AAEG;;;;"} |
+1
-1
| { | ||
| "name": "@rolatech/angular-common", | ||
| "version": "20.2.8-beta.11", | ||
| "version": "20.2.8-beta.12", | ||
| "private": false, | ||
@@ -5,0 +5,0 @@ "peerDependencies": { |
| import * as i0 from '@angular/core'; | ||
| import { PipeTransform, ElementRef, Provider, InjectionToken, EnvironmentProviders } from '@angular/core'; | ||
| import { PipeTransform, Provider, InjectionToken, EnvironmentProviders } from '@angular/core'; | ||
| import * as i1 from '@angular/common'; | ||
@@ -75,6 +75,5 @@ import * as i2 from '@angular/router'; | ||
| declare class DecimalDirective { | ||
| private el; | ||
| private regex; | ||
| private specialKeys; | ||
| constructor(el: ElementRef); | ||
| private el; | ||
| onKeyDown(event: KeyboardEvent): void; | ||
@@ -81,0 +80,0 @@ static ɵfac: i0.ɵɵFactoryDeclaration<DecimalDirective, never>; |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
45579
1.83%498
1.01%