@coolon/angular-ui-powerups 1.15.0 → 1.15.1
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 +7 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +130 -130
- 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/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js +1 -1
- package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js.map +1 -1
- package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.metadata.json +1 -1
- package/esm5/lib/interaction/components/input-activities/abstract-input-activity.js +1 -1
- package/esm5/lib/interaction/components/input-activities/abstract-input-activity.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +125 -125
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +131 -131
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/interaction/components/input-activities/abstract-input-activity.d.ts +1 -1
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ import produce from 'immer';
|
|
|
21
21
|
import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
22
22
|
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
23
23
|
import { FlexModule, GridModule } from '@angular/flex-layout';
|
|
24
|
-
import { MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS
|
|
24
|
+
import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
25
25
|
import { RouterModule, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterOutlet } from '@angular/router';
|
|
26
26
|
import { Overlay, CdkScrollable } from '@angular/cdk/overlay';
|
|
27
27
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
@@ -3402,136 +3402,6 @@ var InteractionContextTriggerFor = /** @class */ (function (_super) {
|
|
|
3402
3402
|
return InteractionContextTriggerFor;
|
|
3403
3403
|
}(GarbageCollector));
|
|
3404
3404
|
|
|
3405
|
-
var SelectInputActivity = /** @class */ (function (_super) {
|
|
3406
|
-
__extends(SelectInputActivity, _super);
|
|
3407
|
-
function SelectInputActivity() {
|
|
3408
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
3409
|
-
_this.defaultOptionLabelFormat = function (option) {
|
|
3410
|
-
return _this.data.optionLabel ? option[_this.data.optionLabel] : option;
|
|
3411
|
-
};
|
|
3412
|
-
return _this;
|
|
3413
|
-
}
|
|
3414
|
-
Object.defineProperty(SelectInputActivity.prototype, "optionLabelFormat", {
|
|
3415
|
-
get: function () {
|
|
3416
|
-
var _a;
|
|
3417
|
-
return (_a = this.data.optionLabelFormat) !== null && _a !== void 0 ? _a : this.defaultOptionLabelFormat;
|
|
3418
|
-
},
|
|
3419
|
-
enumerable: true,
|
|
3420
|
-
configurable: true
|
|
3421
|
-
});
|
|
3422
|
-
Object.defineProperty(SelectInputActivity.prototype, "options", {
|
|
3423
|
-
get: function () {
|
|
3424
|
-
var _a;
|
|
3425
|
-
return ((_a = this.data.optionsModel) === null || _a === void 0 ? void 0 : _a.value) || this.data.options;
|
|
3426
|
-
},
|
|
3427
|
-
enumerable: true,
|
|
3428
|
-
configurable: true
|
|
3429
|
-
});
|
|
3430
|
-
SelectInputActivity = __decorate([
|
|
3431
|
-
Component({
|
|
3432
|
-
selector: 'aup-select-input-activity',
|
|
3433
|
-
template: "\n <aup-select-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"\n [options]=\"options\"\n [optionLabelFormat]=\"optionLabelFormat\"\n ></aup-select-input>\n <aup-activity-actions align=\"end\"\n [confirmCommand]=\"confirmCommand\"\n [cancelCommand]=\"cancelCommand\"></aup-activity-actions>\n "
|
|
3434
|
-
})
|
|
3435
|
-
], SelectInputActivity);
|
|
3436
|
-
return SelectInputActivity;
|
|
3437
|
-
}(AbstractInputActivity));
|
|
3438
|
-
|
|
3439
|
-
var DialogInteractionContext = /** @class */ (function (_super) {
|
|
3440
|
-
__extends(DialogInteractionContext, _super);
|
|
3441
|
-
function DialogInteractionContext(identifier, api, dialogService, config) {
|
|
3442
|
-
var _this = _super.call(this) || this;
|
|
3443
|
-
_this.identifier = identifier;
|
|
3444
|
-
_this.api = api;
|
|
3445
|
-
_this.dialogService = dialogService;
|
|
3446
|
-
_this.config = config;
|
|
3447
|
-
_this.garbage = new GarbageCollector();
|
|
3448
|
-
assert$1.notNil(dialogService);
|
|
3449
|
-
return _this;
|
|
3450
|
-
}
|
|
3451
|
-
DialogInteractionContext.prototype.cancelActiveActivity = function () {
|
|
3452
|
-
return this.activityContainer.cancelActiveActivity();
|
|
3453
|
-
};
|
|
3454
|
-
DialogInteractionContext.prototype.dispose = function () {
|
|
3455
|
-
if (this.isActive()) {
|
|
3456
|
-
lang.illegalState('Dispose called while active.');
|
|
3457
|
-
}
|
|
3458
|
-
this.garbage.dispose();
|
|
3459
|
-
};
|
|
3460
|
-
DialogInteractionContext.prototype.registerDisposable = function (disposable) {
|
|
3461
|
-
return this.garbage.registerDisposable(disposable);
|
|
3462
|
-
};
|
|
3463
|
-
DialogInteractionContext.prototype.isActive = function () {
|
|
3464
|
-
return !!this.activityContainer && this.activityContainer.isActive();
|
|
3465
|
-
};
|
|
3466
|
-
DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
3467
|
-
var _this = this;
|
|
3468
|
-
assert$1.isNil(this._currentActivityRef);
|
|
3469
|
-
var config = __assign(__assign({}, this.config), {
|
|
3470
|
-
disableClose: disableClose,
|
|
3471
|
-
panelClass: 'dialog-interaction-context'
|
|
3472
|
-
});
|
|
3473
|
-
var self = this;
|
|
3474
|
-
var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
|
|
3475
|
-
var activityContainer = this.activityContainer = matDialogRef.componentInstance;
|
|
3476
|
-
this.activityContainer.initialise(this.identifier, this.api);
|
|
3477
|
-
var activityResult = this.activityContainer.startActivity(activityType, data);
|
|
3478
|
-
activityResult.finally(function () { return matDialogRef.close(); });
|
|
3479
|
-
// we need to check if our onDone/onCancel methods above we called or if we were
|
|
3480
|
-
// closed by the user clicking the backdrop. If the later then we need to cancel our
|
|
3481
|
-
// activity.
|
|
3482
|
-
matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
|
|
3483
|
-
if (activityContainer.isActive()) {
|
|
3484
|
-
activityContainer.cancelActiveActivity();
|
|
3485
|
-
}
|
|
3486
|
-
_this.activityContainer = null;
|
|
3487
|
-
});
|
|
3488
|
-
matDialogRef.updateSize();
|
|
3489
|
-
matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
|
|
3490
|
-
matDialogRef.updateSize();
|
|
3491
|
-
});
|
|
3492
|
-
return activityResult;
|
|
3493
|
-
};
|
|
3494
|
-
return DialogInteractionContext;
|
|
3495
|
-
}(AbstractInteractionContext));
|
|
3496
|
-
|
|
3497
|
-
var DIALOG_INTERACTION_SERVICE_DEFAULTS = new InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
|
|
3498
|
-
var DialogInteractionContextFactory = /** @class */ (function (_super) {
|
|
3499
|
-
__extends(DialogInteractionContextFactory, _super);
|
|
3500
|
-
function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
|
|
3501
|
-
var _this = _super.call(this) || this;
|
|
3502
|
-
_this.dialogService = dialogService;
|
|
3503
|
-
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
3504
|
-
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
3505
|
-
assert$1.notNil(dialogService);
|
|
3506
|
-
return _this;
|
|
3507
|
-
}
|
|
3508
|
-
DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
|
|
3509
|
-
var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
|
|
3510
|
-
return new DialogInteractionContext(identifier, api, this.dialogService, config);
|
|
3511
|
-
};
|
|
3512
|
-
DialogInteractionContextFactory.ctorParameters = function () { return [
|
|
3513
|
-
{ type: MatDialog },
|
|
3514
|
-
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
|
|
3515
|
-
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DIALOG_DEFAULT_OPTIONS,] }] }
|
|
3516
|
-
]; };
|
|
3517
|
-
DialogInteractionContextFactory.ɵprov = ɵɵdefineInjectable({ factory: function DialogInteractionContextFactory_Factory() { return new DialogInteractionContextFactory(ɵɵinject(MatDialog), ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), ɵɵinject(MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionContextFactory, providedIn: "root" });
|
|
3518
|
-
DialogInteractionContextFactory = __decorate([
|
|
3519
|
-
Injectable({
|
|
3520
|
-
providedIn: 'root'
|
|
3521
|
-
}),
|
|
3522
|
-
__param(1, Optional()), __param(1, Inject(DIALOG_INTERACTION_SERVICE_DEFAULTS)),
|
|
3523
|
-
__param(2, Optional()), __param(2, Inject(MAT_DIALOG_DEFAULT_OPTIONS)),
|
|
3524
|
-
__metadata("design:paramtypes", [MatDialog,
|
|
3525
|
-
MatDialogConfig,
|
|
3526
|
-
MatDialogConfig])
|
|
3527
|
-
], DialogInteractionContextFactory);
|
|
3528
|
-
return DialogInteractionContextFactory;
|
|
3529
|
-
}(ModalInteractionContextFactory));
|
|
3530
|
-
|
|
3531
|
-
/**
|
|
3532
|
-
* @file Automatically generated by barrelsby.
|
|
3533
|
-
*/
|
|
3534
|
-
|
|
3535
3405
|
// @see https://github.com/ng-packagr/ng-packagr/issues/641 and https://github.com/angular/angular/issues/21123
|
|
3536
3406
|
// we're getting a metadata error for D for no reason that I can find and only during the build (ng serve works fine)
|
|
3537
3407
|
// @dynamic
|
|
@@ -3592,6 +3462,40 @@ var StringInputActivity = /** @class */ (function (_super) {
|
|
|
3592
3462
|
return StringInputActivity;
|
|
3593
3463
|
}(AbstractInputActivity));
|
|
3594
3464
|
|
|
3465
|
+
var SelectInputActivity = /** @class */ (function (_super) {
|
|
3466
|
+
__extends(SelectInputActivity, _super);
|
|
3467
|
+
function SelectInputActivity() {
|
|
3468
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
3469
|
+
_this.defaultOptionLabelFormat = function (option) {
|
|
3470
|
+
return _this.data.optionLabel ? option[_this.data.optionLabel] : option;
|
|
3471
|
+
};
|
|
3472
|
+
return _this;
|
|
3473
|
+
}
|
|
3474
|
+
Object.defineProperty(SelectInputActivity.prototype, "optionLabelFormat", {
|
|
3475
|
+
get: function () {
|
|
3476
|
+
var _a;
|
|
3477
|
+
return (_a = this.data.optionLabelFormat) !== null && _a !== void 0 ? _a : this.defaultOptionLabelFormat;
|
|
3478
|
+
},
|
|
3479
|
+
enumerable: true,
|
|
3480
|
+
configurable: true
|
|
3481
|
+
});
|
|
3482
|
+
Object.defineProperty(SelectInputActivity.prototype, "options", {
|
|
3483
|
+
get: function () {
|
|
3484
|
+
var _a;
|
|
3485
|
+
return ((_a = this.data.optionsModel) === null || _a === void 0 ? void 0 : _a.value) || this.data.options;
|
|
3486
|
+
},
|
|
3487
|
+
enumerable: true,
|
|
3488
|
+
configurable: true
|
|
3489
|
+
});
|
|
3490
|
+
SelectInputActivity = __decorate([
|
|
3491
|
+
Component({
|
|
3492
|
+
selector: 'aup-select-input-activity',
|
|
3493
|
+
template: "\n <aup-select-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"\n [options]=\"options\"\n [optionLabelFormat]=\"optionLabelFormat\"\n ></aup-select-input>\n <aup-activity-actions align=\"end\"\n [confirmCommand]=\"confirmCommand\"\n [cancelCommand]=\"cancelCommand\"></aup-activity-actions>\n "
|
|
3494
|
+
})
|
|
3495
|
+
], SelectInputActivity);
|
|
3496
|
+
return SelectInputActivity;
|
|
3497
|
+
}(AbstractInputActivity));
|
|
3498
|
+
|
|
3595
3499
|
var Dimension = /** @class */ (function () {
|
|
3596
3500
|
function Dimension(width, height) {
|
|
3597
3501
|
this.width = width;
|
|
@@ -6131,6 +6035,102 @@ var slideRightOnEnterAnimation = trigger('slideRightOnEnter', [
|
|
|
6131
6035
|
* @file Automatically generated by barrelsby.
|
|
6132
6036
|
*/
|
|
6133
6037
|
|
|
6038
|
+
/**
|
|
6039
|
+
* @file Automatically generated by barrelsby.
|
|
6040
|
+
*/
|
|
6041
|
+
|
|
6042
|
+
var DialogInteractionContext = /** @class */ (function (_super) {
|
|
6043
|
+
__extends(DialogInteractionContext, _super);
|
|
6044
|
+
function DialogInteractionContext(identifier, api, dialogService, config) {
|
|
6045
|
+
var _this = _super.call(this) || this;
|
|
6046
|
+
_this.identifier = identifier;
|
|
6047
|
+
_this.api = api;
|
|
6048
|
+
_this.dialogService = dialogService;
|
|
6049
|
+
_this.config = config;
|
|
6050
|
+
_this.garbage = new GarbageCollector();
|
|
6051
|
+
assert$1.notNil(dialogService);
|
|
6052
|
+
return _this;
|
|
6053
|
+
}
|
|
6054
|
+
DialogInteractionContext.prototype.cancelActiveActivity = function () {
|
|
6055
|
+
return this.activityContainer.cancelActiveActivity();
|
|
6056
|
+
};
|
|
6057
|
+
DialogInteractionContext.prototype.dispose = function () {
|
|
6058
|
+
if (this.isActive()) {
|
|
6059
|
+
lang.illegalState('Dispose called while active.');
|
|
6060
|
+
}
|
|
6061
|
+
this.garbage.dispose();
|
|
6062
|
+
};
|
|
6063
|
+
DialogInteractionContext.prototype.registerDisposable = function (disposable) {
|
|
6064
|
+
return this.garbage.registerDisposable(disposable);
|
|
6065
|
+
};
|
|
6066
|
+
DialogInteractionContext.prototype.isActive = function () {
|
|
6067
|
+
return !!this.activityContainer && this.activityContainer.isActive();
|
|
6068
|
+
};
|
|
6069
|
+
DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
6070
|
+
var _this = this;
|
|
6071
|
+
assert$1.isNil(this._currentActivityRef);
|
|
6072
|
+
var config = __assign(__assign({}, this.config), {
|
|
6073
|
+
disableClose: disableClose,
|
|
6074
|
+
panelClass: 'dialog-interaction-context'
|
|
6075
|
+
});
|
|
6076
|
+
var self = this;
|
|
6077
|
+
var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
|
|
6078
|
+
var activityContainer = this.activityContainer = matDialogRef.componentInstance;
|
|
6079
|
+
this.activityContainer.initialise(this.identifier, this.api);
|
|
6080
|
+
var activityResult = this.activityContainer.startActivity(activityType, data);
|
|
6081
|
+
activityResult.finally(function () { return matDialogRef.close(); });
|
|
6082
|
+
// we need to check if our onDone/onCancel methods above we called or if we were
|
|
6083
|
+
// closed by the user clicking the backdrop. If the later then we need to cancel our
|
|
6084
|
+
// activity.
|
|
6085
|
+
matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
|
|
6086
|
+
if (activityContainer.isActive()) {
|
|
6087
|
+
activityContainer.cancelActiveActivity();
|
|
6088
|
+
}
|
|
6089
|
+
_this.activityContainer = null;
|
|
6090
|
+
});
|
|
6091
|
+
matDialogRef.updateSize();
|
|
6092
|
+
matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
|
|
6093
|
+
matDialogRef.updateSize();
|
|
6094
|
+
});
|
|
6095
|
+
return activityResult;
|
|
6096
|
+
};
|
|
6097
|
+
return DialogInteractionContext;
|
|
6098
|
+
}(AbstractInteractionContext));
|
|
6099
|
+
|
|
6100
|
+
var DIALOG_INTERACTION_SERVICE_DEFAULTS = new InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
|
|
6101
|
+
var DialogInteractionContextFactory = /** @class */ (function (_super) {
|
|
6102
|
+
__extends(DialogInteractionContextFactory, _super);
|
|
6103
|
+
function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
|
|
6104
|
+
var _this = _super.call(this) || this;
|
|
6105
|
+
_this.dialogService = dialogService;
|
|
6106
|
+
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
6107
|
+
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
6108
|
+
assert$1.notNil(dialogService);
|
|
6109
|
+
return _this;
|
|
6110
|
+
}
|
|
6111
|
+
DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
|
|
6112
|
+
var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
|
|
6113
|
+
return new DialogInteractionContext(identifier, api, this.dialogService, config);
|
|
6114
|
+
};
|
|
6115
|
+
DialogInteractionContextFactory.ctorParameters = function () { return [
|
|
6116
|
+
{ type: MatDialog },
|
|
6117
|
+
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
|
|
6118
|
+
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DIALOG_DEFAULT_OPTIONS,] }] }
|
|
6119
|
+
]; };
|
|
6120
|
+
DialogInteractionContextFactory.ɵprov = ɵɵdefineInjectable({ factory: function DialogInteractionContextFactory_Factory() { return new DialogInteractionContextFactory(ɵɵinject(MatDialog), ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), ɵɵinject(MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionContextFactory, providedIn: "root" });
|
|
6121
|
+
DialogInteractionContextFactory = __decorate([
|
|
6122
|
+
Injectable({
|
|
6123
|
+
providedIn: 'root'
|
|
6124
|
+
}),
|
|
6125
|
+
__param(1, Optional()), __param(1, Inject(DIALOG_INTERACTION_SERVICE_DEFAULTS)),
|
|
6126
|
+
__param(2, Optional()), __param(2, Inject(MAT_DIALOG_DEFAULT_OPTIONS)),
|
|
6127
|
+
__metadata("design:paramtypes", [MatDialog,
|
|
6128
|
+
MatDialogConfig,
|
|
6129
|
+
MatDialogConfig])
|
|
6130
|
+
], DialogInteractionContextFactory);
|
|
6131
|
+
return DialogInteractionContextFactory;
|
|
6132
|
+
}(ModalInteractionContextFactory));
|
|
6133
|
+
|
|
6134
6134
|
/**
|
|
6135
6135
|
* @file Automatically generated by barrelsby.
|
|
6136
6136
|
*/
|