@coolon/angular-ui-powerups 1.12.0 → 1.13.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 (169) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/assets/table.scss +32 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.js +760 -426
  4. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
  6. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  7. package/coolon-angular-ui-powerups.d.ts +58 -55
  8. package/coolon-angular-ui-powerups.metadata.json +1 -1
  9. package/esm2015/coolon-angular-ui-powerups.js +56 -53
  10. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  11. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  12. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  13. package/esm2015/lib/components/card-container/card-container.component.js +1 -1
  14. package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
  15. package/esm2015/lib/components/components.module.js +9 -2
  16. package/esm2015/lib/components/components.module.js.map +1 -1
  17. package/esm2015/lib/components/components.module.metadata.json +1 -1
  18. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  19. package/esm2015/lib/components/forms/abstract-input.component.js +10 -15
  20. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  21. package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
  22. package/esm2015/lib/components/forms/abstract-list-input.component.js +27 -0
  23. package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -0
  24. package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -0
  25. package/esm2015/lib/components/forms/abstract-list-input.component.ngfactory.js.map +1 -0
  26. package/esm2015/lib/components/forms/abstract-value-input.component.js +27 -0
  27. package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -0
  28. package/esm2015/lib/components/forms/abstract-value-input.component.metadata.json +1 -0
  29. package/esm2015/lib/components/forms/abstract-value-input.component.ngfactory.js.map +1 -0
  30. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +3 -3
  31. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  32. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
  33. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +54 -0
  34. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -0
  35. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -0
  36. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.ngfactory.js.map +1 -0
  37. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.scss.shim.ngstyle.js.map +1 -0
  38. package/esm2015/lib/components/forms/number-input/number-input.component.js +4 -4
  39. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  40. package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
  41. package/esm2015/lib/components/forms/password-input/password-input.component.js +4 -4
  42. package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
  43. package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
  44. package/esm2015/lib/components/forms/select-input/select-input.component.js +4 -4
  45. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  46. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  47. package/esm2015/lib/components/forms/string-input/string-input.component.js +4 -4
  48. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  49. package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
  50. package/esm2015/lib/components/forms/text-input/text-input.component.js +4 -4
  51. package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
  52. package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
  53. package/esm2015/lib/components/index.js +3 -0
  54. package/esm2015/lib/components/index.js.map +1 -1
  55. package/esm2015/lib/components/index.metadata.json +1 -1
  56. package/esm2015/lib/components/table/cell-editors.js +1 -0
  57. package/esm2015/lib/components/table/cell-editors.js.map +1 -0
  58. package/esm2015/lib/components/table/cell-editors.metadata.json +1 -0
  59. package/esm2015/lib/components/table/column-model.js +205 -60
  60. package/esm2015/lib/components/table/column-model.js.map +1 -1
  61. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  62. package/esm2015/lib/components/table/column-template/column-template.directive.js +26 -1
  63. package/esm2015/lib/components/table/column-template/column-template.directive.js.map +1 -1
  64. package/esm2015/lib/components/table/column-template/column-template.directive.metadata.json +1 -1
  65. package/esm2015/lib/components/table/edit-session.js +10 -7
  66. package/esm2015/lib/components/table/edit-session.js.map +1 -1
  67. package/esm2015/lib/components/table/edit-session.metadata.json +1 -1
  68. package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.js +1 -12
  69. package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.js.map +1 -1
  70. package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.metadata.json +1 -1
  71. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +6 -8
  72. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -1
  73. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.metadata.json +1 -1
  74. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +43 -19
  75. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
  76. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
  77. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +12 -8
  78. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
  79. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.metadata.json +1 -1
  80. package/esm2015/lib/components/table/table-model.js +15 -4
  81. package/esm2015/lib/components/table/table-model.js.map +1 -1
  82. package/esm2015/lib/components/table/table-model.metadata.json +1 -1
  83. package/esm2015/lib/components/table/table.component.js +8 -0
  84. package/esm2015/lib/components/table/table.component.js.map +1 -1
  85. package/esm2015/lib/components/table/table.component.metadata.json +1 -1
  86. package/esm5/coolon-angular-ui-powerups.js +56 -53
  87. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  88. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  89. package/esm5/lib/components/card-container/card-container.component.js +1 -1
  90. package/esm5/lib/components/components.module.js +9 -2
  91. package/esm5/lib/components/components.module.js.map +1 -1
  92. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  93. package/esm5/lib/components/forms/abstract-input.component.js +18 -15
  94. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  95. package/esm5/lib/components/forms/abstract-list-input.component.js +30 -0
  96. package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -0
  97. package/esm5/lib/components/forms/abstract-list-input.component.ngfactory.js.map +1 -0
  98. package/esm5/lib/components/forms/abstract-value-input.component.js +30 -0
  99. package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -0
  100. package/esm5/lib/components/forms/abstract-value-input.component.ngfactory.js.map +1 -0
  101. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +3 -3
  102. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  103. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +57 -0
  104. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -0
  105. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.ngfactory.js.map +1 -0
  106. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.scss.shim.ngstyle.js.map +1 -0
  107. package/esm5/lib/components/forms/number-input/number-input.component.js +4 -4
  108. package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
  109. package/esm5/lib/components/forms/password-input/password-input.component.js +4 -4
  110. package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
  111. package/esm5/lib/components/forms/select-input/select-input.component.js +4 -4
  112. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  113. package/esm5/lib/components/forms/string-input/string-input.component.js +4 -4
  114. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  115. package/esm5/lib/components/forms/text-input/text-input.component.js +4 -4
  116. package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
  117. package/esm5/lib/components/index.js +3 -0
  118. package/esm5/lib/components/index.js.map +1 -1
  119. package/esm5/lib/components/table/cell-editors.js +1 -0
  120. package/esm5/lib/components/table/cell-editors.js.map +1 -0
  121. package/esm5/lib/components/table/column-model.js +243 -80
  122. package/esm5/lib/components/table/column-model.js.map +1 -1
  123. package/esm5/lib/components/table/column-template/column-template.directive.js +26 -1
  124. package/esm5/lib/components/table/column-template/column-template.directive.js.map +1 -1
  125. package/esm5/lib/components/table/edit-session.js +10 -7
  126. package/esm5/lib/components/table/edit-session.js.map +1 -1
  127. package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.js +1 -16
  128. package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.js.map +1 -1
  129. package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +6 -8
  130. package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -1
  131. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +43 -19
  132. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
  133. package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +12 -8
  134. package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
  135. package/esm5/lib/components/table/table-model.js +15 -4
  136. package/esm5/lib/components/table/table-model.js.map +1 -1
  137. package/esm5/lib/components/table/table.component.js +8 -0
  138. package/esm5/lib/components/table/table.component.js.map +1 -1
  139. package/fesm2015/coolon-angular-ui-powerups.js +579 -288
  140. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  141. package/fesm5/coolon-angular-ui-powerups.js +673 -358
  142. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  143. package/lib/components/forms/abstract-input.component.d.ts +10 -12
  144. package/lib/components/forms/abstract-list-input.component.d.ts +16 -0
  145. package/lib/components/forms/abstract-value-input.component.d.ts +16 -0
  146. package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +4 -4
  147. package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +15 -0
  148. package/lib/components/forms/number-input/number-input.component.d.ts +4 -4
  149. package/lib/components/forms/password-input/password-input.component.d.ts +4 -4
  150. package/lib/components/forms/select-input/select-input.component.d.ts +4 -4
  151. package/lib/components/forms/string-input/string-input.component.d.ts +4 -4
  152. package/lib/components/forms/text-input/text-input.component.d.ts +4 -4
  153. package/lib/components/index.d.ts +4 -1
  154. package/lib/components/table/cell-editors.d.ts +9 -0
  155. package/lib/components/table/column-model.d.ts +85 -33
  156. package/lib/components/table/column-template/column-template.directive.d.ts +8 -2
  157. package/lib/components/table/edit-session.d.ts +4 -4
  158. package/lib/components/table/select-cell-renderer/select-cell-renderer.component.d.ts +1 -3
  159. package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +13 -6
  160. package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts +8 -4
  161. package/lib/components/table/table-model.d.ts +5 -1
  162. package/lib/components/table/table.component.d.ts +3 -1
  163. package/package.json +1 -1
  164. package/esm2015/lib/components/table/cell-editor.component.js +0 -1
  165. package/esm2015/lib/components/table/cell-editor.component.js.map +0 -1
  166. package/esm2015/lib/components/table/cell-editor.component.metadata.json +0 -1
  167. package/esm5/lib/components/table/cell-editor.component.js +0 -1
  168. package/esm5/lib/components/table/cell-editor.component.js.map +0 -1
  169. package/lib/components/table/cell-editor.component.d.ts +0 -5
@@ -1148,7 +1148,7 @@
1148
1148
  }());
1149
1149
 
1150
1150
  var inplaceMonitorCount = 0;
1151
- exports.ɵbw = /** @class */ (function () {
1151
+ exports.ɵbz = /** @class */ (function () {
1152
1152
  function InteractionService(modelInteractionContextFactory) {
1153
1153
  this.modelInteractionContextFactory = modelInteractionContextFactory;
1154
1154
  this.garbage = new pectin.GarbageCollector();
@@ -1293,7 +1293,7 @@
1293
1293
  return ApiAdapter;
1294
1294
  }());
1295
1295
  InteractionService.ApiAdapter = ApiAdapter;
1296
- })(exports.ɵbw || (exports.ɵbw = {}));
1296
+ })(exports.ɵbz || (exports.ɵbz = {}));
1297
1297
 
1298
1298
  var InPlaceInteractionContextComponent = /** @class */ (function (_super) {
1299
1299
  __extends(InPlaceInteractionContextComponent, _super);
@@ -1351,7 +1351,7 @@
1351
1351
  return this.activityContainerComponent.startActivity(activityType, data);
1352
1352
  };
1353
1353
  InPlaceInteractionContextComponent.ctorParameters = function () { return [
1354
- { type: exports.ɵbw },
1354
+ { type: exports.ɵbz },
1355
1355
  { type: undefined, decorators: [{ type: core.Inject, args: [tabs.MAT_TABS_CONFIG,] }, { type: core.Optional }] }
1356
1356
  ]; };
1357
1357
  __decorate([
@@ -1369,7 +1369,7 @@
1369
1369
  styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
1370
1370
  }),
1371
1371
  __param(1, core.Inject(tabs.MAT_TABS_CONFIG)), __param(1, core.Optional()),
1372
- __metadata("design:paramtypes", [exports.ɵbw, Object])
1372
+ __metadata("design:paramtypes", [exports.ɵbz, Object])
1373
1373
  ], InPlaceInteractionContextComponent);
1374
1374
  return InPlaceInteractionContextComponent;
1375
1375
  }(DisposableComponent));
@@ -1662,7 +1662,7 @@
1662
1662
  AlertDialogComponent
1663
1663
  ],
1664
1664
  providers: [
1665
- exports.ɵbw
1665
+ exports.ɵbz
1666
1666
  // {
1667
1667
  // provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
1668
1668
  // }
@@ -1710,7 +1710,7 @@
1710
1710
  core.Component({
1711
1711
  selector: 'aup-card-container',
1712
1712
  template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <mat-icon>add</mat-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n\n</div>\n",
1713
- styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px)}aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
1713
+ styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px)}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
1714
1714
  }),
1715
1715
  __metadata("design:paramtypes", [])
1716
1716
  ], CardContainerComponent);
@@ -1966,18 +1966,6 @@
1966
1966
  __extends(AbstractInputComponent, _super);
1967
1967
  function AbstractInputComponent() {
1968
1968
  var _this = _super.call(this) || this;
1969
- /**
1970
- * A backing model for all our @Input() valueModel properties which should be defined as follows.
1971
- *
1972
- * @Input() @TrackExternal({useExisting: "delegatingFormValueModel"})
1973
- * valueModel: FormValueModel<string> | MutableValueModel<string>;
1974
- *
1975
- * This approach allows the input to accept plain or form models but all backed by a form
1976
- * friendly delegate. We have to use an existing delegate for union types as pectin just
1977
- * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
1978
- */
1979
- // We have to register it as a disposable so it ditches any listeners when we're disposed.
1980
- _this.delegatingFormValueModel = _this.registerDisposable(new pectin.DelegatingFormValueModel());
1981
1969
  // TODO: fix this.
1982
1970
  // tslint:disable-next-line:no-output-native
1983
1971
  _this.focus = new core.EventEmitter();
@@ -1996,6 +1984,13 @@
1996
1984
  };
1997
1985
  return _this;
1998
1986
  }
1987
+ Object.defineProperty(AbstractInputComponent.prototype, "inputModel", {
1988
+ get: function () {
1989
+ return typescriptUtilities.lang.abstractMethod(this.constructor, "inputModel");
1990
+ },
1991
+ enumerable: true,
1992
+ configurable: true
1993
+ });
1999
1994
  AbstractInputComponent.prototype.notifyClick = function () {
2000
1995
  this.safelyInvoke(this.clickCommand);
2001
1996
  };
@@ -2027,7 +2022,7 @@
2027
2022
  };
2028
2023
  Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
2029
2024
  get: function () {
2030
- return this.delegatingFormValueModel.enabled;
2025
+ return this.inputModel.enabled;
2031
2026
  },
2032
2027
  enumerable: true,
2033
2028
  configurable: true
@@ -2037,7 +2032,7 @@
2037
2032
  };
2038
2033
  Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
2039
2034
  get: function () {
2040
- return this.delegatingFormValueModel.errorList;
2035
+ return this.inputModel.errorList;
2041
2036
  },
2042
2037
  enumerable: true,
2043
2038
  configurable: true
@@ -2049,6 +2044,13 @@
2049
2044
  enumerable: true,
2050
2045
  configurable: true
2051
2046
  });
2047
+ Object.defineProperty(AbstractInputComponent.prototype, "focusContext", {
2048
+ get: function () {
2049
+ return this.inputModel.focusContext;
2050
+ },
2051
+ enumerable: true,
2052
+ configurable: true
2053
+ });
2052
2054
  __decorate([
2053
2055
  core.Input(),
2054
2056
  __metadata("design:type", String)
@@ -2130,6 +2132,54 @@
2130
2132
  return AbstractInputComponent;
2131
2133
  }(DisposableComponent));
2132
2134
 
2135
+ var AbstractListInputComponent = /** @class */ (function (_super) {
2136
+ __extends(AbstractListInputComponent, _super);
2137
+ function AbstractListInputComponent() {
2138
+ var _this = _super !== null && _super.apply(this, arguments) || this;
2139
+ /**
2140
+ * A backing model for all our @Input() valueModel properties which should be defined as follows.
2141
+ *
2142
+ * @Input() @TrackExternal({useExisting: "inputModel"})
2143
+ * valueModel: FormListModel<string> | IMutableListModel<string>;
2144
+ *
2145
+ * This approach allows the input to accept plain or form models but all backed by a form
2146
+ * friendly delegate. We have to use an existing delegate for union types as pectin just
2147
+ * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
2148
+ */
2149
+ // We have to register it as a disposable so it ditches any listeners when we're disposed.
2150
+ _this.inputModel = _this.registerDisposable(new pectin.DelegatingFormListModel());
2151
+ return _this;
2152
+ }
2153
+ AbstractListInputComponent = __decorate([
2154
+ core.Component({ template: '' })
2155
+ ], AbstractListInputComponent);
2156
+ return AbstractListInputComponent;
2157
+ }(AbstractInputComponent));
2158
+
2159
+ var AbstractValueInputComponent = /** @class */ (function (_super) {
2160
+ __extends(AbstractValueInputComponent, _super);
2161
+ function AbstractValueInputComponent() {
2162
+ var _this = _super !== null && _super.apply(this, arguments) || this;
2163
+ /**
2164
+ * A backing model for all our @Input() valueModel properties which should be defined as follows.
2165
+ *
2166
+ * @Input() @TrackExternal({useExisting: "inputModel"})
2167
+ * valueModel: FormValueModel<string> | IMutableValueModel<string>;
2168
+ *
2169
+ * This approach allows the input to accept plain or form models but all backed by a form
2170
+ * friendly delegate. We have to use an existing delegate for union types as pectin just
2171
+ * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
2172
+ */
2173
+ // We have to register it as a disposable so it ditches any listeners when we're disposed.
2174
+ _this.inputModel = _this.registerDisposable(new pectin.DelegatingFormValueModel());
2175
+ return _this;
2176
+ }
2177
+ AbstractValueInputComponent = __decorate([
2178
+ core.Component({ template: '' })
2179
+ ], AbstractValueInputComponent);
2180
+ return AbstractValueInputComponent;
2181
+ }(AbstractInputComponent));
2182
+
2133
2183
  var CheckboxInputComponent = /** @class */ (function (_super) {
2134
2184
  __extends(CheckboxInputComponent, _super);
2135
2185
  function CheckboxInputComponent() {
@@ -2141,7 +2191,7 @@
2141
2191
  CheckboxInputComponent.prototype.ngOnInit = function () {
2142
2192
  };
2143
2193
  __decorate([
2144
- core.Input(), pectin.TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
2194
+ core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
2145
2195
  __metadata("design:type", Object)
2146
2196
  ], CheckboxInputComponent.prototype, "valueModel", void 0);
2147
2197
  __decorate([
@@ -2161,7 +2211,7 @@
2161
2211
  __metadata("design:paramtypes", [])
2162
2212
  ], CheckboxInputComponent);
2163
2213
  return CheckboxInputComponent;
2164
- }(AbstractInputComponent));
2214
+ }(AbstractValueInputComponent));
2165
2215
 
2166
2216
  var NumberInputComponent = /** @class */ (function (_super) {
2167
2217
  __extends(NumberInputComponent, _super);
@@ -2174,7 +2224,7 @@
2174
2224
  NumberInputComponent.prototype.ngOnInit = function () {
2175
2225
  };
2176
2226
  __decorate([
2177
- core.Input(), pectin.TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
2227
+ core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
2178
2228
  __metadata("design:type", Object)
2179
2229
  ], NumberInputComponent.prototype, "valueModel", void 0);
2180
2230
  __decorate([
@@ -2188,13 +2238,13 @@
2188
2238
  NumberInputComponent = __decorate([
2189
2239
  core.Component({
2190
2240
  selector: 'aup-number-input',
2191
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel?.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
2241
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
2192
2242
  styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]
2193
2243
  }),
2194
2244
  __metadata("design:paramtypes", [])
2195
2245
  ], NumberInputComponent);
2196
2246
  return NumberInputComponent;
2197
- }(AbstractInputComponent));
2247
+ }(AbstractValueInputComponent));
2198
2248
 
2199
2249
  var PasswordInputComponent = /** @class */ (function (_super) {
2200
2250
  __extends(PasswordInputComponent, _super);
@@ -2204,19 +2254,19 @@
2204
2254
  PasswordInputComponent.prototype.ngOnInit = function () {
2205
2255
  };
2206
2256
  __decorate([
2207
- core.Input(), pectin.TrackExternal({ delegateTo: "delegatingFormValueModel" }),
2257
+ core.Input(), pectin.TrackExternal({ delegateTo: "inputModel" }),
2208
2258
  __metadata("design:type", Object)
2209
2259
  ], PasswordInputComponent.prototype, "valueModel", void 0);
2210
2260
  PasswordInputComponent = __decorate([
2211
2261
  core.Component({
2212
2262
  selector: 'aup-password-input',
2213
- 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]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
2263
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
2214
2264
  styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]
2215
2265
  }),
2216
2266
  __metadata("design:paramtypes", [])
2217
2267
  ], PasswordInputComponent);
2218
2268
  return PasswordInputComponent;
2219
- }(AbstractInputComponent));
2269
+ }(AbstractValueInputComponent));
2220
2270
 
2221
2271
  var SelectInputComponent = /** @class */ (function (_super) {
2222
2272
  __extends(SelectInputComponent, _super);
@@ -2228,7 +2278,7 @@
2228
2278
  SelectInputComponent.prototype.ngOnInit = function () {
2229
2279
  };
2230
2280
  __decorate([
2231
- core.Input(), pectin.TrackExternal({ delegateTo: "delegatingFormValueModel" }),
2281
+ core.Input(), pectin.TrackExternal({ delegateTo: "inputModel" }),
2232
2282
  __metadata("design:type", Object)
2233
2283
  ], SelectInputComponent.prototype, "valueModel", void 0);
2234
2284
  __decorate([
@@ -2262,13 +2312,13 @@
2262
2312
  SelectInputComponent = __decorate([
2263
2313
  core.Component({
2264
2314
  selector: 'aup-select-input',
2265
- 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]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
2315
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
2266
2316
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
2267
2317
  }),
2268
2318
  __metadata("design:paramtypes", [])
2269
2319
  ], SelectInputComponent);
2270
2320
  return SelectInputComponent;
2271
- }(AbstractInputComponent));
2321
+ }(AbstractValueInputComponent));
2272
2322
 
2273
2323
  var StringInputActivity = /** @class */ (function (_super) {
2274
2324
  __extends(StringInputActivity, _super);
@@ -2298,7 +2348,7 @@
2298
2348
  StringInputComponent.prototype.ngOnInit = function () {
2299
2349
  };
2300
2350
  __decorate([
2301
- core.Input(), pectin.TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
2351
+ core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
2302
2352
  __metadata("design:type", Object)
2303
2353
  ], StringInputComponent.prototype, "valueModel", void 0);
2304
2354
  __decorate([
@@ -2312,13 +2362,13 @@
2312
2362
  StringInputComponent = __decorate([
2313
2363
  core.Component({
2314
2364
  selector: 'aup-string-input',
2315
- 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]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n\n",
2365
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n\n",
2316
2366
  styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}"]
2317
2367
  }),
2318
2368
  __metadata("design:paramtypes", [])
2319
2369
  ], StringInputComponent);
2320
2370
  return StringInputComponent;
2321
- }(AbstractInputComponent));
2371
+ }(AbstractValueInputComponent));
2322
2372
 
2323
2373
  var TextInputComponent = /** @class */ (function (_super) {
2324
2374
  __extends(TextInputComponent, _super);
@@ -2331,7 +2381,7 @@
2331
2381
  TextInputComponent.prototype.ngOnInit = function () {
2332
2382
  };
2333
2383
  __decorate([
2334
- core.Input(), pectin.TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
2384
+ core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
2335
2385
  __metadata("design:type", Object)
2336
2386
  ], TextInputComponent.prototype, "valueModel", void 0);
2337
2387
  __decorate([
@@ -2345,13 +2395,13 @@
2345
2395
  TextInputComponent = __decorate([
2346
2396
  core.Component({
2347
2397
  selector: 'aup-text-input',
2348
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
2398
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
2349
2399
  styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}textarea{overflow:auto}"]
2350
2400
  }),
2351
2401
  __metadata("design:paramtypes", [])
2352
2402
  ], TextInputComponent);
2353
2403
  return TextInputComponent;
2354
- }(AbstractInputComponent));
2404
+ }(AbstractValueInputComponent));
2355
2405
 
2356
2406
  var NoopComponent = /** @class */ (function () {
2357
2407
  function NoopComponent() {
@@ -2568,17 +2618,20 @@
2568
2618
 
2569
2619
  var EditSession = /** @class */ (function (_super) {
2570
2620
  __extends(EditSession, _super);
2571
- function EditSession(rowId, row, saveCommand) {
2621
+ function EditSession(rowId, row, form, saveCommand) {
2572
2622
  var _this = _super.call(this) || this;
2573
2623
  _this.rowId = rowId;
2624
+ _this.form = form;
2574
2625
  _this.saveCommand = saveCommand;
2575
- _this._editorValue = new pectin.MutableValueModel();
2576
- _this.rowValueModel = _this._editorValue.readonly;
2577
- _this.form = new pectin.Form();
2626
+ _this._liveRowValue = new pectin.MutableValueModel();
2627
+ _this.liveRowValue = _this._liveRowValue.readonly;
2578
2628
  _this.form.load(row);
2579
- _this._editorValue.value = row;
2629
+ _this._liveRowValue.value = row;
2580
2630
  _this.form.onEdit(function () {
2581
- _this._editorValue.value = produce(_this._editorValue.value, function (draft) {
2631
+ // if (!this._liveRowValue.value[immerable]) {
2632
+ // console.warn()
2633
+ // }
2634
+ _this._liveRowValue.value = produce(_this._liveRowValue.value, function (draft) {
2582
2635
  _this.form.writeDirtyStateTo(draft);
2583
2636
  });
2584
2637
  });
@@ -2647,28 +2700,13 @@
2647
2700
  });
2648
2701
  return _this;
2649
2702
  }
2650
- Object.defineProperty(SelectCellRendererComponent.prototype, "row", {
2651
- get: function () {
2652
- return this._row;
2653
- },
2654
- set: function (value) {
2655
- this._row = value;
2656
- },
2657
- enumerable: true,
2658
- configurable: true
2659
- });
2660
2703
  SelectCellRendererComponent.prototype.isSelected = function () {
2661
2704
  return this.selectionModel.isSelected(this.row);
2662
2705
  };
2663
- __decorate([
2664
- core.Input(),
2665
- __metadata("design:type", Object),
2666
- __metadata("design:paramtypes", [Object])
2667
- ], SelectCellRendererComponent.prototype, "row", null);
2668
2706
  __decorate([
2669
2707
  core.Input(),
2670
2708
  __metadata("design:type", Object)
2671
- ], SelectCellRendererComponent.prototype, "selectionModel", void 0);
2709
+ ], SelectCellRendererComponent.prototype, "row", void 0);
2672
2710
  SelectCellRendererComponent = __decorate([
2673
2711
  core.Component({
2674
2712
  selector: 'aup-select-cell-renderer',
@@ -2690,15 +2728,13 @@
2690
2728
  return _this;
2691
2729
  }
2692
2730
  SelectHeaderCellRendererComponent.prototype.isSelected = function () {
2693
- return this.selectionModel.allSelected.value;
2731
+ var _a;
2732
+ return ((_a = this.selectionModel) === null || _a === void 0 ? void 0 : _a.allSelected.value) || false;
2694
2733
  };
2695
2734
  SelectHeaderCellRendererComponent.prototype.isIntermediate = function () {
2696
- return this.selectionModel.someSelected.value;
2735
+ var _a;
2736
+ return ((_a = this.selectionModel) === null || _a === void 0 ? void 0 : _a.someSelected.value) || false;
2697
2737
  };
2698
- __decorate([
2699
- core.Input(),
2700
- __metadata("design:type", pectin.MultipleSelectionModel)
2701
- ], SelectHeaderCellRendererComponent.prototype, "selectionModel", void 0);
2702
2738
  SelectHeaderCellRendererComponent = __decorate([
2703
2739
  core.Component({
2704
2740
  selector: 'aup-select-header-cell-renderer',
@@ -2710,197 +2746,6 @@
2710
2746
  return SelectHeaderCellRendererComponent;
2711
2747
  }(DisposableComponent));
2712
2748
 
2713
- var ColumnModel = /** @class */ (function () {
2714
- function ColumnModel(columnId, defaults) {
2715
- this.columnId = columnId;
2716
- this.defaults = defaults;
2717
- this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
2718
- component.headerText = column.getHeaderText();
2719
- });
2720
- }
2721
- ColumnModel.prototype.getHeaderText = function () {
2722
- var _a;
2723
- return ((_a = this.getColumnTextProperties()) === null || _a === void 0 ? void 0 : _a.headerText()) || this.getDefaultHeaderText();
2724
- };
2725
- ColumnModel.prototype.getDefaultHeaderText = function () {
2726
- return this.columnId;
2727
- };
2728
- ColumnModel.prototype.getColumnTextProperties = function () {
2729
- return this._columnTextProperties || this.defaults.getColumnTextProperties(this);
2730
- };
2731
- ColumnModel.prototype.textProperties = function (columnTextProperties) {
2732
- this._columnTextProperties = columnTextProperties;
2733
- return this;
2734
- };
2735
- ColumnModel.prototype.setCellRenderer = function (cellRenderer, initialiser) {
2736
- this._cellRendererConfig = {
2737
- portal: new portal.ComponentPortal(cellRenderer),
2738
- pushState: initialiser
2739
- };
2740
- };
2741
- ColumnModel.prototype.cellHeaderRenderer = function (cellRenderer, initialiser) {
2742
- this._columnHeaderConfig = {
2743
- portal: new portal.ComponentPortal(cellRenderer),
2744
- initialiseComponent: initialiser
2745
- };
2746
- return this;
2747
- };
2748
- ColumnModel.prototype.setCellEditor = function (cellEditor) {
2749
- this._cellEditorConfig = cellEditor;
2750
- };
2751
- Object.defineProperty(ColumnModel.prototype, "cellRendererPortal", {
2752
- get: function () {
2753
- return this._cellRendererConfig.portal;
2754
- },
2755
- enumerable: true,
2756
- configurable: true
2757
- });
2758
- Object.defineProperty(ColumnModel.prototype, "columnHeaderCellRendererPortal", {
2759
- get: function () {
2760
- return this._columnHeaderConfig.portal;
2761
- },
2762
- enumerable: true,
2763
- configurable: true
2764
- });
2765
- Object.defineProperty(ColumnModel.prototype, "cellEditorPortal", {
2766
- get: function () {
2767
- var _a;
2768
- return (_a = this._cellEditorConfig) === null || _a === void 0 ? void 0 : _a.portal;
2769
- },
2770
- enumerable: true,
2771
- configurable: true
2772
- });
2773
- ColumnModel.prototype.hasEditor = function () {
2774
- return !!this._cellEditorConfig;
2775
- };
2776
- ColumnModel.prototype.updateCellRenderer = function (component, row, editRowCommand, editSession) {
2777
- this._cellRendererConfig.pushState(component, row, editRowCommand, editSession);
2778
- };
2779
- ColumnModel.prototype.initialiseHeader = function (component) {
2780
- this._columnHeaderConfig.initialiseComponent(component, this);
2781
- };
2782
- ColumnModel.prototype.initialiseEditor = function (component, editSession) {
2783
- this._cellEditorConfig.initialiseComponent(component, editSession);
2784
- };
2785
- __decorate([
2786
- src.Memoize(),
2787
- __metadata("design:type", Function),
2788
- __metadata("design:paramtypes", []),
2789
- __metadata("design:returntype", String)
2790
- ], ColumnModel.prototype, "getHeaderText", null);
2791
- __decorate([
2792
- src.Memoize(),
2793
- __metadata("design:type", Function),
2794
- __metadata("design:paramtypes", []),
2795
- __metadata("design:returntype", Object)
2796
- ], ColumnModel.prototype, "getColumnTextProperties", null);
2797
- return ColumnModel;
2798
- }());
2799
- var PropertyColumnModel = /** @class */ (function (_super) {
2800
- __extends(PropertyColumnModel, _super);
2801
- function PropertyColumnModel(property, defaults) {
2802
- var _this = _super.call(this, property.toString(), defaults) || this;
2803
- _this.property = property;
2804
- _this._format = function (value) { return value; };
2805
- _this.cellRenderer(DefaultCellRendererComponent);
2806
- return _this;
2807
- }
2808
- PropertyColumnModel.prototype.cellRenderer = function (componentType) {
2809
- var _this = this;
2810
- this.setCellRenderer(componentType, function (component, row) {
2811
- component.value = _this._format(row[_this.property]);
2812
- });
2813
- return this;
2814
- };
2815
- PropertyColumnModel.prototype.cellEditor = function (editor, options) {
2816
- var _this = this;
2817
- this.setCellEditor({
2818
- portal: new portal.ComponentPortal(editor),
2819
- initialiseComponent: function (component, editSession) {
2820
- var formValueModel = editSession.form.pluck(_this.property);
2821
- if (options === null || options === void 0 ? void 0 : options.validators) {
2822
- formValueModel.validateUsing(options.validators);
2823
- }
2824
- component.valueModel = formValueModel;
2825
- if (options === null || options === void 0 ? void 0 : options.initialiseComponent) {
2826
- options.initialiseComponent(component);
2827
- }
2828
- }
2829
- });
2830
- return this;
2831
- };
2832
- PropertyColumnModel.prototype.format = function (formatter) {
2833
- typescriptUtilities.assert.isFunction(formatter);
2834
- this._format = formatter;
2835
- return this;
2836
- };
2837
- return PropertyColumnModel;
2838
- }(ColumnModel));
2839
- var CustomValueColumnModel = /** @class */ (function (_super) {
2840
- __extends(CustomValueColumnModel, _super);
2841
- function CustomValueColumnModel(columnId, defaults, getValue) {
2842
- var _this = _super.call(this, columnId, defaults) || this;
2843
- _this.getValue = getValue;
2844
- _this.cellRenderer(DefaultCellRendererComponent);
2845
- return _this;
2846
- }
2847
- CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
2848
- var _this = this;
2849
- this.setCellRenderer(componentType, function (component, row) {
2850
- component.value = _this.getValue(row);
2851
- });
2852
- return this;
2853
- };
2854
- return CustomValueColumnModel;
2855
- }(ColumnModel));
2856
- var EditorControlColumnModel = /** @class */ (function (_super) {
2857
- __extends(EditorControlColumnModel, _super);
2858
- function EditorControlColumnModel(columnId, saveCommand, defaults) {
2859
- var _this = _super.call(this, columnId, defaults) || this;
2860
- _this.cellRenderer(EditRowControls);
2861
- return _this;
2862
- }
2863
- EditorControlColumnModel.prototype.cellRenderer = function (componentType) {
2864
- this.setCellRenderer(componentType, function (component, row, editRowCommand, editSession) {
2865
- component.row = row;
2866
- component.editSession = editSession;
2867
- component.editRowCommand = editRowCommand;
2868
- });
2869
- return this;
2870
- };
2871
- EditorControlColumnModel.prototype.getDefaultHeaderText = function () {
2872
- return '';
2873
- };
2874
- return EditorControlColumnModel;
2875
- }(ColumnModel));
2876
- var CustomTemplateColumnModel = /** @class */ (function (_super) {
2877
- __extends(CustomTemplateColumnModel, _super);
2878
- function CustomTemplateColumnModel(columnId, defaults, component) {
2879
- return _super.call(this, columnId, defaults) || this;
2880
- }
2881
- return CustomTemplateColumnModel;
2882
- }(ColumnModel));
2883
- var SelectionColumnModel = /** @class */ (function (_super) {
2884
- __extends(SelectionColumnModel, _super);
2885
- function SelectionColumnModel(columnId, defaults, selectionModel) {
2886
- var _this = _super.call(this, columnId, defaults) || this;
2887
- if (selectionModel instanceof pectin.MultipleSelectionModel) {
2888
- _this.cellHeaderRenderer(SelectHeaderCellRendererComponent, function (component) {
2889
- component.selectionModel = selectionModel;
2890
- });
2891
- }
2892
- _this.setCellRenderer(SelectCellRendererComponent, function (component, row, editRowCommand, editSession) {
2893
- component.row = row;
2894
- component.selectionModel = selectionModel;
2895
- });
2896
- return _this;
2897
- }
2898
- SelectionColumnModel.prototype.getDefaultHeaderText = function () {
2899
- return '';
2900
- };
2901
- return SelectionColumnModel;
2902
- }(ColumnModel));
2903
-
2904
2749
  // export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
2905
2750
  // export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
2906
2751
  /**
@@ -2979,6 +2824,7 @@
2979
2824
  this._garbage = new pectin.GarbageCollector();
2980
2825
  this._columns = new pectin.MutableListModel();
2981
2826
  this._editorSessions = new pectin.MutableListModel();
2827
+ this._createForm = function (row) { return new pectin.Form(); };
2982
2828
  this.identityOf = sourceOfTruth.identityOf;
2983
2829
  var _a = pectin.Dsl.disposeWith(this._garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
2984
2830
  this._columnsById = chain(this._columns).indexBy('columnId');
@@ -3018,6 +2864,9 @@
3018
2864
  TableModel.prototype.pluck = function (property) {
3019
2865
  return this.addColumn(new PropertyColumnModel(property, this));
3020
2866
  };
2867
+ TableModel.prototype.pluckList = function (property) {
2868
+ return this.addColumn(new ListPropertyColumnModel(property, this));
2869
+ };
3021
2870
  TableModel.prototype.addSelectionColumn = function (selectionModel) {
3022
2871
  return this.addColumn(new SelectionColumnModel('selection', this, selectionModel));
3023
2872
  };
@@ -3028,6 +2877,13 @@
3028
2877
  TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
3029
2878
  return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
3030
2879
  };
2880
+ TableModel.prototype.addTemplateColumn = function (columnId) {
2881
+ return this.addColumn(new CustomTemplateColumnModel(columnId, this));
2882
+ };
2883
+ TableModel.prototype.useFormFactory = function (factory) {
2884
+ this._createForm = factory;
2885
+ return this;
2886
+ };
3031
2887
  TableModel.prototype.addColumn = function (column) {
3032
2888
  if (this._columnsById.get(column.columnId)) {
3033
2889
  pectin.lang.illegalState("Column with id=" + column.columnId + " already exists");
@@ -3051,14 +2907,14 @@
3051
2907
  return pectin.lang.illegalState("Row with id=" + rowId + " already being edited");
3052
2908
  }
3053
2909
  else {
3054
- var editSession_1 = new EditSession(rowId, row, this.saveCommand);
2910
+ var editSession_1 = new EditSession(rowId, row, this._createForm(row), this.saveCommand);
3055
2911
  var when = pectin.Dsl.disposeWith(editSession_1).when;
3056
- when.valueOf(editSession_1.rowValueModel).changes(function (editedValue) {
2912
+ when.valueOf(editSession_1.liveRowValue).changes(function (editedValue) {
3057
2913
  _this._rowsBeingEdited.replaceOrPush(editedValue);
3058
2914
  }, { initialValue: 'triggerChangeUnlessNil' });
3059
2915
  this._editorSessions.push(editSession_1);
3060
2916
  editSession_1.onDispose(function () {
3061
- _this._rowsBeingEdited.remove(editSession_1.rowValueModel.value);
2917
+ _this._rowsBeingEdited.remove(editSession_1.liveRowValue.value);
3062
2918
  _this._editorSessions.remove(editSession_1);
3063
2919
  });
3064
2920
  return editSession_1;
@@ -3086,46 +2942,481 @@
3086
2942
  return TableModel;
3087
2943
  }());
3088
2944
 
3089
- /**
3090
- * Create your model:
3091
- * @example
3092
- * this.heroTableModel = TableModel.fromList(heroList, table => {
3093
- * table.pluck("firstName");
3094
- * table.pluck("lastName");
3095
- * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
3096
- * });
3097
- *
3098
- * Create your table
3099
- * @example
3100
- * <aup-table [tableModel]="heroTableModel"></aup-table>
3101
- *
3102
- * Styling
3103
- * @example
3104
- * aup-table {
3105
- * --column-gap: 10px; // defaults to 24px
3106
- * aup-table-cell-renderer {
3107
- * &:first-column {
3108
- * // do stuff
3109
- * }
3110
- * &:last-column {
3111
- * // do stuff
3112
- * }
3113
- * }
3114
- * }
3115
- */
3116
- var TableComponent = /** @class */ (function (_super) {
3117
- __extends(TableComponent, _super);
3118
- function TableComponent() {
3119
- return _super.call(this) || this;
2945
+ var TableCellRendererComponent = /** @class */ (function () {
2946
+ function TableCellRendererComponent() {
2947
+ var _this = this;
2948
+ this.defaultClassNames = 'aup-cell-renderer';
2949
+ this.fillCell = false;
2950
+ this.padChild = false;
2951
+ this.editRowCommand = pectin.Command.create(function () {
2952
+ _this.tableModel.startEditSession(_this.row);
2953
+ });
3120
2954
  }
3121
- TableComponent.prototype.ngOnInit = function () {
3122
- var _a = pectin.Dsl.disposeWith(this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
2955
+ TableCellRendererComponent.prototype.ngOnInit = function () {
2956
+ this.column.attachCell(this);
2957
+ };
2958
+ TableCellRendererComponent.prototype.hasActiveEditor = function () {
2959
+ return !!this.editSession && !!this.column.hasEditorPortal();
2960
+ };
2961
+ TableCellRendererComponent.prototype.initialiseRenderer = function (instance) {
2962
+ this.column.onRendererAttached(this, instance);
2963
+ };
2964
+ TableCellRendererComponent.prototype.initialiseEditor = function (instance) {
2965
+ this.column.onEditorAttached(this, instance);
2966
+ };
2967
+ // @Trace()
2968
+ TableCellRendererComponent.prototype.ngOnChanges = function (changes) {
2969
+ this.column.updatePortalContent(this);
2970
+ };
2971
+ TableCellRendererComponent.prototype.getRendererPortal = function () {
2972
+ return this[CELL_RENDERER_PORTAL];
2973
+ };
2974
+ TableCellRendererComponent.prototype.getEditorPortal = function () {
2975
+ return this[CELL_EDITOR_PORTAL];
2976
+ };
2977
+ TableCellRendererComponent.prototype.getRowData = function () {
2978
+ return {
2979
+ row: this.row,
2980
+ editSession: this.editSession,
2981
+ editRowCommand: this.editRowCommand
2982
+ };
2983
+ };
2984
+ __decorate([
2985
+ core.Input(),
2986
+ __metadata("design:type", Object)
2987
+ ], TableCellRendererComponent.prototype, "row", void 0);
2988
+ __decorate([
2989
+ core.Input(),
2990
+ __metadata("design:type", ColumnModel)
2991
+ ], TableCellRendererComponent.prototype, "column", void 0);
2992
+ __decorate([
2993
+ core.Input(),
2994
+ __metadata("design:type", EditSession)
2995
+ ], TableCellRendererComponent.prototype, "editSession", void 0);
2996
+ __decorate([
2997
+ core.Input(),
2998
+ __metadata("design:type", TableModel)
2999
+ ], TableCellRendererComponent.prototype, "tableModel", void 0);
3000
+ __decorate([
3001
+ core.HostBinding('class'),
3002
+ __metadata("design:type", Object)
3003
+ ], TableCellRendererComponent.prototype, "defaultClassNames", void 0);
3004
+ __decorate([
3005
+ core.HostBinding('class.fillCell'),
3006
+ __metadata("design:type", Object)
3007
+ ], TableCellRendererComponent.prototype, "fillCell", void 0);
3008
+ __decorate([
3009
+ core.HostBinding('class.padChild'),
3010
+ __metadata("design:type", Object)
3011
+ ], TableCellRendererComponent.prototype, "padChild", void 0);
3012
+ __decorate([
3013
+ pectin.Trace(),
3014
+ __metadata("design:type", Function),
3015
+ __metadata("design:paramtypes", [Object]),
3016
+ __metadata("design:returntype", void 0)
3017
+ ], TableCellRendererComponent.prototype, "initialiseEditor", null);
3018
+ TableCellRendererComponent = __decorate([
3019
+ core.Component({
3020
+ selector: 'aup-table-cell-renderer',
3021
+ template: "<ng-container *ngIf=\"!hasActiveEditor()\" [cdkPortalOutlet]=\"getRendererPortal()\" (attached)=\"initialiseRenderer($event.instance)\"></ng-container>\n<ng-container *ngIf=\"hasActiveEditor()\" [cdkPortalOutlet]=\"getEditorPortal()\" (attached)=\"initialiseEditor($event.instance)\"></ng-container>\n",
3022
+ styles: [""]
3023
+ }),
3024
+ __metadata("design:paramtypes", [])
3025
+ ], TableCellRendererComponent);
3026
+ return TableCellRendererComponent;
3027
+ }());
3028
+
3029
+ var HEADER_CELL_RENDERER_PORTAL = Symbol('aup-cell-header-renderer-component-ref');
3030
+ var CELL_RENDERER_PORTAL = Symbol('aup-cell-renderer-component-ref');
3031
+ var CELL_EDITOR_PORTAL = Symbol('aup-cell-editor-component-ref');
3032
+ var PORTAL_RENDERER_COMPONENT = Symbol('aup-cell-renderer-portal-component');
3033
+ var PORTAL_EDITOR_COMPONENT = Symbol('aup-cell-editor-portal-component');
3034
+ var noop = function () {
3035
+ };
3036
+ var ɵ0 = noop;
3037
+ var CellPortalRef = /** @class */ (function () {
3038
+ function CellPortalRef() {
3039
+ }
3040
+ return CellPortalRef;
3041
+ }());
3042
+ var CellHeaderPortalRef = /** @class */ (function (_super) {
3043
+ __extends(CellHeaderPortalRef, _super);
3044
+ function CellHeaderPortalRef(componentType, initialiseHeader) {
3045
+ var _this = _super.call(this) || this;
3046
+ _this.componentType = componentType;
3047
+ _this.initialiseHeader = initialiseHeader;
3048
+ return _this;
3049
+ }
3050
+ CellHeaderPortalRef.prototype.initialiseHost = function (host, columnModel) {
3051
+ typescriptUtilities.assert.isTruthy(host);
3052
+ host[HEADER_CELL_RENDERER_PORTAL] = new portal.ComponentPortal(this.componentType);
3053
+ };
3054
+ CellHeaderPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
3055
+ this.initialiseHeader(portalComponent, host.column);
3056
+ };
3057
+ return CellHeaderPortalRef;
3058
+ }(CellPortalRef));
3059
+ var CellRendererPortalRef = /** @class */ (function (_super) {
3060
+ __extends(CellRendererPortalRef, _super);
3061
+ function CellRendererPortalRef() {
3062
+ return _super !== null && _super.apply(this, arguments) || this;
3063
+ }
3064
+ return CellRendererPortalRef;
3065
+ }(CellPortalRef));
3066
+ var ComponentCellRendererPortalRef = /** @class */ (function (_super) {
3067
+ __extends(ComponentCellRendererPortalRef, _super);
3068
+ function ComponentCellRendererPortalRef(componentType, updateComponent) {
3069
+ var _this = _super.call(this) || this;
3070
+ _this.componentType = componentType;
3071
+ _this.updateComponent = updateComponent;
3072
+ return _this;
3073
+ }
3074
+ ComponentCellRendererPortalRef.prototype.initialiseHost = function (host, columnModel) {
3075
+ host[CELL_RENDERER_PORTAL] = new portal.ComponentPortal(this.componentType);
3076
+ };
3077
+ ComponentCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
3078
+ host[PORTAL_RENDERER_COMPONENT] = portalComponent;
3079
+ this.updateComponent(portalComponent, host.getRowData());
3080
+ };
3081
+ ComponentCellRendererPortalRef.prototype.pushState = function (host) {
3082
+ if (host[PORTAL_RENDERER_COMPONENT]) {
3083
+ this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());
3084
+ }
3085
+ };
3086
+ return ComponentCellRendererPortalRef;
3087
+ }(CellRendererPortalRef));
3088
+ var CellEditorPortalRef = /** @class */ (function (_super) {
3089
+ __extends(CellEditorPortalRef, _super);
3090
+ function CellEditorPortalRef(componentType, initialiseEditorSession) {
3091
+ var _this = _super.call(this) || this;
3092
+ _this.componentType = componentType;
3093
+ _this.initialiseEditorSession = initialiseEditorSession;
3094
+ return _this;
3095
+ }
3096
+ CellEditorPortalRef.prototype.initialiseHost = function (host, columnModel) {
3097
+ typescriptUtilities.assert.isTruthy(host);
3098
+ host[CELL_EDITOR_PORTAL] = new portal.ComponentPortal(this.componentType);
3099
+ };
3100
+ CellEditorPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
3101
+ host[PORTAL_EDITOR_COMPONENT] = portalComponent;
3102
+ this.initialiseEditorSession(portalComponent, host.editSession);
3103
+ };
3104
+ __decorate([
3105
+ pectin.Trace(),
3106
+ __metadata("design:type", Function),
3107
+ __metadata("design:paramtypes", [TableCellRendererComponent, Object]),
3108
+ __metadata("design:returntype", void 0)
3109
+ ], CellEditorPortalRef.prototype, "onPortalAttached", null);
3110
+ return CellEditorPortalRef;
3111
+ }(CellPortalRef));
3112
+ var TemplateCellRendererPortalRef = /** @class */ (function (_super) {
3113
+ __extends(TemplateCellRendererPortalRef, _super);
3114
+ function TemplateCellRendererPortalRef() {
3115
+ return _super.call(this) || this;
3116
+ }
3117
+ TemplateCellRendererPortalRef.prototype.registerPortal = function (templateRef, viewContainer, fillCell, padChild) {
3118
+ this.templateRef = templateRef;
3119
+ this.viewContainer = viewContainer;
3120
+ this.fillCell = fillCell;
3121
+ this.padChild = padChild;
3122
+ };
3123
+ TemplateCellRendererPortalRef.prototype.initialiseHost = function (host, columnModel) {
3124
+ typescriptUtilities.assert.isTruthy(host);
3125
+ };
3126
+ TemplateCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
3127
+ // don't care
3128
+ };
3129
+ TemplateCellRendererPortalRef.prototype.pushState = function (host) {
3130
+ host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());
3131
+ host.fillCell = this.fillCell;
3132
+ host.padChild = this.padChild;
3133
+ };
3134
+ TemplateCellRendererPortalRef.prototype.createPortal = function (data) {
3135
+ return new portal.TemplatePortal(this.templateRef, this.viewContainer, __assign(__assign({}, (data)), { $implicit: data.row }));
3136
+ };
3137
+ __decorate([
3138
+ pectin.Trace(),
3139
+ __metadata("design:type", Function),
3140
+ __metadata("design:paramtypes", [TableCellRendererComponent, void 0]),
3141
+ __metadata("design:returntype", void 0)
3142
+ ], TemplateCellRendererPortalRef.prototype, "onPortalAttached", null);
3143
+ return TemplateCellRendererPortalRef;
3144
+ }(CellRendererPortalRef));
3145
+ var ColumnModel = /** @class */ (function () {
3146
+ function ColumnModel(columnId, defaults) {
3147
+ this.columnId = columnId;
3148
+ this.defaults = defaults;
3149
+ this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
3150
+ component.headerText = column.getHeaderText();
3151
+ });
3152
+ }
3153
+ ColumnModel.prototype.getHeaderText = function () {
3154
+ var _a;
3155
+ return ((_a = this.getColumnTextProperties()) === null || _a === void 0 ? void 0 : _a.headerText()) || this.getDefaultHeaderText();
3156
+ };
3157
+ ColumnModel.prototype.getDefaultHeaderText = function () {
3158
+ return this.columnId;
3159
+ };
3160
+ ColumnModel.prototype.getColumnTextProperties = function () {
3161
+ return this._columnTextProperties || this.defaults.getColumnTextProperties(this);
3162
+ };
3163
+ ColumnModel.prototype.textProperties = function (columnTextProperties) {
3164
+ this._columnTextProperties = columnTextProperties;
3165
+ return this;
3166
+ };
3167
+ ColumnModel.prototype.configureHeaderRenderer = function (config) {
3168
+ this._columnHeaderPortalRef = config;
3169
+ };
3170
+ ColumnModel.prototype.configureCellRenderer = function (config) {
3171
+ this._cellRendererPortalRef = config;
3172
+ };
3173
+ ColumnModel.prototype.configureCellEditor = function (cellEditor) {
3174
+ this._cellEditorPortalRef = cellEditor;
3175
+ };
3176
+ ColumnModel.prototype.cellHeaderRenderer = function (componentType, initialiser) {
3177
+ this.configureHeaderRenderer(new CellHeaderPortalRef(componentType, initialiser));
3178
+ return this;
3179
+ };
3180
+ ColumnModel.prototype.hasEditorPortal = function () {
3181
+ return !!this._cellEditorPortalRef;
3182
+ };
3183
+ ColumnModel.prototype.attachHeaderCell = function (host) {
3184
+ this._columnHeaderPortalRef.initialiseHost(host, this);
3185
+ };
3186
+ ColumnModel.prototype.attachCell = function (host) {
3187
+ this._cellRendererPortalRef.initialiseHost(host, this);
3188
+ if (this.hasEditorPortal()) {
3189
+ this._cellEditorPortalRef.initialiseHost(host, this);
3190
+ }
3191
+ };
3192
+ ColumnModel.prototype.onHeaderAttached = function (host, component) {
3193
+ this._columnHeaderPortalRef.onPortalAttached(host, component);
3194
+ };
3195
+ ColumnModel.prototype.onRendererAttached = function (host, component) {
3196
+ this._cellRendererPortalRef.onPortalAttached(host, component);
3197
+ };
3198
+ ColumnModel.prototype.onEditorAttached = function (host, component) {
3199
+ this._cellEditorPortalRef.onPortalAttached(host, component);
3200
+ };
3201
+ ColumnModel.prototype.updatePortalContent = function (host) {
3202
+ this._cellRendererPortalRef.pushState(host);
3203
+ };
3204
+ __decorate([
3205
+ src.Memoize(),
3206
+ __metadata("design:type", Function),
3207
+ __metadata("design:paramtypes", []),
3208
+ __metadata("design:returntype", String)
3209
+ ], ColumnModel.prototype, "getHeaderText", null);
3210
+ __decorate([
3211
+ src.Memoize(),
3212
+ __metadata("design:type", Function),
3213
+ __metadata("design:paramtypes", []),
3214
+ __metadata("design:returntype", Object)
3215
+ ], ColumnModel.prototype, "getColumnTextProperties", null);
3216
+ __decorate([
3217
+ pectin.Trace(),
3218
+ __metadata("design:type", Function),
3219
+ __metadata("design:paramtypes", [TableCellRendererComponent, Object]),
3220
+ __metadata("design:returntype", void 0)
3221
+ ], ColumnModel.prototype, "onEditorAttached", null);
3222
+ return ColumnModel;
3223
+ }());
3224
+ var PropertyColumnModel = /** @class */ (function (_super) {
3225
+ __extends(PropertyColumnModel, _super);
3226
+ function PropertyColumnModel(property, defaults) {
3227
+ var _this = _super.call(this, property.toString(), defaults) || this;
3228
+ _this.property = property;
3229
+ _this._format = function (value) { return value; };
3230
+ _this.cellRenderer(DefaultCellRendererComponent);
3231
+ return _this;
3232
+ }
3233
+ PropertyColumnModel.prototype.cellRenderer = function (componentType) {
3234
+ var _this = this;
3235
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
3236
+ component.value = _this._format(rowData.row[_this.property]);
3237
+ }));
3238
+ return this;
3239
+ };
3240
+ PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, initialiseComponent) {
3241
+ var _this = this;
3242
+ var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
3243
+ var initialiser = ___default__default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
3244
+ this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
3245
+ var formValueModel = editSession.form.pluck(_this.property);
3246
+ if (validators) {
3247
+ formValueModel.validateUsing(validators);
3248
+ }
3249
+ component.valueModel = formValueModel;
3250
+ if (initialiser) {
3251
+ initialiser(component);
3252
+ }
3253
+ }));
3254
+ return this;
3255
+ };
3256
+ PropertyColumnModel.prototype.format = function (formatter) {
3257
+ typescriptUtilities.assert.isFunction(formatter);
3258
+ this._format = formatter;
3259
+ return this;
3260
+ };
3261
+ return PropertyColumnModel;
3262
+ }(ColumnModel));
3263
+ var ListPropertyColumnModel = /** @class */ (function (_super) {
3264
+ __extends(ListPropertyColumnModel, _super);
3265
+ function ListPropertyColumnModel(property, defaults) {
3266
+ var _this = _super.call(this, property.toString(), defaults) || this;
3267
+ _this.property = property;
3268
+ _this._format = function (value) { return value.map(function (v) { return v === null || v === void 0 ? void 0 : v.toString(); }).join(', '); };
3269
+ _this.cellRenderer(DefaultCellRendererComponent);
3270
+ return _this;
3271
+ }
3272
+ ListPropertyColumnModel.prototype.cellRenderer = function (componentType) {
3273
+ var _this = this;
3274
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
3275
+ component.value = _this._format(rowData.row[_this.property]);
3276
+ }));
3277
+ return this;
3278
+ };
3279
+ ListPropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, initialiseComponent) {
3280
+ var _this = this;
3281
+ var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
3282
+ var initialiser = ___default__default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
3283
+ this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
3284
+ var formListModel = editSession.form.pluckList(_this.property);
3285
+ if (validators) {
3286
+ formListModel.validateUsing(validators);
3287
+ }
3288
+ component.listModel = formListModel;
3289
+ if (initialiser) {
3290
+ initialiser(component);
3291
+ }
3292
+ }));
3293
+ return this;
3294
+ };
3295
+ ListPropertyColumnModel.prototype.format = function (formatter) {
3296
+ typescriptUtilities.assert.isFunction(formatter);
3297
+ this._format = formatter;
3298
+ return this;
3299
+ };
3300
+ return ListPropertyColumnModel;
3301
+ }(ColumnModel));
3302
+ var CustomValueColumnModel = /** @class */ (function (_super) {
3303
+ __extends(CustomValueColumnModel, _super);
3304
+ function CustomValueColumnModel(columnId, defaults, getValue) {
3305
+ var _this = _super.call(this, columnId, defaults) || this;
3306
+ _this.getValue = getValue;
3307
+ _this.cellRenderer(DefaultCellRendererComponent);
3308
+ return _this;
3309
+ }
3310
+ CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
3311
+ var _this = this;
3312
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
3313
+ component.value = _this.getValue(rowData.row);
3314
+ }));
3315
+ return this;
3316
+ };
3317
+ return CustomValueColumnModel;
3318
+ }(ColumnModel));
3319
+ var EditorControlColumnModel = /** @class */ (function (_super) {
3320
+ __extends(EditorControlColumnModel, _super);
3321
+ function EditorControlColumnModel(columnId, saveCommand, defaults) {
3322
+ var _this = _super.call(this, columnId, defaults) || this;
3323
+ _this.cellRenderer(EditRowControls);
3324
+ return _this;
3325
+ }
3326
+ EditorControlColumnModel.prototype.cellRenderer = function (componentType) {
3327
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
3328
+ component.row = rowData.row;
3329
+ component.editSession = rowData.editSession;
3330
+ component.editRowCommand = rowData.editRowCommand;
3331
+ }));
3332
+ return this;
3333
+ };
3334
+ EditorControlColumnModel.prototype.getDefaultHeaderText = function () {
3335
+ return '';
3336
+ };
3337
+ return EditorControlColumnModel;
3338
+ }(ColumnModel));
3339
+ var CustomTemplateColumnModel = /** @class */ (function (_super) {
3340
+ __extends(CustomTemplateColumnModel, _super);
3341
+ function CustomTemplateColumnModel(columnId, defaults) {
3342
+ var _this = _super.call(this, columnId, defaults) || this;
3343
+ _this.config = new TemplateCellRendererPortalRef();
3344
+ _this.configureCellRenderer(_this.config);
3345
+ return _this;
3346
+ }
3347
+ CustomTemplateColumnModel.prototype.setTemplate = function (templateRef, viewContainer, fillCell, padChild) {
3348
+ this.config.registerPortal(templateRef, viewContainer, fillCell, padChild);
3349
+ };
3350
+ return CustomTemplateColumnModel;
3351
+ }(ColumnModel));
3352
+ var SelectionColumnModel = /** @class */ (function (_super) {
3353
+ __extends(SelectionColumnModel, _super);
3354
+ function SelectionColumnModel(columnId, defaults, selectionModel) {
3355
+ var _this = _super.call(this, columnId, defaults) || this;
3356
+ if (selectionModel instanceof pectin.MultipleSelectionModel) {
3357
+ _this.cellHeaderRenderer(SelectHeaderCellRendererComponent, function (component) {
3358
+ component.selectionModel = selectionModel;
3359
+ });
3360
+ }
3361
+ _this.configureCellRenderer(new ComponentCellRendererPortalRef(SelectCellRendererComponent, function (component, rowData) {
3362
+ component.row = rowData.row;
3363
+ component.selectionModel = selectionModel;
3364
+ }));
3365
+ return _this;
3366
+ }
3367
+ SelectionColumnModel.prototype.getDefaultHeaderText = function () {
3368
+ return '';
3369
+ };
3370
+ return SelectionColumnModel;
3371
+ }(ColumnModel));
3372
+
3373
+ /**
3374
+ * Create your model:
3375
+ * @example
3376
+ * this.heroTableModel = TableModel.fromList(heroList, table => {
3377
+ * table.pluck("firstName");
3378
+ * table.pluck("lastName");
3379
+ * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
3380
+ * });
3381
+ *
3382
+ * Create your table
3383
+ * @example
3384
+ * <aup-table [tableModel]="heroTableModel"></aup-table>
3385
+ *
3386
+ * Styling
3387
+ * @example
3388
+ * aup-table {
3389
+ * --column-gap: 10px; // defaults to 24px
3390
+ * aup-table-cell-renderer {
3391
+ * &:first-column {
3392
+ * // do stuff
3393
+ * }
3394
+ * &:last-column {
3395
+ * // do stuff
3396
+ * }
3397
+ * }
3398
+ * }
3399
+ */
3400
+ var TableComponent = /** @class */ (function (_super) {
3401
+ __extends(TableComponent, _super);
3402
+ function TableComponent() {
3403
+ return _super.call(this) || this;
3404
+ }
3405
+ TableComponent.prototype.ngOnInit = function () {
3406
+ var _a = pectin.Dsl.disposeWith(this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
3123
3407
  this.columns = chain(this.tableModel.columns);
3124
3408
  this.columnIds = chain(this.columns).pluck('columnId');
3409
+ this.columnsById = chain(this.columns).indexBy('columnId');
3125
3410
  };
3126
3411
  TableComponent.prototype.isEditing = function (row) {
3127
3412
  return !!this.tableModel.getEditSessionFor(row);
3128
3413
  };
3414
+ TableComponent.prototype.registerColumnTemplate = function (columnId, templateRef, viewContainer, fillCell, padChild) {
3415
+ var column = this.columnsById.get(columnId);
3416
+ if (column instanceof CustomTemplateColumnModel) {
3417
+ column.setTemplate(templateRef, viewContainer, fillCell, padChild);
3418
+ }
3419
+ };
3129
3420
  __decorate([
3130
3421
  core.Input(),
3131
3422
  pectin.TrackExternal(),
@@ -3144,94 +3435,62 @@
3144
3435
 
3145
3436
  var ColumnTemplateDirective = /** @class */ (function () {
3146
3437
  function ColumnTemplateDirective(host, templateRef, viewContainer) {
3438
+ this.host = host;
3147
3439
  this.templateRef = templateRef;
3148
3440
  this.viewContainer = viewContainer;
3441
+ this.aupColumnTemplateFillCell = false;
3442
+ this.aupColumnTemplateAutoPadChild = undefined;
3149
3443
  }
3444
+ ColumnTemplateDirective.prototype.ngOnInit = function () {
3445
+ var _a;
3446
+ pectin.assert.isTruthy(this.aupColumnTemplateColumnId);
3447
+ this.host.registerColumnTemplate(this.aupColumnTemplateColumnId, this.templateRef, this.viewContainer, this.aupColumnTemplateFillCell, (_a = this.aupColumnTemplateAutoPadChild) !== null && _a !== void 0 ? _a : this.aupColumnTemplateFillCell);
3448
+ };
3150
3449
  ColumnTemplateDirective.ctorParameters = function () { return [
3151
3450
  { type: TableComponent },
3152
3451
  { type: core.TemplateRef },
3153
3452
  { type: core.ViewContainerRef }
3154
3453
  ]; };
3155
- ColumnTemplateDirective = __decorate([
3156
- core.Directive({
3157
- selector: '[aupColumnTemplate]'
3158
- }),
3159
- __metadata("design:paramtypes", [TableComponent,
3160
- core.TemplateRef,
3161
- core.ViewContainerRef])
3162
- ], ColumnTemplateDirective);
3163
- return ColumnTemplateDirective;
3164
- }());
3165
-
3166
- var TableCellRendererComponent = /** @class */ (function () {
3167
- function TableCellRendererComponent() {
3168
- var _this = this;
3169
- this.defaultClassNames = "aup-header-cell-renderer";
3170
- this.editRowCommand = pectin.Command.create(function () {
3171
- _this.tableModel.startEditSession(_this.row);
3172
- });
3173
- }
3174
- TableCellRendererComponent.prototype.initialiseRenderer = function (instance) {
3175
- if (this.renderer !== instance) {
3176
- this.renderer = instance;
3177
- this.column.updateCellRenderer(this.renderer, this.row, this.editRowCommand, this.editSession);
3178
- }
3179
- };
3180
- TableCellRendererComponent.prototype.initialiseEditor = function (instance) {
3181
- if (this.editor !== instance) {
3182
- this.editor = instance;
3183
- this.column.initialiseEditor(this.editor, this.editSession);
3184
- }
3185
- };
3186
- TableCellRendererComponent.prototype.ngOnChanges = function (changes) {
3187
- if (this.renderer) {
3188
- this.column.updateCellRenderer(this.renderer, this.row, this.editRowCommand, this.editSession);
3189
- this.renderer.editSession = this.editSession;
3190
- }
3191
- };
3192
- TableCellRendererComponent.prototype.hasActiveEditor = function () {
3193
- return this.editSession && this.column.hasEditor();
3194
- };
3195
3454
  __decorate([
3196
3455
  core.Input(),
3197
- __metadata("design:type", Object)
3198
- ], TableCellRendererComponent.prototype, "row", void 0);
3456
+ __metadata("design:type", String)
3457
+ ], ColumnTemplateDirective.prototype, "aupColumnTemplate", void 0);
3199
3458
  __decorate([
3200
3459
  core.Input(),
3201
- __metadata("design:type", ColumnModel)
3202
- ], TableCellRendererComponent.prototype, "column", void 0);
3460
+ __metadata("design:type", String)
3461
+ ], ColumnTemplateDirective.prototype, "aupColumnTemplateColumnId", void 0);
3203
3462
  __decorate([
3204
3463
  core.Input(),
3205
- __metadata("design:type", EditSession)
3206
- ], TableCellRendererComponent.prototype, "editSession", void 0);
3464
+ __metadata("design:type", Object)
3465
+ ], ColumnTemplateDirective.prototype, "aupColumnTemplateFillCell", void 0);
3207
3466
  __decorate([
3208
3467
  core.Input(),
3209
- __metadata("design:type", TableModel)
3210
- ], TableCellRendererComponent.prototype, "tableModel", void 0);
3211
- __decorate([
3212
- core.HostBinding('class'),
3213
3468
  __metadata("design:type", Object)
3214
- ], TableCellRendererComponent.prototype, "defaultClassNames", void 0);
3215
- TableCellRendererComponent = __decorate([
3216
- core.Component({
3217
- selector: 'aup-table-cell-renderer',
3218
- template: "<ng-container *ngIf=\"!hasActiveEditor()\" [cdkPortalOutlet]=\"column.cellRendererPortal\" (attached)=\"initialiseRenderer($event.instance)\"></ng-container>\n<ng-container *ngIf=\"hasActiveEditor()\" [cdkPortalOutlet]=\"column.cellEditorPortal\" (attached)=\"initialiseEditor($event.instance)\"></ng-container>\n",
3219
- styles: [":host{display:flex;flex-direction:column;align-items:stretch}"]
3469
+ ], ColumnTemplateDirective.prototype, "aupColumnTemplateAutoPadChild", void 0);
3470
+ ColumnTemplateDirective = __decorate([
3471
+ core.Directive({
3472
+ selector: '[aupColumnTemplate]'
3220
3473
  }),
3221
- __metadata("design:paramtypes", [])
3222
- ], TableCellRendererComponent);
3223
- return TableCellRendererComponent;
3474
+ __metadata("design:paramtypes", [TableComponent,
3475
+ core.TemplateRef,
3476
+ core.ViewContainerRef])
3477
+ ], ColumnTemplateDirective);
3478
+ return ColumnTemplateDirective;
3224
3479
  }());
3225
3480
 
3226
3481
  var TableHeaderCellRendererComponent = /** @class */ (function () {
3227
3482
  function TableHeaderCellRendererComponent() {
3228
- this.defaultClassNames = "aup-header-cell-renderer";
3483
+ this.defaultClassNames = 'aup-header-cell-renderer';
3229
3484
  }
3485
+ TableHeaderCellRendererComponent.prototype.ngOnInit = function () {
3486
+ this.column.attachHeaderCell(this);
3487
+ };
3488
+ // @Trace()
3230
3489
  TableHeaderCellRendererComponent.prototype.initialiseHeader = function (instance) {
3231
- if (this.renderer !== instance) {
3232
- this.renderer = instance;
3233
- this.column.initialiseHeader(this.renderer);
3234
- }
3490
+ this.column.onHeaderAttached(this, instance);
3491
+ };
3492
+ TableHeaderCellRendererComponent.prototype.getPortal = function () {
3493
+ return this[HEADER_CELL_RENDERER_PORTAL];
3235
3494
  };
3236
3495
  __decorate([
3237
3496
  core.Input(),
@@ -3244,8 +3503,8 @@
3244
3503
  TableHeaderCellRendererComponent = __decorate([
3245
3504
  core.Component({
3246
3505
  selector: 'aup-table-header-cell-renderer',
3247
- template: "<ng-container [cdkPortalOutlet]=\"column.columnHeaderCellRendererPortal\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
3248
- styles: [":host{display:flex;flex-direction:column;align-items:stretch}"]
3506
+ template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
3507
+ styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
3249
3508
  }),
3250
3509
  __metadata("design:paramtypes", [])
3251
3510
  ], TableHeaderCellRendererComponent);
@@ -3337,6 +3596,58 @@
3337
3596
  return VerticalFocusContainerComponent;
3338
3597
  }(FocusContainerComponent));
3339
3598
 
3599
+ var MultipleSelectInputComponent = /** @class */ (function (_super) {
3600
+ __extends(MultipleSelectInputComponent, _super);
3601
+ function MultipleSelectInputComponent() {
3602
+ var _this = _super.call(this) || this;
3603
+ _this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
3604
+ return _this;
3605
+ }
3606
+ MultipleSelectInputComponent.prototype.ngOnInit = function () {
3607
+ };
3608
+ __decorate([
3609
+ core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
3610
+ __metadata("design:type", Object)
3611
+ ], MultipleSelectInputComponent.prototype, "listModel", void 0);
3612
+ __decorate([
3613
+ core.Input(), pectin.TrackExternal(),
3614
+ __metadata("design:type", pectin.ListModel)
3615
+ ], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
3616
+ __decorate([
3617
+ core.Input(), pectin.StoreInListModel('optionsModel'),
3618
+ __metadata("design:type", Array)
3619
+ ], MultipleSelectInputComponent.prototype, "options", void 0);
3620
+ __decorate([
3621
+ core.Input(),
3622
+ __metadata("design:type", Object)
3623
+ ], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
3624
+ __decorate([
3625
+ core.Input(),
3626
+ __metadata("design:type", Boolean)
3627
+ ], MultipleSelectInputComponent.prototype, "allowNil", void 0);
3628
+ __decorate([
3629
+ core.ContentChild('optionTemplate'),
3630
+ __metadata("design:type", core.TemplateRef)
3631
+ ], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
3632
+ __decorate([
3633
+ core.ContentChild('nilOptionTemplate'),
3634
+ __metadata("design:type", core.TemplateRef)
3635
+ ], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
3636
+ __decorate([
3637
+ core.Input(),
3638
+ __metadata("design:type", Function)
3639
+ ], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
3640
+ MultipleSelectInputComponent = __decorate([
3641
+ core.Component({
3642
+ selector: 'aup-multiple-select-input',
3643
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"listModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
3644
+ styles: [":host{display:inline-block}mat-form-field{width:100%}"]
3645
+ }),
3646
+ __metadata("design:paramtypes", [])
3647
+ ], MultipleSelectInputComponent);
3648
+ return MultipleSelectInputComponent;
3649
+ }(AbstractListInputComponent));
3650
+
3340
3651
  var ComponentsModule = /** @class */ (function () {
3341
3652
  function ComponentsModule() {
3342
3653
  }
@@ -3344,6 +3655,8 @@
3344
3655
  core.NgModule({
3345
3656
  declarations: [
3346
3657
  AbstractInputComponent,
3658
+ AbstractValueInputComponent,
3659
+ AbstractListInputComponent,
3347
3660
  AbstractInputActivity,
3348
3661
  NumberInputComponent,
3349
3662
  StringInputComponent,
@@ -3369,7 +3682,8 @@
3369
3682
  SelectCellRendererComponent,
3370
3683
  SelectHeaderCellRendererComponent,
3371
3684
  DefaultHeaderCellRendererComponent,
3372
- TableHeaderCellRendererComponent
3685
+ TableHeaderCellRendererComponent,
3686
+ MultipleSelectInputComponent
3373
3687
  ],
3374
3688
  imports: [
3375
3689
  common.CommonModule,
@@ -3405,7 +3719,8 @@
3405
3719
  CardContainerComponent,
3406
3720
  TableComponent,
3407
3721
  EditRowControls,
3408
- ColumnTemplateDirective
3722
+ ColumnTemplateDirective,
3723
+ MultipleSelectInputComponent
3409
3724
  ],
3410
3725
  providers: [
3411
3726
  FocusBindingFactory,
@@ -4527,7 +4842,7 @@
4527
4842
  return PopStateNavigation;
4528
4843
  }(AbstractPopStateNavigation));
4529
4844
 
4530
- exports.ɵcm = /** @class */ (function () {
4845
+ exports.ɵcp = /** @class */ (function () {
4531
4846
  function PlaceHistory() {
4532
4847
  this._archive = new Map();
4533
4848
  this.placeHistoryDepth = 4;
@@ -4664,7 +4979,7 @@
4664
4979
  // }
4665
4980
  //
4666
4981
  // }
4667
- })(exports.ɵcm || (exports.ɵcm = {}));
4982
+ })(exports.ɵcp || (exports.ɵcp = {}));
4668
4983
 
4669
4984
  exports.UrlSnapshot = /** @class */ (function () {
4670
4985
  // TODO: Update this accept a url Parser so it can be immutable and generate new trees on mutation using toString() are parseUrl.
@@ -5187,11 +5502,11 @@
5187
5502
  PlaceRouter.ctorParameters = function () { return [
5188
5503
  { type: router.Router },
5189
5504
  { type: common.Location },
5190
- { type: exports.ɵbw },
5505
+ { type: exports.ɵbz },
5191
5506
  { type: UrlService },
5192
- { type: exports.ɵcm }
5507
+ { type: exports.ɵcp }
5193
5508
  ]; };
5194
- PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵbw), core.ɵɵinject(UrlService), core.ɵɵinject(exports.ɵcm)); }, token: PlaceRouter, providedIn: "root" });
5509
+ PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵbz), core.ɵɵinject(UrlService), core.ɵɵinject(exports.ɵcp)); }, token: PlaceRouter, providedIn: "root" });
5195
5510
  __decorate([
5196
5511
  pectin.Trace(),
5197
5512
  __metadata("design:type", Function),
@@ -5204,9 +5519,9 @@
5204
5519
  }),
5205
5520
  __metadata("design:paramtypes", [router.Router,
5206
5521
  common.Location,
5207
- exports.ɵbw,
5522
+ exports.ɵbz,
5208
5523
  UrlService,
5209
- exports.ɵcm])
5524
+ exports.ɵcp])
5210
5525
  ], PlaceRouter);
5211
5526
  return PlaceRouter;
5212
5527
  }(pectin.GarbageCollector));
@@ -6300,8 +6615,10 @@
6300
6615
  exports.AbstractInputActivity = AbstractInputActivity;
6301
6616
  exports.AbstractInputComponent = AbstractInputComponent;
6302
6617
  exports.AbstractInteractionContext = AbstractInteractionContext;
6618
+ exports.AbstractListInputComponent = AbstractListInputComponent;
6303
6619
  exports.AbstractPlaceNavigationComponent = AbstractPlaceNavigationComponent;
6304
6620
  exports.AbstractPopStateNavigation = AbstractPopStateNavigation;
6621
+ exports.AbstractValueInputComponent = AbstractValueInputComponent;
6305
6622
  exports.Activity = Activity;
6306
6623
  exports.ActivityActionsComponent = ActivityActionsComponent;
6307
6624
  exports.ActivityContainerComponent = ActivityContainerComponent;
@@ -6311,11 +6628,18 @@
6311
6628
  exports.AlertDialogComponent = AlertDialogComponent;
6312
6629
  exports.AngularUiPowerupsModule = AngularUiPowerupsModule;
6313
6630
  exports.BusyOverlayComponent = BusyOverlayComponent;
6631
+ exports.CELL_EDITOR_PORTAL = CELL_EDITOR_PORTAL;
6632
+ exports.CELL_RENDERER_PORTAL = CELL_RENDERER_PORTAL;
6314
6633
  exports.CardContainerComponent = CardContainerComponent;
6634
+ exports.CellEditorPortalRef = CellEditorPortalRef;
6635
+ exports.CellHeaderPortalRef = CellHeaderPortalRef;
6636
+ exports.CellPortalRef = CellPortalRef;
6637
+ exports.CellRendererPortalRef = CellRendererPortalRef;
6315
6638
  exports.CheckboxInputComponent = CheckboxInputComponent;
6316
6639
  exports.ColumnModel = ColumnModel;
6317
6640
  exports.ColumnTemplateDirective = ColumnTemplateDirective;
6318
6641
  exports.CommandDirective = CommandDirective;
6642
+ exports.ComponentCellRendererPortalRef = ComponentCellRendererPortalRef;
6319
6643
  exports.ComponentsModule = ComponentsModule;
6320
6644
  exports.ConfirmThenDialogComponent = ConfirmThenDialogComponent;
6321
6645
  exports.ConfirmationDialogComponent = ConfirmationDialogComponent;
@@ -6341,26 +6665,31 @@
6341
6665
  exports.FocusBindingFactory = FocusBindingFactory;
6342
6666
  exports.FocusContainerComponent = FocusContainerComponent;
6343
6667
  exports.FocusableComponent = FocusableComponent;
6668
+ exports.HEADER_CELL_RENDERER_PORTAL = HEADER_CELL_RENDERER_PORTAL;
6344
6669
  exports.InPlaceInteractionContextComponent = InPlaceInteractionContextComponent;
6345
6670
  exports.InteractionContextTriggerFor = InteractionContextTriggerFor;
6346
6671
  exports.InteractionModule = InteractionModule;
6347
- exports.InteractionService = exports.ɵbw;
6672
+ exports.InteractionService = exports.ɵbz;
6348
6673
  exports.InteractionServiceRoutingAdapter = InteractionServiceRoutingAdapter;
6349
6674
  exports.LEFT_RIGHT_PLACE_ANIMATION = LEFT_RIGHT_PLACE_ANIMATION;
6350
6675
  exports.ListPlaceNavComponent = ListPlaceNavComponent;
6676
+ exports.ListPropertyColumnModel = ListPropertyColumnModel;
6351
6677
  exports.ModalInteractionContextFactory = ModalInteractionContextFactory;
6678
+ exports.MultipleSelectInputComponent = MultipleSelectInputComponent;
6352
6679
  exports.Navigating = Navigating;
6353
6680
  exports.NavigatingDuringInteraction = NavigatingDuringInteraction;
6354
6681
  exports.NavigationSession = NavigationSession;
6355
6682
  exports.NoopAuthGuard = NoopAuthGuard;
6356
6683
  exports.NoopComponent = NoopComponent;
6357
6684
  exports.NumberInputComponent = NumberInputComponent;
6685
+ exports.PORTAL_EDITOR_COMPONENT = PORTAL_EDITOR_COMPONENT;
6686
+ exports.PORTAL_RENDERER_COMPONENT = PORTAL_RENDERER_COMPONENT;
6358
6687
  exports.PasswordInputComponent = PasswordInputComponent;
6359
6688
  exports.Place = Place;
6360
6689
  exports.PlaceComponentDeactivationHandler = PlaceComponentDeactivationHandler;
6361
6690
  exports.PlaceDefinition = PlaceDefinition;
6362
6691
  exports.PlaceGuard = PlaceGuard;
6363
- exports.PlaceHistory = exports.ɵcm;
6692
+ exports.PlaceHistory = exports.ɵcp;
6364
6693
  exports.PlaceModule = PlaceModule;
6365
6694
  exports.PlaceOutletComponent = PlaceOutletComponent;
6366
6695
  exports.PlaceRouter = PlaceRouter;
@@ -6391,6 +6720,7 @@
6391
6720
  exports.TableComponent = TableComponent;
6392
6721
  exports.TableHeaderCellRendererComponent = TableHeaderCellRendererComponent;
6393
6722
  exports.TableModel = TableModel;
6723
+ exports.TemplateCellRendererPortalRef = TemplateCellRendererPortalRef;
6394
6724
  exports.TextInputComponent = TextInputComponent;
6395
6725
  exports.UrlService = UrlService;
6396
6726
  exports.VerticalFocusContainerComponent = VerticalFocusContainerComponent;
@@ -6404,70 +6734,74 @@
6404
6734
  exports.leftRightPlaceAnimation = leftRightPlaceAnimation;
6405
6735
  exports.slideDownOnEnterAnimation = slideDownOnEnterAnimation;
6406
6736
  exports.slideRightOnEnterAnimation = slideRightOnEnterAnimation;
6737
+ exports.ɵ0 = ɵ0;
6407
6738
  exports.ɵa = DirectivesModule;
6408
6739
  exports.ɵb = CommandDirective;
6409
- exports.ɵba = CardContainerComponent;
6410
- exports.ɵbb = TableComponent;
6411
- exports.ɵbc = EditRowControls;
6412
- exports.ɵbd = ColumnTemplateDirective;
6413
- exports.ɵbe = DefaultCellRendererComponent;
6414
- exports.ɵbf = TableCellRendererComponent;
6415
- exports.ɵbg = SelectCellRendererComponent;
6416
- exports.ɵbh = SelectHeaderCellRendererComponent;
6417
- exports.ɵbi = DefaultHeaderCellRendererComponent;
6418
- exports.ɵbj = TableHeaderCellRendererComponent;
6419
- exports.ɵbk = InteractionModule;
6420
- exports.ɵbl = ActivityContainerComponent;
6421
- exports.ɵbm = AbstractInteractionContext;
6422
- exports.ɵbn = ActivityOutletComponent;
6423
- exports.ɵbo = ConfirmationDialogComponent;
6424
- exports.ɵbp = ACTIVITY_DATA;
6425
- exports.ɵbq = Activity;
6426
- exports.ɵbs = ConfirmThenDialogComponent;
6427
- exports.ɵbt = AlertDialogComponent;
6428
- exports.ɵbv = InPlaceInteractionContextComponent;
6429
- exports.ɵbx = ModalInteractionContextFactory;
6430
- exports.ɵby = AddItemInteractionContextComponent;
6431
- exports.ɵbz = ActivityActionsComponent;
6740
+ exports.ɵba = VerticalFocusContainerComponent;
6741
+ exports.ɵbb = FocusableComponent;
6742
+ exports.ɵbc = CardContainerComponent;
6743
+ exports.ɵbd = TableComponent;
6744
+ exports.ɵbe = EditRowControls;
6745
+ exports.ɵbf = ColumnTemplateDirective;
6746
+ exports.ɵbg = DefaultCellRendererComponent;
6747
+ exports.ɵbh = TableCellRendererComponent;
6748
+ exports.ɵbi = SelectCellRendererComponent;
6749
+ exports.ɵbj = SelectHeaderCellRendererComponent;
6750
+ exports.ɵbk = DefaultHeaderCellRendererComponent;
6751
+ exports.ɵbl = TableHeaderCellRendererComponent;
6752
+ exports.ɵbm = MultipleSelectInputComponent;
6753
+ exports.ɵbn = InteractionModule;
6754
+ exports.ɵbo = ActivityContainerComponent;
6755
+ exports.ɵbp = AbstractInteractionContext;
6756
+ exports.ɵbq = ActivityOutletComponent;
6757
+ exports.ɵbr = ConfirmationDialogComponent;
6758
+ exports.ɵbs = ACTIVITY_DATA;
6759
+ exports.ɵbt = Activity;
6760
+ exports.ɵbv = ConfirmThenDialogComponent;
6761
+ exports.ɵbw = AlertDialogComponent;
6762
+ exports.ɵby = InPlaceInteractionContextComponent;
6432
6763
  exports.ɵc = FocusBindingDirective;
6433
- exports.ɵca = PopupInteractionContextComponent;
6434
- exports.ɵcb = InteractionContextTriggerFor;
6435
- exports.ɵcc = PlaceModule;
6436
- exports.ɵcd = EmptyStateComponent;
6437
- exports.ɵce = BusyOverlayComponent;
6438
- exports.ɵcf = PlaceOutletComponent;
6439
- exports.ɵcg = leftRightPlaceAnimation;
6440
- exports.ɵch = LEFT_RIGHT_PLACE_ANIMATION;
6441
- exports.ɵci = AUP_PLACE_CONFIG;
6442
- exports.ɵck = PlaceRouter;
6443
- exports.ɵcl = UrlService;
6444
- exports.ɵcn = TabbedPlaceNavigationComponent;
6445
- exports.ɵco = AbstractPlaceNavigationComponent;
6446
- exports.ɵcp = ListPlaceNavComponent;
6447
- exports.ɵcq = SidePlaceNavigationComponent;
6764
+ exports.ɵca = ModalInteractionContextFactory;
6765
+ exports.ɵcb = AddItemInteractionContextComponent;
6766
+ exports.ɵcc = ActivityActionsComponent;
6767
+ exports.ɵcd = PopupInteractionContextComponent;
6768
+ exports.ɵce = InteractionContextTriggerFor;
6769
+ exports.ɵcf = PlaceModule;
6770
+ exports.ɵcg = EmptyStateComponent;
6771
+ exports.ɵch = BusyOverlayComponent;
6772
+ exports.ɵci = PlaceOutletComponent;
6773
+ exports.ɵcj = leftRightPlaceAnimation;
6774
+ exports.ɵck = LEFT_RIGHT_PLACE_ANIMATION;
6775
+ exports.ɵcl = AUP_PLACE_CONFIG;
6776
+ exports.ɵcn = PlaceRouter;
6777
+ exports.ɵco = UrlService;
6778
+ exports.ɵcq = TabbedPlaceNavigationComponent;
6779
+ exports.ɵcr = AbstractPlaceNavigationComponent;
6780
+ exports.ɵcs = ListPlaceNavComponent;
6781
+ exports.ɵct = SidePlaceNavigationComponent;
6448
6782
  exports.ɵd = DisposableComponent;
6449
6783
  exports.ɵe = FocusBindingFactory;
6450
6784
  exports.ɵf = ComponentsModule;
6451
6785
  exports.ɵg = AbstractInputComponent;
6452
- exports.ɵh = AbstractInputActivity;
6453
- exports.ɵi = Activity;
6454
- exports.ɵj = ACTIVITY_DATA;
6455
- exports.ɵk = NumberInputComponent;
6456
- exports.ɵl = StringInputComponent;
6457
- exports.ɵm = StringInputActivity;
6458
- exports.ɵn = TextInputComponent;
6459
- exports.ɵo = PasswordInputComponent;
6460
- exports.ɵp = SelectInputComponent;
6461
- exports.ɵq = CheckboxInputComponent;
6462
- exports.ɵr = ScrollContainerComponent;
6463
- exports.ɵs = NoopComponent;
6464
- exports.ɵt = SwitchCaseOption;
6465
- exports.ɵu = SwitchCaseWhenDirective;
6466
- exports.ɵv = SwitchCaseDefaultDirective;
6467
- exports.ɵw = SwitchCaseComponent;
6468
- exports.ɵx = FocusContainerComponent;
6469
- exports.ɵy = VerticalFocusContainerComponent;
6470
- exports.ɵz = FocusableComponent;
6786
+ exports.ɵh = AbstractValueInputComponent;
6787
+ exports.ɵi = AbstractListInputComponent;
6788
+ exports.ɵj = AbstractInputActivity;
6789
+ exports.ɵk = Activity;
6790
+ exports.ɵl = ACTIVITY_DATA;
6791
+ exports.ɵm = NumberInputComponent;
6792
+ exports.ɵn = StringInputComponent;
6793
+ exports.ɵo = StringInputActivity;
6794
+ exports.ɵp = TextInputComponent;
6795
+ exports.ɵq = PasswordInputComponent;
6796
+ exports.ɵr = SelectInputComponent;
6797
+ exports.ɵs = CheckboxInputComponent;
6798
+ exports.ɵt = ScrollContainerComponent;
6799
+ exports.ɵu = NoopComponent;
6800
+ exports.ɵv = SwitchCaseOption;
6801
+ exports.ɵw = SwitchCaseWhenDirective;
6802
+ exports.ɵx = SwitchCaseDefaultDirective;
6803
+ exports.ɵy = SwitchCaseComponent;
6804
+ exports.ɵz = FocusContainerComponent;
6471
6805
 
6472
6806
  Object.defineProperty(exports, '__esModule', { value: true });
6473
6807