@coolon/angular-ui-powerups 2.0.0-alpha.12 → 2.0.0-alpha.13

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.
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  /* tslint:disable:no-input-rename */
3
3
  import { Component, EventEmitter, Input, Output } from '@angular/core';
4
- import { Dsl, Form, Guard, MutableListModel, TrackExternal } from '@coolon/pectin';
4
+ import { DebugContext, Dsl, Form, Guard, MutableListModel, TrackExternal } from '@coolon/pectin';
5
5
  import { AbstractInputComponent } from './abstract-input.component';
6
6
  let AbstractListInputComponent = class AbstractListInputComponent extends AbstractInputComponent {
7
7
  constructor() {
@@ -18,24 +18,25 @@ let AbstractListInputComponent = class AbstractListInputComponent extends Abstra
18
18
  */
19
19
  // We have to register it as a disposable so it ditches any listeners when we're disposed.
20
20
  this.inputModel = this.registerDisposable(new Form.DelegatingListModel());
21
- this.setValueIsInitialising = new Guard();
21
+ this.setValueIsInProgress = new Guard();
22
22
  this.valueChange = new EventEmitter();
23
23
  const { when } = Dsl.disposeWith(this);
24
24
  when(this.inputModel).changes(value => this.valueChange.emit(value), {
25
25
  initialValue: 'ignore',
26
- unless: this.setValueIsInitialising
26
+ unless: this.setValueIsInProgress
27
27
  });
28
+ DebugContext.tag(this.inputModel, `${this.constructor.name}.inputModel`);
28
29
  }
29
30
  set value(value) {
30
- if (!this.listHolder) {
31
- this.setValueIsInitialising.whileTrue(() => {
31
+ this.setValueIsInProgress.whileTrue(() => {
32
+ if (!this.listHolder) {
32
33
  this.listHolder = new MutableListModel(value);
33
34
  this.listModel = this.listHolder;
34
- });
35
- }
36
- else {
37
- this.listHolder.value = value;
38
- }
35
+ }
36
+ else {
37
+ this.listHolder.value = value;
38
+ }
39
+ });
39
40
  }
40
41
  };
41
42
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-list-input.component.js","sourceRoot":"ng://@coolon/angular-ui-power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U,CAAC,KAAK,GAAG,KAAK,CAAC;SAC/B;IACH,CAAC;CAYF,CAAA;AAxCC;IADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;6DACG;AAkB/C;IAAR,KAAK,EAAE;;;uDAUP;AAES;IAAT,MAAM,EAAE;;+DAAgD;AAjC9C,0BAA0B;IADtC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;;GACf,0BAA0B,CA2CtC;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
+ {"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,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAqB,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpH,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,IAAa,0BAA0B,GAAvC,MAAa,0BAA8B,SAAQ,sBAA2B;IAkC5E;QACE,KAAK,EAAE,CAAC;QA9BV;;;;;;;;;WASG;QACD,0FAA0F;QACnF,eAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,mBAAmB,EAAK,CAAC,CAAC;QAEzE,yBAAoB,GAAG,IAAI,KAAK,EAAE,CAAC;QAcxB,gBAAW,GAAG,IAAI,YAAY,EAAO,CAAC;QAIvD,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YACnE,YAAY,EAAE,QAAQ;YACtB,MAAM,EAAE,IAAI,CAAC,oBAAoB;SAClC,CAAC,CAAC;QACH,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,aAAa,CAAC,CAAC;IAC3E,CAAC;IArBQ,IAAI,KAAK,CAAC,KAAU;QAC3B,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,EAAE;YACvC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBACpB,IAAI,CAAC,UAAU,GAAG,IAAI,gBAAgB,CAAI,KAAK,CAAC,CAAC;gBACjD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;aAClC;iBAAM;gBACL,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;aAC/B;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CAaF,CAAA;AAxCC;IADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;6DACG;AAkB/C;IAAR,KAAK,EAAE;;;uDASP;AAES;IAAT,MAAM,EAAE;;+DAAgD;AAhC9C,0BAA0B;IADtC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;;GACf,0BAA0B,CA2CtC;SA3CY,0BAA0B","sourcesContent":["/* tslint:disable:no-input-rename */\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { DebugContext, 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 setValueIsInProgress = new Guard();\n private listHolder: MutableListModel<T>;\n\n @Input() set value(value: T[]) {\n this.setValueIsInProgress.whileTrue(() => {\n if (!this.listHolder) {\n this.listHolder = new MutableListModel<T>(value);\n this.listModel = this.listHolder;\n } else {\n this.listHolder.value = value;\n }\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.setValueIsInProgress\n });\n DebugContext.tag(this.inputModel, `${this.constructor.name}.inputModel`);\n }\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"AbstractListInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./abstract-input.component","name":"AbstractInputComponent","line":6,"character":51},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"template":""}]}],"members":{"listModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":8,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":8,"character":12},"arguments":[{"delegateTo":"inputModel"}]}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"valueChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":39,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"AbstractListInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./abstract-input.component","name":"AbstractInputComponent","line":6,"character":51},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"template":""}]}],"members":{"listModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":8,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":8,"character":12},"arguments":[{"delegateTo":"inputModel"}]}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"valueChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":38,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}]}}}}]
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  /* tslint:disable:no-input-rename */
3
3
  import { Component, EventEmitter, Input, Output } from '@angular/core';
4
- import { Dsl, Form, Guard, MutableValueModel, TrackExternal } from '@coolon/pectin';
4
+ import { DebugContext, Dsl, Form, Guard, MutableValueModel, TrackExternal } from '@coolon/pectin';
5
5
  import { AbstractInputComponent } from './abstract-input.component';
6
6
  let AbstractValueInputComponent = class AbstractValueInputComponent extends AbstractInputComponent {
7
7
  constructor() {
@@ -25,6 +25,7 @@ let AbstractValueInputComponent = class AbstractValueInputComponent extends Abst
25
25
  initialValue: 'ignore',
26
26
  unless: this.setValueInProgress
27
27
  });
28
+ DebugContext.tag(this.inputModel, `${this.constructor.name}.inputModel`);
28
29
  }
29
30
  set value(value) {
30
31
  // we never fire events during an external set value operation. This allows
@@ -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,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAsB,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACxG,OAAO,EAAE,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,2BAA2B;IADvC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;;GACf,2BAA2B,CA6CvC;SA7CY,2BAA2B","sourcesContent":["/* 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 protected setValueInProgress = new Guard();\n private valueHolder: MutableValueModel<T>;\n\n @Input() set value(value: T) {\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 this.setValueInProgress.whileTrue(() => {\n if (!this.valueHolder) {\n this.valueHolder = new MutableValueModel<T>(value);\n this.valueModel = this.valueHolder;\n } else {\n this.valueHolder.value = value;\n }\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.setValueInProgress\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-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AiB,CAAI,KAAK,CAAC,CAAC;gBACnD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;aACpC;iBAAM;gBACL,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;aAChC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CAaF,CAAA;AA3CC;IADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;+DACM;AAkBlD;IAAR,KAAK,EAAE;;;wDAYP;AAES;IAAT,MAAM,EAAE;;gEAA8C;AAnC5C,2BAA2B;IADvC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;;GACf,2BAA2B,CA8CvC;SA9CY,2BAA2B","sourcesContent":["/* tslint:disable:no-input-rename */\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { DebugContext, 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 protected setValueInProgress = new Guard();\n private valueHolder: MutableValueModel<T>;\n\n @Input() set value(value: T) {\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 this.setValueInProgress.whileTrue(() => {\n if (!this.valueHolder) {\n this.valueHolder = new MutableValueModel<T>(value);\n this.valueModel = this.valueHolder;\n } else {\n this.valueHolder.value = value;\n }\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.setValueInProgress\n });\n DebugContext.tag(this.inputModel, `${this.constructor.name}.inputModel`);\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __extends, __metadata } from "tslib";
2
2
  /* tslint:disable:no-input-rename */
3
3
  import { Component, EventEmitter, Input, Output } from '@angular/core';
4
- import { Dsl, Form, Guard, MutableListModel, TrackExternal } from '@coolon/pectin';
4
+ import { DebugContext, 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);
@@ -19,27 +19,28 @@ 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();
22
+ _this.setValueIsInProgress = new Guard();
23
23
  _this.valueChange = new EventEmitter();
24
24
  var when = Dsl.disposeWith(_this).when;
25
25
  when(_this.inputModel).changes(function (value) { return _this.valueChange.emit(value); }, {
26
26
  initialValue: 'ignore',
27
- unless: _this.setValueIsInitialising
27
+ unless: _this.setValueIsInProgress
28
28
  });
29
+ DebugContext.tag(_this.inputModel, _this.constructor.name + ".inputModel");
29
30
  return _this;
30
31
  }
31
32
  Object.defineProperty(AbstractListInputComponent.prototype, "value", {
32
33
  set: function (value) {
33
34
  var _this = this;
34
- if (!this.listHolder) {
35
- this.setValueIsInitialising.whileTrue(function () {
35
+ this.setValueIsInProgress.whileTrue(function () {
36
+ if (!_this.listHolder) {
36
37
  _this.listHolder = new MutableListModel(value);
37
38
  _this.listModel = _this.listHolder;
38
- });
39
- }
40
- else {
41
- this.listHolder.value = value;
42
- }
39
+ }
40
+ else {
41
+ _this.listHolder.value = value;
42
+ }
43
+ });
43
44
  },
44
45
  enumerable: true,
45
46
  configurable: true
@@ -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,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
+ {"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,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAqB,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpH,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE;IAAmD,8CAA2B;IAkC5E;QAAA,YACE,iBAAO,SAOR;QArCD;;;;;;;;;WASG;QACD,0FAA0F;QACnF,gBAAU,GAAG,KAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,mBAAmB,EAAK,CAAC,CAAC;QAEzE,0BAAoB,GAAG,IAAI,KAAK,EAAE,CAAC;QAcxB,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,oBAAoB;SAClC,CAAC,CAAC;QACH,YAAY,CAAC,GAAG,CAAC,KAAI,CAAC,UAAU,EAAK,KAAI,CAAC,WAAW,CAAC,IAAI,gBAAa,CAAC,CAAC;;IAC3E,CAAC;IArBQ,sBAAI,6CAAK;aAAT,UAAU,KAAU;YAA7B,iBASC;YARC,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC;gBAClC,IAAI,CAAC,KAAI,CAAC,UAAU,EAAE;oBACpB,KAAI,CAAC,UAAU,GAAG,IAAI,gBAAgB,CAAI,KAAK,CAAC,CAAC;oBACjD,KAAI,CAAC,SAAS,GAAG,KAAI,CAAC,UAAU,CAAC;iBAClC;qBAAM;oBACL,KAAI,CAAC,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;iBAC/B;YACH,CAAC,CAAC,CAAC;QACL,CAAC;;;OAAA;IA3BD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;iEACG;IAkB/C;QAAR,KAAK,EAAE;;;2DASP;IAES;QAAT,MAAM,EAAE;;mEAAgD;IAhC9C,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 { DebugContext, 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 setValueIsInProgress = new Guard();\n private listHolder: MutableListModel<T>;\n\n @Input() set value(value: T[]) {\n this.setValueIsInProgress.whileTrue(() => {\n if (!this.listHolder) {\n this.listHolder = new MutableListModel<T>(value);\n this.listModel = this.listHolder;\n } else {\n this.listHolder.value = value;\n }\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.setValueIsInProgress\n });\n DebugContext.tag(this.inputModel, `${this.constructor.name}.inputModel`);\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __extends, __metadata } from "tslib";
2
2
  /* tslint:disable:no-input-rename */
3
3
  import { Component, EventEmitter, Input, Output } from '@angular/core';
4
- import { Dsl, Form, Guard, MutableValueModel, TrackExternal } from '@coolon/pectin';
4
+ import { DebugContext, 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);
@@ -26,6 +26,7 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
26
26
  initialValue: 'ignore',
27
27
  unless: _this.setValueInProgress
28
28
  });
29
+ DebugContext.tag(_this.inputModel, _this.constructor.name + ".inputModel");
29
30
  return _this;
30
31
  }
31
32
  Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-value-input.component.js","sourceRoot":"ng://@coolon/angular-ui-power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BAChC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;;;OAAA;IA9BD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;mEACM;IAkBlD;QAAR,KAAK,EAAE;;;4DAYP;IAES;QAAT,MAAM,EAAE;;oEAA8C;IAnC5C,2BAA2B;QADvC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;;OACf,2BAA2B,CA6CvC;IAAD,kCAAC;CAAA,AA7CD,CAAoD,sBAAsB,GA6CzE;SA7CY,2BAA2B","sourcesContent":["/* 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 protected setValueInProgress = new Guard();\n private valueHolder: MutableValueModel<T>;\n\n @Input() set value(value: T) {\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 this.setValueInProgress.whileTrue(() => {\n if (!this.valueHolder) {\n this.valueHolder = new MutableValueModel<T>(value);\n this.valueModel = this.valueHolder;\n } else {\n this.valueHolder.value = value;\n }\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.setValueInProgress\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,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAsB,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACtH,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE;IAAoD,+CAAyB;IAqC3E;QAAA,YACE,iBAAO,SAOR;QAxCD;;;;;;;;;WASG;QACD,0FAA0F;QACnF,gBAAU,GAAG,KAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,oBAAoB,EAAK,CAAC,CAAC;QAExE,wBAAkB,GAAG,IAAI,KAAK,EAAE,CAAC;QAiBxB,iBAAW,GAAG,IAAI,YAAY,EAAK,CAAC;QAI7C,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,kBAAkB;SAChC,CAAC,CAAC;QACH,YAAY,CAAC,GAAG,CAAC,KAAI,CAAC,UAAU,EAAK,KAAI,CAAC,WAAW,CAAC,IAAI,gBAAa,CAAC,CAAC;;IAC3E,CAAC;IAxBQ,sBAAI,8CAAK;aAAT,UAAU,KAAQ;YAA3B,iBAYC;YAXC,2EAA2E;YAC3E,gEAAgE;YAChE,gCAAgC;YAChC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC;gBAChC,IAAI,CAAC,KAAI,CAAC,WAAW,EAAE;oBACrB,KAAI,CAAC,WAAW,GAAG,IAAI,iBAAiB,CAAI,KAAK,CAAC,CAAC;oBACnD,KAAI,CAAC,UAAU,GAAG,KAAI,CAAC,WAAW,CAAC;iBACpC;qBAAM;oBACL,KAAI,CAAC,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;iBAChC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;;;OAAA;IA9BD;QADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;;mEACM;IAkBlD;QAAR,KAAK,EAAE;;;4DAYP;IAES;QAAT,MAAM,EAAE;;oEAA8C;IAnC5C,2BAA2B;QADvC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;;OACf,2BAA2B,CA8CvC;IAAD,kCAAC;CAAA,AA9CD,CAAoD,sBAAsB,GA8CzE;SA9CY,2BAA2B","sourcesContent":["/* tslint:disable:no-input-rename */\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { DebugContext, 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 protected setValueInProgress = new Guard();\n private valueHolder: MutableValueModel<T>;\n\n @Input() set value(value: T) {\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 this.setValueInProgress.whileTrue(() => {\n if (!this.valueHolder) {\n this.valueHolder = new MutableValueModel<T>(value);\n this.valueModel = this.valueHolder;\n } else {\n this.valueHolder.value = value;\n }\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.setValueInProgress\n });\n DebugContext.tag(this.inputModel, `${this.constructor.name}.inputModel`);\n }\n}\n"]}
@@ -17,7 +17,7 @@ import { MatTableModule } from '@angular/material/table';
17
17
  import { MatTooltipModule } from '@angular/material/tooltip';
18
18
  import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
19
19
  import { fas } from '@fortawesome/free-solid-svg-icons';
20
- 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';
20
+ import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, FocusManager, Form, Guard, DebugContext, MutableListModel, MutableValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Trace, Binding, Functions } from '@coolon/pectin';
21
21
  import ___default, { isEqual, isNil } from 'lodash';
22
22
  import { assert as assert$1, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
23
23
  import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
@@ -636,24 +636,25 @@ let AbstractListInputComponent = class AbstractListInputComponent extends Abstra
636
636
  */
637
637
  // We have to register it as a disposable so it ditches any listeners when we're disposed.
638
638
  this.inputModel = this.registerDisposable(new Form.DelegatingListModel());
639
- this.setValueIsInitialising = new Guard();
639
+ this.setValueIsInProgress = new Guard();
640
640
  this.valueChange = new EventEmitter();
641
641
  const { when } = Dsl.disposeWith(this);
642
642
  when(this.inputModel).changes(value => this.valueChange.emit(value), {
643
643
  initialValue: 'ignore',
644
- unless: this.setValueIsInitialising
644
+ unless: this.setValueIsInProgress
645
645
  });
646
+ DebugContext.tag(this.inputModel, `${this.constructor.name}.inputModel`);
646
647
  }
647
648
  set value(value) {
648
- if (!this.listHolder) {
649
- this.setValueIsInitialising.whileTrue(() => {
649
+ this.setValueIsInProgress.whileTrue(() => {
650
+ if (!this.listHolder) {
650
651
  this.listHolder = new MutableListModel(value);
651
652
  this.listModel = this.listHolder;
652
- });
653
- }
654
- else {
655
- this.listHolder.value = value;
656
- }
653
+ }
654
+ else {
655
+ this.listHolder.value = value;
656
+ }
657
+ });
657
658
  }
658
659
  };
659
660
  __decorate([
@@ -696,6 +697,7 @@ let AbstractValueInputComponent = class AbstractValueInputComponent extends Abst
696
697
  initialValue: 'ignore',
697
698
  unless: this.setValueInProgress
698
699
  });
700
+ DebugContext.tag(this.inputModel, `${this.constructor.name}.inputModel`);
699
701
  }
700
702
  set value(value) {
701
703
  // we never fire events during an external set value operation. This allows