@coolon/angular-ui-powerups 0.0.60 → 0.0.61
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 +198 -18
- 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 +5 -4
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +6 -5
- package/esm2015/index.js +2 -2
- package/esm2015/lib/interaction/abstract-activity.js +2 -9
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +16 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.js +22 -9
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +92 -0
- package/esm2015/lib/interaction/index.js +2 -1
- package/esm2015/lib/interaction/interaction-context.js +11 -1
- package/esm2015/lib/interaction/interaction.module.js +5 -2
- package/esm2015/lib/interaction/services/dialog-interaction.service.js +16 -1
- package/esm2015/public_api.js +2 -2
- package/esm5/coolon-angular-ui-powerups.js +6 -5
- package/esm5/index.js +2 -2
- package/esm5/lib/interaction/abstract-activity.js +9 -9
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +23 -1
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.js +36 -9
- package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +107 -0
- package/esm5/lib/interaction/index.js +2 -1
- package/esm5/lib/interaction/interaction-context.js +11 -1
- package/esm5/lib/interaction/interaction.module.js +5 -2
- package/esm5/lib/interaction/services/dialog-interaction.service.js +23 -1
- package/esm5/public_api.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +150 -15
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +195 -16
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +1 -0
- package/lib/interaction/components/activity-outlet/activity-outlet.component.d.ts +2 -0
- package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +22 -0
- package/lib/interaction/index.d.ts +1 -0
- package/lib/interaction/interaction-context.d.ts +7 -0
- package/lib/interaction/services/dialog-interaction.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1008,6 +1008,16 @@
|
|
|
1008
1008
|
* @return {?}
|
|
1009
1009
|
*/
|
|
1010
1010
|
InteractionContext.prototype.confirm = function (confirm) { };
|
|
1011
|
+
/**
|
|
1012
|
+
* Presents the confirmation to the user and runs the activity only if the user confirms.
|
|
1013
|
+
* @abstract
|
|
1014
|
+
* @template D, R, E
|
|
1015
|
+
* @param {?} confirm
|
|
1016
|
+
* @param {?} activityType the activity to run if confirmed.
|
|
1017
|
+
* @param {?=} data the activity data.
|
|
1018
|
+
* @return {?}
|
|
1019
|
+
*/
|
|
1020
|
+
InteractionContext.prototype.confirmThen = function (confirm, activityType, data) { };
|
|
1011
1021
|
/**
|
|
1012
1022
|
* @abstract
|
|
1013
1023
|
* @param {?} alert
|
|
@@ -1123,6 +1133,23 @@
|
|
|
1123
1133
|
function (confirm) {
|
|
1124
1134
|
return this.interactionContext.confirm(confirm);
|
|
1125
1135
|
};
|
|
1136
|
+
/**
|
|
1137
|
+
* @template D1, R1, E1
|
|
1138
|
+
* @param {?} confirm
|
|
1139
|
+
* @param {?} activityType
|
|
1140
|
+
* @param {?=} data
|
|
1141
|
+
* @return {?}
|
|
1142
|
+
*/
|
|
1143
|
+
ActivityOutletComponent.prototype.confirmThen = /**
|
|
1144
|
+
* @template D1, R1, E1
|
|
1145
|
+
* @param {?} confirm
|
|
1146
|
+
* @param {?} activityType
|
|
1147
|
+
* @param {?=} data
|
|
1148
|
+
* @return {?}
|
|
1149
|
+
*/
|
|
1150
|
+
function (confirm, activityType, data) {
|
|
1151
|
+
return this.interactionContext.confirmThen(confirm, activityType, data);
|
|
1152
|
+
};
|
|
1126
1153
|
/**
|
|
1127
1154
|
* @template D1, R1, E1
|
|
1128
1155
|
* @param {?} activityType
|
|
@@ -1166,12 +1193,6 @@
|
|
|
1166
1193
|
interactionContext: [{ type: core.Input }],
|
|
1167
1194
|
activityContext: [{ type: core.Input }]
|
|
1168
1195
|
};
|
|
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
1196
|
return ActivityOutletComponent;
|
|
1176
1197
|
}());
|
|
1177
1198
|
if (false) {
|
|
@@ -1232,6 +1253,23 @@
|
|
|
1232
1253
|
function (confirm) {
|
|
1233
1254
|
return pectin.lang.notImplemented();
|
|
1234
1255
|
};
|
|
1256
|
+
/**
|
|
1257
|
+
* @template D1, R1, E1
|
|
1258
|
+
* @param {?} confirm
|
|
1259
|
+
* @param {?} activityType
|
|
1260
|
+
* @param {?=} data
|
|
1261
|
+
* @return {?}
|
|
1262
|
+
*/
|
|
1263
|
+
OutletInteractionContext.prototype.confirmThen = /**
|
|
1264
|
+
* @template D1, R1, E1
|
|
1265
|
+
* @param {?} confirm
|
|
1266
|
+
* @param {?} activityType
|
|
1267
|
+
* @param {?=} data
|
|
1268
|
+
* @return {?}
|
|
1269
|
+
*/
|
|
1270
|
+
function (confirm, activityType, data) {
|
|
1271
|
+
return pectin.lang.notImplemented();
|
|
1272
|
+
};
|
|
1235
1273
|
/**
|
|
1236
1274
|
* @template D1, R1, E1
|
|
1237
1275
|
* @param {?} activityType
|
|
@@ -1266,7 +1304,10 @@
|
|
|
1266
1304
|
/**
|
|
1267
1305
|
* @template D, R, E
|
|
1268
1306
|
*/
|
|
1269
|
-
var
|
|
1307
|
+
var /**
|
|
1308
|
+
* @template D, R, E
|
|
1309
|
+
*/
|
|
1310
|
+
AbstractActivity = /** @class */ (function (_super) {
|
|
1270
1311
|
__extends(AbstractActivity, _super);
|
|
1271
1312
|
function AbstractActivity() {
|
|
1272
1313
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -1349,12 +1390,6 @@
|
|
|
1349
1390
|
function () {
|
|
1350
1391
|
return this._busyModel.value;
|
|
1351
1392
|
};
|
|
1352
|
-
__decorate([
|
|
1353
|
-
pectin.Trace(),
|
|
1354
|
-
__metadata("design:type", Function),
|
|
1355
|
-
__metadata("design:paramtypes", [Object]),
|
|
1356
|
-
__metadata("design:returntype", void 0)
|
|
1357
|
-
], AbstractActivity.prototype, "initialise", null);
|
|
1358
1393
|
return AbstractActivity;
|
|
1359
1394
|
}(DisposableComponent));
|
|
1360
1395
|
if (false) {
|
|
@@ -1407,6 +1442,106 @@
|
|
|
1407
1442
|
AlertDialogComponent.prototype.alert;
|
|
1408
1443
|
}
|
|
1409
1444
|
|
|
1445
|
+
/**
|
|
1446
|
+
* @fileoverview added by tsickle
|
|
1447
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1448
|
+
*/
|
|
1449
|
+
/**
|
|
1450
|
+
* @template D, R, E
|
|
1451
|
+
*/
|
|
1452
|
+
exports.ɵba = /** @class */ (function (_super) {
|
|
1453
|
+
__extends(ConfirmThenDialogComponent, _super);
|
|
1454
|
+
function ConfirmThenDialogComponent(config, interactionContext) {
|
|
1455
|
+
var _this = _super.call(this) || this;
|
|
1456
|
+
_this.config = config;
|
|
1457
|
+
_this.interactionContext = interactionContext;
|
|
1458
|
+
pectin.assert.notNil(config);
|
|
1459
|
+
return _this;
|
|
1460
|
+
}
|
|
1461
|
+
/**
|
|
1462
|
+
* @return {?}
|
|
1463
|
+
*/
|
|
1464
|
+
ConfirmThenDialogComponent.prototype.ngOnInit = /**
|
|
1465
|
+
* @return {?}
|
|
1466
|
+
*/
|
|
1467
|
+
function () {
|
|
1468
|
+
};
|
|
1469
|
+
Object.defineProperty(ConfirmThenDialogComponent.prototype, "confirm", {
|
|
1470
|
+
get: /**
|
|
1471
|
+
* @return {?}
|
|
1472
|
+
*/
|
|
1473
|
+
function () {
|
|
1474
|
+
return this.config.confirm;
|
|
1475
|
+
},
|
|
1476
|
+
enumerable: true,
|
|
1477
|
+
configurable: true
|
|
1478
|
+
});
|
|
1479
|
+
/**
|
|
1480
|
+
* @return {?}
|
|
1481
|
+
*/
|
|
1482
|
+
ConfirmThenDialogComponent.prototype.isDestructive = /**
|
|
1483
|
+
* @return {?}
|
|
1484
|
+
*/
|
|
1485
|
+
function () {
|
|
1486
|
+
return this.confirm.destructive && this.confirm.destructive();
|
|
1487
|
+
};
|
|
1488
|
+
/**
|
|
1489
|
+
* @return {?}
|
|
1490
|
+
*/
|
|
1491
|
+
ConfirmThenDialogComponent.prototype.onConfirm = /**
|
|
1492
|
+
* @return {?}
|
|
1493
|
+
*/
|
|
1494
|
+
function () {
|
|
1495
|
+
var _this = this;
|
|
1496
|
+
this.interactionContext.startActivity(this.config.activityType, this.config.data)
|
|
1497
|
+
.then((/**
|
|
1498
|
+
* @param {?} result
|
|
1499
|
+
* @return {?}
|
|
1500
|
+
*/
|
|
1501
|
+
function (result) { return _this.done(result); }))
|
|
1502
|
+
.catch((/**
|
|
1503
|
+
* @param {?} error
|
|
1504
|
+
* @return {?}
|
|
1505
|
+
*/
|
|
1506
|
+
function (error) { return _this.cancel(error); }));
|
|
1507
|
+
};
|
|
1508
|
+
ConfirmThenDialogComponent.decorators = [
|
|
1509
|
+
{ type: core.Component, args: [{
|
|
1510
|
+
selector: 'angular-ui-powerups-confirmation-dialog',
|
|
1511
|
+
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)=\"onConfirm()\">{{confirm.ok()}}</button>\n</p>\n\n",
|
|
1512
|
+
styles: [":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
|
|
1513
|
+
}] }
|
|
1514
|
+
];
|
|
1515
|
+
/** @nocollapse */
|
|
1516
|
+
ConfirmThenDialogComponent.ctorParameters = function () { return [
|
|
1517
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [ACTIVITY_DATA,] }] },
|
|
1518
|
+
{ type: InteractionContext }
|
|
1519
|
+
]; };
|
|
1520
|
+
return ConfirmThenDialogComponent;
|
|
1521
|
+
}(AbstractActivity));
|
|
1522
|
+
if (false) {
|
|
1523
|
+
/** @type {?} */
|
|
1524
|
+
exports.ɵba.prototype.config;
|
|
1525
|
+
/** @type {?} */
|
|
1526
|
+
exports.ɵba.prototype.interactionContext;
|
|
1527
|
+
}
|
|
1528
|
+
(function (ConfirmThenDialogComponent) {
|
|
1529
|
+
/**
|
|
1530
|
+
* @record
|
|
1531
|
+
* @template D, R, E
|
|
1532
|
+
*/
|
|
1533
|
+
function Data() { }
|
|
1534
|
+
ConfirmThenDialogComponent.Data = Data;
|
|
1535
|
+
if (false) {
|
|
1536
|
+
/** @type {?} */
|
|
1537
|
+
Data.prototype.confirm;
|
|
1538
|
+
/** @type {?} */
|
|
1539
|
+
Data.prototype.activityType;
|
|
1540
|
+
/** @type {?} */
|
|
1541
|
+
Data.prototype.data;
|
|
1542
|
+
}
|
|
1543
|
+
})(exports.ɵba || (exports.ɵba = {}));
|
|
1544
|
+
|
|
1410
1545
|
/**
|
|
1411
1546
|
* @fileoverview added by tsickle
|
|
1412
1547
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -1606,6 +1741,27 @@
|
|
|
1606
1741
|
function (confirm) {
|
|
1607
1742
|
return this.startActivity(ConfirmationDialogComponent, confirm);
|
|
1608
1743
|
};
|
|
1744
|
+
/**
|
|
1745
|
+
* @template D, R, E
|
|
1746
|
+
* @param {?} confirm
|
|
1747
|
+
* @param {?} activityType
|
|
1748
|
+
* @param {?=} data
|
|
1749
|
+
* @return {?}
|
|
1750
|
+
*/
|
|
1751
|
+
ActivityContainerComponent.prototype.confirmThen = /**
|
|
1752
|
+
* @template D, R, E
|
|
1753
|
+
* @param {?} confirm
|
|
1754
|
+
* @param {?} activityType
|
|
1755
|
+
* @param {?=} data
|
|
1756
|
+
* @return {?}
|
|
1757
|
+
*/
|
|
1758
|
+
function (confirm, activityType, data) {
|
|
1759
|
+
return this.startActivity(exports.ɵba, {
|
|
1760
|
+
confirm: confirm,
|
|
1761
|
+
activityType: activityType,
|
|
1762
|
+
data: data
|
|
1763
|
+
});
|
|
1764
|
+
};
|
|
1609
1765
|
/**
|
|
1610
1766
|
* @private
|
|
1611
1767
|
* @return {?}
|
|
@@ -1811,6 +1967,27 @@
|
|
|
1811
1967
|
function (confirm) {
|
|
1812
1968
|
return this._startActivity(ConfirmationDialogComponent, confirm, true);
|
|
1813
1969
|
};
|
|
1970
|
+
/**
|
|
1971
|
+
* @template D, R, E
|
|
1972
|
+
* @param {?} confirm
|
|
1973
|
+
* @param {?} activityType
|
|
1974
|
+
* @param {?=} data
|
|
1975
|
+
* @return {?}
|
|
1976
|
+
*/
|
|
1977
|
+
DialogInteractionService.prototype.confirmThen = /**
|
|
1978
|
+
* @template D, R, E
|
|
1979
|
+
* @param {?} confirm
|
|
1980
|
+
* @param {?} activityType
|
|
1981
|
+
* @param {?=} data
|
|
1982
|
+
* @return {?}
|
|
1983
|
+
*/
|
|
1984
|
+
function (confirm, activityType, data) {
|
|
1985
|
+
return this._startActivity(exports.ɵba, {
|
|
1986
|
+
confirm: confirm,
|
|
1987
|
+
activityType: activityType,
|
|
1988
|
+
data: data
|
|
1989
|
+
}, true);
|
|
1990
|
+
};
|
|
1814
1991
|
DialogInteractionService.decorators = [
|
|
1815
1992
|
{ type: core.Injectable, args: [{
|
|
1816
1993
|
providedIn: 'root'
|
|
@@ -1856,16 +2033,18 @@
|
|
|
1856
2033
|
declarations: [
|
|
1857
2034
|
exports.ɵu,
|
|
1858
2035
|
ConfirmationDialogComponent,
|
|
2036
|
+
exports.ɵba,
|
|
1859
2037
|
AlertDialogComponent,
|
|
1860
2038
|
exports.ɵv
|
|
1861
2039
|
],
|
|
1862
2040
|
exports: [
|
|
1863
2041
|
exports.ɵu,
|
|
1864
|
-
exports.ɵv
|
|
2042
|
+
exports.ɵv,
|
|
1865
2043
|
],
|
|
1866
2044
|
entryComponents: [
|
|
1867
2045
|
exports.ɵu,
|
|
1868
2046
|
ConfirmationDialogComponent,
|
|
2047
|
+
exports.ɵba,
|
|
1869
2048
|
AlertDialogComponent
|
|
1870
2049
|
],
|
|
1871
2050
|
providers: [
|
|
@@ -4772,6 +4951,7 @@
|
|
|
4772
4951
|
exports.AngularUiPowerupsModule = AngularUiPowerupsModule;
|
|
4773
4952
|
exports.BusyOverlayComponent = BusyOverlayComponent;
|
|
4774
4953
|
exports.CommandDirective = CommandDirective;
|
|
4954
|
+
exports.ConfirmThenDialogComponent = exports.ɵba;
|
|
4775
4955
|
exports.ConfirmationDialogComponent = ConfirmationDialogComponent;
|
|
4776
4956
|
exports.DEFINITION_META_DATA_KEY = DEFINITION_META_DATA_KEY;
|
|
4777
4957
|
exports.DIALOG_INTERACTION_SERVICE_DEFAULTS = DIALOG_INTERACTION_SERVICE_DEFAULTS;
|
|
@@ -4808,10 +4988,10 @@
|
|
|
4808
4988
|
exports.slideDownAndUpAnimation = slideDownAndUpAnimation;
|
|
4809
4989
|
exports.ɵa = CommandDirective;
|
|
4810
4990
|
exports.ɵb = FocusBindingDirective;
|
|
4811
|
-
exports.ɵ
|
|
4812
|
-
exports.ɵbc =
|
|
4813
|
-
exports.ɵ
|
|
4814
|
-
exports.ɵ
|
|
4991
|
+
exports.ɵbb = InteractionContext;
|
|
4992
|
+
exports.ɵbc = AlertDialogComponent;
|
|
4993
|
+
exports.ɵbe = DIALOG_INTERACTION_SERVICE_DEFAULTS;
|
|
4994
|
+
exports.ɵbf = DialogInteractionService;
|
|
4815
4995
|
exports.ɵc = DisposableComponent;
|
|
4816
4996
|
exports.ɵd = NumberInputComponent;
|
|
4817
4997
|
exports.ɵe = AbstractInputComponent;
|