@coolon/angular-ui-powerups 1.3.6 → 1.4.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 (48) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +133 -46
  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 +27 -26
  7. package/coolon-angular-ui-powerups.metadata.json +1 -1
  8. package/esm2015/coolon-angular-ui-powerups.js +25 -24
  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 +3 -0
  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 +8 -10
  17. package/esm2015/lib/components/focus-container/focus-container.component.js.map +1 -1
  18. package/esm2015/lib/components/focus-container/focus-container.component.metadata.json +1 -1
  19. package/esm2015/lib/components/index.js +1 -0
  20. package/esm2015/lib/components/index.js.map +1 -1
  21. package/esm2015/lib/components/index.metadata.json +1 -1
  22. package/esm2015/lib/components/vertical-focus-container/vertical-focus-container.component.js +87 -0
  23. package/esm2015/lib/components/vertical-focus-container/vertical-focus-container.component.js.map +1 -0
  24. package/esm2015/lib/components/vertical-focus-container/vertical-focus-container.component.metadata.json +1 -0
  25. package/esm2015/lib/components/vertical-focus-container/vertical-focus-container.component.ngfactory.js.map +1 -0
  26. package/esm2015/lib/components/vertical-focus-container/vertical-focus-container.component.scss.shim.ngstyle.js.map +1 -0
  27. package/esm5/coolon-angular-ui-powerups.js +25 -24
  28. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  29. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  30. package/esm5/lib/components/components.module.js +3 -0
  31. package/esm5/lib/components/components.module.js.map +1 -1
  32. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  33. package/esm5/lib/components/focus-container/focus-container.component.js +8 -10
  34. package/esm5/lib/components/focus-container/focus-container.component.js.map +1 -1
  35. package/esm5/lib/components/index.js +1 -0
  36. package/esm5/lib/components/index.js.map +1 -1
  37. package/esm5/lib/components/vertical-focus-container/vertical-focus-container.component.js +90 -0
  38. package/esm5/lib/components/vertical-focus-container/vertical-focus-container.component.js.map +1 -0
  39. package/esm5/lib/components/vertical-focus-container/vertical-focus-container.component.ngfactory.js.map +1 -0
  40. package/esm5/lib/components/vertical-focus-container/vertical-focus-container.component.scss.shim.ngstyle.js.map +1 -0
  41. package/fesm2015/coolon-angular-ui-powerups.js +93 -11
  42. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  43. package/fesm5/coolon-angular-ui-powerups.js +96 -11
  44. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  45. package/lib/components/focus-container/focus-container.component.d.ts +2 -1
  46. package/lib/components/index.d.ts +1 -0
  47. package/lib/components/vertical-focus-container/vertical-focus-container.component.d.ts +14 -0
  48. package/package.json +8 -8
@@ -1,33 +1,31 @@
1
1
  import { __decorate, __extends, __metadata, __param } from "tslib";
2
- import { Component, Host, HostBinding } from '@angular/core';
3
- import { FocusManager, Trace } from '@coolon/pectin';
2
+ import { Component, HostBinding, Self } from '@angular/core';
3
+ import { Command, FocusManager, Trace } from '@coolon/pectin';
4
4
  import { DisposableComponent } from '../disposable-component';
5
5
  var FocusContainerComponent = /** @class */ (function (_super) {
6
6
  __extends(FocusContainerComponent, _super);
7
7
  function FocusContainerComponent(focusManager) {
8
8
  var _this = _super.call(this) || this;
9
9
  _this.focusManager = focusManager;
10
+ _this.restoreFocusCommand = Command.create(function () {
11
+ _this.restoreFocus();
12
+ });
10
13
  _this.tabIndex = -1;
11
14
  return _this;
12
15
  }
13
16
  FocusContainerComponent.prototype.ngOnInit = function () {
14
17
  };
18
+ // @Trace()
15
19
  FocusContainerComponent.prototype.restoreFocus = function () {
16
20
  this.focusManager.restoreFocus();
17
21
  };
18
22
  FocusContainerComponent.ctorParameters = function () { return [
19
- { type: FocusManager, decorators: [{ type: Host }] }
23
+ { type: FocusManager, decorators: [{ type: Self }] }
20
24
  ]; };
21
25
  __decorate([
22
26
  HostBinding('attr.tabindex'),
23
27
  __metadata("design:type", Object)
24
28
  ], FocusContainerComponent.prototype, "tabIndex", void 0);
25
- __decorate([
26
- Trace(),
27
- __metadata("design:type", Function),
28
- __metadata("design:paramtypes", []),
29
- __metadata("design:returntype", void 0)
30
- ], FocusContainerComponent.prototype, "restoreFocus", null);
31
29
  FocusContainerComponent = __decorate([
32
30
  Component({
33
31
  selector: 'aup-focus-container',
@@ -37,7 +35,7 @@ var FocusContainerComponent = /** @class */ (function (_super) {
37
35
  ],
38
36
  styles: [":host{display:block}"]
39
37
  }),
40
- __param(0, Host()),
38
+ __param(0, Self()),
41
39
  __metadata("design:paramtypes", [FocusManager])
42
40
  ], FocusContainerComponent);
43
41
  return FocusContainerComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"focus-container.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/focus-container/focus-container.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAU,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAU9D;IAA6C,2CAAmB;IAK9D,iCAA6B,YAA0B;QAAvD,YACE,iBAAO,SACR;QAF4B,kBAAY,GAAZ,YAAY,CAAc;QAF9C,cAAQ,GAAG,CAAC,CAAC,CAAC;;IAIvB,CAAC;IAED,0CAAQ,GAAR;IACA,CAAC;IAGD,8CAAY,GAAZ;QACE,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;IACnC,CAAC;;gBAV0C,YAAY,uBAA1C,IAAI;;IAFjB;QADC,WAAW,CAAC,eAAe,CAAC;;6DACN;IAUvB;QADC,KAAK,EAAE;;;;+DAGP;IAfU,uBAAuB;QARnC,SAAS,CAAC;YACT,QAAQ,EAAE,qBAAqB;YAC/B,uCAA+C;YAE/C,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,YAAY,EAAE;aAC1B;;SACF,CAAC;QAMa,WAAA,IAAI,EAAE,CAAA;yCAAwB,YAAY;OAL5C,uBAAuB,CAiBnC;IAAD,8BAAC;CAAA,AAjBD,CAA6C,mBAAmB,GAiB/D;SAjBY,uBAAuB","sourcesContent":["import { Component, Host, HostBinding, OnInit } from '@angular/core';\nimport { FocusManager, Trace } from '@coolon/pectin';\nimport { DisposableComponent } from '../disposable-component';\n\n@Component({\n selector: 'aup-focus-container',\n templateUrl: './focus-container.component.html',\n styleUrls: ['./focus-container.component.scss'],\n providers: [\n { provide: FocusManager }\n ]\n})\nexport class FocusContainerComponent extends DisposableComponent implements OnInit {\n\n @HostBinding('attr.tabindex')\n readonly tabIndex = -1;\n\n constructor(@Host() readonly focusManager: FocusManager) {\n super();\n }\n\n ngOnInit() {\n }\n\n @Trace()\n restoreFocus() {\n this.focusManager.restoreFocus();\n }\n\n}\n"]}
1
+ {"version":3,"file":"focus-container.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/focus-container/focus-container.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAQ,WAAW,EAAU,IAAI,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAU9D;IAA6C,2CAAmB;IAS9D,iCAA6B,YAA0B;QAAvD,YACE,iBAAO,SACR;QAF4B,kBAAY,GAAZ,YAAY,CAAc;QAP9C,yBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC;YAC5C,KAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;QAGM,cAAQ,GAAG,CAAC,CAAC,CAAC;;IAIvB,CAAC;IAED,0CAAQ,GAAR;IACA,CAAC;IAED,WAAW;IACX,8CAAY,GAAZ;QACE,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;IACnC,CAAC;;gBAV0C,YAAY,uBAA1C,IAAI;;IAFjB;QADC,WAAW,CAAC,eAAe,CAAC;;6DACN;IAPZ,uBAAuB;QARnC,SAAS,CAAC;YACT,QAAQ,EAAE,qBAAqB;YAC/B,uCAA+C;YAE/C,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,YAAY,EAAE;aAC1B;;SACF,CAAC;QAUa,WAAA,IAAI,EAAE,CAAA;yCAAwB,YAAY;OAT5C,uBAAuB,CAqBnC;IAAD,8BAAC;CAAA,AArBD,CAA6C,mBAAmB,GAqB/D;SArBY,uBAAuB","sourcesContent":["import { Component, Host, HostBinding, OnInit, Self } from '@angular/core';\nimport { Command, FocusManager, Trace } from '@coolon/pectin';\nimport { DisposableComponent } from '../disposable-component';\n\n@Component({\n selector: 'aup-focus-container',\n templateUrl: './focus-container.component.html',\n styleUrls: ['./focus-container.component.scss'],\n providers: [\n { provide: FocusManager }\n ]\n})\nexport class FocusContainerComponent extends DisposableComponent implements OnInit {\n\n readonly restoreFocusCommand = Command.create(() => {\n this.restoreFocus();\n });\n\n @HostBinding('attr.tabindex')\n readonly tabIndex = -1;\n\n constructor(@Self() readonly focusManager: FocusManager) {\n super();\n }\n\n ngOnInit() {\n }\n\n // @Trace()\n restoreFocus() {\n this.focusManager.restoreFocus();\n }\n\n}\n"]}
@@ -18,4 +18,5 @@ export * from "./switch-case/switch-case.component";
18
18
  export * from "./types/bounds.class";
19
19
  export * from "./types/dimension.class";
20
20
  export * from "./types/point.class";
21
+ export * from "./vertical-focus-container/vertical-focus-container.component";
21
22
  //# sourceMappingURL=index.js.map
@@ -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,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
+ {"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;AACpC,cAAc,+DAA+D,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\";\nexport * from \"./vertical-focus-container/vertical-focus-container.component\";\n"]}
@@ -0,0 +1,90 @@
1
+ import { __decorate, __extends, __metadata, __param } from "tslib";
2
+ import { Component, HostListener, Input, Self } from '@angular/core';
3
+ import { Command, FocusManager, TrackExternal } from '@coolon/pectin';
4
+ import { FocusContainerComponent } from '../focus-container/focus-container.component';
5
+ var VerticalFocusContainerComponent = /** @class */ (function (_super) {
6
+ __extends(VerticalFocusContainerComponent, _super);
7
+ function VerticalFocusContainerComponent(focusManager) {
8
+ var _this = _super.call(this, focusManager) || this;
9
+ _this.focusManager = focusManager;
10
+ return _this;
11
+ }
12
+ VerticalFocusContainerComponent.prototype.arrowLeft = function (event) {
13
+ if (this.leftArrowCommand.enabled.value) {
14
+ event.preventDefault();
15
+ event.stopPropagation();
16
+ this.leftArrowCommand.execute();
17
+ }
18
+ };
19
+ VerticalFocusContainerComponent.prototype.arrowRight = function (event) {
20
+ if (this.rightArrowCommand.enabled.value) {
21
+ event.preventDefault();
22
+ event.stopPropagation();
23
+ this.rightArrowCommand.execute();
24
+ }
25
+ };
26
+ VerticalFocusContainerComponent.prototype.arrowDown = function (event) {
27
+ event.preventDefault();
28
+ event.stopPropagation();
29
+ this.focusManager.focusNext();
30
+ };
31
+ VerticalFocusContainerComponent.prototype.arrowUp = function (event) {
32
+ event.preventDefault();
33
+ event.stopPropagation();
34
+ this.focusManager.focusPrevious();
35
+ };
36
+ VerticalFocusContainerComponent.prototype.ngOnInit = function () {
37
+ };
38
+ VerticalFocusContainerComponent.ctorParameters = function () { return [
39
+ { type: FocusManager, decorators: [{ type: Self }] }
40
+ ]; };
41
+ __decorate([
42
+ Input('command.arrowRight'),
43
+ TrackExternal(),
44
+ __metadata("design:type", Command)
45
+ ], VerticalFocusContainerComponent.prototype, "rightArrowCommand", void 0);
46
+ __decorate([
47
+ Input('command.arrowLeft'),
48
+ TrackExternal(),
49
+ __metadata("design:type", Command)
50
+ ], VerticalFocusContainerComponent.prototype, "leftArrowCommand", void 0);
51
+ __decorate([
52
+ HostListener('keyup.arrowLeft', ['$event']),
53
+ __metadata("design:type", Function),
54
+ __metadata("design:paramtypes", [KeyboardEvent]),
55
+ __metadata("design:returntype", void 0)
56
+ ], VerticalFocusContainerComponent.prototype, "arrowLeft", null);
57
+ __decorate([
58
+ HostListener('keyup.arrowRight', ['$event']),
59
+ __metadata("design:type", Function),
60
+ __metadata("design:paramtypes", [KeyboardEvent]),
61
+ __metadata("design:returntype", void 0)
62
+ ], VerticalFocusContainerComponent.prototype, "arrowRight", null);
63
+ __decorate([
64
+ HostListener('keyup.arrowDown', ['$event']),
65
+ __metadata("design:type", Function),
66
+ __metadata("design:paramtypes", [KeyboardEvent]),
67
+ __metadata("design:returntype", void 0)
68
+ ], VerticalFocusContainerComponent.prototype, "arrowDown", null);
69
+ __decorate([
70
+ HostListener('keyup.arrowUp', ['$event']),
71
+ __metadata("design:type", Function),
72
+ __metadata("design:paramtypes", [KeyboardEvent]),
73
+ __metadata("design:returntype", void 0)
74
+ ], VerticalFocusContainerComponent.prototype, "arrowUp", null);
75
+ VerticalFocusContainerComponent = __decorate([
76
+ Component({
77
+ selector: 'aup-vertical-focus-container',
78
+ template: "<ng-content></ng-content>\n",
79
+ providers: [
80
+ { provide: FocusManager }
81
+ ],
82
+ styles: [":host{display:block}"]
83
+ }),
84
+ __param(0, Self()),
85
+ __metadata("design:paramtypes", [FocusManager])
86
+ ], VerticalFocusContainerComponent);
87
+ return VerticalFocusContainerComponent;
88
+ }(FocusContainerComponent));
89
+ export { VerticalFocusContainerComponent };
90
+ //# sourceMappingURL=vertical-focus-container.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vertical-focus-container.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/vertical-focus-container/vertical-focus-container.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAQ,YAAY,EAAE,KAAK,EAAU,IAAI,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAUvF;IAAqD,mDAAuB;IA0C1E,yCAA6B,YAA0B;QAAvD,YACE,kBAAM,YAAY,CAAC,SACpB;QAF4B,kBAAY,GAAZ,YAAY,CAAc;;IAEvD,CAAC;IAjCD,mDAAS,GAAT,UAAU,KAAoB;QAC5B,IAAI,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE;YACvC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;SACjC;IACH,CAAC;IAGD,oDAAU,GAAV,UAAW,KAAoB;QAC7B,IAAI,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE;YACxC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAC;SAClC;IACH,CAAC;IAGD,mDAAS,GAAT,UAAU,KAAoB;QAC5B,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC;IAChC,CAAC;IAGD,iDAAO,GAAP,UAAQ,KAAoB;QAC1B,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC;IACpC,CAAC;IAMD,kDAAQ,GAAR;IACA,CAAC;;gBAL0C,YAAY,uBAA1C,IAAI;;IAtCjB;QAFC,KAAK,CAAC,oBAAoB,CAAC;QAC3B,aAAa,EAAE;kCACG,OAAO;8EAAO;IAIjC;QAFC,KAAK,CAAC,mBAAmB,CAAC;QAC1B,aAAa,EAAE;kCACE,OAAO;6EAAO;IAGhC;QADC,YAAY,CAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC,CAAC;;yCAC3B,aAAa;;oEAM7B;IAGD;QADC,YAAY,CAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC,CAAC;;yCAC3B,aAAa;;qEAM9B;IAGD;QADC,YAAY,CAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC,CAAC;;yCAC3B,aAAa;;oEAI7B;IAGD;QADC,YAAY,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC,CAAC;;yCAC3B,aAAa;;kEAI3B;IAxCU,+BAA+B;QAR3C,SAAS,CAAC;YACT,QAAQ,EAAE,8BAA8B;YACxC,uCAAwD;YAExD,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,YAAY,EAAE;aAC1B;;SACF,CAAC;QA2Ca,WAAA,IAAI,EAAE,CAAA;yCAAwB,YAAY;OA1C5C,+BAA+B,CAiD3C;IAAD,sCAAC;CAAA,AAjDD,CAAqD,uBAAuB,GAiD3E;SAjDY,+BAA+B","sourcesContent":["import { Component, Host, HostListener, Input, OnInit, Self } from '@angular/core';\nimport { Command, FocusManager, TrackExternal } from '@coolon/pectin';\nimport { FocusContainerComponent } from '../focus-container/focus-container.component';\n\n@Component({\n selector: 'aup-vertical-focus-container',\n templateUrl: './vertical-focus-container.component.html',\n styleUrls: ['./vertical-focus-container.component.scss'],\n providers: [\n { provide: FocusManager }\n ]\n})\nexport class VerticalFocusContainerComponent extends FocusContainerComponent implements OnInit {\n\n @Input('command.arrowRight')\n @TrackExternal()\n rightArrowCommand: Command<void>;\n\n @Input('command.arrowLeft')\n @TrackExternal()\n leftArrowCommand: Command<void>;\n\n @HostListener('keyup.arrowLeft', ['$event'])\n arrowLeft(event: KeyboardEvent) {\n if (this.leftArrowCommand.enabled.value) {\n event.preventDefault();\n event.stopPropagation();\n this.leftArrowCommand.execute();\n }\n }\n\n @HostListener('keyup.arrowRight', ['$event'])\n arrowRight(event: KeyboardEvent) {\n if (this.rightArrowCommand.enabled.value) {\n event.preventDefault();\n event.stopPropagation();\n this.rightArrowCommand.execute();\n }\n }\n\n @HostListener('keyup.arrowDown', ['$event'])\n arrowDown(event: KeyboardEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.focusManager.focusNext();\n }\n\n @HostListener('keyup.arrowUp', ['$event'])\n arrowUp(event: KeyboardEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.focusManager.focusPrevious();\n }\n\n constructor(@Self() readonly focusManager: FocusManager) {\n super(focusManager);\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vertical-focus-container.component.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/vertical-focus-container/vertical-focus-container.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vertical-focus-container.component.scss.shim.ngstyle.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/vertical-focus-container/vertical-focus-container.component.scss.shim.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata, __param, __awaiter } from 'tslib';
2
2
  import { DOCUMENT, CommonModule, Location } from '@angular/common';
3
- import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, Host, HostBinding, Component, EventEmitter, Output, ContentChild, TemplateRef, ChangeDetectorRef, ContentChildren, QueryList, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, Optional, SkipSelf } from '@angular/core';
3
+ import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, Self, HostBinding, Component, EventEmitter, Output, ContentChild, TemplateRef, ChangeDetectorRef, ContentChildren, QueryList, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, Optional, SkipSelf } from '@angular/core';
4
4
  import { FormsModule } from '@angular/forms';
5
5
  import { MatFormFieldModule } from '@angular/material/form-field';
6
6
  import { MatInputModule } from '@angular/material/input';
@@ -10,7 +10,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
10
10
  import { MatButtonModule } from '@angular/material/button';
11
11
  import { MatCheckboxModule } from '@angular/material/checkbox';
12
12
  import { MatIconModule } from '@angular/material/icon';
13
- import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, FocusManager, Trace, DelegatingFormValueModel, Command, TrackExternal, ListModel, StoreInListModel, ValueModel, StoreInValueModel, Deferred, MutableListModel, MutableValueModel, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
13
+ import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, Command, FocusManager, DelegatingFormValueModel, TrackExternal, ListModel, StoreInListModel, ValueModel, StoreInValueModel, Deferred, Trace, MutableListModel, MutableValueModel, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
14
14
  import { PortalModule } from '@angular/cdk/portal';
15
15
  import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
16
16
  import { RouterModule, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterOutlet } from '@angular/router';
@@ -328,27 +328,25 @@ let FocusContainerComponent = class FocusContainerComponent extends DisposableCo
328
328
  constructor(focusManager) {
329
329
  super();
330
330
  this.focusManager = focusManager;
331
+ this.restoreFocusCommand = Command.create(() => {
332
+ this.restoreFocus();
333
+ });
331
334
  this.tabIndex = -1;
332
335
  }
333
336
  ngOnInit() {
334
337
  }
338
+ // @Trace()
335
339
  restoreFocus() {
336
340
  this.focusManager.restoreFocus();
337
341
  }
338
342
  };
339
343
  FocusContainerComponent.ctorParameters = () => [
340
- { type: FocusManager, decorators: [{ type: Host }] }
344
+ { type: FocusManager, decorators: [{ type: Self }] }
341
345
  ];
342
346
  __decorate([
343
347
  HostBinding('attr.tabindex'),
344
348
  __metadata("design:type", Object)
345
349
  ], FocusContainerComponent.prototype, "tabIndex", void 0);
346
- __decorate([
347
- Trace(),
348
- __metadata("design:type", Function),
349
- __metadata("design:paramtypes", []),
350
- __metadata("design:returntype", void 0)
351
- ], FocusContainerComponent.prototype, "restoreFocus", null);
352
350
  FocusContainerComponent = __decorate([
353
351
  Component({
354
352
  selector: 'aup-focus-container',
@@ -358,7 +356,7 @@ FocusContainerComponent = __decorate([
358
356
  ],
359
357
  styles: [":host{display:block}"]
360
358
  }),
361
- __param(0, Host()),
359
+ __param(0, Self()),
362
360
  __metadata("design:paramtypes", [FocusManager])
363
361
  ], FocusContainerComponent);
364
362
 
@@ -859,6 +857,88 @@ SwitchCaseComponent = __decorate([
859
857
  __metadata("design:paramtypes", [ChangeDetectorRef])
860
858
  ], SwitchCaseComponent);
861
859
 
860
+ let VerticalFocusContainerComponent = class VerticalFocusContainerComponent extends FocusContainerComponent {
861
+ constructor(focusManager) {
862
+ super(focusManager);
863
+ this.focusManager = focusManager;
864
+ }
865
+ arrowLeft(event) {
866
+ if (this.leftArrowCommand.enabled.value) {
867
+ event.preventDefault();
868
+ event.stopPropagation();
869
+ this.leftArrowCommand.execute();
870
+ }
871
+ }
872
+ arrowRight(event) {
873
+ if (this.rightArrowCommand.enabled.value) {
874
+ event.preventDefault();
875
+ event.stopPropagation();
876
+ this.rightArrowCommand.execute();
877
+ }
878
+ }
879
+ arrowDown(event) {
880
+ event.preventDefault();
881
+ event.stopPropagation();
882
+ this.focusManager.focusNext();
883
+ }
884
+ arrowUp(event) {
885
+ event.preventDefault();
886
+ event.stopPropagation();
887
+ this.focusManager.focusPrevious();
888
+ }
889
+ ngOnInit() {
890
+ }
891
+ };
892
+ VerticalFocusContainerComponent.ctorParameters = () => [
893
+ { type: FocusManager, decorators: [{ type: Self }] }
894
+ ];
895
+ __decorate([
896
+ Input('command.arrowRight'),
897
+ TrackExternal(),
898
+ __metadata("design:type", Command)
899
+ ], VerticalFocusContainerComponent.prototype, "rightArrowCommand", void 0);
900
+ __decorate([
901
+ Input('command.arrowLeft'),
902
+ TrackExternal(),
903
+ __metadata("design:type", Command)
904
+ ], VerticalFocusContainerComponent.prototype, "leftArrowCommand", void 0);
905
+ __decorate([
906
+ HostListener('keyup.arrowLeft', ['$event']),
907
+ __metadata("design:type", Function),
908
+ __metadata("design:paramtypes", [KeyboardEvent]),
909
+ __metadata("design:returntype", void 0)
910
+ ], VerticalFocusContainerComponent.prototype, "arrowLeft", null);
911
+ __decorate([
912
+ HostListener('keyup.arrowRight', ['$event']),
913
+ __metadata("design:type", Function),
914
+ __metadata("design:paramtypes", [KeyboardEvent]),
915
+ __metadata("design:returntype", void 0)
916
+ ], VerticalFocusContainerComponent.prototype, "arrowRight", null);
917
+ __decorate([
918
+ HostListener('keyup.arrowDown', ['$event']),
919
+ __metadata("design:type", Function),
920
+ __metadata("design:paramtypes", [KeyboardEvent]),
921
+ __metadata("design:returntype", void 0)
922
+ ], VerticalFocusContainerComponent.prototype, "arrowDown", null);
923
+ __decorate([
924
+ HostListener('keyup.arrowUp', ['$event']),
925
+ __metadata("design:type", Function),
926
+ __metadata("design:paramtypes", [KeyboardEvent]),
927
+ __metadata("design:returntype", void 0)
928
+ ], VerticalFocusContainerComponent.prototype, "arrowUp", null);
929
+ VerticalFocusContainerComponent = __decorate([
930
+ Component({
931
+ selector: 'aup-vertical-focus-container',
932
+ template: "<ng-content></ng-content>\n",
933
+ providers: [
934
+ { provide: FocusManager }
935
+ ],
936
+ styles: [":host{display:block}"]
937
+ }),
938
+ __param(0, Self()),
939
+ __metadata("design:paramtypes", [FocusManager])
940
+ ], VerticalFocusContainerComponent);
941
+
862
942
  let ComponentsModule = class ComponentsModule {
863
943
  };
864
944
  ComponentsModule = __decorate([
@@ -876,6 +956,7 @@ ComponentsModule = __decorate([
876
956
  SwitchCaseWhenDirective,
877
957
  SwitchCaseDefaultDirective,
878
958
  FocusContainerComponent,
959
+ VerticalFocusContainerComponent,
879
960
  FocusableComponent
880
961
  ],
881
962
  imports: [
@@ -903,6 +984,7 @@ ComponentsModule = __decorate([
903
984
  SwitchCaseWhenDirective,
904
985
  SwitchCaseDefaultDirective,
905
986
  FocusContainerComponent,
987
+ VerticalFocusContainerComponent,
906
988
  FocusableComponent
907
989
  ],
908
990
  providers: [
@@ -4206,5 +4288,5 @@ function VisitParameterList(options) {
4206
4288
  * Generated bundle index. Do not edit.
4207
4289
  */
4208
4290
 
4209
- export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputComponent, AbstractInteractionContext, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, Activity, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CheckboxInputComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, InPlaceInteractionContextComponent, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ModalInteractionContextFactory, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SelectInputComponent, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, UrlService, UrlSnapshot, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, AUP_PLACE_CONFIG as ɵba, PlaceRouter as ɵbc, InteractionService as ɵbd, ModalInteractionContextFactory as ɵbe, UrlService as ɵbf, PlaceHistory as ɵbg, TabbedPlaceNavigationComponent as ɵbh, AbstractPlaceNavigationComponent as ɵbi, ListPlaceNavComponent as ɵbj, InteractionModule as ɵbk, ActivityContainerComponent as ɵbl, AbstractInteractionContext as ɵbm, ActivityOutletComponent as ɵbn, ConfirmationDialogComponent as ɵbo, ACTIVITY_DATA as ɵbp, Activity as ɵbq, ConfirmThenDialogComponent as ɵbs, AlertDialogComponent as ɵbt, InPlaceInteractionContextComponent as ɵbv, FocusBindingDirective as ɵc, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, NumberInputComponent as ɵg, AbstractInputComponent as ɵh, StringInputComponent as ɵi, PasswordInputComponent as ɵj, SelectInputComponent as ɵk, CheckboxInputComponent as ɵl, ScrollContainerComponent as ɵm, NoopComponent as ɵn, SwitchCaseOption as ɵo, SwitchCaseWhenDirective as ɵp, SwitchCaseDefaultDirective as ɵq, SwitchCaseComponent as ɵr, FocusContainerComponent as ɵs, FocusableComponent as ɵt, PlaceModule as ɵu, EmptyStateComponent as ɵv, BusyOverlayComponent as ɵw, PlaceOutletComponent as ɵx, leftRightPlaceAnimation as ɵy, LEFT_RIGHT_PLACE_ANIMATION as ɵz };
4291
+ export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputComponent, AbstractInteractionContext, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, Activity, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CheckboxInputComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, InPlaceInteractionContextComponent, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ModalInteractionContextFactory, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SelectInputComponent, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, LEFT_RIGHT_PLACE_ANIMATION as ɵba, AUP_PLACE_CONFIG as ɵbb, PlaceRouter as ɵbd, InteractionService as ɵbe, ModalInteractionContextFactory as ɵbf, UrlService as ɵbg, PlaceHistory as ɵbh, TabbedPlaceNavigationComponent as ɵbi, AbstractPlaceNavigationComponent as ɵbj, ListPlaceNavComponent as ɵbk, InteractionModule as ɵbl, ActivityContainerComponent as ɵbm, AbstractInteractionContext as ɵbn, ActivityOutletComponent as ɵbo, ConfirmationDialogComponent as ɵbp, ACTIVITY_DATA as ɵbq, Activity as ɵbr, ConfirmThenDialogComponent as ɵbt, AlertDialogComponent as ɵbu, InPlaceInteractionContextComponent as ɵbw, FocusBindingDirective as ɵc, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, NumberInputComponent as ɵg, AbstractInputComponent as ɵh, StringInputComponent as ɵi, PasswordInputComponent as ɵj, SelectInputComponent as ɵk, CheckboxInputComponent as ɵl, ScrollContainerComponent as ɵm, NoopComponent as ɵn, SwitchCaseOption as ɵo, SwitchCaseWhenDirective as ɵp, SwitchCaseDefaultDirective as ɵq, SwitchCaseComponent as ɵr, FocusContainerComponent as ɵs, VerticalFocusContainerComponent as ɵt, FocusableComponent as ɵu, PlaceModule as ɵv, EmptyStateComponent as ɵw, BusyOverlayComponent as ɵx, PlaceOutletComponent as ɵy, leftRightPlaceAnimation as ɵz };
4210
4292
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map