@coolon/angular-ui-powerups 2.0.0-alpha.17 → 2.0.0-alpha.19
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 +61 -32
- 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.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.js +12 -4
- package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.js +19 -7
- package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.js +23 -14
- package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js +1 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.js +3 -3
- package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.js +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/forms/abstract-input.component.js +12 -4
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-list-input.component.js +19 -7
- package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js +23 -14
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js +1 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -1
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +1 -1
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm5/lib/components/forms/select-input/select-input.component.js +1 -1
- package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/string-input/string-input.component.js +3 -3
- package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +62 -33
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +62 -33
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +8 -2
- package/lib/components/forms/abstract-list-input.component.d.ts +3 -2
- package/lib/components/forms/abstract-value-input.component.d.ts +4 -3
- package/package.json +4 -3
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.19](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.18...v2.0.0-alpha.19) (2020-08-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* input-components with plain values weren't enabled ([46e15fa](https://bitbucket.org/coolon/angular-ui-powerups/commit/46e15fa0bd7d3e8fe8f7edcef652e101c18abe79))
|
|
11
|
+
|
|
12
|
+
## [2.0.0-alpha.18](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.17...v2.0.0-alpha.18) (2020-08-11)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* updated input components to fire changes on edit ([a0fafa8](https://bitbucket.org/coolon/angular-ui-powerups/commit/a0fafa8a26368b974bf93f95f861c3de0554eeab))
|
|
18
|
+
|
|
5
19
|
## [2.0.0-alpha.17](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.16...v2.0.0-alpha.17) (2020-08-07)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -693,6 +693,7 @@
|
|
|
693
693
|
__extends(AbstractInputComponent, _super);
|
|
694
694
|
function AbstractInputComponent() {
|
|
695
695
|
var _this = _super.call(this) || this;
|
|
696
|
+
_this.onValueEditedListeners = new pectin.EventListenerList();
|
|
696
697
|
_this.dense = false;
|
|
697
698
|
// TODO: fix this.
|
|
698
699
|
// tslint:disable-next-line:no-output-native
|
|
@@ -743,7 +744,7 @@
|
|
|
743
744
|
};
|
|
744
745
|
Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
|
|
745
746
|
get: function () {
|
|
746
|
-
return this.
|
|
747
|
+
return this.formValueModel.enabled;
|
|
747
748
|
},
|
|
748
749
|
enumerable: true,
|
|
749
750
|
configurable: true
|
|
@@ -753,7 +754,7 @@
|
|
|
753
754
|
};
|
|
754
755
|
Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
|
|
755
756
|
get: function () {
|
|
756
|
-
return this.
|
|
757
|
+
return this.formValueModel.errorList;
|
|
757
758
|
},
|
|
758
759
|
enumerable: true,
|
|
759
760
|
configurable: true
|
|
@@ -767,7 +768,7 @@
|
|
|
767
768
|
});
|
|
768
769
|
Object.defineProperty(AbstractInputComponent.prototype, "focusContext", {
|
|
769
770
|
get: function () {
|
|
770
|
-
return this.
|
|
771
|
+
return this.formValueModel.focusContext;
|
|
771
772
|
},
|
|
772
773
|
enumerable: true,
|
|
773
774
|
configurable: true
|
|
@@ -786,6 +787,13 @@
|
|
|
786
787
|
enumerable: true,
|
|
787
788
|
configurable: true
|
|
788
789
|
});
|
|
790
|
+
/**
|
|
791
|
+
* Invokes the callback when this components value is changed by a user edit.
|
|
792
|
+
* @param callback
|
|
793
|
+
*/
|
|
794
|
+
AbstractInputComponent.prototype.onValueEdited = function (callback) {
|
|
795
|
+
return this.onValueEditedListeners.add(callback);
|
|
796
|
+
};
|
|
789
797
|
__decorate([
|
|
790
798
|
core.Input(),
|
|
791
799
|
__metadata("design:type", String)
|
|
@@ -887,18 +895,30 @@
|
|
|
887
895
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
888
896
|
*/
|
|
889
897
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
890
|
-
_this.
|
|
898
|
+
_this.formValueModel = _this.registerDisposable(new pectin.Form.DelegatingListModel());
|
|
899
|
+
_this.componentListModel = new pectin.MutableListModel();
|
|
891
900
|
_this.setValueIsInProgress = new pectin.Guard();
|
|
892
901
|
_this.valueChange = new core.EventEmitter();
|
|
893
|
-
var
|
|
894
|
-
|
|
902
|
+
var _a = pectin.Dsl.disposeWith(_this), when = _a.when, valueOf = _a.valueOf, chain = _a.chain;
|
|
903
|
+
var binding = new pectin.Binding.Identity(_this.formValueModel, _this.componentListModel);
|
|
904
|
+
var inExternalChange = valueOf.any(_this.setValueIsInProgress, chain(binding.direction).equals(pectin.Binding.Direction.RIGHT)).areTruthy();
|
|
905
|
+
when(_this.componentListModel).changes(function (is, was) {
|
|
906
|
+
_this.valueChange.emit(is);
|
|
907
|
+
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
908
|
+
}, {
|
|
895
909
|
initialValue: 'ignore',
|
|
896
|
-
|
|
910
|
+
// we never fire events during an external changes to the value. This allows
|
|
911
|
+
// the component to behave when used in the conventional angular
|
|
912
|
+
// fashion, i.e. [(value)]="..."
|
|
913
|
+
unless: inExternalChange
|
|
897
914
|
});
|
|
898
|
-
pectin.DebugContext.tag(_this.
|
|
915
|
+
pectin.DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
899
916
|
return _this;
|
|
900
917
|
}
|
|
901
918
|
Object.defineProperty(AbstractListInputComponent.prototype, "value", {
|
|
919
|
+
// We add support for simple direct display of values by allowing components to be used
|
|
920
|
+
// by `component.value = ...` This use of the component without a value model in tables
|
|
921
|
+
// and the like.
|
|
902
922
|
set: function (value) {
|
|
903
923
|
var _this = this;
|
|
904
924
|
this.setValueIsInProgress.whileTrue(function () {
|
|
@@ -915,7 +935,7 @@
|
|
|
915
935
|
configurable: true
|
|
916
936
|
});
|
|
917
937
|
__decorate([
|
|
918
|
-
core.Input(), pectin.TrackExternal({ delegateTo: '
|
|
938
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'formValueModel' }),
|
|
919
939
|
__metadata("design:type", Object)
|
|
920
940
|
], AbstractListInputComponent.prototype, "listModel", void 0);
|
|
921
941
|
__decorate([
|
|
@@ -949,30 +969,39 @@
|
|
|
949
969
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
950
970
|
*/
|
|
951
971
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
952
|
-
_this.
|
|
972
|
+
_this.formValueModel = _this.registerDisposable(new pectin.Form.DelegatingValueModel());
|
|
953
973
|
_this.setValueInProgress = new pectin.Guard();
|
|
974
|
+
_this.componentValueModel = new pectin.MutableValueModel();
|
|
954
975
|
_this.valueChange = new core.EventEmitter();
|
|
955
|
-
var
|
|
956
|
-
|
|
976
|
+
var _a = pectin.Dsl.disposeWith(_this), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
|
|
977
|
+
var binding = new pectin.Binding.Identity(_this.formValueModel, _this.componentValueModel);
|
|
978
|
+
var inExternalChange = valueOf.any(_this.setValueInProgress, chain(binding.direction).equals(pectin.Binding.Direction.RIGHT)).areTruthy();
|
|
979
|
+
when(_this.componentValueModel).changes(function (is, was) {
|
|
980
|
+
_this.valueChange.emit(is);
|
|
981
|
+
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
982
|
+
}, {
|
|
957
983
|
initialValue: 'ignore',
|
|
958
|
-
|
|
984
|
+
// we never fire events during an external set value operation. This allows
|
|
985
|
+
// the component to behave when used in the conventional angular
|
|
986
|
+
// fashion, i.e. [(value)]="..."
|
|
987
|
+
unless: inExternalChange
|
|
959
988
|
});
|
|
960
|
-
pectin.DebugContext.tag(_this.
|
|
989
|
+
pectin.DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
961
990
|
return _this;
|
|
962
991
|
}
|
|
963
992
|
Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
|
|
993
|
+
// We add support for simple direct display of values by allowing components to be used
|
|
994
|
+
// by `component.value = ...` This use of the component without a value model in tables
|
|
995
|
+
// and the like.
|
|
964
996
|
set: function (value) {
|
|
965
997
|
var _this = this;
|
|
966
|
-
// we never fire events during an external set value operation. This allows
|
|
967
|
-
// the component to behave when used in the conventional angular
|
|
968
|
-
// fashion, i.e. [(value)]="..."
|
|
969
998
|
this.setValueInProgress.whileTrue(function () {
|
|
970
|
-
if (!_this.
|
|
971
|
-
_this.
|
|
972
|
-
_this.valueModel = _this.
|
|
999
|
+
if (!_this.plainValueHolder) {
|
|
1000
|
+
_this.plainValueHolder = new pectin.MutableValueModel(value);
|
|
1001
|
+
_this.valueModel = _this.plainValueHolder;
|
|
973
1002
|
}
|
|
974
1003
|
else {
|
|
975
|
-
_this.
|
|
1004
|
+
_this.plainValueHolder.value = value;
|
|
976
1005
|
}
|
|
977
1006
|
});
|
|
978
1007
|
},
|
|
@@ -980,7 +1009,7 @@
|
|
|
980
1009
|
configurable: true
|
|
981
1010
|
});
|
|
982
1011
|
__decorate([
|
|
983
|
-
core.Input(), pectin.TrackExternal({ delegateTo: '
|
|
1012
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'formValueModel' }),
|
|
984
1013
|
__metadata("design:type", Object)
|
|
985
1014
|
], AbstractValueInputComponent.prototype, "valueModel", void 0);
|
|
986
1015
|
__decorate([
|
|
@@ -1058,7 +1087,7 @@
|
|
|
1058
1087
|
AutocompleteInputComponent = __decorate([
|
|
1059
1088
|
core.Component({
|
|
1060
1089
|
selector: 'aup-autocomplete-input',
|
|
1061
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"
|
|
1090
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\" [autoActiveFirstOption]=\"true\" (optionSelected)=\"onSelect($event)\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\"\n >{{formatOption(option)}}</mat-option>\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1062
1091
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1063
1092
|
}),
|
|
1064
1093
|
__metadata("design:paramtypes", [])
|
|
@@ -1089,7 +1118,7 @@
|
|
|
1089
1118
|
CheckboxInputComponent = __decorate([
|
|
1090
1119
|
core.Component({
|
|
1091
1120
|
selector: 'aup-checkbox-input',
|
|
1092
|
-
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"
|
|
1121
|
+
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"componentValueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
|
|
1093
1122
|
styles: [":host{display:inline-flex;flex-direction:column;padding:24px 0 16px}:host.dense{padding:6px 0 2px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]
|
|
1094
1123
|
}),
|
|
1095
1124
|
__metadata("design:paramtypes", [])
|
|
@@ -1136,7 +1165,7 @@
|
|
|
1136
1165
|
MultipleSelectInputComponent = __decorate([
|
|
1137
1166
|
core.Component({
|
|
1138
1167
|
selector: 'aup-multiple-select-input',
|
|
1139
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"
|
|
1168
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"componentListModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1140
1169
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1141
1170
|
}),
|
|
1142
1171
|
__metadata("design:paramtypes", [])
|
|
@@ -1167,7 +1196,7 @@
|
|
|
1167
1196
|
NumberInputComponent = __decorate([
|
|
1168
1197
|
core.Component({
|
|
1169
1198
|
selector: 'aup-number-input',
|
|
1170
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1199
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n >\n <mat-hint *ngIf=\"hint && !dense\" >{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1171
1200
|
styles: [""]
|
|
1172
1201
|
}),
|
|
1173
1202
|
__metadata("design:paramtypes", [])
|
|
@@ -1187,7 +1216,7 @@
|
|
|
1187
1216
|
PasswordInputComponent = __decorate([
|
|
1188
1217
|
core.Component({
|
|
1189
1218
|
selector: 'aup-password-input',
|
|
1190
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1219
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
1191
1220
|
styles: [""]
|
|
1192
1221
|
}),
|
|
1193
1222
|
__metadata("design:paramtypes", [])
|
|
@@ -1242,7 +1271,7 @@
|
|
|
1242
1271
|
SelectInputComponent = __decorate([
|
|
1243
1272
|
core.Component({
|
|
1244
1273
|
selector: 'aup-select-input',
|
|
1245
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1274
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1246
1275
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1247
1276
|
}),
|
|
1248
1277
|
__metadata("design:paramtypes", [])
|
|
@@ -1256,9 +1285,9 @@
|
|
|
1256
1285
|
var _this = _super.call(this) || this;
|
|
1257
1286
|
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;
|
|
1258
1287
|
_this.clearCommand = pectin.Command.create(function () {
|
|
1259
|
-
_this.
|
|
1288
|
+
_this.componentValueModel.value = null;
|
|
1260
1289
|
});
|
|
1261
|
-
_this.clearCommand.disableWhile(chain.stringValue(_this.
|
|
1290
|
+
_this.clearCommand.disableWhile(chain.stringValue(_this.componentValueModel).isBlank());
|
|
1262
1291
|
return _this;
|
|
1263
1292
|
}
|
|
1264
1293
|
StringInputComponent.prototype.ngOnInit = function () {
|
|
@@ -1274,7 +1303,7 @@
|
|
|
1274
1303
|
StringInputComponent = __decorate([
|
|
1275
1304
|
core.Component({
|
|
1276
1305
|
selector: 'aup-string-input',
|
|
1277
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1306
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n",
|
|
1278
1307
|
styles: ["button[disabled]{visibility:hidden}"]
|
|
1279
1308
|
}),
|
|
1280
1309
|
__metadata("design:paramtypes", [])
|
|
@@ -1305,7 +1334,7 @@
|
|
|
1305
1334
|
TextInputComponent = __decorate([
|
|
1306
1335
|
core.Component({
|
|
1307
1336
|
selector: 'aup-text-input',
|
|
1308
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1337
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
1309
1338
|
styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
1310
1339
|
}),
|
|
1311
1340
|
__metadata("design:paramtypes", [])
|