@coolon/angular-ui-powerups 2.0.0-alpha.18 → 2.0.0-alpha.2

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 (162) hide show
  1. package/CHANGELOG.md +0 -112
  2. package/assets/form.scss +0 -33
  3. package/bundles/coolon-angular-ui-powerups.umd.js +323 -525
  4. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
  6. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  7. package/coolon-angular-ui-powerups.d.ts +54 -55
  8. package/coolon-angular-ui-powerups.metadata.json +1 -1
  9. package/esm2015/coolon-angular-ui-powerups.js +52 -53
  10. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  11. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  12. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  13. package/esm2015/lib/components/card-container/card-container.component.js +1 -1
  14. package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
  15. package/esm2015/lib/components/components.module.js +12 -29
  16. package/esm2015/lib/components/components.module.js.map +1 -1
  17. package/esm2015/lib/components/components.module.metadata.json +1 -1
  18. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  19. package/esm2015/lib/components/forms/abstract-input.component.js +6 -26
  20. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  21. package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
  22. package/esm2015/lib/components/forms/abstract-list-input.component.js +6 -45
  23. package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -1
  24. package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -1
  25. package/esm2015/lib/components/forms/abstract-value-input.component.js +7 -40
  26. package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -1
  27. package/esm2015/lib/components/forms/abstract-value-input.component.metadata.json +1 -1
  28. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +7 -4
  29. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  30. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
  31. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +13 -8
  32. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
  33. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
  34. package/esm2015/lib/components/forms/number-input/number-input.component.js +7 -4
  35. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  36. package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
  37. package/esm2015/lib/components/forms/password-input/password-input.component.js +8 -5
  38. package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
  39. package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
  40. package/esm2015/lib/components/forms/select-input/select-input.component.js +5 -8
  41. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  42. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  43. package/esm2015/lib/components/forms/string-input/string-input.component.js +8 -4
  44. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  45. package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
  46. package/esm2015/lib/components/forms/text-input/text-input.component.js +7 -4
  47. package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
  48. package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
  49. package/esm2015/lib/components/index.js +1 -2
  50. package/esm2015/lib/components/index.js.map +1 -1
  51. package/esm2015/lib/components/index.metadata.json +1 -1
  52. package/esm2015/lib/components/table/cell-editors.js.map +1 -1
  53. package/esm2015/lib/components/table/{cell-portal-ref.js → cell-protal-ref.js} +3 -7
  54. package/esm2015/lib/components/table/cell-protal-ref.js.map +1 -0
  55. package/esm2015/lib/components/table/{cell-portal-ref.metadata.json → cell-protal-ref.metadata.json} +1 -1
  56. package/esm2015/lib/components/table/column-model.js +11 -37
  57. package/esm2015/lib/components/table/column-model.js.map +1 -1
  58. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  59. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +1 -1
  60. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
  61. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -1
  62. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
  63. package/esm2015/lib/components/table/table-model.js +5 -8
  64. package/esm2015/lib/components/table/table-model.js.map +1 -1
  65. package/esm2015/lib/components/table/table-model.metadata.json +1 -1
  66. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +7 -2
  67. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  68. package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
  69. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  70. package/esm2015/lib/place/place-component.js +1 -1
  71. package/esm2015/lib/place/place-component.js.map +1 -1
  72. package/esm2015/lib/place/place-router.js +8 -2
  73. package/esm2015/lib/place/place-router.js.map +1 -1
  74. package/esm2015/lib/place/place-router.metadata.json +1 -1
  75. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  76. package/esm2015/lib/place/route/parameter-decorators.js +3 -2
  77. package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
  78. package/esm2015/lib/place/route/parameter-decorators.metadata.json +1 -1
  79. package/esm5/coolon-angular-ui-powerups.js +52 -53
  80. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  81. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  82. package/esm5/lib/components/card-container/card-container.component.js +1 -1
  83. package/esm5/lib/components/components.module.js +12 -29
  84. package/esm5/lib/components/components.module.js.map +1 -1
  85. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  86. package/esm5/lib/components/forms/abstract-input.component.js +6 -34
  87. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  88. package/esm5/lib/components/forms/abstract-list-input.component.js +6 -50
  89. package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
  90. package/esm5/lib/components/forms/abstract-value-input.component.js +7 -45
  91. package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
  92. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +7 -4
  93. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  94. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +13 -8
  95. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
  96. package/esm5/lib/components/forms/number-input/number-input.component.js +7 -4
  97. package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
  98. package/esm5/lib/components/forms/password-input/password-input.component.js +8 -5
  99. package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
  100. package/esm5/lib/components/forms/select-input/select-input.component.js +5 -8
  101. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  102. package/esm5/lib/components/forms/string-input/string-input.component.js +8 -4
  103. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  104. package/esm5/lib/components/forms/text-input/text-input.component.js +7 -4
  105. package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
  106. package/esm5/lib/components/index.js +1 -2
  107. package/esm5/lib/components/index.js.map +1 -1
  108. package/esm5/lib/components/table/cell-editors.js.map +1 -1
  109. package/esm5/lib/components/table/{cell-portal-ref.js → cell-protal-ref.js} +3 -7
  110. package/esm5/lib/components/table/cell-protal-ref.js.map +1 -0
  111. package/esm5/lib/components/table/column-model.js +11 -37
  112. package/esm5/lib/components/table/column-model.js.map +1 -1
  113. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +1 -1
  114. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
  115. package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -1
  116. package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
  117. package/esm5/lib/components/table/table-model.js +5 -8
  118. package/esm5/lib/components/table/table-model.js.map +1 -1
  119. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +7 -2
  120. package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  121. package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  122. package/esm5/lib/place/place-component.js +1 -1
  123. package/esm5/lib/place/place-component.js.map +1 -1
  124. package/esm5/lib/place/place-router.js +8 -2
  125. package/esm5/lib/place/place-router.js.map +1 -1
  126. package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
  127. package/esm5/lib/place/route/parameter-decorators.js +3 -2
  128. package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
  129. package/fesm2015/coolon-angular-ui-powerups.js +241 -421
  130. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  131. package/fesm5/coolon-angular-ui-powerups.js +256 -457
  132. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  133. package/lib/components/forms/abstract-input.component.d.ts +3 -12
  134. package/lib/components/forms/abstract-list-input.component.d.ts +3 -9
  135. package/lib/components/forms/abstract-value-input.component.d.ts +3 -8
  136. package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +2 -0
  137. package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +4 -8
  138. package/lib/components/forms/number-input/number-input.component.d.ts +2 -0
  139. package/lib/components/forms/password-input/password-input.component.d.ts +2 -0
  140. package/lib/components/forms/select-input/select-input.component.d.ts +2 -8
  141. package/lib/components/forms/string-input/string-input.component.d.ts +2 -1
  142. package/lib/components/forms/text-input/text-input.component.d.ts +2 -0
  143. package/lib/components/index.d.ts +1 -2
  144. package/lib/components/table/cell-editors.d.ts +3 -3
  145. package/lib/components/table/{cell-portal-ref.d.ts → cell-protal-ref.d.ts} +4 -4
  146. package/lib/components/table/column-model.d.ts +7 -15
  147. package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +1 -1
  148. package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts +1 -1
  149. package/lib/components/table/table-model.d.ts +3 -14
  150. package/package.json +4 -4
  151. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js +0 -70
  152. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +0 -1
  153. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json +0 -1
  154. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +0 -1
  155. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +0 -1
  156. package/esm2015/lib/components/table/cell-portal-ref.js.map +0 -1
  157. package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js +0 -73
  158. package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +0 -1
  159. package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +0 -1
  160. package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +0 -1
  161. package/esm5/lib/components/table/cell-portal-ref.js.map +0 -1
  162. package/lib/components/forms/autocomplete-input/autocomplete-input.component.d.ts +0 -25
@@ -1,12 +1,12 @@
1
- import { __decorate, __extends, __metadata } from "tslib";
1
+ import { __decorate, __extends } from "tslib";
2
2
  /* tslint:disable:no-input-rename */
3
- import { Component, EventEmitter, Input, Output } from '@angular/core';
4
- import { Binding, DebugContext, Dsl, Form, Guard, MutableListModel, TrackExternal } from '@coolon/pectin';
3
+ import { Component } from '@angular/core';
4
+ import { Form } from '@coolon/pectin';
5
5
  import { AbstractInputComponent } from './abstract-input.component';
6
6
  var AbstractListInputComponent = /** @class */ (function (_super) {
7
7
  __extends(AbstractListInputComponent, _super);
8
8
  function AbstractListInputComponent() {
9
- var _this = _super.call(this) || this;
9
+ var _this = _super !== null && _super.apply(this, arguments) || this;
10
10
  /**
11
11
  * A backing model for all our @Input() valueModel properties which should be defined as follows.
12
12
  *
@@ -18,55 +18,11 @@ var AbstractListInputComponent = /** @class */ (function (_super) {
18
18
  * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
19
19
  */
20
20
  // We have to register it as a disposable so it ditches any listeners when we're disposed.
21
- _this.formValueModel = _this.registerDisposable(new Form.DelegatingListModel());
22
- _this.componentListModel = new MutableListModel();
23
- _this.setValueIsInProgress = new Guard();
24
- _this.valueChange = new EventEmitter();
25
- var _a = Dsl.disposeWith(_this), when = _a.when, valueOf = _a.valueOf, chain = _a.chain;
26
- var binding = new Binding.Identity(_this.formValueModel, _this.componentListModel);
27
- var inExternalChange = valueOf.any(_this.setValueIsInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
28
- when(_this.componentListModel).changes(function (is, was) {
29
- _this.valueChange.emit(is);
30
- _this.onValueEditedListeners.fire(function (l) { return l(is, was); });
31
- }, {
32
- initialValue: 'ignore',
33
- // we never fire events during an external changes to the value. This allows
34
- // the component to behave when used in the conventional angular
35
- // fashion, i.e. [(value)]="..."
36
- unless: inExternalChange
37
- });
38
- DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
21
+ _this.inputModel = _this.registerDisposable(new Form.DelegatingListModel());
39
22
  return _this;
40
23
  }
41
- Object.defineProperty(AbstractListInputComponent.prototype, "value", {
42
- // We add support for simple direct display of values by allowing components to be used
43
- // by `component.value = ...` This use of the component without a value model in tables
44
- // and the like.
45
- set: function (value) {
46
- var _this = this;
47
- this.setValueIsInProgress.whileTrue(function () {
48
- _this.componentListModel.value = value;
49
- });
50
- },
51
- enumerable: true,
52
- configurable: true
53
- });
54
- __decorate([
55
- Input(), TrackExternal({ delegateTo: 'formValueModel' }),
56
- __metadata("design:type", Object)
57
- ], AbstractListInputComponent.prototype, "listModel", void 0);
58
- __decorate([
59
- Input(),
60
- __metadata("design:type", Array),
61
- __metadata("design:paramtypes", [Array])
62
- ], AbstractListInputComponent.prototype, "value", null);
63
- __decorate([
64
- Output(),
65
- __metadata("design:type", Object)
66
- ], AbstractListInputComponent.prototype, "valueChange", void 0);
67
24
  AbstractListInputComponent = __decorate([
68
- Component({ template: '' }),
69
- __metadata("design:paramtypes", [])
25
+ Component({ template: '' })
70
26
  ], AbstractListInputComponent);
71
27
  return AbstractListInputComponent;
72
28
  }(AbstractInputComponent));
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-list-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/abstract-list-input.component.ts"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EACL,OAAO,EACP,YAAY,EACZ,GAAG,EAEH,IAAI,EACJ,KAAK,EAEL,gBAAgB,EAChB,aAAa,EACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE;IAAmD,8CAA2B;IAgC5E;QAAA,YACE,iBAAO,SAmBR;QA/CD;;;;;;;;;WASG;QACD,0FAA0F;QACzE,oBAAc,GAAG,KAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,mBAAmB,EAAK,CAAC,CAAC;QACtF,wBAAkB,GAAG,IAAI,gBAAgB,EAAK,CAAC;QAEhD,0BAAoB,GAAG,IAAI,KAAK,EAAE,CAAC;QAWxB,iBAAW,GAAG,IAAI,YAAY,EAAO,CAAC;QAIjD,IAAA,2BAAgD,EAA9C,cAAI,EAAE,oBAAO,EAAE,gBAA+B,CAAC;QACvD,IAAM,OAAO,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAI,CAAC,cAAc,EAAE,KAAI,CAAC,kBAAkB,CAAC,CAAC;QACnF,IAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAClC,KAAI,CAAC,oBAAoB,EACzB,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CACzD,CAAC,SAAS,EAAE,CAAC;QAEd,IAAI,CAAC,KAAI,CAAC,kBAAkB,CAAC,CAAC,OAAO,CAAC,UAAC,EAAE,EAAE,GAAG;YAC5C,KAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC1B,KAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,EAAV,CAAU,CAAC,CAAC;QACpD,CAAC,EAAE;YACD,YAAY,EAAE,QAAQ;YACtB,4EAA4E;YAC5E,gEAAgE;YAChE,gCAAgC;YAChC,MAAM,EAAE,gBAAgB;SACzB,CAAC,CAAC;QACH,YAAY,CAAC,GAAG,CAAC,KAAI,CAAC,cAAc,EAAK,KAAI,CAAC,WAAW,CAAC,IAAI,oBAAiB,CAAC,CAAC;;IACnF,CAAC;IA5BQ,sBAAI,6CAAK;QAHlB,uFAAuF;QACvF,wFAAwF;QACxF,gBAAgB;aACP,UAAU,KAAU;YAA7B,iBAIC;YAHC,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC;gBAClC,KAAI,CAAC,kBAAkB,CAAC,KAAK,GAAG,KAAK,CAAC;YACxC,CAAC,CAAC,CAAC;QACL,CAAC;;;OAAA;IAzBD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC;;iEACD;IAqB/C;QAAR,KAAK,EAAE;;;2DAIP;IAES;QAAT,MAAM,EAAE;;mEAAgD;IA9B9C,0BAA0B;QADtC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;;OACf,0BAA0B,CAsDtC;IAAD,iCAAC;CAAA,AAtDD,CAAmD,sBAAsB,GAsDxE;SAtDY,0BAA0B","sourcesContent":["/* tslint:disable:no-input-rename */\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport {\n Binding,\n DebugContext,\n Dsl,\n EventListenerList,\n Form,\n Guard,\n IMutableListModel,\n MutableListModel,\n TrackExternal\n} from '@coolon/pectin';\nimport { AbstractInputComponent } from './abstract-input.component';\n\n@Component({ template: '' })\nexport class AbstractListInputComponent<T> extends AbstractInputComponent<T[]> implements OnInit {\n\n @Input() @TrackExternal({ delegateTo: 'formValueModel' })\n listModel: Form.ListModelBase<T> | IMutableListModel<T>;\n\n /**\n * A backing model for all our @Input() valueModel properties which should be defined as follows.\n *\n * @Input() @TrackExternal({useExisting: \"inputModel\"})\n * valueModel: Form.ListModelBase<string> | IMutableListModel<string>;\n *\n * This approach allows the input to accept plain or form models but all backed by a form\n * friendly delegate. We have to use an existing delegate for union types as pectin just\n * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).\n */\n // We have to register it as a disposable so it ditches any listeners when we're disposed.\n protected readonly formValueModel = this.registerDisposable(new Form.DelegatingListModel<T>());\n readonly componentListModel = new MutableListModel<T>();\n\n private setValueIsInProgress = new Guard();\n\n // We add support for simple direct display of values by allowing components to be used\n // by `component.value = ...` This use of the component without a value model in tables\n // and the like.\n @Input() set value(value: T[]) {\n this.setValueIsInProgress.whileTrue(() => {\n this.componentListModel.value = value;\n });\n }\n\n @Output() readonly valueChange = new EventEmitter<T[]>();\n\n constructor() {\n super();\n const { when, valueOf, chain } = Dsl.disposeWith(this);\n const binding = new Binding.Identity(this.formValueModel, this.componentListModel);\n const inExternalChange = valueOf.any(\n this.setValueIsInProgress,\n chain(binding.direction).equals(Binding.Direction.RIGHT)\n ).areTruthy();\n\n when(this.componentListModel).changes((is, was) => {\n this.valueChange.emit(is);\n this.onValueEditedListeners.fire(l => l(is, was));\n }, {\n initialValue: 'ignore',\n // we never fire events during an external changes to the value. This allows\n // the component to behave when used in the conventional angular\n // fashion, i.e. [(value)]=\"...\"\n unless: inExternalChange\n });\n DebugContext.tag(this.formValueModel, `${this.constructor.name}.formValueModel`);\n }\n\n}\n"]}
1
+ {"version":3,"file":"abstract-list-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/abstract-list-input.component.ts"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE;IAAmD,8CAA2B;IAA9E;QAAA,qEAeC;QAbC;;;;;;;;;WASG;QACD,0FAA0F;QACnF,gBAAU,GAAG,KAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,mBAAmB,EAAK,CAAC,CAAC;;IAEnF,CAAC;IAfY,0BAA0B;QADtC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;OACf,0BAA0B,CAetC;IAAD,iCAAC;CAAA,AAfD,CAAmD,sBAAsB,GAexE;SAfY,0BAA0B","sourcesContent":["/* tslint:disable:no-input-rename */\nimport { Component, OnInit } from '@angular/core';\nimport { Form } from '@coolon/pectin';\nimport { AbstractInputComponent } from './abstract-input.component';\n\n@Component({ template: '' })\nexport class AbstractListInputComponent<T> extends AbstractInputComponent<T[]> implements OnInit {\n\n /**\n * A backing model for all our @Input() valueModel properties which should be defined as follows.\n *\n * @Input() @TrackExternal({useExisting: \"inputModel\"})\n * valueModel: Form.ListModelBase<string> | IMutableListModel<string>;\n *\n * This approach allows the input to accept plain or form models but all backed by a form\n * friendly delegate. We have to use an existing delegate for union types as pectin just\n * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).\n */\n // We have to register it as a disposable so it ditches any listeners when we're disposed.\n readonly inputModel = this.registerDisposable(new Form.DelegatingListModel<T>());\n\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __extends, __metadata } from "tslib";
2
2
  /* tslint:disable:no-input-rename */
3
- import { Component, EventEmitter, Input, Output } from '@angular/core';
4
- import { Binding, DebugContext, Dsl, Form, Guard, MutableValueModel, TrackExternal } from '@coolon/pectin';
3
+ import { Component } from '@angular/core';
4
+ import { Form } from '@coolon/pectin';
5
5
  import { AbstractInputComponent } from './abstract-input.component';
6
6
  var AbstractValueInputComponent = /** @class */ (function (_super) {
7
7
  __extends(AbstractValueInputComponent, _super);
@@ -18,52 +18,14 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
18
18
  * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
19
19
  */
20
20
  // We have to register it as a disposable so it ditches any listeners when we're disposed.
21
- _this.formValueModel = _this.registerDisposable(new Form.DelegatingValueModel());
22
- _this.setValueInProgress = new Guard();
23
- _this.componentValueModel = new MutableValueModel();
24
- _this.valueChange = new EventEmitter();
25
- var _a = Dsl.disposeWith(_this), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
26
- var binding = new Binding.Identity(_this.formValueModel, _this.componentValueModel);
27
- var inExternalChange = valueOf.any(_this.setValueInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
28
- when(_this.componentValueModel).changes(function (is, was) {
29
- _this.valueChange.emit(is);
30
- _this.onValueEditedListeners.fire(function (l) { return l(is, was); });
31
- }, {
32
- initialValue: 'ignore',
33
- // we never fire events during an external set value operation. This allows
34
- // the component to behave when used in the conventional angular
35
- // fashion, i.e. [(value)]="..."
36
- unless: inExternalChange
21
+ _this.inputModel = _this.registerDisposable(new Form.DelegatingValueModel());
22
+ _this.inputModel.onTransactionStart(function (tx) {
23
+ tx.onRootTransactionFinalised(function () {
24
+ console.log({ changed: tx.hasChanged() });
25
+ });
37
26
  });
38
- DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
39
27
  return _this;
40
28
  }
41
- Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
42
- // We add support for simple direct display of values by allowing components to be used
43
- // by `component.value = ...` This use of the component without a value model in tables
44
- // and the like.
45
- set: function (value) {
46
- var _this = this;
47
- this.setValueInProgress.whileTrue(function () {
48
- _this.componentValueModel.value = value;
49
- });
50
- },
51
- enumerable: true,
52
- configurable: true
53
- });
54
- __decorate([
55
- Input(), TrackExternal({ delegateTo: 'formValueModel' }),
56
- __metadata("design:type", Object)
57
- ], AbstractValueInputComponent.prototype, "valueModel", void 0);
58
- __decorate([
59
- Input(),
60
- __metadata("design:type", Object),
61
- __metadata("design:paramtypes", [Object])
62
- ], AbstractValueInputComponent.prototype, "value", null);
63
- __decorate([
64
- Output(),
65
- __metadata("design:type", Object)
66
- ], AbstractValueInputComponent.prototype, "valueChange", void 0);
67
29
  AbstractValueInputComponent = __decorate([
68
30
  Component({ template: '' }),
69
31
  __metadata("design:paramtypes", [])
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-value-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/abstract-value-input.component.ts"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EACL,OAAO,EACP,YAAY,EACZ,GAAG,EACH,IAAI,EACJ,KAAK,EAEL,iBAAiB,EACjB,aAAa,EACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE;IAAoD,+CAAyB;IAgC3E;QAAA,YACE,iBAAO,SAmBR;QA/CD;;;;;;;;;WASG;QACD,0FAA0F;QACzE,oBAAc,GAAG,KAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,oBAAoB,EAAK,CAAC,CAAC;QAEtF,wBAAkB,GAAG,IAAI,KAAK,EAAE,CAAC;QAClC,yBAAmB,GAAG,IAAI,iBAAiB,EAAK,CAAC;QAWvC,iBAAW,GAAG,IAAI,YAAY,EAAK,CAAC;QAI/C,IAAA,2BAAgD,EAA9C,cAAI,EAAE,gBAAK,EAAE,oBAAiC,CAAC;QACvD,IAAM,OAAO,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAI,CAAC,cAAc,EAAE,KAAI,CAAC,mBAAmB,CAAC,CAAC;QACpF,IAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAClC,KAAI,CAAC,kBAAkB,EACvB,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CACzD,CAAC,SAAS,EAAE,CAAC;QAEd,IAAI,CAAC,KAAI,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,UAAC,EAAE,EAAE,GAAG;YAC7C,KAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC1B,KAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,EAAV,CAAU,CAAC,CAAC;QACpD,CAAC,EAAE;YACD,YAAY,EAAE,QAAQ;YACtB,2EAA2E;YAC3E,gEAAgE;YAChE,gCAAgC;YAChC,MAAM,EAAE,gBAAgB;SACzB,CAAC,CAAC;QACH,YAAY,CAAC,GAAG,CAAC,KAAI,CAAC,cAAc,EAAK,KAAI,CAAC,WAAW,CAAC,IAAI,oBAAiB,CAAC,CAAC;;IACnF,CAAC;IA5BQ,sBAAI,8CAAK;QAHlB,uFAAuF;QACvF,wFAAwF;QACxF,gBAAgB;aACP,UAAU,KAAQ;YAA3B,iBAIC;YAHC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC;gBAChC,KAAI,CAAC,mBAAmB,CAAC,KAAK,GAAG,KAAK,CAAC;YACzC,CAAC,CAAC,CAAC;QACL,CAAC;;;OAAA;IAzBD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC;;mEACE;IAqBlD;QAAR,KAAK,EAAE;;;4DAIP;IAES;QAAT,MAAM,EAAE;;oEAA8C;IA9B5C,2BAA2B;QADvC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;;OACf,2BAA2B,CAsDvC;IAAD,kCAAC;CAAA,AAtDD,CAAoD,sBAAsB,GAsDzE;SAtDY,2BAA2B","sourcesContent":["/* tslint:disable:no-input-rename */\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport {\n Binding,\n DebugContext,\n Dsl,\n Form,\n Guard,\n IMutableValueModel,\n MutableValueModel,\n TrackExternal\n} from '@coolon/pectin';\nimport { AbstractInputComponent } from './abstract-input.component';\n\n@Component({ template: '' })\nexport class AbstractValueInputComponent<T> extends AbstractInputComponent<T> implements OnInit {\n\n @Input() @TrackExternal({ delegateTo: 'formValueModel' })\n valueModel: Form.ValueModelBase<T> | IMutableValueModel<T>;\n\n /**\n * A backing model for all our @Input() valueModel properties which should be defined as follows.\n *\n * @Input() @TrackExternal({useExisting: \"inputModel\"})\n * valueModel: DirtyTrackingForm.ValueModel<string> | IMutableValueModel<string>;\n *\n * This approach allows the input to accept plain or form models but all backed by a form\n * friendly delegate. We have to use an existing delegate for union types as pectin just\n * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).\n */\n // We have to register it as a disposable so it ditches any listeners when we're disposed.\n protected readonly formValueModel = this.registerDisposable(new Form.DelegatingValueModel<T>());\n\n protected setValueInProgress = new Guard();\n readonly componentValueModel = new MutableValueModel<T>();\n\n // We add support for simple direct display of values by allowing components to be used\n // by `component.value = ...` This use of the component without a value model in tables\n // and the like.\n @Input() set value(value: T) {\n this.setValueInProgress.whileTrue(() => {\n this.componentValueModel.value = value;\n });\n }\n\n @Output() readonly valueChange = new EventEmitter<T>();\n\n constructor() {\n super();\n const { when, chain, valueOf } = Dsl.disposeWith(this);\n const binding = new Binding.Identity(this.formValueModel, this.componentValueModel);\n const inExternalChange = valueOf.any(\n this.setValueInProgress,\n chain(binding.direction).equals(Binding.Direction.RIGHT)\n ).areTruthy();\n\n when(this.componentValueModel).changes((is, was) => {\n this.valueChange.emit(is);\n this.onValueEditedListeners.fire(l => l(is, was));\n }, {\n initialValue: 'ignore',\n // we never fire events during an external set value operation. This allows\n // the component to behave when used in the conventional angular\n // fashion, i.e. [(value)]=\"...\"\n unless: inExternalChange\n });\n DebugContext.tag(this.formValueModel, `${this.constructor.name}.formValueModel`);\n }\n\n}\n"]}
1
+ {"version":3,"file":"abstract-value-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/abstract-value-input.component.ts"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE;IAAoD,+CAAyB;IAe3E;QAAA,YACE,iBAAO,SAOR;QArBD;;;;;;;;;WASG;QACD,0FAA0F;QACnF,gBAAU,GAAG,KAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,oBAAoB,EAAK,CAAC,CAAC;QAIhF,KAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,UAAA,EAAE;YACnC,EAAE,CAAC,0BAA0B,CAAC;gBAC5B,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAC5C,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;;IAEL,CAAC;IAvBU,2BAA2B;QADvC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;;OACf,2BAA2B,CAwBvC;IAAD,kCAAC;CAAA,AAxBD,CAAoD,sBAAsB,GAwBzE;SAxBY,2BAA2B","sourcesContent":["/* tslint:disable:no-input-rename */\nimport { Component, OnInit } from '@angular/core';\nimport { Form } from '@coolon/pectin';\nimport { AbstractInputComponent } from './abstract-input.component';\n\n@Component({ template: '' })\nexport class AbstractValueInputComponent<T> extends AbstractInputComponent<T> implements OnInit {\n\n /**\n * A backing model for all our @Input() valueModel properties which should be defined as follows.\n *\n * @Input() @TrackExternal({useExisting: \"inputModel\"})\n * valueModel: DirtyTrackingForm.ValueModel<string> | IMutableValueModel<string>;\n *\n * This approach allows the input to accept plain or form models but all backed by a form\n * friendly delegate. We have to use an existing delegate for union types as pectin just\n * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).\n */\n // We have to register it as a disposable so it ditches any listeners when we're disposed.\n readonly inputModel = this.registerDisposable(new Form.DelegatingValueModel<T>());\n\n constructor() {\n super();\n this.inputModel.onTransactionStart(tx => {\n tx.onRootTransactionFinalised(() => {\n console.log({ changed: tx.hasChanged() });\n });\n });\n\n }\n}\n"]}
@@ -1,18 +1,21 @@
1
1
  import { __decorate, __extends, __metadata } from "tslib";
2
2
  import { Component, Input } from '@angular/core';
3
+ import { TrackExternal } from '@coolon/pectin';
3
4
  import { AbstractValueInputComponent } from '../abstract-value-input.component';
4
5
  var CheckboxInputComponent = /** @class */ (function (_super) {
5
6
  __extends(CheckboxInputComponent, _super);
6
7
  function CheckboxInputComponent() {
7
8
  var _this = _super.call(this) || this;
8
- // @Input() @TrackExternal({ delegateTo: 'inputModel' })
9
- // valueModel: Form.ValueModelBase<boolean> | IMutableValueModel<boolean>;
10
9
  _this.color = 'accent';
11
10
  _this.labelPosition = 'after';
12
11
  return _this;
13
12
  }
14
13
  CheckboxInputComponent.prototype.ngOnInit = function () {
15
14
  };
15
+ __decorate([
16
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
17
+ __metadata("design:type", Object)
18
+ ], CheckboxInputComponent.prototype, "valueModel", void 0);
16
19
  __decorate([
17
20
  Input(),
18
21
  __metadata("design:type", String)
@@ -24,8 +27,8 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
24
27
  CheckboxInputComponent = __decorate([
25
28
  Component({
26
29
  selector: 'aup-checkbox-input',
27
- template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"componentValueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
28
- styles: [":host{display:inline-flex;flex-direction:column;padding:24px 0 16px}:host.dense{padding:6px 0 2px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]
30
+ template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"valueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
31
+ styles: [":host{display:inline-flex;flex-direction:column;margin-top:24px;margin-bottom:16px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]
29
32
  }),
30
33
  __metadata("design:paramtypes", [])
31
34
  ], CheckboxInputComponent);
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/checkbox-input/checkbox-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF;IAA4C,0CAAoC;IAW9E;QAAA,YACE,iBAAO,SACR;QAXD,wDAAwD;QACxD,0EAA0E;QAG1E,WAAK,GAAkC,QAAQ,CAAC;QAGhD,mBAAa,GAAuB,OAAO,CAAC;;IAI5C,CAAC;IAED,yCAAQ,GAAR;IACA,CAAC;IAVD;QADC,KAAK,EAAE;;yDACwC;IAGhD;QADC,KAAK,EAAE;;iEACoC;IATjC,sBAAsB;QALlC,SAAS,CAAC;YACT,QAAQ,EAAE,oBAAoB;YAC9B,2UAA8C;;SAE/C,CAAC;;OACW,sBAAsB,CAkBlC;IAAD,6BAAC;CAAA,AAlBD,CAA4C,2BAA2B,GAkBtE;SAlBY,sBAAsB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Form, IMutableValueModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-checkbox-input',\n templateUrl: './checkbox-input.component.html',\n styleUrls: ['./checkbox-input.component.scss']\n})\nexport class CheckboxInputComponent extends AbstractValueInputComponent<boolean> implements OnInit {\n\n // @Input() @TrackExternal({ delegateTo: 'inputModel' })\n // valueModel: Form.ValueModelBase<boolean> | IMutableValueModel<boolean>;\n\n @Input()\n color: 'primary' | 'warn' | 'accent' = 'accent';\n\n @Input()\n labelPosition: 'before' | 'after' = 'after';\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
1
+ {"version":3,"file":"checkbox-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/checkbox-input/checkbox-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAA4B,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF;IAA4C,0CAAoC;IAW9E;QAAA,YACE,iBAAO,SACR;QAPD,WAAK,GAAkC,QAAQ,CAAC;QAGhD,mBAAa,GAAuB,OAAO,CAAC;;IAI5C,CAAC;IAED,yCAAQ,GAAR;IACA,CAAC;IAbD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;8DACkB;IAGvE;QADC,KAAK,EAAE;;yDACwC;IAGhD;QADC,KAAK,EAAE;;iEACoC;IATjC,sBAAsB;QALlC,SAAS,CAAC;YACT,QAAQ,EAAE,oBAAoB;YAC9B,8TAA8C;;SAE/C,CAAC;;OACW,sBAAsB,CAkBlC;IAAD,6BAAC;CAAA,AAlBD,CAA4C,2BAA2B,GAkBtE;SAlBY,sBAAsB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Form, IMutableValueModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-checkbox-input',\n templateUrl: './checkbox-input.component.html',\n styleUrls: ['./checkbox-input.component.scss']\n})\nexport class CheckboxInputComponent extends AbstractValueInputComponent<boolean> implements OnInit {\n\n @Input() @TrackExternal({ delegateTo: 'inputModel' })\n valueModel: Form.ValueModelBase<boolean> | IMutableValueModel<boolean>;\n\n @Input()\n color: 'primary' | 'warn' | 'accent' = 'accent';\n\n @Input()\n labelPosition: 'before' | 'after' = 'after';\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -2,13 +2,6 @@ import { __decorate, __extends, __metadata } from "tslib";
2
2
  import { Component, ContentChild, Input, TemplateRef } from '@angular/core';
3
3
  import { ListModel, StoreInListModel, TrackExternal } from '@coolon/pectin';
4
4
  import { AbstractListInputComponent } from '../abstract-list-input.component';
5
- /**
6
- * Using templates:
7
- * <aup-multiple-select-input [valueModel]="myModel" [options]="myOptions">
8
- * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
9
- * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
10
- * </aup-multiple-select_input>
11
- */
12
5
  var MultipleSelectInputComponent = /** @class */ (function (_super) {
13
6
  __extends(MultipleSelectInputComponent, _super);
14
7
  function MultipleSelectInputComponent() {
@@ -18,6 +11,10 @@ var MultipleSelectInputComponent = /** @class */ (function (_super) {
18
11
  }
19
12
  MultipleSelectInputComponent.prototype.ngOnInit = function () {
20
13
  };
14
+ __decorate([
15
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
16
+ __metadata("design:type", Object)
17
+ ], MultipleSelectInputComponent.prototype, "listModel", void 0);
21
18
  __decorate([
22
19
  Input(), TrackExternal(),
23
20
  __metadata("design:type", ListModel)
@@ -30,10 +27,18 @@ var MultipleSelectInputComponent = /** @class */ (function (_super) {
30
27
  Input(),
31
28
  __metadata("design:type", Object)
32
29
  ], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
30
+ __decorate([
31
+ Input(),
32
+ __metadata("design:type", Boolean)
33
+ ], MultipleSelectInputComponent.prototype, "allowNil", void 0);
33
34
  __decorate([
34
35
  ContentChild('optionTemplate'),
35
36
  __metadata("design:type", TemplateRef)
36
37
  ], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
38
+ __decorate([
39
+ ContentChild('nilOptionTemplate'),
40
+ __metadata("design:type", TemplateRef)
41
+ ], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
37
42
  __decorate([
38
43
  Input(),
39
44
  __metadata("design:type", Function)
@@ -41,7 +46,7 @@ var MultipleSelectInputComponent = /** @class */ (function (_super) {
41
46
  MultipleSelectInputComponent = __decorate([
42
47
  Component({
43
48
  selector: 'aup-multiple-select-input',
44
- 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)]=\"componentListModel.value\"\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 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=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
49
+ 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)]=\"listModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\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",
45
50
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
46
51
  }),
47
52
  __metadata("design:paramtypes", [])
@@ -1 +1 @@
1
- {"version":3,"file":"multiple-select-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/multiple-select-input/multiple-select-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAA2B,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrG,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E;;;;;;GAMG;AAMH;IAA2D,gDAA6B;IAiBtF;QAAA,YACE,iBAAO,SACR;QAJD,uBAAiB,GAAuB,UAAC,MAAM,IAAK,OAAA,CAAC,MAAM,IAAI,KAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,EAAhE,CAAgE,CAAC;;IAIrH,CAAC;IAED,+CAAQ,GAAR;IACA,CAAC;IAnBD;QADC,KAAK,EAAE,EAAE,aAAa,EAAE;kCACX,SAAS;sEAAI;IAG3B;QADC,KAAK,EAAE,EAAE,gBAAgB,CAAC,cAAc,CAAC;;iEAC7B;IAGb;QADC,KAAK,EAAE;;qEACa;IAGrB;QADC,YAAY,CAAC,gBAAgB,CAAC;kCACZ,WAAW;2EAAM;IAGpC;QADC,KAAK,EAAE;;2EAC6G;IAf1G,4BAA4B;QALxC,SAAS,CAAC;YACT,QAAQ,EAAE,2BAA2B;YACrC,gkCAAqD;;SAEtD,CAAC;;OACW,4BAA4B,CAwBxC;IAAD,mCAAC;CAAA,AAxBD,CAA2D,0BAA0B,GAwBpF;SAxBY,4BAA4B","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport { Form, IMutableListModel, ListModel, StoreInListModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractListInputComponent } from '../abstract-list-input.component';\n\n/**\n * Using templates:\n * <aup-multiple-select-input [valueModel]=\"myModel\" [options]=\"myOptions\">\n * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * </aup-multiple-select_input>\n */\n@Component({\n selector: 'aup-multiple-select-input',\n templateUrl: './multiple-select-input.component.html',\n styleUrls: ['./multiple-select-input.component.scss']\n})\nexport class MultipleSelectInputComponent<T = any> extends AbstractListInputComponent<T> implements OnInit {\n\n @Input() @TrackExternal()\n optionsModel: ListModel<T>;\n\n @Input() @StoreInListModel('optionsModel')\n options: T[];\n\n @Input()\n optionLabel: keyof T;\n\n @ContentChild('optionTemplate')\n optionTemplateRef: TemplateRef<any>;\n\n @Input()\n optionLabelFormat: (option: T) => any = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
1
+ {"version":3,"file":"multiple-select-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/multiple-select-input/multiple-select-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAA2B,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrG,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAO9E;IAA2D,gDAA6B;IA0BtF;QAAA,YACE,iBAAO,SACR;QAJD,uBAAiB,GAAuB,UAAC,MAAM,IAAK,OAAA,CAAC,MAAM,IAAI,KAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,EAAhE,CAAgE,CAAC;;IAIrH,CAAC;IAED,+CAAQ,GAAR;IACA,CAAC;IA5BD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;mEACG;IAGxD;QADC,KAAK,EAAE,EAAE,aAAa,EAAE;kCACX,SAAS;sEAAI;IAG3B;QADC,KAAK,EAAE,EAAE,gBAAgB,CAAC,cAAc,CAAC;;iEAC7B;IAGb;QADC,KAAK,EAAE;;qEACa;IAGrB;QADC,KAAK,EAAE;;kEACU;IAGlB;QADC,YAAY,CAAC,gBAAgB,CAAC;kCACZ,WAAW;2EAAM;IAGpC;QADC,YAAY,CAAC,mBAAmB,CAAC;kCACZ,WAAW;8EAAM;IAGvC;QADC,KAAK,EAAE;;2EAC6G;IAxB1G,4BAA4B;QALxC,SAAS,CAAC;YACT,QAAQ,EAAE,2BAA2B;YACrC,onCAAqD;;SAEtD,CAAC;;OACW,4BAA4B,CAiCxC;IAAD,mCAAC;CAAA,AAjCD,CAA2D,0BAA0B,GAiCpF;SAjCY,4BAA4B","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport { Form, IMutableListModel, ListModel, StoreInListModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractListInputComponent } from '../abstract-list-input.component';\n\n@Component({\n selector: 'aup-multiple-select-input',\n templateUrl: './multiple-select-input.component.html',\n styleUrls: ['./multiple-select-input.component.scss']\n})\nexport class MultipleSelectInputComponent<T = any> extends AbstractListInputComponent<T> implements OnInit {\n\n @Input() @TrackExternal({ delegateTo: 'inputModel' })\n listModel: Form.ListModelBase<T> | IMutableListModel<T>;\n\n @Input() @TrackExternal()\n optionsModel: ListModel<T>;\n\n @Input() @StoreInListModel('optionsModel')\n options: T[];\n\n @Input()\n optionLabel: keyof T;\n\n @Input()\n allowNil: boolean;\n\n @ContentChild('optionTemplate')\n optionTemplateRef: TemplateRef<any>;\n\n @ContentChild('nilOptionTemplate')\n nilOptionTemplateRef: TemplateRef<any>;\n\n @Input()\n optionLabelFormat: (option: T) => any = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -1,18 +1,21 @@
1
1
  import { __decorate, __extends, __metadata } from "tslib";
2
2
  import { Component, Input } from '@angular/core';
3
+ import { TrackExternal } from '@coolon/pectin';
3
4
  import { AbstractValueInputComponent } from '../abstract-value-input.component';
4
5
  var NumberInputComponent = /** @class */ (function (_super) {
5
6
  __extends(NumberInputComponent, _super);
6
7
  function NumberInputComponent() {
7
8
  var _this = _super.call(this) || this;
8
- // @Input() @TrackExternal({ delegateTo: 'inputModel' })
9
- // valueModel: Form.ValueModelBase<number> | IMutableValueModel<number>;
10
9
  _this.min = Number.MIN_SAFE_INTEGER;
11
10
  _this.max = Number.MAX_SAFE_INTEGER;
12
11
  return _this;
13
12
  }
14
13
  NumberInputComponent.prototype.ngOnInit = function () {
15
14
  };
15
+ __decorate([
16
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
17
+ __metadata("design:type", Object)
18
+ ], NumberInputComponent.prototype, "valueModel", void 0);
16
19
  __decorate([
17
20
  Input(),
18
21
  __metadata("design:type", Object)
@@ -24,8 +27,8 @@ var NumberInputComponent = /** @class */ (function (_super) {
24
27
  NumberInputComponent = __decorate([
25
28
  Component({
26
29
  selector: 'aup-number-input',
27
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n >\n <mat-hint *ngIf=\"hint && !dense\" >{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
28
- styles: [""]
30
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
31
+ styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]
29
32
  }),
30
33
  __metadata("design:paramtypes", [])
31
34
  ], NumberInputComponent);
@@ -1 +1 @@
1
- {"version":3,"file":"number-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/number-input/number-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAQhF;IAA0C,wCAAmC;IAW3E;QAAA,YACE,iBAAO,SACR;QAXD,wDAAwD;QACxD,wEAAwE;QAGxE,SAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;QAG9B,SAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;;IAI9B,CAAC;IAED,uCAAQ,GAAR;IACA,CAAC;IAVD;QADC,KAAK,EAAE;;qDACsB;IAG9B;QADC,KAAK,EAAE;;qDACsB;IATnB,oBAAoB;QALhC,SAAS,CAAC;YACT,QAAQ,EAAE,kBAAkB;YAC5B,6rBAA4C;;SAE7C,CAAC;;OACW,oBAAoB,CAkBhC;IAAD,2BAAC;CAAA,AAlBD,CAA0C,2BAA2B,GAkBpE;SAlBY,oBAAoB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Dsl, Form, IMutableValueModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n\n@Component({\n selector: 'aup-number-input',\n templateUrl: './number-input.component.html',\n styleUrls: ['./number-input.component.scss']\n})\nexport class NumberInputComponent extends AbstractValueInputComponent<number> implements OnInit {\n\n // @Input() @TrackExternal({ delegateTo: 'inputModel' })\n // valueModel: Form.ValueModelBase<number> | IMutableValueModel<number>;\n\n @Input()\n min = Number.MIN_SAFE_INTEGER;\n\n @Input()\n max = Number.MAX_SAFE_INTEGER;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
1
+ {"version":3,"file":"number-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/number-input/number-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAiC,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAQhF;IAA0C,wCAAmC;IAW3E;QAAA,YACE,iBAAO,SACR;QAPD,SAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;QAG9B,SAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;;IAI9B,CAAC;IAED,uCAAQ,GAAR;IACA,CAAC;IAbD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;4DACgB;IAGrE;QADC,KAAK,EAAE;;qDACsB;IAG9B;QADC,KAAK,EAAE;;qDACsB;IATnB,oBAAoB;QALhC,SAAS,CAAC;YACT,QAAQ,EAAE,kBAAkB;YAC5B,yqBAA4C;;SAE7C,CAAC;;OACW,oBAAoB,CAkBhC;IAAD,2BAAC;CAAA,AAlBD,CAA0C,2BAA2B,GAkBpE;SAlBY,oBAAoB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Dsl, Form, IMutableValueModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n\n@Component({\n selector: 'aup-number-input',\n templateUrl: './number-input.component.html',\n styleUrls: ['./number-input.component.scss']\n})\nexport class NumberInputComponent extends AbstractValueInputComponent<number> implements OnInit {\n\n @Input() @TrackExternal({ delegateTo: 'inputModel' })\n valueModel: Form.ValueModelBase<number> | IMutableValueModel<number>;\n\n @Input()\n min = Number.MIN_SAFE_INTEGER;\n\n @Input()\n max = Number.MAX_SAFE_INTEGER;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -1,20 +1,23 @@
1
1
  import { __decorate, __extends, __metadata } from "tslib";
2
- import { Component } from '@angular/core';
2
+ import { Component, Input } from '@angular/core';
3
+ import { TrackExternal } from '@coolon/pectin';
3
4
  import { AbstractValueInputComponent } from '../abstract-value-input.component';
4
5
  var PasswordInputComponent = /** @class */ (function (_super) {
5
6
  __extends(PasswordInputComponent, _super);
6
- // @Input() @TrackExternal({ delegateTo: 'inputModel' })
7
- // valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
8
7
  function PasswordInputComponent() {
9
8
  return _super.call(this) || this;
10
9
  }
11
10
  PasswordInputComponent.prototype.ngOnInit = function () {
12
11
  };
12
+ __decorate([
13
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
14
+ __metadata("design:type", Object)
15
+ ], PasswordInputComponent.prototype, "valueModel", void 0);
13
16
  PasswordInputComponent = __decorate([
14
17
  Component({
15
18
  selector: 'aup-password-input',
16
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
17
- styles: [""]
19
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\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",
20
+ styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]
18
21
  }),
19
22
  __metadata("design:paramtypes", [])
20
23
  ], PasswordInputComponent);
@@ -1 +1 @@
1
- {"version":3,"file":"password-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/password-input/password-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAiB,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF;IAA4C,0CAAmC;IAE7E,wDAAwD;IACxD,wEAAwE;IAExE;eACE,iBAAO;IACT,CAAC;IAED,yCAAQ,GAAR;IACA,CAAC;IAVU,sBAAsB;QALlC,SAAS,CAAC;YACT,QAAQ,EAAE,oBAAoB;YAC9B,0oBAA8C;;SAE/C,CAAC;;OACW,sBAAsB,CAYlC;IAAD,6BAAC;CAAA,AAZD,CAA4C,2BAA2B,GAYtE;SAZY,sBAAsB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Form, IMutableValueModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-password-input',\n templateUrl: './password-input.component.html',\n styleUrls: ['./password-input.component.scss']\n})\nexport class PasswordInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n // @Input() @TrackExternal({ delegateTo: 'inputModel' })\n // valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
1
+ {"version":3,"file":"password-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/password-input/password-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAA4B,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF;IAA4C,0CAAmC;IAK7E;eACE,iBAAO;IACT,CAAC;IAED,yCAAQ,GAAR;IACA,CAAC;IAPD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;8DACgB;IAH1D,sBAAsB;QALlC,SAAS,CAAC;YACT,QAAQ,EAAE,oBAAoB;YAC9B,6nBAA8C;;SAE/C,CAAC;;OACW,sBAAsB,CAYlC;IAAD,6BAAC;CAAA,AAZD,CAA4C,2BAA2B,GAYtE;SAZY,sBAAsB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Form, IMutableValueModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-password-input',\n templateUrl: './password-input.component.html',\n styleUrls: ['./password-input.component.scss']\n})\nexport class PasswordInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n @Input() @TrackExternal({ delegateTo: 'inputModel' })\n valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -2,13 +2,6 @@ import { __decorate, __extends, __metadata } from "tslib";
2
2
  import { Component, ContentChild, Input, TemplateRef } from '@angular/core';
3
3
  import { ListModel, StoreInListModel, TrackExternal } from '@coolon/pectin';
4
4
  import { AbstractValueInputComponent } from '../abstract-value-input.component';
5
- /**
6
- * Using templates:
7
- * <aup-select-input [valueModel]="myModel" [options]="myOptions">
8
- * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
9
- * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
10
- * </aup-select_input>
11
- */
12
5
  var SelectInputComponent = /** @class */ (function (_super) {
13
6
  __extends(SelectInputComponent, _super);
14
7
  function SelectInputComponent() {
@@ -18,6 +11,10 @@ var SelectInputComponent = /** @class */ (function (_super) {
18
11
  }
19
12
  SelectInputComponent.prototype.ngOnInit = function () {
20
13
  };
14
+ __decorate([
15
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
16
+ __metadata("design:type", Object)
17
+ ], SelectInputComponent.prototype, "valueModel", void 0);
21
18
  __decorate([
22
19
  Input(), TrackExternal(),
23
20
  __metadata("design:type", ListModel)
@@ -49,7 +46,7 @@ var SelectInputComponent = /** @class */ (function (_super) {
49
46
  SelectInputComponent = __decorate([
50
47
  Component({
51
48
  selector: 'aup-select-input',
52
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\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 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=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
49
+ 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]=\"focusContext\"\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",
53
50
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
54
51
  }),
55
52
  __metadata("design:paramtypes", [])
@@ -1 +1 @@
1
- {"version":3,"file":"select-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/select-input/select-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAsB,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAQ,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAEhF;;;;;;GAMG;AAMH;IAAmD,wCAA8B;IA0B/E;QAAA,YACE,iBAAO,SACR;QAJD,uBAAiB,GAAuB,UAAC,MAAM,IAAK,OAAA,CAAC,MAAM,IAAI,KAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,EAAhE,CAAgE,CAAC;;IAIrH,CAAC;IAED,uCAAQ,GAAR;IACA,CAAC;IAzBD;QADC,KAAK,EAAE,EAAE,aAAa,EAAE;kCACX,SAAS;8DAAI;IAG3B;QADC,KAAK,EAAE,EAAE,gBAAgB,CAAC,cAAc,CAAC;;yDAC7B;IAGb;QADC,KAAK,EAAE;;6DACa;IAGrB;QADC,KAAK,EAAE;;0DACU;IAGlB;QADC,YAAY,CAAC,gBAAgB,CAAC;kCACZ,WAAW;mEAAM;IAGpC;QADC,YAAY,CAAC,mBAAmB,CAAC;kCACZ,WAAW;sEAAM;IAGvC;QADC,KAAK,EAAE;;mEAC6G;IAxB1G,oBAAoB;QALhC,SAAS,CAAC;YACT,QAAQ,EAAE,kBAAkB;YAC5B,6zCAA4C;;SAE7C,CAAC;;OACW,oBAAoB,CAiChC;IAAD,2BAAC;CAAA,AAjCD,CAAmD,2BAA2B,GAiC7E;SAjCY,oBAAoB","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport { IMutableValueModel, ListModel, StoreInListModel, TrackExternal, Form } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n/**\n * Using templates:\n * <aup-select-input [valueModel]=\"myModel\" [options]=\"myOptions\">\n * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>\n * </aup-select_input>\n */\n@Component({\n selector: 'aup-select-input',\n templateUrl: './select-input.component.html',\n styleUrls: ['./select-input.component.scss']\n})\nexport class SelectInputComponent<T = any> extends AbstractValueInputComponent<T> implements OnInit {\n\n // @Input() @TrackExternal({ delegateTo: 'inputModel' })\n // valueModel: Form.ValueModelBase<T> | IMutableValueModel<T>;\n\n @Input() @TrackExternal()\n optionsModel: ListModel<T>;\n\n @Input() @StoreInListModel('optionsModel')\n options: T[];\n\n @Input()\n optionLabel: keyof T;\n\n @Input()\n allowNil: boolean;\n\n @ContentChild('optionTemplate')\n optionTemplateRef: TemplateRef<any>;\n\n @ContentChild('nilOptionTemplate')\n nilOptionTemplateRef: TemplateRef<any>;\n\n @Input()\n optionLabelFormat: (option: T) => any = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
1
+ {"version":3,"file":"select-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/select-input/select-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAsB,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAQ,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF;IAAmD,wCAA8B;IA0B/E;QAAA,YACE,iBAAO,SACR;QAJD,uBAAiB,GAAuB,UAAC,MAAM,IAAK,OAAA,CAAC,MAAM,IAAI,KAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,EAAhE,CAAgE,CAAC;;IAIrH,CAAC;IAED,uCAAQ,GAAR;IACA,CAAC;IA5BD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;4DACM;IAG3D;QADC,KAAK,EAAE,EAAE,aAAa,EAAE;kCACX,SAAS;8DAAI;IAG3B;QADC,KAAK,EAAE,EAAE,gBAAgB,CAAC,cAAc,CAAC;;yDAC7B;IAGb;QADC,KAAK,EAAE;;6DACa;IAGrB;QADC,KAAK,EAAE;;0DACU;IAGlB;QADC,YAAY,CAAC,gBAAgB,CAAC;kCACZ,WAAW;mEAAM;IAGpC;QADC,YAAY,CAAC,mBAAmB,CAAC;kCACZ,WAAW;sEAAM;IAGvC;QADC,KAAK,EAAE;;mEAC6G;IAxB1G,oBAAoB;QALhC,SAAS,CAAC;YACT,QAAQ,EAAE,kBAAkB;YAC5B,6lCAA4C;;SAE7C,CAAC;;OACW,oBAAoB,CAiChC;IAAD,2BAAC;CAAA,AAjCD,CAAmD,2BAA2B,GAiC7E;SAjCY,oBAAoB","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport { IMutableValueModel, ListModel, StoreInListModel, TrackExternal, Form } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-select-input',\n templateUrl: './select-input.component.html',\n styleUrls: ['./select-input.component.scss']\n})\nexport class SelectInputComponent<T = any> extends AbstractValueInputComponent<T> implements OnInit {\n\n @Input() @TrackExternal({ delegateTo: 'inputModel' })\n valueModel: Form.ValueModelBase<T> | IMutableValueModel<T>;\n\n @Input() @TrackExternal()\n optionsModel: ListModel<T>;\n\n @Input() @StoreInListModel('optionsModel')\n options: T[];\n\n @Input()\n optionLabel: keyof T;\n\n @Input()\n allowNil: boolean;\n\n @ContentChild('optionTemplate')\n optionTemplateRef: TemplateRef<any>;\n\n @ContentChild('nilOptionTemplate')\n nilOptionTemplateRef: TemplateRef<any>;\n\n @Input()\n optionLabelFormat: (option: T) => any = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -8,13 +8,17 @@ var StringInputComponent = /** @class */ (function (_super) {
8
8
  var _this = _super.call(this) || this;
9
9
  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;
10
10
  _this.clearCommand = Command.create(function () {
11
- _this.componentValueModel.value = null;
11
+ _this.valueModel.value = null;
12
12
  });
13
- _this.clearCommand.disableWhile(chain.stringValue(_this.componentValueModel).isBlank());
13
+ _this.clearCommand.disableWhile(chain.stringValue(_this.valueModel).isBlank());
14
14
  return _this;
15
15
  }
16
16
  StringInputComponent.prototype.ngOnInit = function () {
17
17
  };
18
+ __decorate([
19
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
20
+ __metadata("design:type", Object)
21
+ ], StringInputComponent.prototype, "valueModel", void 0);
18
22
  __decorate([
19
23
  Input(), TrackExternal({ defaultValue: false }),
20
24
  __metadata("design:type", ValueModel)
@@ -26,8 +30,8 @@ var StringInputComponent = /** @class */ (function (_super) {
26
30
  StringInputComponent = __decorate([
27
31
  Component({
28
32
  selector: 'aup-string-input',
29
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n",
30
- styles: ["button[disabled]{visibility:hidden}"]
33
+ 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]=\"focusContext\"\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=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n",
34
+ styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}"]
31
35
  }),
32
36
  __metadata("design:paramtypes", [])
33
37
  ], StringInputComponent);
@@ -1 +1 @@
1
- {"version":3,"file":"string-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/string-input/string-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,GAAG,EAA4B,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF;IAA0C,wCAAmC;IAU3E;QAAA,YACE,iBAAO,SAMR;QALO,IAAA,2BAAkF,EAAhF,gBAAK,EAAE,oBAAO,EAAE,kBAAM,EAAE,cAAI,EAAE,gBAAK,EAAE,oBAAO,EAAE,sBAAkC,CAAC;QACzF,KAAI,CAAC,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;YACjC,KAAI,CAAC,mBAAmB,CAAC,KAAK,GAAG,IAAI,CAAC;QACxC,CAAC,CAAC,CAAC;QACH,KAAI,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,KAAI,CAAC,mBAAmB,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;;IACxF,CAAC;IAED,uCAAQ,GAAR;IACA,CAAC;IAjBD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;kCAC9B,UAAU;kEAAU;IAGtC;QADC,KAAK,EAAE,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;;6DAC1B;IANV,oBAAoB;QALhC,SAAS,CAAC;YACT,QAAQ,EAAE,kBAAkB;YAC5B,ixBAA4C;;SAE7C,CAAC;;OACW,oBAAoB,CAsBhC;IAAD,2BAAC;CAAA,AAtBD,CAA0C,2BAA2B,GAsBpE;SAtBY,oBAAoB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Command, Dsl, Form, IMutableValueModel, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-string-input',\n templateUrl: './string-input.component.html',\n styleUrls: ['./string-input.component.scss']\n})\nexport class StringInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n @Input() @TrackExternal({ defaultValue: false })\n enableClearModel: ValueModel<boolean>;\n\n @Input() @StoreInValueModel('enableClearModel')\n enableClear: boolean;\n\n readonly clearCommand: Command<void>;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.clearCommand = Command.create(() => {\n this.componentValueModel.value = null;\n });\n this.clearCommand.disableWhile(chain.stringValue(this.componentValueModel).isBlank());\n }\n\n ngOnInit() {\n }\n\n}\n"]}
1
+ {"version":3,"file":"string-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/string-input/string-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,GAAG,EAA4B,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF;IAA0C,wCAAmC;IAa3E;QAAA,YACE,iBAAO,SAMR;QALO,IAAA,2BAAkF,EAAhF,gBAAK,EAAE,oBAAO,EAAE,kBAAM,EAAE,cAAI,EAAE,gBAAK,EAAE,oBAAO,EAAE,sBAAkC,CAAC;QACzF,KAAI,CAAC,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;YACjC,KAAI,CAAC,UAAU,CAAC,KAAK,GAAG,IAAI,CAAC;QAC/B,CAAC,CAAC,CAAC;QACH,KAAI,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,KAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;;IAC/E,CAAC;IAED,uCAAQ,GAAR;IACA,CAAC;IApBD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;4DACiB;IAGtE;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;kCAC9B,UAAU;kEAAU;IAGtC;QADC,KAAK,EAAE,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;;6DAC1B;IATV,oBAAoB;QALhC,SAAS,CAAC;YACT,QAAQ,EAAE,kBAAkB;YAC5B,owBAA4C;;SAE7C,CAAC;;OACW,oBAAoB,CAyBhC;IAAD,2BAAC;CAAA,AAzBD,CAA0C,2BAA2B,GAyBpE;SAzBY,oBAAoB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Command, Dsl, Form, IMutableValueModel, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-string-input',\n templateUrl: './string-input.component.html',\n styleUrls: ['./string-input.component.scss']\n})\nexport class StringInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n @Input() @TrackExternal({ delegateTo: 'inputModel' })\n valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;\n\n @Input() @TrackExternal({ defaultValue: false })\n enableClearModel: ValueModel<boolean>;\n\n @Input() @StoreInValueModel('enableClearModel')\n enableClear: boolean;\n\n readonly clearCommand: Command<void>;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.clearCommand = Command.create(() => {\n this.valueModel.value = null;\n });\n this.clearCommand.disableWhile(chain.stringValue(this.valueModel).isBlank());\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -1,18 +1,21 @@
1
1
  import { __decorate, __extends, __metadata } from "tslib";
2
2
  import { Component, Input } from '@angular/core';
3
+ import { TrackExternal } from '@coolon/pectin';
3
4
  import { AbstractValueInputComponent } from '../abstract-value-input.component';
4
5
  var TextInputComponent = /** @class */ (function (_super) {
5
6
  __extends(TextInputComponent, _super);
6
7
  function TextInputComponent() {
7
8
  var _this = _super.call(this) || this;
8
- // @Input() @TrackExternal({ delegateTo: 'inputModel' })
9
- // valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
10
9
  _this.rows = 2;
11
10
  return _this;
12
11
  // const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
13
12
  }
14
13
  TextInputComponent.prototype.ngOnInit = function () {
15
14
  };
15
+ __decorate([
16
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
17
+ __metadata("design:type", Object)
18
+ ], TextInputComponent.prototype, "valueModel", void 0);
16
19
  __decorate([
17
20
  Input(),
18
21
  __metadata("design:type", Object)
@@ -24,8 +27,8 @@ var TextInputComponent = /** @class */ (function (_super) {
24
27
  TextInputComponent = __decorate([
25
28
  Component({
26
29
  selector: 'aup-text-input',
27
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
28
- styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
30
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
31
+ styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}textarea{overflow:auto}"]
29
32
  }),
30
33
  __metadata("design:paramtypes", [])
31
34
  ], TextInputComponent);
@@ -1 +1 @@
1
- {"version":3,"file":"text-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/text-input/text-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF;IAAwC,sCAAmC;IAQzE;QAAA,YACE,iBAAO,SAER;QATD,wDAAwD;QACxD,wEAAwE;QAE/D,UAAI,GAAG,CAAC,CAAC;;QAKhB,4FAA4F;IAC9F,CAAC;IAED,qCAAQ,GAAR;IACA,CAAC;IATQ;QAAR,KAAK,EAAE;;oDAAU;IACT;QAAR,KAAK,EAAE;;oDAAc;IANX,kBAAkB;QAL9B,SAAS,CAAC;YACT,QAAQ,EAAE,gBAAgB;YAC1B,+sBAA0C;;SAE3C,CAAC;;OACW,kBAAkB,CAgB9B;IAAD,yBAAC;CAAA,AAhBD,CAAwC,2BAA2B,GAgBlE;SAhBY,kBAAkB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Form, IMutableValueModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-text-input',\n templateUrl: './text-input.component.html',\n styleUrls: ['./text-input.component.scss']\n})\nexport class TextInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n // @Input() @TrackExternal({ delegateTo: 'inputModel' })\n // valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;\n\n @Input() rows = 2;\n @Input() cols: number;\n\n constructor() {\n super();\n // const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n }\n\n ngOnInit() {\n }\n\n}\n"]}
1
+ {"version":3,"file":"text-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/text-input/text-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAA4B,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAOhF;IAAwC,sCAAmC;IAQzE;QAAA,YACE,iBAAO,SAER;QANQ,UAAI,GAAG,CAAC,CAAC;;QAKhB,4FAA4F;IAC9F,CAAC;IAED,qCAAQ,GAAR;IACA,CAAC;IAXD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;0DACgB;IAE5D;QAAR,KAAK,EAAE;;oDAAU;IACT;QAAR,KAAK,EAAE;;oDAAc;IANX,kBAAkB;QAL9B,SAAS,CAAC;YACT,QAAQ,EAAE,gBAAgB;YAC1B,ksBAA0C;;SAE3C,CAAC;;OACW,kBAAkB,CAgB9B;IAAD,yBAAC;CAAA,AAhBD,CAAwC,2BAA2B,GAgBlE;SAhBY,kBAAkB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Form, IMutableValueModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractValueInputComponent } from '../abstract-value-input.component';\n\n@Component({\n selector: 'aup-text-input',\n templateUrl: './text-input.component.html',\n styleUrls: ['./text-input.component.scss']\n})\nexport class TextInputComponent extends AbstractValueInputComponent<string> implements OnInit {\n\n @Input() @TrackExternal({ delegateTo: 'inputModel' })\n valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;\n\n @Input() rows = 2;\n @Input() cols: number;\n\n constructor() {\n super();\n // const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -10,7 +10,6 @@ export * from "./focus-container/focus-container.component";
10
10
  export * from "./forms/abstract-input.component";
11
11
  export * from "./forms/abstract-list-input.component";
12
12
  export * from "./forms/abstract-value-input.component";
13
- export * from "./forms/autocomplete-input/autocomplete-input.component";
14
13
  export * from "./forms/checkbox-input/checkbox-input.component";
15
14
  export * from "./forms/multiple-select-input/multiple-select-input.component";
16
15
  export * from "./forms/number-input/number-input.component";
@@ -23,7 +22,7 @@ export * from "./noop/noop.component";
23
22
  export * from "./scroll-container/scroll-container.component";
24
23
  export * from "./section-header/section-header.component";
25
24
  export * from "./switch-case/switch-case.component";
26
- export * from "./table/cell-portal-ref";
25
+ export * from "./table/cell-protal-ref";
27
26
  export * from "./table/column-model";
28
27
  export * from "./table/edit-session";
29
28
  export * from "./table/table-model";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yDAAyD,CAAC;AACxE,cAAc,iDAAiD,CAAC;AAChE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AAEpD,cAAc,yBAAyB,CAAC;AAExC,cAAc,sBAAsB,CAAC;AAErC,cAAc,sBAAsB,CAAC;AAErC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mDAAmD,CAAC;AAClE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6EAA6E,CAAC;AAC5F,cAAc,uDAAuD,CAAC;AACtE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,2EAA2E,CAAC;AAC1F,cAAc,2DAA2D,CAAC;AAC1E,cAAc,yEAAyE,CAAC;AACxF,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+DAA+D,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components.module\";\nexport * from \"./disposable-component\";\nexport * from \"./focusable.component\";\nexport * from \"./resize-aware.component\";\nexport * from \"./card-container/card-container.component\";\nexport * from \"./focus-container/focus-container.component\";\nexport * from \"./forms/abstract-input.component\";\nexport * from \"./forms/abstract-list-input.component\";\nexport * from \"./forms/abstract-value-input.component\";\nexport * from \"./forms/autocomplete-input/autocomplete-input.component\";\nexport * from \"./forms/checkbox-input/checkbox-input.component\";\nexport * from \"./forms/multiple-select-input/multiple-select-input.component\";\nexport * from \"./forms/number-input/number-input.component\";\nexport * from \"./forms/password-input/password-input.component\";\nexport * from \"./forms/select-input/select-input.component\";\nexport * from \"./forms/string-input/string-input.component\";\nexport * from \"./forms/text-input/text-input.component\";\nexport * from \"./icon/icon.component\";\nexport * from \"./noop/noop.component\";\nexport * from \"./scroll-container/scroll-container.component\";\nexport * from \"./section-header/section-header.component\";\nexport * from \"./switch-case/switch-case.component\";\nexport * from \"./table/cell-editors\";\nexport * from \"./table/cell-portal-ref\";\nexport * from \"./table/cell-renderer\";\nexport * from \"./table/column-model\";\nexport * from \"./table/column-text-properties\";\nexport * from \"./table/edit-session\";\nexport * from \"./table/table-def\";\nexport * from \"./table/table-model\";\nexport * from \"./table/table.component\";\nexport * from \"./table/column-template/column-template.directive\";\nexport * from \"./table/default-cell-renderer/default-cell-renderer.component\";\nexport * from \"./table/default-header-cell-renderer/default-header-cell-renderer.component\";\nexport * from \"./table/edit-row-controls/edit-row-controls.component\";\nexport * from \"./table/select-cell-renderer/select-cell-renderer.component\";\nexport * from \"./table/select-header-cell-renderer/select-header-cell-renderer.component\";\nexport * from \"./table/table-cell-renderer/table-cell-renderer.component\";\nexport * from \"./table/table-header-cell-renderer/table-header-cell-renderer.component\";\nexport * from \"./types/bounds.class\";\nexport * from \"./types/dimension.class\";\nexport * from \"./types/point.class\";\nexport * from \"./vertical-focus-container/vertical-focus-container.component\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,iDAAiD,CAAC;AAChE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AAEpD,cAAc,yBAAyB,CAAC;AAExC,cAAc,sBAAsB,CAAC;AAErC,cAAc,sBAAsB,CAAC;AAErC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mDAAmD,CAAC;AAClE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,6EAA6E,CAAC;AAC5F,cAAc,uDAAuD,CAAC;AACtE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,2EAA2E,CAAC;AAC1F,cAAc,2DAA2D,CAAC;AAC1E,cAAc,yEAAyE,CAAC;AACxF,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+DAA+D,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components.module\";\nexport * from \"./disposable-component\";\nexport * from \"./focusable.component\";\nexport * from \"./resize-aware.component\";\nexport * from \"./card-container/card-container.component\";\nexport * from \"./focus-container/focus-container.component\";\nexport * from \"./forms/abstract-input.component\";\nexport * from \"./forms/abstract-list-input.component\";\nexport * from \"./forms/abstract-value-input.component\";\nexport * from \"./forms/checkbox-input/checkbox-input.component\";\nexport * from \"./forms/multiple-select-input/multiple-select-input.component\";\nexport * from \"./forms/number-input/number-input.component\";\nexport * from \"./forms/password-input/password-input.component\";\nexport * from \"./forms/select-input/select-input.component\";\nexport * from \"./forms/string-input/string-input.component\";\nexport * from \"./forms/text-input/text-input.component\";\nexport * from \"./icon/icon.component\";\nexport * from \"./noop/noop.component\";\nexport * from \"./scroll-container/scroll-container.component\";\nexport * from \"./section-header/section-header.component\";\nexport * from \"./switch-case/switch-case.component\";\nexport * from \"./table/cell-editors\";\nexport * from \"./table/cell-protal-ref\";\nexport * from \"./table/cell-renderer\";\nexport * from \"./table/column-model\";\nexport * from \"./table/column-text-properties\";\nexport * from \"./table/edit-session\";\nexport * from \"./table/table-def\";\nexport * from \"./table/table-model\";\nexport * from \"./table/table.component\";\nexport * from \"./table/column-template/column-template.directive\";\nexport * from \"./table/default-cell-renderer/default-cell-renderer.component\";\nexport * from \"./table/default-header-cell-renderer/default-header-cell-renderer.component\";\nexport * from \"./table/edit-row-controls/edit-row-controls.component\";\nexport * from \"./table/select-cell-renderer/select-cell-renderer.component\";\nexport * from \"./table/select-header-cell-renderer/select-header-cell-renderer.component\";\nexport * from \"./table/table-cell-renderer/table-cell-renderer.component\";\nexport * from \"./table/table-header-cell-renderer/table-header-cell-renderer.component\";\nexport * from \"./types/bounds.class\";\nexport * from \"./types/dimension.class\";\nexport * from \"./types/point.class\";\nexport * from \"./vertical-focus-container/vertical-focus-container.component\";\n"]}