@coolon/angular-ui-powerups 2.0.0-alpha.17 → 2.0.0-alpha.18
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 +59 -42
- 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 +20 -14
- 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 +20 -17
- 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 +20 -14
- package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js +20 -17
- 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 +60 -43
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +60 -43
- 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 -3
- package/lib/components/forms/abstract-value-input.component.d.ts +3 -3
- package/package.json +4 -3
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.18](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.17...v2.0.0-alpha.18) (2020-08-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* updated input components to fire changes on edit ([a0fafa8](https://bitbucket.org/coolon/angular-ui-powerups/commit/a0fafa8a26368b974bf93f95f861c3de0554eeab))
|
|
11
|
+
|
|
5
12
|
## [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
13
|
|
|
7
14
|
|
|
@@ -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,35 +895,41 @@
|
|
|
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 () {
|
|
905
|
-
|
|
906
|
-
_this.listHolder = new pectin.MutableListModel(value);
|
|
907
|
-
_this.listModel = _this.listHolder;
|
|
908
|
-
}
|
|
909
|
-
else {
|
|
910
|
-
_this.listHolder.value = value;
|
|
911
|
-
}
|
|
925
|
+
_this.componentListModel.value = value;
|
|
912
926
|
});
|
|
913
927
|
},
|
|
914
928
|
enumerable: true,
|
|
915
929
|
configurable: true
|
|
916
930
|
});
|
|
917
931
|
__decorate([
|
|
918
|
-
core.Input(), pectin.TrackExternal({ delegateTo: '
|
|
932
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'formValueModel' }),
|
|
919
933
|
__metadata("design:type", Object)
|
|
920
934
|
], AbstractListInputComponent.prototype, "listModel", void 0);
|
|
921
935
|
__decorate([
|
|
@@ -949,38 +963,41 @@
|
|
|
949
963
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
950
964
|
*/
|
|
951
965
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
952
|
-
_this.
|
|
966
|
+
_this.formValueModel = _this.registerDisposable(new pectin.Form.DelegatingValueModel());
|
|
953
967
|
_this.setValueInProgress = new pectin.Guard();
|
|
968
|
+
_this.componentValueModel = new pectin.MutableValueModel();
|
|
954
969
|
_this.valueChange = new core.EventEmitter();
|
|
955
|
-
var
|
|
956
|
-
|
|
970
|
+
var _a = pectin.Dsl.disposeWith(_this), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
|
|
971
|
+
var binding = new pectin.Binding.Identity(_this.formValueModel, _this.componentValueModel);
|
|
972
|
+
var inExternalChange = valueOf.any(_this.setValueInProgress, chain(binding.direction).equals(pectin.Binding.Direction.RIGHT)).areTruthy();
|
|
973
|
+
when(_this.componentValueModel).changes(function (is, was) {
|
|
974
|
+
_this.valueChange.emit(is);
|
|
975
|
+
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
976
|
+
}, {
|
|
957
977
|
initialValue: 'ignore',
|
|
958
|
-
|
|
978
|
+
// we never fire events during an external set value operation. This allows
|
|
979
|
+
// the component to behave when used in the conventional angular
|
|
980
|
+
// fashion, i.e. [(value)]="..."
|
|
981
|
+
unless: inExternalChange
|
|
959
982
|
});
|
|
960
|
-
pectin.DebugContext.tag(_this.
|
|
983
|
+
pectin.DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
961
984
|
return _this;
|
|
962
985
|
}
|
|
963
986
|
Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
|
|
987
|
+
// We add support for simple direct display of values by allowing components to be used
|
|
988
|
+
// by `component.value = ...` This use of the component without a value model in tables
|
|
989
|
+
// and the like.
|
|
964
990
|
set: function (value) {
|
|
965
991
|
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
992
|
this.setValueInProgress.whileTrue(function () {
|
|
970
|
-
|
|
971
|
-
_this.valueHolder = new pectin.MutableValueModel(value);
|
|
972
|
-
_this.valueModel = _this.valueHolder;
|
|
973
|
-
}
|
|
974
|
-
else {
|
|
975
|
-
_this.valueHolder.value = value;
|
|
976
|
-
}
|
|
993
|
+
_this.componentValueModel.value = value;
|
|
977
994
|
});
|
|
978
995
|
},
|
|
979
996
|
enumerable: true,
|
|
980
997
|
configurable: true
|
|
981
998
|
});
|
|
982
999
|
__decorate([
|
|
983
|
-
core.Input(), pectin.TrackExternal({ delegateTo: '
|
|
1000
|
+
core.Input(), pectin.TrackExternal({ delegateTo: 'formValueModel' }),
|
|
984
1001
|
__metadata("design:type", Object)
|
|
985
1002
|
], AbstractValueInputComponent.prototype, "valueModel", void 0);
|
|
986
1003
|
__decorate([
|
|
@@ -1058,7 +1075,7 @@
|
|
|
1058
1075
|
AutocompleteInputComponent = __decorate([
|
|
1059
1076
|
core.Component({
|
|
1060
1077
|
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]=\"
|
|
1078
|
+
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
1079
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1063
1080
|
}),
|
|
1064
1081
|
__metadata("design:paramtypes", [])
|
|
@@ -1089,7 +1106,7 @@
|
|
|
1089
1106
|
CheckboxInputComponent = __decorate([
|
|
1090
1107
|
core.Component({
|
|
1091
1108
|
selector: 'aup-checkbox-input',
|
|
1092
|
-
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"
|
|
1109
|
+
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
1110
|
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
1111
|
}),
|
|
1095
1112
|
__metadata("design:paramtypes", [])
|
|
@@ -1136,7 +1153,7 @@
|
|
|
1136
1153
|
MultipleSelectInputComponent = __decorate([
|
|
1137
1154
|
core.Component({
|
|
1138
1155
|
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)]=\"
|
|
1156
|
+
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
1157
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1141
1158
|
}),
|
|
1142
1159
|
__metadata("design:paramtypes", [])
|
|
@@ -1167,7 +1184,7 @@
|
|
|
1167
1184
|
NumberInputComponent = __decorate([
|
|
1168
1185
|
core.Component({
|
|
1169
1186
|
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)]=\"
|
|
1187
|
+
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
1188
|
styles: [""]
|
|
1172
1189
|
}),
|
|
1173
1190
|
__metadata("design:paramtypes", [])
|
|
@@ -1187,7 +1204,7 @@
|
|
|
1187
1204
|
PasswordInputComponent = __decorate([
|
|
1188
1205
|
core.Component({
|
|
1189
1206
|
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)]=\"
|
|
1207
|
+
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
1208
|
styles: [""]
|
|
1192
1209
|
}),
|
|
1193
1210
|
__metadata("design:paramtypes", [])
|
|
@@ -1242,7 +1259,7 @@
|
|
|
1242
1259
|
SelectInputComponent = __decorate([
|
|
1243
1260
|
core.Component({
|
|
1244
1261
|
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)]=\"
|
|
1262
|
+
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
1263
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1247
1264
|
}),
|
|
1248
1265
|
__metadata("design:paramtypes", [])
|
|
@@ -1256,9 +1273,9 @@
|
|
|
1256
1273
|
var _this = _super.call(this) || this;
|
|
1257
1274
|
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
1275
|
_this.clearCommand = pectin.Command.create(function () {
|
|
1259
|
-
_this.
|
|
1276
|
+
_this.componentValueModel.value = null;
|
|
1260
1277
|
});
|
|
1261
|
-
_this.clearCommand.disableWhile(chain.stringValue(_this.
|
|
1278
|
+
_this.clearCommand.disableWhile(chain.stringValue(_this.componentValueModel).isBlank());
|
|
1262
1279
|
return _this;
|
|
1263
1280
|
}
|
|
1264
1281
|
StringInputComponent.prototype.ngOnInit = function () {
|
|
@@ -1274,7 +1291,7 @@
|
|
|
1274
1291
|
StringInputComponent = __decorate([
|
|
1275
1292
|
core.Component({
|
|
1276
1293
|
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)]=\"
|
|
1294
|
+
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
1295
|
styles: ["button[disabled]{visibility:hidden}"]
|
|
1279
1296
|
}),
|
|
1280
1297
|
__metadata("design:paramtypes", [])
|
|
@@ -1305,7 +1322,7 @@
|
|
|
1305
1322
|
TextInputComponent = __decorate([
|
|
1306
1323
|
core.Component({
|
|
1307
1324
|
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)]=\"
|
|
1325
|
+
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
1326
|
styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
1310
1327
|
}),
|
|
1311
1328
|
__metadata("design:paramtypes", [])
|