@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
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.0.0-alpha.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
|
+
|
|
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)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* added activity animation tests and finally actually fixed the issue ([c067efb](https://bitbucket.org/coolon/angular-ui-powerups/commit/c067efbb011c006682b2720e16b7daf1577bab3c))
|
|
18
|
+
|
|
5
19
|
## [2.0.0-alpha.31](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.30...v2.0.0-alpha.31) (2020-08-25)
|
|
6
20
|
|
|
7
21
|
|
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 () {
|
|
@@ -3769,17 +3806,6 @@
|
|
|
3769
3806
|
configurable: true
|
|
3770
3807
|
});
|
|
3771
3808
|
;
|
|
3772
|
-
Object.defineProperty(ActivityOutletComponent.prototype, "disableAnimation", {
|
|
3773
|
-
get: function () {
|
|
3774
|
-
return this._disableAnimation;
|
|
3775
|
-
},
|
|
3776
|
-
set: function (value) {
|
|
3777
|
-
// console.log({disableAnimation: value});
|
|
3778
|
-
this._disableAnimation = value;
|
|
3779
|
-
},
|
|
3780
|
-
enumerable: true,
|
|
3781
|
-
configurable: true
|
|
3782
|
-
});
|
|
3783
3809
|
ActivityOutletComponent.prototype.ngOnInit = function () {
|
|
3784
3810
|
};
|
|
3785
3811
|
ActivityOutletComponent.prototype.loadActivity = function (activityRef) {
|
|
@@ -3816,12 +3842,6 @@
|
|
|
3816
3842
|
__metadata("design:type", ActivityRef),
|
|
3817
3843
|
__metadata("design:paramtypes", [ActivityRef])
|
|
3818
3844
|
], ActivityOutletComponent.prototype, "activityRef", null);
|
|
3819
|
-
__decorate([
|
|
3820
|
-
core.Input(),
|
|
3821
|
-
core.HostBinding('@.disabled'),
|
|
3822
|
-
__metadata("design:type", Boolean),
|
|
3823
|
-
__metadata("design:paramtypes", [Boolean])
|
|
3824
|
-
], ActivityOutletComponent.prototype, "disableAnimation", null);
|
|
3825
3845
|
ActivityOutletComponent = __decorate([
|
|
3826
3846
|
core.Component({
|
|
3827
3847
|
selector: 'aup-activity-outlet',
|
|
@@ -3840,13 +3860,13 @@
|
|
|
3840
3860
|
function ActivityContainerComponent() {
|
|
3841
3861
|
var _this = _super.call(this) || this;
|
|
3842
3862
|
_this.dynamicHeight = false;
|
|
3843
|
-
_this.
|
|
3863
|
+
_this.activityRefs = [];
|
|
3844
3864
|
_this.garbage = new pectin.GarbageCollector();
|
|
3845
3865
|
// We have issues where angular is triggering a leave animation when an
|
|
3846
|
-
// activity is
|
|
3866
|
+
// new activity is started, but is not running the enter animation
|
|
3847
3867
|
// when it is scrolled back into view. So we track the tab changes and
|
|
3848
3868
|
// disable all animations inside the tab while we're animating.
|
|
3849
|
-
_this.
|
|
3869
|
+
_this.inAnimation = new pectin.MutableValueModel(false);
|
|
3850
3870
|
return _this;
|
|
3851
3871
|
}
|
|
3852
3872
|
ActivityContainerComponent.prototype.ngOnInit = function () {
|
|
@@ -3895,7 +3915,7 @@
|
|
|
3895
3915
|
if (!this.isActive()) {
|
|
3896
3916
|
typescriptUtilities.lang.illegalState('no activity in progress');
|
|
3897
3917
|
}
|
|
3898
|
-
return ___default__default.findLast(this.
|
|
3918
|
+
return ___default__default.findLast(this.activityRefs, function (tab) { return !tab.isComplete(); });
|
|
3899
3919
|
};
|
|
3900
3920
|
/**
|
|
3901
3921
|
* Cancels the current activity and returns true the context is no longer active, false if
|
|
@@ -3934,14 +3954,14 @@
|
|
|
3934
3954
|
});
|
|
3935
3955
|
this.launchActivity(activityRef);
|
|
3936
3956
|
// if this is the first activity let the interaction service know.
|
|
3937
|
-
if (this.
|
|
3957
|
+
if (this.activityRefs.length === 1) {
|
|
3938
3958
|
// console.log('Now active!!!');
|
|
3939
3959
|
this.interactionServiceApi.notifyActive(this);
|
|
3940
3960
|
}
|
|
3941
3961
|
return activityRef.activityResult;
|
|
3942
3962
|
};
|
|
3943
3963
|
ActivityContainerComponent.prototype.getActiveActivityCount = function () {
|
|
3944
|
-
return this.
|
|
3964
|
+
return this.activityRefs.filter(function (ref) { return !ref.isComplete(); }).length;
|
|
3945
3965
|
};
|
|
3946
3966
|
/**
|
|
3947
3967
|
* Checks if this interaction context has finished an is in the process of waiting
|
|
@@ -3968,7 +3988,7 @@
|
|
|
3968
3988
|
// Without this our animation done wasn't called when a single
|
|
3969
3989
|
// new activity followed a single tab activity (since we're tracking
|
|
3970
3990
|
// by activity index)
|
|
3971
|
-
this.
|
|
3991
|
+
this.activityRefs = [];
|
|
3972
3992
|
var promise = this.interactionServiceApi.notifyFinished(this);
|
|
3973
3993
|
this._deferredCleanUp = promise
|
|
3974
3994
|
.finally(function () {
|
|
@@ -3978,8 +3998,8 @@
|
|
|
3978
3998
|
};
|
|
3979
3999
|
// @Trace()
|
|
3980
4000
|
ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
|
|
3981
|
-
var cleanedTabs = this.
|
|
3982
|
-
this.
|
|
4001
|
+
var cleanedTabs = this.activityRefs.filter(function (tab) { return !tab.isComplete(); });
|
|
4002
|
+
this.activityRefs = cleanedTabs.concat(activityRef);
|
|
3983
4003
|
this.synchroniseSelectedTabIndex();
|
|
3984
4004
|
};
|
|
3985
4005
|
ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
|
|
@@ -3992,7 +4012,6 @@
|
|
|
3992
4012
|
this.onAnimationFinishedJob();
|
|
3993
4013
|
this.onAnimationFinishedJob = undefined;
|
|
3994
4014
|
}
|
|
3995
|
-
this.inTabChange.value = false;
|
|
3996
4015
|
};
|
|
3997
4016
|
/**
|
|
3998
4017
|
* Synchronises the selected tab index.
|
|
@@ -4003,11 +4022,14 @@
|
|
|
4003
4022
|
var previousIndex = this.tabs.selectedIndex;
|
|
4004
4023
|
var newIndex = this.getActiveActivityCount() - 1;
|
|
4005
4024
|
if (previousIndex !== newIndex) {
|
|
4006
|
-
this.
|
|
4025
|
+
this.inAnimation.value = true;
|
|
4007
4026
|
this.tabs.selectedIndex = newIndex;
|
|
4008
4027
|
this.onAnimationFinishedJob = function () {
|
|
4009
|
-
_this.
|
|
4010
|
-
_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
|
+
});
|
|
4011
4033
|
};
|
|
4012
4034
|
}
|
|
4013
4035
|
};
|
|
@@ -4044,7 +4066,7 @@
|
|
|
4044
4066
|
ActivityContainerComponent = __decorate([
|
|
4045
4067
|
core.Component({
|
|
4046
4068
|
selector: 'aup-activity-container',
|
|
4047
|
-
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",
|
|
4048
4070
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
4049
4071
|
}),
|
|
4050
4072
|
__metadata("design:paramtypes", [])
|