@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@coolon/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material', '@angular/material/tabs', '@angular/platform-browser/animations', '@coolon/pectin', '@angular/cdk/portal', '@coolon/
|
|
4
|
-
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material, global.ng.material.tabs, global.ng.platformBrowser.animations, global.pectin, global.ng.cdk.portal, global.
|
|
5
|
-
}(this, function (exports, common, core, forms, material, tabs, animations, pectin, portal,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@coolon/typescript-utilities'), require('@angular/material/dialog'), require('@angular/material/icon'), require('@angular/material/list'), require('@angular/material/tooltip'), require('@angular/router'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('@typescript-plus/fast-memoize-decorator'), require('reflect-metadata'), require('lodash'), require('@angular/animations'), require('resize-observer-polyfill')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material', '@angular/material/tabs', '@angular/platform-browser/animations', '@coolon/pectin', '@angular/cdk/portal', '@coolon/typescript-utilities', '@angular/material/dialog', '@angular/material/icon', '@angular/material/list', '@angular/material/tooltip', '@angular/router', '@typescript-plus/fast-memoize-decorator/dist/src', '@typescript-plus/fast-memoize-decorator', 'reflect-metadata', 'lodash', '@angular/animations', 'resize-observer-polyfill'], factory) :
|
|
4
|
+
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material, global.ng.material.tabs, global.ng.platformBrowser.animations, global.pectin, global.ng.cdk.portal, global.typescriptUtilities, global.ng.material.dialog, global.ng.material.icon, global.ng.material.list, global.ng.material.tooltip, global.ng.router, global.src, global.fastMemoizeDecorator, null, global.___default, global.ng.animations, global.ResizeObserver));
|
|
5
|
+
}(this, function (exports, common, core, forms, material, tabs, animations, pectin, portal, typescriptUtilities, dialog, icon, list, tooltip, router, src, fastMemoizeDecorator, reflectMetadata, ___default, animations$1, ResizeObserver) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var ___default__default = 'default' in ___default ? ___default['default'] : ___default;
|
|
8
8
|
ResizeObserver = ResizeObserver && ResizeObserver.hasOwnProperty('default') ? ResizeObserver['default'] : ResizeObserver;
|
|
@@ -1031,15 +1031,10 @@
|
|
|
1031
1031
|
/** @type {?} */
|
|
1032
1032
|
Activity.prototype.busy;
|
|
1033
1033
|
/**
|
|
1034
|
-
* @param {?}
|
|
1035
|
-
* @return {?}
|
|
1036
|
-
*/
|
|
1037
|
-
Activity.prototype.onDone = function (callback) { };
|
|
1038
|
-
/**
|
|
1039
|
-
* @param {?} callback
|
|
1034
|
+
* @param {?} activityContext
|
|
1040
1035
|
* @return {?}
|
|
1041
1036
|
*/
|
|
1042
|
-
Activity.prototype.
|
|
1037
|
+
Activity.prototype.initialise = function (activityContext) { };
|
|
1043
1038
|
}
|
|
1044
1039
|
|
|
1045
1040
|
/**
|
|
@@ -1104,8 +1099,7 @@
|
|
|
1104
1099
|
var componentFactory = this.componentFactoryResolver.resolveComponentFactory(activityContext.activityClass);
|
|
1105
1100
|
this.viewContainerRef.clear();
|
|
1106
1101
|
this.activityComponentRef = this.viewContainerRef.createComponent(componentFactory, 0, injector);
|
|
1107
|
-
this.activityComponentRef.instance.
|
|
1108
|
-
this.activityComponentRef.instance.onCancel(activityContext.onCancel);
|
|
1102
|
+
this.activityComponentRef.instance.initialise(activityContext);
|
|
1109
1103
|
};
|
|
1110
1104
|
/**
|
|
1111
1105
|
* @param {?} alert
|
|
@@ -1172,6 +1166,12 @@
|
|
|
1172
1166
|
interactionContext: [{ type: core.Input }],
|
|
1173
1167
|
activityContext: [{ type: core.Input }]
|
|
1174
1168
|
};
|
|
1169
|
+
__decorate([
|
|
1170
|
+
pectin.Trace(),
|
|
1171
|
+
__metadata("design:type", Function),
|
|
1172
|
+
__metadata("design:paramtypes", [Object]),
|
|
1173
|
+
__metadata("design:returntype", void 0)
|
|
1174
|
+
], ActivityOutletComponent.prototype, "loadActivity", null);
|
|
1175
1175
|
return ActivityOutletComponent;
|
|
1176
1176
|
}());
|
|
1177
1177
|
if (false) {
|
|
@@ -1266,40 +1266,24 @@
|
|
|
1266
1266
|
/**
|
|
1267
1267
|
* @template D, R, E
|
|
1268
1268
|
*/
|
|
1269
|
-
var
|
|
1270
|
-
* @template D, R, E
|
|
1271
|
-
*/
|
|
1272
|
-
AbstractActivity = /** @class */ (function (_super) {
|
|
1269
|
+
var AbstractActivity = /** @class */ (function (_super) {
|
|
1273
1270
|
__extends(AbstractActivity, _super);
|
|
1274
1271
|
function AbstractActivity() {
|
|
1275
1272
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1276
|
-
_this._doneListeners = new pectin.EventListenerList();
|
|
1277
|
-
_this._cancelListeners = new pectin.EventListenerList();
|
|
1278
|
-
_this._finishListeners = new pectin.EventListenerList();
|
|
1279
1273
|
_this._busyModel = new pectin.DelegatingValueModel().withDefault(false);
|
|
1280
1274
|
return _this;
|
|
1281
1275
|
}
|
|
1282
1276
|
/**
|
|
1283
|
-
* @param {?}
|
|
1284
|
-
* @return {?}
|
|
1285
|
-
*/
|
|
1286
|
-
AbstractActivity.prototype.onDone = /**
|
|
1287
|
-
* @param {?} callback
|
|
1288
|
-
* @return {?}
|
|
1289
|
-
*/
|
|
1290
|
-
function (callback) {
|
|
1291
|
-
this._doneListeners.add(callback);
|
|
1292
|
-
};
|
|
1293
|
-
/**
|
|
1294
|
-
* @param {?} callback
|
|
1277
|
+
* @param {?} activityContext
|
|
1295
1278
|
* @return {?}
|
|
1296
1279
|
*/
|
|
1297
|
-
AbstractActivity.prototype.
|
|
1298
|
-
* @param {?}
|
|
1280
|
+
AbstractActivity.prototype.initialise = /**
|
|
1281
|
+
* @param {?} activityContext
|
|
1299
1282
|
* @return {?}
|
|
1300
1283
|
*/
|
|
1301
|
-
function (
|
|
1302
|
-
|
|
1284
|
+
function (activityContext) {
|
|
1285
|
+
typescriptUtilities.assert.isNil(this.activityContext);
|
|
1286
|
+
this.activityContext = activityContext;
|
|
1303
1287
|
};
|
|
1304
1288
|
/**
|
|
1305
1289
|
* @param {?=} result
|
|
@@ -1310,17 +1294,7 @@
|
|
|
1310
1294
|
* @return {?}
|
|
1311
1295
|
*/
|
|
1312
1296
|
function (result) {
|
|
1313
|
-
|
|
1314
|
-
return this._doneListeners
|
|
1315
|
-
.fireAndWait((/**
|
|
1316
|
-
* @param {?} l
|
|
1317
|
-
* @return {?}
|
|
1318
|
-
*/
|
|
1319
|
-
function (l) { return l(result); }))
|
|
1320
|
-
.finally((/**
|
|
1321
|
-
* @return {?}
|
|
1322
|
-
*/
|
|
1323
|
-
function () { return _this.finalizeAndDispose(); }));
|
|
1297
|
+
return this.activityContext.onDone(result);
|
|
1324
1298
|
};
|
|
1325
1299
|
/**
|
|
1326
1300
|
* @param {?=} error
|
|
@@ -1331,57 +1305,39 @@
|
|
|
1331
1305
|
* @return {?}
|
|
1332
1306
|
*/
|
|
1333
1307
|
function (error) {
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
* @return {?}
|
|
1339
|
-
*/
|
|
1340
|
-
function (l) { return l(error); }))
|
|
1341
|
-
.finally((/**
|
|
1308
|
+
this.activityContext.onCancel(error);
|
|
1309
|
+
};
|
|
1310
|
+
Object.defineProperty(AbstractActivity.prototype, "data", {
|
|
1311
|
+
get: /**
|
|
1342
1312
|
* @return {?}
|
|
1343
1313
|
*/
|
|
1344
|
-
function () {
|
|
1345
|
-
|
|
1314
|
+
function () {
|
|
1315
|
+
return this.activityContext.activityData;
|
|
1316
|
+
},
|
|
1317
|
+
enumerable: true,
|
|
1318
|
+
configurable: true
|
|
1319
|
+
});
|
|
1320
|
+
// get interactionContext(): InteractionContext {
|
|
1321
|
+
// return this.activityContext.interactionContext;
|
|
1322
|
+
// }
|
|
1346
1323
|
// @Trace()
|
|
1324
|
+
// get interactionContext(): InteractionContext {
|
|
1325
|
+
// return this.activityContext.interactionContext;
|
|
1326
|
+
// }
|
|
1347
1327
|
// @Trace()
|
|
1348
1328
|
/**
|
|
1349
1329
|
* @return {?}
|
|
1350
1330
|
*/
|
|
1351
1331
|
AbstractActivity.prototype.onActivityReady =
|
|
1332
|
+
// get interactionContext(): InteractionContext {
|
|
1333
|
+
// return this.activityContext.interactionContext;
|
|
1334
|
+
// }
|
|
1352
1335
|
// @Trace()
|
|
1353
1336
|
/**
|
|
1354
1337
|
* @return {?}
|
|
1355
1338
|
*/
|
|
1356
1339
|
function () {
|
|
1357
1340
|
};
|
|
1358
|
-
/**
|
|
1359
|
-
* @private
|
|
1360
|
-
* @return {?}
|
|
1361
|
-
*/
|
|
1362
|
-
AbstractActivity.prototype.finalizeAndDispose = /**
|
|
1363
|
-
* @private
|
|
1364
|
-
* @return {?}
|
|
1365
|
-
*/
|
|
1366
|
-
function () {
|
|
1367
|
-
// this._activeModel.value = false;
|
|
1368
|
-
this._finishListeners.fire((/**
|
|
1369
|
-
* @param {?} l
|
|
1370
|
-
* @return {?}
|
|
1371
|
-
*/
|
|
1372
|
-
function (l) { return l(); }));
|
|
1373
|
-
// this._interactionContext = null;
|
|
1374
|
-
// this._initialized = false;
|
|
1375
|
-
[
|
|
1376
|
-
this._finishListeners,
|
|
1377
|
-
this._doneListeners,
|
|
1378
|
-
this._cancelListeners
|
|
1379
|
-
].forEach((/**
|
|
1380
|
-
* @param {?} l
|
|
1381
|
-
* @return {?}
|
|
1382
|
-
*/
|
|
1383
|
-
function (l) { return l.dispose(); }));
|
|
1384
|
-
};
|
|
1385
1341
|
Object.defineProperty(AbstractActivity.prototype, "busy", {
|
|
1386
1342
|
get: /**
|
|
1387
1343
|
* @return {?}
|
|
@@ -1412,6 +1368,12 @@
|
|
|
1412
1368
|
function () {
|
|
1413
1369
|
return this._busyModel.value;
|
|
1414
1370
|
};
|
|
1371
|
+
__decorate([
|
|
1372
|
+
pectin.Trace(),
|
|
1373
|
+
__metadata("design:type", Function),
|
|
1374
|
+
__metadata("design:paramtypes", [Object]),
|
|
1375
|
+
__metadata("design:returntype", void 0)
|
|
1376
|
+
], AbstractActivity.prototype, "initialise", null);
|
|
1415
1377
|
return AbstractActivity;
|
|
1416
1378
|
}(DisposableComponent));
|
|
1417
1379
|
if (false) {
|
|
@@ -1419,22 +1381,12 @@
|
|
|
1419
1381
|
* @type {?}
|
|
1420
1382
|
* @private
|
|
1421
1383
|
*/
|
|
1422
|
-
AbstractActivity.prototype.
|
|
1423
|
-
/**
|
|
1424
|
-
* @type {?}
|
|
1425
|
-
* @private
|
|
1426
|
-
*/
|
|
1427
|
-
AbstractActivity.prototype._cancelListeners;
|
|
1428
|
-
/**
|
|
1429
|
-
* @type {?}
|
|
1430
|
-
* @private
|
|
1431
|
-
*/
|
|
1432
|
-
AbstractActivity.prototype._finishListeners;
|
|
1384
|
+
AbstractActivity.prototype._busyModel;
|
|
1433
1385
|
/**
|
|
1434
1386
|
* @type {?}
|
|
1435
1387
|
* @private
|
|
1436
1388
|
*/
|
|
1437
|
-
AbstractActivity.prototype.
|
|
1389
|
+
AbstractActivity.prototype.activityContext;
|
|
1438
1390
|
}
|
|
1439
1391
|
|
|
1440
1392
|
/**
|
|
@@ -1506,7 +1458,7 @@
|
|
|
1506
1458
|
ConfirmationDialogComponent.decorators = [
|
|
1507
1459
|
{ type: core.Component, args: [{
|
|
1508
1460
|
selector: 'angular-ui-powerups-confirmation-dialog',
|
|
1509
|
-
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(
|
|
1461
|
+
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",
|
|
1510
1462
|
styles: [":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
|
|
1511
1463
|
}] }
|
|
1512
1464
|
];
|
|
@@ -1531,8 +1483,7 @@
|
|
|
1531
1483
|
var _this = _super.call(this) || this;
|
|
1532
1484
|
_this.activityOutletTabs = new pectin.MutableListModel();
|
|
1533
1485
|
_this.obsoleteTabs = [];
|
|
1534
|
-
|
|
1535
|
-
_this.lastActivityTab = chain(_this.activityOutletTabs).last().otherwise(_this.initialActivityOutlet);
|
|
1486
|
+
_this.finished = false;
|
|
1536
1487
|
return _this;
|
|
1537
1488
|
}
|
|
1538
1489
|
/**
|
|
@@ -1559,16 +1510,38 @@
|
|
|
1559
1510
|
};
|
|
1560
1511
|
/**
|
|
1561
1512
|
* @template D, R, E
|
|
1562
|
-
* @param {?}
|
|
1513
|
+
* @param {?} initialContext
|
|
1563
1514
|
* @return {?}
|
|
1564
1515
|
*/
|
|
1565
1516
|
ActivityContainerComponent.prototype.initialise = /**
|
|
1566
1517
|
* @template D, R, E
|
|
1567
|
-
* @param {?}
|
|
1518
|
+
* @param {?} initialContext
|
|
1568
1519
|
* @return {?}
|
|
1569
1520
|
*/
|
|
1570
|
-
function (
|
|
1571
|
-
|
|
1521
|
+
function (initialContext) {
|
|
1522
|
+
/** @type {?} */
|
|
1523
|
+
var self = this;
|
|
1524
|
+
this.initialActivityOutletContext = {
|
|
1525
|
+
activityClass: initialContext.activityClass,
|
|
1526
|
+
activityData: initialContext.activityData,
|
|
1527
|
+
onDone: (/**
|
|
1528
|
+
* @param {?} result
|
|
1529
|
+
* @return {?}
|
|
1530
|
+
*/
|
|
1531
|
+
function (result) {
|
|
1532
|
+
self.finished = true;
|
|
1533
|
+
return initialContext.onDone(result);
|
|
1534
|
+
}),
|
|
1535
|
+
onCancel: (/**
|
|
1536
|
+
* @param {?} error
|
|
1537
|
+
* @return {?}
|
|
1538
|
+
*/
|
|
1539
|
+
function (error) {
|
|
1540
|
+
self.finished = true;
|
|
1541
|
+
return initialContext.onCancel(error);
|
|
1542
|
+
}),
|
|
1543
|
+
interactionContext: this
|
|
1544
|
+
};
|
|
1572
1545
|
};
|
|
1573
1546
|
/**
|
|
1574
1547
|
* @template D, R, E
|
|
@@ -1585,23 +1558,49 @@
|
|
|
1585
1558
|
function (activityType, data) {
|
|
1586
1559
|
var _this = this;
|
|
1587
1560
|
/** @type {?} */
|
|
1588
|
-
var
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
activityClass: activityType,
|
|
1593
|
-
activityData: data,
|
|
1594
|
-
onDone: deferred.resolve,
|
|
1595
|
-
onCancel: deferred.reject
|
|
1596
|
-
};
|
|
1597
|
-
this.activityOutletTabs.push(context);
|
|
1598
|
-
this.tabs.selectedIndex = this.activityOutletTabs.length;
|
|
1599
|
-
return deferred.promise.finally((/**
|
|
1561
|
+
var self = this;
|
|
1562
|
+
return new Promise((/**
|
|
1563
|
+
* @param {?} resolve
|
|
1564
|
+
* @param {?} reject
|
|
1600
1565
|
* @return {?}
|
|
1601
1566
|
*/
|
|
1602
|
-
function () {
|
|
1603
|
-
|
|
1604
|
-
|
|
1567
|
+
function (resolve, reject) {
|
|
1568
|
+
/** @type {?} */
|
|
1569
|
+
var context = {
|
|
1570
|
+
interactionContext: self,
|
|
1571
|
+
activityClass: activityType,
|
|
1572
|
+
activityData: data,
|
|
1573
|
+
onDone: (/**
|
|
1574
|
+
* @param {?} result
|
|
1575
|
+
* @return {?}
|
|
1576
|
+
*/
|
|
1577
|
+
function (result) {
|
|
1578
|
+
self.obsoleteTabs.push(context);
|
|
1579
|
+
// animating on the next tick gives chained done's a chance to
|
|
1580
|
+
// finished before we start an animations
|
|
1581
|
+
resolve(result);
|
|
1582
|
+
setTimeout((/**
|
|
1583
|
+
* @return {?}
|
|
1584
|
+
*/
|
|
1585
|
+
function () { return self.animateTabs(); }));
|
|
1586
|
+
}),
|
|
1587
|
+
onCancel: (/**
|
|
1588
|
+
* @param {?} error
|
|
1589
|
+
* @return {?}
|
|
1590
|
+
*/
|
|
1591
|
+
function (error) {
|
|
1592
|
+
self.obsoleteTabs.push(context);
|
|
1593
|
+
// finished before we start an animations
|
|
1594
|
+
reject(error);
|
|
1595
|
+
// animating on the next tick gives chained done's a chance to complete before we animate
|
|
1596
|
+
setTimeout((/**
|
|
1597
|
+
* @return {?}
|
|
1598
|
+
*/
|
|
1599
|
+
function () { return self.animateTabs(); }));
|
|
1600
|
+
})
|
|
1601
|
+
};
|
|
1602
|
+
self.activityOutletTabs.push(context);
|
|
1603
|
+
self.tabs.selectedIndex = _this.activityOutletTabs.length;
|
|
1605
1604
|
}));
|
|
1606
1605
|
};
|
|
1607
1606
|
/**
|
|
@@ -1643,12 +1642,26 @@
|
|
|
1643
1642
|
function (tab) {
|
|
1644
1643
|
return !_this.obsoleteTabs.includes(tab);
|
|
1645
1644
|
}));
|
|
1645
|
+
this.obsoleteTabs = [];
|
|
1646
1646
|
this.outlets.toArray()[this.tabs.selectedIndex].notifyReady();
|
|
1647
1647
|
};
|
|
1648
|
+
/**
|
|
1649
|
+
* @private
|
|
1650
|
+
* @return {?}
|
|
1651
|
+
*/
|
|
1652
|
+
ActivityContainerComponent.prototype.animateTabs = /**
|
|
1653
|
+
* @private
|
|
1654
|
+
* @return {?}
|
|
1655
|
+
*/
|
|
1656
|
+
function () {
|
|
1657
|
+
if (!this.finished) {
|
|
1658
|
+
this.tabs.selectedIndex = this.activityOutletTabs.length - this.obsoleteTabs.length;
|
|
1659
|
+
}
|
|
1660
|
+
};
|
|
1648
1661
|
ActivityContainerComponent.decorators = [
|
|
1649
1662
|
{ type: core.Component, args: [{
|
|
1650
1663
|
selector: 'angular-ui-powerups-activity-container',
|
|
1651
|
-
template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"true\">\n <mat-tab>\n <angular-ui-powerups-activity-outlet [interactionContext]=\"this\"\n [activityContext]=\"
|
|
1664
|
+
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",
|
|
1652
1665
|
styles: [":host{display:block}"]
|
|
1653
1666
|
}] }
|
|
1654
1667
|
];
|
|
@@ -1656,7 +1669,7 @@
|
|
|
1656
1669
|
ActivityContainerComponent.ctorParameters = function () { return []; };
|
|
1657
1670
|
ActivityContainerComponent.propDecorators = {
|
|
1658
1671
|
parentInteractionContext: [{ type: core.Input }],
|
|
1659
|
-
|
|
1672
|
+
initialActivityOutletContext: [{ type: core.Input }],
|
|
1660
1673
|
tabs: [{ type: core.ViewChild, args: ['tabs', { static: true },] }],
|
|
1661
1674
|
outlets: [{ type: core.ViewChildren, args: [exports.ɵv,] }]
|
|
1662
1675
|
};
|
|
@@ -1666,7 +1679,7 @@
|
|
|
1666
1679
|
/** @type {?} */
|
|
1667
1680
|
exports.ɵu.prototype.parentInteractionContext;
|
|
1668
1681
|
/** @type {?} */
|
|
1669
|
-
exports.ɵu.prototype.
|
|
1682
|
+
exports.ɵu.prototype.initialActivityOutletContext;
|
|
1670
1683
|
/** @type {?} */
|
|
1671
1684
|
exports.ɵu.prototype.tabs;
|
|
1672
1685
|
/** @type {?} */
|
|
@@ -1682,7 +1695,7 @@
|
|
|
1682
1695
|
* @type {?}
|
|
1683
1696
|
* @private
|
|
1684
1697
|
*/
|
|
1685
|
-
exports.ɵu.prototype.
|
|
1698
|
+
exports.ɵu.prototype.finished;
|
|
1686
1699
|
}
|
|
1687
1700
|
(function (ActivityContainerComponent) {
|
|
1688
1701
|
/**
|
|
@@ -1707,11 +1720,14 @@
|
|
|
1707
1720
|
* @fileoverview added by tsickle
|
|
1708
1721
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1709
1722
|
*/
|
|
1723
|
+
/** @type {?} */
|
|
1724
|
+
var DIALOG_INTERACTION_SERVICE_DEFAULTS = new core.InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
|
|
1710
1725
|
var DialogInteractionService = /** @class */ (function (_super) {
|
|
1711
1726
|
__extends(DialogInteractionService, _super);
|
|
1712
|
-
function DialogInteractionService(dialogService, matDialogDefaultConfig) {
|
|
1727
|
+
function DialogInteractionService(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
|
|
1713
1728
|
var _this = _super.call(this) || this;
|
|
1714
1729
|
_this.dialogService = dialogService;
|
|
1730
|
+
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
1715
1731
|
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
1716
1732
|
typescriptUtilities.assert.notNil(dialogService);
|
|
1717
1733
|
return _this;
|
|
@@ -1751,7 +1767,7 @@
|
|
|
1751
1767
|
var _this = this;
|
|
1752
1768
|
if (disableClose === void 0) { disableClose = true; }
|
|
1753
1769
|
/** @type {?} */
|
|
1754
|
-
var config = __assign({ autoFocus: false }, this.matDialogDefaultConfig, {
|
|
1770
|
+
var config = __assign({ autoFocus: false, hasBackdrop: true }, this.matDialogDefaultConfig, this.dialogServiceDefaults, {
|
|
1755
1771
|
data: data,
|
|
1756
1772
|
disableClose: disableClose,
|
|
1757
1773
|
panelClass: 'dialog-interaction-service'
|
|
@@ -1775,6 +1791,7 @@
|
|
|
1775
1791
|
* @return {?}
|
|
1776
1792
|
*/
|
|
1777
1793
|
function (result) {
|
|
1794
|
+
// TODO: should I be calling resolve after close?
|
|
1778
1795
|
resolve(result);
|
|
1779
1796
|
matDialogRef.close(result);
|
|
1780
1797
|
},
|
|
@@ -1783,6 +1800,7 @@
|
|
|
1783
1800
|
* @return {?}
|
|
1784
1801
|
*/
|
|
1785
1802
|
function (error) {
|
|
1803
|
+
// TODO: should I be calling reject after close?
|
|
1786
1804
|
reject(error);
|
|
1787
1805
|
matDialogRef.close(error);
|
|
1788
1806
|
}
|
|
@@ -1820,9 +1838,10 @@
|
|
|
1820
1838
|
/** @nocollapse */
|
|
1821
1839
|
DialogInteractionService.ctorParameters = function () { return [
|
|
1822
1840
|
{ type: material.MatDialog },
|
|
1841
|
+
{ type: dialog.MatDialogConfig, decorators: [{ type: core.Optional }, { type: core.Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
|
|
1823
1842
|
{ type: dialog.MatDialogConfig, decorators: [{ type: core.Optional }, { type: core.Inject, args: [dialog.MAT_DIALOG_DEFAULT_OPTIONS,] }] }
|
|
1824
1843
|
]; };
|
|
1825
|
-
/** @nocollapse */ DialogInteractionService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function DialogInteractionService_Factory() { return new DialogInteractionService(core.ɵɵinject(dialog.MatDialog), core.ɵɵinject(dialog.MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionService, providedIn: "root" });
|
|
1844
|
+
/** @nocollapse */ DialogInteractionService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function DialogInteractionService_Factory() { return new DialogInteractionService(core.ɵɵinject(dialog.MatDialog), core.ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), core.ɵɵinject(dialog.MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionService, providedIn: "root" });
|
|
1826
1845
|
return DialogInteractionService;
|
|
1827
1846
|
}(InteractionContext));
|
|
1828
1847
|
if (false) {
|
|
@@ -1832,6 +1851,8 @@
|
|
|
1832
1851
|
*/
|
|
1833
1852
|
DialogInteractionService.prototype.dialogService;
|
|
1834
1853
|
/** @type {?} */
|
|
1854
|
+
DialogInteractionService.prototype.dialogServiceDefaults;
|
|
1855
|
+
/** @type {?} */
|
|
1835
1856
|
DialogInteractionService.prototype.matDialogDefaultConfig;
|
|
1836
1857
|
}
|
|
1837
1858
|
|
|
@@ -4772,6 +4793,7 @@
|
|
|
4772
4793
|
exports.CommandDirective = CommandDirective;
|
|
4773
4794
|
exports.ConfirmationDialogComponent = ConfirmationDialogComponent;
|
|
4774
4795
|
exports.DEFINITION_META_DATA_KEY = DEFINITION_META_DATA_KEY;
|
|
4796
|
+
exports.DIALOG_INTERACTION_SERVICE_DEFAULTS = DIALOG_INTERACTION_SERVICE_DEFAULTS;
|
|
4775
4797
|
exports.DialogInteractionService = DialogInteractionService;
|
|
4776
4798
|
exports.Dimension = Dimension;
|
|
4777
4799
|
exports.DisposableComponent = DisposableComponent;
|
|
@@ -4806,8 +4828,9 @@
|
|
|
4806
4828
|
exports.ɵa = CommandDirective;
|
|
4807
4829
|
exports.ɵb = FocusBindingDirective;
|
|
4808
4830
|
exports.ɵba = AlertDialogComponent;
|
|
4809
|
-
exports.ɵbc =
|
|
4810
|
-
exports.ɵbd =
|
|
4831
|
+
exports.ɵbc = DIALOG_INTERACTION_SERVICE_DEFAULTS;
|
|
4832
|
+
exports.ɵbd = DialogInteractionService;
|
|
4833
|
+
exports.ɵbe = InteractionContext;
|
|
4811
4834
|
exports.ɵc = DisposableComponent;
|
|
4812
4835
|
exports.ɵd = NumberInputComponent;
|
|
4813
4836
|
exports.ɵe = AbstractInputComponent;
|