@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
|
@@ -2075,12 +2075,29 @@ class MultipleSelectInputComponent extends AbstractListInputComponent {
|
|
|
2075
2075
|
super();
|
|
2076
2076
|
this._options$ = new DelegatingListModel();
|
|
2077
2077
|
this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
|
|
2078
|
+
this.ids$ = new MutableListModel();
|
|
2079
|
+
}
|
|
2080
|
+
selectAll(items) {
|
|
2081
|
+
this.ids$.value = items.map(item => this.options$.identityOf(item));
|
|
2078
2082
|
}
|
|
2079
2083
|
ngOnInit() {
|
|
2084
|
+
// NOTE: this has to be done after our parameter have been bound or we'll clobber the initial selected values with the writeRight
|
|
2085
|
+
const { chain } = Dsl.disposeWith(this);
|
|
2086
|
+
const lookup = chain(this.options$).indexUsing(this.options$.identityOf);
|
|
2087
|
+
const self = this;
|
|
2088
|
+
this.registerDisposable(new Binding(this.componentList$, this.ids$, {
|
|
2089
|
+
toLeft(rightValue, currentLeftValue) {
|
|
2090
|
+
return rightValue ? rightValue.map(it => lookup.get(it)) : [];
|
|
2091
|
+
},
|
|
2092
|
+
leftDependsOn: lookup,
|
|
2093
|
+
toRight(leftValue, currentRightValue) {
|
|
2094
|
+
return leftValue ? leftValue.map(it => self.options$.identityOf(it)) : [];
|
|
2095
|
+
}
|
|
2096
|
+
})).writeRight();
|
|
2080
2097
|
}
|
|
2081
2098
|
}
|
|
2082
2099
|
MultipleSelectInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MultipleSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2083
|
-
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 [
|
|
2100
|
+
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"] }] });
|
|
2084
2101
|
__decorate([
|
|
2085
2102
|
TrackExternal({ delegateTo: "_options$" }),
|
|
2086
2103
|
__metadata("design:type", ListModel)
|
|
@@ -2095,7 +2112,7 @@ __decorate([
|
|
|
2095
2112
|
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
2096
2113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MultipleSelectInputComponent, decorators: [{
|
|
2097
2114
|
type: Component,
|
|
2098
|
-
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 [
|
|
2115
|
+
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"] }]
|
|
2099
2116
|
}], ctorParameters: function () { return []; }, propDecorators: { options$: [{
|
|
2100
2117
|
type: Input
|
|
2101
2118
|
}], optionsModel: [{
|
|
@@ -2163,12 +2180,32 @@ class SelectInputComponent extends AbstractValueInputComponent {
|
|
|
2163
2180
|
super();
|
|
2164
2181
|
this._options$ = new DelegatingListModel();
|
|
2165
2182
|
this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
|
|
2183
|
+
this.id$ = new MutableValueModel();
|
|
2184
|
+
}
|
|
2185
|
+
select(item) {
|
|
2186
|
+
this.id$.value = this.options$.identityOf(item);
|
|
2166
2187
|
}
|
|
2167
2188
|
ngOnInit() {
|
|
2189
|
+
// NOTE: this has to be done after our parameter have been bound or we'll clobber the initial selected values with the writeRight
|
|
2190
|
+
const { chain, when } = Dsl.disposeWith(this);
|
|
2191
|
+
// TODO: I wouldn't have to do this if selectionModel.leadSelection$ was mutable...
|
|
2192
|
+
const lookup = chain(this.options$).indexUsing(this.options$.identityOf);
|
|
2193
|
+
const self = this;
|
|
2194
|
+
this.registerDisposable(new Binding(this.componentValue$, this.id$, {
|
|
2195
|
+
toLeft(rightValue, currentLeftValue) {
|
|
2196
|
+
const value = lookup.get(rightValue);
|
|
2197
|
+
console.log("currentValue", { id: rightValue, value });
|
|
2198
|
+
return value;
|
|
2199
|
+
},
|
|
2200
|
+
leftDependsOn: lookup,
|
|
2201
|
+
toRight(leftValue, currentRightValue) {
|
|
2202
|
+
return self.options$.identityOf(leftValue);
|
|
2203
|
+
}
|
|
2204
|
+
})).writeRight();
|
|
2168
2205
|
}
|
|
2169
2206
|
}
|
|
2170
2207
|
SelectInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2171
|
-
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 [
|
|
2208
|
+
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"] }] });
|
|
2172
2209
|
__decorate([
|
|
2173
2210
|
TrackExternal({ delegateTo: "_options$" }),
|
|
2174
2211
|
__metadata("design:type", ListModel)
|
|
@@ -2183,7 +2220,7 @@ __decorate([
|
|
|
2183
2220
|
], SelectInputComponent.prototype, "options", void 0);
|
|
2184
2221
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: SelectInputComponent, decorators: [{
|
|
2185
2222
|
type: Component,
|
|
2186
|
-
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 [
|
|
2223
|
+
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"] }]
|
|
2187
2224
|
}], ctorParameters: function () { return []; }, propDecorators: { options$: [{
|
|
2188
2225
|
type: Input
|
|
2189
2226
|
}], optionsModel: [{
|
|
@@ -9536,7 +9573,7 @@ TrackExternal.oneTimeBinding(InlineEditorModel);
|
|
|
9536
9573
|
class InlineStringEditorComponent extends DisposableComponent {
|
|
9537
9574
|
constructor(interactionService) {
|
|
9538
9575
|
super();
|
|
9539
|
-
this.editingEnabled = this.registerDisposable(new DelegatingValueModel());
|
|
9576
|
+
this.editingEnabled$ = this.registerDisposable(new DelegatingValueModel());
|
|
9540
9577
|
const { chain, when, valueOf } = Dsl.disposeWith(this);
|
|
9541
9578
|
const modalIC = interactionService.createModalInteractionContextDisposedWith(this);
|
|
9542
9579
|
const resolvedFacesModel = chain(this.facesModel).map(userFaces => {
|
|
@@ -9557,7 +9594,7 @@ class InlineStringEditorComponent extends DisposableComponent {
|
|
|
9557
9594
|
finally {
|
|
9558
9595
|
this.editorModel.editing.value = false;
|
|
9559
9596
|
}
|
|
9560
|
-
})).enableWhile(this.editingEnabled);
|
|
9597
|
+
})).enableWhile(this.editingEnabled$);
|
|
9561
9598
|
this.onDispose(() => this.cancelEdit());
|
|
9562
9599
|
}
|
|
9563
9600
|
ngOnInit() {
|
|
@@ -9567,12 +9604,12 @@ class InlineStringEditorComponent extends DisposableComponent {
|
|
|
9567
9604
|
if (!this.editorModel) {
|
|
9568
9605
|
lang$1.illegalState('editorModel is required');
|
|
9569
9606
|
}
|
|
9570
|
-
this.editingEnabled
|
|
9607
|
+
this.editingEnabled$.setDelegate(this.editorModel.editingEnabled);
|
|
9571
9608
|
when(this.editorModel.editing).becomesTruthy(() => {
|
|
9572
9609
|
this.editCommand.execute();
|
|
9573
9610
|
}, { asLongAs: this.editCommand.enabled$ });
|
|
9574
9611
|
when(this.editorModel.editing).becomesFalsey(() => this.cancelEdit());
|
|
9575
|
-
this.empty = valueOf.any(chain.stringValue(this.editorModel.valueModel).isBlank()
|
|
9612
|
+
this.empty$ = valueOf.any(chain.stringValue(this.editorModel.valueModel).isBlank()
|
|
9576
9613
|
// deviceDescription.isNil()
|
|
9577
9614
|
).areTruthy();
|
|
9578
9615
|
this.displayValue = chain(this.editorModel.valueModel).map(v => {
|
|
@@ -9610,11 +9647,14 @@ class InlineStringEditorComponent extends DisposableComponent {
|
|
|
9610
9647
|
return this.interactionContext.isActive();
|
|
9611
9648
|
}
|
|
9612
9649
|
isEmpty() {
|
|
9613
|
-
return this.empty
|
|
9650
|
+
return this.empty$.value;
|
|
9651
|
+
}
|
|
9652
|
+
get isDisabled() {
|
|
9653
|
+
return !this.editingEnabled$.value;
|
|
9614
9654
|
}
|
|
9615
9655
|
}
|
|
9616
9656
|
InlineStringEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: InlineStringEditorComponent, deps: [{ token: InteractionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9617
|
-
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
|
|
9657
|
+
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"] }] });
|
|
9618
9658
|
__decorate([
|
|
9619
9659
|
TrackExternal(),
|
|
9620
9660
|
__metadata("design:type", InlineEditorModel)
|
|
@@ -9637,7 +9677,7 @@ __decorate([
|
|
|
9637
9677
|
], InlineStringEditorComponent.prototype, "placeHolderModel", void 0);
|
|
9638
9678
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: InlineStringEditorComponent, decorators: [{
|
|
9639
9679
|
type: Component,
|
|
9640
|
-
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
|
|
9680
|
+
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" }]
|
|
9641
9681
|
}], ctorParameters: function () { return [{ type: InteractionService }]; }, propDecorators: { editorModel: [{
|
|
9642
9682
|
type: Input
|
|
9643
9683
|
}], facesModel: [{
|
|
@@ -9653,6 +9693,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
9653
9693
|
type: Input
|
|
9654
9694
|
}], placeHolderModel: [{
|
|
9655
9695
|
type: Input
|
|
9696
|
+
}], isDisabled: [{
|
|
9697
|
+
type: HostBinding,
|
|
9698
|
+
args: ["class.disabled"]
|
|
9656
9699
|
}] } });
|
|
9657
9700
|
(function (InlineStringEditorComponent) {
|
|
9658
9701
|
InlineStringEditorComponent.DEFAULT_FACES = {
|