@coolon/angular-ui-powerups 1.9.0 → 1.10.0
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 +12 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +32 -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/interaction/components/activity-actions/activity-actions.component.js +2 -2
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +22 -9
- 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.map +1 -1
- package/esm2015/lib/interaction/interaction.module.js +4 -1
- package/esm2015/lib/interaction/interaction.module.js.map +1 -1
- package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js +2 -2
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +23 -9
- 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.map +1 -1
- package/esm5/lib/interaction/interaction.module.js +4 -1
- package/esm5/lib/interaction/interaction.module.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +28 -13
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +29 -13
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -1
- package/package.json +3 -3
|
@@ -12,12 +12,12 @@ import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
|
12
12
|
import { MatIconModule } from '@angular/material/icon';
|
|
13
13
|
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, Command, FocusManager, DelegatingFormValueModel, TrackExternal, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MutableValueModel, Deferred, Trace, MutableListModel, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
|
|
14
14
|
import { PortalModule } from '@angular/cdk/portal';
|
|
15
|
+
import { FlexModule, GridModule } from '@angular/flex-layout';
|
|
15
16
|
import { MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS, MatDialogModule } from '@angular/material/dialog';
|
|
16
17
|
import { RouterModule, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterOutlet } from '@angular/router';
|
|
17
18
|
import ___default, { isEqual, isNil } from 'lodash';
|
|
18
19
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
19
20
|
import { assert as assert$1, lang as lang$1, Opts, Klass } from '@coolon/typescript-utilities';
|
|
20
|
-
import { FlexModule } from '@angular/flex-layout';
|
|
21
21
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
22
22
|
import { MatListModule } from '@angular/material/list';
|
|
23
23
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
@@ -1352,8 +1352,8 @@ var ActivityActionsComponent = /** @class */ (function (_super) {
|
|
|
1352
1352
|
ActivityActionsComponent = __decorate([
|
|
1353
1353
|
Component({
|
|
1354
1354
|
selector: 'aup-activity-actions',
|
|
1355
|
-
template: "<button mat-icon-button [pectinCommand]=\"cancelCommand\"
|
|
1356
|
-
styles: [":host{display:
|
|
1355
|
+
template: "<button class=\"cancel\" mat-icon-button [pectinCommand]=\"cancelCommand\">\n <mat-icon>clear</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\">\n <mat-icon>done</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n",
|
|
1356
|
+
styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}"]
|
|
1357
1357
|
})
|
|
1358
1358
|
], ActivityActionsComponent);
|
|
1359
1359
|
return ActivityActionsComponent;
|
|
@@ -1678,6 +1678,8 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1678
1678
|
ActivityContainerComponent.prototype.ngAfterViewInit = function () {
|
|
1679
1679
|
var _this = this;
|
|
1680
1680
|
var _a = Dsl.disposeWith(this), chain = _a.chain, observe = _a.observe;
|
|
1681
|
+
// using the component directly rather than (animationDone)=.. allows us
|
|
1682
|
+
// to keep our callback private.
|
|
1681
1683
|
observe.valuesFrom(this.tabs.animationDone).subscribe(function () { return _this.onAnimationFinished(); });
|
|
1682
1684
|
};
|
|
1683
1685
|
ActivityContainerComponent.prototype.initialise = function (identifier, api) {
|
|
@@ -1784,6 +1786,12 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1784
1786
|
ActivityContainerComponent.prototype.finishAndStartCleanup = function () {
|
|
1785
1787
|
var _this = this;
|
|
1786
1788
|
if (!this._deferredCleanUp) {
|
|
1789
|
+
// Important:
|
|
1790
|
+
// Clear our tabs so the next activity triggers a tab change.
|
|
1791
|
+
// Without this our animation done wasn't called when a single
|
|
1792
|
+
// new activity followed a single tab activity (since we're tracking
|
|
1793
|
+
// by activity index)
|
|
1794
|
+
this.activityTabs = [];
|
|
1787
1795
|
var promise = this.interactionServiceApi.notifyFinished(this);
|
|
1788
1796
|
this._deferredCleanUp = promise
|
|
1789
1797
|
.finally(function () {
|
|
@@ -1795,26 +1803,32 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1795
1803
|
ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
|
|
1796
1804
|
var cleanedTabs = this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
1797
1805
|
this.activityTabs = cleanedTabs.concat(activityRef);
|
|
1798
|
-
this.
|
|
1806
|
+
this.synchroniseSelectedTabIndex();
|
|
1799
1807
|
};
|
|
1800
1808
|
ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
|
|
1801
1809
|
return index;
|
|
1802
1810
|
};
|
|
1803
1811
|
;
|
|
1804
|
-
// @Trace()
|
|
1805
1812
|
ActivityContainerComponent.prototype.onAnimationFinished = function () {
|
|
1806
|
-
this.
|
|
1807
|
-
|
|
1813
|
+
if (this.onAnimationFinishedJob) {
|
|
1814
|
+
this.onAnimationFinishedJob();
|
|
1815
|
+
this.onAnimationFinishedJob = undefined;
|
|
1816
|
+
}
|
|
1808
1817
|
};
|
|
1809
1818
|
/**
|
|
1810
|
-
* Synchronises the selected tab index.
|
|
1819
|
+
* Synchronises the selected tab index.
|
|
1811
1820
|
*/
|
|
1812
|
-
// @Trace()
|
|
1813
1821
|
ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = function () {
|
|
1822
|
+
var _this = this;
|
|
1814
1823
|
var previousIndex = this.tabs.selectedIndex;
|
|
1815
1824
|
var newIndex = this.getActiveActivityCount() - 1;
|
|
1816
|
-
|
|
1817
|
-
|
|
1825
|
+
if (previousIndex !== newIndex) {
|
|
1826
|
+
this.tabs.selectedIndex = newIndex;
|
|
1827
|
+
this.onAnimationFinishedJob = function () {
|
|
1828
|
+
_this.getSelectedOutlet().component.onActivityReady();
|
|
1829
|
+
_this.activityTabs = _this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
1830
|
+
};
|
|
1831
|
+
}
|
|
1818
1832
|
};
|
|
1819
1833
|
ActivityContainerComponent.prototype.getSelectedOutlet = function () {
|
|
1820
1834
|
return this.activityOutlets.toArray()[this.tabs.selectedIndex];
|
|
@@ -1851,7 +1865,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1851
1865
|
ActivityContainerComponent = __decorate([
|
|
1852
1866
|
Component({
|
|
1853
1867
|
selector: 'aup-activity-container',
|
|
1854
|
-
template: "<mat-tab-group #tabs no-tab-header
|
|
1868
|
+
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs; trackBy: activityIndex\" >\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
|
|
1855
1869
|
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
1856
1870
|
}),
|
|
1857
1871
|
__metadata("design:paramtypes", [])
|
|
@@ -2301,7 +2315,9 @@ var InteractionModule = /** @class */ (function () {
|
|
|
2301
2315
|
PortalModule,
|
|
2302
2316
|
RouterModule,
|
|
2303
2317
|
MatIconModule,
|
|
2304
|
-
DirectivesModule
|
|
2318
|
+
DirectivesModule,
|
|
2319
|
+
FlexModule,
|
|
2320
|
+
GridModule
|
|
2305
2321
|
],
|
|
2306
2322
|
declarations: [
|
|
2307
2323
|
ActivityContainerComponent,
|