@coolon/angular-ui-powerups 1.0.1 → 1.1.0

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 (132) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +446 -169
  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.d.ts +26 -25
  7. package/coolon-angular-ui-powerups.metadata.json +1 -1
  8. package/esm2015/coolon-angular-ui-powerups.js +24 -23
  9. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  10. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  11. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  12. package/esm2015/lib/components/components.module.js +9 -2
  13. package/esm2015/lib/components/components.module.js.map +1 -1
  14. package/esm2015/lib/components/components.module.metadata.json +1 -1
  15. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  16. package/esm2015/lib/components/forms/abstract-input.component.js +12 -1
  17. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  18. package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
  19. package/esm2015/lib/components/forms/number-input/number-input.component.js +2 -2
  20. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  21. package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
  22. package/esm2015/lib/components/forms/password-input/password-input.component.js +2 -2
  23. package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
  24. package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
  25. package/esm2015/lib/components/forms/select-input/select-input.component.js +3 -3
  26. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  27. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  28. package/esm2015/lib/components/forms/string-input/string-input.component.js +3 -3
  29. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  30. package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
  31. package/esm2015/lib/components/index.js +1 -0
  32. package/esm2015/lib/components/index.js.map +1 -1
  33. package/esm2015/lib/components/index.metadata.json +1 -1
  34. package/esm2015/lib/components/switch-case/switch-case.component.js +124 -0
  35. package/esm2015/lib/components/switch-case/switch-case.component.js.map +1 -0
  36. package/esm2015/lib/components/switch-case/switch-case.component.metadata.json +1 -0
  37. package/esm2015/lib/components/switch-case/switch-case.component.ngfactory.js.map +1 -0
  38. package/esm2015/lib/components/switch-case/switch-case.component.scss.shim.ngstyle.js.map +1 -0
  39. package/esm2015/lib/directives/command.directive.js +4 -4
  40. package/esm2015/lib/directives/command.directive.js.map +1 -1
  41. package/esm2015/lib/directives/focus-binding.directive.js +3 -3
  42. package/esm2015/lib/directives/focus-binding.directive.js.map +1 -1
  43. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +1 -1
  44. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.metadata.json +1 -1
  45. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +1 -1
  46. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.metadata.json +1 -1
  47. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +1 -1
  48. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.metadata.json +1 -1
  49. package/esm2015/lib/place/components/abstract-place-navigation.component.js +3 -3
  50. package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  51. package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
  52. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js +2 -2
  53. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
  54. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.metadata.json +1 -1
  55. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +3 -3
  56. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  57. package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
  58. package/esm2015/lib/place/guards/place.guard.js +4 -3
  59. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  60. package/esm2015/lib/place/place-component.js +2 -2
  61. package/esm2015/lib/place/place-component.js.map +1 -1
  62. package/esm2015/lib/place/place-history.js +116 -13
  63. package/esm2015/lib/place/place-history.js.map +1 -1
  64. package/esm2015/lib/place/place-history.metadata.json +1 -1
  65. package/esm2015/lib/place/place-router.js +13 -6
  66. package/esm2015/lib/place/place-router.js.map +1 -1
  67. package/esm2015/lib/place/place-router.metadata.json +1 -1
  68. package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
  69. package/esm2015/lib/place/route/parameter-definition.class.js +10 -9
  70. package/esm2015/lib/place/route/parameter-definition.class.js.map +1 -1
  71. package/esm2015/lib/place/route/visit-sanitiser.js +14 -6
  72. package/esm2015/lib/place/route/visit-sanitiser.js.map +1 -1
  73. package/esm2015/lib/place/route/visit-sanitiser.metadata.json +1 -1
  74. package/esm5/coolon-angular-ui-powerups.js +24 -23
  75. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  76. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  77. package/esm5/lib/components/components.module.js +9 -2
  78. package/esm5/lib/components/components.module.js.map +1 -1
  79. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  80. package/esm5/lib/components/forms/abstract-input.component.js +12 -1
  81. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  82. package/esm5/lib/components/forms/number-input/number-input.component.js +2 -2
  83. package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
  84. package/esm5/lib/components/forms/password-input/password-input.component.js +2 -2
  85. package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
  86. package/esm5/lib/components/forms/select-input/select-input.component.js +3 -3
  87. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  88. package/esm5/lib/components/forms/string-input/string-input.component.js +3 -3
  89. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  90. package/esm5/lib/components/index.js +1 -0
  91. package/esm5/lib/components/index.js.map +1 -1
  92. package/esm5/lib/components/switch-case/switch-case.component.js +144 -0
  93. package/esm5/lib/components/switch-case/switch-case.component.js.map +1 -0
  94. package/esm5/lib/components/switch-case/switch-case.component.ngfactory.js.map +1 -0
  95. package/esm5/lib/components/switch-case/switch-case.component.scss.shim.ngstyle.js.map +1 -0
  96. package/esm5/lib/directives/command.directive.js +4 -4
  97. package/esm5/lib/directives/command.directive.js.map +1 -1
  98. package/esm5/lib/directives/focus-binding.directive.js +3 -3
  99. package/esm5/lib/directives/focus-binding.directive.js.map +1 -1
  100. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +1 -1
  101. package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +1 -1
  102. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +1 -1
  103. package/esm5/lib/place/components/abstract-place-navigation.component.js +3 -3
  104. package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  105. package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js +2 -2
  106. package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
  107. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +3 -3
  108. package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  109. package/esm5/lib/place/guards/place.guard.js +5 -4
  110. package/esm5/lib/place/guards/place.guard.js.map +1 -1
  111. package/esm5/lib/place/place-component.js +2 -2
  112. package/esm5/lib/place/place-component.js.map +1 -1
  113. package/esm5/lib/place/place-history.js +117 -11
  114. package/esm5/lib/place/place-history.js.map +1 -1
  115. package/esm5/lib/place/place-router.js +13 -7
  116. package/esm5/lib/place/place-router.js.map +1 -1
  117. package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
  118. package/esm5/lib/place/route/parameter-definition.class.js +11 -11
  119. package/esm5/lib/place/route/parameter-definition.class.js.map +1 -1
  120. package/esm5/lib/place/route/visit-sanitiser.js +14 -6
  121. package/esm5/lib/place/route/visit-sanitiser.js.map +1 -1
  122. package/fesm2015/coolon-angular-ui-powerups.js +377 -127
  123. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  124. package/fesm5/coolon-angular-ui-powerups.js +405 -135
  125. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  126. package/lib/components/forms/abstract-input.component.d.ts +11 -1
  127. package/lib/components/index.d.ts +1 -0
  128. package/lib/components/switch-case/switch-case.component.d.ts +32 -0
  129. package/lib/place/place-history.d.ts +17 -3
  130. package/lib/place/route/parameter-definition.class.d.ts +1 -1
  131. package/lib/place/route/visit-sanitiser.d.ts +3 -1
  132. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { Component, Input } from '@angular/core';
3
- import { UseDelegate } from '@coolon/pectin';
3
+ import { TrackExternal } from '@coolon/pectin';
4
4
  import { AbstractInputComponent } from '../abstract-input.component';
5
5
  let PasswordInputComponent = class PasswordInputComponent extends AbstractInputComponent {
6
6
  constructor() {
@@ -10,7 +10,7 @@ let PasswordInputComponent = class PasswordInputComponent extends AbstractInputC
10
10
  }
11
11
  };
12
12
  __decorate([
13
- Input(), UseDelegate({ useExisting: "delegatingFormValueModel" }),
13
+ Input(), TrackExternal({ delegateTo: "delegatingFormValueModel" }),
14
14
  __metadata("design:type", Object)
15
15
  ], PasswordInputComponent.prototype, "valueModel", void 0);
16
16
  PasswordInputComponent = __decorate([
@@ -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,EAA+D,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC1G,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAOrE,IAAa,sBAAsB,GAAnC,MAAa,sBAAuB,SAAQ,sBAA8B;IAKxE;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;AATC;IADC,KAAK,EAAE,EAAE,WAAW,CAAC,EAAC,WAAW,EAAE,0BAA0B,EAAC,CAAC;;0DACD;AAHpD,sBAAsB;IALlC,SAAS,CAAC;QACT,QAAQ,EAAE,oBAAoB;QAC9B,2nBAA8C;;KAE/C,CAAC;;GACW,sBAAsB,CAYlC;SAZY,sBAAsB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { DelegatingFormValueModel, FormValueModel, MutableValueModel, UseDelegate } from '@coolon/pectin';\nimport { AbstractInputComponent } from '../abstract-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 AbstractInputComponent<string> implements OnInit {\n\n @Input() @UseDelegate({useExisting: \"delegatingFormValueModel\"})\n valueModel: FormValueModel<string> | MutableValueModel<string>;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
1
+ {"version":3,"file":"password-input.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/forms/password-input/password-input.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAA+D,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5G,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAOrE,IAAa,sBAAsB,GAAnC,MAAa,sBAAuB,SAAQ,sBAA8B;IAKxE;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;AATC;IADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAC,UAAU,EAAE,0BAA0B,EAAC,CAAC;;0DACF;AAHpD,sBAAsB;IALlC,SAAS,CAAC;QACT,QAAQ,EAAE,oBAAoB;QAC9B,2nBAA8C;;KAE/C,CAAC;;GACW,sBAAsB,CAYlC;SAZY,sBAAsB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { DelegatingFormValueModel, FormValueModel, MutableValueModel, TrackExternal } from '@coolon/pectin';\nimport { AbstractInputComponent } from '../abstract-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 AbstractInputComponent<string> implements OnInit {\n\n @Input() @TrackExternal({delegateTo: \"delegatingFormValueModel\"})\n valueModel: FormValueModel<string> | MutableValueModel<string>;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"PasswordInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-input.component","name":"AbstractInputComponent","line":9,"character":44},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-password-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n","styles":[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],"members":{"valueModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"UseDelegate","line":11,"character":12},"arguments":[{"useExisting":"delegatingFormValueModel"}]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"PasswordInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-input.component","name":"AbstractInputComponent","line":9,"character":44},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-password-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n","styles":[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],"members":{"valueModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":11,"character":12},"arguments":[{"delegateTo":"delegatingFormValueModel"}]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { Component, ContentChild, Input, TemplateRef } from '@angular/core';
3
- import { ListModel, StoreInListModel, UseDelegate } from '@coolon/pectin';
3
+ import { ListModel, StoreInListModel, TrackExternal } from '@coolon/pectin';
4
4
  import { AbstractInputComponent } from '../abstract-input.component';
5
5
  let SelectInputComponent = class SelectInputComponent extends AbstractInputComponent {
6
6
  constructor() {
@@ -11,11 +11,11 @@ let SelectInputComponent = class SelectInputComponent extends AbstractInputCompo
11
11
  }
12
12
  };
13
13
  __decorate([
14
- Input(), UseDelegate({ useExisting: "delegatingFormValueModel" }),
14
+ Input(), TrackExternal({ delegateTo: "delegatingFormValueModel" }),
15
15
  __metadata("design:type", Object)
16
16
  ], SelectInputComponent.prototype, "valueModel", void 0);
17
17
  __decorate([
18
- Input(), UseDelegate(),
18
+ Input(), TrackExternal(),
19
19
  __metadata("design:type", ListModel)
20
20
  ], SelectInputComponent.prototype, "optionsModel", void 0);
21
21
  __decorate([
@@ -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,EAGL,SAAS,EAET,gBAAgB,EAChB,WAAW,EACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAOrE,IAAa,oBAAoB,GAAjC,MAAa,oBAA8B,SAAQ,sBAAyB;IA0B1E;QACE,KAAK,EAAE,CAAC;QAHV,sBAAiB,GAAuB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAIrH,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;AA9BC;IADC,KAAK,EAAE,EAAE,WAAW,CAAC,EAAC,WAAW,EAAE,0BAA0B,EAAC,CAAC;;wDACX;AAGrD;IADC,KAAK,EAAE,EAAE,WAAW,EAAE;8BACT,SAAS;0DAAI;AAG3B;IADC,KAAK,EAAE,EAAE,gBAAgB,CAAC,cAAc,CAAC;;qDAC7B;AAGb;IADC,KAAK,EAAE;;yDACa;AAGrB;IADC,KAAK,EAAE;;sDACU;AAGlB;IADC,YAAY,CAAC,gBAAgB,CAAC;8BACZ,WAAW;+DAAM;AAGpC;IADC,YAAY,CAAC,mBAAmB,CAAC;8BACZ,WAAW;kEAAM;AAGvC;IADC,KAAK,EAAE;;+DAC6G;AAxB1G,oBAAoB;IALhC,SAAS,CAAC;QACT,QAAQ,EAAE,kBAAkB;QAC5B,2lCAA4C;;KAE7C,CAAC;;GACW,oBAAoB,CAiChC;SAjCY,oBAAoB","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport {\n DelegatingFormValueModel,\n FormValueModel,\n ListModel,\n MutableValueModel,\n StoreInListModel,\n UseDelegate\n} from '@coolon/pectin';\nimport { AbstractInputComponent } from '../abstract-input.component';\n\n@Component({\n selector: 'aup-select-input',\n templateUrl: './select-input.component.html',\n styleUrls: ['./select-input.component.scss']\n})\nexport class SelectInputComponent<T = any> extends AbstractInputComponent<T> implements OnInit {\n\n @Input() @UseDelegate({useExisting: \"delegatingFormValueModel\"})\n valueModel: FormValueModel<T> | MutableValueModel<T>;\n\n @Input() @UseDelegate()\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,EAGL,SAAS,EAET,gBAAgB,EAChB,aAAa,EACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAOrE,IAAa,oBAAoB,GAAjC,MAAa,oBAA8B,SAAQ,sBAAyB;IA0B1E;QACE,KAAK,EAAE,CAAC;QAHV,sBAAiB,GAAuB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAIrH,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;AA9BC;IADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAC,UAAU,EAAE,0BAA0B,EAAC,CAAC;;wDACZ;AAGrD;IADC,KAAK,EAAE,EAAE,aAAa,EAAE;8BACX,SAAS;0DAAI;AAG3B;IADC,KAAK,EAAE,EAAE,gBAAgB,CAAC,cAAc,CAAC;;qDAC7B;AAGb;IADC,KAAK,EAAE;;yDACa;AAGrB;IADC,KAAK,EAAE;;sDACU;AAGlB;IADC,YAAY,CAAC,gBAAgB,CAAC;8BACZ,WAAW;+DAAM;AAGpC;IADC,YAAY,CAAC,mBAAmB,CAAC;8BACZ,WAAW;kEAAM;AAGvC;IADC,KAAK,EAAE;;+DAC6G;AAxB1G,oBAAoB;IALhC,SAAS,CAAC;QACT,QAAQ,EAAE,kBAAkB;QAC5B,2lCAA4C;;KAE7C,CAAC;;GACW,oBAAoB,CAiChC;SAjCY,oBAAoB","sourcesContent":["import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';\nimport {\n DelegatingFormValueModel,\n FormValueModel,\n ListModel,\n MutableValueModel,\n StoreInListModel,\n TrackExternal\n} from '@coolon/pectin';\nimport { AbstractInputComponent } from '../abstract-input.component';\n\n@Component({\n selector: 'aup-select-input',\n templateUrl: './select-input.component.html',\n styleUrls: ['./select-input.component.scss']\n})\nexport class SelectInputComponent<T = any> extends AbstractInputComponent<T> implements OnInit {\n\n @Input() @TrackExternal({delegateTo: \"delegatingFormValueModel\"})\n valueModel: FormValueModel<T> | MutableValueModel<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 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"SelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-input.component","name":"AbstractInputComponent","line":16,"character":51},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-select-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}"]}]}],"members":{"valueModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"UseDelegate","line":18,"character":12},"arguments":[{"useExisting":"delegatingFormValueModel"}]}]}],"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"UseDelegate","line":21,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":24,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"allowNil":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"optionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":33,"character":3},"arguments":["optionTemplate"]}]}],"nilOptionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":36,"character":3},"arguments":["nilOptionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"SelectInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-input.component","name":"AbstractInputComponent","line":16,"character":51},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-select-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n","styles":[":host{display:inline-block}mat-form-field{width:100%}"]}]}],"members":{"valueModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":18,"character":12},"arguments":[{"delegateTo":"delegatingFormValueModel"}]}]}],"optionsModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":21,"character":12}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":24,"character":12},"arguments":["optionsModel"]}]}],"optionLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"allowNil":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"optionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":33,"character":3},"arguments":["optionTemplate"]}]}],"nilOptionTemplateRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":36,"character":3},"arguments":["nilOptionTemplate"]}]}],"optionLabelFormat":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { Component, Input } from '@angular/core';
3
- import { Command, Dsl, StoreInValueModel, UseDelegate, ValueModel } from '@coolon/pectin';
3
+ import { Command, Dsl, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';
4
4
  import { AbstractInputComponent } from '../abstract-input.component';
5
5
  let StringInputComponent = class StringInputComponent extends AbstractInputComponent {
6
6
  constructor() {
@@ -15,11 +15,11 @@ let StringInputComponent = class StringInputComponent extends AbstractInputCompo
15
15
  }
16
16
  };
17
17
  __decorate([
18
- Input(), UseDelegate({ useExisting: "delegatingFormValueModel" }),
18
+ Input(), TrackExternal({ delegateTo: "delegatingFormValueModel" }),
19
19
  __metadata("design:type", Object)
20
20
  ], StringInputComponent.prototype, "valueModel", void 0);
21
21
  __decorate([
22
- Input(), UseDelegate({ defaultValue: false }),
22
+ Input(), TrackExternal({ defaultValue: false }),
23
23
  __metadata("design:type", ValueModel)
24
24
  ], StringInputComponent.prototype, "enableClearModel", void 0);
25
25
  __decorate([
@@ -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,EACL,OAAO,EACP,GAAG,EAGH,iBAAiB,EACjB,WAAW,EACX,UAAU,EACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAOrE,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,sBAA8B;IAatE;QACE,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzF,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE;YACtC,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,IAAI,CAAC;QAC/B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;AAtBC;IADC,KAAK,EAAE,EAAE,WAAW,CAAC,EAAC,WAAW,EAAE,0BAA0B,EAAC,CAAC;;wDACD;AAG/D;IADC,KAAK,EAAE,EAAE,WAAW,CAAC,EAAC,YAAY,EAAE,KAAK,EAAC,CAAC;8BAC1B,UAAU;8DAAU;AAGtC;IADC,KAAK,EAAE,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;;yDAC1B;AATV,oBAAoB;IALhC,SAAS,CAAC;QACT,QAAQ,EAAE,kBAAkB;QAC5B,ovBAA4C;;KAE7C,CAAC;;GACW,oBAAoB,CAyBhC;SAzBY,oBAAoB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport {\n Command, DelegatingFormValueModel,\n Dsl,\n FormValueModel,\n MutableValueModel,\n StoreInValueModel,\n UseDelegate,\n ValueModel\n} from '@coolon/pectin';\nimport { AbstractInputComponent } from '../abstract-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 AbstractInputComponent<string> implements OnInit {\n\n @Input() @UseDelegate({useExisting: \"delegatingFormValueModel\"})\n valueModel: FormValueModel<string> | MutableValueModel<string>;\n\n @Input() @UseDelegate({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,EACL,OAAO,EACP,GAAG,EAGH,iBAAiB,EACjB,aAAa,EACb,UAAU,EACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAOrE,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,sBAA8B;IAatE;QACE,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzF,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE;YACtC,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,IAAI,CAAC;QAC/B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;AAtBC;IADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAC,UAAU,EAAE,0BAA0B,EAAC,CAAC;;wDACF;AAG/D;IADC,KAAK,EAAE,EAAE,aAAa,CAAC,EAAC,YAAY,EAAE,KAAK,EAAC,CAAC;8BAC5B,UAAU;8DAAU;AAGtC;IADC,KAAK,EAAE,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;;yDAC1B;AATV,oBAAoB;IALhC,SAAS,CAAC;QACT,QAAQ,EAAE,kBAAkB;QAC5B,ovBAA4C;;KAE7C,CAAC;;GACW,oBAAoB,CAyBhC;SAzBY,oBAAoB","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport {\n Command, DelegatingFormValueModel,\n Dsl,\n FormValueModel,\n MutableValueModel,\n StoreInValueModel,\n TrackExternal,\n ValueModel\n} from '@coolon/pectin';\nimport { AbstractInputComponent } from '../abstract-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 AbstractInputComponent<string> implements OnInit {\n\n @Input() @TrackExternal({delegateTo: \"delegatingFormValueModel\"})\n valueModel: FormValueModel<string> | MutableValueModel<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 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"StringInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-input.component","name":"AbstractInputComponent","line":17,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":12,"character":1},"arguments":[{"selector":"aup-string-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n\n","styles":[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}button[disabled]{visibility:hidden}"]}]}],"members":{"valueModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"UseDelegate","line":19,"character":12},"arguments":[{"useExisting":"delegatingFormValueModel"}]}]}],"enableClearModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"UseDelegate","line":22,"character":12},"arguments":[{"defaultValue":false}]}]}],"enableClear":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":25,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":25,"character":12},"arguments":["enableClearModel"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"StringInputComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-input.component","name":"AbstractInputComponent","line":17,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":12,"character":1},"arguments":[{"selector":"aup-string-input","template":"<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n\n","styles":[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}button[disabled]{visibility:hidden}"]}]}],"members":{"valueModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":19,"character":12},"arguments":[{"delegateTo":"delegatingFormValueModel"}]}]}],"enableClearModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":22,"character":12},"arguments":[{"defaultValue":false}]}]}],"enableClear":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":25,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":25,"character":12},"arguments":["enableClearModel"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
@@ -11,6 +11,7 @@ export * from "./forms/select-input/select-input.component";
11
11
  export * from "./forms/string-input/string-input.component";
12
12
  export * from "./noop/noop.component";
13
13
  export * from "./scroll-container/scroll-container.component";
14
+ export * from "./switch-case/switch-case.component";
14
15
  export * from "./types/bounds.class";
15
16
  export * from "./types/dimension.class";
16
17
  export * from "./types/point.class";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components.module\";\nexport * from \"./disposable-component\";\nexport * from \"./resize-aware.component\";\nexport * from \"./forms/abstract-input.component\";\nexport * from \"./forms/number-input/number-input.component\";\nexport * from \"./forms/password-input/password-input.component\";\nexport * from \"./forms/select-input/select-input.component\";\nexport * from \"./forms/string-input/string-input.component\";\nexport * from \"./noop/noop.component\";\nexport * from \"./scroll-container/scroll-container.component\";\nexport * from \"./types/bounds.class\";\nexport * from \"./types/dimension.class\";\nexport * from \"./types/point.class\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qCAAqC,CAAC;AACpD,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components.module\";\nexport * from \"./disposable-component\";\nexport * from \"./resize-aware.component\";\nexport * from \"./forms/abstract-input.component\";\nexport * from \"./forms/number-input/number-input.component\";\nexport * from \"./forms/password-input/password-input.component\";\nexport * from \"./forms/select-input/select-input.component\";\nexport * from \"./forms/string-input/string-input.component\";\nexport * from \"./noop/noop.component\";\nexport * from \"./scroll-container/scroll-container.component\";\nexport * from \"./switch-case/switch-case.component\";\nexport * from \"./types/bounds.class\";\nexport * from \"./types/dimension.class\";\nexport * from \"./types/point.class\";\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./components.module"},{"from":"./disposable-component"},{"from":"./resize-aware.component"},{"from":"./forms/abstract-input.component"},{"from":"./forms/number-input/number-input.component"},{"from":"./forms/password-input/password-input.component"},{"from":"./forms/select-input/select-input.component"},{"from":"./forms/string-input/string-input.component"},{"from":"./noop/noop.component"},{"from":"./scroll-container/scroll-container.component"},{"from":"./types/bounds.class"},{"from":"./types/dimension.class"},{"from":"./types/point.class"}]}]
1
+ [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./components.module"},{"from":"./disposable-component"},{"from":"./resize-aware.component"},{"from":"./forms/abstract-input.component"},{"from":"./forms/number-input/number-input.component"},{"from":"./forms/password-input/password-input.component"},{"from":"./forms/select-input/select-input.component"},{"from":"./forms/string-input/string-input.component"},{"from":"./noop/noop.component"},{"from":"./scroll-container/scroll-container.component"},{"from":"./switch-case/switch-case.component"},{"from":"./types/bounds.class"},{"from":"./types/dimension.class"},{"from":"./types/point.class"}]}]
@@ -0,0 +1,124 @@
1
+ var SwitchCaseWhenDirective_1, SwitchCaseDefaultDirective_1;
2
+ import { __decorate, __metadata } from "tslib";
3
+ import { AfterContentInit, ChangeDetectorRef, Component, ContentChildren, Directive, Input, OnInit, QueryList, TemplateRef } from '@angular/core';
4
+ import { Dsl, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';
5
+ import { DisposableComponent } from '../disposable-component';
6
+ export class SwitchCaseOption {
7
+ constructor(templateRef) {
8
+ this.templateRef = templateRef;
9
+ }
10
+ get name() {
11
+ return this.constructor.name;
12
+ }
13
+ }
14
+ let SwitchCaseWhenDirective = SwitchCaseWhenDirective_1 = class SwitchCaseWhenDirective extends SwitchCaseOption {
15
+ constructor(templateRef) {
16
+ super(templateRef);
17
+ this.isDefault = false;
18
+ }
19
+ matches(value) {
20
+ return this.aupSwitchCaseWhen === value;
21
+ }
22
+ };
23
+ SwitchCaseWhenDirective.ctorParameters = () => [
24
+ { type: TemplateRef }
25
+ ];
26
+ __decorate([
27
+ Input(),
28
+ __metadata("design:type", Object)
29
+ ], SwitchCaseWhenDirective.prototype, "aupSwitchCaseWhen", void 0);
30
+ SwitchCaseWhenDirective = SwitchCaseWhenDirective_1 = __decorate([
31
+ Directive({
32
+ selector: '[aupSwitchCaseWhen]',
33
+ providers: [{ provide: SwitchCaseOption, useExisting: SwitchCaseWhenDirective_1 }]
34
+ }),
35
+ __metadata("design:paramtypes", [TemplateRef])
36
+ ], SwitchCaseWhenDirective);
37
+ export { SwitchCaseWhenDirective };
38
+ let SwitchCaseDefaultDirective = SwitchCaseDefaultDirective_1 = class SwitchCaseDefaultDirective extends SwitchCaseOption {
39
+ constructor(templateRef) {
40
+ super(templateRef);
41
+ this.isDefault = true;
42
+ }
43
+ matches(value) {
44
+ return false;
45
+ }
46
+ };
47
+ SwitchCaseDefaultDirective.ctorParameters = () => [
48
+ { type: TemplateRef }
49
+ ];
50
+ SwitchCaseDefaultDirective = SwitchCaseDefaultDirective_1 = __decorate([
51
+ Directive({
52
+ selector: '[aupSwitchCaseDefault]',
53
+ providers: [{ provide: SwitchCaseOption, useExisting: SwitchCaseDefaultDirective_1 }]
54
+ }),
55
+ __metadata("design:paramtypes", [TemplateRef])
56
+ ], SwitchCaseDefaultDirective);
57
+ export { SwitchCaseDefaultDirective };
58
+ let SwitchCaseComponent = class SwitchCaseComponent extends DisposableComponent {
59
+ constructor(cdr) {
60
+ super();
61
+ this.cdr = cdr;
62
+ this.selectedIndex = 0;
63
+ }
64
+ ngOnInit() {
65
+ }
66
+ ngAfterContentInit() {
67
+ const subscription = this.switchCaseOptions.changes.subscribe(change => this.updateSelection());
68
+ this.onDispose(() => subscription.unsubscribe());
69
+ const { chain, when } = Dsl.disposeWith(this);
70
+ when.valueOf(this.switchModel).changes(() => this.updateSelection(), { initialValue: 'triggerChange' });
71
+ this.cdr.detectChanges();
72
+ }
73
+ updateSelection() {
74
+ const matchingIndicies = [];
75
+ this.switchCaseOptions.forEach((option, index) => {
76
+ if (option.matches(this.switchModel.value)) {
77
+ matchingIndicies.push(index);
78
+ }
79
+ });
80
+ if (matchingIndicies.length > 1) {
81
+ console.warn(`found ${matchingIndicies.length} matching case values, displaying the first.`);
82
+ }
83
+ if (matchingIndicies.length === 0) {
84
+ this.switchCaseOptions.forEach((option, index) => {
85
+ matchingIndicies.push(index);
86
+ });
87
+ if (matchingIndicies.length > 1) {
88
+ console.warn(`found ${matchingIndicies.length} default case values, displaying the first.`);
89
+ }
90
+ }
91
+ if (matchingIndicies.length > 0) {
92
+ this.selectedIndex = matchingIndicies[0];
93
+ }
94
+ else {
95
+ console.warn(`found no matching or default case values.`);
96
+ this.selectedIndex = -1;
97
+ }
98
+ }
99
+ };
100
+ SwitchCaseComponent.ctorParameters = () => [
101
+ { type: ChangeDetectorRef }
102
+ ];
103
+ __decorate([
104
+ Input(), TrackExternal(),
105
+ __metadata("design:type", ValueModel)
106
+ ], SwitchCaseComponent.prototype, "switchModel", void 0);
107
+ __decorate([
108
+ Input(), StoreInValueModel('switchModel'),
109
+ __metadata("design:type", Object)
110
+ ], SwitchCaseComponent.prototype, "switch", void 0);
111
+ __decorate([
112
+ ContentChildren(SwitchCaseOption),
113
+ __metadata("design:type", QueryList)
114
+ ], SwitchCaseComponent.prototype, "switchCaseOptions", void 0);
115
+ SwitchCaseComponent = __decorate([
116
+ Component({
117
+ selector: 'aup-switch-case',
118
+ template: "<mat-tab-group class=\"content-wrapper\" no-tab-header full-height-tabs [selectedIndex]=\"selectedIndex\">\n <mat-tab *ngFor=\"let option of switchCaseOptions\">\n <ng-template [ngTemplateOutlet]=\"option.templateRef\"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n",
119
+ styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
120
+ }),
121
+ __metadata("design:paramtypes", [ChangeDetectorRef])
122
+ ], SwitchCaseComponent);
123
+ export { SwitchCaseComponent };
124
+ //# sourceMappingURL=switch-case.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch-case.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/switch-case/switch-case.component.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,SAAS,EACT,KAAK,EACL,MAAM,EACN,SAAS,EACT,WAAW,EACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,MAAM,OAAgB,gBAAgB;IAIpC,YAAqB,WAAgC;QAAhC,gBAAW,GAAX,WAAW,CAAqB;IACrD,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IAC/B,CAAC;CAGF;AAMD,IAAa,uBAAuB,+BAApC,MAAa,uBAA2B,SAAQ,gBAAmB;IAIjE,YAAY,WAAgC;QAC1C,KAAK,CAAC,WAAW,CAAC,CA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,CAAC,aAAa,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;SAC1C;aAAM;YACL,OAAO,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;YAC1D,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC;SACzB;IACH,CAAC;CACF,CAAA;;YAxC0B,iBAAiB;;AAV1C;IADC,KAAK,EAAE,EAAE,aAAa,EAAE;8BACZ,UAAU;wDAAI;AAG3B;IADC,KAAK,EAAE,EAAE,iBAAiB,CAAC,aAAa,CAAC;;mDAChC;AAGV;IADC,eAAe,CAAC,gBAAgB,CAAC;8BACf,SAAS;8DAAsB;AATvC,mBAAmB;IAL/B,SAAS,CAAC;QACT,QAAQ,EAAE,iBAAiB;QAC3B,+RAA2C;;KAE5C,CAAC;qCAcyB,iBAAiB;GAb/B,mBAAmB,CAqD/B;SArDY,mBAAmB","sourcesContent":["import {\n AfterContentInit,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n Input,\n OnInit,\n QueryList,\n TemplateRef\n} from '@angular/core';\n\nimport { Dsl, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';\nimport { DisposableComponent } from '../disposable-component';\n\n\nexport abstract class SwitchCaseOption<T> {\n\n abstract readonly isDefault: boolean;\n\n constructor(readonly templateRef: TemplateRef<Object>) {\n }\n\n get name() {\n return this.constructor.name;\n }\n\n abstract matches(value: T): boolean;\n}\n\n@Directive({\n selector: '[aupSwitchCaseWhen]',\n providers: [{ provide: SwitchCaseOption, useExisting: SwitchCaseWhenDirective }]\n})\nexport class SwitchCaseWhenDirective<T> extends SwitchCaseOption<T> {\n @Input() aupSwitchCaseWhen: T;\n readonly isDefault = false;\n\n constructor(templateRef: TemplateRef<Object>) {\n super(templateRef);\n }\n\n matches(value: T): boolean {\n return this.aupSwitchCaseWhen === value;\n }\n}\n\n@Directive({\n selector: '[aupSwitchCaseDefault]',\n providers: [{ provide: SwitchCaseOption, useExisting: SwitchCaseDefaultDirective }]\n})\nexport class SwitchCaseDefaultDirective<T> extends SwitchCaseOption<T> {\n readonly isDefault = true;\n\n constructor(templateRef: TemplateRef<Object>) {\n super(templateRef);\n }\n\n matches(value: T): boolean {\n return false;\n }\n}\n\n\n@Component({\n selector: 'aup-switch-case',\n templateUrl: './switch-case.component.html',\n styleUrls: ['./switch-case.component.scss']\n})\nexport class SwitchCaseComponent<T> extends DisposableComponent implements OnInit, AfterContentInit {\n\n @Input() @TrackExternal()\n switchModel: ValueModel<T>;\n\n @Input() @StoreInValueModel('switchModel')\n switch: T;\n\n @ContentChildren(SwitchCaseOption)\n switchCaseOptions: QueryList<SwitchCaseOption<T>>;\n\n selectedIndex = 0;\n\n constructor(private cdr: ChangeDetectorRef) {\n super();\n }\n\n ngOnInit(): void {\n }\n\n ngAfterContentInit(): void {\n const subscription = this.switchCaseOptions.changes.subscribe(change => this.updateSelection());\n this.onDispose(() => subscription.unsubscribe());\n const { chain, when } = Dsl.disposeWith(this);\n when.valueOf(this.switchModel).changes(() => this.updateSelection(), { initialValue: 'triggerChange' });\n this.cdr.detectChanges();\n }\n\n private updateSelection() {\n const matchingIndicies = [];\n this.switchCaseOptions.forEach((option, index) => {\n if (option.matches(this.switchModel.value)) {\n matchingIndicies.push(index);\n }\n });\n if (matchingIndicies.length > 1) {\n console.warn(`found ${matchingIndicies.length} matching case values, displaying the first.`);\n }\n if (matchingIndicies.length === 0) {\n this.switchCaseOptions.forEach((option, index) => {\n matchingIndicies.push(index);\n });\n if (matchingIndicies.length > 1) {\n console.warn(`found ${matchingIndicies.length} default case values, displaying the first.`);\n }\n }\n if (matchingIndicies.length > 0) {\n this.selectedIndex = matchingIndicies[0];\n } else {\n console.warn(`found no matching or default case values.`);\n this.selectedIndex = -1;\n }\n }\n}\n\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"SwitchCaseOption":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"TemplateRef","line":20,"character":36,"arguments":[{"__symbolic":"reference","name":"Object"}]}]}],"matches":[{"__symbolic":"method"}]}},"SwitchCaseWhenDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"SwitchCaseOption"},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":30,"character":1},"arguments":[{"selector":"[aupSwitchCaseWhen]","providers":[{"provide":{"__symbolic":"reference","name":"SwitchCaseOption"},"useExisting":{"__symbolic":"reference","name":"SwitchCaseWhenDirective"}}]}]}],"members":{"aupSwitchCaseWhen":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"TemplateRef","line":20,"character":36,"arguments":[{"__symbolic":"reference","name":"Object"}]}]}],"matches":[{"__symbolic":"method"}]}},"SwitchCaseDefaultDirective":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"SwitchCaseOption"},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":47,"character":1},"arguments":[{"selector":"[aupSwitchCaseDefault]","providers":[{"provide":{"__symbolic":"reference","name":"SwitchCaseOption"},"useExisting":{"__symbolic":"reference","name":"SwitchCaseDefaultDirective"}}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"TemplateRef","line":20,"character":36,"arguments":[{"__symbolic":"reference","name":"Object"}]}]}],"matches":[{"__symbolic":"method"}]}},"SwitchCaseComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../disposable-component","name":"DisposableComponent","line":69,"character":44},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":64,"character":1},"arguments":[{"selector":"aup-switch-case","template":"<mat-tab-group class=\"content-wrapper\" no-tab-header full-height-tabs [selectedIndex]=\"selectedIndex\">\n <mat-tab *ngFor=\"let option of switchCaseOptions\">\n <ng-template [ngTemplateOutlet]=\"option.templateRef\"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n","styles":[":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]}]}],"members":{"switchModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":71,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":71,"character":12}}]}],"switch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":74,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":74,"character":12},"arguments":["switchModel"]}]}],"switchCaseOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":77,"character":3},"arguments":[{"__symbolic":"reference","name":"SwitchCaseOption"}]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":82,"character":27}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterContentInit":[{"__symbolic":"method"}],"updateSelection":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch-case.component.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/switch-case/switch-case.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch-case.component.scss.shim.ngstyle.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/switch-case/switch-case.component.scss.shim.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -26,7 +26,7 @@ let CommandDirective = class CommandDirective extends GarbageCollector {
26
26
  assert.notNil(this.pectinCommand);
27
27
  if (this.pectinCommand instanceof UnaryCommand) {
28
28
  if (!this._commandParameterProvided) {
29
- lang.illegalState('UnaryCommands required the command parameter to be specified.');
29
+ lang.illegalState('UnaryCommands require the command parameter to be specified.');
30
30
  }
31
31
  }
32
32
  else {
@@ -38,8 +38,8 @@ let CommandDirective = class CommandDirective extends GarbageCollector {
38
38
  ngAfterViewInit() {
39
39
  // for some reason mat-buttons kills the disabled host binding. It works on a regular button but for now
40
40
  // we need to do this.
41
- const { chain } = Dsl.disposeWith(this);
42
- chain(this._commandEnabled).subscribe(enabled => {
41
+ const { when } = Dsl.disposeWith(this);
42
+ when.valueOf(this._commandEnabled).changes(enabled => {
43
43
  if (enabled) {
44
44
  this.elementRef.nativeElement.removeAttribute('disabled');
45
45
  if (this.elementRef.nativeElement.tagName === 'A') {
@@ -52,7 +52,7 @@ let CommandDirective = class CommandDirective extends GarbageCollector {
52
52
  this.elementRef.nativeElement.removeAttribute('href');
53
53
  }
54
54
  }
55
- });
55
+ }, { initialValue: 'triggerChange' });
56
56
  }
57
57
  ngOnDestroy() {
58
58
  this.dispose();
@@ -1 +1 @@
1
- {"version":3,"file":"command.directive.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/command.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,EAAE,MAAM,EAAW,oBAAoB,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAMlH,IAAa,gBAAgB,GAA7B,MAAa,gBAA0B,SAAQ,gBAAgB;IA2B7D,YAAwC,UAAsB;QAC5D,KAAK,EAAE,CAAC;QAD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OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC;;qCACd,KAAK;;mDAYxB;AAjFU,gBAAgB;IAJ5B,SAAS,CAAC;QACT,8CAA8C;QAC9C,QAAQ,EAAE,iBAAiB;KAC5B,CAAC;IA4Ba,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;qCAAqB,UAAU;GA3BnD,gBAAgB,CAkF5B;SAlFY,gBAAgB","sourcesContent":["import { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { assert, Command, DelegatingValueModel, Dsl, GarbageCollector, lang, UnaryCommand } from '@coolon/pectin';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[pectinCommand]'\n})\nexport class CommandDirective<P = any> extends GarbageCollector implements OnInit, OnDestroy, AfterViewInit {\n\n private _command: Command<any> | UnaryCommand<P>;\n private _commandEnabled = new DelegatingValueModel<boolean>().withDefault(false);\n\n @Input()\n set pectinCommand(command: Command<any> | UnaryCommand<P>) {\n this._command = command;\n this._commandEnabled.setDelegate(command ? command.enabled : null);\n }\n get pectinCommand():Command<any> | UnaryCommand<P> {\n return this._command;\n }\n\n private _commandParameter: P;\n private _commandParameterProvided = false;\n\n @Input()\n set commandParameter(value: P) {\n this._commandParameterProvided = true;\n this._commandParameter = value;\n }\n\n get commandParameter(): P {\n return this._commandParameter;\n }\n\n constructor(@Inject(ElementRef) private elementRef: ElementRef) {\n super();\n }\n\n ngOnInit(): void {\n assert.notNil(this.pectinCommand);\n if (this.pectinCommand instanceof UnaryCommand) {\n if (!this._commandParameterProvided) {\n lang.illegalState('UnaryCommands required the command parameter to be specified.');\n }\n } else {\n if (this._commandParameterProvided) {\n lang.illegalState('command parameters are only supported by UnaryCommands');\n }\n }\n }\n\n ngAfterViewInit(): void {\n // for some reason mat-buttons kills the disabled host binding. It works on a regular button but for now\n // we need to do this.\n const { chain } = Dsl.disposeWith(this);\n chain(this._commandEnabled).subscribe(enabled => {\n if (enabled) {\n this.elementRef.nativeElement.removeAttribute('disabled');\n if (this.elementRef.nativeElement.tagName === 'A') {\n this.elementRef.nativeElement.setAttribute('href', 'javascript:void');\n }\n } else {\n this.elementRef.nativeElement.setAttribute('disabled', 'disabled');\n if (this.elementRef.nativeElement.tagName === 'A') {\n this.elementRef.nativeElement.removeAttribute('href');\n }\n }\n });\n }\n\n ngOnDestroy(): void {\n this.dispose();\n }\n\n\n @HostListener('click', ['$event'])\n notifyClick($event: Event) {\n $event.preventDefault();\n $event.stopPropagation();\n if (this.pectinCommand.enabled.value) {\n if (this.pectinCommand instanceof UnaryCommand) {\n this.pectinCommand.withContext({ event: $event }).execute(this.commandParameter);\n } else {\n this.pectinCommand.withContext({ event: $event }).execute();\n }\n } else {\n console.warn('disabled command clicked, ignoring.');\n }\n }\n}\n"]}
1
+ {"version":3,"file":"command.directive.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/command.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,EAAE,MAAM,EAAW,oBAAoB,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAMlH,IAAa,gBAAgB,GAA7B,MAAa,gBAA0B,SAAQ,gBAAgB;IA2B7D,YAAwC,UAAsB;QAC5D,KAAK,EAAE,CAAC;QAD8B,eAAU,GAAV,UAAU,CAAY;QAxBtD,oBAAe,GAAG,IAAI,oBAAoB,EAAW,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAYzE,8BAAyB,GAAG,KAAK,CAAC;IAc1C,CAAC;IAvBD,IAAI,aAAa,CAAC,OAAuC;QACvD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,OAAO,CAAC,CA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AlFY,gBAAgB","sourcesContent":["import { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { assert, Command, DelegatingValueModel, Dsl, GarbageCollector, lang, UnaryCommand } from '@coolon/pectin';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[pectinCommand]'\n})\nexport class CommandDirective<P = any> extends GarbageCollector implements OnInit, OnDestroy, AfterViewInit {\n\n private _command: Command<any> | UnaryCommand<P>;\n private _commandEnabled = new DelegatingValueModel<boolean>().withDefault(false);\n\n @Input()\n set pectinCommand(command: Command<any> | UnaryCommand<P>) {\n this._command = command;\n this._commandEnabled.setDelegate(command ? command.enabled : null);\n }\n get pectinCommand():Command<any> | UnaryCommand<P> {\n return this._command;\n }\n\n private _commandParameter: P;\n private _commandParameterProvided = false;\n\n @Input()\n set commandParameter(value: P) {\n this._commandParameterProvided = true;\n this._commandParameter = value;\n }\n\n get commandParameter(): P {\n return this._commandParameter;\n }\n\n constructor(@Inject(ElementRef) private elementRef: ElementRef) {\n super();\n }\n\n ngOnInit(): void {\n assert.notNil(this.pectinCommand);\n if (this.pectinCommand instanceof UnaryCommand) {\n if (!this._commandParameterProvided) {\n lang.illegalState('UnaryCommands require the command parameter to be specified.');\n }\n } else {\n if (this._commandParameterProvided) {\n lang.illegalState('command parameters are only supported by UnaryCommands');\n }\n }\n }\n\n ngAfterViewInit(): void {\n // for some reason mat-buttons kills the disabled host binding. It works on a regular button but for now\n // we need to do this.\n const { when } = Dsl.disposeWith(this);\n when.valueOf(this._commandEnabled).changes(enabled => {\n if (enabled) {\n this.elementRef.nativeElement.removeAttribute('disabled');\n if (this.elementRef.nativeElement.tagName === 'A') {\n this.elementRef.nativeElement.setAttribute('href', 'javascript:void');\n }\n } else {\n this.elementRef.nativeElement.setAttribute('disabled', 'disabled');\n if (this.elementRef.nativeElement.tagName === 'A') {\n this.elementRef.nativeElement.removeAttribute('href');\n }\n }\n }, {initialValue: 'triggerChange'});\n }\n\n ngOnDestroy(): void {\n this.dispose();\n }\n\n\n @HostListener('click', ['$event'])\n notifyClick($event: Event) {\n $event.preventDefault();\n $event.stopPropagation();\n if (this.pectinCommand.enabled.value) {\n if (this.pectinCommand instanceof UnaryCommand) {\n this.pectinCommand.withContext({ event: $event }).execute(this.commandParameter);\n } else {\n this.pectinCommand.withContext({ event: $event }).execute();\n }\n } else {\n console.warn('disabled command clicked, ignoring.');\n }\n }\n}\n"]}
@@ -26,12 +26,12 @@ let FocusBindingDirective = class FocusBindingDirective extends DisposableCompon
26
26
  ngAfterViewInit() {
27
27
  // TODO: Make this also track the current enabled/disabled state.
28
28
  if (this.hasBinding()) {
29
- const { chain } = Dsl.disposeWith(this);
30
- chain(this.pectinFocusBinding.focusContext.focused).subscribe((focused) => {
29
+ const { when } = Dsl.disposeWith(this);
30
+ when.valueOf(this.pectinFocusBinding.focusContext.focused).changes((focused) => {
31
31
  if (focused && !this.alreadyHasFocus()) {
32
32
  this.tryAndFocus();
33
33
  }
34
- });
34
+ }, { initialValue: 'triggerChange' });
35
35
  }
36
36
  else {
37
37
  Logger.get(this).warn('pectinFocusBinding was nil');
@@ -1 +1 @@
1
- {"version":3,"file":"focus-binding.directive.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/focus-binding.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAClH,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAOzE,IAAa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,mBAAmB;IAqB5D,YAAiD,EAAc,EAClB,MAAc,EAC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I,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;CACF,CAAA;;YA5EsD,UAAU,uBAAlD,MAAM,SAAC,UAAU;YACuB,MAAM,uBAA9C,MAAM,SAAC,MAAM;4CACb,MAAM,SAAC,QAAQ;;AAnBnB;IAAR,KAAK,EAAE;;iEAAsC;AACrC;IAAR,KAAK,EAAE;8BAAqB,WAAW;iEAAC;AAGzC;IADC,YAAY,CAAC,SAAS,CAAC;;;;sDAKvB;AAGD;IADC,YAAY,CAAC,UAAU,CAAC;;;;uDAKxB;AAnBU,qBAAqB;IAJjC,SAAS,CAAC;QACT,8CAA8C;QAC9C,QAAQ,EAAE,sBAAsB;KACjC,CAAC;IAsBa,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;qCAFwB,UAAU;QACV,MAAM;GAtBhD,qBAAqB,CAiGjC;SAjGY,qBAAqB","sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, NgZone, OnInit } from '@angular/core';\nimport { Dsl, HasFocusTracking, Logger } from '@coolon/pectin';\nimport { DisposableComponent } from '../components/disposable-component';\n\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[pectinFocusBinding]'\n})\nexport class FocusBindingDirective extends DisposableComponent implements OnInit, AfterViewInit {\n\n private readonly document: Document;\n\n @Input() pectinFocusBinding: HasFocusTracking;\n @Input() focusBindingTarget: HTMLElement;\n\n @HostListener('focusin')\n onFocusIn() {\n if (this.hasBinding()) {\n this.pectinFocusBinding.focusContext.notifyFocusIn();\n }\n }\n\n @HostListener('focusout')\n onFocusOut() {\n if (this.hasBinding()) {\n this.pectinFocusBinding.focusContext.notifyFocusOut();\n }\n }\n\n constructor(@Inject(ElementRef) private readonly el: ElementRef,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(DOCUMENT) document: any) {\n super();\n // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642\n this.document = document as Document;\n }\n\n ngOnInit(): void {\n }\n\n ngAfterViewInit(): void {\n // TODO: Make this also track the current enabled/disabled state.\n if (this.hasBinding()) {\n const { chain } = Dsl.disposeWith(this);\n chain(this.pectinFocusBinding.focusContext.focused).subscribe((focused) => {\n if (focused && !this.alreadyHasFocus()) {\n this.tryAndFocus();\n }\n });\n } else {\n Logger.get(this).warn('pectinFocusBinding was nil');\n }\n }\n\n private hasBinding() {\n return !!this.pectinFocusBinding && !!this.pectinFocusBinding.focusContext;\n }\n\n// Hook method for debugging via tracing.\n alreadyHasFocus() {\n return this.isFocused(this.focusTarget);\n }\n\n // Hook method for debugging via tracing.\n isFocused(element: Element): boolean {\n return this.document.activeElement === element;\n }\n\n tryAndFocus(retries: number = 5) {\n if (this.modelShouldStillHaveFocus() && this.canFocus()) {\n if (!this.alreadyHasFocus()) {\n this.focusTarget.focus();\n }\n // if we didn't get the focus we try again later.\n if (!this.alreadyHasFocus()) {\n Logger.get(this).log(`focus failed, trying ${retries} more times`);\n if (retries > 0) {\n // try again on the next paint\n // TODO: is there an angular way of doing this without calling a window function.\n requestAnimationFrame(() => {\n this.tryAndFocus(retries - 1);\n });\n } else {\n Logger.get(this).warn(`Tried to focus but gave up as the component wasn't enabled or visible.`);\n }\n }\n }\n }\n\n get focusTarget(): HTMLElement {\n return this.focusBindingTarget || this.el.nativeElement;\n }\n\n // Hook method for debugging via tracing.\n modelShouldStillHaveFocus() {\n return this.hasBinding() && this.pectinFocusBinding.focusContext.focused.value;\n }\n\n // Hook method for debugging via tracing.\n canFocus(): boolean {\n const dimension = this.focusTarget.getBoundingClientRect();\n const hasSize = dimension.height >= 0 && dimension.height >= 0;\n // tslint:disable-next-line:no-string-literal\n return hasSize && !this.focusTarget['disabled'];\n }\n}\n"]}
1
+ {"version":3,"file":"focus-binding.directive.js","sourceRoot":"ng://@coolon/angular-ui-pow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F;SACF;IACH,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;IAC1D,CAAC;IAED,yCAAyC;IACzC,yBAAyB;QACvB,OAAO,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC;IACjF,CAAC;IAED,yCAAyC;IACzC,QAAQ;QACN,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,qBAAqB,EAAE,CAAC;QAC3D,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;QAC/D,6CAA6C;QAC7C,OAAO,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;CACF,CAAA;;YA5EsD,UAAU,uBAAlD,MAAM,SAAC,UAAU;YACuB,MAAM,uBAA9C,MAAM,SAAC,MAAM;4CACb,MAAM,SAAC,QAAQ;;AAnBnB;IAAR,KAAK,EAAE;;iEAAsC;AACrC;IAAR,KAAK,EAAE;8BAAqB,WAAW;iEAAC;AAGzC;IADC,YAAY,CAAC,SAAS,CAAC;;;;sDAKvB;AAGD;IADC,YAAY,CAAC,UAAU,CAAC;;;;uDAKxB;AAnBU,qBAAqB;IAJjC,SAAS,CAAC;QACT,8CAA8C;QAC9C,QAAQ,EAAE,sBAAsB;KACjC,CAAC;IAsBa,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;qCAFwB,UAAU;QACV,MAAM;GAtBhD,qBAAqB,CAiGjC;SAjGY,qBAAqB","sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, NgZone, OnInit } from '@angular/core';\nimport { Dsl, HasFocusTracking, Logger } from '@coolon/pectin';\nimport { DisposableComponent } from '../components/disposable-component';\n\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[pectinFocusBinding]'\n})\nexport class FocusBindingDirective extends DisposableComponent implements OnInit, AfterViewInit {\n\n private readonly document: Document;\n\n @Input() pectinFocusBinding: HasFocusTracking;\n @Input() focusBindingTarget: HTMLElement;\n\n @HostListener('focusin')\n onFocusIn() {\n if (this.hasBinding()) {\n this.pectinFocusBinding.focusContext.notifyFocusIn();\n }\n }\n\n @HostListener('focusout')\n onFocusOut() {\n if (this.hasBinding()) {\n this.pectinFocusBinding.focusContext.notifyFocusOut();\n }\n }\n\n constructor(@Inject(ElementRef) private readonly el: ElementRef,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(DOCUMENT) document: any) {\n super();\n // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642\n this.document = document as Document;\n }\n\n ngOnInit(): void {\n }\n\n ngAfterViewInit(): void {\n // TODO: Make this also track the current enabled/disabled state.\n if (this.hasBinding()) {\n const { when } = Dsl.disposeWith(this);\n when.valueOf(this.pectinFocusBinding.focusContext.focused).changes((focused) => {\n if (focused && !this.alreadyHasFocus()) {\n this.tryAndFocus();\n }\n }, {initialValue: 'triggerChange'});\n } else {\n Logger.get(this).warn('pectinFocusBinding was nil');\n }\n }\n\n private hasBinding() {\n return !!this.pectinFocusBinding && !!this.pectinFocusBinding.focusContext;\n }\n\n// Hook method for debugging via tracing.\n alreadyHasFocus() {\n return this.isFocused(this.focusTarget);\n }\n\n // Hook method for debugging via tracing.\n isFocused(element: Element): boolean {\n return this.document.activeElement === element;\n }\n\n tryAndFocus(retries: number = 5) {\n if (this.modelShouldStillHaveFocus() && this.canFocus()) {\n if (!this.alreadyHasFocus()) {\n this.focusTarget.focus();\n }\n // if we didn't get the focus we try again later.\n if (!this.alreadyHasFocus()) {\n Logger.get(this).log(`focus failed, trying ${retries} more times`);\n if (retries > 0) {\n // try again on the next paint\n // TODO: is there an angular way of doing this without calling a window function.\n requestAnimationFrame(() => {\n this.tryAndFocus(retries - 1);\n });\n } else {\n Logger.get(this).warn(`Tried to focus but gave up as the component wasn't enabled or visible.`);\n }\n }\n }\n }\n\n get focusTarget(): HTMLElement {\n return this.focusBindingTarget || this.el.nativeElement;\n }\n\n // Hook method for debugging via tracing.\n modelShouldStillHaveFocus() {\n return this.hasBinding() && this.pectinFocusBinding.focusContext.focused.value;\n }\n\n // Hook method for debugging via tracing.\n canFocus(): boolean {\n const dimension = this.focusTarget.getBoundingClientRect();\n const hasSize = dimension.height >= 0 && dimension.height >= 0;\n // tslint:disable-next-line:no-string-literal\n return hasSize && !this.focusTarget['disabled'];\n }\n}\n"]}
@@ -16,7 +16,7 @@ AlertDialogComponent = __decorate([
16
16
  Component({
17
17
  selector: 'aup-alert-dialog',
18
18
  template: "<h3 matDialogTitle *ngIf=\"alert.title\">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of alert.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-raised-button color=\"primary\" (click)=\"done()\" data-cy=\"close-button\">{{alert.ok()}}</button>\n</div>\n",
19
- styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]
19
+ styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
20
20
  }),
21
21
  __param(0, Inject(ACTIVITY_DATA)),
22
22
  __metadata("design:paramtypes", [Object])
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"AlertDialogComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../activity","name":"Activity","line":9,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-alert-dialog","template":"<h3 matDialogTitle *ngIf=\"alert.title\">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of alert.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-raised-button color=\"primary\" (click)=\"done()\" data-cy=\"close-button\">{{alert.ok()}}</button>\n</div>\n","styles":[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":11,"character":15},"arguments":[{"__symbolic":"reference","module":"../../activity","name":"ACTIVITY_DATA","line":11,"character":22}]}]],"parameters":[{"__symbolic":"reference","module":"../../alert","name":"Alert","line":11,"character":53}]}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"AlertDialogComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../activity","name":"Activity","line":9,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-alert-dialog","template":"<h3 matDialogTitle *ngIf=\"alert.title\">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of alert.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-raised-button color=\"primary\" (click)=\"done()\" data-cy=\"close-button\">{{alert.ok()}}</button>\n</div>\n","styles":[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":11,"character":15},"arguments":[{"__symbolic":"reference","module":"../../activity","name":"ACTIVITY_DATA","line":11,"character":22}]}]],"parameters":[{"__symbolic":"reference","module":"../../alert","name":"Alert","line":11,"character":53}]}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
@@ -29,7 +29,7 @@ ConfirmThenDialogComponent = __decorate([
29
29
  Component({
30
30
  selector: 'aup-confirmation-dialog',
31
31
  template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)=\"cancel()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"onConfirm()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</div>\n\n",
32
- styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]
32
+ styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
33
33
  }),
34
34
  __param(0, Inject(ACTIVITY_DATA)),
35
35
  __metadata("design:paramtypes", [Object])
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"ConfirmThenDialogComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../activity","name":"Activity","line":11,"character":57},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"selector":"aup-confirmation-dialog","template":"<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)=\"cancel()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"onConfirm()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</div>\n\n","styles":[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":13,"character":15},"arguments":[{"__symbolic":"reference","module":"../../activity","name":"ACTIVITY_DATA","line":13,"character":22}]}]],"parameters":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ConfirmThenDialogComponent"},"member":"Data","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":13,"character":86,"context":{"typeName":"D"}},{"__symbolic":"error","message":"Could not resolve type","line":13,"character":89,"context":{"typeName":"R"}},{"__symbolic":"error","message":"Could not resolve type","line":13,"character":92,"context":{"typeName":"E"}}]}]}],"ngOnInit":[{"__symbolic":"method"}],"isDestructive":[{"__symbolic":"method"}],"onConfirm":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"ConfirmThenDialogComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../activity","name":"Activity","line":11,"character":57},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"selector":"aup-confirmation-dialog","template":"<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)=\"cancel()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"onConfirm()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</div>\n\n","styles":[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":13,"character":15},"arguments":[{"__symbolic":"reference","module":"../../activity","name":"ACTIVITY_DATA","line":13,"character":22}]}]],"parameters":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ConfirmThenDialogComponent"},"member":"Data","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":13,"character":86,"context":{"typeName":"D"}},{"__symbolic":"error","message":"Could not resolve type","line":13,"character":89,"context":{"typeName":"R"}},{"__symbolic":"error","message":"Could not resolve type","line":13,"character":92,"context":{"typeName":"E"}}]}]}],"ngOnInit":[{"__symbolic":"method"}],"isDestructive":[{"__symbolic":"method"}],"onConfirm":[{"__symbolic":"method"}]}}}}]
@@ -21,7 +21,7 @@ ConfirmationDialogComponent = __decorate([
21
21
  Component({
22
22
  selector: 'aup-confirmation-dialog',
23
23
  template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)=\"cancel()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"done()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</div>\n\n",
24
- styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]
24
+ styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
25
25
  }),
26
26
  __param(0, Inject(ACTIVITY_DATA)),
27
27
  __metadata("design:paramtypes", [Object])
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"ConfirmationDialogComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../activity","name":"Activity","line":10,"character":49},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"aup-confirmation-dialog","template":"<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)=\"cancel()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"done()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</div>\n\n","styles":[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":12,"character":15},"arguments":[{"__symbolic":"reference","module":"../../activity","name":"ACTIVITY_DATA","line":12,"character":22}]}]],"parameters":[{"__symbolic":"reference","module":"../../confirm","name":"Confirm","line":12,"character":55}]}],"ngOnInit":[{"__symbolic":"method"}],"isDestructive":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"ConfirmationDialogComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../activity","name":"Activity","line":10,"character":49},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"aup-confirmation-dialog","template":"<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)=\"cancel()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"done()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</div>\n\n","styles":[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":12,"character":15},"arguments":[{"__symbolic":"reference","module":"../../activity","name":"ACTIVITY_DATA","line":12,"character":22}]}]],"parameters":[{"__symbolic":"reference","module":"../../confirm","name":"Confirm","line":12,"character":55}]}],"ngOnInit":[{"__symbolic":"method"}],"isDestructive":[{"__symbolic":"method"}]}}}}]
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { Component, Input } from '@angular/core';
3
- import { Command, DelegatingValueModel, Dsl, ListModel, StoreInListModel, StoreInValueModel, UseDelegate, ValueModel } from '@coolon/pectin';
3
+ import { Command, DelegatingValueModel, Dsl, ListModel, StoreInListModel, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';
4
4
  import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
5
5
  import { DisposableComponent } from '../../components/disposable-component';
6
6
  import { PlaceComponent } from '../place-component';
@@ -47,7 +47,7 @@ __decorate([
47
47
  __metadata("design:type", Array)
48
48
  ], AbstractPlaceNavigationComponent.prototype, "places", void 0);
49
49
  __decorate([
50
- Input(), UseDelegate(),
50
+ Input(), TrackExternal(),
51
51
  __metadata("design:type", ListModel)
52
52
  ], AbstractPlaceNavigationComponent.prototype, "placesModel", void 0);
53
53
  __decorate([
@@ -55,7 +55,7 @@ __decorate([
55
55
  __metadata("design:type", PlaceOutletComponent)
56
56
  ], AbstractPlaceNavigationComponent.prototype, "placeOutlet", void 0);
57
57
  __decorate([
58
- Input(), UseDelegate(),
58
+ Input(), TrackExternal(),
59
59
  __metadata("design:type", ValueModel)
60
60
  ], AbstractPlaceNavigationComponent.prototype, "placeOutletModel", void 0);
61
61
  __decorate([