@coolon/angular-ui-powerups 2.0.0-alpha.32 → 2.0.0-alpha.34

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 (59) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/assets/interaction.scss +5 -0
  3. package/assets/tabs.scss +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.js +127 -36
  5. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  6. package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
  7. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  8. package/coolon-angular-ui-powerups.metadata.json +1 -1
  9. package/esm2015/lib/components/card-container/card-container.component.js +1 -1
  10. package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
  11. package/esm2015/lib/interaction/activity-ref.js +10 -2
  12. package/esm2015/lib/interaction/activity-ref.js.map +1 -1
  13. package/esm2015/lib/interaction/activity-ref.metadata.json +1 -1
  14. package/esm2015/lib/interaction/activity.js +18 -1
  15. package/esm2015/lib/interaction/activity.js.map +1 -1
  16. package/esm2015/lib/interaction/activity.metadata.json +1 -1
  17. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
  18. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  19. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +16 -17
  20. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  21. package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
  22. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +0 -1
  23. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  24. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.metadata.json +1 -1
  25. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  26. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +56 -16
  27. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  28. package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
  29. package/esm2015/lib/place/place-component.js +12 -0
  30. package/esm2015/lib/place/place-component.js.map +1 -1
  31. package/esm2015/lib/place/place-component.metadata.json +1 -1
  32. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  33. package/esm5/lib/components/card-container/card-container.component.js +1 -1
  34. package/esm5/lib/interaction/activity-ref.js +14 -2
  35. package/esm5/lib/interaction/activity-ref.js.map +1 -1
  36. package/esm5/lib/interaction/activity.js +27 -1
  37. package/esm5/lib/interaction/activity.js.map +1 -1
  38. package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
  39. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +16 -17
  40. package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  41. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +0 -1
  42. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  43. package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  44. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +56 -16
  45. package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  46. package/esm5/lib/place/place-component.js +16 -0
  47. package/esm5/lib/place/place-component.js.map +1 -1
  48. package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
  49. package/fesm2015/coolon-angular-ui-powerups.js +111 -37
  50. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  51. package/fesm5/coolon-angular-ui-powerups.js +128 -37
  52. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  53. package/lib/interaction/activity-ref.d.ts +3 -0
  54. package/lib/interaction/activity.d.ts +6 -2
  55. package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -2
  56. package/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.d.ts +0 -1
  57. package/lib/place/components/place-outlet/place-outlet.component.d.ts +8 -2
  58. package/lib/place/place-component.d.ts +6 -0
  59. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
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
+ ## [2.0.0-alpha.34](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.33...v2.0.0-alpha.34) (2020-08-26)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * place ready notifications now work when animation is disabled ([8f49791](https://bitbucket.org/coolon/angular-ui-powerups/commit/8f49791d97182405f0aa7c25ca72e48de49dde59))
11
+
12
+ ## [2.0.0-alpha.33](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.32...v2.0.0-alpha.33) (2020-08-26)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * added ee tests ([c850250](https://bitbucket.org/coolon/angular-ui-powerups/commit/c850250c4aabb1571eef62016c512bf5b3ced5ba))
18
+
5
19
  ## [2.0.0-alpha.32](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.31...v2.0.0-alpha.32) (2020-08-26)
6
20
 
7
21
 
@@ -9,6 +9,11 @@
9
9
  }
10
10
  }
11
11
 
12
+ .activity-outlet-wrapper {
13
+ display: flex;
14
+ flex-direction: column;
15
+ align-items: stretch;
16
+ }
12
17
 
13
18
  .aup-popup-interaction-panel {
14
19
  background: var(--aup-default-background, white);
package/assets/tabs.scss CHANGED
@@ -7,7 +7,7 @@
7
7
  [full-height-tabs], mat-tab-group.full-height-tabs {
8
8
  .mat-tab-body-wrapper {
9
9
  flex: 1;
10
- mat-tab-body, .mat-tab-body-content {
10
+ mat-tab-body, .mat-tab-body-content {
11
11
  display: flex;
12
12
  flex-direction: column;
13
13
  justify-content: stretch;
@@ -578,7 +578,7 @@
578
578
  core.Component({
579
579
  selector: 'aup-card-container',
580
580
  template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-icon icon=\"mat:add\"></aup-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n\n</div>\n",
581
- styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white;--command-face-icon-gap:8px;--aup-icon-width:24px;--aup-fa-icon-width:18px}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{padding-bottom:0;border-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}.aup-input-component.dense mat-form-field.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(0)}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px);--resolved-row-hover-background-color:var(--row-hover-background-color, rgba(0, 0, 0, 0.05))}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}aup-icon{--fa-icon-offset:calc((var(--aup-icon-width) - var(--aup-fa-icon-width)) / 2);position:relative}aup-icon fa-icon .svg-inline--fa{position:absolute;top:var(--fa-icon-offset);left:var(--fa-icon-offset);width:var(--aup-fa-icon-width)!important;height:var(--aup-fa-icon-width)!important}.mat-menu-panel aup-icon .svg-inline--fa{opacity:.54}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
581
+ styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white;--command-face-icon-gap:8px;--aup-icon-width:24px;--aup-fa-icon-width:18px}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.activity-outlet-wrapper{display:flex;flex-direction:column;align-items:stretch}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{padding-bottom:0;border-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}.aup-input-component.dense mat-form-field.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(0)}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px);--resolved-row-hover-background-color:var(--row-hover-background-color, rgba(0, 0, 0, 0.05))}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}aup-icon{--fa-icon-offset:calc((var(--aup-icon-width) - var(--aup-fa-icon-width)) / 2);position:relative}aup-icon fa-icon .svg-inline--fa{position:absolute;top:var(--fa-icon-offset);left:var(--fa-icon-offset);width:var(--aup-fa-icon-width)!important;height:var(--aup-fa-icon-width)!important}.mat-menu-panel aup-icon .svg-inline--fa{opacity:.54}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
582
582
  }),
583
583
  __metadata("design:paramtypes", [])
584
584
  ], CardContainerComponent);
@@ -3501,7 +3501,7 @@
3501
3501
  core.Component({
3502
3502
  selector: 'aup-activity-actions',
3503
3503
  template: "<ng-container *ngIf=\"hasCancelCommand()\">\n <button class=\"cancel\" *ngIf=\"!hasCancelText()\" mat-icon-button [pectinCommand]=\"cancelCommand\">\n <aup-icon icon=\"mat:clear\"></aup-icon>\n </button>\n <button class=\"cancel\" *ngIf=\"hasCancelText()\" mat-button [pectinCommand]=\"cancelCommand\">{{cancelText}}</button>\n</ng-container>\n<ng-container *ngIf=\"hasConfirmCommand()\">\n <button class=\"confirm\" *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\">\n <aup-icon icon=\"mat:done\"></aup-icon>\n </button>\n <button class=\"confirm\" *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n</ng-container>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n",
3504
- styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}:host.align-stretch{grid-template-areas:\"cancel content confirm\";-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}:host.align-stretch>.cancel{-ms-grid-row:1;-ms-grid-column:1}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}:host.align-stretch>.confirm{-ms-grid-row:1;-ms-grid-column:3}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}:host.align-stretch>.content{-ms-grid-row:1;-ms-grid-column:2}"]
3504
+ styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}:host.align-stretch{grid-template-areas:\"cancel content confirm\";-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}:host.align-stretch>.cancel{-ms-grid-row:1;-ms-grid-column:1}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}:host.align-stretch>.confirm{-ms-grid-row:1;-ms-grid-column:3}.column{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.column{-ms-grid-row:1;-ms-grid-column:1}:host.align-stretch>.column{-ms-grid-row:1;-ms-grid-column:2}"]
3505
3505
  })
3506
3506
  ], ActivityActionsComponent);
3507
3507
  return ActivityActionsComponent;
@@ -3513,13 +3513,27 @@
3513
3513
  function Activity() {
3514
3514
  var _this = _super !== null && _super.apply(this, arguments) || this;
3515
3515
  _this._busyModel = new pectin.DelegatingValueModel().withDefault(false);
3516
+ _this._focusedModel = _this.registerDisposable(new pectin.DelegatingValueModel());
3516
3517
  _this.class = 'aup-activity';
3517
3518
  return _this;
3518
3519
  }
3520
+ Object.defineProperty(Activity.prototype, "isFocused", {
3521
+ get: function () {
3522
+ return this._focusedModel.value;
3523
+ },
3524
+ enumerable: true,
3525
+ configurable: true
3526
+ });
3519
3527
  Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
3528
+ var _this = this;
3529
+ var _a = pectin.Dsl.disposeWith(this), chain = _a.chain, when = _a.when;
3520
3530
  typescriptUtilities.assert.isNil(this._activityContext);
3521
3531
  this._activityContext = activityContext;
3522
3532
  this._interactionContext = nestedInteractionContext;
3533
+ this._focusedModel.setDelegate(activityContext.focused);
3534
+ when(this._focusedModel).becomesTruthy(function () {
3535
+ _this.onActivityReady();
3536
+ });
3523
3537
  };
3524
3538
  Object.defineProperty(Activity.prototype, "interactionContext", {
3525
3539
  get: function () {
@@ -3545,6 +3559,13 @@
3545
3559
  enumerable: true,
3546
3560
  configurable: true
3547
3561
  });
3562
+ Object.defineProperty(Activity.prototype, "focused", {
3563
+ get: function () {
3564
+ return this._focusedModel.readonly;
3565
+ },
3566
+ enumerable: true,
3567
+ configurable: true
3568
+ });
3548
3569
  Activity.prototype.busyWhile = function (busyModel) {
3549
3570
  this._busyModel.setDelegate(busyModel);
3550
3571
  };
@@ -3558,6 +3579,11 @@
3558
3579
  core.HostBinding('class'),
3559
3580
  __metadata("design:type", Object)
3560
3581
  ], Activity.prototype, "class", void 0);
3582
+ __decorate([
3583
+ core.HostBinding('attr.focused'),
3584
+ __metadata("design:type", Object),
3585
+ __metadata("design:paramtypes", [])
3586
+ ], Activity.prototype, "isFocused", null);
3561
3587
  return Activity;
3562
3588
  }(DisposableComponent));
3563
3589
 
@@ -3696,6 +3722,7 @@
3696
3722
  this.onComplete = onComplete;
3697
3723
  this._complete = false;
3698
3724
  this.deferredResult = pectin.Deferred.defer();
3725
+ this.focusedModel = new pectin.MutableValueModel();
3699
3726
  }
3700
3727
  ActivityRef.prototype.isActivityRealised = function () {
3701
3728
  return !!this._activity;
@@ -3711,6 +3738,16 @@
3711
3738
  enumerable: true,
3712
3739
  configurable: true
3713
3740
  });
3741
+ ActivityRef.prototype.setFocused = function (focused) {
3742
+ this.focusedModel.value = focused;
3743
+ };
3744
+ Object.defineProperty(ActivityRef.prototype, "focused", {
3745
+ get: function () {
3746
+ return this.focusedModel.value;
3747
+ },
3748
+ enumerable: true,
3749
+ configurable: true
3750
+ });
3714
3751
  ActivityRef.prototype.notifyActivityCreated = function (activity, nestedInteractionContext) {
3715
3752
  pectin.assert.isNil(this._activity);
3716
3753
  this._activity = activity;
@@ -3721,7 +3758,8 @@
3721
3758
  },
3722
3759
  onCancel: function (error) {
3723
3760
  self.finishActivity(function (deferred) { return deferred.reject(error); });
3724
- }
3761
+ },
3762
+ focused: this.focusedModel.readonly
3725
3763
  });
3726
3764
  };
3727
3765
  ActivityRef.prototype.finishActivity = function (resolveOrReject) {
@@ -3752,7 +3790,6 @@
3752
3790
  this.componentFactoryResolver = componentFactoryResolver;
3753
3791
  this.viewContainerRef = viewContainerRef;
3754
3792
  this.injector = injector;
3755
- this._disableAnimation = false;
3756
3793
  }
3757
3794
  Object.defineProperty(ActivityOutletComponent.prototype, "activityRef", {
3758
3795
  get: function () {
@@ -3823,13 +3860,9 @@
3823
3860
  function ActivityContainerComponent() {
3824
3861
  var _this = _super.call(this) || this;
3825
3862
  _this.dynamicHeight = false;
3826
- _this.activityTabs = [];
3863
+ _this.activityRefs = [];
3827
3864
  _this.garbage = new pectin.GarbageCollector();
3828
- // We have issues where angular is triggering a leave animation when an
3829
- // new activity is started, but is not running the enter animation
3830
- // when it is scrolled back into view. So we track the tab changes and
3831
- // disable all animations inside the tab while we're animating.
3832
- _this.inTabChange = new pectin.MutableValueModel(false);
3865
+ _this.inAnimation = new pectin.MutableValueModel(false);
3833
3866
  return _this;
3834
3867
  }
3835
3868
  ActivityContainerComponent.prototype.ngOnInit = function () {
@@ -3878,7 +3911,7 @@
3878
3911
  if (!this.isActive()) {
3879
3912
  typescriptUtilities.lang.illegalState('no activity in progress');
3880
3913
  }
3881
- return ___default__default.findLast(this.activityTabs, function (tab) { return !tab.isComplete(); });
3914
+ return ___default__default.findLast(this.activityRefs, function (tab) { return !tab.isComplete(); });
3882
3915
  };
3883
3916
  /**
3884
3917
  * Cancels the current activity and returns true the context is no longer active, false if
@@ -3917,14 +3950,14 @@
3917
3950
  });
3918
3951
  this.launchActivity(activityRef);
3919
3952
  // if this is the first activity let the interaction service know.
3920
- if (this.activityTabs.length === 1) {
3953
+ if (this.activityRefs.length === 1) {
3921
3954
  // console.log('Now active!!!');
3922
3955
  this.interactionServiceApi.notifyActive(this);
3923
3956
  }
3924
3957
  return activityRef.activityResult;
3925
3958
  };
3926
3959
  ActivityContainerComponent.prototype.getActiveActivityCount = function () {
3927
- return this.activityTabs.filter(function (ref) { return !ref.isComplete(); }).length;
3960
+ return this.activityRefs.filter(function (ref) { return !ref.isComplete(); }).length;
3928
3961
  };
3929
3962
  /**
3930
3963
  * Checks if this interaction context has finished an is in the process of waiting
@@ -3951,7 +3984,7 @@
3951
3984
  // Without this our animation done wasn't called when a single
3952
3985
  // new activity followed a single tab activity (since we're tracking
3953
3986
  // by activity index)
3954
- this.activityTabs = [];
3987
+ this.activityRefs = [];
3955
3988
  var promise = this.interactionServiceApi.notifyFinished(this);
3956
3989
  this._deferredCleanUp = promise
3957
3990
  .finally(function () {
@@ -3961,8 +3994,8 @@
3961
3994
  };
3962
3995
  // @Trace()
3963
3996
  ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
3964
- var cleanedTabs = this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
3965
- this.activityTabs = cleanedTabs.concat(activityRef);
3997
+ var cleanedTabs = this.activityRefs.filter(function (tab) { return !tab.isComplete(); });
3998
+ this.activityRefs = cleanedTabs.concat(activityRef);
3966
3999
  this.synchroniseSelectedTabIndex();
3967
4000
  };
3968
4001
  ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
@@ -3975,7 +4008,6 @@
3975
4008
  this.onAnimationFinishedJob();
3976
4009
  this.onAnimationFinishedJob = undefined;
3977
4010
  }
3978
- this.inTabChange.value = false;
3979
4011
  };
3980
4012
  /**
3981
4013
  * Synchronises the selected tab index.
@@ -3986,11 +4018,15 @@
3986
4018
  var previousIndex = this.tabs.selectedIndex;
3987
4019
  var newIndex = this.getActiveActivityCount() - 1;
3988
4020
  if (previousIndex !== newIndex) {
3989
- this.inTabChange.value = true;
4021
+ this.inAnimation.value = true;
4022
+ this.activityRefs[newIndex].setFocused(false);
3990
4023
  this.tabs.selectedIndex = newIndex;
3991
4024
  this.onAnimationFinishedJob = function () {
3992
- _this.getSelectedOutlet().component.onActivityReady();
3993
- _this.activityTabs = _this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
4025
+ _this.activityRefs = _this.activityRefs.filter(function (tab) { return !tab.isComplete(); });
4026
+ _this.inAnimation.value = false;
4027
+ _this.activityRefs.forEach(function (ref, index) {
4028
+ ref.setFocused(index === newIndex);
4029
+ });
3994
4030
  };
3995
4031
  }
3996
4032
  };
@@ -4027,7 +4063,7 @@
4027
4063
  ActivityContainerComponent = __decorate([
4028
4064
  core.Component({
4029
4065
  selector: 'aup-activity-container',
4030
- template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs; let i = index; trackBy: activityIndex\"\n [@.disabled]=\"inTabChange.value || i !== getSelectedTabIndex()\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
4066
+ template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we're animating.\n -->\n <div class=\"activity-outlet-wrapper\" [@.disabled]=\"!activityRef.focused\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"activityRef\"></aup-activity-outlet>\n </div>\n </mat-tab>\n</mat-tab-group>\n",
4031
4067
  styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
4032
4068
  }),
4033
4069
  __metadata("design:paramtypes", [])
@@ -5098,6 +5134,9 @@
5098
5134
  var _this = _super.call(this) || this;
5099
5135
  _this.visitModel = new pectin.MutableValueModel();
5100
5136
  _this._inVisitUpdate = new pectin.Guard();
5137
+ _this._active = new pectin.MutableValueModel(false);
5138
+ var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
5139
+ when(_this._active).becomesTruthy(function () { return _this.onPlaceReady(); });
5101
5140
  return _this;
5102
5141
  }
5103
5142
  PlaceComponent_1 = PlaceComponent;
@@ -5155,6 +5194,19 @@
5155
5194
  enumerable: true,
5156
5195
  configurable: true
5157
5196
  });
5197
+ Object.defineProperty(PlaceComponent.prototype, "active", {
5198
+ get: function () {
5199
+ return this._active.readonly;
5200
+ },
5201
+ enumerable: true,
5202
+ configurable: true
5203
+ });
5204
+ /**
5205
+ * Called by the router when the place is ready to interact after any animations have run.
5206
+ */
5207
+ PlaceComponent.prototype._notifyActive = function (active) {
5208
+ this._active.value = active;
5209
+ };
5158
5210
  PlaceComponent.prototype.onPlaceReady = function () {
5159
5211
  };
5160
5212
  var PlaceComponent_1;
@@ -6692,6 +6744,7 @@
6692
6744
  _this._activePlaceModel = new pectin.MutableValueModel();
6693
6745
  _this.initialPlaceIndex = null;
6694
6746
  _this._isPushingVisitToRoute = new pectin.MutableValueModel(false);
6747
+ _this.isVeryFirstLoad = true;
6695
6748
  var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
6696
6749
  _this.parentOutletModel = new pectin.MutableValueModel(parentOutlet);
6697
6750
  var defaultPlaceAnimationOrder = chain(_this.parentOutletModel)
@@ -6700,8 +6753,9 @@
6700
6753
  .pluckList('children')
6701
6754
  .pluck('component');
6702
6755
  var activatePlaceType = chain(_this.activePlaceModel).map(function (p) { return p.constructor; });
6703
- _this.placeAnimationOrder = chain(_this.customPlaceAnimationOrderModel)
6704
- .otherwise(defaultPlaceAnimationOrder)
6756
+ _this.placesInAnimationOrder = chain(_this.customPlaceAnimationOrderModel)
6757
+ .otherwise(defaultPlaceAnimationOrder);
6758
+ _this.activePlaceAnimationPosition = _this.placesInAnimationOrder
6705
6759
  .reduce(function (placesInOrder) {
6706
6760
  var placeIndex = 0;
6707
6761
  if (activatePlaceType.value) {
@@ -6712,14 +6766,16 @@
6712
6766
  }
6713
6767
  return ___default.isNil(_this.initialPlaceIndex) ? 0 : placeIndex - _this.initialPlaceIndex;
6714
6768
  }, { dependsOn: activatePlaceType });
6769
+ _this.animationSupported = _this.placesInAnimationOrder.count().isGreaterThan(0);
6770
+ _this.animationEnabled = valueOf.all(_this.animateModel, _this.animationSupported).areTruthy();
6715
6771
  // Extract our visit model from the place router.
6716
6772
  _this._activePlaceDefinition = chain(_this._activePlaceModel).pluck('placeDefinition');
6717
6773
  _this.routerVisitModel = _this._activePlaceDefinition.findIn(chain(placeRouter.activeVisitsByPlaceDefinition));
6718
6774
  _this.navigationInProgress = chain(_this.placeRouter.navigationInProgress);
6719
- when.valueOf(_this.navigationInProgress).becomesFalsey(function () {
6775
+ when(_this.navigationInProgress).becomesFalsey(function () {
6720
6776
  _this.checkStateAndInitialise();
6721
6777
  });
6722
- when.valueOf(_this.outletActivated).becomesTruthy(function () {
6778
+ when(_this.outletActivated).becomesTruthy(function () {
6723
6779
  _this.checkStateAndInitialise();
6724
6780
  });
6725
6781
  chain(_this._activePlaceModel)
@@ -6732,7 +6788,7 @@
6732
6788
  };
6733
6789
  // @Trace()
6734
6790
  PlaceOutletComponent.prototype.getAnimationOrder = function () {
6735
- return this.placeAnimationOrder.value;
6791
+ return this.activePlaceAnimationPosition.value;
6736
6792
  };
6737
6793
  Object.defineProperty(PlaceOutletComponent.prototype, "animationDuration", {
6738
6794
  get: function () {
@@ -6743,7 +6799,10 @@
6743
6799
  });
6744
6800
  // @Trace()
6745
6801
  PlaceOutletComponent.prototype.navigate = function (visit) {
6746
- // console.log({ activatedRoute: this._activatedRouteModel.value });
6802
+ // const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);
6803
+ // if (!place) {
6804
+ // lang.illegalState()
6805
+ // }
6747
6806
  this.placeRouter.navigate(visit, {
6748
6807
  relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null
6749
6808
  });
@@ -6769,14 +6828,25 @@
6769
6828
  enumerable: true,
6770
6829
  configurable: true
6771
6830
  });
6772
- // @Trace()
6773
6831
  PlaceOutletComponent.prototype.onOutletActivated = function (routerOutlet, place) {
6774
6832
  this._activatedRouteModel.value = routerOutlet.activatedRoute;
6775
6833
  this._activePlaceModel.value = place;
6834
+ this.validateAnimationState(place);
6776
6835
  this.outletActivated.value = true;
6777
6836
  this.checkStateAndInitialise();
6778
6837
  };
6779
- // @Trace()
6838
+ PlaceOutletComponent.prototype.validateAnimationState = function (place) {
6839
+ if (this.animateModel.value) {
6840
+ if (this.placesInAnimationOrder.length < 1) {
6841
+ console.error('PlaceOutlet.animate === true but placeAnimationOrder has not been set. Animation is disabled.');
6842
+ }
6843
+ else {
6844
+ if (!this.placesInAnimationOrder.query().includes(place.placeDefinition.component)) {
6845
+ console.error("PlaceOutlet.animate === true but placeAnimationOrder doesn't contain " + place.placeDefinition.component.name + ".");
6846
+ }
6847
+ }
6848
+ }
6849
+ };
6780
6850
  PlaceOutletComponent.prototype.onOutletDeactivated = function () {
6781
6851
  this.outletActivated.value = false;
6782
6852
  this._activePlaceModel.value = null;
@@ -6793,7 +6863,6 @@
6793
6863
  this.initialisePlace(routerVisit, activePlace);
6794
6864
  }
6795
6865
  };
6796
- // @Trace()
6797
6866
  PlaceOutletComponent.prototype.initialisePlace = function (routerVisit, activePlace) {
6798
6867
  var _this = this;
6799
6868
  var visitModel = new pectin.MutableValueModel(routerVisit);
@@ -6801,9 +6870,18 @@
6801
6870
  activePlace.initialiseVisit(routerVisit, function (current, previous) {
6802
6871
  _this.pushVisitChangeToRoute(previous, current);
6803
6872
  });
6804
- if (!this.animateModel.value) {
6805
- // we're not animating so trigger any post animation callbacks now.
6806
- this.animationDone();
6873
+ var finishPlaceLoad = function () {
6874
+ _this._activePlaceModel.value._notifyActive(true);
6875
+ };
6876
+ if (!this.animationEnabled.value || this.isVeryFirstLoad) {
6877
+ // if animation is disabled or this is the very first load then
6878
+ // we won't get our animation done callback so we finish the
6879
+ // process here and now.
6880
+ this.isVeryFirstLoad = false;
6881
+ finishPlaceLoad();
6882
+ }
6883
+ else {
6884
+ this.onAnimationFinishedJob = finishPlaceLoad;
6807
6885
  }
6808
6886
  var _a = pectin.Dsl.disposeWith(activePlace), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
6809
6887
  when.valueOf(this.routerVisitModel)
@@ -6826,8 +6904,9 @@
6826
6904
  };
6827
6905
  // @Trace()
6828
6906
  PlaceOutletComponent.prototype.animationDone = function () {
6829
- if (this._activePlaceModel.value) {
6830
- this._activePlaceModel.value.onPlaceReady();
6907
+ if (this.onAnimationFinishedJob) {
6908
+ this.onAnimationFinishedJob();
6909
+ this.onAnimationFinishedJob = undefined;
6831
6910
  }
6832
6911
  };
6833
6912
  PlaceOutletComponent.ctorParameters = function () { return [
@@ -6860,10 +6939,22 @@
6860
6939
  core.ViewChild('routeOutlet', { static: true }),
6861
6940
  __metadata("design:type", router.RouterOutlet)
6862
6941
  ], PlaceOutletComponent.prototype, "routerOut", void 0);
6942
+ __decorate([
6943
+ pectin.Trace(),
6944
+ __metadata("design:type", Function),
6945
+ __metadata("design:paramtypes", [router.RouterOutlet, exports.PlaceComponent]),
6946
+ __metadata("design:returntype", void 0)
6947
+ ], PlaceOutletComponent.prototype, "onOutletActivated", null);
6948
+ __decorate([
6949
+ pectin.Trace(),
6950
+ __metadata("design:type", Function),
6951
+ __metadata("design:paramtypes", []),
6952
+ __metadata("design:returntype", void 0)
6953
+ ], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
6863
6954
  PlaceOutletComponent = __decorate([
6864
6955
  core.Component({
6865
6956
  selector: 'aup-place-outlet',
6866
- template: "<ng-container *ngIf=\"animateModel.value\">\n <div class=\"router-outlet-container\" cdkScrollable\n [@routeAnimations]=\"{value: getAnimationOrder(), params:{duration: animationDuration}}\"\n (@routeAnimations.start)=\"animationStarted()\"\n (@routeAnimations.done)=\"animationDone()\"\n >\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"!animateModel.value\">\n <div class=\"router-outlet-container\" cdkScrollable>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n",
6957
+ template: "<ng-container *ngIf=\"animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable\n [@routeAnimations]=\"{value: getAnimationOrder(), params:{duration: animationDuration}}\"\n (@routeAnimations.start)=\"animationStarted()\"\n (@routeAnimations.done)=\"animationDone()\"\n >\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"!animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n",
6867
6958
  animations: [LEFT_RIGHT_PLACE_ANIMATION],
6868
6959
  styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0;overflow-x:hidden;overflow-y:scroll}router-outlet{display:none}"]
6869
6960
  }),