@coolon/angular-ui-powerups 0.0.129 → 0.0.133
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/bundles/coolon-angular-ui-powerups.umd.js +48 -8
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/components.module.js +5 -1
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js +11 -2
- package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.js +32 -2
- package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
- package/esm5/lib/components/components.module.js +5 -1
- package/esm5/lib/components/components.module.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/forms/select-input/select-input.component.js +11 -2
- package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/string-input/string-input.component.js +33 -3
- package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +48 -8
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +50 -9
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/select-input/select-input.component.d.ts +4 -1
- package/lib/components/forms/string-input/string-input.component.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
2
|
-
import { Directive, ElementRef, Inject, Input, HostListener, NgZone, NgModule, EventEmitter, Output, Component, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, Injectable, ɵɵdefineInjectable, ɵɵinject, Optional, SkipSelf, HostBinding } from '@angular/core';
|
|
2
|
+
import { Directive, ElementRef, Inject, Input, HostListener, NgZone, NgModule, EventEmitter, Output, Component, ContentChild, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, Injectable, ɵɵdefineInjectable, ɵɵinject, Optional, SkipSelf, HostBinding } from '@angular/core';
|
|
3
3
|
import { FormsModule } from '@angular/forms';
|
|
4
|
-
import { MatInputModule, MatFormFieldModule, MatSelectModule, MatButtonModule, MatDialogModule, MatTabsModule as MatTabsModule$1, MatProgressSpinnerModule, MatDialog } from '@angular/material';
|
|
4
|
+
import { MatInputModule, MatFormFieldModule, MatSelectModule, MatButtonModule as MatButtonModule$1, MatDialogModule, MatTabsModule as MatTabsModule$1, MatProgressSpinnerModule, MatDialog } from '@angular/material';
|
|
5
5
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
8
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
7
9
|
import { __extends, __decorate, __metadata, __awaiter, __generator, __spread, __assign } from 'tslib';
|
|
8
|
-
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, Deferred, Trace, MutableListModel, MutableValueModel, Guard, DebugContext, Binding,
|
|
10
|
+
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, Command, StoreInValueModel, Deferred, Trace, MutableListModel, MutableValueModel, Guard, DebugContext, Binding, ValueHolder } from '@coolon/pectin';
|
|
9
11
|
import { PortalModule } from '@angular/cdk/portal';
|
|
10
12
|
import { RouterModule, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel } from '@angular/router';
|
|
11
13
|
import { assert as assert$1, lang as lang$1, Opts, Klass } from '@coolon/typescript-utilities';
|
|
12
14
|
import ___default, { isEqual, isNil } from 'lodash';
|
|
13
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
14
15
|
import { MatListModule } from '@angular/material/list';
|
|
15
16
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
17
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
@@ -789,7 +790,7 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
789
790
|
SelectInputComponent.decorators = [
|
|
790
791
|
{ type: Component, args: [{
|
|
791
792
|
selector: 'aup-select-input',
|
|
792
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of optionsModel.value\" [value]=\"option\">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
793
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
793
794
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
794
795
|
}] }
|
|
795
796
|
];
|
|
@@ -799,6 +800,9 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
799
800
|
optionsModel: [{ type: Input }],
|
|
800
801
|
options: [{ type: Input }],
|
|
801
802
|
optionLabel: [{ type: Input }],
|
|
803
|
+
allowNil: [{ type: Input }],
|
|
804
|
+
optionTemplateRef: [{ type: ContentChild, args: ["optionTemplate", { static: false },] }],
|
|
805
|
+
nilOptionTemplateRef: [{ type: ContentChild, args: ["nilOptionTemplate", { static: false },] }],
|
|
802
806
|
optionLabelFormat: [{ type: Input }]
|
|
803
807
|
};
|
|
804
808
|
__decorate([
|
|
@@ -819,6 +823,12 @@ if (false) {
|
|
|
819
823
|
/** @type {?} */
|
|
820
824
|
SelectInputComponent.prototype.optionLabel;
|
|
821
825
|
/** @type {?} */
|
|
826
|
+
SelectInputComponent.prototype.allowNil;
|
|
827
|
+
/** @type {?} */
|
|
828
|
+
SelectInputComponent.prototype.optionTemplateRef;
|
|
829
|
+
/** @type {?} */
|
|
830
|
+
SelectInputComponent.prototype.nilOptionTemplateRef;
|
|
831
|
+
/** @type {?} */
|
|
822
832
|
SelectInputComponent.prototype.optionLabelFormat;
|
|
823
833
|
}
|
|
824
834
|
|
|
@@ -829,7 +839,16 @@ if (false) {
|
|
|
829
839
|
var StringInputComponent = /** @class */ (function (_super) {
|
|
830
840
|
__extends(StringInputComponent, _super);
|
|
831
841
|
function StringInputComponent() {
|
|
832
|
-
|
|
842
|
+
var _this = _super.call(this) || this;
|
|
843
|
+
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
844
|
+
_this.clearCommand = Command.create((/**
|
|
845
|
+
* @return {?}
|
|
846
|
+
*/
|
|
847
|
+
function () {
|
|
848
|
+
_this.valueModel.value = null;
|
|
849
|
+
}));
|
|
850
|
+
_this.clearCommand.disableWhile(chain(_this.valueModel).isNil());
|
|
851
|
+
return _this;
|
|
833
852
|
}
|
|
834
853
|
/**
|
|
835
854
|
* @return {?}
|
|
@@ -842,14 +861,34 @@ var StringInputComponent = /** @class */ (function (_super) {
|
|
|
842
861
|
StringInputComponent.decorators = [
|
|
843
862
|
{ type: Component, args: [{
|
|
844
863
|
selector: 'aup-string-input',
|
|
845
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
864
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"allowClear && clearCommand.enabled.value\" [pectinCommand]=\"clearCommand\">\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n\n",
|
|
846
865
|
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
|
|
847
866
|
}] }
|
|
848
867
|
];
|
|
849
868
|
/** @nocollapse */
|
|
850
869
|
StringInputComponent.ctorParameters = function () { return []; };
|
|
870
|
+
StringInputComponent.propDecorators = {
|
|
871
|
+
allowClearModel: [{ type: Input }],
|
|
872
|
+
allowClear: [{ type: Input }]
|
|
873
|
+
};
|
|
874
|
+
__decorate([
|
|
875
|
+
UseDelegate({ defaultValue: false }),
|
|
876
|
+
__metadata("design:type", ValueModel)
|
|
877
|
+
], StringInputComponent.prototype, "allowClearModel", void 0);
|
|
878
|
+
__decorate([
|
|
879
|
+
StoreInValueModel('allowClearModel'),
|
|
880
|
+
__metadata("design:type", Boolean)
|
|
881
|
+
], StringInputComponent.prototype, "allowClear", void 0);
|
|
851
882
|
return StringInputComponent;
|
|
852
883
|
}(AbstractInputComponent));
|
|
884
|
+
if (false) {
|
|
885
|
+
/** @type {?} */
|
|
886
|
+
StringInputComponent.prototype.allowClearModel;
|
|
887
|
+
/** @type {?} */
|
|
888
|
+
StringInputComponent.prototype.allowClear;
|
|
889
|
+
/** @type {?} */
|
|
890
|
+
StringInputComponent.prototype.clearCommand;
|
|
891
|
+
}
|
|
853
892
|
|
|
854
893
|
/**
|
|
855
894
|
* @fileoverview added by tsickle
|
|
@@ -894,7 +933,9 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
894
933
|
MatFormFieldModule,
|
|
895
934
|
MatSelectModule,
|
|
896
935
|
MatTabsModule,
|
|
897
|
-
DirectivesModule
|
|
936
|
+
DirectivesModule,
|
|
937
|
+
MatIconModule,
|
|
938
|
+
MatButtonModule
|
|
898
939
|
],
|
|
899
940
|
exports: [
|
|
900
941
|
NumberInputComponent,
|
|
@@ -2823,7 +2864,7 @@ var InteractionModule = /** @class */ (function () {
|
|
|
2823
2864
|
{ type: NgModule, args: [{
|
|
2824
2865
|
imports: [
|
|
2825
2866
|
CommonModule,
|
|
2826
|
-
MatButtonModule,
|
|
2867
|
+
MatButtonModule$1,
|
|
2827
2868
|
MatDialogModule,
|
|
2828
2869
|
MatTabsModule$1,
|
|
2829
2870
|
PortalModule,
|