This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 231
/
http-client-in-memory-web-api.module.js.map
1 lines (1 loc) · 3.62 KB
/
http-client-in-memory-web-api.module.js.map
1
{"version":3,"file":"http-client-in-memory-web-api.module.js","sourceRoot":"","sources":["http-client-in-memory-web-api.module.ts"],"names":[],"mappings":"AAAA,mCAAmC;;;;;;;AAEnC,OAAO,EAAE,QAAQ,EAA6B,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,EAEL,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,kEAAkE;AAClE,sCAAsC;AACtC,MAAM,UAAU,oCAAoC,CAClD,SAA4B,EAC5B,OAA8B,EAC9B,UAAsB;IAEtB,IAAM,OAAO,GAAQ,IAAI,wBAAwB,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IAClF,OAAO,OAAO,CAAC;AACjB,CAAC;AAGD;IAAA;IAwCA,CAAC;uCAxCY,8BAA8B;IACzC;;;;;;;;;;;;;;MAcE;IACK,sCAAO,GAAd,UAAe,SAAkC,EAAE,OAAmC;QAEpF,OAAO;YACL,QAAQ,EAAE,gCAA8B;YACxC,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,iBAAiB,EAAG,QAAQ,EAAE,SAAS,EAAE;gBACpD,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,OAAO,EAAE;gBAErD,EAAE,OAAO,EAAE,WAAW;oBACpB,UAAU,EAAE,oCAAoC;oBAChD,IAAI,EAAE,CAAC,iBAAiB,EAAE,qBAAqB,EAAE,UAAU,CAAC,EAAC;aAChE;SACF,CAAC;IACJ,CAAC;IACC;;;;;KAKC;IACI,yCAAU,GAAjB,UAAkB,SAAkC,EAAE,OAAmC;QAEvF,OAAO,gCAA8B,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;;IAvCU,8BAA8B;QAD1C,QAAQ,CAAC,EAAE,CAAC;OACA,8BAA8B,CAwC1C;IAAD,qCAAC;CAAA,AAxCD,IAwCC;SAxCY,8BAA8B","sourcesContent":["////// HttpClient-Only version ////\n\nimport { NgModule, ModuleWithProviders, Type } from '@angular/core';\nimport { HttpBackend, XhrFactory } from '@angular/common/http';\n\nimport {\n InMemoryBackendConfigArgs,\n InMemoryBackendConfig,\n InMemoryDbService\n} from './interfaces';\n\nimport { HttpClientBackendService } from './http-client-backend.service';\n\n// Internal - Creates the in-mem backend for the HttpClient module\n// AoT requires factory to be exported\nexport function httpClientInMemBackendServiceFactory(\n dbService: InMemoryDbService,\n options: InMemoryBackendConfig,\n xhrFactory: XhrFactory,\n): HttpBackend {\n const backend: any = new HttpClientBackendService(dbService, options, xhrFactory);\n return backend;\n}\n\n@NgModule({})\nexport class HttpClientInMemoryWebApiModule {\n /**\n * Redirect the Angular `HttpClient` XHR calls\n * to in-memory data store that implements `InMemoryDbService`.\n * with class that implements InMemoryDbService and creates an in-memory database.\n *\n * Usually imported in the root application module.\n * Can import in a lazy feature module too, which will shadow modules loaded earlier\n *\n * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService.\n * @param {InMemoryBackendConfigArgs} [options]\n *\n * @example\n * HttpInMemoryWebApiModule.forRoot(dbCreator);\n * HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}});\n */\n static forRoot(dbCreator: Type<InMemoryDbService>, options?: InMemoryBackendConfigArgs):\n ModuleWithProviders<HttpClientInMemoryWebApiModule> {\n return {\n ngModule: HttpClientInMemoryWebApiModule,\n providers: [\n { provide: InMemoryDbService, useClass: dbCreator },\n { provide: InMemoryBackendConfig, useValue: options },\n\n { provide: HttpBackend,\n useFactory: httpClientInMemBackendServiceFactory,\n deps: [InMemoryDbService, InMemoryBackendConfig, XhrFactory]}\n ]\n };\n }\n /**\n *\n * Enable and configure the in-memory web api in a lazy-loaded feature module.\n * Same as `forRoot`.\n * This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules.\n */\n static forFeature(dbCreator: Type<InMemoryDbService>, options?: InMemoryBackendConfigArgs):\n ModuleWithProviders<HttpClientInMemoryWebApiModule> {\n return HttpClientInMemoryWebApiModule.forRoot(dbCreator, options);\n }\n}\n"]}