@coolon/angular-ui-powerups 16.0.0 → 16.0.2

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 (163) hide show
  1. package/esm2022/lib/interaction/interaction.module.mjs +1 -8
  2. package/esm2022/lib/place/components/list-place-nav/list-place-nav.component.mjs +3 -4
  3. package/esm2022/lib/place/place.module.mjs +1 -5
  4. package/fesm2022/coolon-angular-ui-powerups.mjs +1 -12
  5. package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
  6. package/lib/interaction/interaction.module.d.ts +6 -7
  7. package/lib/place/place.module.d.ts +3 -4
  8. package/package.json +2 -2
  9. package/schematics/activity/index.d.ts +3 -0
  10. package/schematics/activity/index.js +32 -0
  11. package/schematics/activity/index.js.map +1 -0
  12. package/schematics/activity/index.spec.d.ts +1 -0
  13. package/schematics/activity/index.spec.js +364 -0
  14. package/schematics/activity/index.spec.js.map +1 -0
  15. package/schematics/activity/schema.d.ts +4 -0
  16. package/schematics/activity/schema.js +3 -0
  17. package/schematics/activity/schema.js.map +1 -0
  18. package/schematics/activity/schema.json +27 -0
  19. package/schematics/activity/templates/component/__name@dasherize__.component.html.template +5 -0
  20. package/schematics/activity/templates/component/__name@dasherize__.component.scss.template +4 -0
  21. package/schematics/activity/templates/component/__name@dasherize__.component.spec.ts.template +25 -0
  22. package/schematics/activity/templates/component/__name@dasherize__.component.ts.template +40 -0
  23. package/schematics/activity/templates/component/__name@dasherize__.i18n.yml.template +9 -0
  24. package/schematics/aup-i18n/index.d.ts +4 -0
  25. package/schematics/aup-i18n/index.js +86 -0
  26. package/schematics/aup-i18n/index.js.map +1 -0
  27. package/schematics/aup-i18n/schema.d.ts +3 -0
  28. package/schematics/aup-i18n/schema.js +3 -0
  29. package/schematics/aup-i18n/schema.js.map +1 -0
  30. package/schematics/aup-i18n/schema.json +18 -0
  31. package/schematics/aup-i18n/templates/app/aup.i18n.yml.template +80 -0
  32. package/schematics/bootstrap-app/index.d.ts +4 -0
  33. package/schematics/bootstrap-app/index.js +109 -0
  34. package/schematics/bootstrap-app/index.js.map +1 -0
  35. package/schematics/bootstrap-app/schema.d.ts +3 -0
  36. package/schematics/bootstrap-app/schema.js +3 -0
  37. package/schematics/bootstrap-app/schema.js.map +1 -0
  38. package/schematics/bootstrap-app/schema.json +18 -0
  39. package/schematics/bootstrap-app/templates/i18n.config.json.template +11 -0
  40. package/schematics/bootstrap-app/templates/src/app/app-routing.module.ts.template +23 -0
  41. package/schematics/bootstrap-app/templates/src/app/app.component.html.template +7 -0
  42. package/schematics/bootstrap-app/templates/src/app/app.component.scss.template +12 -0
  43. package/schematics/bootstrap-app/templates/src/app/app.component.ts.template +19 -0
  44. package/schematics/bootstrap-app/templates/src/app/app.module.ts.template +74 -0
  45. package/schematics/bootstrap-app/templates/src/app/components/components.module.ts.template +16 -0
  46. package/schematics/bootstrap-app/templates/src/app/i18n.ts.template +9 -0
  47. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.eot +0 -0
  48. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.ijmap +1 -0
  49. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.svg +2373 -0
  50. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.ttf +0 -0
  51. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff +0 -0
  52. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff2 +0 -0
  53. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/README.md +9 -0
  54. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/codepoints +932 -0
  55. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/material-icons.css +36 -0
  56. package/schematics/bootstrap-app/templates/src/index.html.template +13 -0
  57. package/schematics/bootstrap-app/templates/src/styles/global-variables.scss.template +13 -0
  58. package/schematics/bootstrap-app/templates/src/styles.scss.template +85 -0
  59. package/schematics/collection.json +48 -0
  60. package/schematics/component/index.d.ts +3 -0
  61. package/schematics/component/index.js +36 -0
  62. package/schematics/component/index.js.map +1 -0
  63. package/schematics/component/index.spec.d.ts +1 -0
  64. package/schematics/component/index.spec.js +364 -0
  65. package/schematics/component/index.spec.js.map +1 -0
  66. package/schematics/component/schema.d.ts +5 -0
  67. package/schematics/component/schema.js +3 -0
  68. package/schematics/component/schema.js.map +1 -0
  69. package/schematics/component/schema.json +39 -0
  70. package/schematics/component/templates/component/__name@dasherize__.component.html.template +1 -0
  71. package/schematics/component/templates/component/__name@dasherize__.component.scss.template +4 -0
  72. package/schematics/component/templates/component/__name@dasherize__.component.spec.ts.template +25 -0
  73. package/schematics/component/templates/component/__name@dasherize__.component.ts.template +24 -0
  74. package/schematics/component/templates/component/__name@dasherize__.i18n.yml.template +1 -0
  75. package/schematics/ng-add/index.d.ts +3 -0
  76. package/schematics/ng-add/index.js +37 -0
  77. package/schematics/ng-add/index.js.map +1 -0
  78. package/schematics/package-util.d.ts +13 -0
  79. package/schematics/package-util.js +61 -0
  80. package/schematics/package-util.js.map +1 -0
  81. package/schematics/place-add/index.d.ts +3 -0
  82. package/schematics/place-add/index.js +45 -0
  83. package/schematics/place-add/index.js.map +1 -0
  84. package/schematics/place-add/index.spec.d.ts +1 -0
  85. package/schematics/place-add/index.spec.js +364 -0
  86. package/schematics/place-add/index.spec.js.map +1 -0
  87. package/schematics/place-add/schema.d.ts +4 -0
  88. package/schematics/place-add/schema.js +3 -0
  89. package/schematics/place-add/schema.js.map +1 -0
  90. package/schematics/place-add/schema.json +27 -0
  91. package/schematics/place-add/templates/component/__name@dasherize__.component.html.template +1 -0
  92. package/schematics/place-add/templates/component/__name@dasherize__.component.scss.template +4 -0
  93. package/schematics/place-add/templates/component/__name@dasherize__.component.spec.ts.template +25 -0
  94. package/schematics/place-add/templates/component/__name@dasherize__.component.ts.template +35 -0
  95. package/schematics/place-add/templates/component/__name@dasherize__.i18n.yml.template +5 -0
  96. package/schematics/place-bootstrap/index.d.ts +3 -0
  97. package/schematics/place-bootstrap/index.js +21 -0
  98. package/schematics/place-bootstrap/index.js.map +1 -0
  99. package/schematics/place-bootstrap/schema.d.ts +4 -0
  100. package/schematics/place-bootstrap/schema.js +3 -0
  101. package/schematics/place-bootstrap/schema.js.map +1 -0
  102. package/schematics/place-bootstrap/schema.json +28 -0
  103. package/schematics/place-bootstrap/templates/__name@dasherize__/place-routes.ts.template +3 -0
  104. package/schematics/place-bootstrap/templates/__name@dasherize__/places.module.ts.template +16 -0
  105. package/schematics/place-routes/index.d.ts +3 -0
  106. package/schematics/place-routes/index.js +24 -0
  107. package/schematics/place-routes/index.js.map +1 -0
  108. package/schematics/place-routes/place-builder.d.ts +18 -0
  109. package/schematics/place-routes/place-builder.js +123 -0
  110. package/schematics/place-routes/place-builder.js.map +1 -0
  111. package/schematics/place-routes/place-class-scanner.d.ts +47 -0
  112. package/schematics/place-routes/place-class-scanner.js +223 -0
  113. package/schematics/place-routes/place-class-scanner.js.map +1 -0
  114. package/schematics/place-routes/place-def.d.ts +62 -0
  115. package/schematics/place-routes/place-def.js +195 -0
  116. package/schematics/place-routes/place-def.js.map +1 -0
  117. package/schematics/place-routes/schema.d.ts +4 -0
  118. package/schematics/place-routes/schema.js +3 -0
  119. package/schematics/place-routes/schema.js.map +1 -0
  120. package/schematics/place-routes/schema.json +26 -0
  121. package/schematics/place-routes/templates/place-routes.ts.template +15 -0
  122. package/schematics/utils/build-context.d.ts +74 -0
  123. package/schematics/utils/build-context.js +189 -0
  124. package/schematics/utils/build-context.js.map +1 -0
  125. package/schematics/utils/decorators/decorated-class.d.ts +13 -0
  126. package/schematics/utils/decorators/decorated-class.js +28 -0
  127. package/schematics/utils/decorators/decorated-class.js.map +1 -0
  128. package/schematics/utils/decorators/decorated-source-file.d.ts +15 -0
  129. package/schematics/utils/decorators/decorated-source-file.js +27 -0
  130. package/schematics/utils/decorators/decorated-source-file.js.map +1 -0
  131. package/schematics/utils/import-def.d.ts +30 -0
  132. package/schematics/utils/import-def.js +97 -0
  133. package/schematics/utils/import-def.js.map +1 -0
  134. package/schematics/utils/method-scanner.d.ts +16 -0
  135. package/schematics/utils/method-scanner.js +70 -0
  136. package/schematics/utils/method-scanner.js.map +1 -0
  137. package/schematics/utils/mixin.d.ts +11 -0
  138. package/schematics/utils/mixin.js +27 -0
  139. package/schematics/utils/mixin.js.map +1 -0
  140. package/schematics/utils/parameter-def.d.ts +5 -0
  141. package/schematics/utils/parameter-def.js +3 -0
  142. package/schematics/utils/parameter-def.js.map +1 -0
  143. package/schematics/utils/path-helper.d.ts +14 -0
  144. package/schematics/utils/path-helper.js +30 -0
  145. package/schematics/utils/path-helper.js.map +1 -0
  146. package/schematics/utils/schematic-tree-file-system.d.ts +30 -0
  147. package/schematics/utils/schematic-tree-file-system.js +113 -0
  148. package/schematics/utils/schematic-tree-file-system.js.map +1 -0
  149. package/schematics/utils/source-file-scanner.d.ts +14 -0
  150. package/schematics/utils/source-file-scanner.js +89 -0
  151. package/schematics/utils/source-file-scanner.js.map +1 -0
  152. package/schematics/utils/source-file-utilities.d.ts +6 -0
  153. package/schematics/utils/source-file-utilities.js +36 -0
  154. package/schematics/utils/source-file-utilities.js.map +1 -0
  155. package/schematics/utils/stringy.d.ts +15 -0
  156. package/schematics/utils/stringy.js +50 -0
  157. package/schematics/utils/stringy.js.map +1 -0
  158. package/schematics/utils/template-utilities.d.ts +2 -0
  159. package/schematics/utils/template-utilities.js +24 -0
  160. package/schematics/utils/template-utilities.js.map +1 -0
  161. package/schematics/utils/workspace.d.ts +15 -0
  162. package/schematics/utils/workspace.js +59 -0
  163. package/schematics/utils/workspace.js.map +1 -0
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.applyWithOverwrite = exports.run = void 0;
4
+ const core_1 = require("@angular-devkit/core");
5
+ const schematics_1 = require("@angular-devkit/schematics");
6
+ const package_util_1 = require("../package-util");
7
+ const workspace_1 = require("../utils/workspace");
8
+ // @see https://javascript-conference.com/blog/how-to-create-your-own-angular-schematics/
9
+ function run(_options) {
10
+ return (tree, _context) => {
11
+ const workspace = workspace_1.Workspace.load(tree, _context);
12
+ const buildContext = workspace.getProject(_options.project);
13
+ const templateSource = applyWithOverwrite((0, schematics_1.url)('./templates'), [
14
+ (0, schematics_1.applyTemplates)(Object.assign(Object.assign({}, _options), core_1.strings)),
15
+ (0, schematics_1.move)(buildContext.sourceRoot),
16
+ ]);
17
+ // tslint:disable-next-line:no-shadowed-variable
18
+ const updatePackageDependencies = (tree, _) => {
19
+ return (0, package_util_1.updatePackageJson)(tree, (draft) => {
20
+ draft.devDependencies = Object.assign(Object.assign({}, draft.devDependencies), { '@coolon/i18n-resource-generator': '^3.0.2' });
21
+ });
22
+ };
23
+ const rules = [templateSource, updatePackageDependencies];
24
+ return (0, schematics_1.chain)(rules)(tree, _context);
25
+ };
26
+ }
27
+ exports.run = run;
28
+ // See https://stackoverflow.com/a/53230034
29
+ function applyWithOverwrite(source, rules) {
30
+ return (tree, _context) => {
31
+ const rule = (0, schematics_1.mergeWith)((0, schematics_1.apply)(source, [
32
+ ...rules,
33
+ (0, schematics_1.forEach)((fileEntry) => {
34
+ if (tree.exists(fileEntry.path)) {
35
+ tree.overwrite(fileEntry.path, fileEntry.content);
36
+ return null;
37
+ }
38
+ return fileEntry;
39
+ }),
40
+ ]));
41
+ return rule(tree, _context);
42
+ };
43
+ }
44
+ exports.applyWithOverwrite = applyWithOverwrite;
45
+ // function generateApp(name: string): Rule {
46
+ // return externalSchematic('@nx/angular', 'application', {
47
+ // name,
48
+ // version: '9.0.0',
49
+ // directory: name,
50
+ // routing: true,
51
+ // style: 'scss',
52
+ // inlineStyle: false,
53
+ // inlineTemplate: false
54
+ // });
55
+ // }
56
+ // export function addFiles(_options: any): Rule {
57
+ // const name = _options.name;
58
+ //
59
+ // return (tree: Tree, _context: SchematicContext) => {
60
+ //
61
+ // const templateSource = apply(url('./files'), [
62
+ // template({ ..._options, ...strings })
63
+ // ]);
64
+ // const fileMerge = mergeWith(templateSource, MergeStrategy.Overwrite);
65
+ //
66
+ // const rule = chain([
67
+ // fileMerge
68
+ // ]);
69
+ //
70
+ // return rule(tree, _context) as Rule;
71
+ // };
72
+ // }
73
+ // function addDependencies(options: Schema): Rule {
74
+ // return (tree: Tree, _context: SchematicContext) => {
75
+ // _context.addTask(new RunSchematicTask('add-dependencies', options));
76
+ // return tree;
77
+ // };
78
+ // }
79
+ //
80
+ // function addRequiredFiles(options: Schema): Rule {
81
+ // return (tree: Tree, _context: SchematicContext) => {
82
+ // _context.addTask(new RunSchematicTask('add-files', options));
83
+ // return tree;
84
+ // };
85
+ // }
86
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/aup-i18n/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAC7C,2DAYoC;AACpC,kDAAkD;AAClD,kDAA6C;AAG7C,yFAAyF;AAEzF,SAAgB,GAAG,CAAC,QAAgB;IAClC,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAChD,MAAM,SAAS,GAAG,qBAAS,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,YAAY,GAAG,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE5D,MAAM,cAAc,GAAG,kBAAkB,CAAC,IAAA,gBAAG,EAAC,aAAa,CAAC,EAAE;YAC5D,IAAA,2BAAc,kCAAK,QAAQ,GAAK,cAAO,EAAE;YACzC,IAAA,iBAAI,EAAC,YAAY,CAAC,UAAU,CAAC;SAC9B,CAAC,CAAC;QAEH,gDAAgD;QAChD,MAAM,yBAAyB,GAAS,CACtC,IAAU,EACV,CAAmB,EACb,EAAE;YACR,OAAO,I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AC9C,UAAU;AACV,4EAA4E;AAC5E,EAAE;AACF,2BAA2B;AAC3B,kBAAkB;AAClB,UAAU;AACV,EAAE;AACF,2CAA2C;AAC3C,OAAO;AACP,IAAI;AAEJ,oDAAoD;AACpD,yDAAyD;AACzD,2EAA2E;AAC3E,mBAAmB;AACnB,OAAO;AACP,IAAI;AACJ,EAAE;AACF,qDAAqD;AACrD,yDAAyD;AACzD,oEAAoE;AACpE,mBAAmB;AACnB,OAAO;AACP,IAAI"}
@@ -0,0 +1,3 @@
1
+ export interface Schema {
2
+ project: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/aup-i18n/schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "AupI18nSchematic",
4
+ "type": "object",
5
+ "description": "Install Angular UI Powerup I18n defaults",
6
+ "properties": {
7
+ "project": {
8
+ "type": "string",
9
+ "description": "The name of the project.",
10
+ "$default": {
11
+ "$source": "projectName"
12
+ }
13
+ }
14
+ },
15
+ "required": [
16
+ "project"
17
+ ]
18
+ }
@@ -0,0 +1,80 @@
1
+ alerts:
2
+ unknown_error:
3
+ content:
4
+ - "Yikes, this is a bit embarrassing, we've had an error condition we weren't expecting."
5
+ - "It's with great shame an loathing that we can only suggest reloading the page to see if that helps..."
6
+ ok: "Ok, try reloading it..."
7
+
8
+ not_implemented:
9
+ content:
10
+ - "We haven't got around to doing this yet."
11
+ ok: "Bugger"
12
+
13
+ components:
14
+ activityActions:
15
+ styles(Enum):
16
+ okCancel:
17
+ confirm(CommandFace):
18
+ text: Ok
19
+ cancel(CommandFace):
20
+ text: Cancel
21
+ okCancelStrokedPrimary:
22
+ confirm(CommandFace):
23
+ text: Ok
24
+ style: stroked
25
+ color: primary
26
+ cancel(CommandFace):
27
+ text: Cancel
28
+ okCancelRaisedPrimary:
29
+ confirm(CommandFace):
30
+ text: Ok
31
+ style: raised
32
+ color: primary
33
+ cancel(CommandFace):
34
+ text: Cancel
35
+ okCancelIcons:
36
+ confirm(CommandFace):
37
+ icon: mat:done
38
+ cancel(CommandFace):
39
+ icon: mat:clear
40
+
41
+ doneCancel:
42
+ confirm(CommandFace):
43
+ text: Done
44
+ cancel(CommandFace):
45
+ text: Cancel
46
+ doneCancelStrokedPrimary:
47
+ confirm(CommandFace):
48
+ text: Done
49
+ style: stroked
50
+ color: primary
51
+ cancel(CommandFace):
52
+ text: Cancel
53
+ doneCancelRaisedPrimary:
54
+ confirm(CommandFace):
55
+ text: Done
56
+ style: raised
57
+ color: primary
58
+ cancel(CommandFace):
59
+ text: Cancel
60
+
61
+ saveCancel:
62
+ confirm(CommandFace):
63
+ text: Save
64
+ cancel(CommandFace):
65
+ text: Cancel
66
+ saveCancelStrokedPrimary:
67
+ confirm(CommandFace):
68
+ text: Save
69
+ style: stroked
70
+ color: primary
71
+ cancel(CommandFace):
72
+ text: Cancel
73
+ saveCancelRaisedPrimary:
74
+ confirm(CommandFace):
75
+ text: Save
76
+ style: raised
77
+ color: primary
78
+ cancel(CommandFace):
79
+ text: Cancel
80
+
@@ -0,0 +1,4 @@
1
+ import { Rule, Source } from '@angular-devkit/schematics';
2
+ import { Schema } from './schema';
3
+ export declare function bootstrapApp(_options: Schema): Rule;
4
+ export declare function applyWithOverwrite(source: Source, rules: Rule[]): Rule;
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.applyWithOverwrite = exports.bootstrapApp = void 0;
4
+ const core_1 = require("@angular-devkit/core");
5
+ const schematics_1 = require("@angular-devkit/schematics");
6
+ const package_util_1 = require("../package-util");
7
+ const workspace_1 = require("../utils/workspace");
8
+ // @see https://javascript-conference.com/blog/how-to-create-your-own-angular-schematics/
9
+ function bootstrapApp(_options) {
10
+ return (tree, _context) => {
11
+ const workspace = workspace_1.Workspace.load(tree, _context);
12
+ const buildContext = workspace.getApplicationOrDefault(_options.project);
13
+ const templateSource = applyWithOverwrite((0, schematics_1.url)('./templates'), [
14
+ (0, schematics_1.applyTemplates)(Object.assign(Object.assign({}, _options), core_1.strings)),
15
+ (0, schematics_1.move)(buildContext.rootDir),
16
+ ]);
17
+ const rules = [
18
+ templateSource,
19
+ (0, schematics_1.externalSchematic)('@coolon/angular-ui-powerups', 'aup-i18n', {
20
+ project: _options.project,
21
+ }),
22
+ (0, schematics_1.externalSchematic)('@coolon/angular-ui-powerups', 'place-bootstrap', {
23
+ project: _options.project,
24
+ path: 'places',
25
+ }),
26
+ updatePackageJsonScripts(buildContext),
27
+ ];
28
+ // if (_options.initialPlaceName) {
29
+ // rules.push(externalSchematic('@coolon/angular-ui-powerups', 'place-add', {
30
+ // project: _options.project,
31
+ // name: `places/${_options.initialPlaceName}`
32
+ // })
33
+ // );
34
+ // }
35
+ return (0, schematics_1.chain)(rules)(tree, _context);
36
+ };
37
+ }
38
+ exports.bootstrapApp = bootstrapApp;
39
+ function updatePackageJsonScripts(context) {
40
+ return (tree, _) => {
41
+ return (0, package_util_1.updatePackageJson)(tree, (draft) => {
42
+ draft.scripts = Object.assign(Object.assign({}, draft.scripts), { [`i18n:${context.projectName}`]: `i18n-resource-generator ${context.rootDir}/i18n.config.json`, [`place-routes:${context.projectName}`]: `ng generate @coolon/angular-ui-powerups:place-routes --project ${context.projectName} places`, [`build:${context.projectName}`]: `nx build --prod --project ${context.projectName}`, [`start:${context.projectName}`]: `nx serve --project ${context.projectName}`, [`e2e:${context.projectName}-e2e`]: `nx e2e --watch --project ${context.projectName}-e2e`, [`e2e-headless:${context.projectName}-e2e`]: `nx e2e --headless --project ${context.projectName}-e2e` });
43
+ draft.watch = Object.assign(Object.assign({}, draft.watch), { [`i18n:${context.projectName}`]: {
44
+ '--comment--': "if your i18n.config.json has additional srcDirs you'll need add them here",
45
+ patterns: [context.sourceCodeRoot],
46
+ extensions: 'i18n.yml',
47
+ } });
48
+ });
49
+ };
50
+ }
51
+ // See https://stackoverflow.com/a/53230034
52
+ function applyWithOverwrite(source, rules) {
53
+ return (tree, _context) => {
54
+ const rule = (0, schematics_1.mergeWith)((0, schematics_1.apply)(source, [
55
+ ...rules,
56
+ (0, schematics_1.forEach)((fileEntry) => {
57
+ if (tree.exists(fileEntry.path)) {
58
+ tree.overwrite(fileEntry.path, fileEntry.content);
59
+ return null;
60
+ }
61
+ return fileEntry;
62
+ }),
63
+ ]));
64
+ return rule(tree, _context);
65
+ };
66
+ }
67
+ exports.applyWithOverwrite = applyWithOverwrite;
68
+ // function generateApp(name: string): Rule {
69
+ // return externalSchematic('@nx/angular', 'application', {
70
+ // name,
71
+ // version: '9.0.0',
72
+ // directory: name,
73
+ // routing: true,
74
+ // style: 'scss',
75
+ // inlineStyle: false,
76
+ // inlineTemplate: false
77
+ // });
78
+ // }
79
+ // export function addFiles(_options: any): Rule {
80
+ // const name = _options.name;
81
+ //
82
+ // return (tree: Tree, _context: SchematicContext) => {
83
+ //
84
+ // const templateSource = apply(url('./files'), [
85
+ // template({ ..._options, ...strings })
86
+ // ]);
87
+ // const fileMerge = mergeWith(templateSource, MergeStrategy.Overwrite);
88
+ //
89
+ // const rule = chain([
90
+ // fileMerge
91
+ // ]);
92
+ //
93
+ // return rule(tree, _context) as Rule;
94
+ // };
95
+ // }
96
+ // function addDependencies(options: Schema): Rule {
97
+ // return (tree: Tree, _context: SchematicContext) => {
98
+ // _context.addTask(new RunSchematicTask('add-dependencies', options));
99
+ // return tree;
100
+ // };
101
+ // }
102
+ //
103
+ // function addRequiredFiles(options: Schema): Rule {
104
+ // return (tree: Tree, _context: SchematicContext) => {
105
+ // _context.addTask(new RunSchematicTask('add-files', options));
106
+ // return tree;
107
+ // };
108
+ // }
109
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceR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BAC/B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;oBAClD,OAAO,IAAI,CAAC;iBACb;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC,CAAC;SACH,CAAC,CACH,CAAC;QAEF,OAAO,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC9B,CAAC,CAAC;AACJ,CAAC;AAjBD,gDAiBC;AAED,6CAA6C;AAC7C,6DAA6D;AAC7D,YAAY;AACZ,wBAAwB;AACxB,uBAAuB;AACvB,qBAAqB;AACrB,qBAAqB;AACrB,0BAA0B;AAC1B,4BAA4B;AAC5B,QAAQ;AACR,IAAI;AAEJ,kDAAkD;AAClD,gCAAgC;AAChC,EAAE;AACF,yDAAyD;AACzD,EAAE;AACF,qDAAqD;AACrD,8CAA8C;AAC9C,UAAU;AACV,4EAA4E;AAC5E,EAAE;AACF,2BAA2B;AAC3B,kBAAkB;AAClB,UAAU;AACV,EAAE;AACF,2CAA2C;AAC3C,OAAO;AACP,IAAI;AAEJ,oDAAoD;AACpD,yDAAyD;AACzD,2EAA2E;AAC3E,mBAAmB;AACnB,OAAO;AACP,IAAI;AACJ,EAAE;AACF,qDAAqD;AACrD,yDAAyD;AACzD,oEAAoE;AACpE,mBAAmB;AACnB,OAAO;AACP,IAAI"}
@@ -0,0 +1,3 @@
1
+ export interface Schema {
2
+ project: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/bootstrap-app/schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "AupBootstrapSchematic",
4
+ "type": "object",
5
+ "description": "Install all Angular UI Powerup dependencies",
6
+ "properties": {
7
+ "project": {
8
+ "type": "string",
9
+ "description": "The name of the project.",
10
+ "$default": {
11
+ "$source": "projectName"
12
+ }
13
+ }
14
+ },
15
+ "required": [
16
+ "project"
17
+ ]
18
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "srcDirs": ["src/app"],
3
+ "outDir": "src/app",
4
+ "customTypeImports": {
5
+ "Alert": "import {Alert} from '@coolon/angular-ui-powerups'",
6
+ "Confirm": "import {Confirm} from '@coolon/angular-ui-powerups'",
7
+ "NavItem": "import {NavItem} from '@coolon/angular-ui-powerups'",
8
+ "CommandFace": "import {CommandFace} from '@coolon/angular-ui-powerups'",
9
+ "ColumnTextProperties": "import {ColumnTextProperties} from '@coolon/angular-ui-powerups'"
10
+ }
11
+ }
@@ -0,0 +1,23 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { RouterModule, Routes } from '@angular/router';
3
+ import { GarbageCollector } from '@coolon/pectin';
4
+ import { placeRoutes } from './places/place-routes';
5
+ import { PlacesModule } from './places/places.module';
6
+
7
+ const routes: Routes = [
8
+ ...placeRoutes,
9
+ { path: '**', redirectTo: 'home' }
10
+ ];
11
+
12
+ @NgModule({
13
+ imports: [
14
+ RouterModule.forRoot(routes, {
15
+ enableTracing: false
16
+ }),
17
+ PlacesModule
18
+ ],
19
+ exports: [RouterModule]
20
+ })
21
+ export class AppRoutingModule extends GarbageCollector {
22
+
23
+ }
@@ -0,0 +1,7 @@
1
+ <mat-toolbar>App Home</mat-toolbar>
2
+ <aup-place-outlet #outlet
3
+ [animate]="false"
4
+ [placeAnimationOrder]="places"></aup-place-outlet>
5
+
6
+
7
+
@@ -0,0 +1,12 @@
1
+ /*
2
+ * Remove template code below
3
+ */
4
+ :host {
5
+ display: flex;
6
+ flex-direction: column;
7
+ align-items: stretch;
8
+ }
9
+
10
+ aup-place-outlet {
11
+ flex:1
12
+ }
@@ -0,0 +1,19 @@
1
+ import {Component} from "@angular/core";
2
+ import {DisposableComponent} from "@coolon/angular-ui-powerups";
3
+ import {Dsl} from "@coolon/pectin";
4
+
5
+ @Component({
6
+ selector: "<%= dasherize(project)%>-root",
7
+ templateUrl: "./app.component.html",
8
+ styleUrls: ["./app.component.scss"],
9
+ })
10
+ export class AppComponent extends DisposableComponent {
11
+
12
+ readonly places: Constructable<PlaceComponent>[] = [];
13
+
14
+ constructor() {
15
+ super();
16
+ const {chain} = Dsl.disposeWith(this);
17
+ }
18
+
19
+ }
@@ -0,0 +1,74 @@
1
+ import {DOCUMENT} from "@angular/common";
2
+ import {ApplicationRef, DoBootstrap, Inject, LOCALE_ID, NgModule} from "@angular/core";
3
+ import {FlexModule} from "@angular/flex-layout";
4
+ import {MAT_MOMENT_DATE_FORMATS, MomentDateAdapter} from "@angular/material-moment-adapter";
5
+ import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from "@angular/material/core";
6
+ import {MatDialogModule} from "@angular/material/dialog";
7
+ import {MatIconRegistry} from "@angular/material/icon";
8
+ import { MatToolbarModule } from '@angular/material/toolbar';
9
+ import {BrowserModule, DomSanitizer} from "@angular/platform-browser";
10
+ import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
11
+ import {
12
+ AngularUiPowerupsModule,
13
+ DIALOG_INTERACTION_SERVICE_DEFAULTS,
14
+ DialogInteractionContextFactory,
15
+ ModalInteractionContextFactory,
16
+ PlaceModule
17
+ } from "@coolon/angular-ui-powerups";
18
+ import {Logger} from "@coolon/pectin";
19
+ import {setAutoFreeze} from "immer";
20
+ import {environment} from "../environments/environment";
21
+ import {AppRoutingModule} from "./app-routing.module";
22
+ import {AppComponent} from "./app.component";
23
+
24
+ // Immer version 7 is barfing with this error https://github.com/immerjs/immer/issues/537.
25
+ setAutoFreeze(false);
26
+ Logger.logToConsole();
27
+
28
+ @NgModule({
29
+ declarations: [AppComponent],
30
+ imports: [
31
+ BrowserModule,
32
+ BrowserAnimationsModule,
33
+ MatDialogModule,
34
+ AppRoutingModule,
35
+ PlaceModule,
36
+ AngularUiPowerupsModule,
37
+ FlexModule,
38
+ MatToolbarModule
39
+ ],
40
+ providers: [
41
+ {provide: DIALOG_INTERACTION_SERVICE_DEFAULTS, useValue: {restoreFocus: true}},
42
+ {provide: ModalInteractionContextFactory, useClass: DialogInteractionContextFactory},
43
+ {provide: LOCALE_ID, useValue: 'en-AU'},
44
+ {provide: MAT_DATE_LOCALE, useExisting: LOCALE_ID},
45
+ {provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
46
+ {provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS},
47
+ ],
48
+ bootstrap: [],
49
+ })
50
+ export class AppModule implements DoBootstrap {
51
+ constructor(@Inject(DOCUMENT) private document: any,
52
+ iconRegistry: MatIconRegistry,
53
+ domSanitizer: DomSanitizer) {
54
+ // iconRegistry.addSvgIcon('check_box_outline', domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/check_box_outline-24px.svg'));
55
+ }
56
+
57
+ ngDoBootstrap(appRef: ApplicationRef): void {
58
+ appRef.bootstrap(AppComponent)
59
+
60
+ // this.authService
61
+ // .init()
62
+ // .then((authorised) => {
63
+ // if (authorised) {
64
+ // this.document.body.classList.add("ready")
65
+ // }
66
+ // console.log('[ngDoBootstrap] cognito initialised, starting app.');
67
+ // appRef.bootstrap(AppComponent);
68
+ // })
69
+ // .catch(error => {
70
+ // this.document.body.classList.add("auth-failure")
71
+ // console.error('[ngDoBootstrap] cognito initialisation failed', error);
72
+ // });
73
+ }
74
+ }
@@ -0,0 +1,16 @@
1
+ import {NgModule} from '@angular/core';
2
+ import {ComponentsModule as AupComponentsModule, InteractionModule} from "@coolon/angular-ui-powerups";
3
+
4
+ @NgModule({
5
+ declarations: [
6
+ ],
7
+ imports: [
8
+ AupComponentsModule,
9
+ InteractionModule
10
+ ],
11
+ providers: [],
12
+ })
13
+ export class ComponentsModule {
14
+ constructor() {
15
+ }
16
+ }
@@ -0,0 +1,9 @@
1
+ // Don't edit: This file will be generated when you run the i18n task.
2
+ export namespace I18n {
3
+ export namespace places {
4
+ export namespace home {
5
+ export const nav = {
6
+ }
7
+ }
8
+ }
9
+ }