@coolon/angular-ui-powerups 14.38.3 → 14.39.0

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.
@@ -23,34 +23,60 @@ export class SelectInputComponent extends AbstractValueInputComponent {
23
23
  this._options$ = new DelegatingListModel();
24
24
  this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
25
25
  this.id$ = new MutableValueModel();
26
+ this.trackByIdentity = (index, item) => this.options$.identityOf(item) ?? index;
26
27
  const { chain } = Dsl.disposeWith(this);
27
28
  this.cookedOptions$ = chain(this.options$).reduceToList(options => {
28
29
  return options.length < 1 && !isNil(this.componentValue$.value) ? [this.componentValue$.value] : options;
29
- }, { dependsOn: this.componentValue$ });
30
+ }, { dependsOn: this.componentValue$ })
31
+ .identifiedWith(this.options$.identityOf);
32
+ this.cookedOptions$ = chain(this.options$)
33
+ .otherwise(chain(this.componentValue$).mapToList(v => [v]))
34
+ .identifiedWith(this.options$.identityOf);
30
35
  }
31
36
  select(item) {
32
37
  this.id$.value = this.options$.identityOf(item);
33
38
  }
34
39
  ngOnInit() {
35
40
  // NOTE: this has to be done after our parameter have been bound or we'll clobber the initial selected values with the writeRight
36
- const { chain, when } = Dsl.disposeWith(this);
37
- // TODO: I wouldn't have to do this if selectionModel.leadSelection$ was mutable...
41
+ const { chain, before, when } = Dsl.disposeWith(this);
38
42
  const lookup = chain(this.options$).indexUsing(this.options$.identityOf);
39
43
  const self = this;
40
- this.registerDisposable(new Binding(this.componentValue$, this.id$, {
41
- toLeft(currentId, currentValue) {
42
- const newValue = lookup.get(currentId); // the list is empty or we're missing form it so don't touch the real value.
44
+ const binding = this.registerDisposable(new Binding(this.componentValue$, this.id$, {
45
+ toLeft(selectedId, currentValue) {
46
+ const newValue = lookup.get(selectedId); // the list is empty or we're missing form it so don't touch the real value.
43
47
  return isNil(newValue) ? currentValue : newValue;
44
48
  },
45
49
  leftDependsOn: lookup,
46
- toRight(leftValue, currentRightValue) {
47
- return self.options$.identityOf(leftValue);
50
+ toRight(selectedValue, selectedId) {
51
+ return self.options$.identityOf(selectedValue);
48
52
  }
49
53
  })).writeRight();
54
+ // TODO: we have to do this as the options identity function can change from identity to somethign else after
55
+ // we already have an initial value. In that case the stored id will be wrong.
56
+ // Probably a reasonable solution for it be to track changes in the identity function and handle it
57
+ // at a more fundamental level. This may include checking if the function has changed... but currently
58
+ // the function change things under the hood.
59
+ const snapshotValueAndId = (value) => ({
60
+ value: value,
61
+ id: this.options$.identityOf(value)
62
+ });
63
+ let lastIdSnapshot = snapshotValueAndId(this.componentValue$.value);
64
+ console.log(lastIdSnapshot);
65
+ before(this.options$).changes(() => {
66
+ lastIdSnapshot = snapshotValueAndId(this.componentValue$.value);
67
+ console.log(lastIdSnapshot);
68
+ });
69
+ when(this.options$).changes((is, was) => {
70
+ const newIdSnapshot = snapshotValueAndId(lastIdSnapshot.value);
71
+ console.log(lastIdSnapshot, newIdSnapshot);
72
+ if (newIdSnapshot !== lastIdSnapshot.id) {
73
+ this.id$.value = this.options$.identityOf(this.componentValue$.value);
74
+ }
75
+ });
50
76
  }
51
77
  }
52
78
  SelectInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
53
- SelectInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: SelectInputComponent, selector: "aup-select-input", inputs: { options$: "options$", optionsModel: "optionsModel", options: "options", optionLabel: "optionLabel", allowNil: "allowNil", optionLabelFormat: "optionLabelFormat" }, queries: [{ propertyName: "selectedOptionTemplateRef", first: true, predicate: ["selectedOptionTemplate"], descendants: true }, { propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], descendants: true }, { propertyName: "nilOptionTemplateRef", first: true, predicate: ["nilOptionTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\" [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\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 cookedOptions$.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 cookedOptions$.value\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display: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"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i4.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }] });
79
+ SelectInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: SelectInputComponent, selector: "aup-select-input", inputs: { options$: "options$", optionsModel: "optionsModel", options: "options", optionLabel: "optionLabel", allowNil: "allowNil", optionLabelFormat: "optionLabelFormat" }, queries: [{ propertyName: "selectedOptionTemplateRef", first: true, predicate: ["selectedOptionTemplate"], descendants: true }, { propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], descendants: true }, { propertyName: "nilOptionTemplateRef", first: true, predicate: ["nilOptionTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n\n <!--\n TODO: dave has a scenario where the selected item isn't rendering that I can't reproduce so we explicity render it..\n It typically happens because the ngModel value isn't the one contained in the list - this means our source model\n identifyOf function has changed and our id$/lookup$/componentValue$ are out of sync.\n We get around this for now by explicity rendering the component value.\n Please Note: I haven't been able to reproduce this\n -->\n <mat-select-trigger *ngIf=\"!selectedOptionTemplateRef\">\n {{optionLabelFormat(componentValue$.value)}}\n </mat-select-trigger>\n\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\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 cookedOptions$.value; trackBy: trackByIdentity;let i = index\"\n [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 cookedOptions$.value\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display: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"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i4.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }] });
54
80
  __decorate([
55
81
  TrackExternal({ delegateTo: "_options$" }),
56
82
  __metadata("design:type", ListModel)
@@ -65,7 +91,7 @@ __decorate([
65
91
  ], SelectInputComponent.prototype, "options", void 0);
66
92
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SelectInputComponent, decorators: [{
67
93
  type: Component,
68
- args: [{ 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]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\" [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\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 cookedOptions$.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 cookedOptions$.value\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display: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"] }]
94
+ args: [{ 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]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n\n <!--\n TODO: dave has a scenario where the selected item isn't rendering that I can't reproduce so we explicity render it..\n It typically happens because the ngModel value isn't the one contained in the list - this means our source model\n identifyOf function has changed and our id$/lookup$/componentValue$ are out of sync.\n We get around this for now by explicity rendering the component value.\n Please Note: I haven't been able to reproduce this\n -->\n <mat-select-trigger *ngIf=\"!selectedOptionTemplateRef\">\n {{optionLabelFormat(componentValue$.value)}}\n </mat-select-trigger>\n\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\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 cookedOptions$.value; trackBy: trackByIdentity;let i = index\"\n [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 cookedOptions$.value\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display: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"] }]
69
95
  }], ctorParameters: function () { return []; }, propDecorators: { options$: [{
70
96
  type: Input
71
97
  }], optionsModel: [{
@@ -88,4 +114,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
88
114
  }], optionLabelFormat: [{
89
115
  type: Input
90
116
  }] } });
91
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0LWlucHV0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci11aS1wb3dlcnVwcy9zcmMvbGliL2NvbXBvbmVudHMvZm9ybXMvc2VsZWN0LWlucHV0L3NlbGVjdC1pbnB1dC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXItdWktcG93ZXJ1cHMvc3JjL2xpYi9jb21wb25lbnRzL2Zvcm1zL3NlbGVjdC1pbnB1dC9zZWxlY3QtaW5wdXQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBVSxXQUFXLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDbEYsT0FBTyxFQUNMLE9BQU8sRUFFUCxtQkFBbUIsRUFDbkIsR0FBRyxFQUNILFNBQVMsRUFDVCxpQkFBaUIsRUFDakIsZ0JBQWdCLEVBQ2hCLGFBQWEsRUFDZCxNQUFNLGdCQUFnQixDQUFDO0FBQ3hCLE9BQU8sRUFBQyxLQUFLLEVBQUMsTUFBTSxRQUFRLENBQUM7QUFDN0IsT0FBTyxFQUFDLDJCQUEyQixFQUFDLE1BQU0sbUNBQW1DLENBQUM7Ozs7Ozs7O0FBRTlFOzs7Ozs7R0FNRztBQU1ILE1BQU0sT0FBTyxvQkFBOEIsU0FBUSwyQkFBOEI7SUF3Qy9FO1FBQ0UsS0FBSyxF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bmVyICpuZ0lmPVwib3B0aW9uVGVtcGxhdGVSZWZcIlxuICAgICAgICAgICAgICAgICAgW25nVGVtcGxhdGVPdXRsZXRdPVwib3B0aW9uVGVtcGxhdGVSZWZcIlxuICAgICAgICAgICAgICAgICAgW25nVGVtcGxhdGVPdXRsZXRDb250ZXh0XT1cInsgJGltcGxpY2l0OiBpdGVtLCBpbmRleDogMCB9XCJcbiAgICA+XG4gICAgPC9uZy1jb250YWluZXI+XG4gIDwvZGl2PlxuPC9kaXY+XG4iXX0=
@@ -2183,34 +2183,60 @@ class SelectInputComponent extends AbstractValueInputComponent {
2183
2183
  this._options$ = new DelegatingListModel();
2184
2184
  this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
2185
2185
  this.id$ = new MutableValueModel();
2186
+ this.trackByIdentity = (index, item) => { var _a; return (_a = this.options$.identityOf(item)) !== null && _a !== void 0 ? _a : index; };
2186
2187
  const { chain } = Dsl.disposeWith(this);
2187
2188
  this.cookedOptions$ = chain(this.options$).reduceToList(options => {
2188
2189
  return options.length < 1 && !isNil(this.componentValue$.value) ? [this.componentValue$.value] : options;
2189
- }, { dependsOn: this.componentValue$ });
2190
+ }, { dependsOn: this.componentValue$ })
2191
+ .identifiedWith(this.options$.identityOf);
2192
+ this.cookedOptions$ = chain(this.options$)
2193
+ .otherwise(chain(this.componentValue$).mapToList(v => [v]))
2194
+ .identifiedWith(this.options$.identityOf);
2190
2195
  }
2191
2196
  select(item) {
2192
2197
  this.id$.value = this.options$.identityOf(item);
2193
2198
  }
2194
2199
  ngOnInit() {
2195
2200
  // NOTE: this has to be done after our parameter have been bound or we'll clobber the initial selected values with the writeRight
2196
- const { chain, when } = Dsl.disposeWith(this);
2197
- // TODO: I wouldn't have to do this if selectionModel.leadSelection$ was mutable...
2201
+ const { chain, before, when } = Dsl.disposeWith(this);
2198
2202
  const lookup = chain(this.options$).indexUsing(this.options$.identityOf);
2199
2203
  const self = this;
2200
- this.registerDisposable(new Binding(this.componentValue$, this.id$, {
2201
- toLeft(currentId, currentValue) {
2202
- const newValue = lookup.get(currentId); // the list is empty or we're missing form it so don't touch the real value.
2204
+ const binding = this.registerDisposable(new Binding(this.componentValue$, this.id$, {
2205
+ toLeft(selectedId, currentValue) {
2206
+ const newValue = lookup.get(selectedId); // the list is empty or we're missing form it so don't touch the real value.
2203
2207
  return isNil(newValue) ? currentValue : newValue;
2204
2208
  },
2205
2209
  leftDependsOn: lookup,
2206
- toRight(leftValue, currentRightValue) {
2207
- return self.options$.identityOf(leftValue);
2210
+ toRight(selectedValue, selectedId) {
2211
+ return self.options$.identityOf(selectedValue);
2208
2212
  }
2209
2213
  })).writeRight();
2214
+ // TODO: we have to do this as the options identity function can change from identity to somethign else after
2215
+ // we already have an initial value. In that case the stored id will be wrong.
2216
+ // Probably a reasonable solution for it be to track changes in the identity function and handle it
2217
+ // at a more fundamental level. This may include checking if the function has changed... but currently
2218
+ // the function change things under the hood.
2219
+ const snapshotValueAndId = (value) => ({
2220
+ value: value,
2221
+ id: this.options$.identityOf(value)
2222
+ });
2223
+ let lastIdSnapshot = snapshotValueAndId(this.componentValue$.value);
2224
+ console.log(lastIdSnapshot);
2225
+ before(this.options$).changes(() => {
2226
+ lastIdSnapshot = snapshotValueAndId(this.componentValue$.value);
2227
+ console.log(lastIdSnapshot);
2228
+ });
2229
+ when(this.options$).changes((is, was) => {
2230
+ const newIdSnapshot = snapshotValueAndId(lastIdSnapshot.value);
2231
+ console.log(lastIdSnapshot, newIdSnapshot);
2232
+ if (newIdSnapshot !== lastIdSnapshot.id) {
2233
+ this.id$.value = this.options$.identityOf(this.componentValue$.value);
2234
+ }
2235
+ });
2210
2236
  }
2211
2237
  }
2212
2238
  SelectInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2213
- SelectInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: SelectInputComponent, selector: "aup-select-input", inputs: { options$: "options$", optionsModel: "optionsModel", options: "options", optionLabel: "optionLabel", allowNil: "allowNil", optionLabelFormat: "optionLabelFormat" }, queries: [{ propertyName: "selectedOptionTemplateRef", first: true, predicate: ["selectedOptionTemplate"], descendants: true }, { propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], descendants: true }, { propertyName: "nilOptionTemplateRef", first: true, predicate: ["nilOptionTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\" [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\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 cookedOptions$.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 cookedOptions$.value\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display: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"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i4$3.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }] });
2239
+ SelectInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: SelectInputComponent, selector: "aup-select-input", inputs: { options$: "options$", optionsModel: "optionsModel", options: "options", optionLabel: "optionLabel", allowNil: "allowNil", optionLabelFormat: "optionLabelFormat" }, queries: [{ propertyName: "selectedOptionTemplateRef", first: true, predicate: ["selectedOptionTemplate"], descendants: true }, { propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], descendants: true }, { propertyName: "nilOptionTemplateRef", first: true, predicate: ["nilOptionTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n\n <!--\n TODO: dave has a scenario where the selected item isn't rendering that I can't reproduce so we explicity render it..\n It typically happens because the ngModel value isn't the one contained in the list - this means our source model\n identifyOf function has changed and our id$/lookup$/componentValue$ are out of sync.\n We get around this for now by explicity rendering the component value.\n Please Note: I haven't been able to reproduce this\n -->\n <mat-select-trigger *ngIf=\"!selectedOptionTemplateRef\">\n {{optionLabelFormat(componentValue$.value)}}\n </mat-select-trigger>\n\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\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 cookedOptions$.value; trackBy: trackByIdentity;let i = index\"\n [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 cookedOptions$.value\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display: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"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i4$3.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }] });
2214
2240
  __decorate([
2215
2241
  TrackExternal({ delegateTo: "_options$" }),
2216
2242
  __metadata("design:type", ListModel)
@@ -2225,7 +2251,7 @@ __decorate([
2225
2251
  ], SelectInputComponent.prototype, "options", void 0);
2226
2252
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SelectInputComponent, decorators: [{
2227
2253
  type: Component,
2228
- args: [{ 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]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\" [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\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 cookedOptions$.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 cookedOptions$.value\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display: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"] }]
2254
+ args: [{ 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]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n\n <!--\n TODO: dave has a scenario where the selected item isn't rendering that I can't reproduce so we explicity render it..\n It typically happens because the ngModel value isn't the one contained in the list - this means our source model\n identifyOf function has changed and our id$/lookup$/componentValue$ are out of sync.\n We get around this for now by explicity rendering the component value.\n Please Note: I haven't been able to reproduce this\n -->\n <mat-select-trigger *ngIf=\"!selectedOptionTemplateRef\">\n {{optionLabelFormat(componentValue$.value)}}\n </mat-select-trigger>\n\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\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 cookedOptions$.value; trackBy: trackByIdentity;let i = index\"\n [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 cookedOptions$.value\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display: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"] }]
2229
2255
  }], ctorParameters: function () { return []; }, propDecorators: { options$: [{
2230
2256
  type: Input
2231
2257
  }], optionsModel: [{