@coolon/angular-ui-powerups 2.0.0-alpha.4 → 2.0.0-alpha.5

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 (70) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +80 -30
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  8. package/esm2015/lib/components/forms/abstract-list-input.component.js +37 -5
  9. package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -1
  10. package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -1
  11. package/esm2015/lib/components/forms/abstract-value-input.component.js +30 -2
  12. package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -1
  13. package/esm2015/lib/components/forms/abstract-value-input.component.metadata.json +1 -1
  14. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +2 -5
  15. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  16. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
  17. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +0 -4
  18. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
  19. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
  20. package/esm2015/lib/components/forms/number-input/number-input.component.js +2 -5
  21. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  22. package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
  23. package/esm2015/lib/components/forms/password-input/password-input.component.js +3 -6
  24. package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
  25. package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
  26. package/esm2015/lib/components/forms/select-input/select-input.component.js +0 -4
  27. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  28. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  29. package/esm2015/lib/components/forms/string-input/string-input.component.js +0 -4
  30. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  31. package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
  32. package/esm2015/lib/components/forms/text-input/text-input.component.js +2 -5
  33. package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
  34. package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
  35. package/esm2015/lib/components/table/cell-editors.js.map +1 -1
  36. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  37. package/esm5/lib/components/forms/abstract-list-input.component.js +42 -5
  38. package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
  39. package/esm5/lib/components/forms/abstract-value-input.component.js +35 -2
  40. package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
  41. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +2 -5
  42. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  43. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +0 -4
  44. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
  45. package/esm5/lib/components/forms/number-input/number-input.component.js +2 -5
  46. package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
  47. package/esm5/lib/components/forms/password-input/password-input.component.js +3 -6
  48. package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
  49. package/esm5/lib/components/forms/select-input/select-input.component.js +0 -4
  50. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  51. package/esm5/lib/components/forms/string-input/string-input.component.js +0 -4
  52. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  53. package/esm5/lib/components/forms/text-input/text-input.component.js +2 -5
  54. package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
  55. package/esm5/lib/components/table/cell-editors.js.map +1 -1
  56. package/fesm2015/coolon-angular-ui-powerups.js +71 -31
  57. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  58. package/fesm5/coolon-angular-ui-powerups.js +81 -31
  59. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  60. package/lib/components/forms/abstract-list-input.component.d.ts +8 -2
  61. package/lib/components/forms/abstract-value-input.component.d.ts +7 -2
  62. package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +0 -2
  63. package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +1 -2
  64. package/lib/components/forms/number-input/number-input.component.d.ts +0 -2
  65. package/lib/components/forms/password-input/password-input.component.d.ts +0 -2
  66. package/lib/components/forms/select-input/select-input.component.d.ts +1 -2
  67. package/lib/components/forms/string-input/string-input.component.d.ts +1 -2
  68. package/lib/components/forms/text-input/text-input.component.d.ts +0 -2
  69. package/lib/components/table/cell-editors.d.ts +3 -3
  70. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/abstract-input.component.ts"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAG1G,OAAO,EAAE,OAAO,EAAuC,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAU9D;IAA+C,0CAAmB;IAmEhE;QAAA,YACE,iBAAO,SAOR;QAjEQ,WAAK,GAAG,KAAK,CAAC;QASvB,kBAAkB;QAClB,4CAA4C;QAClC,WAAK,GAAG,IAAI,YAAY,EAAE,CAAC;QACrC,4CAA4C;QAClC,UAAI,GAAG,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;QAAvB,KAAK,CAAC,eAAe,CAAC;kCAAe,OAAO;gEAAM;IAC1B;QAAxB,KAAK,CAAC,gBAAgB,CAAC;kCAAgB,OAAO;iEAAM;IAC7B;QAAvB,KAAK,CAAC,eAAe,CAAC;kCAAe,OAAO;gEAAM;IAIzC;QAAT,MAAM,EAAE;;yDAA4B;IAE3B;QAAT,MAAM,EAAE;;wDAA2B;IAE1B;QAAT,MAAM,EAAE;;4DAA+B;IAE9B;QAAT,MAAM,EAAE;;6DAAgC;IAKzC;QADC,WAAW,CAAC,OAAO,CAAC;;iEACiB;IAGtC;QADC,YAAY,CAAC,OAAO,CAAC;;;;6DAGrB;IAGD;QADC,YAAY,CAAC,SAAS,CAAC;;;;+DAIvB;IAGD;QADC,YAAY,CAAC,UAAU,CAAC;;;;gEAIxB;IAjDU,sBAAsB;QADlC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;;OACf,sBAAsB,CAgHlC;IAAD,6BAAC;CAAA,AAhHD,CAA+C,mBAAmB,GAgHjE;SAhHY,sBAAsB","sourcesContent":["/* tslint:disable:no-input-rename */\nimport { Component, EventEmitter, HostBinding, HostListener, Input, OnInit, Output } from '@angular/core';\nimport { FormControl, FormGroupDirective, NgForm } from '@angular/forms';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { Command, FocusManager, ListModel, ValueModel } from '@coolon/pectin';\nimport { DisposableComponent } from '../disposable-component';\n\ninterface InputModel<T> {\n value: T;\n enabled: ValueModel<boolean>;\n errorList: ListModel<string>;\n focusContext: FocusManager.Context;\n}\n\n@Component({ template: '' })\nexport class AbstractInputComponent<T> extends DisposableComponent implements OnInit {\n\n protected inputModel: InputModel<T>;\n\n @Input() label: string;\n @Input('floatLabel') userFloatLabel: 'auto' | 'always' | 'never';\n @Input() hint: string;\n @Input() placeholder: string;\n\n @HostBinding('class.dense')\n @Input() dense = false;\n\n // Note: I don't need to use delegates here as I never subscribe to the commands models\n @Input('command.focus') focusCommand: Command<any>;\n @Input('command.blur') blurCommand: Command<any>;\n @Input('command.enter') enterCommand: Command<any>;\n @Input('command.escape') escapeCommand: Command<any>;\n @Input('command.click') clickCommand: Command<any>;\n\n // TODO: fix this.\n // tslint:disable-next-line:no-output-native\n @Output() focus = new EventEmitter();\n // tslint:disable-next-line:no-output-native\n @Output() blur = new EventEmitter();\n // tslint:disable-next-line:no-output-native\n @Output() enterKey = new EventEmitter();\n // tslint:disable-next-line:no-output-native\n @Output() escapeKey = new EventEmitter();\n\n readonly errorStateMatcher: ErrorStateMatcher;\n\n @HostBinding('class')\n baseClassName = 'aup-input-component';\n\n @HostListener('click')\n notifyClick() {\n this.safelyInvoke(this.clickCommand);\n }\n\n @HostListener('focusin')\n notifyFocusIn() {\n this.safelyInvoke(this.focusCommand);\n this.focus.emit();\n }\n\n @HostListener('focusout')\n notifyFocusOut() {\n this.safelyInvoke(this.blurCommand);\n this.blur.emit();\n }\n\n notifyEnterKey() {\n this.safelyInvoke(this.enterCommand);\n this.enterKey.emit();\n }\n\n notifyEscapeKey() {\n this.safelyInvoke(this.escapeCommand);\n this.escapeKey.emit();\n }\n\n protected safelyInvoke(command: Command<any>) {\n if (command && command.enabled.value) {\n command.execute();\n }\n }\n\n constructor() {\n super();\n const self = this;\n this.errorStateMatcher = {\n isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {\n return self.hasErrors();\n }\n };\n }\n\n ngOnInit(): void {\n }\n\n isEnabled(): boolean {\n return this.enabled.value;\n }\n\n get enabled(): ValueModel<boolean> {\n return this.inputModel.enabled;\n }\n\n hasErrors(): boolean {\n return !this.errorList.query().isEmpty();\n }\n\n get errorList(): ListModel<string> {\n return this.inputModel.errorList;\n }\n\n get firstError() {\n return this.hasErrors() ? this.errorList.value[0] : null;\n }\n\n get focusContext() {\n return this.inputModel.focusContext;\n }\n\n get floatLabel(): 'auto' | 'always' | 'never' {\n return this.dense ? 'never' : this.userFloatLabel;\n }\n\n get showHint(): boolean {\n return this.dense ? false : !!this.hint;\n }\n\n}\n"]}
1
+ {"version":3,"file":"abstract-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/abstract-input.component.ts"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAG1G,OAAO,EAAE,OAAO,EAA6E,MAAM,gBAAgB,CAAC;AACpH,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAU9D;IAA+C,0CAAmB;IAmEhE;QAAA,YACE,iBAAO,SAOR;QAjEQ,WAAK,GAAG,KAAK,CAAC;QASvB,kBAAkB;QAClB,4CAA4C;QAClC,WAAK,GAAG,IAAI,YAAY,EAAE,CAAC;QACrC,4CAA4C;QAClC,UAAI,GAAG,IAAI,YAAY,EAAE,CAAC;QACpC,4CAA4C;QAClC,cAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QACxC,4CAA4C;QAClC,eAAS,GAAG,IAAI,YAAY,EAAE,CAAC;QAKzC,mBAAa,GAAG,qBAAqB,CAAC;QAqCpC,IAAM,IAAI,GAAG,KAAI,CAAC;QAClB,KAAI,CAAC,iBAAiB,GAAG;YACvB,YAAY,EAAZ,UAAa,OAA2B,EAAE,IAAwC;gBAChF,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;YAC1B,CAAC;SACF,CAAC;;IACJ,CAAC;IAxCD,4CAAW,GAAX;QACE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACvC,CAAC;IAGD,8CAAa,GAAb;QACE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;IAGD,+CAAc,GAAd;QACE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACpC,IAA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*/\nimport { Component, EventEmitter, HostBinding, HostListener, Input, OnInit, Output } from '@angular/core';\nimport { FormControl, FormGroupDirective, NgForm } from '@angular/forms';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { Command, FocusManager, ListModel, MutableValueModel, StoreInValueModel, ValueModel } from '@coolon/pectin';\nimport { DisposableComponent } from '../disposable-component';\n\ninterface InputModel<T> {\n value: T;\n enabled: ValueModel<boolean>;\n errorList: ListModel<string>;\n focusContext: FocusManager.Context;\n}\n\n@Component({ template: '' })\nexport class AbstractInputComponent<T> extends DisposableComponent implements OnInit {\n\n protected inputModel: InputModel<T>;\n\n @Input() label: string;\n @Input('floatLabel') userFloatLabel: 'auto' | 'always' | 'never';\n @Input() hint: string;\n @Input() placeholder: string;\n\n @HostBinding('class.dense')\n @Input() dense = false;\n\n // Note: I don't need to use delegates here as I never subscribe to the commands models\n @Input('command.focus') focusCommand: Command<any>;\n @Input('command.blur') blurCommand: Command<any>;\n @Input('command.enter') enterCommand: Command<any>;\n @Input('command.escape') escapeCommand: Command<any>;\n @Input('command.click') clickCommand: Command<any>;\n\n // TODO: fix this.\n // tslint:disable-next-line:no-output-native\n @Output() focus = new EventEmitter();\n // tslint:disable-next-line:no-output-native\n @Output() blur = new EventEmitter();\n // tslint:disable-next-line:no-output-native\n @Output() enterKey = new EventEmitter();\n // tslint:disable-next-line:no-output-native\n @Output() escapeKey = new EventEmitter();\n\n readonly errorStateMatcher: ErrorStateMatcher;\n\n @HostBinding('class')\n baseClassName = 'aup-input-component';\n\n @HostListener('click')\n notifyClick() {\n this.safelyInvoke(this.clickCommand);\n }\n\n @HostListener('focusin')\n notifyFocusIn() {\n this.safelyInvoke(this.focusCommand);\n this.focus.emit();\n }\n\n @HostListener('focusout')\n notifyFocusOut() {\n this.safelyInvoke(this.blurCommand);\n this.blur.emit();\n }\n\n notifyEnterKey() {\n this.safelyInvoke(this.enterCommand);\n this.enterKey.emit();\n }\n\n notifyEscapeKey() {\n this.safelyInvoke(this.escapeCommand);\n this.escapeKey.emit();\n }\n\n protected safelyInvoke(command: Command<any>) {\n if (command && command.enabled.value) {\n command.execute();\n }\n }\n\n constructor() {\n super();\n const self = this;\n this.errorStateMatcher = {\n isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {\n return self.hasErrors();\n }\n };\n }\n\n ngOnInit(): void {\n }\n\n isEnabled(): boolean {\n return this.enabled.value;\n }\n\n get enabled(): ValueModel<boolean> {\n return this.inputModel.enabled;\n }\n\n hasErrors(): boolean {\n return !this.errorList.query().isEmpty();\n }\n\n get errorList(): ListModel<string> {\n return this.inputModel.errorList;\n }\n\n get firstError() {\n return this.hasErrors() ? this.errorList.value[0] : null;\n }\n\n get focusContext() {\n return this.inputModel.focusContext;\n }\n\n get floatLabel(): 'auto' | 'always' | 'never' {\n return this.dense ? 'never' : this.userFloatLabel;\n }\n\n get showHint(): boolean {\n return this.dense ? false : !!this.hint;\n }\n\n}\n"]}
@@ -1,12 +1,12 @@
1
- import { __decorate, __extends } from "tslib";
1
+ import { __decorate, __extends, __metadata } from "tslib";
2
2
  /* tslint:disable:no-input-rename */
3
- import { Component } from '@angular/core';
4
- import { Form } from '@coolon/pectin';
3
+ import { Component, EventEmitter, Input, Output } from '@angular/core';
4
+ import { Dsl, Form, Guard, MutableListModel, TrackExternal } 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 !== null && _super.apply(this, arguments) || this;
9
+ var _this = _super.call(this) || this;
10
10
  /**
11
11
  * A backing model for all our @Input() valueModel properties which should be defined as follows.
12
12
  *
@@ -19,10 +19,47 @@ var AbstractListInputComponent = /** @class */ (function (_super) {
19
19
  */
20
20
  // We have to register it as a disposable so it ditches any listeners when we're disposed.
21
21
  _this.inputModel = _this.registerDisposable(new Form.DelegatingListModel());
22
+ _this.setValueIsInitialising = new Guard();
23
+ _this.valueChange = new EventEmitter();
24
+ var when = Dsl.disposeWith(_this).when;
25
+ when(_this.inputModel).changes(function (value) { return _this.valueChange.emit(value); }, {
26
+ initialValue: 'ignore',
27
+ unless: _this.setValueIsInitialising
28
+ });
22
29
  return _this;
23
30
  }
31
+ Object.defineProperty(AbstractListInputComponent.prototype, "value", {
32
+ set: function (value) {
33
+ var _this = this;
34
+ if (!this.listHolder) {
35
+ this.setValueIsInitialising.whileTrue(function () {
36
+ _this.listHolder = new MutableListModel(value);
37
+ _this.listModel = _this.listHolder;
38
+ });
39
+ }
40
+ else {
41
+ this.listHolder.value = value;
42
+ }
43
+ },
44
+ enumerable: true,
45
+ configurable: true
46
+ });
47
+ __decorate([
48
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
49
+ __metadata("design:type", Object)
50
+ ], AbstractListInputComponent.prototype, "listModel", void 0);
51
+ __decorate([
52
+ Input(),
53
+ __metadata("design:type", Array),
54
+ __metadata("design:paramtypes", [Array])
55
+ ], AbstractListInputComponent.prototype, "value", null);
56
+ __decorate([
57
+ Output(),
58
+ __metadata("design:type", Object)
59
+ ], AbstractListInputComponent.prototype, "valueChange", void 0);
24
60
  AbstractListInputComponent = __decorate([
25
- Component({ template: '' })
61
+ Component({ template: '' }),
62
+ __metadata("design:paramtypes", [])
26
63
  ], AbstractListInputComponent);
27
64
  return AbstractListInputComponent;
28
65
  }(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,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
+ {"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,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAqB,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE;IAAmD,8CAA2B;IAmC5E;QAAA,YACE,iBAAO,SAMR;QArCD;;;;;;;;;WASG;QACD,0FAA0F;QACnF,gBAAU,GAAG,KAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,mBAAmB,EAAK,CAAC,CAAC;QAEzE,4BAAsB,GAAG,IAAI,KAAK,EAAE,CAAC;QAe1B,iBAAW,GAAG,IAAI,YAAY,EAAO,CAAC;QAI/C,IAAA,kCAAI,CAA2B;QACvC,IAAI,CAAC,KAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAA,KAAK,IAAI,OAAA,KAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAA5B,CAA4B,EAAE;YACnE,YAAY,EAAE,QAAQ;YACtB,MAAM,EAAE,KAAI,CAAC,sBAAsB;SACpC,CAAC,CAAC;;IACL,CAAC;IArBQ,sBAAI,6CAAK;aAAT,UAAU,KAAU;YAA7B,iBAUC;YATC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBACpB,IAAI,CAAC,sBAAsB,CAAC,SAAS,CAAC;oBACpC,KAAI,CAAC,UAAU,GAAG,IAAI,gBAAgB,CAAI,KAAK,CAAC,CAAC;oBACjD,KAAI,CAAC,SAAS,GAAG,KAAI,CAAC,UAAU,CAAC;gBAEnC,CAAC,CAAC,CAAC;aACJ;iBAAM;gBACL,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;aAC/B;QACH,CAAC;;;OAAA;IA5BD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;iEACG;IAkB/C;QAAR,KAAK,EAAE;;;2DAUP;IAES;QAAT,MAAM,EAAE;;mEAAgD;IAjC9C,0BAA0B;QADtC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;;OACf,0BAA0B,CA2CtC;IAAD,iCAAC;CAAA,AA3CD,CAAmD,sBAAsB,GA2CxE;SA3CY,0BAA0B","sourcesContent":["/* tslint:disable:no-input-rename */\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { Dsl, Form, Guard, IMutableListModel, MutableListModel, TrackExternal } 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: 'inputModel' })\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 readonly inputModel = this.registerDisposable(new Form.DelegatingListModel<T>());\n\n private setValueIsInitialising = new Guard();\n private listHolder: MutableListModel<T>;\n\n @Input() set value(value: T[]) {\n if (!this.listHolder) {\n this.setValueIsInitialising.whileTrue(() => {\n this.listHolder = new MutableListModel<T>(value);\n this.listModel = this.listHolder;\n\n });\n } else {\n this.listHolder.value = value;\n }\n }\n\n @Output() readonly valueChange = new EventEmitter<T[]>();\n\n constructor() {\n super();\n const { when } = Dsl.disposeWith(this);\n when(this.inputModel).changes(value => this.valueChange.emit(value), {\n initialValue: 'ignore',\n unless: this.setValueIsInitialising\n });\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 } from '@angular/core';
4
- import { Form } from '@coolon/pectin';
3
+ import { Component, EventEmitter, Input, Output } from '@angular/core';
4
+ import { Dsl, Form, Guard, MutableValueModel, TrackExternal } from '@coolon/pectin';
5
5
  import { AbstractInputComponent } from './abstract-input.component';
6
6
  var AbstractValueInputComponent = /** @class */ (function (_super) {
7
7
  __extends(AbstractValueInputComponent, _super);
@@ -19,8 +19,41 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
19
19
  */
20
20
  // We have to register it as a disposable so it ditches any listeners when we're disposed.
21
21
  _this.inputModel = _this.registerDisposable(new Form.DelegatingValueModel());
22
+ _this.setValueIsInitialising = new Guard();
23
+ _this.valueChange = new EventEmitter();
24
+ var when = Dsl.disposeWith(_this).when;
25
+ when(_this.inputModel).changes(function (value) { return _this.valueChange.emit(value); }, { initialValue: 'ignore', unless: _this.setValueIsInitialising });
22
26
  return _this;
23
27
  }
28
+ Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
29
+ set: function (value) {
30
+ var _this = this;
31
+ if (!this.valueHolder) {
32
+ this.setValueIsInitialising.whileTrue(function () {
33
+ _this.valueHolder = new MutableValueModel(value);
34
+ _this.valueModel = _this.valueHolder;
35
+ });
36
+ }
37
+ else {
38
+ this.valueHolder.value = value;
39
+ }
40
+ },
41
+ enumerable: true,
42
+ configurable: true
43
+ });
44
+ __decorate([
45
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
46
+ __metadata("design:type", Object)
47
+ ], AbstractValueInputComponent.prototype, "valueModel", void 0);
48
+ __decorate([
49
+ Input(),
50
+ __metadata("design:type", Object),
51
+ __metadata("design:paramtypes", [Object])
52
+ ], AbstractValueInputComponent.prototype, "value", null);
53
+ __decorate([
54
+ Output(),
55
+ __metadata("design:type", Object)
56
+ ], AbstractValueInputComponent.prototype, "valueChange", void 0);
24
57
  AbstractValueInputComponent = __decorate([
25
58
  Component({ template: '' }),
26
59
  __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,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,SACR;QAfD;;;;;;;;;WASG;QACD,0FAA0F;QACnF,gBAAU,GAAG,KAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,oBAAoB,EAAK,CAAC,CAAC;;IAIlF,CAAC;IAjBU,2BAA2B;QADvC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;;OACf,2BAA2B,CAkBvC;IAAD,kCAAC;CAAA,AAlBD,CAAoD,sBAAsB,GAkBzE;SAlBY,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 }\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,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAsB,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACxG,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE;IAAoD,+CAAyB;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* tslint:disable:no-input-rename */\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { Dsl, Form, Guard, IMutableValueModel, MutableValueModel, TrackExternal } 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: 'inputModel' })\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 readonly inputModel = this.registerDisposable(new Form.DelegatingValueModel<T>());\n\n private setValueIsInitialising = new Guard();\n private valueHolder: MutableValueModel<T>;\n\n @Input() set value(value: T) {\n if (!this.valueHolder) {\n this.setValueIsInitialising.whileTrue(() => {\n this.valueHolder = new MutableValueModel<T>(value);\n this.valueModel = this.valueHolder;\n })\n } else {\n this.valueHolder.value = value;\n }\n }\n @Output() readonly valueChange = new EventEmitter<T>();\n\n constructor() {\n super();\n const { when } = Dsl.disposeWith(this);\n when(this.inputModel).changes(value => this.valueChange.emit(value), { initialValue: 'ignore', unless: this.setValueIsInitialising});\n }\n}\n"]}
@@ -1,21 +1,18 @@
1
1
  import { __decorate, __extends, __metadata } from "tslib";
2
2
  import { Component, Input } from '@angular/core';
3
- import { TrackExternal } from '@coolon/pectin';
4
3
  import { AbstractValueInputComponent } from '../abstract-value-input.component';
5
4
  var CheckboxInputComponent = /** @class */ (function (_super) {
6
5
  __extends(CheckboxInputComponent, _super);
7
6
  function CheckboxInputComponent() {
8
7
  var _this = _super.call(this) || this;
8
+ // @Input() @TrackExternal({ delegateTo: 'inputModel' })
9
+ // valueModel: Form.ValueModelBase<boolean> | IMutableValueModel<boolean>;
9
10
  _this.color = 'accent';
10
11
  _this.labelPosition = 'after';
11
12
  return _this;
12
13
  }
13
14
  CheckboxInputComponent.prototype.ngOnInit = function () {
14
15
  };
15
- __decorate([
16
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
17
- __metadata("design:type", Object)
18
- ], CheckboxInputComponent.prototype, "valueModel", void 0);
19
16
  __decorate([
20
17
  Input(),
21
18
  __metadata("design:type", String)
@@ -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;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,kUAA8C;;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;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,kUAA8C;;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"]}
@@ -11,10 +11,6 @@ var MultipleSelectInputComponent = /** @class */ (function (_super) {
11
11
  }
12
12
  MultipleSelectInputComponent.prototype.ngOnInit = function () {
13
13
  };
14
- __decorate([
15
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
16
- __metadata("design:type", Object)
17
- ], MultipleSelectInputComponent.prototype, "listModel", void 0);
18
14
  __decorate([
19
15
  Input(), TrackExternal(),
20
16
  __metadata("design:type", ListModel)
@@ -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;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,wnCAAqD;;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
+ {"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;IAuBtF;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;IAzBD;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;IArB1G,4BAA4B;QALxC,SAAS,CAAC;YACT,QAAQ,EAAE,2BAA2B;YACrC,wnCAAqD;;SAEtD,CAAC;;OACW,4BAA4B,CA8BxC;IAAD,mCAAC;CAAA,AA9BD,CAA2D,0BAA0B,GA8BpF;SA9BY,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()\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,21 +1,18 @@
1
1
  import { __decorate, __extends, __metadata } from "tslib";
2
2
  import { Component, Input } from '@angular/core';
3
- import { TrackExternal } from '@coolon/pectin';
4
3
  import { AbstractValueInputComponent } from '../abstract-value-input.component';
5
4
  var NumberInputComponent = /** @class */ (function (_super) {
6
5
  __extends(NumberInputComponent, _super);
7
6
  function NumberInputComponent() {
8
7
  var _this = _super.call(this) || this;
8
+ // @Input() @TrackExternal({ delegateTo: 'inputModel' })
9
+ // valueModel: Form.ValueModelBase<number> | IMutableValueModel<number>;
9
10
  _this.min = Number.MIN_SAFE_INTEGER;
10
11
  _this.max = Number.MAX_SAFE_INTEGER;
11
12
  return _this;
12
13
  }
13
14
  NumberInputComponent.prototype.ngOnInit = function () {
14
15
  };
15
- __decorate([
16
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
17
- __metadata("design:type", Object)
18
- ], NumberInputComponent.prototype, "valueModel", void 0);
19
16
  __decorate([
20
17
  Input(),
21
18
  __metadata("design:type", Object)
@@ -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;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,orBAA4C;;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;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,orBAA4C;;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,18 +1,15 @@
1
1
  import { __decorate, __extends, __metadata } from "tslib";
2
- import { Component, Input } from '@angular/core';
3
- import { TrackExternal } from '@coolon/pectin';
2
+ import { Component } from '@angular/core';
4
3
  import { AbstractValueInputComponent } from '../abstract-value-input.component';
5
4
  var PasswordInputComponent = /** @class */ (function (_super) {
6
5
  __extends(PasswordInputComponent, _super);
6
+ // @Input() @TrackExternal({ delegateTo: 'inputModel' })
7
+ // valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
7
8
  function PasswordInputComponent() {
8
9
  return _super.call(this) || this;
9
10
  }
10
11
  PasswordInputComponent.prototype.ngOnInit = function () {
11
12
  };
12
- __decorate([
13
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
14
- __metadata("design:type", Object)
15
- ], PasswordInputComponent.prototype, "valueModel", void 0);
16
13
  PasswordInputComponent = __decorate([
17
14
  Component({
18
15
  selector: 'aup-password-input',
@@ -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,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,ioBAA8C;;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,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,ioBAA8C;;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"]}
@@ -17,10 +17,6 @@ var SelectInputComponent = /** @class */ (function (_super) {
17
17
  }
18
18
  SelectInputComponent.prototype.ngOnInit = function () {
19
19
  };
20
- __decorate([
21
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
22
- __metadata("design:type", Object)
23
- ], SelectInputComponent.prototype, "valueModel", void 0);
24
20
  __decorate([
25
21
  Input(), TrackExternal(),
26
22
  __metadata("design:type", ListModel)
@@ -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;;;;;GAKG;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;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,imCAA4C;;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 * </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;AAEhF;;;;;GAKG;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,imCAA4C;;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 * </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"]}
@@ -15,10 +15,6 @@ var StringInputComponent = /** @class */ (function (_super) {
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);
22
18
  __decorate([
23
19
  Input(), TrackExternal({ defaultValue: false }),
24
20
  __metadata("design:type", ValueModel)
@@ -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;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,wwBAA4C;;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
+ {"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,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;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,wwBAA4C;;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.valueModel.value = null;\n });\n this.clearCommand.disableWhile(chain.stringValue(this.valueModel).isBlank());\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -1,21 +1,18 @@
1
1
  import { __decorate, __extends, __metadata } from "tslib";
2
2
  import { Component, Input } from '@angular/core';
3
- import { TrackExternal } from '@coolon/pectin';
4
3
  import { AbstractValueInputComponent } from '../abstract-value-input.component';
5
4
  var TextInputComponent = /** @class */ (function (_super) {
6
5
  __extends(TextInputComponent, _super);
7
6
  function TextInputComponent() {
8
7
  var _this = _super.call(this) || this;
8
+ // @Input() @TrackExternal({ delegateTo: 'inputModel' })
9
+ // valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
9
10
  _this.rows = 2;
10
11
  return _this;
11
12
  // const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
12
13
  }
13
14
  TextInputComponent.prototype.ngOnInit = function () {
14
15
  };
15
- __decorate([
16
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
17
- __metadata("design:type", Object)
18
- ], TextInputComponent.prototype, "valueModel", void 0);
19
16
  __decorate([
20
17
  Input(),
21
18
  __metadata("design:type", Object)
@@ -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;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,ssBAA0C;;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;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,ssBAA0C;;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 +1 @@
1
- {"version":3,"file":"cell-editors.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/cell-editors.ts"],"names":[],"mappings":"","sourcesContent":["import { Form, ListModel, ValueModel } from '@coolon/pectin';\n\nexport interface CellEditorComponent<T> {\n valueModel: ValueModel<T> | Form.ValueModelBase<T>\n\n requestFocus?();\n}\n\nexport interface CellListEditorComponent<T> {\n listModel: ListModel<T> | Form.ListModelBase<T>\n\n requestFocus?();\n}\n"]}
1
+ {"version":3,"file":"cell-editors.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/table/cell-editors.ts"],"names":[],"mappings":"","sourcesContent":["import { Form, IMutableListModel, IMutableValueModel, ListModel, ValueModel } from '@coolon/pectin';\n\nexport interface CellEditorComponent<T> {\n valueModel: IMutableValueModel<T> | Form.ValueModelBase<T>\n\n requestFocus?();\n}\n\nexport interface CellListEditorComponent<T> {\n listModel: IMutableListModel<T> | Form.ListModelBase<T>\n\n requestFocus?();\n}\n"]}
@@ -13,7 +13,7 @@ import { MatButtonModule } from '@angular/material/button';
13
13
  import { MatCheckboxModule } from '@angular/material/checkbox';
14
14
  import { MatIconModule } from '@angular/material/icon';
15
15
  import { MatTableModule } from '@angular/material/table';
16
- import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, FocusManager, Form, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MutableValueModel, MultipleSelectionModel, MutableListModel, DirtyTrackingForm, DelegatingCommand, Deferred, Trace, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
16
+ import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, FocusManager, Form, Guard, MutableListModel, MutableValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Trace, DebugContext, Binding, Functions } from '@coolon/pectin';
17
17
  import { assert as assert$1, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
18
18
  import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
19
19
  import ___default, { isEqual, isNil } from 'lodash';
@@ -622,7 +622,7 @@ AbstractInputComponent = __decorate([
622
622
 
623
623
  let AbstractListInputComponent = class AbstractListInputComponent extends AbstractInputComponent {
624
624
  constructor() {
625
- super(...arguments);
625
+ super();
626
626
  /**
627
627
  * A backing model for all our @Input() valueModel properties which should be defined as follows.
628
628
  *
@@ -635,10 +635,42 @@ let AbstractListInputComponent = class AbstractListInputComponent extends Abstra
635
635
  */
636
636
  // We have to register it as a disposable so it ditches any listeners when we're disposed.
637
637
  this.inputModel = this.registerDisposable(new Form.DelegatingListModel());
638
+ this.setValueIsInitialising = new Guard();
639
+ this.valueChange = new EventEmitter();
640
+ const { when } = Dsl.disposeWith(this);
641
+ when(this.inputModel).changes(value => this.valueChange.emit(value), {
642
+ initialValue: 'ignore',
643
+ unless: this.setValueIsInitialising
644
+ });
645
+ }
646
+ set value(value) {
647
+ if (!this.listHolder) {
648
+ this.setValueIsInitialising.whileTrue(() => {
649
+ this.listHolder = new MutableListModel(value);
650
+ this.listModel = this.listHolder;
651
+ });
652
+ }
653
+ else {
654
+ this.listHolder.value = value;
655
+ }
638
656
  }
639
657
  };
658
+ __decorate([
659
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
660
+ __metadata("design:type", Object)
661
+ ], AbstractListInputComponent.prototype, "listModel", void 0);
662
+ __decorate([
663
+ Input(),
664
+ __metadata("design:type", Array),
665
+ __metadata("design:paramtypes", [Array])
666
+ ], AbstractListInputComponent.prototype, "value", null);
667
+ __decorate([
668
+ Output(),
669
+ __metadata("design:type", Object)
670
+ ], AbstractListInputComponent.prototype, "valueChange", void 0);
640
671
  AbstractListInputComponent = __decorate([
641
- Component({ template: '' })
672
+ Component({ template: '' }),
673
+ __metadata("design:paramtypes", [])
642
674
  ], AbstractListInputComponent);
643
675
 
644
676
  let AbstractValueInputComponent = class AbstractValueInputComponent extends AbstractInputComponent {
@@ -656,8 +688,36 @@ let AbstractValueInputComponent = class AbstractValueInputComponent extends Abst
656
688
  */
657
689
  // We have to register it as a disposable so it ditches any listeners when we're disposed.
658
690
  this.inputModel = this.registerDisposable(new Form.DelegatingValueModel());
691
+ this.setValueIsInitialising = new Guard();
692
+ this.valueChange = new EventEmitter();
693
+ const { when } = Dsl.disposeWith(this);
694
+ when(this.inputModel).changes(value => this.valueChange.emit(value), { initialValue: 'ignore', unless: this.setValueIsInitialising });
695
+ }
696
+ set value(value) {
697
+ if (!this.valueHolder) {
698
+ this.setValueIsInitialising.whileTrue(() => {
699
+ this.valueHolder = new MutableValueModel(value);
700
+ this.valueModel = this.valueHolder;
701
+ });
702
+ }
703
+ else {
704
+ this.valueHolder.value = value;
705
+ }
659
706
  }
660
707
  };
708
+ __decorate([
709
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
710
+ __metadata("design:type", Object)
711
+ ], AbstractValueInputComponent.prototype, "valueModel", void 0);
712
+ __decorate([
713
+ Input(),
714
+ __metadata("design:type", Object),
715
+ __metadata("design:paramtypes", [Object])
716
+ ], AbstractValueInputComponent.prototype, "value", null);
717
+ __decorate([
718
+ Output(),
719
+ __metadata("design:type", Object)
720
+ ], AbstractValueInputComponent.prototype, "valueChange", void 0);
661
721
  AbstractValueInputComponent = __decorate([
662
722
  Component({ template: '' }),
663
723
  __metadata("design:paramtypes", [])
@@ -666,16 +726,14 @@ AbstractValueInputComponent = __decorate([
666
726
  let CheckboxInputComponent = class CheckboxInputComponent extends AbstractValueInputComponent {
667
727
  constructor() {
668
728
  super();
729
+ // @Input() @TrackExternal({ delegateTo: 'inputModel' })
730
+ // valueModel: Form.ValueModelBase<boolean> | IMutableValueModel<boolean>;
669
731
  this.color = 'accent';
670
732
  this.labelPosition = 'after';
671
733
  }
672
734
  ngOnInit() {
673
735
  }
674
736
  };
675
- __decorate([
676
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
677
- __metadata("design:type", Object)
678
- ], CheckboxInputComponent.prototype, "valueModel", void 0);
679
737
  __decorate([
680
738
  Input(),
681
739
  __metadata("design:type", String)
@@ -696,16 +754,14 @@ CheckboxInputComponent = __decorate([
696
754
  let NumberInputComponent = class NumberInputComponent extends AbstractValueInputComponent {
697
755
  constructor() {
698
756
  super();
757
+ // @Input() @TrackExternal({ delegateTo: 'inputModel' })
758
+ // valueModel: Form.ValueModelBase<number> | IMutableValueModel<number>;
699
759
  this.min = Number.MIN_SAFE_INTEGER;
700
760
  this.max = Number.MAX_SAFE_INTEGER;
701
761
  }
702
762
  ngOnInit() {
703
763
  }
704
764
  };
705
- __decorate([
706
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
707
- __metadata("design:type", Object)
708
- ], NumberInputComponent.prototype, "valueModel", void 0);
709
765
  __decorate([
710
766
  Input(),
711
767
  __metadata("design:type", Object)
@@ -724,16 +780,14 @@ NumberInputComponent = __decorate([
724
780
  ], NumberInputComponent);
725
781
 
726
782
  let PasswordInputComponent = class PasswordInputComponent extends AbstractValueInputComponent {
783
+ // @Input() @TrackExternal({ delegateTo: 'inputModel' })
784
+ // valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
727
785
  constructor() {
728
786
  super();
729
787
  }
730
788
  ngOnInit() {
731
789
  }
732
790
  };
733
- __decorate([
734
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
735
- __metadata("design:type", Object)
736
- ], PasswordInputComponent.prototype, "valueModel", void 0);
737
791
  PasswordInputComponent = __decorate([
738
792
  Component({
739
793
  selector: 'aup-password-input',
@@ -757,10 +811,6 @@ let SelectInputComponent = class SelectInputComponent extends AbstractValueInput
757
811
  ngOnInit() {
758
812
  }
759
813
  };
760
- __decorate([
761
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
762
- __metadata("design:type", Object)
763
- ], SelectInputComponent.prototype, "valueModel", void 0);
764
814
  __decorate([
765
815
  Input(), TrackExternal(),
766
816
  __metadata("design:type", ListModel)
@@ -810,10 +860,6 @@ let StringInputComponent = class StringInputComponent extends AbstractValueInput
810
860
  ngOnInit() {
811
861
  }
812
862
  };
813
- __decorate([
814
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
815
- __metadata("design:type", Object)
816
- ], StringInputComponent.prototype, "valueModel", void 0);
817
863
  __decorate([
818
864
  Input(), TrackExternal({ defaultValue: false }),
819
865
  __metadata("design:type", ValueModel)
@@ -834,16 +880,14 @@ StringInputComponent = __decorate([
834
880
  let TextInputComponent = class TextInputComponent extends AbstractValueInputComponent {
835
881
  constructor() {
836
882
  super();
883
+ // @Input() @TrackExternal({ delegateTo: 'inputModel' })
884
+ // valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
837
885
  this.rows = 2;
838
886
  // const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
839
887
  }
840
888
  ngOnInit() {
841
889
  }
842
890
  };
843
- __decorate([
844
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
845
- __metadata("design:type", Object)
846
- ], TextInputComponent.prototype, "valueModel", void 0);
847
891
  __decorate([
848
892
  Input(),
849
893
  __metadata("design:type", Object)
@@ -2061,10 +2105,6 @@ let MultipleSelectInputComponent = class MultipleSelectInputComponent extends Ab
2061
2105
  ngOnInit() {
2062
2106
  }
2063
2107
  };
2064
- __decorate([
2065
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
2066
- __metadata("design:type", Object)
2067
- ], MultipleSelectInputComponent.prototype, "listModel", void 0);
2068
2108
  __decorate([
2069
2109
  Input(), TrackExternal(),
2070
2110
  __metadata("design:type", ListModel)