@coolon/angular-ui-powerups 12.4.0-alpha.70 → 12.4.0-alpha.72

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.
Files changed (36) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +85 -8
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/coolon-angular-ui-powerups.metadata.json +1 -1
  4. package/esm2015/lib/interaction/abstract-interaction-context.js +7 -0
  5. package/esm2015/lib/interaction/abstract-interaction-context.js.map +1 -1
  6. package/esm2015/lib/interaction/abstract-interaction-context.metadata.json +1 -1
  7. package/esm2015/lib/interaction/activity.js +1 -0
  8. package/esm2015/lib/interaction/activity.js.map +1 -1
  9. package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.js +51 -0
  10. package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.js.map +1 -0
  11. package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.metadata.json +1 -0
  12. package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.ngfactory.js.map +1 -0
  13. package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.scss.shim.ngstyle.js.map +1 -0
  14. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +3 -0
  15. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  16. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.metadata.json +1 -1
  17. package/esm2015/lib/interaction/exports.js +1 -1
  18. package/esm2015/lib/interaction/exports.js.map +1 -1
  19. package/esm2015/lib/interaction/exports.metadata.json +1 -1
  20. package/esm2015/lib/interaction/interaction-context.js.map +1 -1
  21. package/esm2015/lib/interaction/interaction.module.js +7 -5
  22. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  23. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  24. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  25. package/fesm2015/coolon-angular-ui-powerups.js +64 -9
  26. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  27. package/lib/interaction/abstract-interaction-context.d.ts +1 -0
  28. package/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.d.ts +18 -0
  29. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +1 -0
  30. package/lib/interaction/exports.d.ts +1 -1
  31. package/lib/interaction/interaction-context.d.ts +1 -0
  32. package/package.json +1 -1
  33. package/esm2015/lib/interaction/result.js +0 -4
  34. package/esm2015/lib/interaction/result.js.map +0 -1
  35. package/esm2015/lib/interaction/result.metadata.json +0 -1
  36. package/lib/interaction/result.d.ts +0 -8
@@ -5278,6 +5278,7 @@
5278
5278
  when(this._focusedModel).becomesTruthy(function () {
5279
5279
  _this.onActivityReady();
5280
5280
  });
5281
+ this.busyWhile(this.confirmCommand.busy);
5281
5282
  };
5282
5283
  Activity.prototype.ngAfterViewInit = function () {
5283
5284
  var _a;
@@ -5431,6 +5432,74 @@
5431
5432
  { type: undefined, decorators: [{ type: i0.Inject, args: [ACTIVITY_DATA,] }] }
5432
5433
  ]; };
5433
5434
 
5435
+ var ConfirmThenExecuteDialogComponent = /** @class */ (function (_super) {
5436
+ __extends(ConfirmThenExecuteDialogComponent, _super);
5437
+ function ConfirmThenExecuteDialogComponent(data) {
5438
+ var _this = _super.call(this) || this;
5439
+ _this.data = data;
5440
+ pectin.assert.notNil(data);
5441
+ _this.confirmCommand = pectin.Command.create(function () { return __awaiter(_this, void 0, void 0, function () {
5442
+ var result, e_1;
5443
+ return __generator(this, function (_a) {
5444
+ switch (_a.label) {
5445
+ case 0:
5446
+ _a.trys.push([0, 2, , 3]);
5447
+ return [4 /*yield*/, data.operation()];
5448
+ case 1:
5449
+ result = _a.sent();
5450
+ this.done(result);
5451
+ return [3 /*break*/, 3];
5452
+ case 2:
5453
+ e_1 = _a.sent();
5454
+ this.cancel(e_1);
5455
+ return [3 /*break*/, 3];
5456
+ case 3: return [2 /*return*/];
5457
+ }
5458
+ });
5459
+ }); });
5460
+ _this.cancelCommand = pectin.Command.create(function () {
5461
+ return _this.cancel();
5462
+ });
5463
+ _this.confirmFace = {
5464
+ text: function () { return _this.confirm.ok(); },
5465
+ color: function () { return _this.isDestructive() ? 'warn' : 'primary'; },
5466
+ style: function () { return 'raised'; }
5467
+ };
5468
+ _this.cancelFace = {
5469
+ text: function () { return _this.confirm.cancel(); }
5470
+ };
5471
+ return _this;
5472
+ }
5473
+ Object.defineProperty(ConfirmThenExecuteDialogComponent.prototype, "confirm", {
5474
+ get: function () {
5475
+ return this.data.confirm;
5476
+ },
5477
+ enumerable: false,
5478
+ configurable: true
5479
+ });
5480
+ Object.defineProperty(ConfirmThenExecuteDialogComponent.prototype, "titleColor", {
5481
+ get: function () {
5482
+ return this.isDestructive() ? 'warn' : undefined;
5483
+ },
5484
+ enumerable: false,
5485
+ configurable: true
5486
+ });
5487
+ ConfirmThenExecuteDialogComponent.prototype.isDestructive = function () {
5488
+ return this.confirm.destructive && this.confirm.destructive();
5489
+ };
5490
+ return ConfirmThenExecuteDialogComponent;
5491
+ }(Activity));
5492
+ ConfirmThenExecuteDialogComponent.decorators = [
5493
+ { type: i0.Component, args: [{
5494
+ selector: 'aup-confirmation-execute-dialog',
5495
+ template: "<aup-activity-title *ngIf=\"confirm.title\" [color]=\"titleColor\">{{confirm.title()}}</aup-activity-title>\n<aup-activity-body>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\" [cancelFace]=\"cancelFace\"></aup-activity-actions>\n",
5496
+ styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"]
5497
+ },] }
5498
+ ];
5499
+ ConfirmThenExecuteDialogComponent.ctorParameters = function () { return [
5500
+ { type: undefined, decorators: [{ type: i0.Inject, args: [ACTIVITY_DATA,] }] }
5501
+ ]; };
5502
+
5434
5503
  var ConfirmationDialogComponent = /** @class */ (function (_super) {
5435
5504
  __extends(ConfirmationDialogComponent, _super);
5436
5505
  function ConfirmationDialogComponent(confirm) {
@@ -5510,6 +5579,12 @@
5510
5579
  data: data
5511
5580
  }, true);
5512
5581
  };
5582
+ AbstractInteractionContext.prototype.confirmThenExecute = function (confirm, operation) {
5583
+ return this.createAndLaunchActivity(ConfirmThenExecuteDialogComponent, {
5584
+ confirm: confirm,
5585
+ operation: operation
5586
+ }, true);
5587
+ };
5513
5588
  return AbstractInteractionContext;
5514
5589
  }());
5515
5590
 
@@ -6291,6 +6366,9 @@
6291
6366
  InPlaceInteractionContextComponent.prototype.confirmThen = function (confirm, activityType, data) {
6292
6367
  return this.activityContainerComponent.confirmThen(confirm, activityType);
6293
6368
  };
6369
+ InPlaceInteractionContextComponent.prototype.confirmThenExecute = function (confirm, operation) {
6370
+ return this.activityContainerComponent.confirmThenExecute(confirm, operation);
6371
+ };
6294
6372
  InPlaceInteractionContextComponent.prototype.isActive = function () {
6295
6373
  return this.activityContainerComponent.isActive();
6296
6374
  };
@@ -7218,6 +7296,7 @@
7218
7296
  ActivityContainerComponent,
7219
7297
  ConfirmationDialogComponent,
7220
7298
  ConfirmThenDialogComponent,
7299
+ ConfirmThenExecuteDialogComponent,
7221
7300
  AlertDialogComponent,
7222
7301
  ActivityOutletComponent,
7223
7302
  InPlaceInteractionContextComponent,
@@ -7237,7 +7316,7 @@
7237
7316
  InlineActivityTriggerComponent,
7238
7317
  ModalActivityTriggerComponent,
7239
7318
  exports.AddCardActivityComponent,
7240
- exports.InlineStringEditorComponent,
7319
+ exports.InlineStringEditorComponent
7241
7320
  ],
7242
7321
  exports: [
7243
7322
  ActivityContainerComponent,
@@ -7258,10 +7337,10 @@
7258
7337
  exports.InlineStringEditorComponent,
7259
7338
  ],
7260
7339
  entryComponents: [
7261
- ActivityContainerComponent,
7262
- ConfirmationDialogComponent,
7263
- ConfirmThenDialogComponent,
7264
- AlertDialogComponent
7340
+ // ActivityContainerComponent,
7341
+ // ConfirmationDialogComponent,
7342
+ // ConfirmThenDialogComponent,
7343
+ // AlertDialogComponent
7265
7344
  ],
7266
7345
  providers: [
7267
7346
  exports.InteractionService
@@ -10052,9 +10131,6 @@
10052
10131
  * @file Automatically generated by barrelsby.
10053
10132
  */
10054
10133
 
10055
- // const r:Result<string, number> = null;
10056
- // r.catch(e => {}).then();
10057
-
10058
10134
  var DialogInteractionContext = /** @class */ (function (_super) {
10059
10135
  __extends(DialogInteractionContext, _super);
10060
10136
  function DialogInteractionContext(identifier, api, dialogService, config) {
@@ -10607,6 +10683,7 @@
10607
10683
  exports.ComponentCellRendererPortalRef = ComponentCellRendererPortalRef;
10608
10684
  exports.ComponentsModule = ComponentsModule;
10609
10685
  exports.ConfirmThenDialogComponent = ConfirmThenDialogComponent;
10686
+ exports.ConfirmThenExecuteDialogComponent = ConfirmThenExecuteDialogComponent;
10610
10687
  exports.ConfirmationDialogComponent = ConfirmationDialogComponent;
10611
10688
  exports.ConsolidatedParameterMap = ConsolidatedParameterMap;
10612
10689
  exports.CustomTemplateColumnModel = CustomTemplateColumnModel;