@coolon/angular-ui-powerups 2.0.0-alpha.7 → 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 +19 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +281 -179
- 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/components/table/column-model.js +13 -3
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.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/components/table/column-model.js +13 -3
- package/esm5/lib/components/table/column-model.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 +199 -101
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +212 -111
- 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/lib/components/table/column-model.d.ts +9 -1
- 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 { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, 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';
|
|
@@ -688,21 +689,27 @@ let AbstractValueInputComponent = class AbstractValueInputComponent extends Abst
|
|
|
688
689
|
*/
|
|
689
690
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
690
691
|
this.inputModel = this.registerDisposable(new Form.DelegatingValueModel());
|
|
691
|
-
this.
|
|
692
|
+
this.setValueInProgress = new Guard();
|
|
692
693
|
this.valueChange = new EventEmitter();
|
|
693
694
|
const { when } = Dsl.disposeWith(this);
|
|
694
|
-
when(this.inputModel).changes(value => this.valueChange.emit(value), {
|
|
695
|
+
when(this.inputModel).changes(value => this.valueChange.emit(value), {
|
|
696
|
+
initialValue: 'ignore',
|
|
697
|
+
unless: this.setValueInProgress
|
|
698
|
+
});
|
|
695
699
|
}
|
|
696
700
|
set value(value) {
|
|
697
|
-
|
|
698
|
-
|
|
701
|
+
// we never fire events during an external set value operation. This allows
|
|
702
|
+
// the component to behave when used in the conventional angular
|
|
703
|
+
// fashion, i.e. [(value)]="..."
|
|
704
|
+
this.setValueInProgress.whileTrue(() => {
|
|
705
|
+
if (!this.valueHolder) {
|
|
699
706
|
this.valueHolder = new MutableValueModel(value);
|
|
700
707
|
this.valueModel = this.valueHolder;
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
}
|
|
708
|
+
}
|
|
709
|
+
else {
|
|
710
|
+
this.valueHolder.value = value;
|
|
711
|
+
}
|
|
712
|
+
});
|
|
706
713
|
}
|
|
707
714
|
};
|
|
708
715
|
__decorate([
|
|
@@ -723,6 +730,64 @@ AbstractValueInputComponent = __decorate([
|
|
|
723
730
|
__metadata("design:paramtypes", [])
|
|
724
731
|
], AbstractValueInputComponent);
|
|
725
732
|
|
|
733
|
+
/**
|
|
734
|
+
* Using templates (not only supported for nil values:
|
|
735
|
+
* <aup-autocomplete-input [valueModel]="myModel" [options]="myOptions">
|
|
736
|
+
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
737
|
+
* </aup-autocomplete-input>
|
|
738
|
+
*/
|
|
739
|
+
let AutocompleteInputComponent = class AutocompleteInputComponent extends AbstractValueInputComponent {
|
|
740
|
+
constructor() {
|
|
741
|
+
super();
|
|
742
|
+
this.filterValue = new MutableValueModel();
|
|
743
|
+
this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
|
|
744
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
745
|
+
const lowerCaseFilterValue = chain(this.filterValue)
|
|
746
|
+
.map(v => ___default.isString(v) ? v.toLowerCase() : '');
|
|
747
|
+
this.filteredOptions = chain(this.optionsModel)
|
|
748
|
+
.select(option => {
|
|
749
|
+
return ___default.isEmpty(this.filterValue.value) || this.optionLabelFormat(option).toString().toLowerCase().includes(lowerCaseFilterValue.value);
|
|
750
|
+
}, { dependsOn: lowerCaseFilterValue });
|
|
751
|
+
}
|
|
752
|
+
ngOnInit() {
|
|
753
|
+
}
|
|
754
|
+
updateFilter($event) {
|
|
755
|
+
this.filterValue.value = $event;
|
|
756
|
+
}
|
|
757
|
+
};
|
|
758
|
+
__decorate([
|
|
759
|
+
Input(), TrackExternal(),
|
|
760
|
+
__metadata("design:type", ListModel)
|
|
761
|
+
], AutocompleteInputComponent.prototype, "optionsModel", void 0);
|
|
762
|
+
__decorate([
|
|
763
|
+
Input(), StoreInListModel('optionsModel'),
|
|
764
|
+
__metadata("design:type", Array)
|
|
765
|
+
], AutocompleteInputComponent.prototype, "options", void 0);
|
|
766
|
+
__decorate([
|
|
767
|
+
Input(),
|
|
768
|
+
__metadata("design:type", Object)
|
|
769
|
+
], AutocompleteInputComponent.prototype, "optionLabel", void 0);
|
|
770
|
+
__decorate([
|
|
771
|
+
Input(),
|
|
772
|
+
__metadata("design:type", Boolean)
|
|
773
|
+
], AutocompleteInputComponent.prototype, "allowNil", void 0);
|
|
774
|
+
__decorate([
|
|
775
|
+
ContentChild('nilOptionTemplate'),
|
|
776
|
+
__metadata("design:type", TemplateRef)
|
|
777
|
+
], AutocompleteInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
778
|
+
__decorate([
|
|
779
|
+
Input(),
|
|
780
|
+
__metadata("design:type", Function)
|
|
781
|
+
], AutocompleteInputComponent.prototype, "optionLabelFormat", void 0);
|
|
782
|
+
AutocompleteInputComponent = __decorate([
|
|
783
|
+
Component({
|
|
784
|
+
selector: 'aup-autocomplete-input',
|
|
785
|
+
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",
|
|
786
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
787
|
+
}),
|
|
788
|
+
__metadata("design:paramtypes", [])
|
|
789
|
+
], AutocompleteInputComponent);
|
|
790
|
+
|
|
726
791
|
let CheckboxInputComponent = class CheckboxInputComponent extends AbstractValueInputComponent {
|
|
727
792
|
constructor() {
|
|
728
793
|
super();
|
|
@@ -751,6 +816,58 @@ CheckboxInputComponent = __decorate([
|
|
|
751
816
|
__metadata("design:paramtypes", [])
|
|
752
817
|
], CheckboxInputComponent);
|
|
753
818
|
|
|
819
|
+
/**
|
|
820
|
+
* Using templates:
|
|
821
|
+
* <aup-multiple-select-input [valueModel]="myModel" [options]="myOptions">
|
|
822
|
+
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
823
|
+
* <ng-template #nilOptionTemplateRef let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
824
|
+
* </aup-multiple-select_input>
|
|
825
|
+
*/
|
|
826
|
+
let MultipleSelectInputComponent = class MultipleSelectInputComponent extends AbstractListInputComponent {
|
|
827
|
+
constructor() {
|
|
828
|
+
super();
|
|
829
|
+
this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
|
|
830
|
+
}
|
|
831
|
+
ngOnInit() {
|
|
832
|
+
}
|
|
833
|
+
};
|
|
834
|
+
__decorate([
|
|
835
|
+
Input(), TrackExternal(),
|
|
836
|
+
__metadata("design:type", ListModel)
|
|
837
|
+
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
838
|
+
__decorate([
|
|
839
|
+
Input(), StoreInListModel('optionsModel'),
|
|
840
|
+
__metadata("design:type", Array)
|
|
841
|
+
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
842
|
+
__decorate([
|
|
843
|
+
Input(),
|
|
844
|
+
__metadata("design:type", Object)
|
|
845
|
+
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
846
|
+
__decorate([
|
|
847
|
+
Input(),
|
|
848
|
+
__metadata("design:type", Boolean)
|
|
849
|
+
], MultipleSelectInputComponent.prototype, "allowNil", void 0);
|
|
850
|
+
__decorate([
|
|
851
|
+
ContentChild('optionTemplate'),
|
|
852
|
+
__metadata("design:type", TemplateRef)
|
|
853
|
+
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
854
|
+
__decorate([
|
|
855
|
+
ContentChild('nilOptionTemplate'),
|
|
856
|
+
__metadata("design:type", TemplateRef)
|
|
857
|
+
], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
858
|
+
__decorate([
|
|
859
|
+
Input(),
|
|
860
|
+
__metadata("design:type", Function)
|
|
861
|
+
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
862
|
+
MultipleSelectInputComponent = __decorate([
|
|
863
|
+
Component({
|
|
864
|
+
selector: 'aup-multiple-select-input',
|
|
865
|
+
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",
|
|
866
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
867
|
+
}),
|
|
868
|
+
__metadata("design:paramtypes", [])
|
|
869
|
+
], MultipleSelectInputComponent);
|
|
870
|
+
|
|
754
871
|
let NumberInputComponent = class NumberInputComponent extends AbstractValueInputComponent {
|
|
755
872
|
constructor() {
|
|
756
873
|
super();
|
|
@@ -801,6 +918,7 @@ PasswordInputComponent = __decorate([
|
|
|
801
918
|
* Using templates:
|
|
802
919
|
* <aup-select-input [valueModel]="myModel" [options]="myOptions">
|
|
803
920
|
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
921
|
+
* <ng-template #nilOptionTemplateRef let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
804
922
|
* </aup-select_input>
|
|
805
923
|
*/
|
|
806
924
|
let SelectInputComponent = class SelectInputComponent extends AbstractValueInputComponent {
|
|
@@ -905,6 +1023,41 @@ TextInputComponent = __decorate([
|
|
|
905
1023
|
__metadata("design:paramtypes", [])
|
|
906
1024
|
], TextInputComponent);
|
|
907
1025
|
|
|
1026
|
+
let IconComponent = class IconComponent {
|
|
1027
|
+
set icon(iconName) {
|
|
1028
|
+
this._icon = iconName;
|
|
1029
|
+
if (!iconName) {
|
|
1030
|
+
this.errorMessage = 'icon is nil';
|
|
1031
|
+
this.prefix = undefined;
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
const colonIndex = iconName.indexOf(':');
|
|
1035
|
+
if (colonIndex > 0) {
|
|
1036
|
+
this.prefix = this.icon.slice(0, colonIndex);
|
|
1037
|
+
this.suffix = this.icon.slice(colonIndex + 1);
|
|
1038
|
+
}
|
|
1039
|
+
if (this.prefix) {
|
|
1040
|
+
this.errorMessage = `Unknown icon "${iconName}"`;
|
|
1041
|
+
}
|
|
1042
|
+
this.errorMessage = `Unknown icon prefix "${this.prefix}"`;
|
|
1043
|
+
}
|
|
1044
|
+
get icon() {
|
|
1045
|
+
return this._icon;
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
__decorate([
|
|
1049
|
+
Input(),
|
|
1050
|
+
__metadata("design:type", String),
|
|
1051
|
+
__metadata("design:paramtypes", [String])
|
|
1052
|
+
], IconComponent.prototype, "icon", null);
|
|
1053
|
+
IconComponent = __decorate([
|
|
1054
|
+
Component({
|
|
1055
|
+
selector: 'aup-icon',
|
|
1056
|
+
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",
|
|
1057
|
+
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}"]
|
|
1058
|
+
})
|
|
1059
|
+
], IconComponent);
|
|
1060
|
+
|
|
908
1061
|
let NoopComponent = class NoopComponent {
|
|
909
1062
|
constructor() {
|
|
910
1063
|
}
|
|
@@ -1413,12 +1566,22 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
1413
1566
|
this._format = (value) => value;
|
|
1414
1567
|
this.cellRenderer(DefaultCellRendererComponent);
|
|
1415
1568
|
}
|
|
1416
|
-
cellRenderer(componentType,
|
|
1569
|
+
cellRenderer(componentType, onComponentInitOrOptions) {
|
|
1417
1570
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
1418
|
-
if (firstTime
|
|
1419
|
-
|
|
1571
|
+
if (firstTime) {
|
|
1572
|
+
if (___default.isFunction(onComponentInitOrOptions)) {
|
|
1573
|
+
onComponentInitOrOptions(component);
|
|
1574
|
+
}
|
|
1575
|
+
else {
|
|
1576
|
+
if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
1577
|
+
onComponentInitOrOptions.onComponentInit(component);
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1420
1580
|
}
|
|
1421
1581
|
component.value = this._format(rowData.row[this.property]);
|
|
1582
|
+
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
1583
|
+
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
1584
|
+
}
|
|
1422
1585
|
}));
|
|
1423
1586
|
return this;
|
|
1424
1587
|
}
|
|
@@ -2104,86 +2267,6 @@ VerticalFocusContainerComponent = __decorate([
|
|
|
2104
2267
|
__metadata("design:paramtypes", [FocusManager])
|
|
2105
2268
|
], VerticalFocusContainerComponent);
|
|
2106
2269
|
|
|
2107
|
-
let MultipleSelectInputComponent = class MultipleSelectInputComponent extends AbstractListInputComponent {
|
|
2108
|
-
constructor() {
|
|
2109
|
-
super();
|
|
2110
|
-
this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
|
|
2111
|
-
}
|
|
2112
|
-
ngOnInit() {
|
|
2113
|
-
}
|
|
2114
|
-
};
|
|
2115
|
-
__decorate([
|
|
2116
|
-
Input(), TrackExternal(),
|
|
2117
|
-
__metadata("design:type", ListModel)
|
|
2118
|
-
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
2119
|
-
__decorate([
|
|
2120
|
-
Input(), StoreInListModel('optionsModel'),
|
|
2121
|
-
__metadata("design:type", Array)
|
|
2122
|
-
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
2123
|
-
__decorate([
|
|
2124
|
-
Input(),
|
|
2125
|
-
__metadata("design:type", Object)
|
|
2126
|
-
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
2127
|
-
__decorate([
|
|
2128
|
-
Input(),
|
|
2129
|
-
__metadata("design:type", Boolean)
|
|
2130
|
-
], MultipleSelectInputComponent.prototype, "allowNil", void 0);
|
|
2131
|
-
__decorate([
|
|
2132
|
-
ContentChild('optionTemplate'),
|
|
2133
|
-
__metadata("design:type", TemplateRef)
|
|
2134
|
-
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
2135
|
-
__decorate([
|
|
2136
|
-
ContentChild('nilOptionTemplate'),
|
|
2137
|
-
__metadata("design:type", TemplateRef)
|
|
2138
|
-
], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
2139
|
-
__decorate([
|
|
2140
|
-
Input(),
|
|
2141
|
-
__metadata("design:type", Function)
|
|
2142
|
-
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
2143
|
-
MultipleSelectInputComponent = __decorate([
|
|
2144
|
-
Component({
|
|
2145
|
-
selector: 'aup-multiple-select-input',
|
|
2146
|
-
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",
|
|
2147
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
2148
|
-
}),
|
|
2149
|
-
__metadata("design:paramtypes", [])
|
|
2150
|
-
], MultipleSelectInputComponent);
|
|
2151
|
-
|
|
2152
|
-
let IconComponent = class IconComponent {
|
|
2153
|
-
set icon(iconName) {
|
|
2154
|
-
this._icon = iconName;
|
|
2155
|
-
if (!iconName) {
|
|
2156
|
-
this.errorMessage = 'icon is nil';
|
|
2157
|
-
this.prefix = undefined;
|
|
2158
|
-
return;
|
|
2159
|
-
}
|
|
2160
|
-
const colonIndex = iconName.indexOf(':');
|
|
2161
|
-
if (colonIndex > 0) {
|
|
2162
|
-
this.prefix = this.icon.slice(0, colonIndex);
|
|
2163
|
-
this.suffix = this.icon.slice(colonIndex + 1);
|
|
2164
|
-
}
|
|
2165
|
-
if (this.prefix) {
|
|
2166
|
-
this.errorMessage = `Unknown icon "${iconName}"`;
|
|
2167
|
-
}
|
|
2168
|
-
this.errorMessage = `Unknown icon prefix "${this.prefix}"`;
|
|
2169
|
-
}
|
|
2170
|
-
get icon() {
|
|
2171
|
-
return this._icon;
|
|
2172
|
-
}
|
|
2173
|
-
};
|
|
2174
|
-
__decorate([
|
|
2175
|
-
Input(),
|
|
2176
|
-
__metadata("design:type", String),
|
|
2177
|
-
__metadata("design:paramtypes", [String])
|
|
2178
|
-
], IconComponent.prototype, "icon", null);
|
|
2179
|
-
IconComponent = __decorate([
|
|
2180
|
-
Component({
|
|
2181
|
-
selector: 'aup-icon',
|
|
2182
|
-
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",
|
|
2183
|
-
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}"]
|
|
2184
|
-
})
|
|
2185
|
-
], IconComponent);
|
|
2186
|
-
|
|
2187
2270
|
let ComponentsModule = class ComponentsModule {
|
|
2188
2271
|
constructor(faIconLibrary) {
|
|
2189
2272
|
faIconLibrary.addIconPacks(fas);
|
|
@@ -2203,6 +2286,8 @@ ComponentsModule = __decorate([
|
|
|
2203
2286
|
TextInputComponent,
|
|
2204
2287
|
PasswordInputComponent,
|
|
2205
2288
|
SelectInputComponent,
|
|
2289
|
+
MultipleSelectInputComponent,
|
|
2290
|
+
AutocompleteInputComponent,
|
|
2206
2291
|
CheckboxInputComponent,
|
|
2207
2292
|
ScrollContainerComponent,
|
|
2208
2293
|
NoopComponent,
|
|
@@ -2222,7 +2307,6 @@ ComponentsModule = __decorate([
|
|
|
2222
2307
|
SelectHeaderCellRendererComponent,
|
|
2223
2308
|
DefaultHeaderCellRendererComponent,
|
|
2224
2309
|
TableHeaderCellRendererComponent,
|
|
2225
|
-
MultipleSelectInputComponent,
|
|
2226
2310
|
IconComponent,
|
|
2227
2311
|
SectionHeaderComponent
|
|
2228
2312
|
],
|
|
@@ -2242,7 +2326,8 @@ ComponentsModule = __decorate([
|
|
|
2242
2326
|
PortalModule,
|
|
2243
2327
|
CdkScrollableModule,
|
|
2244
2328
|
FontAwesomeModule,
|
|
2245
|
-
MatTooltipModule
|
|
2329
|
+
MatTooltipModule,
|
|
2330
|
+
MatAutocompleteModule
|
|
2246
2331
|
],
|
|
2247
2332
|
exports: [
|
|
2248
2333
|
NumberInputComponent,
|
|
@@ -2251,6 +2336,8 @@ ComponentsModule = __decorate([
|
|
|
2251
2336
|
PasswordInputComponent,
|
|
2252
2337
|
CheckboxInputComponent,
|
|
2253
2338
|
SelectInputComponent,
|
|
2339
|
+
MultipleSelectInputComponent,
|
|
2340
|
+
AutocompleteInputComponent,
|
|
2254
2341
|
ScrollContainerComponent,
|
|
2255
2342
|
NoopComponent,
|
|
2256
2343
|
SwitchCaseComponent,
|
|
@@ -2263,12 +2350,23 @@ ComponentsModule = __decorate([
|
|
|
2263
2350
|
TableComponent,
|
|
2264
2351
|
EditRowControls,
|
|
2265
2352
|
ColumnTemplateDirective,
|
|
2266
|
-
MultipleSelectInputComponent,
|
|
2267
2353
|
IconComponent,
|
|
2268
2354
|
SectionHeaderComponent
|
|
2269
2355
|
],
|
|
2270
2356
|
providers: [
|
|
2271
|
-
FocusBindingFactory
|
|
2357
|
+
FocusBindingFactory
|
|
2358
|
+
// {
|
|
2359
|
+
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
2360
|
+
// type: 'string',
|
|
2361
|
+
// editorClass: StringInputComponent
|
|
2362
|
+
// }, multi: true
|
|
2363
|
+
// },
|
|
2364
|
+
// {
|
|
2365
|
+
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
2366
|
+
// type: 'number',
|
|
2367
|
+
// editorClass: NumberInputComponent
|
|
2368
|
+
// }, multi: true
|
|
2369
|
+
// }
|
|
2272
2370
|
]
|
|
2273
2371
|
}),
|
|
2274
2372
|
__metadata("design:paramtypes", [FaIconLibrary])
|
|
@@ -6098,5 +6196,5 @@ function VisitParameterList(options) {
|
|
|
6098
6196
|
* Generated bundle index. Do not edit.
|
|
6099
6197
|
*/
|
|
6100
6198
|
|
|
6101
|
-
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,
|
|
6199
|
+
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 };
|
|
6102
6200
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|