@coolon/angular-ui-powerups 15.0.1 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/package.json +2 -2
  2. package/schematics/activity/index.d.ts +0 -3
  3. package/schematics/activity/index.js +0 -32
  4. package/schematics/activity/index.js.map +0 -1
  5. package/schematics/activity/index.spec.d.ts +0 -1
  6. package/schematics/activity/index.spec.js +0 -364
  7. package/schematics/activity/index.spec.js.map +0 -1
  8. package/schematics/activity/schema.d.ts +0 -4
  9. package/schematics/activity/schema.js +0 -3
  10. package/schematics/activity/schema.js.map +0 -1
  11. package/schematics/activity/schema.json +0 -27
  12. package/schematics/activity/templates/component/__name@dasherize__.component.html.template +0 -5
  13. package/schematics/activity/templates/component/__name@dasherize__.component.scss.template +0 -4
  14. package/schematics/activity/templates/component/__name@dasherize__.component.spec.ts.template +0 -25
  15. package/schematics/activity/templates/component/__name@dasherize__.component.ts.template +0 -40
  16. package/schematics/activity/templates/component/__name@dasherize__.i18n.yml.template +0 -9
  17. package/schematics/aup-i18n/index.d.ts +0 -4
  18. package/schematics/aup-i18n/index.js +0 -86
  19. package/schematics/aup-i18n/index.js.map +0 -1
  20. package/schematics/aup-i18n/schema.d.ts +0 -3
  21. package/schematics/aup-i18n/schema.js +0 -3
  22. package/schematics/aup-i18n/schema.js.map +0 -1
  23. package/schematics/aup-i18n/schema.json +0 -18
  24. package/schematics/aup-i18n/templates/app/aup.i18n.yml.template +0 -80
  25. package/schematics/bootstrap-app/index.d.ts +0 -4
  26. package/schematics/bootstrap-app/index.js +0 -109
  27. package/schematics/bootstrap-app/index.js.map +0 -1
  28. package/schematics/bootstrap-app/schema.d.ts +0 -3
  29. package/schematics/bootstrap-app/schema.js +0 -3
  30. package/schematics/bootstrap-app/schema.js.map +0 -1
  31. package/schematics/bootstrap-app/schema.json +0 -18
  32. package/schematics/bootstrap-app/templates/i18n.config.json.template +0 -11
  33. package/schematics/bootstrap-app/templates/src/app/app-routing.module.ts.template +0 -23
  34. package/schematics/bootstrap-app/templates/src/app/app.component.html.template +0 -7
  35. package/schematics/bootstrap-app/templates/src/app/app.component.scss.template +0 -12
  36. package/schematics/bootstrap-app/templates/src/app/app.component.ts.template +0 -19
  37. package/schematics/bootstrap-app/templates/src/app/app.module.ts.template +0 -74
  38. package/schematics/bootstrap-app/templates/src/app/components/components.module.ts.template +0 -16
  39. package/schematics/bootstrap-app/templates/src/app/i18n.ts.template +0 -9
  40. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.eot +0 -0
  41. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.ijmap +0 -1
  42. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.svg +0 -2373
  43. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.ttf +0 -0
  44. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff +0 -0
  45. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff2 +0 -0
  46. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/README.md +0 -9
  47. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/codepoints +0 -932
  48. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/material-icons.css +0 -36
  49. package/schematics/bootstrap-app/templates/src/index.html.template +0 -13
  50. package/schematics/bootstrap-app/templates/src/styles/global-variables.scss.template +0 -13
  51. package/schematics/bootstrap-app/templates/src/styles.scss.template +0 -85
  52. package/schematics/collection.json +0 -48
  53. package/schematics/component/index.d.ts +0 -3
  54. package/schematics/component/index.js +0 -36
  55. package/schematics/component/index.js.map +0 -1
  56. package/schematics/component/index.spec.d.ts +0 -1
  57. package/schematics/component/index.spec.js +0 -364
  58. package/schematics/component/index.spec.js.map +0 -1
  59. package/schematics/component/schema.d.ts +0 -5
  60. package/schematics/component/schema.js +0 -3
  61. package/schematics/component/schema.js.map +0 -1
  62. package/schematics/component/schema.json +0 -39
  63. package/schematics/component/templates/component/__name@dasherize__.component.html.template +0 -1
  64. package/schematics/component/templates/component/__name@dasherize__.component.scss.template +0 -4
  65. package/schematics/component/templates/component/__name@dasherize__.component.spec.ts.template +0 -25
  66. package/schematics/component/templates/component/__name@dasherize__.component.ts.template +0 -24
  67. package/schematics/component/templates/component/__name@dasherize__.i18n.yml.template +0 -1
  68. package/schematics/ng-add/index.d.ts +0 -3
  69. package/schematics/ng-add/index.js +0 -37
  70. package/schematics/ng-add/index.js.map +0 -1
  71. package/schematics/package-util.d.ts +0 -13
  72. package/schematics/package-util.js +0 -61
  73. package/schematics/package-util.js.map +0 -1
  74. package/schematics/place-add/index.d.ts +0 -3
  75. package/schematics/place-add/index.js +0 -45
  76. package/schematics/place-add/index.js.map +0 -1
  77. package/schematics/place-add/index.spec.d.ts +0 -1
  78. package/schematics/place-add/index.spec.js +0 -364
  79. package/schematics/place-add/index.spec.js.map +0 -1
  80. package/schematics/place-add/schema.d.ts +0 -5
  81. package/schematics/place-add/schema.js +0 -3
  82. package/schematics/place-add/schema.js.map +0 -1
  83. package/schematics/place-add/schema.json +0 -33
  84. package/schematics/place-add/templates/component/__name@dasherize__.component.html.template +0 -1
  85. package/schematics/place-add/templates/component/__name@dasherize__.component.scss.template +0 -4
  86. package/schematics/place-add/templates/component/__name@dasherize__.component.spec.ts.template +0 -25
  87. package/schematics/place-add/templates/component/__name@dasherize__.component.ts.template +0 -35
  88. package/schematics/place-add/templates/component/__name@dasherize__.i18n.yml.template +0 -5
  89. package/schematics/place-bootstrap/index.d.ts +0 -3
  90. package/schematics/place-bootstrap/index.js +0 -21
  91. package/schematics/place-bootstrap/index.js.map +0 -1
  92. package/schematics/place-bootstrap/schema.d.ts +0 -4
  93. package/schematics/place-bootstrap/schema.js +0 -3
  94. package/schematics/place-bootstrap/schema.js.map +0 -1
  95. package/schematics/place-bootstrap/schema.json +0 -28
  96. package/schematics/place-bootstrap/templates/__name@dasherize__/place-routes.ts.template +0 -3
  97. package/schematics/place-bootstrap/templates/__name@dasherize__/places.module.ts.template +0 -16
  98. package/schematics/place-routes/index.d.ts +0 -3
  99. package/schematics/place-routes/index.js +0 -24
  100. package/schematics/place-routes/index.js.map +0 -1
  101. package/schematics/place-routes/place-builder.d.ts +0 -18
  102. package/schematics/place-routes/place-builder.js +0 -123
  103. package/schematics/place-routes/place-builder.js.map +0 -1
  104. package/schematics/place-routes/place-class-scanner.d.ts +0 -47
  105. package/schematics/place-routes/place-class-scanner.js +0 -223
  106. package/schematics/place-routes/place-class-scanner.js.map +0 -1
  107. package/schematics/place-routes/place-def.d.ts +0 -62
  108. package/schematics/place-routes/place-def.js +0 -195
  109. package/schematics/place-routes/place-def.js.map +0 -1
  110. package/schematics/place-routes/schema.d.ts +0 -4
  111. package/schematics/place-routes/schema.js +0 -3
  112. package/schematics/place-routes/schema.js.map +0 -1
  113. package/schematics/place-routes/schema.json +0 -26
  114. package/schematics/place-routes/templates/place-routes.ts.template +0 -15
  115. package/schematics/utils/build-context.d.ts +0 -74
  116. package/schematics/utils/build-context.js +0 -189
  117. package/schematics/utils/build-context.js.map +0 -1
  118. package/schematics/utils/decorators/decorated-class.d.ts +0 -13
  119. package/schematics/utils/decorators/decorated-class.js +0 -28
  120. package/schematics/utils/decorators/decorated-class.js.map +0 -1
  121. package/schematics/utils/decorators/decorated-source-file.d.ts +0 -15
  122. package/schematics/utils/decorators/decorated-source-file.js +0 -27
  123. package/schematics/utils/decorators/decorated-source-file.js.map +0 -1
  124. package/schematics/utils/import-def.d.ts +0 -30
  125. package/schematics/utils/import-def.js +0 -97
  126. package/schematics/utils/import-def.js.map +0 -1
  127. package/schematics/utils/method-scanner.d.ts +0 -16
  128. package/schematics/utils/method-scanner.js +0 -70
  129. package/schematics/utils/method-scanner.js.map +0 -1
  130. package/schematics/utils/mixin.d.ts +0 -11
  131. package/schematics/utils/mixin.js +0 -27
  132. package/schematics/utils/mixin.js.map +0 -1
  133. package/schematics/utils/parameter-def.d.ts +0 -5
  134. package/schematics/utils/parameter-def.js +0 -3
  135. package/schematics/utils/parameter-def.js.map +0 -1
  136. package/schematics/utils/path-helper.d.ts +0 -14
  137. package/schematics/utils/path-helper.js +0 -30
  138. package/schematics/utils/path-helper.js.map +0 -1
  139. package/schematics/utils/schematic-tree-file-system.d.ts +0 -30
  140. package/schematics/utils/schematic-tree-file-system.js +0 -113
  141. package/schematics/utils/schematic-tree-file-system.js.map +0 -1
  142. package/schematics/utils/source-file-scanner.d.ts +0 -14
  143. package/schematics/utils/source-file-scanner.js +0 -89
  144. package/schematics/utils/source-file-scanner.js.map +0 -1
  145. package/schematics/utils/source-file-utilities.d.ts +0 -6
  146. package/schematics/utils/source-file-utilities.js +0 -36
  147. package/schematics/utils/source-file-utilities.js.map +0 -1
  148. package/schematics/utils/stringy.d.ts +0 -15
  149. package/schematics/utils/stringy.js +0 -50
  150. package/schematics/utils/stringy.js.map +0 -1
  151. package/schematics/utils/template-utilities.d.ts +0 -2
  152. package/schematics/utils/template-utilities.js +0 -24
  153. package/schematics/utils/template-utilities.js.map +0 -1
  154. package/schematics/utils/workspace.d.ts +0 -15
  155. package/schematics/utils/workspace.js +0 -59
  156. package/schematics/utils/workspace.js.map +0 -1
@@ -1,39 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "AddComponentSchematic",
4
- "type": "object",
5
- "description": "Add a new component",
6
- "properties": {
7
- "project": {
8
- "type": "string",
9
- "description": "The name of the project.",
10
- "$default": {
11
- "$source": "projectName"
12
- }
13
- },
14
- "name": {
15
- "type": "string",
16
- "description": "The name of the component.",
17
- "$default": {
18
- "$source": "argv",
19
- "index": 0
20
- },
21
- "x-prompt": "What name would you like to use for the component?"
22
- },
23
- "useModules": {
24
- "type": "boolean",
25
- "description": "Create a module based component",
26
- "$default": false,
27
- "x-prompt": "Should this component use modules?"
28
- },
29
- "export": {
30
- "type": "boolean",
31
- "description": "Export component",
32
- "$default": true,
33
- "x-prompt": "Should this component be exported?"
34
- }
35
- },
36
- "required": [
37
- "name"
38
- ]
39
- }
@@ -1,4 +0,0 @@
1
- :host {
2
- display: flex;
3
- flex-direction: column;
4
- }
@@ -1,25 +0,0 @@
1
- import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { <%=capitalize(camelize(name))%>Component } from './<%=dasherize(name)%>.component';
4
-
5
- describe('<%=capitalize(camelize(name))%>Component', () => {
6
- let component: <%=capitalize(camelize(name))%>Component;
7
- let fixture: ComponentFixture<<%=capitalize(camelize(name))%>Component>;
8
-
9
- beforeEach(async(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [ <%=capitalize(camelize(name))%>Component ]
12
- })
13
- .compileComponents();
14
- }));
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(<%=capitalize(camelize(name))%>Component);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,24 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
- import {Dsl, Command, StoreInValueModel, TrackExternal, ValueModel} from '@coolon/pectin';
3
- import { DisposableComponent } from '@coolon/angular-ui-powerups';
4
- import { <%=i18nClassName%> } from '<%=pathToRoot%>/<%=dasherize(i18nClassName)%>';
5
-
6
- @Component({
7
- selector: '<%=selectorPrefix%>-<%=dasherize(name)%>',
8
- templateUrl: './<%=dasherize(name)%>.component.html',
9
- styleUrls: ['./<%=dasherize(name)%>.component.scss'],
10
- <%= standalone %>
11
- })
12
- export class <%=capitalize(camelize(name))%>Component extends DisposableComponent implements OnInit {
13
-
14
- readonly i18n = <%=i18nClassName%>.<%=i18nNamespace%>;
15
-
16
- constructor() {
17
- super();
18
- const {chain} = Dsl.disposeWith(this);
19
- }
20
-
21
- ngOnInit() {
22
- }
23
-
24
- }
@@ -1 +0,0 @@
1
- name: "<%=capitalize(camelize(name))%>"
@@ -1,3 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function ngAdd(_options: any): Rule;
3
- export declare function installDependencies(_options: any): Rule;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.installDependencies = exports.ngAdd = void 0;
4
- const schematics_1 = require("@angular-devkit/schematics");
5
- const tasks_1 = require("@angular-devkit/schematics/tasks");
6
- const package_util_1 = require("../package-util");
7
- // Just return the tree
8
- function ngAdd(_options) {
9
- return (0, schematics_1.chain)([
10
- (tree, _context) => {
11
- _context.addTask(new tasks_1.NodePackageInstallTask());
12
- return tree;
13
- },
14
- installDependencies(_options)
15
- ]);
16
- }
17
- exports.ngAdd = ngAdd;
18
- function installDependencies(_options) {
19
- return (tree, _) => {
20
- return (0, package_util_1.updatePackageJson)(tree, draft => {
21
- draft.scripts = Object.assign(Object.assign({}, draft.scripts), { "place-routes": "run-s place-routes:**", "i18n": "run-s i18n:**", "watch": "npm-watch" });
22
- draft.dependencies = Object.assign(Object.assign({}, draft.dependencies), { "@coolon/i18n-resource-generator": "^3.0.2", "@coolon/pectin": "3.11.1", "@coolon/typescript-utilities": "^2.2.0", "@fortawesome/angular-fontawesome": "^0.9.0", "@fortawesome/fontawesome-free": "5.15.3", "@fortawesome/fontawesome-svg-core": "^1.2.35", "@fortawesome/free-solid-svg-icons": "^5.15.3", "@js-joda/core": "^3.2.0", "@js-joda/locale": "^3.2.0", "@js-joda/timezone": "^2.3.0", "immer": "^7.0.5", "typescript-string-enums": "^1.0.0", "format-message-interpret": "^6.2.3", "moment": "^2.18.1" });
23
- draft.devDependencies = Object.assign(Object.assign({}, draft.devDependencies), { "husky": "^4.2.0", "cypress-wait-until": "^1.6.1", "barrelsby": "^2.1.1", "dotenv": "6.2.0", "cz-conventional-changelog": "^3.1.0", "@commitlint/cli": "^8.3.5", "git-is-clean": "^3.0.1", "shx": "^0.3.2", 'standard-version': '^8.0.0', "npm-watch": "^0.7.0" });
24
- draft.watch = Object.assign({}, draft.watch);
25
- draft.config = Object.assign(Object.assign({}, draft.config), { commitizen: {
26
- path: './node_modules/cz-conventional-changelog'
27
- } });
28
- draft.husky = {
29
- "hooks": {
30
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
31
- }
32
- };
33
- });
34
- };
35
- }
36
- exports.installDependencies = installDependencies;
37
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AACjF,4DAA0E;AAC1E,kDAAoD;AAEpD,uBAAuB;AACvB,SAAgB,KAAK,CAAC,QAAa;IACjC,OAAO,IAAA,kBAAK,EAAC;QACX,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;YACzC,QAAQ,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;YAC/C,OAAO,IAAI,CAAC;QACd,CAAC;QACD,mBAAmB,CAAC,QAAQ,CAAC;KAC9B,CAAC,CAAC;AACL,CAAC;AARD,sBAQC;AAED,SAAgB,mBAAmB,CAAC,QAAa;IAC/C,OAAO,CAAC,IAAU,EAAE,CAAmB,EAAQ,EAAE;QAC/C,OAAO,IAAA,gCAAiB,EAAC,IAAI,EAAE,KAAK,CAAC,EAAE;YACrC,KAAK,CAAC,OAAO,mCACR,KAAK,CAAC,OAAO,KAChB,cAAc,EAAE,uBAAuB,EACvC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,WAAW,GACrB,CAAC;YAEF,KAAK,CAAC,YAAY,mCACb,KAAK,CAAC,YAAY,KACrB,iCAAiC,EAAE,QAAQ,EAC3C,gBAAgB,EAAE,QAAQ,EAC1B,8BAA8B,EAAE,QAAQ,EACxC,kCAAkC,EAAE,QAAQ,EAC5C,+BAA+B,EAAE,QAAQ,EACzC,mCAAmC,EAAE,SAAS,EAC9C,mCAAmC,EAAE,SAAS,EAC9C,eAAe,EAAE,QAAQ,EACzB,iBAAiB,EAAE,QAAQ,EAC3B,mBAAmB,EAAE,QAAQ,EAC7B,OAAO,EAAE,QAAQ,EACjB,yBAAyB,EAAE,QAAQ,EACnC,0BAA0B,EAAE,QAAQ,EACpC,QAAQ,EAAE,SAAS,GACpB,CAAC;YAEF,KAAK,CAAC,eAAe,mCAChB,KAAK,CAAC,eAAe,KACxB,OAAO,EAAE,QAAQ,EACjB,oBAAoB,EAAE,QAAQ,EAC9B,WAAW,EAAE,QAAQ,EACrB,QAAQ,EAAE,OAAO,EACjB,2BAA2B,EAAE,QAAQ,EACrC,iBAAiB,EAAE,QAAQ,EAC3B,cAAc,EAAE,QAAQ,EACxB,KAAK,EAAE,QAAQ,EACf,kBAAkB,EAAE,QAAQ,EAC5B,WAAW,EAAE,QAAQ,GACtB,CAAC;YAEF,KAAK,CAAC,KAAK,qBACN,KAAK,CAAC,KAAK,CACf,CAAA;YAED,KAAK,CAAC,MAAM,mCACP,KAAK,CAAC,MAAM,KACf,UAAU,EAAE;oBACV,IAAI,EAAE,0CAA0C;iBACjD,GACF,CAAC;YAEF,KAAK,CAAC,KAAK,GAAG;gBACZ,OAAO,EAAE;oBACP,YAAY,EAAE,gCAAgC;iBAC/C;aACF,CAAC;QAEJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AA7DD,kDA6DC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { Tree } from '@angular-devkit/schematics';
9
- /**
10
- * Sorts the keys of the given object.
11
- * @returns A new object instance with sorted keys
12
- */
13
- export declare function updatePackageJson(host: Tree, callback: (draft: any) => void): Tree;
@@ -1,61 +0,0 @@
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
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.updatePackageJson = void 0;
11
- /**
12
- * Sorts the keys of the given object.
13
- * @returns A new object instance with sorted keys
14
- */
15
- // function sortObjectByKeys(obj: object) {
16
- // return Object.keys(obj).sort().reduce((result, key) => (result[key] = obj[key]) && result, {});
17
- // }
18
- function updatePackageJson(host, callback) {
19
- const sourceText = host.read('package.json').toString('utf-8');
20
- const json = JSON.parse(sourceText);
21
- callback(json);
22
- host.overwrite('package.json', JSON.stringify(json, null, 2));
23
- return host;
24
- }
25
- exports.updatePackageJson = updatePackageJson;
26
- // /** Adds a package to the package.json in the given host tree. */
27
- // export function addPackageToPackageJson(host: Tree, pkg: string, version: string): Tree {
28
- //
29
- // if (host.exists('package.json')) {
30
- // const sourceText = host.read('package.json').toString('utf-8');
31
- // const json = JSON.parse(sourceText);
32
- //
33
- // if (!json.dependencies) {
34
- // json.dependencies = {};
35
- // }
36
- //
37
- // if (!json.dependencies[pkg]) {
38
- // json.dependencies[pkg] = version;
39
- // json.dependencies = sortObjectByKeys(json.dependencies);
40
- // }
41
- //
42
- // host.overwrite('package.json', JSON.stringify(json, null, 2));
43
- // }
44
- //
45
- // return host;
46
- // }
47
- // /** Gets the version of the specified package by looking at the package.json in the given tree. */
48
- // export function getPackageVersionFromPackageJson(tree: Tree, name: string): string | null {
49
- // if (!tree.exists('package.json')) {
50
- // return null;
51
- // }
52
- //
53
- // const packageJson = JSON.parse(tree.read('package.json')!.toString('utf8'));
54
- //
55
- // if (packageJson.dependencies && packageJson.dependencies[name]) {
56
- // return packageJson.dependencies[name];
57
- // }
58
- //
59
- // return null;
60
- // }
61
- //# sourceMappingURL=package-util.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"package-util.js","sourceRoot":"","sources":["../../../../libs/angular-ui-powerups/schematics/package-util.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAIH;;;GAGG;AACH,2CAA2C;AAC3C,oGAAoG;AACpG,IAAI;AAGJ,SAAgB,iBAAiB,CAAC,IAAU,EAAE,QAA6B;IACzE,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC/D,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAEpC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEf,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9D,OAAO,IAAI,CAAC;AACd,CAAC;AARD,8CAQC;AAED,oEAAoE;AACpE,4FAA4F;AAC5F,EAAE;AACF,uCAAuC;AACvC,sEAAsE;AACtE,2CAA2C;AAC3C,EAAE;AACF,gCAAgC;AAChC,gCAAgC;AAChC,QAAQ;AACR,EAAE;AACF,qCAAqC;AACrC,0CAA0C;AAC1C,iEAAiE;AACjE,QAAQ;AACR,EAAE;AACF,qEAAqE;AACrE,MAAM;AACN,EAAE;AACF,iBAAiB;AACjB,IAAI;AAEJ,qGAAqG;AACrG,8FAA8F;AAC9F,wCAAwC;AACxC,mBAAmB;AACnB,MAAM;AACN,EAAE;AACF,iFAAiF;AACjF,EAAE;AACF,sEAAsE;AACtE,6CAA6C;AAC7C,MAAM;AACN,EAAE;AACF,iBAAiB;AACjB,IAAI"}
@@ -1,3 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- import { Schema } from './schema';
3
- export declare function addPlace(_options: Schema): Rule;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addPlace = void 0;
4
- const schematics_1 = require("@angular-devkit/schematics");
5
- const stringy_1 = require("../utils/stringy");
6
- const template_utilities_1 = require("../utils/template-utilities");
7
- const workspace_1 = require("../utils/workspace");
8
- function addPlace(_options) {
9
- return (tree, context) => {
10
- const workspace = workspace_1.Workspace.load(tree, context);
11
- const buildContext = workspace.getApplication(_options.project);
12
- context.logger.info(`options: ${JSON.stringify(_options)}`);
13
- const nameParts = _options.name.split('/');
14
- const componentName = nameParts[nameParts.length - 1];
15
- const componentPathParts = nameParts.slice(0, nameParts.length - 1);
16
- const pathToSourceRoot = [buildContext.sourceCodeRoot].concat(componentPathParts);
17
- // we'll let angular do it by just create a default component then we'll clobber it with our real templates later.
18
- const options = {
19
- project: _options.project,
20
- name: _options.name,
21
- standalone: !_options.useModules,
22
- module: undefined
23
- };
24
- if (_options.useModules) {
25
- const placeModulePath = buildContext.findFileInAncestorPath(pathToSourceRoot, 'places.module.ts');
26
- if (!placeModulePath) {
27
- throw new Error(`Places must be created in or under a directory containing a 'places.module.ts'. I couldn't find one in ${pathToSourceRoot.join('/')} or in any ancestor of it. You can run ng g @coolon/angular-ui-powerups:place-bootstrap --dir=<directory> to initialise one`);
28
- }
29
- options.module = placeModulePath.slice(buildContext.sourceCodeRoot.length);
30
- }
31
- const updateModule = (0, schematics_1.externalSchematic)('@schematics/angular', 'component', options);
32
- const i18nNamespace = componentPathParts.concat(componentName).map(p => stringy_1.Stringy.from(p).camelizeLower().toString()).join(".");
33
- const componentFiles = (0, template_utilities_1.applyTemplatesWithOverwrite)(tree, 'templates/component', {
34
- name: componentName,
35
- standalone: !_options.useModules ? "standalone: true" : undefined,
36
- selectorPrefix: buildContext.selectorPrefix,
37
- pathToRoot: pathToSourceRoot.map(p => '..').join('/'),
38
- i18nClassName: buildContext.getI18nClasName(),
39
- i18nNamespace,
40
- }, `${(pathToSourceRoot.join('/'))}/${componentName}`);
41
- return (0, schematics_1.chain)([updateModule, componentFiles])(tree, context);
42
- };
43
- }
44
- exports.addPlace = addPlace;
45
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/place-add/index.ts"],"names":[],"mappings":";;;AACA,2DAAoG;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