@coolon/angular-ui-powerups 2.0.0-alpha.32 → 2.0.0-alpha.33
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.
- package/CHANGELOG.md +7 -0
- package/assets/interaction.scss +5 -0
- package/assets/tabs.scss +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +55 -16
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/card-container/card-container.component.js +1 -1
- package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
- package/esm2015/lib/interaction/activity-ref.js +10 -2
- package/esm2015/lib/interaction/activity-ref.js.map +1 -1
- package/esm2015/lib/interaction/activity-ref.metadata.json +1 -1
- package/esm2015/lib/interaction/activity.js +18 -1
- package/esm2015/lib/interaction/activity.js.map +1 -1
- package/esm2015/lib/interaction/activity.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +15 -13
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +0 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/card-container/card-container.component.js +1 -1
- package/esm5/lib/interaction/activity-ref.js +14 -2
- package/esm5/lib/interaction/activity-ref.js.map +1 -1
- package/esm5/lib/interaction/activity.js +27 -1
- package/esm5/lib/interaction/activity.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +15 -13
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +0 -1
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +42 -16
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +55 -16
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/interaction/activity-ref.d.ts +3 -0
- package/lib/interaction/activity.d.ts +6 -2
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -2
- package/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.d.ts +0 -1
- 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
|
+
## [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)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* added ee tests ([c850250](https://bitbucket.org/coolon/angular-ui-powerups/commit/c850250c4aabb1571eef62016c512bf5b3ced5ba))
|
|
11
|
+
|
|
5
12
|
## [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
13
|
|
|
7
14
|
|
package/assets/interaction.scss
CHANGED
package/assets/tabs.scss
CHANGED
|
@@ -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);
|
|
@@ -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,13 @@
|
|
|
3823
3860
|
function ActivityContainerComponent() {
|
|
3824
3861
|
var _this = _super.call(this) || this;
|
|
3825
3862
|
_this.dynamicHeight = false;
|
|
3826
|
-
_this.
|
|
3863
|
+
_this.activityRefs = [];
|
|
3827
3864
|
_this.garbage = new pectin.GarbageCollector();
|
|
3828
3865
|
// We have issues where angular is triggering a leave animation when an
|
|
3829
3866
|
// new activity is started, but is not running the enter animation
|
|
3830
3867
|
// when it is scrolled back into view. So we track the tab changes and
|
|
3831
3868
|
// disable all animations inside the tab while we're animating.
|
|
3832
|
-
_this.
|
|
3869
|
+
_this.inAnimation = new pectin.MutableValueModel(false);
|
|
3833
3870
|
return _this;
|
|
3834
3871
|
}
|
|
3835
3872
|
ActivityContainerComponent.prototype.ngOnInit = function () {
|
|
@@ -3878,7 +3915,7 @@
|
|
|
3878
3915
|
if (!this.isActive()) {
|
|
3879
3916
|
typescriptUtilities.lang.illegalState('no activity in progress');
|
|
3880
3917
|
}
|
|
3881
|
-
return ___default__default.findLast(this.
|
|
3918
|
+
return ___default__default.findLast(this.activityRefs, function (tab) { return !tab.isComplete(); });
|
|
3882
3919
|
};
|
|
3883
3920
|
/**
|
|
3884
3921
|
* Cancels the current activity and returns true the context is no longer active, false if
|
|
@@ -3917,14 +3954,14 @@
|
|
|
3917
3954
|
});
|
|
3918
3955
|
this.launchActivity(activityRef);
|
|
3919
3956
|
// if this is the first activity let the interaction service know.
|
|
3920
|
-
if (this.
|
|
3957
|
+
if (this.activityRefs.length === 1) {
|
|
3921
3958
|
// console.log('Now active!!!');
|
|
3922
3959
|
this.interactionServiceApi.notifyActive(this);
|
|
3923
3960
|
}
|
|
3924
3961
|
return activityRef.activityResult;
|
|
3925
3962
|
};
|
|
3926
3963
|
ActivityContainerComponent.prototype.getActiveActivityCount = function () {
|
|
3927
|
-
return this.
|
|
3964
|
+
return this.activityRefs.filter(function (ref) { return !ref.isComplete(); }).length;
|
|
3928
3965
|
};
|
|
3929
3966
|
/**
|
|
3930
3967
|
* Checks if this interaction context has finished an is in the process of waiting
|
|
@@ -3951,7 +3988,7 @@
|
|
|
3951
3988
|
// Without this our animation done wasn't called when a single
|
|
3952
3989
|
// new activity followed a single tab activity (since we're tracking
|
|
3953
3990
|
// by activity index)
|
|
3954
|
-
this.
|
|
3991
|
+
this.activityRefs = [];
|
|
3955
3992
|
var promise = this.interactionServiceApi.notifyFinished(this);
|
|
3956
3993
|
this._deferredCleanUp = promise
|
|
3957
3994
|
.finally(function () {
|
|
@@ -3961,8 +3998,8 @@
|
|
|
3961
3998
|
};
|
|
3962
3999
|
// @Trace()
|
|
3963
4000
|
ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
|
|
3964
|
-
var cleanedTabs = this.
|
|
3965
|
-
this.
|
|
4001
|
+
var cleanedTabs = this.activityRefs.filter(function (tab) { return !tab.isComplete(); });
|
|
4002
|
+
this.activityRefs = cleanedTabs.concat(activityRef);
|
|
3966
4003
|
this.synchroniseSelectedTabIndex();
|
|
3967
4004
|
};
|
|
3968
4005
|
ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
|
|
@@ -3975,7 +4012,6 @@
|
|
|
3975
4012
|
this.onAnimationFinishedJob();
|
|
3976
4013
|
this.onAnimationFinishedJob = undefined;
|
|
3977
4014
|
}
|
|
3978
|
-
this.inTabChange.value = false;
|
|
3979
4015
|
};
|
|
3980
4016
|
/**
|
|
3981
4017
|
* Synchronises the selected tab index.
|
|
@@ -3986,11 +4022,14 @@
|
|
|
3986
4022
|
var previousIndex = this.tabs.selectedIndex;
|
|
3987
4023
|
var newIndex = this.getActiveActivityCount() - 1;
|
|
3988
4024
|
if (previousIndex !== newIndex) {
|
|
3989
|
-
this.
|
|
4025
|
+
this.inAnimation.value = true;
|
|
3990
4026
|
this.tabs.selectedIndex = newIndex;
|
|
3991
4027
|
this.onAnimationFinishedJob = function () {
|
|
3992
|
-
_this.
|
|
3993
|
-
_this.
|
|
4028
|
+
_this.activityRefs = _this.activityRefs.filter(function (tab) { return !tab.isComplete(); });
|
|
4029
|
+
_this.inAnimation.value = false;
|
|
4030
|
+
_this.activityRefs.forEach(function (ref, index) {
|
|
4031
|
+
ref.setFocused(index === newIndex);
|
|
4032
|
+
});
|
|
3994
4033
|
};
|
|
3995
4034
|
}
|
|
3996
4035
|
};
|
|
@@ -4027,7 +4066,7 @@
|
|
|
4027
4066
|
ActivityContainerComponent = __decorate([
|
|
4028
4067
|
core.Component({
|
|
4029
4068
|
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
|
|
4069
|
+
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityRefs; let i = index; trackBy: activityIndex\">\n <div class=\"activity-outlet-wrapper\" [@.disabled]=\"inAnimation.value || !tab.focused\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\"\n [activityRef]=\"tab\"></aup-activity-outlet>\n </div>\n </mat-tab>\n</mat-tab-group>\n",
|
|
4031
4070
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
4032
4071
|
}),
|
|
4033
4072
|
__metadata("design:paramtypes", [])
|