@coolon/angular-ui-powerups 0.0.130 → 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.
Files changed (23) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +38 -7
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  5. package/coolon-angular-ui-powerups.metadata.json +1 -1
  6. package/esm2015/lib/components/components.module.js +5 -1
  7. package/esm2015/lib/components/components.module.js.map +1 -1
  8. package/esm2015/lib/components/components.module.metadata.json +1 -1
  9. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  10. package/esm2015/lib/components/forms/string-input/string-input.component.js +32 -2
  11. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  12. package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
  13. package/esm5/lib/components/components.module.js +5 -1
  14. package/esm5/lib/components/components.module.js.map +1 -1
  15. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  16. package/esm5/lib/components/forms/string-input/string-input.component.js +33 -3
  17. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  18. package/fesm2015/coolon-angular-ui-powerups.js +37 -6
  19. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  20. package/fesm5/coolon-angular-ui-powerups.js +39 -7
  21. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  22. package/lib/components/forms/string-input/string-input.component.d.ts +4 -0
  23. package/package.json +1 -1
@@ -1,16 +1,17 @@
1
1
  import { DOCUMENT, CommonModule, Location } from '@angular/common';
2
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, StoreInValueModel, Command, ValueHolder } from '@coolon/pectin';
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';
@@ -838,7 +839,16 @@ if (false) {
838
839
  var StringInputComponent = /** @class */ (function (_super) {
839
840
  __extends(StringInputComponent, _super);
840
841
  function StringInputComponent() {
841
- return _super.call(this) || this;
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;
842
852
  }
843
853
  /**
844
854
  * @return {?}
@@ -851,14 +861,34 @@ var StringInputComponent = /** @class */ (function (_super) {
851
861
  StringInputComponent.decorators = [
852
862
  { type: Component, args: [{
853
863
  selector: 'aup-string-input',
854
- 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",
855
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}"]
856
866
  }] }
857
867
  ];
858
868
  /** @nocollapse */
859
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);
860
882
  return StringInputComponent;
861
883
  }(AbstractInputComponent));
884
+ if (false) {
885
+ /** @type {?} */
886
+ StringInputComponent.prototype.allowClearModel;
887
+ /** @type {?} */
888
+ StringInputComponent.prototype.allowClear;
889
+ /** @type {?} */
890
+ StringInputComponent.prototype.clearCommand;
891
+ }
862
892
 
863
893
  /**
864
894
  * @fileoverview added by tsickle
@@ -903,7 +933,9 @@ var ComponentsModule = /** @class */ (function () {
903
933
  MatFormFieldModule,
904
934
  MatSelectModule,
905
935
  MatTabsModule,
906
- DirectivesModule
936
+ DirectivesModule,
937
+ MatIconModule,
938
+ MatButtonModule
907
939
  ],
908
940
  exports: [
909
941
  NumberInputComponent,
@@ -2832,7 +2864,7 @@ var InteractionModule = /** @class */ (function () {
2832
2864
  { type: NgModule, args: [{
2833
2865
  imports: [
2834
2866
  CommonModule,
2835
- MatButtonModule,
2867
+ MatButtonModule$1,
2836
2868
  MatDialogModule,
2837
2869
  MatTabsModule$1,
2838
2870
  PortalModule,