@coolon/angular-ui-powerups 3.18.0 → 3.18.1
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.
- package/CHANGELOG.md +8 -0
- package/assets/activities.scss +2 -1
- package/assets/styles.scss +1 -2
- package/package.json +1 -1
- package/schematics/bootstrap-app/templates/styles/global-variables.scss.template +1 -0
- package/schematics/bootstrap-app/templates/styles.scss.template +10 -3
- package/schematics/place-add/index.js +7 -10
- package/schematics/place-add/index.js.map +1 -1
- package/schematics/utils/template-utilities.js +1 -9
- package/schematics/utils/template-utilities.js.map +1 -1
- package/schematics/bootstrap-app/templates/styles/theme.scss.template +0 -37
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [3.18.1](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.18.0...v3.18.1) (2021-03-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* updated place-add to add the new component to places.module ([833be2d](https://bitbucket.org/coolon/angular-ui-powerups/commit/833be2da4d01f9e9acd74fa8e85227157d72f4da))
|
|
11
|
+
* updated style usage docs and tweaked padding defaults ([9bb8bfc](https://bitbucket.org/coolon/angular-ui-powerups/commit/9bb8bfcbaf0efc7ea2a8f96b1c59d93757b9e819))
|
|
12
|
+
|
|
5
13
|
## [3.18.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.17.3...v3.18.0) (2021-03-01)
|
|
6
14
|
|
|
7
15
|
|
package/assets/activities.scss
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
:root {
|
|
7
7
|
--aup-activity-padding: var(--default-padding);
|
|
8
|
+
--aup-activity-dialog-padding: 18px;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
// Extract the palettes you need from the theme definition.
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
$warn-palette: map-get($color-config, warn);
|
|
14
15
|
|
|
15
16
|
.dialog-interaction-context {
|
|
16
|
-
--aup-activity-padding:
|
|
17
|
+
--aup-activity-padding: var(--aup-activity-dialog-padding);
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
aup-activity-title {
|
package/assets/styles.scss
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
@use "./commands";
|
|
11
11
|
@use "./icons";
|
|
12
12
|
|
|
13
|
-
|
|
14
13
|
@mixin apply-light-theme($primary, $accent, $warn:ng.mat-palette(ng.$mat-red), $typography: ng.mat-typography-config()) {
|
|
15
14
|
|
|
16
15
|
$theme: ng.mat-light-theme((
|
|
@@ -29,7 +28,7 @@
|
|
|
29
28
|
@include activities.apply-theme($color-config, $typography);
|
|
30
29
|
|
|
31
30
|
:root {
|
|
32
|
-
--aup-default-padding: var(--default-padding,
|
|
31
|
+
--aup-default-padding: var(--default-padding, 16px);
|
|
33
32
|
--aup-default-background: white;
|
|
34
33
|
}
|
|
35
34
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
/* You can add global styles to this file, and also import other style files */
|
|
2
2
|
|
|
3
|
+
@use '~@angular/material/theming' as ng;
|
|
4
|
+
@use "~@coolon/angular-ui-powerups/assets/styles" as aup;
|
|
5
|
+
@use "./styles/global-variables";
|
|
6
|
+
|
|
7
|
+
$primary: ng.mat-palette(ng.$mat-indigo);
|
|
8
|
+
$accent: ng.mat-palette(ng.$mat-pink);
|
|
9
|
+
|
|
10
|
+
@include aup.apply-light-theme($primary, $accent);
|
|
11
|
+
|
|
3
12
|
@import "./assets/fonts/material-design-icons/material-icons.css";
|
|
4
13
|
@import "~roboto-fontface/css/roboto/roboto-fontface.css";
|
|
5
|
-
|
|
6
|
-
@import "./styles/global-variables";
|
|
7
|
-
@import "~@coolon/angular-ui-powerups/assets/styles";
|
|
14
|
+
|
|
8
15
|
|
|
9
16
|
html, body {
|
|
10
17
|
height: 100%;
|
|
@@ -16,8 +16,12 @@ function addPlace(_options) {
|
|
|
16
16
|
if (!placeModulePath) {
|
|
17
17
|
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`);
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
const
|
|
19
|
+
// we'll let angular do it by just create a default component then we'll clobber it with our real templates later.
|
|
20
|
+
const updateModule = schematics_1.externalSchematic('@schematics/angular', 'component', {
|
|
21
|
+
project: _options.project,
|
|
22
|
+
name: _options.name,
|
|
23
|
+
module: placeModulePath.slice(buildContext.sourceCodeRoot.length)
|
|
24
|
+
});
|
|
21
25
|
const componentFiles = template_utilities_1.applyTemplatesWithOverwrite(tree, 'templates/component', {
|
|
22
26
|
name: componentName,
|
|
23
27
|
selectorPrefix: buildContext.selectorPrefix,
|
|
@@ -26,15 +30,8 @@ function addPlace(_options) {
|
|
|
26
30
|
const additionalFiles = template_utilities_1.applyTemplatesWithOverwrite(tree, 'templates/files', {
|
|
27
31
|
name: componentName
|
|
28
32
|
}, buildContext.sourceRoot);
|
|
29
|
-
return schematics_1.chain([componentFiles, additionalFiles])(tree, context);
|
|
33
|
+
return schematics_1.chain([updateModule, componentFiles, additionalFiles])(tree, context);
|
|
30
34
|
};
|
|
31
35
|
}
|
|
32
36
|
exports.addPlace = addPlace;
|
|
33
|
-
function updatePlaceModule(placeModule) {
|
|
34
|
-
// TODO: Make this work.
|
|
35
|
-
// const imports = placeModule.getImportDeclarations();
|
|
36
|
-
const moduleClass = placeModule.findClassWithDecorator('@NgModule');
|
|
37
|
-
const decorator = moduleClass.getClassDecoratorNode('@NgModule');
|
|
38
|
-
return placeModule.getFullText();
|
|
39
|
-
}
|
|
40
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/place-add/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/place-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAAoG;AAIpG,oEAA0E;AAC1E,kDAA+C;AAI/C,SAAgB,QAAQ,CAAC,QAAgB;IAEvC,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAE/C,MAAM,SAAS,GAAG,qBAAS,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,SAAS,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAEhE,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3C,MAAM,aAAa,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACtD,MAAM,kBAAkB,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACpE,MAAM,gBAAgB,GAAG,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAClF,MAAM,eAAe,GAAG,YAAY,CAAC,sBAAsB,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;QAClG,IAAI,CAAC,eAAe,EAAE;YACpB,MAAM,IAAI,KAAK,CAAC,2GAA2G,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,6HAA6H,CAAC,CAAC;SACrR;QACD,kHAAkH;QAClH,MAAM,YAAY,GAAG,8BAAiB,CAAC,qBAAqB,EAAE,WAAW,EAAE;YACzE,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,MAAM,CAAC;SAClE,CAAC,CAAC;QAEH,MAAM,cAAc,GAAG,gDAA2B,CAChD,IAAI,EACJ,qBAAqB,EACrB;YACE,IAAI,EAAE,aAAa;YACnB,cAAc,EAAE,YAAY,CAAC,cAAc;YAC3C,UAAU,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;SACtD,EACD,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,aAAa,EAAE,CACnD,CAAC;QAGF,MAAM,eAAe,GAAG,gDAA2B,CACjD,IAAI,EACJ,iBAAiB,EACjB;YACE,IAAI,EAAE,aAAa;SACpB,EACD,YAAY,CAAC,UAAU,CAAC,CAAC;QAE3B,OAAO,kBAAK,CAAC,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAE/E,CAAC,CAAC;AAEJ,CAAC;AA9CD,4BA8CC"}
|
|
@@ -9,16 +9,8 @@ function applyTemplatesWithOverwrite(tree, templateUrl, templateData, outDir) {
|
|
|
9
9
|
const newFiles = schematics_1.apply(schematics_1.url(templateUrl), [
|
|
10
10
|
schematics_1.applyTemplates(Object.assign(Object.assign({}, templateData), core_1.strings)),
|
|
11
11
|
schematics_1.move(`${outDir}`),
|
|
12
|
-
// @see https://github.com/angular/angular-cli/issues/11337#issuecomment-448259549
|
|
13
|
-
schematics_1.forEach((fileEntry) => {
|
|
14
|
-
// this.context.logger.info(fileEntry.path);
|
|
15
|
-
if (tree.exists(fileEntry.path)) {
|
|
16
|
-
tree.overwrite(fileEntry.path, fileEntry.content);
|
|
17
|
-
}
|
|
18
|
-
return fileEntry;
|
|
19
|
-
})
|
|
20
12
|
]);
|
|
21
|
-
return schematics_1.mergeWith(newFiles);
|
|
13
|
+
return schematics_1.mergeWith(newFiles, schematics_1.MergeStrategy.Overwrite);
|
|
22
14
|
}
|
|
23
15
|
exports.applyTemplatesWithOverwrite = applyTemplatesWithOverwrite;
|
|
24
16
|
//# sourceMappingURL=template-utilities.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-utilities.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/utils/template-utilities.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"template-utilities.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/utils/template-utilities.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,2DAWoC;AAEpC,SAAgB,2BAA2B,CAAC,IAAU,EAAE,WAAmB,EAAE,YAAoB,EAAE,MAAc;IAC/G,uFAAuF;IACvF,2CAA2C;IAC3C,MAAM,QAAQ,GAAG,kBAAK,CACpB,gBAAG,CAAC,WAAW,CAAC,EAChB;QACE,2BAAc,iCACT,YAAY,GACZ,cAAO,EACV;QACF,iBAAI,CAAC,GAAG,MAAM,EAAE,CAAC;KASlB,CAAC,CAAC;IACL,OAAO,sBAAS,CAAC,QAAQ,EAAE,0BAAa,CAAC,SAAS,CAAC,CAAC;AACtD,CAAC;AArBD,kEAqBC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
@import '~@angular/material/theming';
|
|
2
|
-
// Plus imports for other components in your app.
|
|
3
|
-
|
|
4
|
-
// Include the common styles for Angular Material. We include this here so that you only
|
|
5
|
-
// have to load a single css file for Angular Material in your app.
|
|
6
|
-
// Be sure that you only ever include this mixin once!
|
|
7
|
-
@include mat-core();
|
|
8
|
-
|
|
9
|
-
// Define the palettes for your theme using the Material Design palettes available in palette.scss
|
|
10
|
-
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
|
|
11
|
-
// hue. Available color palettes: https://material.io/design/color/
|
|
12
|
-
$tester-app-primary: mat-palette($mat-indigo);
|
|
13
|
-
$tester-app-accent: mat-palette($mat-pink, A200, A100, A400);
|
|
14
|
-
|
|
15
|
-
// The warn palette is optional (defaults to red).
|
|
16
|
-
$tester-app-warn: mat-palette($mat-red);
|
|
17
|
-
|
|
18
|
-
// Create the theme object (a Sass map containing all of the palettes).
|
|
19
|
-
$tester-app-theme: mat-light-theme($tester-app-primary, $tester-app-accent, $tester-app-warn);
|
|
20
|
-
|
|
21
|
-
// Include theme styles for core and each component used in your app.
|
|
22
|
-
// Alternatively, you can import and @include the theme mixins for each component
|
|
23
|
-
// that you are using.
|
|
24
|
-
@include angular-material-theme($tester-app-theme);
|
|
25
|
-
|
|
26
|
-
:root {
|
|
27
|
-
--theme-primary-color: #{mat-color(map-get($tester-app-theme, primary))};
|
|
28
|
-
--theme-forground-color: #{mat-color(map-get($tester-app-theme, foreground))};
|
|
29
|
-
--theme-background-color: #{mat-color(map-get($tester-app-theme, background))};
|
|
30
|
-
--theme-warn-color: #{mat-color(map-get($tester-app-theme, warn))};
|
|
31
|
-
//--theme-warn-background-color: #{mat-color(map-get($tester-app-theme, warn))};
|
|
32
|
-
--theme-warn-background-color: #{mat-color(map-get($tester-app-theme, warn), 0.4)};
|
|
33
|
-
--theme-warn-color-default-contrast: #{mat-color(map-get($tester-app-theme, warn), default-contrast)};
|
|
34
|
-
--theme-selected-item-background-color: #{mat-color(map-get($tester-app-theme, primary), 0.15)};
|
|
35
|
-
--theme-selected-item-border-color: #{mat-color(map-get($tester-app-theme, primary), 0.6)};
|
|
36
|
-
--theme-selected-item-background-hover-color: #{mat-color(map-get($tester-app-theme, primary), 0.05)};
|
|
37
|
-
}
|