@coolon/angular-ui-powerups 3.4.1 → 3.4.3

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 (23) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/assets/mixins.scss +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.js +75 -9
  4. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  6. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  7. package/coolon-angular-ui-powerups.metadata.json +1 -1
  8. package/esm2015/lib/components/card-container/card-container.component.js +47 -9
  9. package/esm2015/lib/components/card-container/card-container.component.js.map +1 -1
  10. package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
  11. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  12. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +29 -0
  13. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
  14. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  15. package/fesm2015/coolon-angular-ui-powerups.js +113 -47
  16. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  17. package/lib/components/card-container/card-container.component.d.ts +45 -7
  18. package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +29 -0
  19. package/package.json +1 -1
  20. package/schematics/collection.json +2 -2
  21. package/schematics/place-add/index.js +1 -1
  22. package/schematics/place-add/index.js.map +1 -1
  23. package/schematics/place-add/templates/component/__name@dasherize__.component.spec.ts.template +1 -1
@@ -1,8 +1,52 @@
1
1
  import { OnInit, TemplateRef } from '@angular/core';
2
2
  import { Command } from '@coolon/pectin';
3
+ import { CommandFace } from '../commands/command-face';
3
4
  import { DisposableComponent } from '../disposable-component';
4
5
  /**
5
6
  * @example
7
+ * // basic usage
8
+ * <aup-card-container>
9
+ * <my-card *ngFor="..."></my-card>
10
+ * </aup-card-container>
11
+ *
12
+ * // adds an add button with a the '+' icon to the end of the card list.
13
+ * <aup-card-container [addCardCommand]="addCard">
14
+ * <my-card *ngFor="..."></my-card>
15
+ * </aup-card-container>
16
+ *
17
+ * // adds an add button with the specified face
18
+ * <aup-card-container [addCardCommand]="addCard" [addCardFace]="i18n.addCard" >
19
+ * <my-card *ngFor="..."></my-card>
20
+ * </aup-card-container>
21
+ *
22
+ * // adds an add card component using the specified template. The template
23
+ * // will fill it's container in the grid.
24
+ * <aup-card-container>
25
+ * <my-card *ngFor="..."></my-card>
26
+ * <ng-template #addCardTemplate>
27
+ * <div>This is a new card template, it will the the size of the other cards.</div>
28
+ * </ng-template>
29
+ * </aup-card-container>
30
+ *
31
+ * // sing the default new card styles for your template
32
+ * @import "../../../../assets/styles";
33
+ * .my-new-card {
34
+ * @include aup-card-container-new-card-style();
35
+ * // OR
36
+ * @include aup-card-container-new-card-style(
37
+ * $color: rgba(0,0,0,0.54),
38
+ * $background-color: rgba(255,255,255,0.8),
39
+ * $hover-color: $color,
40
+ * $background-hover-color: white
41
+ * )
42
+ * }
43
+ * <aup-card-container>
44
+ * <my-card *ngFor="..."></my-card>
45
+ * <ng-template #addCardTemplate>
46
+ * <div class="my-new-card" >This is a new card template, it will the the size of the other cards.</div>
47
+ * </ng-template>
48
+ * </aup-card-container>
49
+ *
6
50
  * // CSS Vars
7
51
  * aup-card-container {
8
52
  * --card-gap: var(--card-gap, 16px);
@@ -11,16 +55,10 @@ import { DisposableComponent } from '../disposable-component';
11
55
  * --card-min-height: var(--card-min-height, auto);
12
56
  * --card-background: var(--card-background, #fcfcfb);
13
57
  * }
14
- *
15
- * // Content Templates:
16
- * #addCardTemplate
17
- * <ng-template #addCardTemplate>
18
- * This is a new card template, it will the the size of the other cards.
19
- * </nav-template>
20
- *
21
58
  */
22
59
  export declare class CardContainerComponent extends DisposableComponent implements OnInit {
23
60
  addCardCommand: Command<any>;
61
+ addCardFace: CommandFace;
24
62
  addCardTemplate: TemplateRef<any>;
25
63
  constructor();
26
64
  ngOnInit(): void;
@@ -3,7 +3,36 @@ import { Command } from '@coolon/pectin';
3
3
  import { CommandFace } from '../../../components/commands/command-face';
4
4
  import { DisposableComponent } from '../../../components/disposable-component';
5
5
  /**
6
+ * @example
7
+ * <aup-activity-actions
8
+ * [confirmCommand]="confirm"
9
+ * [cancelCommand]="cancel"
10
+ * [style]="{confirm: saveFace, cancel: cancelFace}">
11
+ * </aup-activity-actions>
6
12
  *
13
+ * // Running `ng g @coolon/angular-ui-powerups:aup-i18n` will install default
14
+ * // style definitions
15
+ * <aup-activity-actions
16
+ * [confirmCommand]="confirm"
17
+ * [cancelCommand]="cancel"
18
+ * [style]="I18n.aup.components.activityActions.styles.okCancelIcons">
19
+ * </aup-activity-actions>
20
+ *
21
+ * // both commands are optional
22
+ * <aup-activity-actions
23
+ * [confirmCommand]="confirm"
24
+ * [style]="I18n.aup.components.activityActions.styles.okCancelIcons">
25
+ * </aup-activity-actions>
26
+ *
27
+ * // you can also add additional content that will be displayed along with the buttons.
28
+ * // The location of the content depends on the alignment attribute.
29
+ * <aup-activity-actions
30
+ * [confirmCommand]="confirm"
31
+ * [cancelCommand]="cancel"
32
+ * align="stretch"
33
+ * [style]="I18n.aup.components.activityActions.styles.okCancelIcons">
34
+ * <span>This content will be between the two commands</span>
35
+ * </aup-activity-actions>
7
36
  */
8
37
  export declare class ActivityActionsComponent extends DisposableComponent implements OnInit {
9
38
  confirmCommand: Command<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "3.4.1",
3
+ "version": "3.4.3",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "dependencies": {
6
6
  "@coolon/typescript-utilities": "^2.0.0",
@@ -6,11 +6,11 @@
6
6
  "factory": "./ng-add/index#ngAdd"
7
7
  },
8
8
  "bootstrap": {
9
- "description": "Add angular-ui-powerup dependencies to your application.",
9
+ "description": "Add angular-ui-powerup dependencies to your project.",
10
10
  "factory": "./ng-add/index#installDependencies"
11
11
  },
12
12
  "bootstrap-app": {
13
- "description": "Add angular-ui-powerup dependencies your application.",
13
+ "description": "Add angular-ui-powerup dependencies your app.",
14
14
  "factory": "./bootstrap-app/index#bootstrapApp",
15
15
  "schema": "./bootstrap-app/schema.json"
16
16
  },
@@ -13,7 +13,7 @@ function addPlace(_options) {
13
13
  const pathToSourceRoot = [buildContext.sourceRoot].concat(componentPathParts);
14
14
  const placeModulePath = buildContext.findFileInAncestorPath(pathToSourceRoot, 'places.module.ts');
15
15
  if (!placeModulePath) {
16
- throw new Error(`Unable to find 'places.module.ts' anywhere in ${pathToSourceRoot.join('/')}`);
16
+ throw new Error(`Places must be created in a directory containing a 'places.module.ts' file or any subdirectory thereof. I couldn't find one in ${pathToSourceRoot.join('/')} or in any ancestor of it`);
17
17
  }
18
18
  const placeModule = buildContext.getSourceFile(placeModulePath);
19
19
  const newPlaceModuleContent = updatePlaceModule(placeModule);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/place-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AACjF,0DAAsD;AAEtD,oEAA0E;AAI1E,SAAgB,QAAQ,CAAC,QAAgB;IAEvC,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAE/C,MAAM,YAAY,GAAG,4BAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAE1E,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,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,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,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC;QAE7B,OAAO,kBAAK,CAAC,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAEjE,CAAC,CAAC;AAEJ,CAAC;AAzCD,4BAyCC;AAED,SAAS,iBAAiB,CAAC,WAAgC;IACzD,uDAAuD;IACvD,MAAM,WAAW,GAAG,WAAW,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC;IACpE,MAAM,SAAS,GAAG,WAAW,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAEjE,OAAO,WAAW,CAAC,WAAW,EAAE,CAAC;AACnC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
2
 
3
- import { <%=capitalize(camelize(name))%>Component } from './<%=dasherize(name)%>>.component';
3
+ import { <%=capitalize(camelize(name))%>Component } from './<%=dasherize(name)%>.component';
4
4
 
5
5
  describe('<%=capitalize(camelize(name))%>Component', () => {
6
6
  let component: <%=capitalize(camelize(name))%>Component;