@coolon/angular-ui-powerups 14.36.0 → 14.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/interaction/editor/inline-string-editor.scss +6 -0
- package/esm2020/lib/components/forms/multiple-select-input/multiple-select-input.component.mjs +21 -4
- package/esm2020/lib/components/forms/select-input/select-input.component.mjs +24 -4
- package/esm2020/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.mjs +15 -9
- package/fesm2015/coolon-angular-ui-powerups.mjs +54 -11
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +54 -11
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +2 -0
- package/lib/components/forms/select-input/select-input.component.d.ts +2 -0
- package/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.d.ts +3 -2
- package/package.json +2 -2
- package/schematics/activity/index.d.ts +3 -0
- package/schematics/activity/index.js +32 -0
- package/schematics/activity/index.js.map +1 -0
- package/schematics/activity/index.spec.d.ts +1 -0
- package/schematics/activity/index.spec.js +364 -0
- package/schematics/activity/index.spec.js.map +1 -0
- package/schematics/activity/schema.d.ts +4 -0
- package/schematics/activity/schema.js +3 -0
- package/schematics/activity/schema.js.map +1 -0
- package/schematics/activity/schema.json +27 -0
- package/schematics/activity/templates/component/__name@dasherize__.component.html.template +5 -0
- package/schematics/activity/templates/component/__name@dasherize__.component.scss.template +4 -0
- package/schematics/activity/templates/component/__name@dasherize__.component.spec.ts.template +25 -0
- package/schematics/activity/templates/component/__name@dasherize__.component.ts.template +40 -0
- package/schematics/activity/templates/component/__name@dasherize__.i18n.yml.template +9 -0
- package/schematics/aup-i18n/index.d.ts +4 -0
- package/schematics/aup-i18n/index.js +86 -0
- package/schematics/aup-i18n/index.js.map +1 -0
- package/schematics/aup-i18n/schema.d.ts +3 -0
- package/schematics/aup-i18n/schema.js +3 -0
- package/schematics/aup-i18n/schema.js.map +1 -0
- package/schematics/aup-i18n/schema.json +18 -0
- package/schematics/aup-i18n/templates/app/aup.i18n.yml.template +80 -0
- package/schematics/bootstrap-app/index.d.ts +4 -0
- package/schematics/bootstrap-app/index.js +109 -0
- package/schematics/bootstrap-app/index.js.map +1 -0
- package/schematics/bootstrap-app/schema.d.ts +3 -0
- package/schematics/bootstrap-app/schema.js +3 -0
- package/schematics/bootstrap-app/schema.js.map +1 -0
- package/schematics/bootstrap-app/schema.json +18 -0
- package/schematics/bootstrap-app/templates/i18n.config.json.template +11 -0
- package/schematics/bootstrap-app/templates/src/app/app-routing.module.ts.template +23 -0
- package/schematics/bootstrap-app/templates/src/app/app.component.html.template +7 -0
- package/schematics/bootstrap-app/templates/src/app/app.component.scss.template +12 -0
- package/schematics/bootstrap-app/templates/src/app/app.component.ts.template +19 -0
- package/schematics/bootstrap-app/templates/src/app/app.module.ts.template +74 -0
- package/schematics/bootstrap-app/templates/src/app/components/components.module.ts.template +16 -0
- package/schematics/bootstrap-app/templates/src/app/i18n.ts.template +9 -0
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.eot +0 -0
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.ijmap +1 -0
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.svg +2373 -0
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.ttf +0 -0
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff +0 -0
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff2 +0 -0
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/codepoints +932 -0
- package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/material-icons.css +36 -0
- package/schematics/bootstrap-app/templates/src/index.html.template +13 -0
- package/schematics/bootstrap-app/templates/src/styles/global-variables.scss.template +13 -0
- package/schematics/bootstrap-app/templates/src/styles.scss.template +85 -0
- package/schematics/collection.json +48 -0
- package/schematics/component/index.d.ts +3 -0
- package/schematics/component/index.js +32 -0
- package/schematics/component/index.js.map +1 -0
- package/schematics/component/index.spec.d.ts +1 -0
- package/schematics/component/index.spec.js +364 -0
- package/schematics/component/index.spec.js.map +1 -0
- package/schematics/component/schema.d.ts +4 -0
- package/schematics/component/schema.js +3 -0
- package/schematics/component/schema.js.map +1 -0
- package/schematics/component/schema.json +27 -0
- package/schematics/component/templates/component/__name@dasherize__.component.html.template +1 -0
- package/schematics/component/templates/component/__name@dasherize__.component.scss.template +4 -0
- package/schematics/component/templates/component/__name@dasherize__.component.spec.ts.template +25 -0
- package/schematics/component/templates/component/__name@dasherize__.component.ts.template +23 -0
- package/schematics/component/templates/component/__name@dasherize__.i18n.yml.template +1 -0
- package/schematics/ng-add/index.d.ts +3 -0
- package/schematics/ng-add/index.js +37 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/package-util.d.ts +13 -0
- package/schematics/package-util.js +61 -0
- package/schematics/package-util.js.map +1 -0
- package/schematics/place-add/index.d.ts +3 -0
- package/schematics/place-add/index.js +37 -0
- package/schematics/place-add/index.js.map +1 -0
- package/schematics/place-add/index.spec.d.ts +1 -0
- package/schematics/place-add/index.spec.js +364 -0
- package/schematics/place-add/index.spec.js.map +1 -0
- package/schematics/place-add/schema.d.ts +4 -0
- package/schematics/place-add/schema.js +3 -0
- package/schematics/place-add/schema.js.map +1 -0
- package/schematics/place-add/schema.json +27 -0
- package/schematics/place-add/templates/component/__name@dasherize__.component.html.template +1 -0
- package/schematics/place-add/templates/component/__name@dasherize__.component.scss.template +5 -0
- package/schematics/place-add/templates/component/__name@dasherize__.component.spec.ts.template +25 -0
- package/schematics/place-add/templates/component/__name@dasherize__.component.ts.template +33 -0
- package/schematics/place-add/templates/component/__name@dasherize__.i18n.yml.template +5 -0
- package/schematics/place-bootstrap/index.d.ts +3 -0
- package/schematics/place-bootstrap/index.js +21 -0
- package/schematics/place-bootstrap/index.js.map +1 -0
- package/schematics/place-bootstrap/schema.d.ts +4 -0
- package/schematics/place-bootstrap/schema.js +3 -0
- package/schematics/place-bootstrap/schema.js.map +1 -0
- package/schematics/place-bootstrap/schema.json +28 -0
- package/schematics/place-bootstrap/templates/__name@dasherize__/place-routes.ts.template +3 -0
- package/schematics/place-bootstrap/templates/__name@dasherize__/places.module.ts.template +16 -0
- package/schematics/place-routes/index.d.ts +3 -0
- package/schematics/place-routes/index.js +24 -0
- package/schematics/place-routes/index.js.map +1 -0
- package/schematics/place-routes/place-builder.d.ts +18 -0
- package/schematics/place-routes/place-builder.js +123 -0
- package/schematics/place-routes/place-builder.js.map +1 -0
- package/schematics/place-routes/place-class-scanner.d.ts +47 -0
- package/schematics/place-routes/place-class-scanner.js +223 -0
- package/schematics/place-routes/place-class-scanner.js.map +1 -0
- package/schematics/place-routes/place-def.d.ts +62 -0
- package/schematics/place-routes/place-def.js +195 -0
- package/schematics/place-routes/place-def.js.map +1 -0
- package/schematics/place-routes/schema.d.ts +4 -0
- package/schematics/place-routes/schema.js +3 -0
- package/schematics/place-routes/schema.js.map +1 -0
- package/schematics/place-routes/schema.json +25 -0
- package/schematics/place-routes/templates/place-routes.ts.template +14 -0
- package/schematics/utils/build-context.d.ts +73 -0
- package/schematics/utils/build-context.js +184 -0
- package/schematics/utils/build-context.js.map +1 -0
- package/schematics/utils/decorators/decorated-class.d.ts +13 -0
- package/schematics/utils/decorators/decorated-class.js +28 -0
- package/schematics/utils/decorators/decorated-class.js.map +1 -0
- package/schematics/utils/decorators/decorated-source-file.d.ts +15 -0
- package/schematics/utils/decorators/decorated-source-file.js +27 -0
- package/schematics/utils/decorators/decorated-source-file.js.map +1 -0
- package/schematics/utils/import-def.d.ts +30 -0
- package/schematics/utils/import-def.js +97 -0
- package/schematics/utils/import-def.js.map +1 -0
- package/schematics/utils/method-scanner.d.ts +16 -0
- package/schematics/utils/method-scanner.js +70 -0
- package/schematics/utils/method-scanner.js.map +1 -0
- package/schematics/utils/mixin.d.ts +11 -0
- package/schematics/utils/mixin.js +27 -0
- package/schematics/utils/mixin.js.map +1 -0
- package/schematics/utils/parameter-def.d.ts +5 -0
- package/schematics/utils/parameter-def.js +3 -0
- package/schematics/utils/parameter-def.js.map +1 -0
- package/schematics/utils/path-helper.d.ts +14 -0
- package/schematics/utils/path-helper.js +30 -0
- package/schematics/utils/path-helper.js.map +1 -0
- package/schematics/utils/schematic-tree-file-system.d.ts +30 -0
- package/schematics/utils/schematic-tree-file-system.js +113 -0
- package/schematics/utils/schematic-tree-file-system.js.map +1 -0
- package/schematics/utils/source-file-scanner.d.ts +14 -0
- package/schematics/utils/source-file-scanner.js +89 -0
- package/schematics/utils/source-file-scanner.js.map +1 -0
- package/schematics/utils/source-file-utilities.d.ts +6 -0
- package/schematics/utils/source-file-utilities.js +35 -0
- package/schematics/utils/source-file-utilities.js.map +1 -0
- package/schematics/utils/stringy.d.ts +15 -0
- package/schematics/utils/stringy.js +50 -0
- package/schematics/utils/stringy.js.map +1 -0
- package/schematics/utils/template-utilities.d.ts +2 -0
- package/schematics/utils/template-utilities.js +24 -0
- package/schematics/utils/template-utilities.js.map +1 -0
- package/schematics/utils/workspace.d.ts +15 -0
- package/schematics/utils/workspace.js +59 -0
- package/schematics/utils/workspace.js.map +1 -0
|
@@ -2048,12 +2048,29 @@ class MultipleSelectInputComponent extends AbstractListInputComponent {
|
|
|
2048
2048
|
super();
|
|
2049
2049
|
this._options$ = new DelegatingListModel();
|
|
2050
2050
|
this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
|
|
2051
|
+
this.ids$ = new MutableListModel();
|
|
2052
|
+
}
|
|
2053
|
+
selectAll(items) {
|
|
2054
|
+
this.ids$.value = items.map(item => this.options$.identityOf(item));
|
|
2051
2055
|
}
|
|
2052
2056
|
ngOnInit() {
|
|
2057
|
+
// NOTE: this has to be done after our parameter have been bound or we'll clobber the initial selected values with the writeRight
|
|
2058
|
+
const { chain } = Dsl.disposeWith(this);
|
|
2059
|
+
const lookup = chain(this.options$).indexUsing(this.options$.identityOf);
|
|
2060
|
+
const self = this;
|
|
2061
|
+
this.registerDisposable(new Binding(this.componentList$, this.ids$, {
|
|
2062
|
+
toLeft(rightValue, currentLeftValue) {
|
|
2063
|
+
return rightValue ? rightValue.map(it => lookup.get(it)) : [];
|
|
2064
|
+
},
|
|
2065
|
+
leftDependsOn: lookup,
|
|
2066
|
+
toRight(leftValue, currentRightValue) {
|
|
2067
|
+
return leftValue ? leftValue.map(it => self.options$.identityOf(it)) : [];
|
|
2068
|
+
}
|
|
2069
|
+
})).writeRight();
|
|
2053
2070
|
}
|
|
2054
2071
|
}
|
|
2055
2072
|
MultipleSelectInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MultipleSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2056
|
-
MultipleSelectInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: MultipleSelectInputComponent, selector: "aup-multiple-select-input", inputs: { options$: "options$", optionsModel: "optionsModel", options: "options", optionLabel: "optionLabel", optionLabelFormat: "optionLabelFormat" }, queries: [{ propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], 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 multiple\n [
|
|
2073
|
+
MultipleSelectInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: MultipleSelectInputComponent, selector: "aup-multiple-select-input", inputs: { options$: "options$", optionsModel: "optionsModel", options: "options", optionLabel: "optionLabel", optionLabelFormat: "optionLabelFormat" }, queries: [{ propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], 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 multiple\n [ngModel]=\"componentList$.value\"\n (ngModelChange)=\"selectAll($event)\"\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 options$.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: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"], 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: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }] });
|
|
2057
2074
|
__decorate([
|
|
2058
2075
|
TrackExternal({ delegateTo: "_options$" }),
|
|
2059
2076
|
__metadata("design:type", ListModel)
|
|
@@ -2068,7 +2085,7 @@ __decorate([
|
|
|
2068
2085
|
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
2069
2086
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MultipleSelectInputComponent, decorators: [{
|
|
2070
2087
|
type: Component,
|
|
2071
|
-
args: [{ 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 [
|
|
2088
|
+
args: [{ 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]=\"componentList$.value\"\n (ngModelChange)=\"selectAll($event)\"\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 options$.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: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"] }]
|
|
2072
2089
|
}], ctorParameters: function () { return []; }, propDecorators: { options$: [{
|
|
2073
2090
|
type: Input
|
|
2074
2091
|
}], optionsModel: [{
|
|
@@ -2136,12 +2153,32 @@ class SelectInputComponent extends AbstractValueInputComponent {
|
|
|
2136
2153
|
super();
|
|
2137
2154
|
this._options$ = new DelegatingListModel();
|
|
2138
2155
|
this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
|
|
2156
|
+
this.id$ = new MutableValueModel();
|
|
2157
|
+
}
|
|
2158
|
+
select(item) {
|
|
2159
|
+
this.id$.value = this.options$.identityOf(item);
|
|
2139
2160
|
}
|
|
2140
2161
|
ngOnInit() {
|
|
2162
|
+
// NOTE: this has to be done after our parameter have been bound or we'll clobber the initial selected values with the writeRight
|
|
2163
|
+
const { chain, when } = Dsl.disposeWith(this);
|
|
2164
|
+
// TODO: I wouldn't have to do this if selectionModel.leadSelection$ was mutable...
|
|
2165
|
+
const lookup = chain(this.options$).indexUsing(this.options$.identityOf);
|
|
2166
|
+
const self = this;
|
|
2167
|
+
this.registerDisposable(new Binding(this.componentValue$, this.id$, {
|
|
2168
|
+
toLeft(rightValue, currentLeftValue) {
|
|
2169
|
+
const value = lookup.get(rightValue);
|
|
2170
|
+
console.log("currentValue", { id: rightValue, value });
|
|
2171
|
+
return value;
|
|
2172
|
+
},
|
|
2173
|
+
leftDependsOn: lookup,
|
|
2174
|
+
toRight(leftValue, currentRightValue) {
|
|
2175
|
+
return self.options$.identityOf(leftValue);
|
|
2176
|
+
}
|
|
2177
|
+
})).writeRight();
|
|
2141
2178
|
}
|
|
2142
2179
|
}
|
|
2143
2180
|
SelectInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2144
|
-
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 [
|
|
2181
|
+
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 options$.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\">\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"] }] });
|
|
2145
2182
|
__decorate([
|
|
2146
2183
|
TrackExternal({ delegateTo: "_options$" }),
|
|
2147
2184
|
__metadata("design:type", ListModel)
|
|
@@ -2156,7 +2193,7 @@ __decorate([
|
|
|
2156
2193
|
], SelectInputComponent.prototype, "options", void 0);
|
|
2157
2194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SelectInputComponent, decorators: [{
|
|
2158
2195
|
type: Component,
|
|
2159
|
-
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 [
|
|
2196
|
+
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 options$.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\">\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"] }]
|
|
2160
2197
|
}], ctorParameters: function () { return []; }, propDecorators: { options$: [{
|
|
2161
2198
|
type: Input
|
|
2162
2199
|
}], optionsModel: [{
|
|
@@ -9422,7 +9459,7 @@ TrackExternal.oneTimeBinding(InlineEditorModel);
|
|
|
9422
9459
|
class InlineStringEditorComponent extends DisposableComponent {
|
|
9423
9460
|
constructor(interactionService) {
|
|
9424
9461
|
super();
|
|
9425
|
-
this.editingEnabled = this.registerDisposable(new DelegatingValueModel());
|
|
9462
|
+
this.editingEnabled$ = this.registerDisposable(new DelegatingValueModel());
|
|
9426
9463
|
const { chain, when, valueOf } = Dsl.disposeWith(this);
|
|
9427
9464
|
const modalIC = interactionService.createModalInteractionContextDisposedWith(this);
|
|
9428
9465
|
const resolvedFacesModel = chain(this.facesModel).map(userFaces => {
|
|
@@ -9446,7 +9483,7 @@ class InlineStringEditorComponent extends DisposableComponent {
|
|
|
9446
9483
|
finally {
|
|
9447
9484
|
this.editorModel.editing.value = false;
|
|
9448
9485
|
}
|
|
9449
|
-
}).enableWhile(this.editingEnabled);
|
|
9486
|
+
}).enableWhile(this.editingEnabled$);
|
|
9450
9487
|
this.onDispose(() => this.cancelEdit());
|
|
9451
9488
|
}
|
|
9452
9489
|
ngOnInit() {
|
|
@@ -9456,12 +9493,12 @@ class InlineStringEditorComponent extends DisposableComponent {
|
|
|
9456
9493
|
if (!this.editorModel) {
|
|
9457
9494
|
lang$1.illegalState('editorModel is required');
|
|
9458
9495
|
}
|
|
9459
|
-
this.editingEnabled
|
|
9496
|
+
this.editingEnabled$.setDelegate(this.editorModel.editingEnabled);
|
|
9460
9497
|
when(this.editorModel.editing).becomesTruthy(() => {
|
|
9461
9498
|
this.editCommand.execute();
|
|
9462
9499
|
}, { asLongAs: this.editCommand.enabled$ });
|
|
9463
9500
|
when(this.editorModel.editing).becomesFalsey(() => this.cancelEdit());
|
|
9464
|
-
this.empty = valueOf.any(chain.stringValue(this.editorModel.valueModel).isBlank()
|
|
9501
|
+
this.empty$ = valueOf.any(chain.stringValue(this.editorModel.valueModel).isBlank()
|
|
9465
9502
|
// deviceDescription.isNil()
|
|
9466
9503
|
).areTruthy();
|
|
9467
9504
|
this.displayValue = chain(this.editorModel.valueModel).map(v => {
|
|
@@ -9497,11 +9534,14 @@ class InlineStringEditorComponent extends DisposableComponent {
|
|
|
9497
9534
|
return this.interactionContext.isActive();
|
|
9498
9535
|
}
|
|
9499
9536
|
isEmpty() {
|
|
9500
|
-
return this.empty
|
|
9537
|
+
return this.empty$.value;
|
|
9538
|
+
}
|
|
9539
|
+
get isDisabled() {
|
|
9540
|
+
return !this.editingEnabled$.value;
|
|
9501
9541
|
}
|
|
9502
9542
|
}
|
|
9503
9543
|
InlineStringEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: InlineStringEditorComponent, deps: [{ token: InteractionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9504
|
-
InlineStringEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: InlineStringEditorComponent, selector: "aup-inline-string-editor", inputs: { editorModel: "editorModel", facesModel: "facesModel", faces: "faces", label: "label", placeHolder: "placeHolder", placeHolderModel: "placeHolderModel" }, viewQueries: [{ propertyName: "interactionContext", first: true, predicate: InPlaceInteractionContextComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"container\" *ngIf=\"!editorModel.isEditing()\">\n <mat-form-field appearance=\"standard\" floatLabel=\"always\" (click)=\"startEdit()\"\n [class.editable]=\"editingEnabled
|
|
9544
|
+
InlineStringEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: InlineStringEditorComponent, selector: "aup-inline-string-editor", inputs: { editorModel: "editorModel", facesModel: "facesModel", faces: "faces", label: "label", placeHolder: "placeHolder", placeHolderModel: "placeHolderModel" }, host: { properties: { "class.disabled": "this.isDisabled" } }, viewQueries: [{ propertyName: "interactionContext", first: true, predicate: InPlaceInteractionContextComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"container\" *ngIf=\"!editorModel.isEditing()\">\n <mat-form-field appearance=\"standard\" floatLabel=\"always\" (click)=\"startEdit()\"\n [class.editable]=\"editingEnabled$.value\" [class.empty]=\"isEmpty()\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeHolder}}\"\n [ngModel]=\"editorModel.valueModel.value\"\n [disabled]=\"true\"\n >\n <!-- <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>-->\n <!-- <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>-->\n <!-- <aup-icon *ngIf=\"iconPrefix\" matPrefix [icon]=\"iconPrefix\"></aup-icon>-->\n </mat-form-field>\n <aup-command *ngIf=\"editCommand.enabled$.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n</div>\n<aup-in-place-interaction-context [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "faceModel", "face", "busyFaceModel", "busyFace", "alignFace"] }, { kind: "directive", type: i2$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: InPlaceInteractionContextComponent, selector: "aup-in-place-interaction-context", inputs: ["animateFirstActivity", "syncWithRoutes"] }] });
|
|
9505
9545
|
__decorate([
|
|
9506
9546
|
TrackExternal(),
|
|
9507
9547
|
__metadata("design:type", InlineEditorModel)
|
|
@@ -9524,7 +9564,7 @@ __decorate([
|
|
|
9524
9564
|
], InlineStringEditorComponent.prototype, "placeHolderModel", void 0);
|
|
9525
9565
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: InlineStringEditorComponent, decorators: [{
|
|
9526
9566
|
type: Component,
|
|
9527
|
-
args: [{ selector: 'aup-inline-string-editor', template: "<div class=\"container\" *ngIf=\"!editorModel.isEditing()\">\n <mat-form-field appearance=\"standard\" floatLabel=\"always\" (click)=\"startEdit()\"\n [class.editable]=\"editingEnabled
|
|
9567
|
+
args: [{ selector: 'aup-inline-string-editor', template: "<div class=\"container\" *ngIf=\"!editorModel.isEditing()\">\n <mat-form-field appearance=\"standard\" floatLabel=\"always\" (click)=\"startEdit()\"\n [class.editable]=\"editingEnabled$.value\" [class.empty]=\"isEmpty()\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeHolder}}\"\n [ngModel]=\"editorModel.valueModel.value\"\n [disabled]=\"true\"\n >\n <!-- <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>-->\n <!-- <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>-->\n <!-- <aup-icon *ngIf=\"iconPrefix\" matPrefix [icon]=\"iconPrefix\"></aup-icon>-->\n </mat-form-field>\n <aup-command *ngIf=\"editCommand.enabled$.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n</div>\n<aup-in-place-interaction-context [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n" }]
|
|
9528
9568
|
}], ctorParameters: function () { return [{ type: InteractionService }]; }, propDecorators: { editorModel: [{
|
|
9529
9569
|
type: Input
|
|
9530
9570
|
}], facesModel: [{
|
|
@@ -9540,6 +9580,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
9540
9580
|
type: Input
|
|
9541
9581
|
}], placeHolderModel: [{
|
|
9542
9582
|
type: Input
|
|
9583
|
+
}], isDisabled: [{
|
|
9584
|
+
type: HostBinding,
|
|
9585
|
+
args: ["class.disabled"]
|
|
9543
9586
|
}] } });
|
|
9544
9587
|
(function (InlineStringEditorComponent) {
|
|
9545
9588
|
InlineStringEditorComponent.DEFAULT_FACES = {
|