@coolon/angular-ui-powerups 2.0.0-alpha.31 → 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 +14 -0
- package/assets/interaction.scss +5 -0
- package/assets/tabs.scss +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +56 -34
- 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 +16 -14
- 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 +1 -15
- 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 +16 -14
- 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 +1 -19
- 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 +43 -30
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +56 -34
- 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 -3
- 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 () {
|
|
@@ -3600,17 +3637,6 @@ var ActivityOutletComponent = /** @class */ (function () {
|
|
|
3600
3637
|
configurable: true
|
|
3601
3638
|
});
|
|
3602
3639
|
;
|
|
3603
|
-
Object.defineProperty(ActivityOutletComponent.prototype, "disableAnimation", {
|
|
3604
|
-
get: function () {
|
|
3605
|
-
return this._disableAnimation;
|
|
3606
|
-
},
|
|
3607
|
-
set: function (value) {
|
|
3608
|
-
// console.log({disableAnimation: value});
|
|
3609
|
-
this._disableAnimation = value;
|
|
3610
|
-
},
|
|
3611
|
-
enumerable: true,
|
|
3612
|
-
configurable: true
|
|
3613
|
-
});
|
|
3614
3640
|
ActivityOutletComponent.prototype.ngOnInit = function () {
|
|
3615
3641
|
};
|
|
3616
3642
|
ActivityOutletComponent.prototype.loadActivity = function (activityRef) {
|
|
@@ -3647,12 +3673,6 @@ var ActivityOutletComponent = /** @class */ (function () {
|
|
|
3647
3673
|
__metadata("design:type", ActivityRef),
|
|
3648
3674
|
__metadata("design:paramtypes", [ActivityRef])
|
|
3649
3675
|
], ActivityOutletComponent.prototype, "activityRef", null);
|
|
3650
|
-
__decorate([
|
|
3651
|
-
Input(),
|
|
3652
|
-
HostBinding('@.disabled'),
|
|
3653
|
-
__metadata("design:type", Boolean),
|
|
3654
|
-
__metadata("design:paramtypes", [Boolean])
|
|
3655
|
-
], ActivityOutletComponent.prototype, "disableAnimation", null);
|
|
3656
3676
|
ActivityOutletComponent = __decorate([
|
|
3657
3677
|
Component({
|
|
3658
3678
|
selector: 'aup-activity-outlet',
|
|
@@ -3671,13 +3691,13 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3671
3691
|
function ActivityContainerComponent() {
|
|
3672
3692
|
var _this = _super.call(this) || this;
|
|
3673
3693
|
_this.dynamicHeight = false;
|
|
3674
|
-
_this.
|
|
3694
|
+
_this.activityRefs = [];
|
|
3675
3695
|
_this.garbage = new GarbageCollector();
|
|
3676
3696
|
// We have issues where angular is triggering a leave animation when an
|
|
3677
|
-
// activity is
|
|
3697
|
+
// new activity is started, but is not running the enter animation
|
|
3678
3698
|
// when it is scrolled back into view. So we track the tab changes and
|
|
3679
3699
|
// disable all animations inside the tab while we're animating.
|
|
3680
|
-
_this.
|
|
3700
|
+
_this.inAnimation = new MutableValueModel(false);
|
|
3681
3701
|
return _this;
|
|
3682
3702
|
}
|
|
3683
3703
|
ActivityContainerComponent.prototype.ngOnInit = function () {
|
|
@@ -3726,7 +3746,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3726
3746
|
if (!this.isActive()) {
|
|
3727
3747
|
lang$1.illegalState('no activity in progress');
|
|
3728
3748
|
}
|
|
3729
|
-
return ___default.findLast(this.
|
|
3749
|
+
return ___default.findLast(this.activityRefs, function (tab) { return !tab.isComplete(); });
|
|
3730
3750
|
};
|
|
3731
3751
|
/**
|
|
3732
3752
|
* Cancels the current activity and returns true the context is no longer active, false if
|
|
@@ -3765,14 +3785,14 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3765
3785
|
});
|
|
3766
3786
|
this.launchActivity(activityRef);
|
|
3767
3787
|
// if this is the first activity let the interaction service know.
|
|
3768
|
-
if (this.
|
|
3788
|
+
if (this.activityRefs.length === 1) {
|
|
3769
3789
|
// console.log('Now active!!!');
|
|
3770
3790
|
this.interactionServiceApi.notifyActive(this);
|
|
3771
3791
|
}
|
|
3772
3792
|
return activityRef.activityResult;
|
|
3773
3793
|
};
|
|
3774
3794
|
ActivityContainerComponent.prototype.getActiveActivityCount = function () {
|
|
3775
|
-
return this.
|
|
3795
|
+
return this.activityRefs.filter(function (ref) { return !ref.isComplete(); }).length;
|
|
3776
3796
|
};
|
|
3777
3797
|
/**
|
|
3778
3798
|
* Checks if this interaction context has finished an is in the process of waiting
|
|
@@ -3799,7 +3819,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3799
3819
|
// Without this our animation done wasn't called when a single
|
|
3800
3820
|
// new activity followed a single tab activity (since we're tracking
|
|
3801
3821
|
// by activity index)
|
|
3802
|
-
this.
|
|
3822
|
+
this.activityRefs = [];
|
|
3803
3823
|
var promise = this.interactionServiceApi.notifyFinished(this);
|
|
3804
3824
|
this._deferredCleanUp = promise
|
|
3805
3825
|
.finally(function () {
|
|
@@ -3809,8 +3829,8 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3809
3829
|
};
|
|
3810
3830
|
// @Trace()
|
|
3811
3831
|
ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
|
|
3812
|
-
var cleanedTabs = this.
|
|
3813
|
-
this.
|
|
3832
|
+
var cleanedTabs = this.activityRefs.filter(function (tab) { return !tab.isComplete(); });
|
|
3833
|
+
this.activityRefs = cleanedTabs.concat(activityRef);
|
|
3814
3834
|
this.synchroniseSelectedTabIndex();
|
|
3815
3835
|
};
|
|
3816
3836
|
ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
|
|
@@ -3823,7 +3843,6 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3823
3843
|
this.onAnimationFinishedJob();
|
|
3824
3844
|
this.onAnimationFinishedJob = undefined;
|
|
3825
3845
|
}
|
|
3826
|
-
this.inTabChange.value = false;
|
|
3827
3846
|
};
|
|
3828
3847
|
/**
|
|
3829
3848
|
* Synchronises the selected tab index.
|
|
@@ -3834,11 +3853,14 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3834
3853
|
var previousIndex = this.tabs.selectedIndex;
|
|
3835
3854
|
var newIndex = this.getActiveActivityCount() - 1;
|
|
3836
3855
|
if (previousIndex !== newIndex) {
|
|
3837
|
-
this.
|
|
3856
|
+
this.inAnimation.value = true;
|
|
3838
3857
|
this.tabs.selectedIndex = newIndex;
|
|
3839
3858
|
this.onAnimationFinishedJob = function () {
|
|
3840
|
-
_this.
|
|
3841
|
-
_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
|
+
});
|
|
3842
3864
|
};
|
|
3843
3865
|
}
|
|
3844
3866
|
};
|
|
@@ -3875,7 +3897,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3875
3897
|
ActivityContainerComponent = __decorate([
|
|
3876
3898
|
Component({
|
|
3877
3899
|
selector: 'aup-activity-container',
|
|
3878
|
-
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",
|
|
3879
3901
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
3880
3902
|
}),
|
|
3881
3903
|
__metadata("design:paramtypes", [])
|