@coolon/angular-ui-powerups 1.3.7 → 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 +7 -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 +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [1.4.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.3.7...v1.4.0) (2020-05-21)
6
+
7
+
8
+ ### Features
9
+
10
+ * added VerticalFocusContainer component ([6fa2adc](https://bitbucket.org/coolon/angular-ui-powerups/commit/6fa2adc6365f113f7c350a681c5f57b49d21eaf2))
11
+
5
12
  ### [1.3.7](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.3.6...v1.3.7) (2020-05-20)
6
13
 
7
14
  ### [1.3.6](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.3.5...v1.3.6) (2020-05-20)
@@ -544,27 +544,25 @@
544
544
  function FocusContainerComponent(focusManager) {
545
545
  var _this = _super.call(this) || this;
546
546
  _this.focusManager = focusManager;
547
+ _this.restoreFocusCommand = pectin.Command.create(function () {
548
+ _this.restoreFocus();
549
+ });
547
550
  _this.tabIndex = -1;
548
551
  return _this;
549
552
  }
550
553
  FocusContainerComponent.prototype.ngOnInit = function () {
551
554
  };
555
+ // @Trace()
552
556
  FocusContainerComponent.prototype.restoreFocus = function () {
553
557
  this.focusManager.restoreFocus();
554
558
  };
555
559
  FocusContainerComponent.ctorParameters = function () { return [
556
- { type: pectin.FocusManager, decorators: [{ type: core.Host }] }
560
+ { type: pectin.FocusManager, decorators: [{ type: core.Self }] }
557
561
  ]; };
558
562
  __decorate([
559
563
  core.HostBinding('attr.tabindex'),
560
564
  __metadata("design:type", Object)
561
565
  ], FocusContainerComponent.prototype, "tabIndex", void 0);
562
- __decorate([
563
- pectin.Trace(),
564
- __metadata("design:type", Function),
565
- __metadata("design:paramtypes", []),
566
- __metadata("design:returntype", void 0)
567
- ], FocusContainerComponent.prototype, "restoreFocus", null);
568
566
  FocusContainerComponent = __decorate([
569
567
  core.Component({
570
568
  selector: 'aup-focus-container',
@@ -574,7 +572,7 @@
574
572
  ],
575
573
  styles: [":host{display:block}"]
576
574
  }),
577
- __param(0, core.Host()),
575
+ __param(0, core.Self()),
578
576
  __metadata("design:paramtypes", [pectin.FocusManager])
579
577
  ], FocusContainerComponent);
580
578
  return FocusContainerComponent;
@@ -1138,6 +1136,91 @@
1138
1136
  return SwitchCaseComponent;
1139
1137
  }(DisposableComponent));
1140
1138
 
1139
+ var VerticalFocusContainerComponent = /** @class */ (function (_super) {
1140
+ __extends(VerticalFocusContainerComponent, _super);
1141
+ function VerticalFocusContainerComponent(focusManager) {
1142
+ var _this = _super.call(this, focusManager) || this;
1143
+ _this.focusManager = focusManager;
1144
+ return _this;
1145
+ }
1146
+ VerticalFocusContainerComponent.prototype.arrowLeft = function (event) {
1147
+ if (this.leftArrowCommand.enabled.value) {
1148
+ event.preventDefault();
1149
+ event.stopPropagation();
1150
+ this.leftArrowCommand.execute();
1151
+ }
1152
+ };
1153
+ VerticalFocusContainerComponent.prototype.arrowRight = function (event) {
1154
+ if (this.rightArrowCommand.enabled.value) {
1155
+ event.preventDefault();
1156
+ event.stopPropagation();
1157
+ this.rightArrowCommand.execute();
1158
+ }
1159
+ };
1160
+ VerticalFocusContainerComponent.prototype.arrowDown = function (event) {
1161
+ event.preventDefault();
1162
+ event.stopPropagation();
1163
+ this.focusManager.focusNext();
1164
+ };
1165
+ VerticalFocusContainerComponent.prototype.arrowUp = function (event) {
1166
+ event.preventDefault();
1167
+ event.stopPropagation();
1168
+ this.focusManager.focusPrevious();
1169
+ };
1170
+ VerticalFocusContainerComponent.prototype.ngOnInit = function () {
1171
+ };
1172
+ VerticalFocusContainerComponent.ctorParameters = function () { return [
1173
+ { type: pectin.FocusManager, decorators: [{ type: core.Self }] }
1174
+ ]; };
1175
+ __decorate([
1176
+ core.Input('command.arrowRight'),
1177
+ pectin.TrackExternal(),
1178
+ __metadata("design:type", pectin.Command)
1179
+ ], VerticalFocusContainerComponent.prototype, "rightArrowCommand", void 0);
1180
+ __decorate([
1181
+ core.Input('command.arrowLeft'),
1182
+ pectin.TrackExternal(),
1183
+ __metadata("design:type", pectin.Command)
1184
+ ], VerticalFocusContainerComponent.prototype, "leftArrowCommand", void 0);
1185
+ __decorate([
1186
+ core.HostListener('keyup.arrowLeft', ['$event']),
1187
+ __metadata("design:type", Function),
1188
+ __metadata("design:paramtypes", [KeyboardEvent]),
1189
+ __metadata("design:returntype", void 0)
1190
+ ], VerticalFocusContainerComponent.prototype, "arrowLeft", null);
1191
+ __decorate([
1192
+ core.HostListener('keyup.arrowRight', ['$event']),
1193
+ __metadata("design:type", Function),
1194
+ __metadata("design:paramtypes", [KeyboardEvent]),
1195
+ __metadata("design:returntype", void 0)
1196
+ ], VerticalFocusContainerComponent.prototype, "arrowRight", null);
1197
+ __decorate([
1198
+ core.HostListener('keyup.arrowDown', ['$event']),
1199
+ __metadata("design:type", Function),
1200
+ __metadata("design:paramtypes", [KeyboardEvent]),
1201
+ __metadata("design:returntype", void 0)
1202
+ ], VerticalFocusContainerComponent.prototype, "arrowDown", null);
1203
+ __decorate([
1204
+ core.HostListener('keyup.arrowUp', ['$event']),
1205
+ __metadata("design:type", Function),
1206
+ __metadata("design:paramtypes", [KeyboardEvent]),
1207
+ __metadata("design:returntype", void 0)
1208
+ ], VerticalFocusContainerComponent.prototype, "arrowUp", null);
1209
+ VerticalFocusContainerComponent = __decorate([
1210
+ core.Component({
1211
+ selector: 'aup-vertical-focus-container',
1212
+ template: "<ng-content></ng-content>\n",
1213
+ providers: [
1214
+ { provide: pectin.FocusManager }
1215
+ ],
1216
+ styles: [":host{display:block}"]
1217
+ }),
1218
+ __param(0, core.Self()),
1219
+ __metadata("design:paramtypes", [pectin.FocusManager])
1220
+ ], VerticalFocusContainerComponent);
1221
+ return VerticalFocusContainerComponent;
1222
+ }(FocusContainerComponent));
1223
+
1141
1224
  var ComponentsModule = /** @class */ (function () {
1142
1225
  function ComponentsModule() {
1143
1226
  }
@@ -1156,6 +1239,7 @@
1156
1239
  SwitchCaseWhenDirective,
1157
1240
  SwitchCaseDefaultDirective,
1158
1241
  FocusContainerComponent,
1242
+ VerticalFocusContainerComponent,
1159
1243
  FocusableComponent
1160
1244
  ],
1161
1245
  imports: [
@@ -1183,6 +1267,7 @@
1183
1267
  SwitchCaseWhenDirective,
1184
1268
  SwitchCaseDefaultDirective,
1185
1269
  FocusContainerComponent,
1270
+ VerticalFocusContainerComponent,
1186
1271
  FocusableComponent
1187
1272
  ],
1188
1273
  providers: [
@@ -1730,7 +1815,7 @@
1730
1815
  }());
1731
1816
 
1732
1817
  var inplaceMonitorCount = 0;
1733
- exports.ɵbd = /** @class */ (function () {
1818
+ exports.ɵbe = /** @class */ (function () {
1734
1819
  function InteractionService(modelInteractionContextFactory) {
1735
1820
  this.modelInteractionContextFactory = modelInteractionContextFactory;
1736
1821
  this.garbage = new pectin.GarbageCollector();
@@ -1890,7 +1975,7 @@
1890
1975
  return ApiAdapter;
1891
1976
  }());
1892
1977
  InteractionService.ApiAdapter = ApiAdapter;
1893
- })(exports.ɵbd || (exports.ɵbd = {}));
1978
+ })(exports.ɵbe || (exports.ɵbe = {}));
1894
1979
 
1895
1980
  var InPlaceInteractionContextComponent = /** @class */ (function (_super) {
1896
1981
  __extends(InPlaceInteractionContextComponent, _super);
@@ -1934,7 +2019,7 @@
1934
2019
  return this.activityContainerComponent.startActivity(activityType, data);
1935
2020
  };
1936
2021
  InPlaceInteractionContextComponent.ctorParameters = function () { return [
1937
- { type: exports.ɵbd }
2022
+ { type: exports.ɵbe }
1938
2023
  ]; };
1939
2024
  __decorate([
1940
2025
  core.ViewChild('activityContainer', { static: true }),
@@ -1946,7 +2031,7 @@
1946
2031
  template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n",
1947
2032
  styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
1948
2033
  }),
1949
- __metadata("design:paramtypes", [exports.ɵbd])
2034
+ __metadata("design:paramtypes", [exports.ɵbe])
1950
2035
  ], InPlaceInteractionContextComponent);
1951
2036
  return InPlaceInteractionContextComponent;
1952
2037
  }(DisposableComponent));
@@ -1984,7 +2069,7 @@
1984
2069
  AlertDialogComponent
1985
2070
  ],
1986
2071
  providers: [
1987
- exports.ɵbd,
2072
+ exports.ɵbe,
1988
2073
  ]
1989
2074
  })
1990
2075
  ], InteractionModule);
@@ -3103,7 +3188,7 @@
3103
3188
  return PopStateNavigation;
3104
3189
  }(AbstractPopStateNavigation));
3105
3190
 
3106
- exports.ɵbg = /** @class */ (function () {
3191
+ exports.ɵbh = /** @class */ (function () {
3107
3192
  function PlaceHistory() {
3108
3193
  this._archive = new Map();
3109
3194
  this.placeHistoryDepth = 4;
@@ -3240,7 +3325,7 @@
3240
3325
  // }
3241
3326
  //
3242
3327
  // }
3243
- })(exports.ɵbg || (exports.ɵbg = {}));
3328
+ })(exports.ɵbh || (exports.ɵbh = {}));
3244
3329
 
3245
3330
  exports.UrlSnapshot = /** @class */ (function () {
3246
3331
  // TODO: Update this accept a url Parser so it can be immutable and generate new trees on mutation using toString() are parseUrl.
@@ -3763,11 +3848,11 @@
3763
3848
  PlaceRouter.ctorParameters = function () { return [
3764
3849
  { type: router.Router },
3765
3850
  { type: common.Location },
3766
- { type: exports.ɵbd },
3851
+ { type: exports.ɵbe },
3767
3852
  { type: UrlService },
3768
- { type: exports.ɵbg }
3853
+ { type: exports.ɵbh }
3769
3854
  ]; };
3770
- PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵbd), core.ɵɵinject(UrlService), core.ɵɵinject(exports.ɵbg)); }, token: PlaceRouter, providedIn: "root" });
3855
+ PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵbe), core.ɵɵinject(UrlService), core.ɵɵinject(exports.ɵbh)); }, token: PlaceRouter, providedIn: "root" });
3771
3856
  __decorate([
3772
3857
  pectin.Trace(),
3773
3858
  __metadata("design:type", Function),
@@ -3780,9 +3865,9 @@
3780
3865
  }),
3781
3866
  __metadata("design:paramtypes", [router.Router,
3782
3867
  common.Location,
3783
- exports.ɵbd,
3868
+ exports.ɵbe,
3784
3869
  UrlService,
3785
- exports.ɵbg])
3870
+ exports.ɵbh])
3786
3871
  ], PlaceRouter);
3787
3872
  return PlaceRouter;
3788
3873
  }(pectin.GarbageCollector));
@@ -4932,7 +5017,7 @@
4932
5017
  exports.FocusableComponent = FocusableComponent;
4933
5018
  exports.InPlaceInteractionContextComponent = InPlaceInteractionContextComponent;
4934
5019
  exports.InteractionModule = InteractionModule;
4935
- exports.InteractionService = exports.ɵbd;
5020
+ exports.InteractionService = exports.ɵbe;
4936
5021
  exports.InteractionServiceRoutingAdapter = InteractionServiceRoutingAdapter;
4937
5022
  exports.LEFT_RIGHT_PLACE_ANIMATION = LEFT_RIGHT_PLACE_ANIMATION;
4938
5023
  exports.ListPlaceNavComponent = ListPlaceNavComponent;
@@ -4948,7 +5033,7 @@
4948
5033
  exports.PlaceComponentDeactivationHandler = PlaceComponentDeactivationHandler;
4949
5034
  exports.PlaceDefinition = PlaceDefinition;
4950
5035
  exports.PlaceGuard = PlaceGuard;
4951
- exports.PlaceHistory = exports.ɵbg;
5036
+ exports.PlaceHistory = exports.ɵbh;
4952
5037
  exports.PlaceModule = PlaceModule;
4953
5038
  exports.PlaceOutletComponent = PlaceOutletComponent;
4954
5039
  exports.PlaceRouter = PlaceRouter;
@@ -4969,6 +5054,7 @@
4969
5054
  exports.SynchroniseInteractionContextIdsWithRoute = SynchroniseInteractionContextIdsWithRoute;
4970
5055
  exports.TabbedPlaceNavigationComponent = TabbedPlaceNavigationComponent;
4971
5056
  exports.UrlService = UrlService;
5057
+ exports.VerticalFocusContainerComponent = VerticalFocusContainerComponent;
4972
5058
  exports.Visit = Visit;
4973
5059
  exports.VisitParameter = VisitParameter;
4974
5060
  exports.VisitParameterList = VisitParameterList;
@@ -4981,23 +5067,24 @@
4981
5067
  exports.slideRightOnEnterAnimation = slideRightOnEnterAnimation;
4982
5068
  exports.ɵa = DirectivesModule;
4983
5069
  exports.ɵb = CommandDirective;
4984
- exports.ɵba = AUP_PLACE_CONFIG;
4985
- exports.ɵbc = PlaceRouter;
4986
- exports.ɵbe = ModalInteractionContextFactory;
4987
- exports.ɵbf = UrlService;
4988
- exports.ɵbh = TabbedPlaceNavigationComponent;
4989
- exports.ɵbi = AbstractPlaceNavigationComponent;
4990
- exports.ɵbj = ListPlaceNavComponent;
4991
- exports.ɵbk = InteractionModule;
4992
- exports.ɵbl = ActivityContainerComponent;
4993
- exports.ɵbm = AbstractInteractionContext;
4994
- exports.ɵbn = ActivityOutletComponent;
4995
- exports.ɵbo = ConfirmationDialogComponent;
4996
- exports.ɵbp = ACTIVITY_DATA;
4997
- exports.ɵbq = Activity;
4998
- exports.ɵbs = ConfirmThenDialogComponent;
4999
- exports.ɵbt = AlertDialogComponent;
5000
- exports.ɵbv = InPlaceInteractionContextComponent;
5070
+ exports.ɵba = LEFT_RIGHT_PLACE_ANIMATION;
5071
+ exports.ɵbb = AUP_PLACE_CONFIG;
5072
+ exports.ɵbd = PlaceRouter;
5073
+ exports.ɵbf = ModalInteractionContextFactory;
5074
+ exports.ɵbg = UrlService;
5075
+ exports.ɵbi = TabbedPlaceNavigationComponent;
5076
+ exports.ɵbj = AbstractPlaceNavigationComponent;
5077
+ exports.ɵbk = ListPlaceNavComponent;
5078
+ exports.ɵbl = InteractionModule;
5079
+ exports.ɵbm = ActivityContainerComponent;
5080
+ exports.ɵbn = AbstractInteractionContext;
5081
+ exports.ɵbo = ActivityOutletComponent;
5082
+ exports.ɵbp = ConfirmationDialogComponent;
5083
+ exports.ɵbq = ACTIVITY_DATA;
5084
+ exports.ɵbr = Activity;
5085
+ exports.ɵbt = ConfirmThenDialogComponent;
5086
+ exports.ɵbu = AlertDialogComponent;
5087
+ exports.ɵbw = InPlaceInteractionContextComponent;
5001
5088
  exports.ɵc = FocusBindingDirective;
5002
5089
  exports.ɵd = DisposableComponent;
5003
5090
  exports.ɵe = FocusBindingFactory;
@@ -5015,13 +5102,13 @@
5015
5102
  exports.ɵq = SwitchCaseDefaultDirective;
5016
5103
  exports.ɵr = SwitchCaseComponent;
5017
5104
  exports.ɵs = FocusContainerComponent;
5018
- exports.ɵt = FocusableComponent;
5019
- exports.ɵu = PlaceModule;
5020
- exports.ɵv = EmptyStateComponent;
5021
- exports.ɵw = BusyOverlayComponent;
5022
- exports.ɵx = PlaceOutletComponent;
5023
- exports.ɵy = leftRightPlaceAnimation;
5024
- exports.ɵz = LEFT_RIGHT_PLACE_ANIMATION;
5105
+ exports.ɵt = VerticalFocusContainerComponent;
5106
+ exports.ɵu = FocusableComponent;
5107
+ exports.ɵv = PlaceModule;
5108
+ exports.ɵw = EmptyStateComponent;
5109
+ exports.ɵx = BusyOverlayComponent;
5110
+ exports.ɵy = PlaceOutletComponent;
5111
+ exports.ɵz = leftRightPlaceAnimation;
5025
5112
 
5026
5113
  Object.defineProperty(exports, '__esModule', { value: true });
5027
5114