-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaintenance-info-maintenance-info-module.js.map
1 lines (1 loc) · 11.5 KB
/
maintenance-info-maintenance-info-module.js.map
1
{"version":3,"sources":["../common-angular/src/pipes/capitalize.pipe.ts","../common-angular/src/pipes/number-with-commas.pipe.ts","../common-angular/src/pipes/pipes.module.ts","../common-angular/src/pipes/plural.pipe.ts","../common-angular/src/pipes/replace.pipe.ts","../common-angular/src/pipes/round.pipe.ts","../common-angular/src/pipes/safe.pipe.ts","../common-angular/src/pipes/timing.pipe.ts","./src/app/+maintenance-info/maintenance-info.component.ts","./src/app/+maintenance-info/maintenance-info.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAoD;AAGpD;IAAA;IAMA,CAAC;IALA,kCAAS,GAAT,UAAU,KAAa;QACtB,OAAO,KAAK,IAAI,KAAK,CAAC,MAAM;YAC3B,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;YAC9D,CAAC,CAAC,KAAK,CAAC;IACV,CAAC;IALW,cAAc;QAD1B,0DAAI,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;OACnB,cAAc,CAM1B;IAAD,qBAAC;CAAA;AAN0B;;;;;;;;;;;;;;;;;;ACHyB;AAGpD;IAAA;IAIA,CAAC;IAHA,wCAAS,GAAT,UAAU,KAAa;QACtB,OAAO,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;IAHW,oBAAoB;QADhC,0DAAI,CAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;OACxB,oBAAoB,CAIhC;IAAD,2BAAC;CAAA;AAJgC;;;;;;;;;;;;;;;;;;;;;;;;;ACHQ;AACF;AACM;AACM;AACR;AACF;AACE;AACsB;AAuBjE;IAAA;IAA0B,CAAC;IAAd,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xCapitalize' })\nexport class CapitalizePipe implements PipeTransform {\n\ttransform(input: string): string {\n\t\treturn input && input.length\n\t\t\t? input.charAt(0).toUpperCase() + input.slice(1).toLowerCase()\n\t\t\t: input;\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'myNumberWithCommas' })\nexport class NumberWithCommasPipe implements PipeTransform {\n\ttransform(input: number): string {\n\t\treturn new Intl.NumberFormat().format(input);\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { SafePipe } from './safe.pipe';\nimport { ReplacePipe } from './replace.pipe';\nimport { CapitalizePipe } from './capitalize.pipe';\nimport { PluralPipe } from './plural.pipe';\nimport { RoundPipe } from './round.pipe';\nimport { TimingPipe } from './timing.pipe';\nimport { NumberWithCommasPipe } from './number-with-commas.pipe';\n\n@NgModule({\n\texports: [\n\t\tSafePipe,\n\t\tReplacePipe,\n\t\tCapitalizePipe,\n\t\tPluralPipe,\n\t\tRoundPipe,\n\t\tTimingPipe,\n\t\tNumberWithCommasPipe,\n\t],\n\timports: [],\n\tdeclarations: [\n\t\tSafePipe,\n\t\tReplacePipe,\n\t\tCapitalizePipe,\n\t\tPluralPipe,\n\t\tRoundPipe,\n\t\tTimingPipe,\n\t\tNumberWithCommasPipe,\n\t],\n})\nexport class PipesModule {}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'ngxPlural' })\nexport class PluralPipe implements PipeTransform {\n\ttransform(input: number, label: string, pluralLabel: string = ''): string {\n\t\tinput = input || 0;\n\t\treturn input === 1\n\t\t\t? `${input} ${label}`\n\t\t\t: pluralLabel\n\t\t\t? `${input} ${pluralLabel}`\n\t\t\t: `${input} ${label}s`;\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'myReplacePipe' })\nexport class ReplacePipe implements PipeTransform {\n\ttransform(\n\t\tvalue: string,\n\t\tsearchValue: string,\n\t\treplaceValue: string\n\t): string {\n\t\tif (\n\t\t\ttypeof value !== typeof 'string' ||\n\t\t\ttypeof searchValue !== typeof 'string' ||\n\t\t\ttypeof replaceValue !== typeof 'string'\n\t\t) {\n\t\t\tthrow Error('All pipe parameters should be strings!');\n\t\t}\n\n\t\treturn value.replace(new RegExp(searchValue, 'g'), replaceValue);\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'ngxRound' })\nexport class RoundPipe implements PipeTransform {\n\ttransform(input: number): number {\n\t\treturn Math.round(input);\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport {\n\tDomSanitizer,\n\tSafeHtml,\n\tSafeResourceUrl,\n\tSafeScript,\n\tSafeStyle,\n\tSafeUrl,\n} from '@angular/platform-browser';\n\n@Pipe({\n\tname: 'safe',\n})\nexport class SafePipe implements PipeTransform {\n\tconstructor(protected sanitizer: DomSanitizer) {}\n\n\ttransform(\n\t\tvalue: any,\n\t\ttype: string\n\t): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl {\n\t\tswitch (type) {\n\t\t\tcase 'html':\n\t\t\t\treturn this.sanitizer.bypassSecurityTrustHtml(value);\n\t\t\tcase 'style':\n\t\t\t\treturn this.sanitizer.bypassSecurityTrustStyle(value);\n\t\t\tcase 'script':\n\t\t\t\treturn this.sanitizer.bypassSecurityTrustScript(value);\n\t\t\tcase 'url':\n\t\t\t\treturn this.sanitizer.bypassSecurityTrustUrl(value);\n\t\t\tcase 'resourceUrl':\n\t\t\t\treturn this.sanitizer.bypassSecurityTrustResourceUrl(value);\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Invalid safe type specified: ${type}`);\n\t\t}\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'timing' })\nexport class TimingPipe implements PipeTransform {\n\ttransform(time: number): string {\n\t\tif (time) {\n\t\t\tconst minutes = Math.floor(time / 60);\n\t\t\tconst seconds = Math.floor(time % 60);\n\t\t\treturn `${this.initZero(minutes)}${minutes}:${this.initZero(\n\t\t\t\tseconds\n\t\t\t)}${seconds}`;\n\t\t}\n\n\t\treturn '00:00';\n\t}\n\n\tprivate initZero(time: number): string {\n\t\treturn time < 10 ? '0' : '';\n\t}\n}\n","import { Component } from '@angular/core';\nimport { MaintenanceService } from '@modules/client.common.angular2/services/maintenance.service';\nimport { environment } from 'environments/environment';\nimport { ToolbarController } from 'app/app.component';\nimport { Store } from 'app/services/store';\nimport { Router } from '@angular/router';\n\n@Component({\n\ttemplate: `\n\t\t<div\n\t\t\t*ngIf=\"message\"\n\t\t\tclass=\"maintenance-message-container\"\n\t\t\t[innerHTML]=\"message | safe: 'html'\"\n\t\t></div>\n\t`,\n})\nexport class MaintenanceInfoComponent implements ToolbarController {\n\tpublic toolbarDisabled: boolean = true;\n\tpublic message;\n\tconstructor(\n\t\tprivate maintenanceService: MaintenanceService,\n\t\tprivate store: Store,\n\t\tprivate router: Router\n\t) {\n\t\tthis.getMessage();\n\t\tthis.getStatus();\n\t}\n\n\tasync getMessage() {\n\t\tthis.message = await this.maintenanceService.getMessage(\n\t\t\tthis.store.maintenanceMode,\n\t\t\tenvironment['SETTINGS_MAINTENANCE_API_URL']\n\t\t);\n\t}\n\n\tprivate async getStatus() {\n\t\tconst interval = setInterval(async () => {\n\t\t\tconst status = await this.maintenanceService.getStatus(\n\t\t\t\tenvironment['SETTINGS_APP_TYPE'],\n\t\t\t\tenvironment['SETTINGS_MAINTENANCE_API_URL']\n\t\t\t);\n\t\t\tconsole.warn(\n\t\t\t\t`Maintenance on '${this.store.maintenanceMode}': ${status}`\n\t\t\t);\n\n\t\t\tif (!status) {\n\t\t\t\tclearInterval(interval);\n\t\t\t\tthis.store.clearMaintenanceMode();\n\t\t\t\tthis.router.navigate(['']);\n\t\t\t}\n\t\t}, 5000);\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Routes, RouterModule } from '@angular/router';\nimport { MaintenanceService } from '@modules/client.common.angular2/services/maintenance.service';\nimport { MaintenanceInfoComponent } from './maintenance-info.component';\nimport { PipesModule } from '@modules/client.common.angular2/pipes/pipes.module';\n\nconst routes: Routes = [\n\t{\n\t\tpath: '',\n\t\tcomponent: MaintenanceInfoComponent,\n\t},\n];\n\n@NgModule({\n\timports: [CommonModule, RouterModule.forChild(routes), PipesModule],\n\tproviders: [MaintenanceService],\n\tdeclarations: [MaintenanceInfoComponent],\n})\nexport class MaintenanceInfoModule {}\n"],"sourceRoot":"webpack:///"}