@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
|
@@ -372,7 +372,7 @@ CardContainerComponent = __decorate([
|
|
|
372
372
|
Component({
|
|
373
373
|
selector: 'aup-card-container',
|
|
374
374
|
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",
|
|
375
|
-
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}"]
|
|
375
|
+
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}"]
|
|
376
376
|
}),
|
|
377
377
|
__metadata("design:paramtypes", [])
|
|
378
378
|
], CardContainerComponent);
|
|
@@ -3057,12 +3057,21 @@ class Activity extends DisposableComponent {
|
|
|
3057
3057
|
constructor() {
|
|
3058
3058
|
super(...arguments);
|
|
3059
3059
|
this._busyModel = new DelegatingValueModel().withDefault(false);
|
|
3060
|
+
this._focusedModel = this.registerDisposable(new DelegatingValueModel());
|
|
3060
3061
|
this.class = 'aup-activity';
|
|
3061
3062
|
}
|
|
3063
|
+
get isFocused() {
|
|
3064
|
+
return this._focusedModel.value;
|
|
3065
|
+
}
|
|
3062
3066
|
initialise(nestedInteractionContext, activityContext) {
|
|
3067
|
+
const { chain, when } = Dsl.disposeWith(this);
|
|
3063
3068
|
assert$1.isNil(this._activityContext);
|
|
3064
3069
|
this._activityContext = activityContext;
|
|
3065
3070
|
this._interactionContext = nestedInteractionContext;
|
|
3071
|
+
this._focusedModel.setDelegate(activityContext.focused);
|
|
3072
|
+
when(this._focusedModel).becomesTruthy(() => {
|
|
3073
|
+
this.onActivityReady();
|
|
3074
|
+
});
|
|
3066
3075
|
}
|
|
3067
3076
|
get interactionContext() {
|
|
3068
3077
|
assert$1.isTruthy(this.isInitialised());
|
|
@@ -3080,6 +3089,9 @@ class Activity extends DisposableComponent {
|
|
|
3080
3089
|
get busy() {
|
|
3081
3090
|
return this._busyModel.readonly;
|
|
3082
3091
|
}
|
|
3092
|
+
get focused() {
|
|
3093
|
+
return this._focusedModel.readonly;
|
|
3094
|
+
}
|
|
3083
3095
|
busyWhile(busyModel) {
|
|
3084
3096
|
this._busyModel.setDelegate(busyModel);
|
|
3085
3097
|
}
|
|
@@ -3094,6 +3106,11 @@ __decorate([
|
|
|
3094
3106
|
HostBinding('class'),
|
|
3095
3107
|
__metadata("design:type", Object)
|
|
3096
3108
|
], Activity.prototype, "class", void 0);
|
|
3109
|
+
__decorate([
|
|
3110
|
+
HostBinding('attr.focused'),
|
|
3111
|
+
__metadata("design:type", Object),
|
|
3112
|
+
__metadata("design:paramtypes", [])
|
|
3113
|
+
], Activity.prototype, "isFocused", null);
|
|
3097
3114
|
|
|
3098
3115
|
let AlertDialogComponent = class AlertDialogComponent extends Activity {
|
|
3099
3116
|
constructor(alert) {
|
|
@@ -3213,6 +3230,7 @@ class ActivityRef {
|
|
|
3213
3230
|
this.onComplete = onComplete;
|
|
3214
3231
|
this._complete = false;
|
|
3215
3232
|
this.deferredResult = Deferred.defer();
|
|
3233
|
+
this.focusedModel = new MutableValueModel();
|
|
3216
3234
|
}
|
|
3217
3235
|
isActivityRealised() {
|
|
3218
3236
|
return !!this._activity;
|
|
@@ -3224,6 +3242,12 @@ class ActivityRef {
|
|
|
3224
3242
|
assert.isTruthy(this.isActivityRealised());
|
|
3225
3243
|
return this._activity;
|
|
3226
3244
|
}
|
|
3245
|
+
setFocused(focused) {
|
|
3246
|
+
this.focusedModel.value = focused;
|
|
3247
|
+
}
|
|
3248
|
+
get focused() {
|
|
3249
|
+
return this.focusedModel.value;
|
|
3250
|
+
}
|
|
3227
3251
|
notifyActivityCreated(activity, nestedInteractionContext) {
|
|
3228
3252
|
assert.isNil(this._activity);
|
|
3229
3253
|
this._activity = activity;
|
|
@@ -3234,7 +3258,8 @@ class ActivityRef {
|
|
|
3234
3258
|
},
|
|
3235
3259
|
onCancel(error) {
|
|
3236
3260
|
self.finishActivity(deferred => deferred.reject(error));
|
|
3237
|
-
}
|
|
3261
|
+
},
|
|
3262
|
+
focused: this.focusedModel.readonly
|
|
3238
3263
|
});
|
|
3239
3264
|
}
|
|
3240
3265
|
finishActivity(resolveOrReject) {
|
|
@@ -3260,7 +3285,6 @@ let ActivityOutletComponent = class ActivityOutletComponent {
|
|
|
3260
3285
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
3261
3286
|
this.viewContainerRef = viewContainerRef;
|
|
3262
3287
|
this.injector = injector;
|
|
3263
|
-
this._disableAnimation = false;
|
|
3264
3288
|
}
|
|
3265
3289
|
set activityRef(activityRef) {
|
|
3266
3290
|
if (this.activityRef && !this.activityRef.isComplete()) {
|
|
@@ -3321,13 +3345,13 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3321
3345
|
constructor() {
|
|
3322
3346
|
super();
|
|
3323
3347
|
this.dynamicHeight = false;
|
|
3324
|
-
this.
|
|
3348
|
+
this.activityRefs = [];
|
|
3325
3349
|
this.garbage = new GarbageCollector();
|
|
3326
3350
|
// We have issues where angular is triggering a leave animation when an
|
|
3327
3351
|
// new activity is started, but is not running the enter animation
|
|
3328
3352
|
// when it is scrolled back into view. So we track the tab changes and
|
|
3329
3353
|
// disable all animations inside the tab while we're animating.
|
|
3330
|
-
this.
|
|
3354
|
+
this.inAnimation = new MutableValueModel(false);
|
|
3331
3355
|
}
|
|
3332
3356
|
ngOnInit() {
|
|
3333
3357
|
}
|
|
@@ -3370,7 +3394,7 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3370
3394
|
if (!this.isActive()) {
|
|
3371
3395
|
lang$1.illegalState('no activity in progress');
|
|
3372
3396
|
}
|
|
3373
|
-
return ___default.findLast(this.
|
|
3397
|
+
return ___default.findLast(this.activityRefs, tab => !tab.isComplete());
|
|
3374
3398
|
}
|
|
3375
3399
|
/**
|
|
3376
3400
|
* Cancels the current activity and returns true the context is no longer active, false if
|
|
@@ -3404,14 +3428,14 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3404
3428
|
});
|
|
3405
3429
|
this.launchActivity(activityRef);
|
|
3406
3430
|
// if this is the first activity let the interaction service know.
|
|
3407
|
-
if (this.
|
|
3431
|
+
if (this.activityRefs.length === 1) {
|
|
3408
3432
|
// console.log('Now active!!!');
|
|
3409
3433
|
this.interactionServiceApi.notifyActive(this);
|
|
3410
3434
|
}
|
|
3411
3435
|
return activityRef.activityResult;
|
|
3412
3436
|
}
|
|
3413
3437
|
getActiveActivityCount() {
|
|
3414
|
-
return this.
|
|
3438
|
+
return this.activityRefs.filter(ref => !ref.isComplete()).length;
|
|
3415
3439
|
}
|
|
3416
3440
|
/**
|
|
3417
3441
|
* Checks if this interaction context has finished an is in the process of waiting
|
|
@@ -3435,7 +3459,7 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3435
3459
|
// Without this our animation done wasn't called when a single
|
|
3436
3460
|
// new activity followed a single tab activity (since we're tracking
|
|
3437
3461
|
// by activity index)
|
|
3438
|
-
this.
|
|
3462
|
+
this.activityRefs = [];
|
|
3439
3463
|
const promise = this.interactionServiceApi.notifyFinished(this);
|
|
3440
3464
|
this._deferredCleanUp = promise
|
|
3441
3465
|
.finally(() => {
|
|
@@ -3445,8 +3469,8 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3445
3469
|
}
|
|
3446
3470
|
// @Trace()
|
|
3447
3471
|
launchActivity(activityRef) {
|
|
3448
|
-
const cleanedTabs = this.
|
|
3449
|
-
this.
|
|
3472
|
+
const cleanedTabs = this.activityRefs.filter(tab => !tab.isComplete());
|
|
3473
|
+
this.activityRefs = cleanedTabs.concat(activityRef);
|
|
3450
3474
|
this.synchroniseSelectedTabIndex();
|
|
3451
3475
|
}
|
|
3452
3476
|
activityIndex(index, activityRef) {
|
|
@@ -3459,7 +3483,6 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3459
3483
|
this.onAnimationFinishedJob();
|
|
3460
3484
|
this.onAnimationFinishedJob = undefined;
|
|
3461
3485
|
}
|
|
3462
|
-
this.inTabChange.value = false;
|
|
3463
3486
|
}
|
|
3464
3487
|
/**
|
|
3465
3488
|
* Synchronises the selected tab index.
|
|
@@ -3469,11 +3492,14 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
|
|
|
3469
3492
|
const previousIndex = this.tabs.selectedIndex;
|
|
3470
3493
|
const newIndex = this.getActiveActivityCount() - 1;
|
|
3471
3494
|
if (previousIndex !== newIndex) {
|
|
3472
|
-
this.
|
|
3495
|
+
this.inAnimation.value = true;
|
|
3473
3496
|
this.tabs.selectedIndex = newIndex;
|
|
3474
3497
|
this.onAnimationFinishedJob = () => {
|
|
3475
|
-
this.
|
|
3476
|
-
this.
|
|
3498
|
+
this.activityRefs = this.activityRefs.filter(tab => !tab.isComplete());
|
|
3499
|
+
this.inAnimation.value = false;
|
|
3500
|
+
this.activityRefs.forEach((ref, index) => {
|
|
3501
|
+
ref.setFocused(index === newIndex);
|
|
3502
|
+
});
|
|
3477
3503
|
};
|
|
3478
3504
|
}
|
|
3479
3505
|
}
|
|
@@ -3510,7 +3536,7 @@ __decorate([
|
|
|
3510
3536
|
ActivityContainerComponent = __decorate([
|
|
3511
3537
|
Component({
|
|
3512
3538
|
selector: 'aup-activity-container',
|
|
3513
|
-
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of
|
|
3539
|
+
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",
|
|
3514
3540
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
3515
3541
|
}),
|
|
3516
3542
|
__metadata("design:paramtypes", [])
|