UNPKG

jqwidgets-ng

Version:

[![Price](https://img.shields.io/badge/price-COMMERCIAL-0098f7.svg)](https://jqwidgets.com/license/)

50 lines (48 loc) 2.33 kB
"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 */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); const schematics_1 = require("@angular-devkit/schematics"); const schematics_2 = require("../../cdk/schematics"); const material_fonts_1 = require("../../fonts/material-fonts"); const theming_1 = require("../../theming/theming"); /** * Scaffolds a new tree component. * Internally it bootstraps the base component schematic */ function default_1(options) { return schematics_1.chain([ schematics_2.buildComponent(Object.assign({}, options), { template: './__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template', stylesheet: './__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template', }), theming_1.addThemeToAppStyles(options), material_fonts_1.addFontsToIndex(options), theming_1.addTypographyClass(options), options.skipImport ? schematics_1.noop() : addTreeModulesToModule(options) ]); } exports.default = default_1; /** * Adds the required modules to the relative module. */ function addTreeModulesToModule(options) { return (host) => __awaiter(this, void 0, void 0, function* () { const modulePath = (yield schematics_2.findModuleFromOptions(host, options)); schematics_2.addModuleImportToModule(host, modulePath, 'jqxGridModule', 'jqwidgets-ng/jqxgrid'); }); }