@coolon/angular-ui-powerups 0.0.57 → 0.0.59
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/bundles/coolon-angular-ui-powerups.umd.js +150 -127
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +2 -2
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +4 -4
- package/esm2015/index.js +2 -2
- package/esm2015/lib/interaction/abstract-activity.js +25 -68
- package/esm2015/lib/interaction/activity.js +3 -8
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +82 -26
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.js +10 -4
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +2 -2
- package/esm2015/lib/interaction/index.js +2 -2
- package/esm2015/lib/interaction/interaction-context.js +1 -1
- package/esm2015/lib/interaction/services/dialog-interaction.service.js +14 -5
- package/esm2015/public_api.js +2 -2
- package/esm5/coolon-angular-ui-powerups.js +4 -4
- package/esm5/index.js +2 -2
- package/esm5/lib/interaction/abstract-activity.js +38 -88
- package/esm5/lib/interaction/activity.js +3 -8
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +87 -27
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.js +10 -4
- package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +2 -2
- package/esm5/lib/interaction/index.js +2 -2
- package/esm5/lib/interaction/interaction-context.js +1 -1
- package/esm5/lib/interaction/services/dialog-interaction.service.js +13 -5
- package/esm5/public_api.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +127 -107
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +145 -125
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/interaction/abstract-activity.d.ts +6 -8
- package/lib/interaction/activity.d.ts +2 -2
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +5 -4
- package/lib/interaction/components/activity-outlet/activity-outlet.component.d.ts +2 -2
- package/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.d.ts +1 -1
- package/lib/interaction/interaction-context.d.ts +1 -1
- package/lib/interaction/services/dialog-interaction.service.d.ts +6 -3
- package/package.json +1 -1
|
@@ -5,11 +5,10 @@ import { MatDialog, MatButtonModule, MatDialogModule, MatTabsModule, MatProgress
|
|
|
5
5
|
import { MatTabsModule as MatTabsModule$1 } from '@angular/material/tabs';
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
7
|
import { __extends, __decorate, __metadata, __assign, __awaiter, __generator } from 'tslib';
|
|
8
|
-
import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, assert, UnaryCommand, lang, Dsl, Logger,
|
|
8
|
+
import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, assert, UnaryCommand, lang, Dsl, Logger, Trace, DelegatingValueModel, MutableListModel, StoreInValueModel, Binding, MutableValueModel, Guard, OptionsHelper, ValueHolder } from '@coolon/pectin';
|
|
9
9
|
import { PortalModule } from '@angular/cdk/portal';
|
|
10
|
-
import { Deferred } from '@coolon/pectin/lib/promise/deferred.class';
|
|
11
|
-
import { MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS, MatDialog as MatDialog$1 } from '@angular/material/dialog';
|
|
12
10
|
import { assert as assert$1, Klass, Opts } from '@coolon/typescript-utilities';
|
|
11
|
+
import { MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS, MatDialog as MatDialog$1 } from '@angular/material/dialog';
|
|
13
12
|
import { MatIconModule } from '@angular/material/icon';
|
|
14
13
|
import { MatListModule } from '@angular/material/list';
|
|
15
14
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
@@ -848,15 +847,10 @@ if (false) {
|
|
|
848
847
|
/** @type {?} */
|
|
849
848
|
Activity.prototype.busy;
|
|
850
849
|
/**
|
|
851
|
-
* @param {?}
|
|
852
|
-
* @return {?}
|
|
853
|
-
*/
|
|
854
|
-
Activity.prototype.onDone = function (callback) { };
|
|
855
|
-
/**
|
|
856
|
-
* @param {?} callback
|
|
850
|
+
* @param {?} activityContext
|
|
857
851
|
* @return {?}
|
|
858
852
|
*/
|
|
859
|
-
Activity.prototype.
|
|
853
|
+
Activity.prototype.initialise = function (activityContext) { };
|
|
860
854
|
}
|
|
861
855
|
|
|
862
856
|
/**
|
|
@@ -921,8 +915,7 @@ var ActivityOutletComponent = /** @class */ (function () {
|
|
|
921
915
|
var componentFactory = this.componentFactoryResolver.resolveComponentFactory(activityContext.activityClass);
|
|
922
916
|
this.viewContainerRef.clear();
|
|
923
917
|
this.activityComponentRef = this.viewContainerRef.createComponent(componentFactory, 0, injector);
|
|
924
|
-
this.activityComponentRef.instance.
|
|
925
|
-
this.activityComponentRef.instance.onCancel(activityContext.onCancel);
|
|
918
|
+
this.activityComponentRef.instance.initialise(activityContext);
|
|
926
919
|
};
|
|
927
920
|
/**
|
|
928
921
|
* @param {?} alert
|
|
@@ -989,6 +982,12 @@ var ActivityOutletComponent = /** @class */ (function () {
|
|
|
989
982
|
interactionContext: [{ type: Input }],
|
|
990
983
|
activityContext: [{ type: Input }]
|
|
991
984
|
};
|
|
985
|
+
__decorate([
|
|
986
|
+
Trace(),
|
|
987
|
+
__metadata("design:type", Function),
|
|
988
|
+
__metadata("design:paramtypes", [Object]),
|
|
989
|
+
__metadata("design:returntype", void 0)
|
|
990
|
+
], ActivityOutletComponent.prototype, "loadActivity", null);
|
|
992
991
|
return ActivityOutletComponent;
|
|
993
992
|
}());
|
|
994
993
|
if (false) {
|
|
@@ -1083,40 +1082,24 @@ if (false) {
|
|
|
1083
1082
|
/**
|
|
1084
1083
|
* @template D, R, E
|
|
1085
1084
|
*/
|
|
1086
|
-
var
|
|
1087
|
-
* @template D, R, E
|
|
1088
|
-
*/
|
|
1089
|
-
AbstractActivity = /** @class */ (function (_super) {
|
|
1085
|
+
var AbstractActivity = /** @class */ (function (_super) {
|
|
1090
1086
|
__extends(AbstractActivity, _super);
|
|
1091
1087
|
function AbstractActivity() {
|
|
1092
1088
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1093
|
-
_this._doneListeners = new EventListenerList();
|
|
1094
|
-
_this._cancelListeners = new EventListenerList();
|
|
1095
|
-
_this._finishListeners = new EventListenerList();
|
|
1096
1089
|
_this._busyModel = new DelegatingValueModel().withDefault(false);
|
|
1097
1090
|
return _this;
|
|
1098
1091
|
}
|
|
1099
1092
|
/**
|
|
1100
|
-
* @param {?}
|
|
1101
|
-
* @return {?}
|
|
1102
|
-
*/
|
|
1103
|
-
AbstractActivity.prototype.onDone = /**
|
|
1104
|
-
* @param {?} callback
|
|
1105
|
-
* @return {?}
|
|
1106
|
-
*/
|
|
1107
|
-
function (callback) {
|
|
1108
|
-
this._doneListeners.add(callback);
|
|
1109
|
-
};
|
|
1110
|
-
/**
|
|
1111
|
-
* @param {?} callback
|
|
1093
|
+
* @param {?} activityContext
|
|
1112
1094
|
* @return {?}
|
|
1113
1095
|
*/
|
|
1114
|
-
AbstractActivity.prototype.
|
|
1115
|
-
* @param {?}
|
|
1096
|
+
AbstractActivity.prototype.initialise = /**
|
|
1097
|
+
* @param {?} activityContext
|
|
1116
1098
|
* @return {?}
|
|
1117
1099
|
*/
|
|
1118
|
-
function (
|
|
1119
|
-
this.
|
|
1100
|
+
function (activityContext) {
|
|
1101
|
+
assert$1.isNil(this.activityContext);
|
|
1102
|
+
this.activityContext = activityContext;
|
|
1120
1103
|
};
|
|
1121
1104
|
/**
|
|
1122
1105
|
* @param {?=} result
|
|
@@ -1127,17 +1110,7 @@ AbstractActivity = /** @class */ (function (_super) {
|
|
|
1127
1110
|
* @return {?}
|
|
1128
1111
|
*/
|
|
1129
1112
|
function (result) {
|
|
1130
|
-
|
|
1131
|
-
return this._doneListeners
|
|
1132
|
-
.fireAndWait((/**
|
|
1133
|
-
* @param {?} l
|
|
1134
|
-
* @return {?}
|
|
1135
|
-
*/
|
|
1136
|
-
function (l) { return l(result); }))
|
|
1137
|
-
.finally((/**
|
|
1138
|
-
* @return {?}
|
|
1139
|
-
*/
|
|
1140
|
-
function () { return _this.finalizeAndDispose(); }));
|
|
1113
|
+
return this.activityContext.onDone(result);
|
|
1141
1114
|
};
|
|
1142
1115
|
/**
|
|
1143
1116
|
* @param {?=} error
|
|
@@ -1148,57 +1121,39 @@ AbstractActivity = /** @class */ (function (_super) {
|
|
|
1148
1121
|
* @return {?}
|
|
1149
1122
|
*/
|
|
1150
1123
|
function (error) {
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
* @return {?}
|
|
1156
|
-
*/
|
|
1157
|
-
function (l) { return l(error); }))
|
|
1158
|
-
.finally((/**
|
|
1124
|
+
this.activityContext.onCancel(error);
|
|
1125
|
+
};
|
|
1126
|
+
Object.defineProperty(AbstractActivity.prototype, "data", {
|
|
1127
|
+
get: /**
|
|
1159
1128
|
* @return {?}
|
|
1160
1129
|
*/
|
|
1161
|
-
function () {
|
|
1162
|
-
|
|
1130
|
+
function () {
|
|
1131
|
+
return this.activityContext.activityData;
|
|
1132
|
+
},
|
|
1133
|
+
enumerable: true,
|
|
1134
|
+
configurable: true
|
|
1135
|
+
});
|
|
1136
|
+
// get interactionContext(): InteractionContext {
|
|
1137
|
+
// return this.activityContext.interactionContext;
|
|
1138
|
+
// }
|
|
1163
1139
|
// @Trace()
|
|
1140
|
+
// get interactionContext(): InteractionContext {
|
|
1141
|
+
// return this.activityContext.interactionContext;
|
|
1142
|
+
// }
|
|
1164
1143
|
// @Trace()
|
|
1165
1144
|
/**
|
|
1166
1145
|
* @return {?}
|
|
1167
1146
|
*/
|
|
1168
1147
|
AbstractActivity.prototype.onActivityReady =
|
|
1148
|
+
// get interactionContext(): InteractionContext {
|
|
1149
|
+
// return this.activityContext.interactionContext;
|
|
1150
|
+
// }
|
|
1169
1151
|
// @Trace()
|
|
1170
1152
|
/**
|
|
1171
1153
|
* @return {?}
|
|
1172
1154
|
*/
|
|
1173
1155
|
function () {
|
|
1174
1156
|
};
|
|
1175
|
-
/**
|
|
1176
|
-
* @private
|
|
1177
|
-
* @return {?}
|
|
1178
|
-
*/
|
|
1179
|
-
AbstractActivity.prototype.finalizeAndDispose = /**
|
|
1180
|
-
* @private
|
|
1181
|
-
* @return {?}
|
|
1182
|
-
*/
|
|
1183
|
-
function () {
|
|
1184
|
-
// this._activeModel.value = false;
|
|
1185
|
-
this._finishListeners.fire((/**
|
|
1186
|
-
* @param {?} l
|
|
1187
|
-
* @return {?}
|
|
1188
|
-
*/
|
|
1189
|
-
function (l) { return l(); }));
|
|
1190
|
-
// this._interactionContext = null;
|
|
1191
|
-
// this._initialized = false;
|
|
1192
|
-
[
|
|
1193
|
-
this._finishListeners,
|
|
1194
|
-
this._doneListeners,
|
|
1195
|
-
this._cancelListeners
|
|
1196
|
-
].forEach((/**
|
|
1197
|
-
* @param {?} l
|
|
1198
|
-
* @return {?}
|
|
1199
|
-
*/
|
|
1200
|
-
function (l) { return l.dispose(); }));
|
|
1201
|
-
};
|
|
1202
1157
|
Object.defineProperty(AbstractActivity.prototype, "busy", {
|
|
1203
1158
|
get: /**
|
|
1204
1159
|
* @return {?}
|
|
@@ -1229,6 +1184,12 @@ AbstractActivity = /** @class */ (function (_super) {
|
|
|
1229
1184
|
function () {
|
|
1230
1185
|
return this._busyModel.value;
|
|
1231
1186
|
};
|
|
1187
|
+
__decorate([
|
|
1188
|
+
Trace(),
|
|
1189
|
+
__metadata("design:type", Function),
|
|
1190
|
+
__metadata("design:paramtypes", [Object]),
|
|
1191
|
+
__metadata("design:returntype", void 0)
|
|
1192
|
+
], AbstractActivity.prototype, "initialise", null);
|
|
1232
1193
|
return AbstractActivity;
|
|
1233
1194
|
}(DisposableComponent));
|
|
1234
1195
|
if (false) {
|
|
@@ -1236,22 +1197,12 @@ if (false) {
|
|
|
1236
1197
|
* @type {?}
|
|
1237
1198
|
* @private
|
|
1238
1199
|
*/
|
|
1239
|
-
AbstractActivity.prototype.
|
|
1240
|
-
/**
|
|
1241
|
-
* @type {?}
|
|
1242
|
-
* @private
|
|
1243
|
-
*/
|
|
1244
|
-
AbstractActivity.prototype._cancelListeners;
|
|
1245
|
-
/**
|
|
1246
|
-
* @type {?}
|
|
1247
|
-
* @private
|
|
1248
|
-
*/
|
|
1249
|
-
AbstractActivity.prototype._finishListeners;
|
|
1200
|
+
AbstractActivity.prototype._busyModel;
|
|
1250
1201
|
/**
|
|
1251
1202
|
* @type {?}
|
|
1252
1203
|
* @private
|
|
1253
1204
|
*/
|
|
1254
|
-
AbstractActivity.prototype.
|
|
1205
|
+
AbstractActivity.prototype.activityContext;
|
|
1255
1206
|
}
|
|
1256
1207
|
|
|
1257
1208
|
/**
|
|
@@ -1323,7 +1274,7 @@ var ConfirmationDialogComponent = /** @class */ (function (_super) {
|
|
|
1323
1274
|
ConfirmationDialogComponent.decorators = [
|
|
1324
1275
|
{ type: Component, args: [{
|
|
1325
1276
|
selector: 'angular-ui-powerups-confirmation-dialog',
|
|
1326
|
-
template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)=\"cancel()\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"done(
|
|
1277
|
+
template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)=\"cancel()\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"done()\">{{confirm.ok()}}</button>\n</p>\n\n",
|
|
1327
1278
|
styles: [":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
|
|
1328
1279
|
}] }
|
|
1329
1280
|
];
|
|
@@ -1348,8 +1299,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1348
1299
|
var _this = _super.call(this) || this;
|
|
1349
1300
|
_this.activityOutletTabs = new MutableListModel();
|
|
1350
1301
|
_this.obsoleteTabs = [];
|
|
1351
|
-
|
|
1352
|
-
_this.lastActivityTab = chain(_this.activityOutletTabs).last().otherwise(_this.initialActivityOutlet);
|
|
1302
|
+
_this.finished = false;
|
|
1353
1303
|
return _this;
|
|
1354
1304
|
}
|
|
1355
1305
|
/**
|
|
@@ -1376,16 +1326,38 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1376
1326
|
};
|
|
1377
1327
|
/**
|
|
1378
1328
|
* @template D, R, E
|
|
1379
|
-
* @param {?}
|
|
1329
|
+
* @param {?} initialContext
|
|
1380
1330
|
* @return {?}
|
|
1381
1331
|
*/
|
|
1382
1332
|
ActivityContainerComponent.prototype.initialise = /**
|
|
1383
1333
|
* @template D, R, E
|
|
1384
|
-
* @param {?}
|
|
1334
|
+
* @param {?} initialContext
|
|
1385
1335
|
* @return {?}
|
|
1386
1336
|
*/
|
|
1387
|
-
function (
|
|
1388
|
-
|
|
1337
|
+
function (initialContext) {
|
|
1338
|
+
/** @type {?} */
|
|
1339
|
+
var self = this;
|
|
1340
|
+
this.initialActivityOutletContext = {
|
|
1341
|
+
activityClass: initialContext.activityClass,
|
|
1342
|
+
activityData: initialContext.activityData,
|
|
1343
|
+
onDone: (/**
|
|
1344
|
+
* @param {?} result
|
|
1345
|
+
* @return {?}
|
|
1346
|
+
*/
|
|
1347
|
+
function (result) {
|
|
1348
|
+
self.finished = true;
|
|
1349
|
+
return initialContext.onDone(result);
|
|
1350
|
+
}),
|
|
1351
|
+
onCancel: (/**
|
|
1352
|
+
* @param {?} error
|
|
1353
|
+
* @return {?}
|
|
1354
|
+
*/
|
|
1355
|
+
function (error) {
|
|
1356
|
+
self.finished = true;
|
|
1357
|
+
return initialContext.onCancel(error);
|
|
1358
|
+
}),
|
|
1359
|
+
interactionContext: this
|
|
1360
|
+
};
|
|
1389
1361
|
};
|
|
1390
1362
|
/**
|
|
1391
1363
|
* @template D, R, E
|
|
@@ -1402,23 +1374,49 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1402
1374
|
function (activityType, data) {
|
|
1403
1375
|
var _this = this;
|
|
1404
1376
|
/** @type {?} */
|
|
1405
|
-
var
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
activityClass: activityType,
|
|
1410
|
-
activityData: data,
|
|
1411
|
-
onDone: deferred.resolve,
|
|
1412
|
-
onCancel: deferred.reject
|
|
1413
|
-
};
|
|
1414
|
-
this.activityOutletTabs.push(context);
|
|
1415
|
-
this.tabs.selectedIndex = this.activityOutletTabs.length;
|
|
1416
|
-
return deferred.promise.finally((/**
|
|
1377
|
+
var self = this;
|
|
1378
|
+
return new Promise((/**
|
|
1379
|
+
* @param {?} resolve
|
|
1380
|
+
* @param {?} reject
|
|
1417
1381
|
* @return {?}
|
|
1418
1382
|
*/
|
|
1419
|
-
function () {
|
|
1420
|
-
|
|
1421
|
-
|
|
1383
|
+
function (resolve, reject) {
|
|
1384
|
+
/** @type {?} */
|
|
1385
|
+
var context = {
|
|
1386
|
+
interactionContext: self,
|
|
1387
|
+
activityClass: activityType,
|
|
1388
|
+
activityData: data,
|
|
1389
|
+
onDone: (/**
|
|
1390
|
+
* @param {?} result
|
|
1391
|
+
* @return {?}
|
|
1392
|
+
*/
|
|
1393
|
+
function (result) {
|
|
1394
|
+
self.obsoleteTabs.push(context);
|
|
1395
|
+
// animating on the next tick gives chained done's a chance to
|
|
1396
|
+
// finished before we start an animations
|
|
1397
|
+
resolve(result);
|
|
1398
|
+
setTimeout((/**
|
|
1399
|
+
* @return {?}
|
|
1400
|
+
*/
|
|
1401
|
+
function () { return self.animateTabs(); }));
|
|
1402
|
+
}),
|
|
1403
|
+
onCancel: (/**
|
|
1404
|
+
* @param {?} error
|
|
1405
|
+
* @return {?}
|
|
1406
|
+
*/
|
|
1407
|
+
function (error) {
|
|
1408
|
+
self.obsoleteTabs.push(context);
|
|
1409
|
+
// finished before we start an animations
|
|
1410
|
+
reject(error);
|
|
1411
|
+
// animating on the next tick gives chained done's a chance to complete before we animate
|
|
1412
|
+
setTimeout((/**
|
|
1413
|
+
* @return {?}
|
|
1414
|
+
*/
|
|
1415
|
+
function () { return self.animateTabs(); }));
|
|
1416
|
+
})
|
|
1417
|
+
};
|
|
1418
|
+
self.activityOutletTabs.push(context);
|
|
1419
|
+
self.tabs.selectedIndex = _this.activityOutletTabs.length;
|
|
1422
1420
|
}));
|
|
1423
1421
|
};
|
|
1424
1422
|
/**
|
|
@@ -1460,12 +1458,26 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1460
1458
|
function (tab) {
|
|
1461
1459
|
return !_this.obsoleteTabs.includes(tab);
|
|
1462
1460
|
}));
|
|
1461
|
+
this.obsoleteTabs = [];
|
|
1463
1462
|
this.outlets.toArray()[this.tabs.selectedIndex].notifyReady();
|
|
1464
1463
|
};
|
|
1464
|
+
/**
|
|
1465
|
+
* @private
|
|
1466
|
+
* @return {?}
|
|
1467
|
+
*/
|
|
1468
|
+
ActivityContainerComponent.prototype.animateTabs = /**
|
|
1469
|
+
* @private
|
|
1470
|
+
* @return {?}
|
|
1471
|
+
*/
|
|
1472
|
+
function () {
|
|
1473
|
+
if (!this.finished) {
|
|
1474
|
+
this.tabs.selectedIndex = this.activityOutletTabs.length - this.obsoleteTabs.length;
|
|
1475
|
+
}
|
|
1476
|
+
};
|
|
1465
1477
|
ActivityContainerComponent.decorators = [
|
|
1466
1478
|
{ type: Component, args: [{
|
|
1467
1479
|
selector: 'angular-ui-powerups-activity-container',
|
|
1468
|
-
template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"true\">\n <mat-tab>\n <angular-ui-powerups-activity-outlet [interactionContext]=\"this\"\n [activityContext]=\"
|
|
1480
|
+
template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"true\">\n <mat-tab>\n <angular-ui-powerups-activity-outlet [interactionContext]=\"this\"\n [activityContext]=\"initialActivityOutletContext\"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n <mat-tab *ngFor=\"let tab of activityOutletTabs.value\">\n <angular-ui-powerups-activity-outlet [interactionContext]=\"this\"\n [activityContext]=\"tab\"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
|
|
1469
1481
|
styles: [":host{display:block}"]
|
|
1470
1482
|
}] }
|
|
1471
1483
|
];
|
|
@@ -1473,7 +1485,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
1473
1485
|
ActivityContainerComponent.ctorParameters = function () { return []; };
|
|
1474
1486
|
ActivityContainerComponent.propDecorators = {
|
|
1475
1487
|
parentInteractionContext: [{ type: Input }],
|
|
1476
|
-
|
|
1488
|
+
initialActivityOutletContext: [{ type: Input }],
|
|
1477
1489
|
tabs: [{ type: ViewChild, args: ['tabs', { static: true },] }],
|
|
1478
1490
|
outlets: [{ type: ViewChildren, args: [ActivityOutletComponent,] }]
|
|
1479
1491
|
};
|
|
@@ -1483,7 +1495,7 @@ if (false) {
|
|
|
1483
1495
|
/** @type {?} */
|
|
1484
1496
|
ActivityContainerComponent.prototype.parentInteractionContext;
|
|
1485
1497
|
/** @type {?} */
|
|
1486
|
-
ActivityContainerComponent.prototype.
|
|
1498
|
+
ActivityContainerComponent.prototype.initialActivityOutletContext;
|
|
1487
1499
|
/** @type {?} */
|
|
1488
1500
|
ActivityContainerComponent.prototype.tabs;
|
|
1489
1501
|
/** @type {?} */
|
|
@@ -1499,7 +1511,7 @@ if (false) {
|
|
|
1499
1511
|
* @type {?}
|
|
1500
1512
|
* @private
|
|
1501
1513
|
*/
|
|
1502
|
-
ActivityContainerComponent.prototype.
|
|
1514
|
+
ActivityContainerComponent.prototype.finished;
|
|
1503
1515
|
}
|
|
1504
1516
|
(function (ActivityContainerComponent) {
|
|
1505
1517
|
/**
|
|
@@ -1524,11 +1536,14 @@ if (false) {
|
|
|
1524
1536
|
* @fileoverview added by tsickle
|
|
1525
1537
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1526
1538
|
*/
|
|
1539
|
+
/** @type {?} */
|
|
1540
|
+
var DIALOG_INTERACTION_SERVICE_DEFAULTS = new InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
|
|
1527
1541
|
var DialogInteractionService = /** @class */ (function (_super) {
|
|
1528
1542
|
__extends(DialogInteractionService, _super);
|
|
1529
|
-
function DialogInteractionService(dialogService, matDialogDefaultConfig) {
|
|
1543
|
+
function DialogInteractionService(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
|
|
1530
1544
|
var _this = _super.call(this) || this;
|
|
1531
1545
|
_this.dialogService = dialogService;
|
|
1546
|
+
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
1532
1547
|
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
1533
1548
|
assert$1.notNil(dialogService);
|
|
1534
1549
|
return _this;
|
|
@@ -1568,7 +1583,7 @@ var DialogInteractionService = /** @class */ (function (_super) {
|
|
|
1568
1583
|
var _this = this;
|
|
1569
1584
|
if (disableClose === void 0) { disableClose = true; }
|
|
1570
1585
|
/** @type {?} */
|
|
1571
|
-
var config = __assign({ autoFocus: false }, this.matDialogDefaultConfig, {
|
|
1586
|
+
var config = __assign({ autoFocus: false, hasBackdrop: true }, this.matDialogDefaultConfig, this.dialogServiceDefaults, {
|
|
1572
1587
|
data: data,
|
|
1573
1588
|
disableClose: disableClose,
|
|
1574
1589
|
panelClass: 'dialog-interaction-service'
|
|
@@ -1592,6 +1607,7 @@ var DialogInteractionService = /** @class */ (function (_super) {
|
|
|
1592
1607
|
* @return {?}
|
|
1593
1608
|
*/
|
|
1594
1609
|
function (result) {
|
|
1610
|
+
// TODO: should I be calling resolve after close?
|
|
1595
1611
|
resolve(result);
|
|
1596
1612
|
matDialogRef.close(result);
|
|
1597
1613
|
},
|
|
@@ -1600,6 +1616,7 @@ var DialogInteractionService = /** @class */ (function (_super) {
|
|
|
1600
1616
|
* @return {?}
|
|
1601
1617
|
*/
|
|
1602
1618
|
function (error) {
|
|
1619
|
+
// TODO: should I be calling reject after close?
|
|
1603
1620
|
reject(error);
|
|
1604
1621
|
matDialogRef.close(error);
|
|
1605
1622
|
}
|
|
@@ -1637,9 +1654,10 @@ var DialogInteractionService = /** @class */ (function (_super) {
|
|
|
1637
1654
|
/** @nocollapse */
|
|
1638
1655
|
DialogInteractionService.ctorParameters = function () { return [
|
|
1639
1656
|
{ type: MatDialog },
|
|
1657
|
+
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
|
|
1640
1658
|
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DIALOG_DEFAULT_OPTIONS,] }] }
|
|
1641
1659
|
]; };
|
|
1642
|
-
/** @nocollapse */ DialogInteractionService.ngInjectableDef = ɵɵdefineInjectable({ factory: function DialogInteractionService_Factory() { return new DialogInteractionService(ɵɵinject(MatDialog$1), ɵɵinject(MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionService, providedIn: "root" });
|
|
1660
|
+
/** @nocollapse */ DialogInteractionService.ngInjectableDef = ɵɵdefineInjectable({ factory: function DialogInteractionService_Factory() { return new DialogInteractionService(ɵɵinject(MatDialog$1), ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), ɵɵinject(MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionService, providedIn: "root" });
|
|
1643
1661
|
return DialogInteractionService;
|
|
1644
1662
|
}(InteractionContext));
|
|
1645
1663
|
if (false) {
|
|
@@ -1649,6 +1667,8 @@ if (false) {
|
|
|
1649
1667
|
*/
|
|
1650
1668
|
DialogInteractionService.prototype.dialogService;
|
|
1651
1669
|
/** @type {?} */
|
|
1670
|
+
DialogInteractionService.prototype.dialogServiceDefaults;
|
|
1671
|
+
/** @type {?} */
|
|
1652
1672
|
DialogInteractionService.prototype.matDialogDefaultConfig;
|
|
1653
1673
|
}
|
|
1654
1674
|
|
|
@@ -4597,5 +4617,5 @@ var ParameterType;
|
|
|
4597
4617
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4598
4618
|
*/
|
|
4599
4619
|
|
|
4600
|
-
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, AbstractPlaceNavigationComponent, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DialogInteractionService, Dimension, DisposableComponent, EmptyStateComponent, FocusBindingDirective, INTERACTION_CONTEXT, InteractionContext, InteractionModule, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, ListPlaceNavComponent, NumberInputComponent, ParameterDefinition, ParameterSnapshot, ParameterType, PasswordInputComponent, Place, PlaceComponent, PlaceDefinition, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouteGuard, PlaceRouter, Point, ROUTE_PARAMETER_LIST_KEY, ResizeAwareComponent, RouteId, RouteParameter, RouteParameterList, RouteParameterValue, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, leftRightPlaceAnimation, slideDownAndUpAnimation, CommandDirective as ɵa, FocusBindingDirective as ɵb, AlertDialogComponent as ɵba,
|
|
4620
|
+
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, AbstractPlaceNavigationComponent, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionService, Dimension, DisposableComponent, EmptyStateComponent, FocusBindingDirective, INTERACTION_CONTEXT, InteractionContext, InteractionModule, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, ListPlaceNavComponent, NumberInputComponent, ParameterDefinition, ParameterSnapshot, ParameterType, PasswordInputComponent, Place, PlaceComponent, PlaceDefinition, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouteGuard, PlaceRouter, Point, ROUTE_PARAMETER_LIST_KEY, ResizeAwareComponent, RouteId, RouteParameter, RouteParameterList, RouteParameterValue, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, leftRightPlaceAnimation, slideDownAndUpAnimation, CommandDirective as ɵa, FocusBindingDirective as ɵb, AlertDialogComponent as ɵba, DIALOG_INTERACTION_SERVICE_DEFAULTS as ɵbc, DialogInteractionService as ɵbd, InteractionContext as ɵbe, DisposableComponent as ɵc, NumberInputComponent as ɵd, AbstractInputComponent as ɵe, StringInputComponent as ɵf, PasswordInputComponent as ɵg, SelectInputComponent as ɵh, PlaceModule as ɵi, EmptyStateComponent as ɵj, BusyOverlayComponent as ɵk, PlaceOutletComponent as ɵl, leftRightPlaceAnimation as ɵm, LEFT_RIGHT_PLACE_ANIMATION as ɵn, PlaceRouter as ɵo, PlaceHistory as ɵp, TabbedPlaceNavigationComponent as ɵq, AbstractPlaceNavigationComponent as ɵr, ListPlaceNavComponent as ɵs, InteractionModule as ɵt, ActivityContainerComponent as ɵu, ActivityOutletComponent as ɵv, ConfirmationDialogComponent as ɵw, AbstractActivity as ɵx, ACTIVITY_DATA as ɵy };
|
|
4601
4621
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|