diff options
author | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-01 21:54:41 +0100 |
---|---|---|
committer | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-01 21:54:41 +0100 |
commit | 6c8128f9fd5a5d0be115806c35a21b3d683df8d6 (patch) | |
tree | f46c2f6b3b9b294ff32bd75c08ccdc9e7a8cc4ef /sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/index.js | |
parent | 2400b84e95913665da6279114168148444b8f9ab (diff) | |
parent | 7d3640f824f46490b47bd95f1c5a16644f712068 (diff) |
Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into logo
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/index.js')
-rw-r--r-- | sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/index.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/index.js b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/index.js new file mode 100644 index 00000000..bfec75da --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/guard/index.js @@ -0,0 +1,38 @@ +"use strict"; +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +Object.defineProperty(exports, "__esModule", { value: true }); +const schematics_1 = require("@angular-devkit/schematics"); +const generate_from_files_1 = require("../utility/generate-from-files"); +const schema_1 = require("./schema"); +function default_1(options) { + if (!options.implements) { + throw new schematics_1.SchematicsException('Option "implements" is required.'); + } + const implementations = options.implements + .map((implement) => (implement === 'CanDeactivate' ? 'CanDeactivate<unknown>' : implement)) + .join(', '); + const commonRouterNameImports = ['ActivatedRouteSnapshot', 'RouterStateSnapshot']; + const routerNamedImports = [...options.implements, 'UrlTree']; + if (options.implements.includes(schema_1.Implement.CanLoad)) { + routerNamedImports.push('Route', 'UrlSegment'); + if (options.implements.length > 1) { + routerNamedImports.push(...commonRouterNameImports); + } + } + else { + routerNamedImports.push(...commonRouterNameImports); + } + routerNamedImports.sort(); + const implementationImports = routerNamedImports.join(', '); + return (0, generate_from_files_1.generateFromFiles)(options, { + implementations, + implementationImports, + }); +} +exports.default = default_1; |