source: trip-planner-front/node_modules/@angular/material/schematics/ng-generate/navigation/index.mjs@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 6.2 KB
Line 
1"use strict";
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
10 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11 return new (P || (P = Promise))(function (resolve, reject) {
12 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
13 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
14 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
15 step((generator = generator.apply(thisArg, _arguments || [])).next());
16 });
17};
18Object.defineProperty(exports, "__esModule", { value: true });
19const schematics_1 = require("@angular-devkit/schematics");
20const schematics_2 = require("@angular/cdk/schematics");
21/**
22 * Scaffolds a new navigation component.
23 * Internally it bootstraps the base component schematic
24 */
25function default_1(options) {
26 return schematics_1.chain([
27 schematics_2.buildComponent(Object.assign({}, options), {
28 template: './__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template',
29 stylesheet: './__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template',
30 }),
31 options.skipImport ? schematics_1.noop() : addNavModulesToModule(options)
32 ]);
33}
34exports.default = default_1;
35/**
36 * Adds the required modules to the relative module.
37 */
38function addNavModulesToModule(options) {
39 return (host) => __awaiter(this, void 0, void 0, function* () {
40 const modulePath = (yield schematics_2.findModuleFromOptions(host, options));
41 schematics_2.addModuleImportToModule(host, modulePath, 'LayoutModule', '@angular/cdk/layout');
42 schematics_2.addModuleImportToModule(host, modulePath, 'MatToolbarModule', '@angular/material/toolbar');
43 schematics_2.addModuleImportToModule(host, modulePath, 'MatButtonModule', '@angular/material/button');
44 schematics_2.addModuleImportToModule(host, modulePath, 'MatSidenavModule', '@angular/material/sidenav');
45 schematics_2.addModuleImportToModule(host, modulePath, 'MatIconModule', '@angular/material/icon');
46 schematics_2.addModuleImportToModule(host, modulePath, 'MatListModule', '@angular/material/list');
47 });
48}
49//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWF0ZXJpYWwvc2NoZW1hdGljcy9uZy1nZW5lcmF0ZS9uYXZpZ2F0aW9uL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7O0dBTUc7Ozs7Ozs7Ozs7O0FBRUgsMkRBQW1FO0FBQ25FLHdEQUlpQztBQUdqQzs7O0dBR0c7QUFDSCxtQkFBd0IsT0FBZTtJQUNyQyxPQUFPLGtCQUFLLENBQUM7UUFDWCwyQkFBYyxtQkFBSyxPQUFPLEdBQUc7WUFDM0IsUUFBUSxFQUFFLGtGQUFrRjtZQUM1RixVQUFVLEVBQ04sdUZBQXVGO1NBQzVGLENBQUM7UUFDRixPQUFPLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxpQkFBSSxFQUFFLENBQUMsQ0FBQyxDQUFDLHFCQUFxQixDQUFDLE9BQU8sQ0FBQztLQUM3RCxDQUFDLENBQUM7QUFDTCxDQUFDO0FBVEQsNEJBU0M7QUFFRDs7R0FFRztBQUNILFNBQVMscUJBQXFCLENBQUMsT0FBZTtJQUM1QyxPQUFPLENBQU8sSUFBVSxFQUFFLEVBQUU7UUFDMUIsTUFBTSxVQUFVLEdBQUcsQ0FBQyxNQUFNLGtDQUFxQixDQUFDLElBQUksRUFBRSxPQUFPLENBQUMsQ0FBRSxDQUFDO1FBQ2pFLG9DQUF1QixDQUFDLElBQUksRUFBRSxVQUFVLEVBQUUs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