@coolon/angular-ui-powerups 12.4.0-alpha.83 → 12.4.0-alpha.85

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.
@@ -37,8 +37,8 @@ export class AutocompleteInputComponent extends AbstractValueInputComponent {
37
37
  AutocompleteInputComponent.decorators = [
38
38
  { type: Component, args: [{
39
39
  selector: 'aup-autocomplete-input',
40
- 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",
41
- styles: [":host{display:inline-block}mat-form-field{width:100%}\n"]
40
+ 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<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
41
+ styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:inline-block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"]
42
42
  },] }
43
43
  ];
44
44
  AutocompleteInputComponent.ctorParameters = () => [];
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete-input.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/forms/autocomplete-input/autocomplete-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAEpF,OAAO,EACL,GAAG,EACH,SAAS,EAET,iBAAiB,EACjB,gBAAgB,EAEhB,aAAa,EACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAEhF;;;;;GAKG;AAMH,MAAM,OAAO,0BAAoC,SAAQ,2BAA8B;IAuBrF;QACE,KAAK,EAAE,CAAC;QAPF,gBAAW,GAAG,IAAI,iBAAiB,EAAU,CAAC;QAItD,sBAAiB,GAAuB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAInH,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzF,MAAO,oBAAoB,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC;aAClD,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAElD,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC;aAC5C,MAAM,CAAC,MAAM,CAAC,EAAE;YACf,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAC3I,CAAC,EAAE,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,QAAQ;IACR,CAAC;IAED,YAAY,CAAC,MAAS;QACpB,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IAED,YAAY,CAAC,MAAc;QACzB,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,MAAM,CAAC;IAClC,CAAC;IAED,QAAQ,CAAC,MAAoC;QAC3C,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;IAC9C,CAAC;;;YArDF,SAAS,SAAC;gBACT,QAAQ,EAAE,wBAAwB;gBAClC,gnCAAkD;;aAEnD;;;;2BAGE,KAAK;sBAGL,KAAK;0BAGL,KAAK;uBAGL,KAAK;mCAGL,YAAY,SAAC,mBAAmB;gCAMhC,KAAK;;AAjBN;IADU,aAAa,EAAE;8BACX,SAAS;gEAAI;AAG3B;IADU,gBAAgB,CAAC,cAAc,CAAC;;2DAC7B","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\nimport {\n Dsl,\n ListModel,\n ListModelChain,\n MutableValueModel,\n StoreInListModel,\n Trace,\n TrackExternal, TransactionObserver\n} from '@coolon/pectin';\nimport _ from 'lodash';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n/**\n * Using templates (not only supported for nil values:\n * <aup-autocomplete-input [valueModel]=\"myModel\" [options]=\"myOptions\">\n * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * </aup-autocomplete-input>\n */\n@Component({\n selector: 'aup-autocomplete-input',\n templateUrl: './autocomplete-input.component.html',\n styleUrls: ['./autocomplete-input.component.scss']\n})\nexport class AutocompleteInputComponent<T = any> extends AbstractValueInputComponent<T> implements OnInit {\n\n @Input() @TrackExternal()\n optionsModel: ListModel<T>;\n\n @Input() @StoreInListModel('optionsModel')\n options: T[];\n\n @Input()\n optionLabel: keyof T;\n\n @Input()\n allowNil: boolean;\n\n @ContentChild('nilOptionTemplate')\n nilOptionTemplateRef: TemplateRef<any>;\n\n private filterValue = new MutableValueModel<string>();\n readonly filteredOptions: ListModelChain<T>;\n\n @Input()\n optionLabelFormat: (option: T) => any = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n const lowerCaseFilterValue = chain(this.filterValue)\n .map(v => _.isString(v) ? v.toLowerCase() : '');\n\n this.filteredOptions = chain(this.optionsModel)\n .select(option => {\n return _.isEmpty(this.filterValue.value) || this.optionLabelFormat(option).toString().toLowerCase().includes(lowerCaseFilterValue.value);\n }, { dependsOn: lowerCaseFilterValue });\n }\n\n ngOnInit() {\n }\n\n formatOption(option: T) {\n return this.optionLabelFormat(option);\n }\n\n updateFilter($event: string) {\n this.filterValue.value = $event;\n }\n\n onSelect($event: MatAutocompleteSelectedEvent) {\n this.valueModel.value = $event.option.value;\n }\n}\n"]}
1
+ {"version":3,"file":"autocomplete-input.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/forms/autocomplete-input/autocomplete-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAEpF,OAAO,EACL,GAAG,EACH,SAAS,EAET,iBAAiB,EACjB,gBAAgB,EAEhB,aAAa,EACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAEhF;;;;;GAKG;AAMH,MAAM,OAAO,0BAAoC,SAAQ,2BAA8B;IAuBrF;QACE,KAAK,EAAE,CAAC;QAPF,gBAAW,GAAG,IAAI,iBAAiB,EAAU,CAAC;QAItD,sBAAiB,GAAuB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAInH,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzF,MAAO,oBAAoB,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC;aAClD,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAElD,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC;aAC5C,MAAM,CAAC,MAAM,CAAC,EAAE;YACf,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAC3I,CAAC,EAAE,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,QAAQ;IACR,CAAC;IAED,YAAY,CAAC,MAAS;QACpB,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IAED,YAAY,CAAC,MAAc;QACzB,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,MAAM,CAAC;IAClC,CAAC;IAED,QAAQ,CAAC,MAAoC;QAC3C,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;IAC9C,CAAC;;;YArDF,SAAS,SAAC;gBACT,QAAQ,EAAE,wBAAwB;gBAClC,+zCAAkD;;aAEnD;;;;2BAGE,KAAK;sBAGL,KAAK;0BAGL,KAAK;uBAGL,KAAK;mCAGL,YAAY,SAAC,mBAAmB;gCAMhC,KAAK;;AAjBN;IADU,aAAa,EAAE;8BACX,SAAS;gEAAI;AAG3B;IADU,gBAAgB,CAAC,cAAc,CAAC;;2DAC7B","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\nimport {\n Dsl,\n ListModel,\n ListModelChain,\n MutableValueModel,\n StoreInListModel,\n Trace,\n TrackExternal, TransactionObserver\n} from '@coolon/pectin';\nimport _ from 'lodash';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n/**\n * Using templates (not only supported for nil values:\n * <aup-autocomplete-input [valueModel]=\"myModel\" [options]=\"myOptions\">\n * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * </aup-autocomplete-input>\n */\n@Component({\n selector: 'aup-autocomplete-input',\n templateUrl: './autocomplete-input.component.html',\n styleUrls: ['./autocomplete-input.component.scss']\n})\nexport class AutocompleteInputComponent<T = any> extends AbstractValueInputComponent<T> implements OnInit {\n\n @Input() @TrackExternal()\n optionsModel: ListModel<T>;\n\n @Input() @StoreInListModel('optionsModel')\n options: T[];\n\n @Input()\n optionLabel: keyof T;\n\n @Input()\n allowNil: boolean;\n\n @ContentChild('nilOptionTemplate')\n nilOptionTemplateRef: TemplateRef<any>;\n\n private filterValue = new MutableValueModel<string>();\n readonly filteredOptions: ListModelChain<T>;\n\n @Input()\n optionLabelFormat: (option: T) => any = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n const lowerCaseFilterValue = chain(this.filterValue)\n .map(v => _.isString(v) ? v.toLowerCase() : '');\n\n this.filteredOptions = chain(this.optionsModel)\n .select(option => {\n return _.isEmpty(this.filterValue.value) || this.optionLabelFormat(option).toString().toLowerCase().includes(lowerCaseFilterValue.value);\n }, { dependsOn: lowerCaseFilterValue });\n }\n\n ngOnInit() {\n }\n\n formatOption(option: T) {\n return this.optionLabelFormat(option);\n }\n\n updateFilter($event: string) {\n this.filterValue.value = $event;\n }\n\n onSelect($event: MatAutocompleteSelectedEvent) {\n this.valueModel.value = $event.option.value;\n }\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"AutocompleteInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":25,"character":57},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"aup-autocomplete-input","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","styles":[":host{display:inline-block}mat-form-field{width:100%}\n"]}]}],"members":{"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":27,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":30,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"allowNil":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"nilOptionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":39,"character":3},"arguments":["nilOptionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"formatOption":[{"__symbolic":"method"}],"updateFilter":[{"__symbolic":"method"}],"onSelect":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"AutocompleteInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":25,"character":57},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"aup-autocomplete-input","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<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:inline-block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"]}]}],"members":{"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":27,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":30,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"allowNil":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"nilOptionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":39,"character":3},"arguments":["nilOptionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"formatOption":[{"__symbolic":"method"}],"updateFilter":[{"__symbolic":"method"}],"onSelect":[{"__symbolic":"method"}]}}}}]
@@ -20,8 +20,8 @@ export class MultipleSelectInputComponent extends AbstractListInputComponent {
20
20
  MultipleSelectInputComponent.decorators = [
21
21
  { type: Component, args: [{
22
22
  selector: 'aup-multiple-select-input',
23
- 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",
24
- styles: [":host{display:inline-block}mat-form-field{width:100%}\n"]
23
+ 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<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
24
+ styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:inline-block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:30px}\n"]
25
25
  },] }
26
26
  ];
27
27
  MultipleSelectInputComponent.ctorParameters = () => [];
@@ -1 +1 @@
1
- {"version":3,"file":"multiple-select-input.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/forms/multiple-select-input/multiple-select-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E;;;;;;GAMG;AAMH,MAAM,OAAO,4BAAsC,SAAQ,0BAA6B;IAiBtF;QACE,KAAK,EAAE,CAAC;QAHV,sBAAiB,GAAuB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAIrH,CAAC;IAED,QAAQ;IACR,CAAC;;;YA3BF,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,gkCAAqD;;aAEtD;;;;2BAGE,KAAK;sBAGL,KAAK;0BAGL,KAAK;gCAGL,YAAY,SAAC,gBAAgB;gCAG7B,KAAK;;AAXN;IADU,aAAa,EAAE;8BACX,SAAS;kEAAI;AAG3B;IADU,gBAAgB,CAAC,cAAc,CAAC;;6DAC7B","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport { ListModel, StoreInListModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractListInputComponent } from '../abstract-list-input.component';\n\n/**\n * Using templates:\n * <aup-multiple-select-input [valueModel]=\"myModel\" [options]=\"myOptions\">\n * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * </aup-multiple-select_input>\n */\n@Component({\n selector: 'aup-multiple-select-input',\n templateUrl: './multiple-select-input.component.html',\n styleUrls: ['./multiple-select-input.component.scss']\n})\nexport class MultipleSelectInputComponent<T = any> extends AbstractListInputComponent<T> implements OnInit {\n\n @Input() @TrackExternal()\n optionsModel: ListModel<T>;\n\n @Input() @StoreInListModel('optionsModel')\n options: T[];\n\n @Input()\n optionLabel: keyof T;\n\n @ContentChild('optionTemplate')\n optionTemplateRef: TemplateRef<any>;\n\n @Input()\n optionLabelFormat: (option: T) => any = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
1
+ {"version":3,"file":"multiple-select-input.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/forms/multiple-select-input/multiple-select-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E;;;;;;GAMG;AAMH,MAAM,OAAO,4BAAsC,SAAQ,0BAA6B;IAiBtF;QACE,KAAK,EAAE,CAAC;QAHV,sBAAiB,GAAuB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAIrH,CAAC;IAED,QAAQ;IACR,CAAC;;;YA3BF,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,+wCAAqD;;aAEtD;;;;2BAGE,KAAK;sBAGL,KAAK;0BAGL,KAAK;gCAGL,YAAY,SAAC,gBAAgB;gCAG7B,KAAK;;AAXN;IADU,aAAa,EAAE;8BACX,SAAS;kEAAI;AAG3B;IADU,gBAAgB,CAAC,cAAc,CAAC;;6DAC7B","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport { ListModel, StoreInListModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractListInputComponent } from '../abstract-list-input.component';\n\n/**\n * Using templates:\n * <aup-multiple-select-input [valueModel]=\"myModel\" [options]=\"myOptions\">\n * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * </aup-multiple-select_input>\n */\n@Component({\n selector: 'aup-multiple-select-input',\n templateUrl: './multiple-select-input.component.html',\n styleUrls: ['./multiple-select-input.component.scss']\n})\nexport class MultipleSelectInputComponent<T = any> extends AbstractListInputComponent<T> implements OnInit {\n\n @Input() @TrackExternal()\n optionsModel: ListModel<T>;\n\n @Input() @StoreInListModel('optionsModel')\n options: T[];\n\n @Input()\n optionLabel: keyof T;\n\n @ContentChild('optionTemplate')\n optionTemplateRef: TemplateRef<any>;\n\n @Input()\n optionLabelFormat: (option: T) => any = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"MultipleSelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-list-input.component","name":"AbstractListInputComponent","line":16,"character":59},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-multiple-select-input","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","styles":[":host{display:inline-block}mat-form-field{width:100%}\n"]}]}],"members":{"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":18,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":21,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"optionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":27,"character":3},"arguments":["optionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"MultipleSelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-list-input.component","name":"AbstractListInputComponent","line":16,"character":59},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-multiple-select-input","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<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:inline-block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:30px}\n"]}]}],"members":{"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":18,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":21,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"optionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":27,"character":3},"arguments":["optionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
@@ -20,8 +20,8 @@ export class SelectInputComponent extends AbstractValueInputComponent {
20
20
  SelectInputComponent.decorators = [
21
21
  { type: Component, args: [{
22
22
  selector: 'aup-select-input',
23
- 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<div class=\"width-strut\">\n <div *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
24
- styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{height:0;max-height:0;width:auto;visibility:hidden;padding-right:12px}\n"]
23
+ 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<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
24
+ styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:inline-block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"]
25
25
  },] }
26
26
  ];
27
27
  SelectInputComponent.ctorParameters = () => [];
@@ -1 +1 @@
1
- {"version":3,"file":"select-input.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/forms/select-input/select-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAEhF;;;;;;GAMG;AAMH,MAAM,OAAO,oBAA8B,SAAQ,2BAA8B;IAuB/E;QACE,KAAK,EAAE,CAAC;QAHV,sBAAiB,GAAuB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAIrH,CAAC;IAED,QAAQ;IACR,CAAC;;;YAjCF,SAAS,SAAC;gBACT,QAAQ,EAAE,kBAAkB;gBAC5B,26CAA4C;;aAE7C;;;;2BAGE,KAAK;sBAGL,KAAK;0BAGL,KAAK;uBAGL,KAAK;gCAGL,YAAY,SAAC,gBAAgB;mCAG7B,YAAY,SAAC,mBAAmB;gCAGhC,KAAK;;AAjBN;IADU,aAAa,EAAE;8BACX,SAAS;0DAAI;AAG3B;IADU,gBAAgB,CAAC,cAAc,CAAC;;qDAC7B","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport { ListModel, StoreInListModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n/**\n * Using templates:\n * <aup-select-input [valueModel]=\"myModel\" [options]=\"myOptions\">\n * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * </aup-select_input>\n */\n@Component({\n selector: 'aup-select-input',\n templateUrl: './select-input.component.html',\n styleUrls: ['./select-input.component.scss']\n})\nexport class SelectInputComponent<T = any> extends AbstractValueInputComponent<T> implements OnInit {\n\n @Input() @TrackExternal()\n optionsModel: ListModel<T>;\n\n @Input() @StoreInListModel('optionsModel')\n options: T[];\n\n @Input()\n optionLabel: keyof T;\n\n @Input()\n allowNil: boolean;\n\n @ContentChild('optionTemplate')\n optionTemplateRef: TemplateRef<any>;\n\n @ContentChild('nilOptionTemplate')\n nilOptionTemplateRef: TemplateRef<any>;\n\n @Input()\n optionLabelFormat: (option: T) => any = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
1
+ {"version":3,"file":"select-input.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/forms/select-input/select-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAEhF;;;;;;GAMG;AAMH,MAAM,OAAO,oBAA8B,SAAQ,2BAA8B;IAuB/E;QACE,KAAK,EAAE,CAAC;QAHV,sBAAiB,GAAuB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAIrH,CAAC;IAED,QAAQ;IACR,CAAC;;;YAjCF,SAAS,SAAC;gBACT,QAAQ,EAAE,kBAAkB;gBAC5B,8+CAA4C;;aAE7C;;;;2BAGE,KAAK;sBAGL,KAAK;0BAGL,KAAK;uBAGL,KAAK;gCAGL,YAAY,SAAC,gBAAgB;mCAG7B,YAAY,SAAC,mBAAmB;gCAGhC,KAAK;;AAjBN;IADU,aAAa,EAAE;8BACX,SAAS;0DAAI;AAG3B;IADU,gBAAgB,CAAC,cAAc,CAAC;;qDAC7B","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport { ListModel, StoreInListModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n/**\n * Using templates:\n * <aup-select-input [valueModel]=\"myModel\" [options]=\"myOptions\">\n * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * </aup-select_input>\n */\n@Component({\n selector: 'aup-select-input',\n templateUrl: './select-input.component.html',\n styleUrls: ['./select-input.component.scss']\n})\nexport class SelectInputComponent<T = any> extends AbstractValueInputComponent<T> implements OnInit {\n\n @Input() @TrackExternal()\n optionsModel: ListModel<T>;\n\n @Input() @StoreInListModel('optionsModel')\n options: T[];\n\n @Input()\n optionLabel: keyof T;\n\n @Input()\n allowNil: boolean;\n\n @ContentChild('optionTemplate')\n optionTemplateRef: TemplateRef<any>;\n\n @ContentChild('nilOptionTemplate')\n nilOptionTemplateRef: TemplateRef<any>;\n\n @Input()\n optionLabelFormat: (option: T) => any = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"SelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":16,"character":51},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-select-input","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<div class=\"width-strut\">\n <div *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}.width-strut{height:0;max-height:0;width:auto;visibility:hidden;padding-right:12px}\n"]}]}],"members":{"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":18,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":21,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"allowNil":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"optionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":30,"character":3},"arguments":["optionTemplate"]}]}],"nilOptionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":33,"character":3},"arguments":["nilOptionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"SelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-value-input.component","name":"AbstractValueInputComponent","line":16,"character":51},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-select-input","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<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:inline-block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"]}]}],"members":{"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":18,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":21,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"allowNil":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"optionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":30,"character":3},"arguments":["optionTemplate"]}]}],"nilOptionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":33,"character":3},"arguments":["nilOptionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
@@ -1701,8 +1701,8 @@ class AutocompleteInputComponent extends AbstractValueInputComponent {
1701
1701
  AutocompleteInputComponent.decorators = [
1702
1702
  { type: Component, args: [{
1703
1703
  selector: 'aup-autocomplete-input',
1704
- 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",
1705
- styles: [":host{display:inline-block}mat-form-field{width:100%}\n"]
1704
+ 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<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
1705
+ styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:inline-block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"]
1706
1706
  },] }
1707
1707
  ];
1708
1708
  AutocompleteInputComponent.ctorParameters = () => [];
@@ -1765,8 +1765,8 @@ class MultipleSelectInputComponent extends AbstractListInputComponent {
1765
1765
  MultipleSelectInputComponent.decorators = [
1766
1766
  { type: Component, args: [{
1767
1767
  selector: 'aup-multiple-select-input',
1768
- 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",
1769
- styles: [":host{display:inline-block}mat-form-field{width:100%}\n"]
1768
+ 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<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
1769
+ styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:inline-block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:30px}\n"]
1770
1770
  },] }
1771
1771
  ];
1772
1772
  MultipleSelectInputComponent.ctorParameters = () => [];
@@ -1847,8 +1847,8 @@ class SelectInputComponent extends AbstractValueInputComponent {
1847
1847
  SelectInputComponent.decorators = [
1848
1848
  { type: Component, args: [{
1849
1849
  selector: 'aup-select-input',
1850
- 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<div class=\"width-strut\">\n <div *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
1851
- styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{height:0;max-height:0;width:auto;visibility:hidden;padding-right:12px}\n"]
1850
+ 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<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div class=\"item\" *ngFor=\"let item of options\">{{optionLabelFormat(item)}}</div>\n</div>\n",
1851
+ styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:inline-block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"]
1852
1852
  },] }
1853
1853
  ];
1854
1854
  SelectInputComponent.ctorParameters = () => [];