@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
|
@@ -409,7 +409,7 @@ var CardContainerComponent = /** @class */ (function (_super) {
|
|
|
409
409
|
Component({
|
|
410
410
|
selector: 'aup-card-container',
|
|
411
411
|
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",
|
|
412
|
-
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}"]
|
|
412
|
+
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}"]
|
|
413
413
|
}),
|
|
414
414
|
__metadata("design:paramtypes", [])
|
|
415
415
|
], CardContainerComponent);
|
|
@@ -3344,13 +3344,27 @@ var Activity = /** @class */ (function (_super) {
|
|
|
3344
3344
|
function Activity() {
|
|
3345
3345
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
3346
3346
|
_this._busyModel = new DelegatingValueModel().withDefault(false);
|
|
3347
|
+
_this._focusedModel = _this.registerDisposable(new DelegatingValueModel());
|
|
3347
3348
|
_this.class = 'aup-activity';
|
|
3348
3349
|
return _this;
|
|
3349
3350
|
}
|
|
3351
|
+
Object.defineProperty(Activity.prototype, "isFocused", {
|
|
3352
|
+
get: function () {
|
|
3353
|
+
return this._focusedModel.value;
|
|
3354
|
+
},
|
|
3355
|
+
enumerable: true,
|
|
3356
|
+
configurable: true
|
|
3357
|
+
});
|
|
3350
3358
|
Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
|
|
3359
|
+
var _this = this;
|
|
3360
|
+
var _a = Dsl.disposeWith(this), chain = _a.chain, when = _a.when;
|
|
3351
3361
|
assert$1.isNil(this._activityContext);
|
|
3352
3362
|
this._activityContext = activityContext;
|
|
3353
3363
|
this._interactionContext = nestedInteractionContext;
|
|
3364
|
+
this._focusedModel.setDelegate(activityContext.focused);
|
|
3365
|
+
when(this._focusedModel).becomesTruthy(function () {
|
|
3366
|
+
_this.onActivityReady();
|
|
3367
|
+
});
|
|
3354
3368
|
};
|
|
3355
3369
|
Object.defineProperty(Activity.prototype, "interactionContext", {
|
|
3356
3370
|
get: function () {
|
|
@@ -3376,6 +3390,13 @@ var Activity = /** @class */ (function (_super) {
|
|
|
3376
3390
|
enumerable: true,
|
|
3377
3391
|
configurable: true
|
|
3378
3392
|
});
|
|
3393
|
+
Object.defineProperty(Activity.prototype, "focused", {
|
|
3394
|
+
get: function () {
|
|
3395
|
+
return this._focusedModel.readonly;
|
|
3396
|
+
},
|
|
3397
|
+
enumerable: true,
|
|
3398
|
+
configurable: true
|
|
3399
|
+
});
|
|
3379
3400
|
Activity.prototype.busyWhile = function (busyModel) {
|
|
3380
3401
|
this._busyModel.setDelegate(busyModel);
|
|
3381
3402
|
};
|
|
@@ -3389,6 +3410,11 @@ var Activity = /** @class */ (function (_super) {
|
|
|
3389
3410
|
HostBinding('class'),
|
|
3390
3411
|
__metadata("design:type", Object)
|
|
3391
3412
|
], Activity.prototype, "class", void 0);
|
|
3413
|
+
__decorate([
|
|
3414
|
+
HostBinding('attr.focused'),
|
|
3415
|
+
__metadata("design:type", Object),
|
|
3416
|
+
__metadata("design:paramtypes", [])
|
|
3417
|
+
], Activity.prototype, "isFocused", null);
|
|
3392
3418
|
return Activity;
|
|
3393
3419
|
}(DisposableComponent));
|
|
3394
3420
|
|
|
@@ -3527,6 +3553,7 @@ var ActivityRef = /** @class */ (function () {
|
|
|
3527
3553
|
this.onComplete = onComplete;
|
|
3528
3554
|
this._complete = false;
|
|
3529
3555
|
this.deferredResult = Deferred.defer();
|
|
3556
|
+
this.focusedModel = new MutableValueModel();
|
|
3530
3557
|
}
|
|
3531
3558
|
ActivityRef.prototype.isActivityRealised = function () {
|
|
3532
3559
|
return !!this._activity;
|
|
@@ -3542,6 +3569,16 @@ var ActivityRef = /** @class */ (function () {
|
|
|
3542
3569
|
enumerable: true,
|
|
3543
3570
|
configurable: true
|
|
3544
3571
|
});
|
|
3572
|
+
ActivityRef.prototype.setFocused = function (focused) {
|
|
3573
|
+
this.focusedModel.value = focused;
|
|
3574
|
+
};
|
|
3575
|
+
Object.defineProperty(ActivityRef.prototype, "focused", {
|
|
3576
|
+
get: function () {
|
|
3577
|
+
return this.focusedModel.value;
|
|
3578
|
+
},
|
|
3579
|
+
enumerable: true,
|
|
3580
|
+
configurable: true
|
|
3581
|
+
});
|
|
3545
3582
|
ActivityRef.prototype.notifyActivityCreated = function (activity, nestedInteractionContext) {
|
|
3546
3583
|
assert.isNil(this._activity);
|
|
3547
3584
|
this._activity = activity;
|
|
@@ -3552,7 +3589,8 @@ var ActivityRef = /** @class */ (function () {
|
|
|
3552
3589
|
},
|
|
3553
3590
|
onCancel: function (error) {
|
|
3554
3591
|
self.finishActivity(function (deferred) { return deferred.reject(error); });
|
|
3555
|
-
}
|
|
3592
|
+
},
|
|
3593
|
+
focused: this.focusedModel.readonly
|
|
3556
3594
|
});
|
|
3557
3595
|
};
|
|
3558
3596
|
ActivityRef.prototype.finishActivity = function (resolveOrReject) {
|
|
@@ -3583,7 +3621,6 @@ var ActivityOutletComponent = /** @class */ (function () {
|
|
|
3583
3621
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
3584
3622
|
this.viewContainerRef = viewContainerRef;
|
|
3585
3623
|
this.injector = injector;
|
|
3586
|
-
this._disableAnimation = false;
|
|
3587
3624
|
}
|
|
3588
3625
|
Object.defineProperty(ActivityOutletComponent.prototype, "activityRef", {
|
|
3589
3626
|
get: function () {
|
|
@@ -3654,13 +3691,13 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3654
3691
|
function ActivityContainerComponent() {
|
|
3655
3692
|
var _this = _super.call(this) || this;
|
|
3656
3693
|
_this.dynamicHeight = false;
|
|
3657
|
-
_this.
|
|
3694
|
+
_this.activityRefs = [];
|
|
3658
3695
|
_this.garbage = new GarbageCollector();
|
|
3659
3696
|
// We have issues where angular is triggering a leave animation when an
|
|
3660
3697
|
// new activity is started, but is not running the enter animation
|
|
3661
3698
|
// when it is scrolled back into view. So we track the tab changes and
|
|
3662
3699
|
// disable all animations inside the tab while we're animating.
|
|
3663
|
-
_this.
|
|
3700
|
+
_this.inAnimation = new MutableValueModel(false);
|
|
3664
3701
|
return _this;
|
|
3665
3702
|
}
|
|
3666
3703
|
ActivityContainerComponent.prototype.ngOnInit = function () {
|
|
@@ -3709,7 +3746,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3709
3746
|
if (!this.isActive()) {
|
|
3710
3747
|
lang$1.illegalState('no activity in progress');
|
|
3711
3748
|
}
|
|
3712
|
-
return ___default.findLast(this.
|
|
3749
|
+
return ___default.findLast(this.activityRefs, function (tab) { return !tab.isComplete(); });
|
|
3713
3750
|
};
|
|
3714
3751
|
/**
|
|
3715
3752
|
* Cancels the current activity and returns true the context is no longer active, false if
|
|
@@ -3748,14 +3785,14 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3748
3785
|
});
|
|
3749
3786
|
this.launchActivity(activityRef);
|
|
3750
3787
|
// if this is the first activity let the interaction service know.
|
|
3751
|
-
if (this.
|
|
3788
|
+
if (this.activityRefs.length === 1) {
|
|
3752
3789
|
// console.log('Now active!!!');
|
|
3753
3790
|
this.interactionServiceApi.notifyActive(this);
|
|
3754
3791
|
}
|
|
3755
3792
|
return activityRef.activityResult;
|
|
3756
3793
|
};
|
|
3757
3794
|
ActivityContainerComponent.prototype.getActiveActivityCount = function () {
|
|
3758
|
-
return this.
|
|
3795
|
+
return this.activityRefs.filter(function (ref) { return !ref.isComplete(); }).length;
|
|
3759
3796
|
};
|
|
3760
3797
|
/**
|
|
3761
3798
|
* Checks if this interaction context has finished an is in the process of waiting
|
|
@@ -3782,7 +3819,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3782
3819
|
// Without this our animation done wasn't called when a single
|
|
3783
3820
|
// new activity followed a single tab activity (since we're tracking
|
|
3784
3821
|
// by activity index)
|
|
3785
|
-
this.
|
|
3822
|
+
this.activityRefs = [];
|
|
3786
3823
|
var promise = this.interactionServiceApi.notifyFinished(this);
|
|
3787
3824
|
this._deferredCleanUp = promise
|
|
3788
3825
|
.finally(function () {
|
|
@@ -3792,8 +3829,8 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3792
3829
|
};
|
|
3793
3830
|
// @Trace()
|
|
3794
3831
|
ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
|
|
3795
|
-
var cleanedTabs = this.
|
|
3796
|
-
this.
|
|
3832
|
+
var cleanedTabs = this.activityRefs.filter(function (tab) { return !tab.isComplete(); });
|
|
3833
|
+
this.activityRefs = cleanedTabs.concat(activityRef);
|
|
3797
3834
|
this.synchroniseSelectedTabIndex();
|
|
3798
3835
|
};
|
|
3799
3836
|
ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
|
|
@@ -3806,7 +3843,6 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3806
3843
|
this.onAnimationFinishedJob();
|
|
3807
3844
|
this.onAnimationFinishedJob = undefined;
|
|
3808
3845
|
}
|
|
3809
|
-
this.inTabChange.value = false;
|
|
3810
3846
|
};
|
|
3811
3847
|
/**
|
|
3812
3848
|
* Synchronises the selected tab index.
|
|
@@ -3817,11 +3853,14 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3817
3853
|
var previousIndex = this.tabs.selectedIndex;
|
|
3818
3854
|
var newIndex = this.getActiveActivityCount() - 1;
|
|
3819
3855
|
if (previousIndex !== newIndex) {
|
|
3820
|
-
this.
|
|
3856
|
+
this.inAnimation.value = true;
|
|
3821
3857
|
this.tabs.selectedIndex = newIndex;
|
|
3822
3858
|
this.onAnimationFinishedJob = function () {
|
|
3823
|
-
_this.
|
|
3824
|
-
_this.
|
|
3859
|
+
_this.activityRefs = _this.activityRefs.filter(function (tab) { return !tab.isComplete(); });
|
|
3860
|
+
_this.inAnimation.value = false;
|
|
3861
|
+
_this.activityRefs.forEach(function (ref, index) {
|
|
3862
|
+
ref.setFocused(index === newIndex);
|
|
3863
|
+
});
|
|
3825
3864
|
};
|
|
3826
3865
|
}
|
|
3827
3866
|
};
|
|
@@ -3858,7 +3897,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3858
3897
|
ActivityContainerComponent = __decorate([
|
|
3859
3898
|
Component({
|
|
3860
3899
|
selector: 'aup-activity-container',
|
|
3861
|
-
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of
|
|
3900
|
+
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",
|
|
3862
3901
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
3863
3902
|
}),
|
|
3864
3903
|
__metadata("design:paramtypes", [])
|