@coolon/angular-ui-powerups 13.0.3 → 13.1.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 (23) hide show
  1. package/esm2020/lib/components/forms/abstract-list-input.component.mjs +8 -8
  2. package/esm2020/lib/components/forms/abstract-value-input.component.mjs +2 -2
  3. package/esm2020/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.mjs +1 -1
  4. package/esm2020/lib/interaction/components/add-card-activity/add-card-activity.component.mjs +1 -1
  5. package/esm2020/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.mjs +1 -1
  6. package/esm2020/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.mjs +1 -1
  7. package/esm2020/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.mjs +27 -4
  8. package/esm2020/lib/interaction/in-place-interaction-context.mjs +1 -1
  9. package/esm2020/lib/interaction/services/interaction.service.mjs +11 -11
  10. package/esm2020/lib/place/place-router.mjs +6 -2
  11. package/esm2020/lib/place/url-snapshot.mjs +2 -2
  12. package/fesm2015/coolon-angular-ui-powerups.mjs +50 -18
  13. package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
  14. package/fesm2020/coolon-angular-ui-powerups.mjs +45 -18
  15. package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
  16. package/lib/components/forms/abstract-list-input.component.d.ts +4 -4
  17. package/lib/components/forms/abstract-value-input.component.d.ts +2 -2
  18. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +8 -2
  19. package/lib/interaction/in-place-interaction-context.d.ts +1 -1
  20. package/lib/interaction/services/interaction.service.d.ts +5 -5
  21. package/package.json +1 -1
  22. package/schematics/bootstrap-app/templates/src/app/app.component.ts.template +1 -2
  23. package/schematics/bootstrap-app/templates/src/styles.scss.template +59 -7
@@ -1,9 +1,9 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
2
- import { Form, MutableListModel } from '@coolon/pectin';
3
- import { AbstractInputComponent } from './abstract-input.component';
1
+ import { EventEmitter, OnInit } from "@angular/core";
2
+ import { ConvertedFormListModel, Form, MutableListModel } from "@coolon/pectin";
3
+ import { AbstractInputComponent } from "./abstract-input.component";
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class AbstractListInputComponent<T> extends AbstractInputComponent<T[]> implements OnInit {
6
- listModel: Form.ListModelBase<T> | MutableListModel<T>;
6
+ listModel: Form.ListModelBase<T> | ConvertedFormListModel<T, any> | MutableListModel<T>;
7
7
  /**
8
8
  * A backing model for all our @Input() valueModel properties which should be defined as follows.
9
9
  *
@@ -1,9 +1,9 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
- import { Form, Guard, MutableValueModel } from '@coolon/pectin';
2
+ import { ConvertedFormValueModel, Form, Guard, MutableValueModel } from "@coolon/pectin";
3
3
  import { AbstractInputComponent } from './abstract-input.component';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class AbstractValueInputComponent<T> extends AbstractInputComponent<T> implements OnInit {
6
- valueModel: Form.ValueModelBase<T> | MutableValueModel<T>;
6
+ valueModel: Form.ValueModelBase<T> | ConvertedFormValueModel<T, any> | MutableValueModel<T>;
7
7
  /**
8
8
  * A backing model for all our @Input() valueModel properties which should be defined as follows.
9
9
  *
@@ -30,11 +30,17 @@ export declare class InPlaceInteractionContextComponent<D, R, E> extends Disposa
30
30
  * the activity will replace the existing content immediately.
31
31
  */
32
32
  animateFirstActivity: boolean;
33
+ /**
34
+ * If true the activity will sync with the router to enable back button support. This is a work around for
35
+ * deeply nested activities that can't be linked with the root place interactionContext hook for cancelling
36
+ * active interactions.
37
+ */
38
+ syncWithRoutes: boolean;
33
39
  get animationDuration(): string;
34
40
  get active(): boolean;
35
41
  constructor(interactionService: InteractionService, tabConfig: MatTabsConfig);
36
42
  ngAfterViewInit(): void;
37
- initialise(id: string, api: InteractionService.Api): void;
43
+ onInplaceInteractionContextRegistered(id: string, api: InteractionService.Api): void;
38
44
  get identifier(): string;
39
45
  alert(alert: Alert): Promise<void>;
40
46
  cancelActiveActivity(): Promise<boolean>;
@@ -45,5 +51,5 @@ export declare class InPlaceInteractionContextComponent<D, R, E> extends Disposa
45
51
  isActive(): boolean;
46
52
  startActivity<D1, R1, E1>(activityType: Constructable<Activity<D1, R1, E1>>, data?: D1, options?: InteractionContext.Options): Promise<R1>;
47
53
  static ɵfac: i0.ɵɵFactoryDeclaration<InPlaceInteractionContextComponent<any, any, any>, [null, { optional: true; }]>;
48
- static ɵcmp: i0.ɵɵComponentDeclaration<InPlaceInteractionContextComponent<any, any, any>, "aup-in-place-interaction-context", never, { "animateFirstActivity": "animateFirstActivity"; }, {}, never, ["*"]>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<InPlaceInteractionContextComponent<any, any, any>, "aup-in-place-interaction-context", never, { "animateFirstActivity": "animateFirstActivity"; "syncWithRoutes": "syncWithRoutes"; }, {}, never, ["*"]>;
49
55
  }
@@ -1,5 +1,5 @@
1
1
  import { InteractionContext } from './interaction-context';
2
2
  import { InteractionService } from './services/interaction.service';
3
3
  export interface InPlaceInteractionContext extends InteractionContext {
4
- initialise(id: string, api: InteractionService.Api): any;
4
+ onInplaceInteractionContextRegistered(id: string, api: InteractionService.Api): any;
5
5
  }
@@ -1,9 +1,9 @@
1
- import { BooleanValueModelChain, Disposable, GarbageCollector, ListModel, ListModelChain, ValueModel } from '@coolon/pectin';
2
- import { PlaceRouter } from '../../place/place-router';
1
+ import { BooleanValueModelChain, Disposable, GarbageCollector, ListModel, ListModelChain, ValueModel } from "@coolon/pectin";
2
+ import { PlaceRouter } from "../../place/place-router";
3
3
  import { InPlaceInteractionContext } from "../in-place-interaction-context";
4
- import { InteractionContext } from '../interaction-context';
5
- import { InteractionServiceRoutingAdapter } from './interaction-service-routing-adapter';
6
- import { ModalInteractionContextFactory } from './modal-interaction-context.factory';
4
+ import { InteractionContext } from "../interaction-context";
5
+ import { InteractionServiceRoutingAdapter } from "./interaction-service-routing-adapter";
6
+ import { ModalInteractionContextFactory } from "./modal-interaction-context.factory";
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class InteractionService {
9
9
  readonly modelInteractionContextFactory: ModalInteractionContextFactory;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "13.0.3",
3
+ "version": "13.1.0",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^13.2.3",
@@ -9,8 +9,7 @@ import {Dsl} from "@coolon/pectin";
9
9
  })
10
10
  export class AppComponent extends DisposableComponent {
11
11
 
12
- readonly places = [
13
- ];
12
+ readonly places: Constructable<PlaceComponent>[] = [];
14
13
 
15
14
  constructor() {
16
15
  super();
@@ -1,13 +1,66 @@
1
- /* You can add global styles to this file, and also import other style files */
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use '@angular/material/theming';
2
4
 
3
- @use '@angular/material/theming' as ng;
4
- @use "@coolon/angular-ui-powerups/assets/styles" as aup;
5
+ @use "node_modules/@coolon/angular-ui-powerups/assets/styles" as aup;
5
6
  @use "./styles/global-variables";
6
7
 
7
- $primary: ng.mat-palette(ng.$mat-indigo);
8
- $accent: ng.mat-palette(ng.$mat-pink);
8
+ $success-palette: (
9
+ 50 : #e4feea,
10
+ 100 : #bbfdcc,
11
+ 200 : #8efbaa,
12
+ 300 : #61f987,
13
+ 400 : #3ff86e,
14
+ 500 : #1df754,
15
+ 600 : #1af64d,
16
+ 700 : #15f543,
17
+ 800 : #11f33a,
18
+ 900 : #0af129,
19
+ A100 : #ffffff,
20
+ A200 : #e7ffea,
21
+ A400 : #b4ffbc,
22
+ A700 : #9bffa5,
23
+ contrast: (
24
+ 50 : #000000,
25
+ 100 : #000000,
26
+ 200 : #000000,
27
+ 300 : #000000,
28
+ 400 : #000000,
29
+ 500 : #000000,
30
+ 600 : #000000,
31
+ 700 : #000000,
32
+ 800 : #000000,
33
+ 900 : #000000,
34
+ A100 : #000000,
35
+ A200 : #000000,
36
+ A400 : #000000,
37
+ A700 : #000000,
38
+ )
39
+ );
40
+
41
+ $typography: mat.define-typography-config();
42
+
43
+ $primary: mat.define-palette(mat.$indigo-palette);
44
+ $accent: mat.define-palette(mat.$yellow-palette);
45
+ $warn: mat.define-palette(mat.$red-palette);
46
+ $success: mat.define-palette($success-palette);
47
+
48
+ $theme: mat.define-light-theme((
49
+ color: (
50
+ primary: $primary,
51
+ accent: $accent,
52
+ warn: $warn,
53
+ )
54
+ ));
55
+
56
+ $background: map.get($theme, background);
57
+ $foreground: map.get($theme, foreground);
58
+
59
+ @include mat.core($typography);
60
+ @include mat.all-component-themes($theme);
61
+
62
+ @include aup.apply-light-theme($theme, $typography);
9
63
 
10
- @include aup.apply-light-theme($primary, $accent);
11
64
 
12
65
  @import "./assets/fonts/material-design-icons/material-icons.css";
13
66
 
@@ -30,4 +83,3 @@ body {
30
83
  body > *:first-child {
31
84
  flex: 1;
32
85
  }
33
-