@coolon/angular-ui-powerups 2.0.0-alpha.8 → 2.0.0-alpha.9
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 +12 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +268 -176
- 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.d.ts +55 -54
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +53 -52
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/components.module.js +29 -12
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.js +15 -9
- 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 +64 -0
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -0
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json +1 -0
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +7 -0
- 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/select-input/select-input.component.js +1 -0
- 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/index.js +1 -0
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm5/coolon-angular-ui-powerups.js +53 -52
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/components.module.js +29 -12
- package/esm5/lib/components/components.module.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js +15 -9
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js +67 -0
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -0
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +7 -0
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/select-input/select-input.component.js +1 -0
- package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm5/lib/components/index.js +1 -0
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +186 -98
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +199 -108
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-value-input.component.d.ts +2 -2
- package/lib/components/forms/autocomplete-input/autocomplete-input.component.d.ts +22 -0
- package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +7 -0
- package/lib/components/forms/select-input/select-input.component.d.ts +1 -0
- package/lib/components/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -9,18 +9,19 @@ import { MatTabsModule, MatTabGroup, MAT_TABS_CONFIG } from '@angular/material/t
|
|
|
9
9
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
10
10
|
import { ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
11
11
|
import { CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
12
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
12
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
13
14
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
14
15
|
import { MatIconModule } from '@angular/material/icon';
|
|
15
16
|
import { MatTableModule } from '@angular/material/table';
|
|
17
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
18
|
+
import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
19
|
+
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
16
20
|
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, FocusManager, Form, Guard, MutableListModel, MutableValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Trace, DebugContext, Binding, Functions } from '@coolon/pectin';
|
|
21
|
+
import ___default, { isEqual, isNil } from 'lodash';
|
|
17
22
|
import { assert as assert$1, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
|
|
18
23
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
19
|
-
import ___default, { isEqual, isNil } from 'lodash';
|
|
20
24
|
import produce from 'immer';
|
|
21
|
-
import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
22
|
-
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
23
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
24
25
|
import { FlexModule, GridModule } from '@angular/flex-layout';
|
|
25
26
|
import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
26
27
|
import { RouterModule, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterOutlet } from '@angular/router';
|
|
@@ -777,24 +778,30 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
|
|
|
777
778
|
*/
|
|
778
779
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
779
780
|
_this.inputModel = _this.registerDisposable(new Form.DelegatingValueModel());
|
|
780
|
-
_this.
|
|
781
|
+
_this.setValueInProgress = new Guard();
|
|
781
782
|
_this.valueChange = new EventEmitter();
|
|
782
783
|
var when = Dsl.disposeWith(_this).when;
|
|
783
|
-
when(_this.inputModel).changes(function (value) { return _this.valueChange.emit(value); }, {
|
|
784
|
+
when(_this.inputModel).changes(function (value) { return _this.valueChange.emit(value); }, {
|
|
785
|
+
initialValue: 'ignore',
|
|
786
|
+
unless: _this.setValueInProgress
|
|
787
|
+
});
|
|
784
788
|
return _this;
|
|
785
789
|
}
|
|
786
790
|
Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
|
|
787
791
|
set: function (value) {
|
|
788
792
|
var _this = this;
|
|
789
|
-
|
|
790
|
-
|
|
793
|
+
// we never fire events during an external set value operation. This allows
|
|
794
|
+
// the component to behave when used in the conventional angular
|
|
795
|
+
// fashion, i.e. [(value)]="..."
|
|
796
|
+
this.setValueInProgress.whileTrue(function () {
|
|
797
|
+
if (!_this.valueHolder) {
|
|
791
798
|
_this.valueHolder = new MutableValueModel(value);
|
|
792
799
|
_this.valueModel = _this.valueHolder;
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
}
|
|
800
|
+
}
|
|
801
|
+
else {
|
|
802
|
+
_this.valueHolder.value = value;
|
|
803
|
+
}
|
|
804
|
+
});
|
|
798
805
|
},
|
|
799
806
|
enumerable: true,
|
|
800
807
|
configurable: true
|
|
@@ -819,6 +826,67 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
|
|
|
819
826
|
return AbstractValueInputComponent;
|
|
820
827
|
}(AbstractInputComponent));
|
|
821
828
|
|
|
829
|
+
/**
|
|
830
|
+
* Using templates (not only supported for nil values:
|
|
831
|
+
* <aup-autocomplete-input [valueModel]="myModel" [options]="myOptions">
|
|
832
|
+
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
833
|
+
* </aup-autocomplete-input>
|
|
834
|
+
*/
|
|
835
|
+
var AutocompleteInputComponent = /** @class */ (function (_super) {
|
|
836
|
+
__extends(AutocompleteInputComponent, _super);
|
|
837
|
+
function AutocompleteInputComponent() {
|
|
838
|
+
var _this = _super.call(this) || this;
|
|
839
|
+
_this.filterValue = new MutableValueModel();
|
|
840
|
+
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
841
|
+
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
842
|
+
var lowerCaseFilterValue = chain(_this.filterValue)
|
|
843
|
+
.map(function (v) { return ___default.isString(v) ? v.toLowerCase() : ''; });
|
|
844
|
+
_this.filteredOptions = chain(_this.optionsModel)
|
|
845
|
+
.select(function (option) {
|
|
846
|
+
return ___default.isEmpty(_this.filterValue.value) || _this.optionLabelFormat(option).toString().toLowerCase().includes(lowerCaseFilterValue.value);
|
|
847
|
+
}, { dependsOn: lowerCaseFilterValue });
|
|
848
|
+
return _this;
|
|
849
|
+
}
|
|
850
|
+
AutocompleteInputComponent.prototype.ngOnInit = function () {
|
|
851
|
+
};
|
|
852
|
+
AutocompleteInputComponent.prototype.updateFilter = function ($event) {
|
|
853
|
+
this.filterValue.value = $event;
|
|
854
|
+
};
|
|
855
|
+
__decorate([
|
|
856
|
+
Input(), TrackExternal(),
|
|
857
|
+
__metadata("design:type", ListModel)
|
|
858
|
+
], AutocompleteInputComponent.prototype, "optionsModel", void 0);
|
|
859
|
+
__decorate([
|
|
860
|
+
Input(), StoreInListModel('optionsModel'),
|
|
861
|
+
__metadata("design:type", Array)
|
|
862
|
+
], AutocompleteInputComponent.prototype, "options", void 0);
|
|
863
|
+
__decorate([
|
|
864
|
+
Input(),
|
|
865
|
+
__metadata("design:type", Object)
|
|
866
|
+
], AutocompleteInputComponent.prototype, "optionLabel", void 0);
|
|
867
|
+
__decorate([
|
|
868
|
+
Input(),
|
|
869
|
+
__metadata("design:type", Boolean)
|
|
870
|
+
], AutocompleteInputComponent.prototype, "allowNil", void 0);
|
|
871
|
+
__decorate([
|
|
872
|
+
ContentChild('nilOptionTemplate'),
|
|
873
|
+
__metadata("design:type", TemplateRef)
|
|
874
|
+
], AutocompleteInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
875
|
+
__decorate([
|
|
876
|
+
Input(),
|
|
877
|
+
__metadata("design:type", Function)
|
|
878
|
+
], AutocompleteInputComponent.prototype, "optionLabelFormat", void 0);
|
|
879
|
+
AutocompleteInputComponent = __decorate([
|
|
880
|
+
Component({
|
|
881
|
+
selector: 'aup-autocomplete-input',
|
|
882
|
+
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]=\"optionLabelFormat(valueModel.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\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\"\n >{{optionLabelFormat(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",
|
|
883
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
884
|
+
}),
|
|
885
|
+
__metadata("design:paramtypes", [])
|
|
886
|
+
], AutocompleteInputComponent);
|
|
887
|
+
return AutocompleteInputComponent;
|
|
888
|
+
}(AbstractValueInputComponent));
|
|
889
|
+
|
|
822
890
|
var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
823
891
|
__extends(CheckboxInputComponent, _super);
|
|
824
892
|
function CheckboxInputComponent() {
|
|
@@ -850,6 +918,61 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
|
850
918
|
return CheckboxInputComponent;
|
|
851
919
|
}(AbstractValueInputComponent));
|
|
852
920
|
|
|
921
|
+
/**
|
|
922
|
+
* Using templates:
|
|
923
|
+
* <aup-multiple-select-input [valueModel]="myModel" [options]="myOptions">
|
|
924
|
+
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
925
|
+
* <ng-template #nilOptionTemplateRef let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
926
|
+
* </aup-multiple-select_input>
|
|
927
|
+
*/
|
|
928
|
+
var MultipleSelectInputComponent = /** @class */ (function (_super) {
|
|
929
|
+
__extends(MultipleSelectInputComponent, _super);
|
|
930
|
+
function MultipleSelectInputComponent() {
|
|
931
|
+
var _this = _super.call(this) || this;
|
|
932
|
+
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
933
|
+
return _this;
|
|
934
|
+
}
|
|
935
|
+
MultipleSelectInputComponent.prototype.ngOnInit = function () {
|
|
936
|
+
};
|
|
937
|
+
__decorate([
|
|
938
|
+
Input(), TrackExternal(),
|
|
939
|
+
__metadata("design:type", ListModel)
|
|
940
|
+
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
941
|
+
__decorate([
|
|
942
|
+
Input(), StoreInListModel('optionsModel'),
|
|
943
|
+
__metadata("design:type", Array)
|
|
944
|
+
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
945
|
+
__decorate([
|
|
946
|
+
Input(),
|
|
947
|
+
__metadata("design:type", Object)
|
|
948
|
+
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
949
|
+
__decorate([
|
|
950
|
+
Input(),
|
|
951
|
+
__metadata("design:type", Boolean)
|
|
952
|
+
], MultipleSelectInputComponent.prototype, "allowNil", void 0);
|
|
953
|
+
__decorate([
|
|
954
|
+
ContentChild('optionTemplate'),
|
|
955
|
+
__metadata("design:type", TemplateRef)
|
|
956
|
+
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
957
|
+
__decorate([
|
|
958
|
+
ContentChild('nilOptionTemplate'),
|
|
959
|
+
__metadata("design:type", TemplateRef)
|
|
960
|
+
], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
961
|
+
__decorate([
|
|
962
|
+
Input(),
|
|
963
|
+
__metadata("design:type", Function)
|
|
964
|
+
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
965
|
+
MultipleSelectInputComponent = __decorate([
|
|
966
|
+
Component({
|
|
967
|
+
selector: 'aup-multiple-select-input',
|
|
968
|
+
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)]=\"listModel.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\">{{placeholder}}</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",
|
|
969
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
970
|
+
}),
|
|
971
|
+
__metadata("design:paramtypes", [])
|
|
972
|
+
], MultipleSelectInputComponent);
|
|
973
|
+
return MultipleSelectInputComponent;
|
|
974
|
+
}(AbstractListInputComponent));
|
|
975
|
+
|
|
853
976
|
var NumberInputComponent = /** @class */ (function (_super) {
|
|
854
977
|
__extends(NumberInputComponent, _super);
|
|
855
978
|
function NumberInputComponent() {
|
|
@@ -905,6 +1028,7 @@ var PasswordInputComponent = /** @class */ (function (_super) {
|
|
|
905
1028
|
* Using templates:
|
|
906
1029
|
* <aup-select-input [valueModel]="myModel" [options]="myOptions">
|
|
907
1030
|
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1031
|
+
* <ng-template #nilOptionTemplateRef let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
908
1032
|
* </aup-select_input>
|
|
909
1033
|
*/
|
|
910
1034
|
var SelectInputComponent = /** @class */ (function (_super) {
|
|
@@ -1018,6 +1142,48 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
1018
1142
|
return TextInputComponent;
|
|
1019
1143
|
}(AbstractValueInputComponent));
|
|
1020
1144
|
|
|
1145
|
+
var IconComponent = /** @class */ (function () {
|
|
1146
|
+
function IconComponent() {
|
|
1147
|
+
}
|
|
1148
|
+
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
1149
|
+
get: function () {
|
|
1150
|
+
return this._icon;
|
|
1151
|
+
},
|
|
1152
|
+
set: function (iconName) {
|
|
1153
|
+
this._icon = iconName;
|
|
1154
|
+
if (!iconName) {
|
|
1155
|
+
this.errorMessage = 'icon is nil';
|
|
1156
|
+
this.prefix = undefined;
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
var colonIndex = iconName.indexOf(':');
|
|
1160
|
+
if (colonIndex > 0) {
|
|
1161
|
+
this.prefix = this.icon.slice(0, colonIndex);
|
|
1162
|
+
this.suffix = this.icon.slice(colonIndex + 1);
|
|
1163
|
+
}
|
|
1164
|
+
if (this.prefix) {
|
|
1165
|
+
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
1166
|
+
}
|
|
1167
|
+
this.errorMessage = "Unknown icon prefix \"" + this.prefix + "\"";
|
|
1168
|
+
},
|
|
1169
|
+
enumerable: true,
|
|
1170
|
+
configurable: true
|
|
1171
|
+
});
|
|
1172
|
+
__decorate([
|
|
1173
|
+
Input(),
|
|
1174
|
+
__metadata("design:type", String),
|
|
1175
|
+
__metadata("design:paramtypes", [String])
|
|
1176
|
+
], IconComponent.prototype, "icon", null);
|
|
1177
|
+
IconComponent = __decorate([
|
|
1178
|
+
Component({
|
|
1179
|
+
selector: 'aup-icon',
|
|
1180
|
+
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"'svg'\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"'mat'\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"'fab'\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n",
|
|
1181
|
+
styles: [":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center;width:24px;height:24px}.svgIcon{width:24px;height:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{width:inherit;height:inherit}"]
|
|
1182
|
+
})
|
|
1183
|
+
], IconComponent);
|
|
1184
|
+
return IconComponent;
|
|
1185
|
+
}());
|
|
1186
|
+
|
|
1021
1187
|
var NoopComponent = /** @class */ (function () {
|
|
1022
1188
|
function NoopComponent() {
|
|
1023
1189
|
}
|
|
@@ -2339,96 +2505,6 @@ var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
|
2339
2505
|
return VerticalFocusContainerComponent;
|
|
2340
2506
|
}(FocusContainerComponent));
|
|
2341
2507
|
|
|
2342
|
-
var MultipleSelectInputComponent = /** @class */ (function (_super) {
|
|
2343
|
-
__extends(MultipleSelectInputComponent, _super);
|
|
2344
|
-
function MultipleSelectInputComponent() {
|
|
2345
|
-
var _this = _super.call(this) || this;
|
|
2346
|
-
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
2347
|
-
return _this;
|
|
2348
|
-
}
|
|
2349
|
-
MultipleSelectInputComponent.prototype.ngOnInit = function () {
|
|
2350
|
-
};
|
|
2351
|
-
__decorate([
|
|
2352
|
-
Input(), TrackExternal(),
|
|
2353
|
-
__metadata("design:type", ListModel)
|
|
2354
|
-
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
2355
|
-
__decorate([
|
|
2356
|
-
Input(), StoreInListModel('optionsModel'),
|
|
2357
|
-
__metadata("design:type", Array)
|
|
2358
|
-
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
2359
|
-
__decorate([
|
|
2360
|
-
Input(),
|
|
2361
|
-
__metadata("design:type", Object)
|
|
2362
|
-
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
2363
|
-
__decorate([
|
|
2364
|
-
Input(),
|
|
2365
|
-
__metadata("design:type", Boolean)
|
|
2366
|
-
], MultipleSelectInputComponent.prototype, "allowNil", void 0);
|
|
2367
|
-
__decorate([
|
|
2368
|
-
ContentChild('optionTemplate'),
|
|
2369
|
-
__metadata("design:type", TemplateRef)
|
|
2370
|
-
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
2371
|
-
__decorate([
|
|
2372
|
-
ContentChild('nilOptionTemplate'),
|
|
2373
|
-
__metadata("design:type", TemplateRef)
|
|
2374
|
-
], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
2375
|
-
__decorate([
|
|
2376
|
-
Input(),
|
|
2377
|
-
__metadata("design:type", Function)
|
|
2378
|
-
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
2379
|
-
MultipleSelectInputComponent = __decorate([
|
|
2380
|
-
Component({
|
|
2381
|
-
selector: 'aup-multiple-select-input',
|
|
2382
|
-
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)]=\"listModel.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\">{{placeholder}}</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",
|
|
2383
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
2384
|
-
}),
|
|
2385
|
-
__metadata("design:paramtypes", [])
|
|
2386
|
-
], MultipleSelectInputComponent);
|
|
2387
|
-
return MultipleSelectInputComponent;
|
|
2388
|
-
}(AbstractListInputComponent));
|
|
2389
|
-
|
|
2390
|
-
var IconComponent = /** @class */ (function () {
|
|
2391
|
-
function IconComponent() {
|
|
2392
|
-
}
|
|
2393
|
-
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
2394
|
-
get: function () {
|
|
2395
|
-
return this._icon;
|
|
2396
|
-
},
|
|
2397
|
-
set: function (iconName) {
|
|
2398
|
-
this._icon = iconName;
|
|
2399
|
-
if (!iconName) {
|
|
2400
|
-
this.errorMessage = 'icon is nil';
|
|
2401
|
-
this.prefix = undefined;
|
|
2402
|
-
return;
|
|
2403
|
-
}
|
|
2404
|
-
var colonIndex = iconName.indexOf(':');
|
|
2405
|
-
if (colonIndex > 0) {
|
|
2406
|
-
this.prefix = this.icon.slice(0, colonIndex);
|
|
2407
|
-
this.suffix = this.icon.slice(colonIndex + 1);
|
|
2408
|
-
}
|
|
2409
|
-
if (this.prefix) {
|
|
2410
|
-
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
2411
|
-
}
|
|
2412
|
-
this.errorMessage = "Unknown icon prefix \"" + this.prefix + "\"";
|
|
2413
|
-
},
|
|
2414
|
-
enumerable: true,
|
|
2415
|
-
configurable: true
|
|
2416
|
-
});
|
|
2417
|
-
__decorate([
|
|
2418
|
-
Input(),
|
|
2419
|
-
__metadata("design:type", String),
|
|
2420
|
-
__metadata("design:paramtypes", [String])
|
|
2421
|
-
], IconComponent.prototype, "icon", null);
|
|
2422
|
-
IconComponent = __decorate([
|
|
2423
|
-
Component({
|
|
2424
|
-
selector: 'aup-icon',
|
|
2425
|
-
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"'svg'\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"'mat'\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"'fab'\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n",
|
|
2426
|
-
styles: [":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center;width:24px;height:24px}.svgIcon{width:24px;height:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{width:inherit;height:inherit}"]
|
|
2427
|
-
})
|
|
2428
|
-
], IconComponent);
|
|
2429
|
-
return IconComponent;
|
|
2430
|
-
}());
|
|
2431
|
-
|
|
2432
2508
|
var ComponentsModule = /** @class */ (function () {
|
|
2433
2509
|
function ComponentsModule(faIconLibrary) {
|
|
2434
2510
|
faIconLibrary.addIconPacks(fas);
|
|
@@ -2447,6 +2523,8 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
2447
2523
|
TextInputComponent,
|
|
2448
2524
|
PasswordInputComponent,
|
|
2449
2525
|
SelectInputComponent,
|
|
2526
|
+
MultipleSelectInputComponent,
|
|
2527
|
+
AutocompleteInputComponent,
|
|
2450
2528
|
CheckboxInputComponent,
|
|
2451
2529
|
ScrollContainerComponent,
|
|
2452
2530
|
NoopComponent,
|
|
@@ -2466,7 +2544,6 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
2466
2544
|
SelectHeaderCellRendererComponent,
|
|
2467
2545
|
DefaultHeaderCellRendererComponent,
|
|
2468
2546
|
TableHeaderCellRendererComponent,
|
|
2469
|
-
MultipleSelectInputComponent,
|
|
2470
2547
|
IconComponent,
|
|
2471
2548
|
SectionHeaderComponent
|
|
2472
2549
|
],
|
|
@@ -2486,7 +2563,8 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
2486
2563
|
PortalModule,
|
|
2487
2564
|
CdkScrollableModule,
|
|
2488
2565
|
FontAwesomeModule,
|
|
2489
|
-
MatTooltipModule
|
|
2566
|
+
MatTooltipModule,
|
|
2567
|
+
MatAutocompleteModule
|
|
2490
2568
|
],
|
|
2491
2569
|
exports: [
|
|
2492
2570
|
NumberInputComponent,
|
|
@@ -2495,6 +2573,8 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
2495
2573
|
PasswordInputComponent,
|
|
2496
2574
|
CheckboxInputComponent,
|
|
2497
2575
|
SelectInputComponent,
|
|
2576
|
+
MultipleSelectInputComponent,
|
|
2577
|
+
AutocompleteInputComponent,
|
|
2498
2578
|
ScrollContainerComponent,
|
|
2499
2579
|
NoopComponent,
|
|
2500
2580
|
SwitchCaseComponent,
|
|
@@ -2507,12 +2587,23 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
2507
2587
|
TableComponent,
|
|
2508
2588
|
EditRowControls,
|
|
2509
2589
|
ColumnTemplateDirective,
|
|
2510
|
-
MultipleSelectInputComponent,
|
|
2511
2590
|
IconComponent,
|
|
2512
2591
|
SectionHeaderComponent
|
|
2513
2592
|
],
|
|
2514
2593
|
providers: [
|
|
2515
|
-
FocusBindingFactory
|
|
2594
|
+
FocusBindingFactory
|
|
2595
|
+
// {
|
|
2596
|
+
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
2597
|
+
// type: 'string',
|
|
2598
|
+
// editorClass: StringInputComponent
|
|
2599
|
+
// }, multi: true
|
|
2600
|
+
// },
|
|
2601
|
+
// {
|
|
2602
|
+
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
2603
|
+
// type: 'number',
|
|
2604
|
+
// editorClass: NumberInputComponent
|
|
2605
|
+
// }, multi: true
|
|
2606
|
+
// }
|
|
2516
2607
|
]
|
|
2517
2608
|
}),
|
|
2518
2609
|
__metadata("design:paramtypes", [FaIconLibrary])
|
|
@@ -6796,5 +6887,5 @@ function VisitParameterList(options) {
|
|
|
6796
6887
|
* Generated bundle index. Do not edit.
|
|
6797
6888
|
*/
|
|
6798
6889
|
|
|
6799
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandDirective, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, IconComponent, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalInteractionContextFactory, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TemplateCellRendererPortalRef, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0, DirectivesModule as ɵa, CommandDirective as ɵb,
|
|
6890
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandDirective, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, IconComponent, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalInteractionContextFactory, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TemplateCellRendererPortalRef, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0, DirectivesModule as ɵa, CommandDirective as ɵb, CardContainerComponent as ɵba, TableComponent as ɵbb, EditRowControls as ɵbc, ColumnTemplateDirective as ɵbd, DefaultCellRendererComponent as ɵbe, TableCellRendererComponent as ɵbf, SelectCellRendererComponent as ɵbg, SelectHeaderCellRendererComponent as ɵbh, DefaultHeaderCellRendererComponent as ɵbi, TableHeaderCellRendererComponent as ɵbj, IconComponent as ɵbk, SectionHeaderComponent as ɵbl, PlaceModule as ɵbm, ComponentsModule as ɵbn, EmptyStateComponent as ɵbo, BusyOverlayComponent as ɵbp, PlaceOutletComponent as ɵbq, leftRightPlaceAnimation as ɵbr, LEFT_RIGHT_PLACE_ANIMATION as ɵbs, AUP_PLACE_CONFIG as ɵbt, PlaceRouter as ɵbv, InteractionService as ɵbw, ModalInteractionContextFactory as ɵbx, UrlService as ɵby, PlaceHistory as ɵbz, FocusBindingDirective as ɵc, TabbedPlaceNavigationComponent as ɵca, AbstractPlaceNavigationComponent as ɵcb, ListPlaceNavComponent as ɵcc, SidePlaceNavigationComponent as ɵcd, InteractionModule as ɵce, ActivityContainerComponent as ɵcf, AbstractInteractionContext as ɵcg, ActivityOutletComponent as ɵch, ConfirmationDialogComponent as ɵci, ACTIVITY_DATA as ɵcj, Activity as ɵck, ConfirmThenDialogComponent as ɵcm, AlertDialogComponent as ɵcn, InPlaceInteractionContextComponent as ɵcp, AddItemInteractionContextComponent as ɵcq, ActivityActionsComponent as ɵcr, PopupInteractionContextComponent as ɵcs, StringInputActivity as ɵct, AbstractInputActivity as ɵcu, SelectInputActivity as ɵcv, InteractionContextTriggerFor as ɵcw, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, AbstractInputComponent as ɵg, AbstractValueInputComponent as ɵh, AbstractListInputComponent as ɵi, NumberInputComponent as ɵj, StringInputComponent as ɵk, TextInputComponent as ɵl, PasswordInputComponent as ɵm, SelectInputComponent as ɵn, MultipleSelectInputComponent as ɵo, AutocompleteInputComponent as ɵp, CheckboxInputComponent as ɵq, ScrollContainerComponent as ɵr, NoopComponent as ɵs, SwitchCaseOption as ɵt, SwitchCaseWhenDirective as ɵu, SwitchCaseDefaultDirective as ɵv, SwitchCaseComponent as ɵw, FocusContainerComponent as ɵx, VerticalFocusContainerComponent as ɵy, FocusableComponent as ɵz };
|
|
6800
6891
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|