source: trip-planner-front/node_modules/@angular/material/schematics/ng-generate/address-form/index.js

Last change on this file 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 table 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() : addFormModulesToModule(options)
32 ]);
33}
34exports.default = default_1;
35/**
36 * Adds the required modules to the relative module.
37 */
38function addFormModulesToModule(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, 'MatInputModule', '@angular/material/input');
42 schematics_2.addModuleImportToModule(host, modulePath, 'MatButtonModule', '@angular/material/button');
43 schematics_2.addModuleImportToModule(host, modulePath, 'MatSelectModule', '@angular/material/select');
44 schematics_2.addModuleImportToModule(host, modulePath, 'MatRadioModule', '@angular/material/radio');
45 schematics_2.addModuleImportToModule(host, modulePath, 'MatCardModule', '@angular/material/card');
46 schematics_2.addModuleImportToModule(host, modulePath, 'ReactiveFormsModule', '@angular/forms');
47 });
48}
49//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWF0ZXJpYWwvc2NoZW1hdGljcy9uZy1nZW5lcmF0ZS9hZGRyZXNzLWZvcm0vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7Ozs7Ozs7Ozs7QUFFSCwyREFBbUU7QUFDbkUsd0RBSWlDO0FBR2pDOzs7R0FHRztBQUNILG1CQUF3QixPQUFlO0lBQ3JDLE9BQU8sa0JBQUssQ0FBQztRQUNYLDJCQUFjLG1CQUFLLE9BQU8sR0FBRztZQUMzQixRQUFRLEVBQUUsa0ZBQWtGO1lBQzVGLFVBQVUsRUFDTix1RkFBdUY7U0FDNUYsQ0FBQztRQUNGLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLGlCQUFJLEVBQUUsQ0FBQyxDQUFDLENBQUMsc0JBQXNCLENBQUMsT0FBTyxDQUFDO0tBQzlELENBQUMsQ0FBQztBQUNMLENBQUM7QUFURCw0QkFTQztBQUVEOztHQUVHO0FBQ0gsU0FBUyxzQkFBc0IsQ0FBQyxPQUFlO0lBQzdDLE9BQU8sQ0FBTyxJQUFVLEVBQUUsRUFBRTtRQUMxQixNQUFNLFVBQVUsR0FBRyxDQUFDLE1BQU0sa0NBQXFCLENBQUMsSUFBSSxFQUFFLE9BQU8sQ0FBQyxDQUFFLENBQUM7UUFDakUsb0NBQXVCLENBQUMsSUFBSSxFQUFFLFVBQVUsRUFBRSxnQkFBZ0IsRUFBRSx5QkF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