@coolon/angular-ui-powerups 2.0.0-alpha.36 → 2.0.0-alpha.38
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 +14 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +25 -19
- 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/command-face.js +7 -3
- package/esm2015/lib/components/commands/command-face.js.map +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/command-face.js +7 -3
- package/esm5/lib/components/commands/command-face.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 +25 -19
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +25 -19
- 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/command-face.d.ts +1 -0
- package/lib/components/commands/group/command-group.d.ts +2 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.38](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.37...v2.0.0-alpha.38) (2020-08-31)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* command face adapter not handling nil faces for some properties ([7c764b1](https://bitbucket.org/coolon/angular-ui-powerups/commit/7c764b10f3632cbc010411bd2fd6ba9d8e420c20))
|
|
11
|
+
|
|
12
|
+
## [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)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* added busyFace support to aup-command ([a0cf247](https://bitbucket.org/coolon/angular-ui-powerups/commit/a0cf247c5b543e78b6204a61fcba1059e0c68197))
|
|
18
|
+
|
|
5
19
|
## [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
20
|
|
|
7
21
|
|
|
@@ -614,6 +614,10 @@
|
|
|
614
614
|
return ___default__default.isFunction(face === null || face === void 0 ? void 0 : face.icon) ? face.icon() : undefined;
|
|
615
615
|
}
|
|
616
616
|
CommandFace.getIconOf = getIconOf;
|
|
617
|
+
function getIconPositionOf(face) {
|
|
618
|
+
return ___default__default.isFunction(face === null || face === void 0 ? void 0 : face.iconPosition) ? face.iconPosition() : undefined;
|
|
619
|
+
}
|
|
620
|
+
CommandFace.getIconPositionOf = getIconPositionOf;
|
|
617
621
|
function getTooltipOf(face) {
|
|
618
622
|
return ___default__default.isFunction(face === null || face === void 0 ? void 0 : face.tooltip) ? face.tooltip() : undefined;
|
|
619
623
|
}
|
|
@@ -628,7 +632,7 @@
|
|
|
628
632
|
}
|
|
629
633
|
Object.defineProperty(Adapter.prototype, "text", {
|
|
630
634
|
get: function () {
|
|
631
|
-
return
|
|
635
|
+
return CommandFace.getTextOf(this.face);
|
|
632
636
|
},
|
|
633
637
|
enumerable: true,
|
|
634
638
|
configurable: true
|
|
@@ -642,14 +646,14 @@
|
|
|
642
646
|
});
|
|
643
647
|
Object.defineProperty(Adapter.prototype, "iconPosition", {
|
|
644
648
|
get: function () {
|
|
645
|
-
return
|
|
649
|
+
return CommandFace.getIconPositionOf(this.face);
|
|
646
650
|
},
|
|
647
651
|
enumerable: true,
|
|
648
652
|
configurable: true
|
|
649
653
|
});
|
|
650
654
|
Object.defineProperty(Adapter.prototype, "tooltip", {
|
|
651
655
|
get: function () {
|
|
652
|
-
return
|
|
656
|
+
return CommandFace.getTooltipOf(this.face);
|
|
653
657
|
},
|
|
654
658
|
enumerable: true,
|
|
655
659
|
configurable: true
|
|
@@ -1022,16 +1026,7 @@
|
|
|
1022
1026
|
_this.parent = parent;
|
|
1023
1027
|
_this._rootTemplate = new pectin.MutableValueModel();
|
|
1024
1028
|
_this._registrations = new pectin.MutableListModel();
|
|
1025
|
-
_this._childFaceModels = new pectin.MutableListModel();
|
|
1026
|
-
_this._faceChangeCount = new pectin.MutableValueModel(0);
|
|
1027
1029
|
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
1030
|
_this.childTemplates = chain(_this._rootTemplate).pluckList('children');
|
|
1036
1031
|
_this.initialised = chain(_this._rootTemplate).isNotNil();
|
|
1037
1032
|
return _this;
|
|
@@ -1093,12 +1088,10 @@
|
|
|
1093
1088
|
var _this = this;
|
|
1094
1089
|
this._registrations.push(registration);
|
|
1095
1090
|
if (registration instanceof exports.Registration.FaceRegistration) {
|
|
1096
|
-
this._childFaceModels.push(registration.faceModel);
|
|
1097
1091
|
var when = pectin.Dsl.disposeWith(registration).when;
|
|
1098
1092
|
when(registration.faceModel).changes(function (is, was) {
|
|
1099
|
-
_this.notifyChildFaceChanged(
|
|
1093
|
+
_this.notifyChildFaceChanged(is, was);
|
|
1100
1094
|
}, { asLongAs: this.initialised });
|
|
1101
|
-
registration.onDispose(function () { return _this._childFaceModels.remove(registration.faceModel); });
|
|
1102
1095
|
}
|
|
1103
1096
|
registration.onDispose(function () { return _this._registrations.remove(registration); });
|
|
1104
1097
|
return registration;
|
|
@@ -1314,10 +1307,15 @@
|
|
|
1314
1307
|
var _this = _super.call(this) || this;
|
|
1315
1308
|
_this.parent = parent;
|
|
1316
1309
|
_this.CommandFace = exports.CommandFace;
|
|
1317
|
-
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain,
|
|
1318
|
-
_this.
|
|
1310
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, switchOn = _a.switchOn;
|
|
1311
|
+
_this.activeFaceModel = switchOn(_this.command.busy).toValue(function (when) {
|
|
1312
|
+
when.equalTo(true, _this.busyFaceModel);
|
|
1313
|
+
when.otherwise(_this.faceModel);
|
|
1314
|
+
}).otherwise(_this.faceModel);
|
|
1315
|
+
_this.buttonStyle = chain(_this.activeFaceModel).map(function (f) { return exports.CommandFace.getStyleOf(f); });
|
|
1316
|
+
_this.colorModel = chain(_this.activeFaceModel).map(function (f) { return exports.CommandFace.getColorOf(f); });
|
|
1319
1317
|
if (parent) {
|
|
1320
|
-
_this.registerDisposable(_this.parent.registerCommand(_this.command, _this.
|
|
1318
|
+
_this.registerDisposable(_this.parent.registerCommand(_this.command, _this.activeFaceModel));
|
|
1321
1319
|
}
|
|
1322
1320
|
return _this;
|
|
1323
1321
|
}
|
|
@@ -1338,10 +1336,18 @@
|
|
|
1338
1336
|
core.Input(), pectin.StoreInValueModel('faceModel'),
|
|
1339
1337
|
__metadata("design:type", Object)
|
|
1340
1338
|
], CommandComponent.prototype, "face", void 0);
|
|
1339
|
+
__decorate([
|
|
1340
|
+
core.Input(), pectin.TrackExternal(),
|
|
1341
|
+
__metadata("design:type", pectin.ValueModel)
|
|
1342
|
+
], CommandComponent.prototype, "busyFaceModel", void 0);
|
|
1343
|
+
__decorate([
|
|
1344
|
+
core.Input(), pectin.StoreInValueModel('busyFaceModel'),
|
|
1345
|
+
__metadata("design:type", Object)
|
|
1346
|
+
], CommandComponent.prototype, "busyFace", void 0);
|
|
1341
1347
|
CommandComponent = __decorate([
|
|
1342
1348
|
core.Component({
|
|
1343
1349
|
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]=\"
|
|
1350
|
+
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
1351
|
}),
|
|
1346
1352
|
__param(0, core.Optional()),
|
|
1347
1353
|
__metadata("design:paramtypes", [exports.ɵbo])
|