source: trip-planner-front/node_modules/@angular/cdk/schematics/ng-generate/drag-drop/index.mjs@ 6fe77af

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

initial commit

  • Property mode set to 100644
File size: 4.5 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 utils_1 = require("../../utils");
21/** Scaffolds a new Angular component that uses the Drag and Drop module. */
22function default_1(options) {
23 return schematics_1.chain([
24 utils_1.buildComponent(Object.assign({}, options), {
25 template: './__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template',
26 stylesheet: './__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template',
27 }),
28 options.skipImport ? schematics_1.noop() : addDragDropModulesToModule(options)
29 ]);
30}
31exports.default = default_1;
32/** Adds the required modules to the main module of the CLI project. */
33function addDragDropModulesToModule(options) {
34 return (host) => __awaiter(this, void 0, void 0, function* () {
35 const modulePath = yield utils_1.findModuleFromOptions(host, options);
36 utils_1.addModuleImportToModule(host, modulePath, 'DragDropModule', '@angular/cdk/drag-drop');
37 });
38}
39//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyI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