@coolon/angular-ui-powerups 1.1.1 → 1.2.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +270 -49
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.d.ts +28 -25
  7. package/coolon-angular-ui-powerups.metadata.json +1 -1
  8. package/esm2015/coolon-angular-ui-powerups.js +26 -23
  9. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  10. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  11. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  12. package/esm2015/lib/components/components.module.js +10 -4
  13. package/esm2015/lib/components/components.module.js.map +1 -1
  14. package/esm2015/lib/components/components.module.metadata.json +1 -1
  15. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  16. package/esm2015/lib/components/focus-container/focus-container.component.js +41 -0
  17. package/esm2015/lib/components/focus-container/focus-container.component.js.map +1 -0
  18. package/esm2015/lib/components/focus-container/focus-container.component.metadata.json +1 -0
  19. package/esm2015/lib/components/focus-container/focus-container.component.ngfactory.js.map +1 -0
  20. package/esm2015/lib/components/focus-container/focus-container.component.scss.shim.ngstyle.js.map +1 -0
  21. package/esm2015/lib/components/focusable.component.js +59 -0
  22. package/esm2015/lib/components/focusable.component.js.map +1 -0
  23. package/esm2015/lib/components/focusable.component.metadata.json +1 -0
  24. package/esm2015/lib/components/focusable.component.ngfactory.js.map +1 -0
  25. package/esm2015/lib/components/index.js +2 -0
  26. package/esm2015/lib/components/index.js.map +1 -1
  27. package/esm2015/lib/components/index.metadata.json +1 -1
  28. package/esm2015/lib/components/resize-aware.component.js +2 -2
  29. package/esm2015/lib/components/resize-aware.component.js.map +1 -1
  30. package/esm2015/lib/directives/focus-binding.js +102 -0
  31. package/esm2015/lib/directives/focus-binding.js.map +1 -0
  32. package/esm2015/lib/directives/focus-binding.metadata.json +1 -0
  33. package/esm2015/lib/directives/index.js +1 -0
  34. package/esm2015/lib/directives/index.js.map +1 -1
  35. package/esm2015/lib/directives/index.metadata.json +1 -1
  36. package/esm2015/lib/place/place-router.js +1 -1
  37. package/esm2015/lib/place/place-router.js.map +1 -1
  38. package/esm2015/lib/place/route/parameter-decorators.js +8 -5
  39. package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
  40. package/esm2015/lib/place/route/parameter-decorators.metadata.json +1 -1
  41. package/esm5/coolon-angular-ui-powerups.js +26 -23
  42. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  43. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  44. package/esm5/lib/components/components.module.js +10 -4
  45. package/esm5/lib/components/components.module.js.map +1 -1
  46. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  47. package/esm5/lib/components/focus-container/focus-container.component.js +42 -0
  48. package/esm5/lib/components/focus-container/focus-container.component.js.map +1 -0
  49. package/esm5/lib/components/focus-container/focus-container.component.ngfactory.js.map +1 -0
  50. package/esm5/lib/components/focus-container/focus-container.component.scss.shim.ngstyle.js.map +1 -0
  51. package/esm5/lib/components/focusable.component.js +70 -0
  52. package/esm5/lib/components/focusable.component.js.map +1 -0
  53. package/esm5/lib/components/focusable.component.ngfactory.js.map +1 -0
  54. package/esm5/lib/components/index.js +2 -0
  55. package/esm5/lib/components/index.js.map +1 -1
  56. package/esm5/lib/components/resize-aware.component.js +2 -2
  57. package/esm5/lib/components/resize-aware.component.js.map +1 -1
  58. package/esm5/lib/directives/focus-binding.js +112 -0
  59. package/esm5/lib/directives/focus-binding.js.map +1 -0
  60. package/esm5/lib/directives/index.js +1 -0
  61. package/esm5/lib/directives/index.js.map +1 -1
  62. package/esm5/lib/place/place-router.js +1 -1
  63. package/esm5/lib/place/place-router.js.map +1 -1
  64. package/esm5/lib/place/route/parameter-decorators.js +8 -5
  65. package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
  66. package/fesm2015/coolon-angular-ui-powerups.js +206 -12
  67. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  68. package/fesm5/coolon-angular-ui-powerups.js +228 -12
  69. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  70. package/lib/components/focus-container/focus-container.component.d.ts +9 -0
  71. package/lib/components/focusable.component.d.ts +14 -0
  72. package/lib/components/index.d.ts +2 -0
  73. package/lib/directives/focus-binding.d.ts +25 -0
  74. package/lib/directives/index.d.ts +1 -0
  75. package/lib/place/place-router.d.ts +3 -2
  76. package/package.json +2 -2
@@ -0,0 +1,59 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { Component, ElementRef, HostBinding, HostListener } from '@angular/core';
3
+ import { FocusManager, Dsl } from '@coolon/pectin';
4
+ import { FocusBinding } from '../directives/focus-binding';
5
+ import { DisposableComponent } from './disposable-component';
6
+ let FocusableComponent = class FocusableComponent extends DisposableComponent {
7
+ constructor(el, focusManager, focusBindingFactory) {
8
+ super();
9
+ this.el = el;
10
+ this.focusManager = focusManager;
11
+ const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
12
+ if (this.focusManager) {
13
+ this._focusContext = this.focusManager.registerFocusable(this);
14
+ this.registerDisposable(focusBindingFactory.createBinding(el, this.focusContext));
15
+ }
16
+ }
17
+ get focusable() {
18
+ return !!this.focusContext ? 0 : undefined;
19
+ }
20
+ onFocus() {
21
+ var _a;
22
+ (_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusIn();
23
+ }
24
+ onBlur() {
25
+ var _a;
26
+ (_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusOut();
27
+ }
28
+ get focusContext() {
29
+ return this._focusContext;
30
+ }
31
+ };
32
+ FocusableComponent.ctorParameters = () => [
33
+ { type: ElementRef },
34
+ { type: FocusManager },
35
+ { type: FocusBinding.Factory }
36
+ ];
37
+ __decorate([
38
+ HostBinding('attr.tabindex'),
39
+ __metadata("design:type", Object),
40
+ __metadata("design:paramtypes", [])
41
+ ], FocusableComponent.prototype, "focusable", null);
42
+ __decorate([
43
+ HostListener('focus'),
44
+ __metadata("design:type", Function),
45
+ __metadata("design:paramtypes", []),
46
+ __metadata("design:returntype", void 0)
47
+ ], FocusableComponent.prototype, "onFocus", null);
48
+ __decorate([
49
+ HostListener('blur'),
50
+ __metadata("design:type", Function),
51
+ __metadata("design:paramtypes", []),
52
+ __metadata("design:returntype", void 0)
53
+ ], FocusableComponent.prototype, "onBlur", null);
54
+ FocusableComponent = __decorate([
55
+ Component({ template: '' }),
56
+ __metadata("design:paramtypes", [ElementRef, FocusManager, FocusBinding.Factory])
57
+ ], FocusableComponent);
58
+ export { FocusableComponent };
59
+ //# sourceMappingURL=focusable.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focusable.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/focusable.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEjF,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAG7D,IAAa,kBAAkB,GAA/B,MAAa,kBAAmB,SAAQ,mBAAmB;IAmBzD,YAA+B,EAAc,EAAW,YAA0B,EAAE,mBAAyC;QAC3H,KAAK,EAAE,CAAC;QADqB,OAAE,GAAF,EAAE,CAAY;QAAW,iBAAY,GAAZ,YAAY,CAAc;QAEhF,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzF,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAC/D,IAAI,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,aAAa,CAAC,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;SACnF;IACH,CAAC;IArBD,IAAI,SAAS;QACX,OAAO,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7C,CAAC;IAGD,OAAO;;QACL,MAAA,IAAI,CAAC,YAAY,0CAAE,aAAa,GAAG;IACrC,CAAC;IAGD,MAAM;;QACJ,MAAA,IAAI,CAAC,YAAY,0CAAE,cAAc,GAAG;IACtC,CAAC;IAWD,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;CAEF,CAAA;;YAboC,UAAU;YAAyB,YAAY;YAAuB,YAAY,CAAC,OAAO;;AAd7H;IADC,WAAW,CAAC,eAAe,CAAC;;;mDAG5B;AAGD;IADC,YAAY,CAAC,OAAO,CAAC;;;;iDAGrB;AAGD;IADC,YAAY,CAAC,MAAM,CAAC;;;;gDAGpB;AAjBU,kBAAkB;IAD9B,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;qCAoBS,UAAU,EAAyB,YAAY,EAAuB,YAAY,CAAC,OAAO;GAnBlH,kBAAkB,CAgC9B;SAhCY,kBAAkB","sourcesContent":["import { Component, ElementRef, HostBinding, HostListener } from '@angular/core';\n\nimport { FocusManager, Dsl } from '@coolon/pectin';\nimport { FocusBinding } from '../directives/focus-binding';\nimport { DisposableComponent } from './disposable-component';\n\n@Component({ template: '' })\nexport class FocusableComponent extends DisposableComponent {\n\n private _focusContext: FocusManager.Context;\n\n @HostBinding('attr.tabindex')\n get focusable() {\n return !!this.focusContext ? 0 : undefined;\n }\n\n @HostListener('focus')\n onFocus() {\n this.focusContext?.notifyFocusIn();\n }\n\n @HostListener('blur')\n onBlur() {\n this.focusContext?.notifyFocusOut();\n }\n\n constructor(protected readonly el: ElementRef, readonly focusManager: FocusManager, focusBindingFactory: FocusBinding.Factory) {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n if (this.focusManager) {\n this._focusContext = this.focusManager.registerFocusable(this);\n this.registerDisposable(focusBindingFactory.createBinding(el, this.focusContext));\n }\n }\n\n get focusContext(): FocusManager.Context {\n return this._focusContext;\n }\n\n}\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"FocusableComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./disposable-component","name":"DisposableComponent","line":7,"character":40},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"template":""}]}],"members":{"focusable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":11,"character":3},"arguments":["attr.tabindex"]}]}],"onFocus":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":16,"character":3},"arguments":["focus"]}]}],"onBlur":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":21,"character":3},"arguments":["blur"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":26,"character":37},{"__symbolic":"reference","module":"@coolon/pectin","name":"FocusManager","line":26,"character":72},{"__symbolic":"select","expression":{"__symbolic":"reference","module":"../directives/focus-binding","name":"FocusBinding","line":26,"character":107},"member":"Factory"}]}]}}}}]
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focusable.component.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/focusable.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -3,7 +3,9 @@
3
3
  */
4
4
  export * from "./components.module";
5
5
  export * from "./disposable-component";
6
+ export * from "./focusable.component";
6
7
  export * from "./resize-aware.component";
8
+ export * from "./focus-container/focus-container.component";
7
9
  export * from "./forms/abstract-input.component";
8
10
  export * from "./forms/checkbox-input/checkbox-input.component";
9
11
  export * from "./forms/number-input/number-input.component";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qCAAqC,CAAC;AACpD,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components.module\";\nexport * from \"./disposable-component\";\nexport * from \"./resize-aware.component\";\nexport * from \"./forms/abstract-input.component\";\nexport * from \"./forms/checkbox-input/checkbox-input.component\";\nexport * from \"./forms/number-input/number-input.component\";\nexport * from \"./forms/password-input/password-input.component\";\nexport * from \"./forms/select-input/select-input.component\";\nexport * from \"./forms/string-input/string-input.component\";\nexport * from \"./noop/noop.component\";\nexport * from \"./scroll-container/scroll-container.component\";\nexport * from \"./switch-case/switch-case.component\";\nexport * from \"./types/bounds.class\";\nexport * from \"./types/dimension.class\";\nexport * from \"./types/point.class\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AACjD,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qCAAqC,CAAC;AACpD,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components.module\";\nexport * from \"./disposable-component\";\nexport * from \"./focusable.component\";\nexport * from \"./resize-aware.component\";\nexport * from \"./focus-container/focus-container.component\";\nexport * from \"./forms/abstract-input.component\";\nexport * from \"./forms/checkbox-input/checkbox-input.component\";\nexport * from \"./forms/number-input/number-input.component\";\nexport * from \"./forms/password-input/password-input.component\";\nexport * from \"./forms/select-input/select-input.component\";\nexport * from \"./forms/string-input/string-input.component\";\nexport * from \"./noop/noop.component\";\nexport * from \"./scroll-container/scroll-container.component\";\nexport * from \"./switch-case/switch-case.component\";\nexport * from \"./types/bounds.class\";\nexport * from \"./types/dimension.class\";\nexport * from \"./types/point.class\";\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./components.module"},{"from":"./disposable-component"},{"from":"./resize-aware.component"},{"from":"./forms/abstract-input.component"},{"from":"./forms/checkbox-input/checkbox-input.component"},{"from":"./forms/number-input/number-input.component"},{"from":"./forms/password-input/password-input.component"},{"from":"./forms/select-input/select-input.component"},{"from":"./forms/string-input/string-input.component"},{"from":"./noop/noop.component"},{"from":"./scroll-container/scroll-container.component"},{"from":"./switch-case/switch-case.component"},{"from":"./types/bounds.class"},{"from":"./types/dimension.class"},{"from":"./types/point.class"}]}]
1
+ [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./components.module"},{"from":"./disposable-component"},{"from":"./focusable.component"},{"from":"./resize-aware.component"},{"from":"./focus-container/focus-container.component"},{"from":"./forms/abstract-input.component"},{"from":"./forms/checkbox-input/checkbox-input.component"},{"from":"./forms/number-input/number-input.component"},{"from":"./forms/password-input/password-input.component"},{"from":"./forms/select-input/select-input.component"},{"from":"./forms/string-input/string-input.component"},{"from":"./noop/noop.component"},{"from":"./scroll-container/scroll-container.component"},{"from":"./switch-case/switch-case.component"},{"from":"./types/bounds.class"},{"from":"./types/dimension.class"},{"from":"./types/point.class"}]}]
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { AfterViewInit, Directive, ElementRef, NgZone } from '@angular/core';
3
- import { ValueHolder } from '@coolon/pectin';
3
+ import { MutableValueModel } from '@coolon/pectin';
4
4
  import ResizeObserver from 'resize-observer-polyfill';
5
5
  import { DisposableComponent } from './disposable-component';
6
6
  import { Bounds } from './types/bounds.class';
@@ -9,7 +9,7 @@ let ResizeAwareComponent = class ResizeAwareComponent extends DisposableComponen
9
9
  super();
10
10
  this.elementRef = elementRef;
11
11
  this.ngZone = ngZone;
12
- this._boundsModel = new ValueHolder(new Bounds(0, 0, 0, 0));
12
+ this._boundsModel = new MutableValueModel(new Bounds(0, 0, 0, 0));
13
13
  }
14
14
  ngAfterViewInit() {
15
15
  this.updateBounds();
@@ -1 +1 @@
1
- {"version":3,"file":"resize-aware.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/resize-aware.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAA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IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;IACjC,CAAC;IAEO,YAAY;QAClB,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACjE,CAAC;CAGF,CAAA;;YApC4C,UAAU;YAA6B,MAAM;;AAJ7E,oBAAoB;IADhC,SAAS,EAAE;qCAKiC,UAAU,EAA6B,MAAM;GAJ7E,oBAAoB,CAwChC;SAxCY,oBAAoB","sourcesContent":["import { AfterViewInit, Directive, ElementRef, NgZone } from '@angular/core';\nimport { ValueHolder, ValueModel } from '@coolon/pectin';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { DisposableComponent } from './disposable-component';\nimport { Bounds } from './types/bounds.class';\nimport { Point } from './types/point.class';\n\n@Directive()\nexport class ResizeAwareComponent extends DisposableComponent implements AfterViewInit {\n\n private _boundsModel = new ValueHolder<Bounds>(new Bounds(0, 0, 0, 0));\n\n constructor(protected readonly elementRef: ElementRef, protected readonly ngZone: NgZone) {\n super();\n }\n\n ngAfterViewInit(): void {\n this.updateBounds();\n const element = this.elementRef.nativeElement;\n const ro = new ResizeObserver((entries, observer) => {\n this.ngZone.run(() => this.updateBounds());\n });\n ro.observe(element);\n this.onDispose(() => ro.disconnect());\n }\n\n get boundsModel(): ValueModel<Bounds> {\n return this._boundsModel.readonly;\n }\n\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n\n // TODO: Make this handle body scroll\n public relativePositionOf(point: { x: number, y: number } | MouseEvent): Point {\n return this.bounds.relativePositionOf(point);\n }\n\n get bounds(): Bounds {\n return this._boundsModel.value;\n }\n\n private updateBounds() {\n this._boundsModel.value = Bounds.ofElement(this.nativeElement);\n }\n\n\n}\n\nexport namespace ResizeAwareComponent {\n\n}\n"]}
1
+ {"version":3,"file":"res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,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;IACvC,CAAC;IAED,qCAAqC;IAC9B,kBAAkB,CAAC,KAA4C;QACpE,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;IACjC,CAAC;IAEO,YAAY;QAClB,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACjE,CAAC;CAGF,CAAA;;YApC4C,UAAU;YAA6B,MAAM;;AAJ7E,oBAAoB;IADhC,SAAS,EAAE;qCAKiC,UAAU,EAA6B,MAAM;GAJ7E,oBAAoB,CAwChC;SAxCY,oBAAoB","sourcesContent":["import { AfterViewInit, Directive, ElementRef, NgZone } from '@angular/core';\nimport { MutableValueModel, ValueModel } from '@coolon/pectin';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { DisposableComponent } from './disposable-component';\nimport { Bounds } from './types/bounds.class';\nimport { Point } from './types/point.class';\n\n@Directive()\nexport class ResizeAwareComponent extends DisposableComponent implements AfterViewInit {\n\n private _boundsModel = new MutableValueModel<Bounds>(new Bounds(0, 0, 0, 0));\n\n constructor(protected readonly elementRef: ElementRef, protected readonly ngZone: NgZone) {\n super();\n }\n\n ngAfterViewInit(): void {\n this.updateBounds();\n const element = this.elementRef.nativeElement;\n const ro = new ResizeObserver((entries, observer) => {\n this.ngZone.run(() => this.updateBounds());\n });\n ro.observe(element);\n this.onDispose(() => ro.disconnect());\n }\n\n get boundsModel(): ValueModel<Bounds> {\n return this._boundsModel.readonly;\n }\n\n get nativeElement() {\n return this.elementRef.nativeElement;\n }\n\n // TODO: Make this handle body scroll\n public relativePositionOf(point: { x: number, y: number } | MouseEvent): Point {\n return this.bounds.relativePositionOf(point);\n }\n\n get bounds(): Bounds {\n return this._boundsModel.value;\n }\n\n private updateBounds() {\n this._boundsModel.value = Bounds.ofElement(this.nativeElement);\n }\n\n\n}\n\nexport namespace ResizeAwareComponent {\n\n}\n"]}
@@ -0,0 +1,102 @@
1
+ import { __decorate, __metadata, __param } from "tslib";
2
+ import { DOCUMENT } from '@angular/common';
3
+ import { ElementRef, Inject, Injectable, NgZone } from '@angular/core';
4
+ import { Dsl, FocusManager, GarbageCollector, Logger } from '@coolon/pectin';
5
+ let FocusBinding = class FocusBinding extends GarbageCollector {
6
+ constructor(focusTargetElement, ngZone, document, focusContext) {
7
+ super();
8
+ this.focusTargetElement = focusTargetElement;
9
+ this.ngZone = ngZone;
10
+ this.focusContext = focusContext;
11
+ // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
12
+ this.document = document;
13
+ // TODO: Make this also track the current enabled/disabled state.
14
+ const { when } = Dsl.disposeWith(this);
15
+ when.valueOf(this.focusContext.focused).changes((focused) => {
16
+ if (focused && !this.alreadyHasFocus()) {
17
+ this.tryAndFocus();
18
+ }
19
+ }, { initialValue: 'triggerChangeUnlessNil' });
20
+ }
21
+ onFocusIn() {
22
+ this.focusContext.notifyFocusIn();
23
+ }
24
+ onFocusOut() {
25
+ this.focusContext.notifyFocusOut();
26
+ }
27
+ // Hook method for debugging via tracing.
28
+ alreadyHasFocus() {
29
+ return this.isElementFocused(this.focusTarget);
30
+ }
31
+ // Hook method for debugging via tracing.
32
+ isElementFocused(element) {
33
+ return this.document.activeElement === element;
34
+ }
35
+ tryAndFocus(retries = 5) {
36
+ if (this.modelShouldStillHaveFocus() && this.canFocus()) {
37
+ if (!this.alreadyHasFocus()) {
38
+ this.focusTarget.focus();
39
+ }
40
+ // if we didn't get the focus we try again later.
41
+ if (!this.alreadyHasFocus()) {
42
+ Logger.get(this).log(`focus failed, trying ${retries} more times`);
43
+ if (retries > 0) {
44
+ // try again on the next paint
45
+ // TODO: is there an angular way of doing this without calling a window function.
46
+ requestAnimationFrame(() => {
47
+ this.tryAndFocus(retries - 1);
48
+ });
49
+ }
50
+ else {
51
+ Logger.get(this).warn(`Tried to focus but gave up as the component wasn't enabled or visible.`);
52
+ }
53
+ }
54
+ }
55
+ }
56
+ get focusTarget() {
57
+ return this.focusTargetElement;
58
+ }
59
+ // Hook method for debugging via tracing.
60
+ modelShouldStillHaveFocus() {
61
+ return this.focusContext.focused.value;
62
+ }
63
+ // Hook method for debugging via tracing.
64
+ canFocus() {
65
+ const dimension = this.focusTarget.getBoundingClientRect();
66
+ const hasSize = dimension.height >= 0 && dimension.height >= 0;
67
+ // tslint:disable-next-line:no-string-literal
68
+ return hasSize && !this.focusTarget['disabled'];
69
+ }
70
+ };
71
+ FocusBinding = __decorate([
72
+ __param(1, Inject(NgZone)),
73
+ __param(2, Inject(DOCUMENT)),
74
+ __metadata("design:paramtypes", [HTMLElement,
75
+ NgZone, Object, Object])
76
+ ], FocusBinding);
77
+ export { FocusBinding };
78
+ (function (FocusBinding) {
79
+ let Factory = class Factory {
80
+ constructor(ngZone, document) {
81
+ this.ngZone = ngZone;
82
+ // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
83
+ this.document = document;
84
+ }
85
+ createBinding(el, focusContext) {
86
+ return new FocusBinding(el.nativeElement, this.ngZone, this.document, focusContext);
87
+ }
88
+ };
89
+ Factory.ctorParameters = () => [
90
+ { type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
91
+ { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
92
+ ];
93
+ Factory = __decorate([
94
+ Injectable({
95
+ providedIn: 'root'
96
+ }),
97
+ __param(0, Inject(NgZone)), __param(1, Inject(DOCUMENT)),
98
+ __metadata("design:paramtypes", [NgZone, Object])
99
+ ], Factory);
100
+ FocusBinding.Factory = Factory;
101
+ })(FocusBinding || (FocusBinding = {}));
102
+ //# sourceMappingURL=focus-binding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-binding.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","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;IAKV,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;qCAFoB,WAAW;QACP,MAAM;GALhD,YAAY,CA4ExB;SA5EY,YAAY;AA8EzB,WAAiB,YAAY;IAK3B,IAAa,OAAO,GAApB,MAAa,OAAO;QAIlB,YAA6C,MAAc,EAAoB,QAAa;YAA/C,WAAM,GAAN,MAAM,CAAQ;YACzD,kHAAkH;YAClH,IAAI,CAAC,QAAQ,GAAG,QAAoB,CAAC;QACvC,CAAC;QAED,aAAa,CAAC,EAAc,EAAE,YAAkC;YAC9D,OAAO,IAAI,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QACtF,CAAC;KACF,CAAA;;gBARsD,MAAM,uBAA9C,MAAM,SAAC,MAAM;gDAAoC,MAAM,SAAC,QAAQ;;IAJlE,OAAO;QAHnB,UAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;QAKa,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA,EAAmC,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;yCAAzB,MAAM;OAJhD,OAAO,CAYnB;IAZY,oBAAO,UAYnB,CAAA;AACH,CAAC,EAlBgB,YAAY,KAAZ,YAAY,QAkB5B","sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { ElementRef, Inject, Injectable, NgZone } from '@angular/core';\nimport { Dsl, FocusManager, GarbageCollector, Logger } from '@coolon/pectin';\n\nexport class FocusBinding extends GarbageCollector {\n\n private readonly document: Document;\n\n constructor(private readonly focusTargetElement: HTMLElement,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(DOCUMENT) document: any,\n readonly focusContext: FocusManager.Context) {\n super();\n // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642\n this.document = document as Document;\n\n // TODO: Make this also track the current enabled/disabled state.\n const { when } = Dsl.disposeWith(this);\n when.valueOf(this.focusContext.focused).changes((focused) => {\n if (focused && !this.alreadyHasFocus()) {\n this.tryAndFocus();\n }\n }, { initialValue: 'triggerChangeUnlessNil' });\n }\n\n onFocusIn() {\n this.focusContext.notifyFocusIn();\n }\n\n onFocusOut() {\n this.focusContext.notifyFocusOut();\n }\n\n // Hook method for debugging via tracing.\n alreadyHasFocus() {\n return this.isElementFocused(this.focusTarget);\n }\n\n // Hook method for debugging via tracing.\n isElementFocused(element: Element): boolean {\n return this.document.activeElement === element;\n }\n\n tryAndFocus(retries: number = 5) {\n if (this.modelShouldStillHaveFocus() && this.canFocus()) {\n if (!this.alreadyHasFocus()) {\n this.focusTarget.focus();\n }\n // if we didn't get the focus we try again later.\n if (!this.alreadyHasFocus()) {\n Logger.get(this).log(`focus failed, trying ${retries} more times`);\n if (retries > 0) {\n // try again on the next paint\n // TODO: is there an angular way of doing this without calling a window function.\n requestAnimationFrame(() => {\n this.tryAndFocus(retries - 1);\n });\n } else {\n Logger.get(this).warn(`Tried to focus but gave up as the component wasn't enabled or visible.`);\n }\n }\n }\n }\n\n get focusTarget(): HTMLElement {\n return this.focusTargetElement;\n }\n\n // Hook method for debugging via tracing.\n modelShouldStillHaveFocus() {\n return this.focusContext.focused.value;\n }\n\n // Hook method for debugging via tracing.\n canFocus(): boolean {\n const dimension = this.focusTarget.getBoundingClientRect();\n const hasSize = dimension.height >= 0 && dimension.height >= 0;\n // tslint:disable-next-line:no-string-literal\n return hasSize && !this.focusTarget['disabled'];\n }\n}\n\nexport namespace FocusBinding {\n\n @Injectable({\n providedIn: 'root'\n })\n export class Factory {\n\n private document: Document;\n\n constructor(@Inject(NgZone) private readonly ngZone: NgZone, @Inject(DOCUMENT) document: any) {\n // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642\n this.document = document as Document;\n }\n\n createBinding(el: ElementRef, focusContext: FocusManager.Context): FocusBinding {\n return new FocusBinding(el.nativeElement, this.ngZone, this.document, focusContext);\n }\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"FocusBinding":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":4,"character":34},"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":9,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":9,"character":22}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":10,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":10,"character":22}]}],null],"parameters":[{"__symbolic":"error","message":"Could not resolve type","line":8,"character":51,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":9,"character":55},{"__symbolic":"reference","name":"any"},{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"FocusManager","line":11,"character":37},"member":"Context"}]}],"onFocusIn":[{"__symbolic":"method"}],"onFocusOut":[{"__symbolic":"method"}],"alreadyHasFocus":[{"__symbolic":"method"}],"isElementFocused":[{"__symbolic":"method"}],"tryAndFocus":[{"__symbolic":"method"}],"modelShouldStillHaveFocus":[{"__symbolic":"method"}],"canFocus":[{"__symbolic":"method"}]}}}}]
@@ -4,4 +4,5 @@
4
4
  export * from "./command.directive";
5
5
  export * from "./directives.module";
6
6
  export * from "./focus-binding.directive";
7
+ export * from "./focus-binding";
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./command.directive\";\nexport * from \"./directives.module\";\nexport * from \"./focus-binding.directive\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./command.directive\";\nexport * from \"./directives.module\";\nexport * from \"./focus-binding.directive\";\nexport * from \"./focus-binding\";\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./command.directive"},{"from":"./directives.module"},{"from":"./focus-binding.directive"}]}]
1
+ [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./command.directive"},{"from":"./directives.module"},{"from":"./focus-binding.directive"},{"from":"./focus-binding"}]}]
@@ -45,7 +45,7 @@ let PlaceRouter = class PlaceRouter extends GarbageCollector {
45
45
  this.navigationSessionName = chain(this.navigationSessionModel)
46
46
  .pluck('name')
47
47
  .otherwise(idleStateName);
48
- DebugContext.tag(this._activeVisits, "PlaceRouter.activeVisits");
48
+ DebugContext.tag(this._activeVisits, 'PlaceRouter.activeVisits');
49
49
  this.activeVisitsByPlaceDefinition = chain(this._activeVisits).indexBy('placeDefinition');
50
50
  // TODO: make setup the callbacks in during module initiation to make this testable.
51
51
  angularRouter.events.subscribe(event => {
@@ -1 +1 @@
1
- {"version":3,"file":"place-router.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place-router.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,eAAe,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O,qBAAqB,CAAC,KAAY;QACxC,MAAM,GAAG,GAAG,KAAK,CAAC,eAAe,CAAC;QAClC,OAAO,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;YACzB,CAAC,GAAG,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC1E,CAAC,GAAG,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7C,CAAC;CAEF,CAAA;;YAhR6C,MAAM;YACJ,QAAQ;YACL,kBAAkB;YAC1B,UAAU;YACR,YAAY;;;AA4KvD;IADC,KAAK,EAAE;;qCACgC,KAAK,EAAQ,KAAK;;0DAWzD;AAxMU,WAAW;IAHvB,UAAU,CAAC;QACV,UAAU,EAAE,MAAM;KACnB,CAAC;qCAc4C,MAAM;QACJ,QAAQ;QACL,kBAAkB;QAC1B,UAAU;QACR,YAAY;GAjB5C,WAAW,CA6RvB;SA7RY,WAAW","sourcesContent":["import { Location } from '@angular/common';\nimport { DEBUG } from '@angular/compiler-cli/ngcc/src/logging/console_logger';\nimport { Injectable } from '@angular/core';\nimport {\n ActivatedRoute,\n NavigationCancel,\n NavigationEnd,\n NavigationError,\n NavigationExtras,\n NavigationStart,\n Router\n} from '@angular/router';\nimport {\n assert, DebugContext,\n Dsl,\n GarbageCollector,\n HasOneIndexChain,\n lang,\n ListModel,\n Logger,\n MutableListModel,\n MutableValueModel,\n Trace, TransactionObserver,\n ValueModelChain\n} from '@coolon/pectin';\nimport { InteractionService } from '../interaction/services/interaction.service';\nimport { InteractionServiceRoutingAdapter } from '../interaction/services/interaction-service-routing-adapter';\nimport { NavigatingDuringInteraction } from './navigation/session/interactions/navigating-during-interaction';\nimport { PopStateDuringInteractionNavigation } from './navigation/session/interactions/pop-state-during-interaction-navigation';\nimport { SynchroniseInteractionContextIdsWithRoute } from './navigation/session/interactions/synchronise-interaction-context-ids-with-route';\nimport { Navigating } from './navigation/session/navigating';\nimport { NavigationContext } from './navigation/session/navigation-context';\nimport { NavigationSession } from './navigation/session/navigation-session';\nimport { PopStateNavigation } from './navigation/session/pop-state-navigation';\nimport { PlaceHistory } from './place-history';\nimport { UrlService } from './url-service';\nimport { UrlSnapshot } from './url-snapshot';\nimport { Visit } from './visit';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PlaceRouter extends GarbageCollector {\n\n readonly navigationSessionModel = new MutableValueModel<NavigationSession>();\n readonly navigationInProgress: ValueModelChain<boolean>;\n readonly navigationSessionName: ValueModelChain<string>; // used by tests\n\n private readonly navigationContext: NavigationContext.Impl;\n\n private readonly _activeVisits = new MutableListModel<Visit>();\n readonly activeVisitsByPlaceDefinition: HasOneIndexChain<'placeDefinition', Visit>;\n private routerInteractionAdapter: InteractionServiceRoutingAdapter;\n private sessionFinishedJobs: (() => void)[] = [];\n\n constructor(private readonly angularRouter: Router,\n private readonly angularLocation: Location,\n private readonly interactionService: InteractionService,\n private readonly urlService: UrlService,\n private readonly placeHistory: PlaceHistory) {\n super();\n\n this.routerInteractionAdapter = interactionService.registerPlaceRouter(this);\n\n // TODO: Make this an interface and use 'this' instead.\n this.navigationContext = new NavigationContext.Impl(\n this.urlService,\n this.routerInteractionAdapter,\n (urlSnapshot: UrlSnapshot, options: { replaceUrl: boolean }) => {\n return this.navigateByUrl(urlSnapshot, options);\n },\n state => {\n this.transitionTo(state);\n },\n visits => {\n this.routingSessionFinished(visits);\n });\n\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.navigationInProgress = chain(this.navigationSessionModel).isNotNil();\n\n const idleStateName = chain(this.interactionService.active).map(active => active ? 'IdleDuringInteraction' : 'Idle');\n this.navigationSessionName = chain(this.navigationSessionModel)\n .pluck('name')\n .otherwise(idleStateName);\n\n DebugContext.tag(this._activeVisits, \"PlaceRouter.activeVisits\");\n this.activeVisitsByPlaceDefinition = chain(this._activeVisits).indexBy('placeDefinition');\n\n // TODO: make setup the callbacks in during module initiation to make this testable.\n angularRouter.events.subscribe(event => {\n // Routing event sequence\n // ======================\n // NavigationStart -> .... -> NavigationCancel --> redirect, go around again in the same session\n // NavigationStart -> .... -> NavigationEnd --> navigation complete, end session.\n // NavigationStart -> .... -> NavigationError --> navigation aborted, end session.\n // =======================\n if (event instanceof NavigationStart) {\n // console.log(`---> NavigationStart[${event.id}]: ${event.url} (${event.navigationTrigger})`);\n if (event.navigationTrigger === 'popstate') {\n this.onPopState(event);\n } else {\n this.onRouterStarted(event);\n }\n // console.log(`<--- NavigationStart[${event.id}]: ${event.url} (${event.navigationTrigger})`);\n }\n if (event instanceof NavigationEnd) {\n // console.log(`---> NavigationEnd[${event.id}]: ${event.url}`);\n this.onRouterEnd(event);\n // console.log(`<--- NavigationEnd[${event.id}]: ${event.url}`);\n }\n if (event instanceof NavigationError) {\n // console.log(`---> NavigationError[${event.id}]: ${event.url}`);\n this.onRouterError(event);\n // console.log(`<--- NavigationError[${event.id}]: ${event.url}`);\n }\n if (event instanceof NavigationCancel) {\n // console.log(`---> NavigationCancel[${event.id}]: ${event.url}`);\n this.onRouterCancelled(event);\n // console.log(`<--- NavigationCancel[${event.id}]: ${event.url}`);\n }\n });\n\n // The router needs to know about url changes and in some cases they are the only way the router can know if\n // the back button was clicked.\n angularLocation.onUrlChange(url => this.onUrlChanged(url));\n\n }\n\n get navigationSession() {\n return this.navigationSessionModel.value;\n }\n\n get currentSession() {\n return this.navigationSessionModel.value;\n }\n\n // @Trace()\n onPopState(event: NavigationStart) {\n assert.isTruthy(event.navigationTrigger === 'popstate');\n if (this.currentSession) {\n this.currentSession.onPopState(event);\n } else {\n const poppedHistoryUrl = event.url;\n const currentRouterUrl = this.urlService.getCurrentRouterUrl();\n const session = this.interactionService.isActive() ?\n new PopStateDuringInteractionNavigation(this.navigationContext, currentRouterUrl, poppedHistoryUrl) :\n new PopStateNavigation(this.navigationContext, currentRouterUrl, poppedHistoryUrl);\n this.transitionTo(session);\n }\n }\n\n // @Trace()\n onRouterStarted(event: NavigationStart) {\n assert.isFalsey(event.navigationTrigger === 'popstate');\n const inInteraction = this.interactionService.isActive();\n if (this.currentSession) {\n this.currentSession.onRouterStarted(event);\n } else {\n this.transitionTo(this.createNavigationSession(this.urlService.getCurrentRouterUrl()));\n }\n }\n\n // @Trace()\n onUrlChanged(newUrl: string) {\n // the back button can trigger a url change without a navigation session in progress so we\n // console.log(`---> Url Changed ${newUrl}`);\n if (this.currentSession) {\n this.currentSession.onUrlChange(newUrl);\n } else {\n console.log('FYI: url changed without a navigation session in progress');\n }\n // console.log(`<--- Url Changed`);\n }\n\n // @Trace()\n onRouterCancelled(event: NavigationCancel) {\n this.currentSession.onRouterCancelled(event);\n }\n\n // @Trace()\n onRouterError(event: NavigationError) {\n this.currentSession.onRouterError(event);\n }\n\n // @Trace()\n onRouterEnd(event: NavigationEnd) {\n this.currentSession.onRouterEnd(event);\n }\n\n navigate(visit: Visit, options?: { relativeTo: ActivatedRoute }) {\n return this.doNavigation(visit, async router => {\n const commands = [\n visit.placeDefinition.path,\n ...this.createRouteParameters(visit)\n ];\n await this.angularRouter.navigate(commands, {\n relativeTo: options ? options.relativeTo : null\n });\n });\n }\n\n // @Trace()\n async doNavigation(visit: Visit, runNavigationCommands: (router: Router) => any) {\n if (this.navigationInProgress.value) {\n lang.illegalState('Navigation already in progress');\n }\n const navigation = this.createNavigationSession(this.urlService.getCurrentRouterUrl());\n navigation.storeVisit(visit);\n this.transitionTo(navigation);\n try {\n await runNavigationCommands(this.angularRouter);\n } finally {\n // Check if the router has finished (in the case where no router change required) and we're still in a\n // transient state and finish of the transition.\n if (!this.angularRouter.getCurrentNavigation() && this.currentSession) {\n this.currentSession.onRouterEnd(new NavigationEnd(-1, '', ''));\n }\n }\n }\n\n navigateByUrl(urlSnapshot: UrlSnapshot, navigationExtras?: NavigationExtras) {\n // console.log(`### navigationByUrl -> ${urlSnapshot.urlTree.toString()}`);\n return this.angularRouter.navigateByUrl(urlSnapshot.urlTree, navigationExtras);\n }\n\n get activeVisits(): ListModel<Visit> {\n return this._activeVisits.readonly;\n }\n\n @Trace()\n async pushVisitChangesToRoute(previous: Visit, next: Visit): Promise<void> {\n this.placeHistory.updateVisit(next);\n\n // FIXME: no route id -> route id duplicates route parameters\n if (next.hasRoutingChangedFrom(previous)) {\n return this.doNavigation(next, router => {\n const urlSnapshot = this.urlService.parseUrl(this.angularRouter.routerState.snapshot.url).updateVisitSegments(next);\n // console.log('### Push Changes to route Redirect', { commands: urlSnapshot.url });\n return this.navigateByUrl(urlSnapshot);\n });\n }\n }\n\n\n private createNavigationSession(currentRouterUrl: string): NavigationSession {\n const inInteraction = this.interactionService.isActive();\n return inInteraction ?\n new NavigatingDuringInteraction(this.navigationContext, currentRouterUrl) :\n new Navigating(this.navigationContext, currentRouterUrl);\n }\n\n // @Trace()\n protected transitionTo(next: NavigationSession) {\n const previous = this.navigationSessionModel.value;\n if (!previous) {\n this.placeHistory.notifyNavigationStarted();\n }\n assert.isTruthy(next !== previous);\n Logger.get(this).info(`### Router State Transition: ${previous ? previous.toString() : 'null'} -> ${next.toString()}`);\n this.navigationSessionModel.value = next;\n if (!!previous) {\n previous.dispose();\n }\n next.notifyActive();\n }\n\n // @Trace()\n private routingSessionFinished(visits: Visit[]) {\n if (visits && visits.length > 0) {\n assert.isTruthy(this.navigationInProgress.value);\n this.placeHistory.notifyNavigationFinished(visits)\n // We update the active visits before we finish the session so the\n // place outlets can ignore the incoming changes until things are\n // settled. TODO: can we removed the event'ness here and just do a push?\n this._activeVisits.value = visits;\n }\n const session = this.currentSession;\n session.dispose();\n this.navigationSessionModel.value = null;\n console.log(`### Router Session Finished (was ${session.toString()})`);\n this.sessionFinishedJobs.forEach(job => job());\n this.sessionFinishedJobs = [];\n }\n\n private runAfterRoutingSessionFinishes(func: () => void) {\n assert.isTruthy(this.navigationInProgress);\n this.sessionFinishedJobs.push(func);\n }\n\n\n /**\n * Sync's the current interaction state with the URL. We need to push something in the URL in order\n * to be able to capture the back button on the first page. If we don't then the back click will exit\n * the app directly and we don't get to ask.\n */\n // @Trace()\n syncInteractionContextIdsWithRouter(): Promise<unknown> {\n if (this.navigationSession) {\n // console.log(`Navigation active -> ${this.navigationSession.toString()}, sync delayed until finished.`);\n const session = this.navigationSession;\n return new Promise((resolve, reject) => {\n this.runAfterRoutingSessionFinishes(() => {\n this.runAfterRoutingSessionFinishes(resolve);\n const syncSession = new SynchroniseInteractionContextIdsWithRoute(this.navigationContext, this.urlService.getCurrentRouterUrl(), false);\n this.transitionTo(syncSession);\n });\n });\n } else {\n return new Promise<unknown>(((resolve, reject) => {\n // console.log(`No navigation in progress, starting synchronisation job`);\n this.runAfterRoutingSessionFinishes(resolve);\n const session = new SynchroniseInteractionContextIdsWithRoute(this.navigationContext, this.urlService.getCurrentRouterUrl(), false);\n this.transitionTo(session);\n }))\n\n }\n }\n\n\n private createRouteParameters(visit: Visit) {\n const def = visit.placeDefinition;\n return visit.hasRouteId() ?\n [def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :\n [def.getFormattedRouteParameters(visit)];\n }\n\n}\n\nexport namespace NavigationStateMachine {\n export type VisitsUpdatedCallback = (visits: Visit[]) => void;\n}\n"]}
1
+ {"version":3,"file":"place-router.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/place-router.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,MAAM,EACP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,MAAM,EACN,YAAY,EACZ,GAAG,EACH,gBAAgB,EAChB,IAAI,EAEJ,MAAM,EACN,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,EAEN,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,6C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YAC1E,CAAC,GAAG,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7C,CAAC;CAEF,CAAA;;YAhR6C,MAAM;YACJ,QAAQ;YACL,kBAAkB;YAC1B,UAAU;YACR,YAAY;;;AA4KvD;IADC,KAAK,EAAE;;qCACgC,KAAK,EAAQ,KAAK;;0DAWzD;AAxMU,WAAW;IAHvB,UAAU,CAAC;QACV,UAAU,EAAE,MAAM;KACnB,CAAC;qCAc4C,MAAM;QACJ,QAAQ;QACL,kBAAkB;QAC1B,UAAU;QACR,YAAY;GAjB5C,WAAW,CA6RvB;SA7RY,WAAW","sourcesContent":["import { Location } from '@angular/common';\nimport { Injectable } from '@angular/core';\nimport {\n ActivatedRoute,\n NavigationCancel,\n NavigationEnd,\n NavigationError,\n NavigationExtras,\n NavigationStart,\n Router\n} from '@angular/router';\nimport {\n assert,\n DebugContext,\n Dsl,\n GarbageCollector,\n lang,\n ListModel,\n Logger, MapModelChain,\n MutableListModel,\n MutableValueModel,\n Trace,\n ValueModelChain\n} from '@coolon/pectin';\nimport { InteractionServiceRoutingAdapter } from '../interaction/services/interaction-service-routing-adapter';\nimport { InteractionService } from '../interaction/services/interaction.service';\nimport { NavigatingDuringInteraction } from './navigation/session/interactions/navigating-during-interaction';\nimport { PopStateDuringInteractionNavigation } from './navigation/session/interactions/pop-state-during-interaction-navigation';\nimport { SynchroniseInteractionContextIdsWithRoute } from './navigation/session/interactions/synchronise-interaction-context-ids-with-route';\nimport { Navigating } from './navigation/session/navigating';\nimport { NavigationContext } from './navigation/session/navigation-context';\nimport { NavigationSession } from './navigation/session/navigation-session';\nimport { PopStateNavigation } from './navigation/session/pop-state-navigation';\nimport { PlaceDefinition } from './place-definition';\nimport { PlaceHistory } from './place-history';\nimport { UrlService } from './url-service';\nimport { UrlSnapshot } from './url-snapshot';\nimport { Visit } from './visit';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PlaceRouter extends GarbageCollector {\n\n readonly navigationSessionModel = new MutableValueModel<NavigationSession>();\n readonly navigationInProgress: ValueModelChain<boolean>;\n readonly navigationSessionName: ValueModelChain<string>; // used by tests\n\n private readonly navigationContext: NavigationContext.Impl;\n\n private readonly _activeVisits = new MutableListModel<Visit>();\n readonly activeVisitsByPlaceDefinition: MapModelChain<PlaceDefinition, Visit>;\n private routerInteractionAdapter: InteractionServiceRoutingAdapter;\n private sessionFinishedJobs: (() => void)[] = [];\n\n constructor(private readonly angularRouter: Router,\n private readonly angularLocation: Location,\n private readonly interactionService: InteractionService,\n private readonly urlService: UrlService,\n private readonly placeHistory: PlaceHistory) {\n super();\n\n this.routerInteractionAdapter = interactionService.registerPlaceRouter(this);\n\n // TODO: Make this an interface and use 'this' instead.\n this.navigationContext = new NavigationContext.Impl(\n this.urlService,\n this.routerInteractionAdapter,\n (urlSnapshot: UrlSnapshot, options: { replaceUrl: boolean }) => {\n return this.navigateByUrl(urlSnapshot, options);\n },\n state => {\n this.transitionTo(state);\n },\n visits => {\n this.routingSessionFinished(visits);\n });\n\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.navigationInProgress = chain(this.navigationSessionModel).isNotNil();\n\n const idleStateName = chain(this.interactionService.active).map(active => active ? 'IdleDuringInteraction' : 'Idle');\n this.navigationSessionName = chain(this.navigationSessionModel)\n .pluck('name')\n .otherwise(idleStateName);\n\n DebugContext.tag(this._activeVisits, 'PlaceRouter.activeVisits');\n this.activeVisitsByPlaceDefinition = chain(this._activeVisits).indexBy('placeDefinition');\n\n // TODO: make setup the callbacks in during module initiation to make this testable.\n angularRouter.events.subscribe(event => {\n // Routing event sequence\n // ======================\n // NavigationStart -> .... -> NavigationCancel --> redirect, go around again in the same session\n // NavigationStart -> .... -> NavigationEnd --> navigation complete, end session.\n // NavigationStart -> .... -> NavigationError --> navigation aborted, end session.\n // =======================\n if (event instanceof NavigationStart) {\n // console.log(`---> NavigationStart[${event.id}]: ${event.url} (${event.navigationTrigger})`);\n if (event.navigationTrigger === 'popstate') {\n this.onPopState(event);\n } else {\n this.onRouterStarted(event);\n }\n // console.log(`<--- NavigationStart[${event.id}]: ${event.url} (${event.navigationTrigger})`);\n }\n if (event instanceof NavigationEnd) {\n // console.log(`---> NavigationEnd[${event.id}]: ${event.url}`);\n this.onRouterEnd(event);\n // console.log(`<--- NavigationEnd[${event.id}]: ${event.url}`);\n }\n if (event instanceof NavigationError) {\n // console.log(`---> NavigationError[${event.id}]: ${event.url}`);\n this.onRouterError(event);\n // console.log(`<--- NavigationError[${event.id}]: ${event.url}`);\n }\n if (event instanceof NavigationCancel) {\n // console.log(`---> NavigationCancel[${event.id}]: ${event.url}`);\n this.onRouterCancelled(event);\n // console.log(`<--- NavigationCancel[${event.id}]: ${event.url}`);\n }\n });\n\n // The router needs to know about url changes and in some cases they are the only way the router can know if\n // the back button was clicked.\n angularLocation.onUrlChange(url => this.onUrlChanged(url));\n\n }\n\n get navigationSession() {\n return this.navigationSessionModel.value;\n }\n\n get currentSession() {\n return this.navigationSessionModel.value;\n }\n\n // @Trace()\n onPopState(event: NavigationStart) {\n assert.isTruthy(event.navigationTrigger === 'popstate');\n if (this.currentSession) {\n this.currentSession.onPopState(event);\n } else {\n const poppedHistoryUrl = event.url;\n const currentRouterUrl = this.urlService.getCurrentRouterUrl();\n const session = this.interactionService.isActive() ?\n new PopStateDuringInteractionNavigation(this.navigationContext, currentRouterUrl, poppedHistoryUrl) :\n new PopStateNavigation(this.navigationContext, currentRouterUrl, poppedHistoryUrl);\n this.transitionTo(session);\n }\n }\n\n // @Trace()\n onRouterStarted(event: NavigationStart) {\n assert.isFalsey(event.navigationTrigger === 'popstate');\n const inInteraction = this.interactionService.isActive();\n if (this.currentSession) {\n this.currentSession.onRouterStarted(event);\n } else {\n this.transitionTo(this.createNavigationSession(this.urlService.getCurrentRouterUrl()));\n }\n }\n\n // @Trace()\n onUrlChanged(newUrl: string) {\n // the back button can trigger a url change without a navigation session in progress so we\n // console.log(`---> Url Changed ${newUrl}`);\n if (this.currentSession) {\n this.currentSession.onUrlChange(newUrl);\n } else {\n console.log('FYI: url changed without a navigation session in progress');\n }\n // console.log(`<--- Url Changed`);\n }\n\n // @Trace()\n onRouterCancelled(event: NavigationCancel) {\n this.currentSession.onRouterCancelled(event);\n }\n\n // @Trace()\n onRouterError(event: NavigationError) {\n this.currentSession.onRouterError(event);\n }\n\n // @Trace()\n onRouterEnd(event: NavigationEnd) {\n this.currentSession.onRouterEnd(event);\n }\n\n navigate(visit: Visit, options?: { relativeTo: ActivatedRoute }) {\n return this.doNavigation(visit, async router => {\n const commands = [\n visit.placeDefinition.path,\n ...this.createRouteParameters(visit)\n ];\n await this.angularRouter.navigate(commands, {\n relativeTo: options ? options.relativeTo : null\n });\n });\n }\n\n // @Trace()\n async doNavigation(visit: Visit, runNavigationCommands: (router: Router) => any) {\n if (this.navigationInProgress.value) {\n lang.illegalState('Navigation already in progress');\n }\n const navigation = this.createNavigationSession(this.urlService.getCurrentRouterUrl());\n navigation.storeVisit(visit);\n this.transitionTo(navigation);\n try {\n await runNavigationCommands(this.angularRouter);\n } finally {\n // Check if the router has finished (in the case where no router change required) and we're still in a\n // transient state and finish of the transition.\n if (!this.angularRouter.getCurrentNavigation() && this.currentSession) {\n this.currentSession.onRouterEnd(new NavigationEnd(-1, '', ''));\n }\n }\n }\n\n navigateByUrl(urlSnapshot: UrlSnapshot, navigationExtras?: NavigationExtras) {\n // console.log(`### navigationByUrl -> ${urlSnapshot.urlTree.toString()}`);\n return this.angularRouter.navigateByUrl(urlSnapshot.urlTree, navigationExtras);\n }\n\n get activeVisits(): ListModel<Visit> {\n return this._activeVisits.readonly;\n }\n\n @Trace()\n async pushVisitChangesToRoute(previous: Visit, next: Visit): Promise<void> {\n this.placeHistory.updateVisit(next);\n\n // FIXME: no route id -> route id duplicates route parameters\n if (next.hasRoutingChangedFrom(previous)) {\n return this.doNavigation(next, router => {\n const urlSnapshot = this.urlService.parseUrl(this.angularRouter.routerState.snapshot.url).updateVisitSegments(next);\n // console.log('### Push Changes to route Redirect', { commands: urlSnapshot.url });\n return this.navigateByUrl(urlSnapshot);\n });\n }\n }\n\n\n private createNavigationSession(currentRouterUrl: string): NavigationSession {\n const inInteraction = this.interactionService.isActive();\n return inInteraction ?\n new NavigatingDuringInteraction(this.navigationContext, currentRouterUrl) :\n new Navigating(this.navigationContext, currentRouterUrl);\n }\n\n // @Trace()\n protected transitionTo(next: NavigationSession) {\n const previous = this.navigationSessionModel.value;\n if (!previous) {\n this.placeHistory.notifyNavigationStarted();\n }\n assert.isTruthy(next !== previous);\n Logger.get(this).info(`### Router State Transition: ${previous ? previous.toString() : 'null'} -> ${next.toString()}`);\n this.navigationSessionModel.value = next;\n if (!!previous) {\n previous.dispose();\n }\n next.notifyActive();\n }\n\n // @Trace()\n private routingSessionFinished(visits: Visit[]) {\n if (visits && visits.length > 0) {\n assert.isTruthy(this.navigationInProgress.value);\n this.placeHistory.notifyNavigationFinished(visits);\n // We update the active visits before we finish the session so the\n // place outlets can ignore the incoming changes until things are\n // settled. TODO: can we removed the event'ness here and just do a push?\n this._activeVisits.value = visits;\n }\n const session = this.currentSession;\n session.dispose();\n this.navigationSessionModel.value = null;\n console.log(`### Router Session Finished (was ${session.toString()})`);\n this.sessionFinishedJobs.forEach(job => job());\n this.sessionFinishedJobs = [];\n }\n\n private runAfterRoutingSessionFinishes(func: () => void) {\n assert.isTruthy(this.navigationInProgress);\n this.sessionFinishedJobs.push(func);\n }\n\n\n /**\n * Sync's the current interaction state with the URL. We need to push something in the URL in order\n * to be able to capture the back button on the first page. If we don't then the back click will exit\n * the app directly and we don't get to ask.\n */\n // @Trace()\n syncInteractionContextIdsWithRouter(): Promise<unknown> {\n if (this.navigationSession) {\n // console.log(`Navigation active -> ${this.navigationSession.toString()}, sync delayed until finished.`);\n const session = this.navigationSession;\n return new Promise((resolve, reject) => {\n this.runAfterRoutingSessionFinishes(() => {\n this.runAfterRoutingSessionFinishes(resolve);\n const syncSession = new SynchroniseInteractionContextIdsWithRoute(this.navigationContext, this.urlService.getCurrentRouterUrl(), false);\n this.transitionTo(syncSession);\n });\n });\n } else {\n return new Promise<unknown>(((resolve, reject) => {\n // console.log(`No navigation in progress, starting synchronisation job`);\n this.runAfterRoutingSessionFinishes(resolve);\n const session = new SynchroniseInteractionContextIdsWithRoute(this.navigationContext, this.urlService.getCurrentRouterUrl(), false);\n this.transitionTo(session);\n }));\n\n }\n }\n\n\n private createRouteParameters(visit: Visit) {\n const def = visit.placeDefinition;\n return visit.hasRouteId() ?\n [def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :\n [def.getFormattedRouteParameters(visit)];\n }\n\n}\n\nexport namespace NavigationStateMachine {\n export type VisitsUpdatedCallback = (visits: Visit[]) => void;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Binding, DebugContext, Logger, MutableListModel, MutableValueModel } from '@coolon/pectin';
1
+ import { Binding, DebugContext, Functions, Logger, MutableListModel, MutableValueModel } from '@coolon/pectin';
2
2
  import { Klass, Opts } from '@coolon/typescript-utilities';
3
3
  import { ROUTE_PARAMETER_LIST_KEY } from '../place-component';
4
4
  import { ParameterDefinition } from './parameter-definition.class';
@@ -21,7 +21,10 @@ function installMechanics(prototype, propertyKey, backingModel, tagPrefix, isEmp
21
21
  mechanics.binding.dispose();
22
22
  }
23
23
  if (userModel) {
24
- mechanics.binding = new Binding(mechanics.backingModel, userModel);
24
+ mechanics.binding = new Binding(mechanics.backingModel, userModel, {
25
+ toLeft: Functions.identity,
26
+ toRight: Functions.identity
27
+ });
25
28
  if (isEmpty(userModel)) {
26
29
  // console.log(`Push visit to model for ${tag}`, {value: mechanics.backingModel.value});
27
30
  mechanics.binding.writeRight(); // push the visit into the user model;
@@ -40,7 +43,7 @@ export function RouteId(type, options) {
40
43
  return (prototype, propertyKey) => {
41
44
  const param = new ParameterDefinition.RouteId(propertyKey.toString(), options, type);
42
45
  Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
43
- installMechanics(prototype, propertyKey, new MutableValueModel(), "@RouteId", m => m.query().isNil());
46
+ installMechanics(prototype, propertyKey, new MutableValueModel(), '@RouteId', m => m.query().isNil());
44
47
  };
45
48
  }
46
49
  export function VisitParameter(options) {
@@ -48,7 +51,7 @@ export function VisitParameter(options) {
48
51
  return (prototype, propertyKey) => {
49
52
  const param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
50
53
  Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
51
- installMechanics(prototype, propertyKey, new MutableValueModel(), "@VisitParameter", m => m.query().isNil());
54
+ installMechanics(prototype, propertyKey, new MutableValueModel(), '@VisitParameter', m => m.query().isNil());
52
55
  };
53
56
  }
54
57
  export function VisitParameterList(options) {
@@ -56,7 +59,7 @@ export function VisitParameterList(options) {
56
59
  return (prototype, propertyKey) => {
57
60
  const param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
58
61
  Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
59
- installMechanics(prototype, propertyKey, new MutableListModel(), "@VisitParameterList", m => m.query().isEmpty());
62
+ installMechanics(prototype, propertyKey, new MutableListModel(), '@VisitParameterList', m => m.query().isEmpty());
60
63
  };
61
64
  }
62
65
  //# sourceMappingURL=parameter-decorators.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parameter-decorators.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/parameter-decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,YAAY,EAEZ,MAAM,EACN,gBAAgB,EAChB,iBAAiB,EAElB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AA8BnE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EAAE,WAA4B,EAAE,EAAE;QACzD,MAAM,KAAK,GAAG,IAAI,mBAAmB,CAAC,cAAc,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;QAC5H,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QAC3E,gBAAgB,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,gBAAgB,EAAK,EAAE,qBAAqB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IACvH,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {\n Binding,\n DebugContext,\n HasValue,\n Logger,\n MutableListModel,\n MutableValueModel,\n TrackExternal\n} from '@coolon/pectin';\nimport { Klass, Opts } from '@coolon/typescript-utilities';\nimport { ROUTE_PARAMETER_LIST_KEY } from '../place-component';\nimport { Formatter } from './formatter';\nimport { ParameterDefinition } from './parameter-definition.class';\n\n\nexport interface RouteIdOptions<T> {\n as?: string;\n optional?: boolean;\n remember?: boolean;\n defaultValue?: T;\n // sanitiser?: Constructable<ParameterSanitiser<T>> | ParameterSanitiser<T>;\n}\n\nexport interface RouteParameterOptions<T> {\n as?: string;\n optional?: boolean;\n remember?: boolean;\n defaultValue?: T;\n storeInUrl?: Formatter<T>\n // sanitiser?: Constructable<ParameterSanitiser<T>> | ParameterSanitiser<T>;\n}\n\nexport interface RouteListParameterOptions<T> {\n as?: string;\n optional?: boolean;\n remember?: boolean;\n defaultValue?: T[];\n storeInUrl?: Formatter<T>\n // sanitiser?: Constructable<ParameterSanitiser<T[]>> | ParameterSanitiser<T[]>;\n}\n\n\nfunction installMechanics<M extends HasValue<any>>(prototype: Object, propertyKey: string | symbol, backingModel: M, tagPrefix: string, isEmpty: (mode: M) => boolean) {\n const mechanics = {\n backingModel: backingModel,\n binding: null as Binding<any, any>\n };\n const tag = `${tagPrefix}(${prototype.constructor.name}.${propertyKey.toString()})`;\n DebugContext.get(mechanics.backingModel).tag(tag);\n Logger.get(mechanics.backingModel).tag(tag);\n Object.defineProperty(prototype, propertyKey, {\n get: function() {\n return mechanics.backingModel;\n },\n set: function(userModel: M) {\n // This handles the scenario where we want to push an existing value model (such as a form model)\n // to and from the route.\n if (mechanics.binding) {\n mechanics.binding.dispose();\n }\n if (userModel) {\n mechanics.binding = new Binding(mechanics.backingModel, userModel);\n if (isEmpty(userModel)) {\n // console.log(`Push visit to model for ${tag}`, {value: mechanics.backingModel.value});\n mechanics.binding.writeRight(); // push the visit into the user model;\n } else {\n if (!isEmpty(mechanics.backingModel)) {\n console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');\n }\n mechanics.binding.writeLeft(); // push the user model into the visit\n }\n }\n }\n });\n}\n\nexport function RouteId<T extends string | number>(type: Formatter<T>, options?: RouteIdOptions<T>): PropertyDecorator {\n return (prototype: Object, propertyKey: string | symbol) => {\n const param = new ParameterDefinition.RouteId(propertyKey.toString(), options, type);\n Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);\n installMechanics(prototype, propertyKey, new MutableValueModel<T>(), \"@RouteId\", m => m.query().isNil());\n };\n}\n\nexport function VisitParameter<T>(options?: RouteParameterOptions<T>): PropertyDecorator {\n const opts = Opts.get(options);\n return (prototype: Object, propertyKey: string | symbol) => {\n const param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));\n Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);\n installMechanics(prototype, propertyKey, new MutableValueModel<T>(), \"@VisitParameter\", m => m.query().isNil());\n };\n}\n\nexport function VisitParameterList<E>(options?: RouteListParameterOptions<E>): PropertyDecorator {\n const opts = Opts.get(options);\n return (prototype: Object, propertyKey: string | symbol) => {\n const param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));\n Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);\n installMechanics(prototype, propertyKey, new MutableListModel<E>(), \"@VisitParameterList\", m => m.query().isEmpty());\n };\n}\n"]}
1
+ {"version":3,"file":"parameter-decorators.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/route/parameter-decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,YAAY,EACZ,SAAS,EAET,MAAM,EACN,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AA8BnE,SAAS,gBAAgB,CAA0B,SAAiB,EAAE,WAA4B,EAAE,YAAe,EAAE,SAAiB,EAAE,OAA6B;IACnK,MAAM,SAAS,GAAG;QAChB,YAAY,EAAE,YAAY;QAC1B,OAAO,EAAE,IAAyB;KACnC,CAAC;IACF,MAAM,GAAG,GAAG,GAAG,SAAS,IAAI,SAAS,CAAC,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,QAAQ,EAAE,GAAG,CAAC;IACpF,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5C,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,WAAW,EAAE;QAC5C,GAAG,EAAE;YACH,OAAO,SAAS,CAAC,YAAY,CAAC;QAChC,CAAC;QACD,GAAG,EAAE,UAAS,SAAY;YACxB,iGAAiG;YACjG,yBAAyB;YACzB,IAAI,SAAS,CAA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Klass, Opts } from '@coolon/typescript-utilities';\nimport { ROUTE_PARAMETER_LIST_KEY } from '../place-component';\nimport { Formatter } from './formatter';\nimport { ParameterDefinition } from './parameter-definition.class';\n\n\nexport interface RouteIdOptions<T> {\n as?: string;\n optional?: boolean;\n remember?: boolean;\n defaultValue?: T;\n // sanitiser?: Constructable<ParameterSanitiser<T>> | ParameterSanitiser<T>;\n}\n\nexport interface RouteParameterOptions<T> {\n as?: string;\n optional?: boolean;\n remember?: boolean;\n defaultValue?: T;\n storeInUrl?: Formatter<T>\n // sanitiser?: Constructable<ParameterSanitiser<T>> | ParameterSanitiser<T>;\n}\n\nexport interface RouteListParameterOptions<T> {\n as?: string;\n optional?: boolean;\n remember?: boolean;\n defaultValue?: T[];\n storeInUrl?: Formatter<T>\n // sanitiser?: Constructable<ParameterSanitiser<T[]>> | ParameterSanitiser<T[]>;\n}\n\n\nfunction installMechanics<M extends HasValue<any>>(prototype: Object, propertyKey: string | symbol, backingModel: M, tagPrefix: string, isEmpty: (mode: M) => boolean) {\n const mechanics = {\n backingModel: backingModel,\n binding: null as Binding<any, any>\n };\n const tag = `${tagPrefix}(${prototype.constructor.name}.${propertyKey.toString()})`;\n DebugContext.get(mechanics.backingModel).tag(tag);\n Logger.get(mechanics.backingModel).tag(tag);\n Object.defineProperty(prototype, propertyKey, {\n get: function() {\n return mechanics.backingModel;\n },\n set: function(userModel: M) {\n // This handles the scenario where we want to push an existing value model (such as a form model)\n // to and from the route.\n if (mechanics.binding) {\n mechanics.binding.dispose();\n }\n if (userModel) {\n mechanics.binding = new Binding(mechanics.backingModel, userModel, {\n toLeft: Functions.identity,\n toRight: Functions.identity\n });\n if (isEmpty(userModel)) {\n // console.log(`Push visit to model for ${tag}`, {value: mechanics.backingModel.value});\n mechanics.binding.writeRight(); // push the visit into the user model;\n } else {\n if (!isEmpty(mechanics.backingModel)) {\n console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');\n }\n mechanics.binding.writeLeft(); // push the user model into the visit\n }\n }\n }\n });\n}\n\nexport function RouteId<T extends string | number>(type: Formatter<T>, options?: RouteIdOptions<T>): PropertyDecorator {\n return (prototype: Object, propertyKey: string | symbol) => {\n const param = new ParameterDefinition.RouteId(propertyKey.toString(), options, type);\n Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);\n installMechanics(prototype, propertyKey, new MutableValueModel<T>(), '@RouteId', m => m.query().isNil());\n };\n}\n\nexport function VisitParameter<T>(options?: RouteParameterOptions<T>): PropertyDecorator {\n const opts = Opts.get(options);\n return (prototype: Object, propertyKey: string | symbol) => {\n const param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));\n Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);\n installMechanics(prototype, propertyKey, new MutableValueModel<T>(), '@VisitParameter', m => m.query().isNil());\n };\n}\n\nexport function VisitParameterList<E>(options?: RouteListParameterOptions<E>): PropertyDecorator {\n const opts = Opts.get(options);\n return (prototype: Object, propertyKey: string | symbol) => {\n const param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));\n Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);\n installMechanics(prototype, propertyKey, new MutableListModel<E>(), '@VisitParameterList', m => m.query().isEmpty());\n };\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"RouteIdOptions":{"__symbolic":"interface"},"RouteParameterOptions":{"__symbolic":"interface"},"RouteListParameterOptions":{"__symbolic":"interface"},"RouteId":{"__symbolic":"function","parameters":["type","options"],"value":{"__symbolic":"error","message":"Lambda not supported","line":77,"character":9}},"VisitParameter":{"__symbolic":"function"},"VisitParameterList":{"__symbolic":"function"}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"RouteIdOptions":{"__symbolic":"interface"},"RouteParameterOptions":{"__symbolic":"interface"},"RouteListParameterOptions":{"__symbolic":"interface"},"RouteId":{"__symbolic":"function","parameters":["type","options"],"value":{"__symbolic":"error","message":"Lambda not supported","line":80,"character":9}},"VisitParameter":{"__symbolic":"function"},"VisitParameterList":{"__symbolic":"function"}}}]
@@ -4,6 +4,8 @@
4
4
  export * from './index';
5
5
  export { ComponentsModule as ɵe } from './lib/components/components.module';
6
6
  export { DisposableComponent as ɵd } from './lib/components/disposable-component';
7
+ export { FocusContainerComponent as ɵr } from './lib/components/focus-container/focus-container.component';
8
+ export { FocusableComponent as ɵs } from './lib/components/focusable.component';
7
9
  export { AbstractInputComponent as ɵg } from './lib/components/forms/abstract-input.component';
8
10
  export { CheckboxInputComponent as ɵk } from './lib/components/forms/checkbox-input/checkbox-input.component';
9
11
  export { NumberInputComponent as ɵf } from './lib/components/forms/number-input/number-input.component';
@@ -15,28 +17,29 @@ export { ScrollContainerComponent as ɵl } from './lib/components/scroll-contain
15
17
  export { SwitchCaseComponent as ɵq, SwitchCaseDefaultDirective as ɵp, SwitchCaseOption as ɵn, SwitchCaseWhenDirective as ɵo } from './lib/components/switch-case/switch-case.component';
16
18
  export { CommandDirective as ɵb } from './lib/directives/command.directive';
17
19
  export { DirectivesModule as ɵa } from './lib/directives/directives.module';
20
+ export { FocusBinding as ɵt } from './lib/directives/focus-binding';
18
21
  export { FocusBindingDirective as ɵc } from './lib/directives/focus-binding.directive';
19
- export { AbstractInteractionContext as ɵbj } from './lib/interaction/abstract-interaction-context';
20
- export { ACTIVITY_DATA as ɵbm, Activity as ɵbn } from './lib/interaction/activity';
21
- export { ActivityContainerComponent as ɵbi } from './lib/interaction/components/activity-container/activity-container.component';
22
- export { ActivityOutletComponent as ɵbk } from './lib/interaction/components/activity-container/activity-outlet/activity-outlet.component';
23
- export { AlertDialogComponent as ɵbq } from './lib/interaction/components/alert-dialog/alert-dialog.component';
24
- export { ConfirmThenDialogComponent as ɵbp } from './lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component';
25
- export { ConfirmationDialogComponent as ɵbl } from './lib/interaction/components/confirmation-dialog/confirmation-dialog.component';
26
- export { InPlaceInteractionContextComponent as ɵbs } from './lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component';
27
- export { InteractionModule as ɵbh } from './lib/interaction/interaction.module';
28
- export { InteractionService as ɵba } from './lib/interaction/services/interaction.service';
29
- export { ModalInteractionContextFactory as ɵbb } from './lib/interaction/services/modal-interaction-context.factory';
30
- export { AbstractPlaceNavigationComponent as ɵbf } from './lib/place/components/abstract-place-navigation.component';
31
- export { BusyOverlayComponent as ɵt } from './lib/place/components/busy-overlay/busy-overlay.component';
32
- export { EmptyStateComponent as ɵs } from './lib/place/components/empty-state/empty-state.component';
33
- export { ListPlaceNavComponent as ɵbg } from './lib/place/components/list-place-nav/list-place-nav.component';
34
- export { PlaceOutletComponent as ɵu } from './lib/place/components/place-outlet/place-outlet.component';
35
- export { LEFT_RIGHT_PLACE_ANIMATION as ɵw, leftRightPlaceAnimation as ɵv } from './lib/place/components/place-outlet/route-animations';
36
- export { TabbedPlaceNavigationComponent as ɵbe } from './lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component';
37
- export { AUP_PLACE_CONFIG as ɵx } from './lib/place/place-config';
38
- export { PlaceHistory as ɵbd } from './lib/place/place-history';
39
- export { PlaceRouter as ɵz } from './lib/place/place-router';
40
- export { PlaceModule as ɵr } from './lib/place/place.module';
41
- export { UrlService as ɵbc } from './lib/place/url-service';
22
+ export { AbstractInteractionContext as ɵbm } from './lib/interaction/abstract-interaction-context';
23
+ export { ACTIVITY_DATA as ɵbp, Activity as ɵbq } from './lib/interaction/activity';
24
+ export { ActivityContainerComponent as ɵbl } from './lib/interaction/components/activity-container/activity-container.component';
25
+ export { ActivityOutletComponent as ɵbn } from './lib/interaction/components/activity-container/activity-outlet/activity-outlet.component';
26
+ export { AlertDialogComponent as ɵbt } from './lib/interaction/components/alert-dialog/alert-dialog.component';
27
+ export { ConfirmThenDialogComponent as ɵbs } from './lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component';
28
+ export { ConfirmationDialogComponent as ɵbo } from './lib/interaction/components/confirmation-dialog/confirmation-dialog.component';
29
+ export { InPlaceInteractionContextComponent as ɵbv } from './lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component';
30
+ export { InteractionModule as ɵbk } from './lib/interaction/interaction.module';
31
+ export { InteractionService as ɵbd } from './lib/interaction/services/interaction.service';
32
+ export { ModalInteractionContextFactory as ɵbe } from './lib/interaction/services/modal-interaction-context.factory';
33
+ export { AbstractPlaceNavigationComponent as ɵbi } from './lib/place/components/abstract-place-navigation.component';
34
+ export { BusyOverlayComponent as ɵw } from './lib/place/components/busy-overlay/busy-overlay.component';
35
+ export { EmptyStateComponent as ɵv } from './lib/place/components/empty-state/empty-state.component';
36
+ export { ListPlaceNavComponent as ɵbj } from './lib/place/components/list-place-nav/list-place-nav.component';
37
+ export { PlaceOutletComponent as ɵx } from './lib/place/components/place-outlet/place-outlet.component';
38
+ export { LEFT_RIGHT_PLACE_ANIMATION as ɵz, leftRightPlaceAnimation as ɵy } from './lib/place/components/place-outlet/route-animations';
39
+ export { TabbedPlaceNavigationComponent as ɵbh } from './lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component';
40
+ export { AUP_PLACE_CONFIG as ɵba } from './lib/place/place-config';
41
+ export { PlaceHistory as ɵbg } from './lib/place/place-history';
42
+ export { PlaceRouter as ɵbc } from './lib/place/place-router';
43
+ export { PlaceModule as ɵu } from './lib/place/place.module';
44
+ export { UrlService as ɵbf } from './lib/place/url-service';
42
45
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map