@coolon/angular-ui-powerups 2.0.0-alpha.36 → 2.0.0-alpha.37
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 +18 -16
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/commands/command/command.component.js +17 -4
- package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
- package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/command-group.js +1 -13
- package/esm2015/lib/components/commands/group/command-group.js.map +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/commands/command/command.component.js +17 -4
- package/esm5/lib/components/commands/command/command.component.js.map +1 -1
- package/esm5/lib/components/commands/group/command-group.js +1 -13
- package/esm5/lib/components/commands/group/command-group.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +18 -16
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +18 -16
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command/command.component.d.ts +4 -0
- package/lib/components/commands/group/command-group.d.ts +2 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.0.0-alpha.37](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.36...v2.0.0-alpha.37) (2020-08-31)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* added busyFace support to aup-command ([a0cf247](https://bitbucket.org/coolon/angular-ui-powerups/commit/a0cf247c5b543e78b6204a61fcba1059e0c68197))
|
|
11
|
+
|
|
5
12
|
## [2.0.0-alpha.36](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.35...v2.0.0-alpha.36) (2020-08-31)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -1022,16 +1022,7 @@
|
|
|
1022
1022
|
_this.parent = parent;
|
|
1023
1023
|
_this._rootTemplate = new pectin.MutableValueModel();
|
|
1024
1024
|
_this._registrations = new pectin.MutableListModel();
|
|
1025
|
-
_this._childFaceModels = new pectin.MutableListModel();
|
|
1026
|
-
_this._faceChangeCount = new pectin.MutableValueModel(0);
|
|
1027
1025
|
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1028
|
-
var childFaces = chain(_this._childFaceModels)
|
|
1029
|
-
.map(function (m) { return m.value; }, { dependsOn: _this._faceChangeCount })
|
|
1030
|
-
.rejectNil();
|
|
1031
|
-
var iconCount = childFaces
|
|
1032
|
-
.select(function (face) { return !!exports.CommandFace.getIconOf(face); })
|
|
1033
|
-
.count();
|
|
1034
|
-
_this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), iconCount.doesNotEqual(childFaces.length)).areTruthy();
|
|
1035
1026
|
_this.childTemplates = chain(_this._rootTemplate).pluckList('children');
|
|
1036
1027
|
_this.initialised = chain(_this._rootTemplate).isNotNil();
|
|
1037
1028
|
return _this;
|
|
@@ -1093,12 +1084,10 @@
|
|
|
1093
1084
|
var _this = this;
|
|
1094
1085
|
this._registrations.push(registration);
|
|
1095
1086
|
if (registration instanceof exports.Registration.FaceRegistration) {
|
|
1096
|
-
this._childFaceModels.push(registration.faceModel);
|
|
1097
1087
|
var when = pectin.Dsl.disposeWith(registration).when;
|
|
1098
1088
|
when(registration.faceModel).changes(function (is, was) {
|
|
1099
|
-
_this.notifyChildFaceChanged(
|
|
1089
|
+
_this.notifyChildFaceChanged(is, was);
|
|
1100
1090
|
}, { asLongAs: this.initialised });
|
|
1101
|
-
registration.onDispose(function () { return _this._childFaceModels.remove(registration.faceModel); });
|
|
1102
1091
|
}
|
|
1103
1092
|
registration.onDispose(function () { return _this._registrations.remove(registration); });
|
|
1104
1093
|
return registration;
|
|
@@ -1314,10 +1303,15 @@
|
|
|
1314
1303
|
var _this = _super.call(this) || this;
|
|
1315
1304
|
_this.parent = parent;
|
|
1316
1305
|
_this.CommandFace = exports.CommandFace;
|
|
1317
|
-
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain,
|
|
1318
|
-
_this.
|
|
1306
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, switchOn = _a.switchOn;
|
|
1307
|
+
_this.activeFaceModel = switchOn(_this.command.busy).toValue(function (when) {
|
|
1308
|
+
when.equalTo(true, _this.busyFaceModel);
|
|
1309
|
+
when.otherwise(_this.faceModel);
|
|
1310
|
+
}).otherwise(_this.faceModel);
|
|
1311
|
+
_this.buttonStyle = chain(_this.activeFaceModel).map(function (f) { return exports.CommandFace.getStyleOf(f); });
|
|
1312
|
+
_this.colorModel = chain(_this.activeFaceModel).map(function (f) { return exports.CommandFace.getColorOf(f); });
|
|
1319
1313
|
if (parent) {
|
|
1320
|
-
_this.registerDisposable(_this.parent.registerCommand(_this.command, _this.
|
|
1314
|
+
_this.registerDisposable(_this.parent.registerCommand(_this.command, _this.activeFaceModel));
|
|
1321
1315
|
}
|
|
1322
1316
|
return _this;
|
|
1323
1317
|
}
|
|
@@ -1338,10 +1332,18 @@
|
|
|
1338
1332
|
core.Input(), pectin.StoreInValueModel('faceModel'),
|
|
1339
1333
|
__metadata("design:type", Object)
|
|
1340
1334
|
], CommandComponent.prototype, "face", void 0);
|
|
1335
|
+
__decorate([
|
|
1336
|
+
core.Input(), pectin.TrackExternal(),
|
|
1337
|
+
__metadata("design:type", pectin.ValueModel)
|
|
1338
|
+
], CommandComponent.prototype, "busyFaceModel", void 0);
|
|
1339
|
+
__decorate([
|
|
1340
|
+
core.Input(), pectin.StoreInValueModel('busyFaceModel'),
|
|
1341
|
+
__metadata("design:type", Object)
|
|
1342
|
+
], CommandComponent.prototype, "busyFace", void 0);
|
|
1341
1343
|
CommandComponent = __decorate([
|
|
1342
1344
|
core.Component({
|
|
1343
1345
|
selector: 'aup-command',
|
|
1344
|
-
template: "<ng-container *ngIf=\"!parent\">\n <ng-container [ngSwitch]=\"buttonStyle.value\">\n <button *ngSwitchCase=\"CommandFace.Style.STROKED\" mat-stroked-button [pectinCommand]=\"command\" [color]=\"
|
|
1346
|
+
template: "<ng-container *ngIf=\"!parent\">\n <ng-container [ngSwitch]=\"buttonStyle.value\">\n <button *ngSwitchCase=\"CommandFace.Style.STROKED\" mat-stroked-button [pectinCommand]=\"command\" [color]=\"colorModel.value\">\n <aup-command-face [face]=\"activeFaceModel.value\"></aup-command-face>\n </button>\n <button *ngSwitchCase=\"CommandFace.Style.RAISED\" mat-raised-button [pectinCommand]=\"command\" [color]=\"colorModel.value\">\n <aup-command-face [face]=\"activeFaceModel.value\"></aup-command-face>\n </button>\n <button *ngSwitchDefault mat-button [pectinCommand]=\"command\" [color]=\"colorModel.value\">\n <aup-command-face [face]=\"activeFaceModel.value\"></aup-command-face>\n </button>\n </ng-container>\n</ng-container>\n"
|
|
1345
1347
|
}),
|
|
1346
1348
|
__param(0, core.Optional()),
|
|
1347
1349
|
__metadata("design:paramtypes", [exports.ɵbo])
|