@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
@@ -7,12 +7,12 @@ import { MatInputModule } from '@angular/material/input';
7
7
  import { MatSelectModule } from '@angular/material/select';
8
8
  import { MatTabsModule, MatTabGroup, MAT_TABS_CONFIG } from '@angular/material/tabs';
9
9
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
10
- import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
10
+ import { ComponentPortal, PortalModule, TemplatePortal } from '@angular/cdk/portal';
11
11
  import { MatButtonModule } from '@angular/material/button';
12
12
  import { MatCheckboxModule } from '@angular/material/checkbox';
13
13
  import { MatIconModule } from '@angular/material/icon';
14
14
  import { MatTableModule } from '@angular/material/table';
15
- import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, Deferred, Trace, MutableListModel, FocusManager, Form, DelegatingFormValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MutableValueModel, MultipleSelectionModel, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
15
+ import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, Deferred, Trace, MutableListModel, FocusManager, Form, DelegatingFormListModel, DelegatingFormValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MutableValueModel, MultipleSelectionModel, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
16
16
  import { FlexModule, GridModule } from '@angular/flex-layout';
17
17
  import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
18
18
  import { RouterModule, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterOutlet } from '@angular/router';
@@ -1535,7 +1535,7 @@ var CardContainerComponent = /** @class */ (function (_super) {
1535
1535
  Component({
1536
1536
  selector: 'aup-card-container',
1537
1537
  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",
1538
- 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}"]
1538
+ 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}"]
1539
1539
  }),
1540
1540
  __metadata("design:paramtypes", [])
1541
1541
  ], CardContainerComponent);
@@ -1791,18 +1791,6 @@ var AbstractInputComponent = /** @class */ (function (_super) {
1791
1791
  __extends(AbstractInputComponent, _super);
1792
1792
  function AbstractInputComponent() {
1793
1793
  var _this = _super.call(this) || this;
1794
- /**
1795
- * A backing model for all our @Input() valueModel properties which should be defined as follows.
1796
- *
1797
- * @Input() @TrackExternal({useExisting: "delegatingFormValueModel"})
1798
- * valueModel: FormValueModel<string> | MutableValueModel<string>;
1799
- *
1800
- * This approach allows the input to accept plain or form models but all backed by a form
1801
- * friendly delegate. We have to use an existing delegate for union types as pectin just
1802
- * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
1803
- */
1804
- // We have to register it as a disposable so it ditches any listeners when we're disposed.
1805
- _this.delegatingFormValueModel = _this.registerDisposable(new DelegatingFormValueModel());
1806
1794
  // TODO: fix this.
1807
1795
  // tslint:disable-next-line:no-output-native
1808
1796
  _this.focus = new EventEmitter();
@@ -1821,6 +1809,13 @@ var AbstractInputComponent = /** @class */ (function (_super) {
1821
1809
  };
1822
1810
  return _this;
1823
1811
  }
1812
+ Object.defineProperty(AbstractInputComponent.prototype, "inputModel", {
1813
+ get: function () {
1814
+ return lang$1.abstractMethod(this.constructor, "inputModel");
1815
+ },
1816
+ enumerable: true,
1817
+ configurable: true
1818
+ });
1824
1819
  AbstractInputComponent.prototype.notifyClick = function () {
1825
1820
  this.safelyInvoke(this.clickCommand);
1826
1821
  };
@@ -1852,7 +1847,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
1852
1847
  };
1853
1848
  Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
1854
1849
  get: function () {
1855
- return this.delegatingFormValueModel.enabled;
1850
+ return this.inputModel.enabled;
1856
1851
  },
1857
1852
  enumerable: true,
1858
1853
  configurable: true
@@ -1862,7 +1857,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
1862
1857
  };
1863
1858
  Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
1864
1859
  get: function () {
1865
- return this.delegatingFormValueModel.errorList;
1860
+ return this.inputModel.errorList;
1866
1861
  },
1867
1862
  enumerable: true,
1868
1863
  configurable: true
@@ -1874,6 +1869,13 @@ var AbstractInputComponent = /** @class */ (function (_super) {
1874
1869
  enumerable: true,
1875
1870
  configurable: true
1876
1871
  });
1872
+ Object.defineProperty(AbstractInputComponent.prototype, "focusContext", {
1873
+ get: function () {
1874
+ return this.inputModel.focusContext;
1875
+ },
1876
+ enumerable: true,
1877
+ configurable: true
1878
+ });
1877
1879
  __decorate([
1878
1880
  Input(),
1879
1881
  __metadata("design:type", String)
@@ -1955,6 +1957,54 @@ var AbstractInputComponent = /** @class */ (function (_super) {
1955
1957
  return AbstractInputComponent;
1956
1958
  }(DisposableComponent));
1957
1959
 
1960
+ var AbstractListInputComponent = /** @class */ (function (_super) {
1961
+ __extends(AbstractListInputComponent, _super);
1962
+ function AbstractListInputComponent() {
1963
+ var _this = _super !== null && _super.apply(this, arguments) || this;
1964
+ /**
1965
+ * A backing model for all our @Input() valueModel properties which should be defined as follows.
1966
+ *
1967
+ * @Input() @TrackExternal({useExisting: "inputModel"})
1968
+ * valueModel: FormListModel<string> | IMutableListModel<string>;
1969
+ *
1970
+ * This approach allows the input to accept plain or form models but all backed by a form
1971
+ * friendly delegate. We have to use an existing delegate for union types as pectin just
1972
+ * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
1973
+ */
1974
+ // We have to register it as a disposable so it ditches any listeners when we're disposed.
1975
+ _this.inputModel = _this.registerDisposable(new DelegatingFormListModel());
1976
+ return _this;
1977
+ }
1978
+ AbstractListInputComponent = __decorate([
1979
+ Component({ template: '' })
1980
+ ], AbstractListInputComponent);
1981
+ return AbstractListInputComponent;
1982
+ }(AbstractInputComponent));
1983
+
1984
+ var AbstractValueInputComponent = /** @class */ (function (_super) {
1985
+ __extends(AbstractValueInputComponent, _super);
1986
+ function AbstractValueInputComponent() {
1987
+ var _this = _super !== null && _super.apply(this, arguments) || this;
1988
+ /**
1989
+ * A backing model for all our @Input() valueModel properties which should be defined as follows.
1990
+ *
1991
+ * @Input() @TrackExternal({useExisting: "inputModel"})
1992
+ * valueModel: FormValueModel<string> | IMutableValueModel<string>;
1993
+ *
1994
+ * This approach allows the input to accept plain or form models but all backed by a form
1995
+ * friendly delegate. We have to use an existing delegate for union types as pectin just
1996
+ * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
1997
+ */
1998
+ // We have to register it as a disposable so it ditches any listeners when we're disposed.
1999
+ _this.inputModel = _this.registerDisposable(new DelegatingFormValueModel());
2000
+ return _this;
2001
+ }
2002
+ AbstractValueInputComponent = __decorate([
2003
+ Component({ template: '' })
2004
+ ], AbstractValueInputComponent);
2005
+ return AbstractValueInputComponent;
2006
+ }(AbstractInputComponent));
2007
+
1958
2008
  var CheckboxInputComponent = /** @class */ (function (_super) {
1959
2009
  __extends(CheckboxInputComponent, _super);
1960
2010
  function CheckboxInputComponent() {
@@ -1966,7 +2016,7 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
1966
2016
  CheckboxInputComponent.prototype.ngOnInit = function () {
1967
2017
  };
1968
2018
  __decorate([
1969
- Input(), TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
2019
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
1970
2020
  __metadata("design:type", Object)
1971
2021
  ], CheckboxInputComponent.prototype, "valueModel", void 0);
1972
2022
  __decorate([
@@ -1986,7 +2036,7 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
1986
2036
  __metadata("design:paramtypes", [])
1987
2037
  ], CheckboxInputComponent);
1988
2038
  return CheckboxInputComponent;
1989
- }(AbstractInputComponent));
2039
+ }(AbstractValueInputComponent));
1990
2040
 
1991
2041
  var NumberInputComponent = /** @class */ (function (_super) {
1992
2042
  __extends(NumberInputComponent, _super);
@@ -1999,7 +2049,7 @@ var NumberInputComponent = /** @class */ (function (_super) {
1999
2049
  NumberInputComponent.prototype.ngOnInit = function () {
2000
2050
  };
2001
2051
  __decorate([
2002
- Input(), TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
2052
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
2003
2053
  __metadata("design:type", Object)
2004
2054
  ], NumberInputComponent.prototype, "valueModel", void 0);
2005
2055
  __decorate([
@@ -2013,13 +2063,13 @@ var NumberInputComponent = /** @class */ (function (_super) {
2013
2063
  NumberInputComponent = __decorate([
2014
2064
  Component({
2015
2065
  selector: 'aup-number-input',
2016
- 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",
2066
+ 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",
2017
2067
  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}"]
2018
2068
  }),
2019
2069
  __metadata("design:paramtypes", [])
2020
2070
  ], NumberInputComponent);
2021
2071
  return NumberInputComponent;
2022
- }(AbstractInputComponent));
2072
+ }(AbstractValueInputComponent));
2023
2073
 
2024
2074
  var PasswordInputComponent = /** @class */ (function (_super) {
2025
2075
  __extends(PasswordInputComponent, _super);
@@ -2029,19 +2079,19 @@ var PasswordInputComponent = /** @class */ (function (_super) {
2029
2079
  PasswordInputComponent.prototype.ngOnInit = function () {
2030
2080
  };
2031
2081
  __decorate([
2032
- Input(), TrackExternal({ delegateTo: "delegatingFormValueModel" }),
2082
+ Input(), TrackExternal({ delegateTo: "inputModel" }),
2033
2083
  __metadata("design:type", Object)
2034
2084
  ], PasswordInputComponent.prototype, "valueModel", void 0);
2035
2085
  PasswordInputComponent = __decorate([
2036
2086
  Component({
2037
2087
  selector: 'aup-password-input',
2038
- 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",
2088
+ 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",
2039
2089
  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}"]
2040
2090
  }),
2041
2091
  __metadata("design:paramtypes", [])
2042
2092
  ], PasswordInputComponent);
2043
2093
  return PasswordInputComponent;
2044
- }(AbstractInputComponent));
2094
+ }(AbstractValueInputComponent));
2045
2095
 
2046
2096
  var SelectInputComponent = /** @class */ (function (_super) {
2047
2097
  __extends(SelectInputComponent, _super);
@@ -2053,7 +2103,7 @@ var SelectInputComponent = /** @class */ (function (_super) {
2053
2103
  SelectInputComponent.prototype.ngOnInit = function () {
2054
2104
  };
2055
2105
  __decorate([
2056
- Input(), TrackExternal({ delegateTo: "delegatingFormValueModel" }),
2106
+ Input(), TrackExternal({ delegateTo: "inputModel" }),
2057
2107
  __metadata("design:type", Object)
2058
2108
  ], SelectInputComponent.prototype, "valueModel", void 0);
2059
2109
  __decorate([
@@ -2087,13 +2137,13 @@ var SelectInputComponent = /** @class */ (function (_super) {
2087
2137
  SelectInputComponent = __decorate([
2088
2138
  Component({
2089
2139
  selector: 'aup-select-input',
2090
- 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",
2140
+ 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",
2091
2141
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
2092
2142
  }),
2093
2143
  __metadata("design:paramtypes", [])
2094
2144
  ], SelectInputComponent);
2095
2145
  return SelectInputComponent;
2096
- }(AbstractInputComponent));
2146
+ }(AbstractValueInputComponent));
2097
2147
 
2098
2148
  var StringInputActivity = /** @class */ (function (_super) {
2099
2149
  __extends(StringInputActivity, _super);
@@ -2123,7 +2173,7 @@ var StringInputComponent = /** @class */ (function (_super) {
2123
2173
  StringInputComponent.prototype.ngOnInit = function () {
2124
2174
  };
2125
2175
  __decorate([
2126
- Input(), TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
2176
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
2127
2177
  __metadata("design:type", Object)
2128
2178
  ], StringInputComponent.prototype, "valueModel", void 0);
2129
2179
  __decorate([
@@ -2137,13 +2187,13 @@ var StringInputComponent = /** @class */ (function (_super) {
2137
2187
  StringInputComponent = __decorate([
2138
2188
  Component({
2139
2189
  selector: 'aup-string-input',
2140
- 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",
2190
+ 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",
2141
2191
  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}"]
2142
2192
  }),
2143
2193
  __metadata("design:paramtypes", [])
2144
2194
  ], StringInputComponent);
2145
2195
  return StringInputComponent;
2146
- }(AbstractInputComponent));
2196
+ }(AbstractValueInputComponent));
2147
2197
 
2148
2198
  var TextInputComponent = /** @class */ (function (_super) {
2149
2199
  __extends(TextInputComponent, _super);
@@ -2156,7 +2206,7 @@ var TextInputComponent = /** @class */ (function (_super) {
2156
2206
  TextInputComponent.prototype.ngOnInit = function () {
2157
2207
  };
2158
2208
  __decorate([
2159
- Input(), TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
2209
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
2160
2210
  __metadata("design:type", Object)
2161
2211
  ], TextInputComponent.prototype, "valueModel", void 0);
2162
2212
  __decorate([
@@ -2170,13 +2220,13 @@ var TextInputComponent = /** @class */ (function (_super) {
2170
2220
  TextInputComponent = __decorate([
2171
2221
  Component({
2172
2222
  selector: 'aup-text-input',
2173
- 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",
2223
+ 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",
2174
2224
  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}"]
2175
2225
  }),
2176
2226
  __metadata("design:paramtypes", [])
2177
2227
  ], TextInputComponent);
2178
2228
  return TextInputComponent;
2179
- }(AbstractInputComponent));
2229
+ }(AbstractValueInputComponent));
2180
2230
 
2181
2231
  var NoopComponent = /** @class */ (function () {
2182
2232
  function NoopComponent() {
@@ -2393,17 +2443,20 @@ var DefaultHeaderCellRendererComponent = /** @class */ (function () {
2393
2443
 
2394
2444
  var EditSession = /** @class */ (function (_super) {
2395
2445
  __extends(EditSession, _super);
2396
- function EditSession(rowId, row, saveCommand) {
2446
+ function EditSession(rowId, row, form, saveCommand) {
2397
2447
  var _this = _super.call(this) || this;
2398
2448
  _this.rowId = rowId;
2449
+ _this.form = form;
2399
2450
  _this.saveCommand = saveCommand;
2400
- _this._editorValue = new MutableValueModel();
2401
- _this.rowValueModel = _this._editorValue.readonly;
2402
- _this.form = new Form();
2451
+ _this._liveRowValue = new MutableValueModel();
2452
+ _this.liveRowValue = _this._liveRowValue.readonly;
2403
2453
  _this.form.load(row);
2404
- _this._editorValue.value = row;
2454
+ _this._liveRowValue.value = row;
2405
2455
  _this.form.onEdit(function () {
2406
- _this._editorValue.value = produce(_this._editorValue.value, function (draft) {
2456
+ // if (!this._liveRowValue.value[immerable]) {
2457
+ // console.warn()
2458
+ // }
2459
+ _this._liveRowValue.value = produce(_this._liveRowValue.value, function (draft) {
2407
2460
  _this.form.writeDirtyStateTo(draft);
2408
2461
  });
2409
2462
  });
@@ -2472,28 +2525,13 @@ var SelectCellRendererComponent = /** @class */ (function (_super) {
2472
2525
  });
2473
2526
  return _this;
2474
2527
  }
2475
- Object.defineProperty(SelectCellRendererComponent.prototype, "row", {
2476
- get: function () {
2477
- return this._row;
2478
- },
2479
- set: function (value) {
2480
- this._row = value;
2481
- },
2482
- enumerable: true,
2483
- configurable: true
2484
- });
2485
2528
  SelectCellRendererComponent.prototype.isSelected = function () {
2486
2529
  return this.selectionModel.isSelected(this.row);
2487
2530
  };
2488
- __decorate([
2489
- Input(),
2490
- __metadata("design:type", Object),
2491
- __metadata("design:paramtypes", [Object])
2492
- ], SelectCellRendererComponent.prototype, "row", null);
2493
2531
  __decorate([
2494
2532
  Input(),
2495
2533
  __metadata("design:type", Object)
2496
- ], SelectCellRendererComponent.prototype, "selectionModel", void 0);
2534
+ ], SelectCellRendererComponent.prototype, "row", void 0);
2497
2535
  SelectCellRendererComponent = __decorate([
2498
2536
  Component({
2499
2537
  selector: 'aup-select-cell-renderer',
@@ -2515,15 +2553,13 @@ var SelectHeaderCellRendererComponent = /** @class */ (function (_super) {
2515
2553
  return _this;
2516
2554
  }
2517
2555
  SelectHeaderCellRendererComponent.prototype.isSelected = function () {
2518
- return this.selectionModel.allSelected.value;
2556
+ var _a;
2557
+ return ((_a = this.selectionModel) === null || _a === void 0 ? void 0 : _a.allSelected.value) || false;
2519
2558
  };
2520
2559
  SelectHeaderCellRendererComponent.prototype.isIntermediate = function () {
2521
- return this.selectionModel.someSelected.value;
2560
+ var _a;
2561
+ return ((_a = this.selectionModel) === null || _a === void 0 ? void 0 : _a.someSelected.value) || false;
2522
2562
  };
2523
- __decorate([
2524
- Input(),
2525
- __metadata("design:type", MultipleSelectionModel)
2526
- ], SelectHeaderCellRendererComponent.prototype, "selectionModel", void 0);
2527
2563
  SelectHeaderCellRendererComponent = __decorate([
2528
2564
  Component({
2529
2565
  selector: 'aup-select-header-cell-renderer',
@@ -2535,197 +2571,6 @@ var SelectHeaderCellRendererComponent = /** @class */ (function (_super) {
2535
2571
  return SelectHeaderCellRendererComponent;
2536
2572
  }(DisposableComponent));
2537
2573
 
2538
- var ColumnModel = /** @class */ (function () {
2539
- function ColumnModel(columnId, defaults) {
2540
- this.columnId = columnId;
2541
- this.defaults = defaults;
2542
- this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
2543
- component.headerText = column.getHeaderText();
2544
- });
2545
- }
2546
- ColumnModel.prototype.getHeaderText = function () {
2547
- var _a;
2548
- return ((_a = this.getColumnTextProperties()) === null || _a === void 0 ? void 0 : _a.headerText()) || this.getDefaultHeaderText();
2549
- };
2550
- ColumnModel.prototype.getDefaultHeaderText = function () {
2551
- return this.columnId;
2552
- };
2553
- ColumnModel.prototype.getColumnTextProperties = function () {
2554
- return this._columnTextProperties || this.defaults.getColumnTextProperties(this);
2555
- };
2556
- ColumnModel.prototype.textProperties = function (columnTextProperties) {
2557
- this._columnTextProperties = columnTextProperties;
2558
- return this;
2559
- };
2560
- ColumnModel.prototype.setCellRenderer = function (cellRenderer, initialiser) {
2561
- this._cellRendererConfig = {
2562
- portal: new ComponentPortal(cellRenderer),
2563
- pushState: initialiser
2564
- };
2565
- };
2566
- ColumnModel.prototype.cellHeaderRenderer = function (cellRenderer, initialiser) {
2567
- this._columnHeaderConfig = {
2568
- portal: new ComponentPortal(cellRenderer),
2569
- initialiseComponent: initialiser
2570
- };
2571
- return this;
2572
- };
2573
- ColumnModel.prototype.setCellEditor = function (cellEditor) {
2574
- this._cellEditorConfig = cellEditor;
2575
- };
2576
- Object.defineProperty(ColumnModel.prototype, "cellRendererPortal", {
2577
- get: function () {
2578
- return this._cellRendererConfig.portal;
2579
- },
2580
- enumerable: true,
2581
- configurable: true
2582
- });
2583
- Object.defineProperty(ColumnModel.prototype, "columnHeaderCellRendererPortal", {
2584
- get: function () {
2585
- return this._columnHeaderConfig.portal;
2586
- },
2587
- enumerable: true,
2588
- configurable: true
2589
- });
2590
- Object.defineProperty(ColumnModel.prototype, "cellEditorPortal", {
2591
- get: function () {
2592
- var _a;
2593
- return (_a = this._cellEditorConfig) === null || _a === void 0 ? void 0 : _a.portal;
2594
- },
2595
- enumerable: true,
2596
- configurable: true
2597
- });
2598
- ColumnModel.prototype.hasEditor = function () {
2599
- return !!this._cellEditorConfig;
2600
- };
2601
- ColumnModel.prototype.updateCellRenderer = function (component, row, editRowCommand, editSession) {
2602
- this._cellRendererConfig.pushState(component, row, editRowCommand, editSession);
2603
- };
2604
- ColumnModel.prototype.initialiseHeader = function (component) {
2605
- this._columnHeaderConfig.initialiseComponent(component, this);
2606
- };
2607
- ColumnModel.prototype.initialiseEditor = function (component, editSession) {
2608
- this._cellEditorConfig.initialiseComponent(component, editSession);
2609
- };
2610
- __decorate([
2611
- Memoize(),
2612
- __metadata("design:type", Function),
2613
- __metadata("design:paramtypes", []),
2614
- __metadata("design:returntype", String)
2615
- ], ColumnModel.prototype, "getHeaderText", null);
2616
- __decorate([
2617
- Memoize(),
2618
- __metadata("design:type", Function),
2619
- __metadata("design:paramtypes", []),
2620
- __metadata("design:returntype", Object)
2621
- ], ColumnModel.prototype, "getColumnTextProperties", null);
2622
- return ColumnModel;
2623
- }());
2624
- var PropertyColumnModel = /** @class */ (function (_super) {
2625
- __extends(PropertyColumnModel, _super);
2626
- function PropertyColumnModel(property, defaults) {
2627
- var _this = _super.call(this, property.toString(), defaults) || this;
2628
- _this.property = property;
2629
- _this._format = function (value) { return value; };
2630
- _this.cellRenderer(DefaultCellRendererComponent);
2631
- return _this;
2632
- }
2633
- PropertyColumnModel.prototype.cellRenderer = function (componentType) {
2634
- var _this = this;
2635
- this.setCellRenderer(componentType, function (component, row) {
2636
- component.value = _this._format(row[_this.property]);
2637
- });
2638
- return this;
2639
- };
2640
- PropertyColumnModel.prototype.cellEditor = function (editor, options) {
2641
- var _this = this;
2642
- this.setCellEditor({
2643
- portal: new ComponentPortal(editor),
2644
- initialiseComponent: function (component, editSession) {
2645
- var formValueModel = editSession.form.pluck(_this.property);
2646
- if (options === null || options === void 0 ? void 0 : options.validators) {
2647
- formValueModel.validateUsing(options.validators);
2648
- }
2649
- component.valueModel = formValueModel;
2650
- if (options === null || options === void 0 ? void 0 : options.initialiseComponent) {
2651
- options.initialiseComponent(component);
2652
- }
2653
- }
2654
- });
2655
- return this;
2656
- };
2657
- PropertyColumnModel.prototype.format = function (formatter) {
2658
- assert$1.isFunction(formatter);
2659
- this._format = formatter;
2660
- return this;
2661
- };
2662
- return PropertyColumnModel;
2663
- }(ColumnModel));
2664
- var CustomValueColumnModel = /** @class */ (function (_super) {
2665
- __extends(CustomValueColumnModel, _super);
2666
- function CustomValueColumnModel(columnId, defaults, getValue) {
2667
- var _this = _super.call(this, columnId, defaults) || this;
2668
- _this.getValue = getValue;
2669
- _this.cellRenderer(DefaultCellRendererComponent);
2670
- return _this;
2671
- }
2672
- CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
2673
- var _this = this;
2674
- this.setCellRenderer(componentType, function (component, row) {
2675
- component.value = _this.getValue(row);
2676
- });
2677
- return this;
2678
- };
2679
- return CustomValueColumnModel;
2680
- }(ColumnModel));
2681
- var EditorControlColumnModel = /** @class */ (function (_super) {
2682
- __extends(EditorControlColumnModel, _super);
2683
- function EditorControlColumnModel(columnId, saveCommand, defaults) {
2684
- var _this = _super.call(this, columnId, defaults) || this;
2685
- _this.cellRenderer(EditRowControls);
2686
- return _this;
2687
- }
2688
- EditorControlColumnModel.prototype.cellRenderer = function (componentType) {
2689
- this.setCellRenderer(componentType, function (component, row, editRowCommand, editSession) {
2690
- component.row = row;
2691
- component.editSession = editSession;
2692
- component.editRowCommand = editRowCommand;
2693
- });
2694
- return this;
2695
- };
2696
- EditorControlColumnModel.prototype.getDefaultHeaderText = function () {
2697
- return '';
2698
- };
2699
- return EditorControlColumnModel;
2700
- }(ColumnModel));
2701
- var CustomTemplateColumnModel = /** @class */ (function (_super) {
2702
- __extends(CustomTemplateColumnModel, _super);
2703
- function CustomTemplateColumnModel(columnId, defaults, component) {
2704
- return _super.call(this, columnId, defaults) || this;
2705
- }
2706
- return CustomTemplateColumnModel;
2707
- }(ColumnModel));
2708
- var SelectionColumnModel = /** @class */ (function (_super) {
2709
- __extends(SelectionColumnModel, _super);
2710
- function SelectionColumnModel(columnId, defaults, selectionModel) {
2711
- var _this = _super.call(this, columnId, defaults) || this;
2712
- if (selectionModel instanceof MultipleSelectionModel) {
2713
- _this.cellHeaderRenderer(SelectHeaderCellRendererComponent, function (component) {
2714
- component.selectionModel = selectionModel;
2715
- });
2716
- }
2717
- _this.setCellRenderer(SelectCellRendererComponent, function (component, row, editRowCommand, editSession) {
2718
- component.row = row;
2719
- component.selectionModel = selectionModel;
2720
- });
2721
- return _this;
2722
- }
2723
- SelectionColumnModel.prototype.getDefaultHeaderText = function () {
2724
- return '';
2725
- };
2726
- return SelectionColumnModel;
2727
- }(ColumnModel));
2728
-
2729
2574
  // export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
2730
2575
  // export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
2731
2576
  /**
@@ -2804,6 +2649,7 @@ var TableModel = /** @class */ (function () {
2804
2649
  this._garbage = new GarbageCollector();
2805
2650
  this._columns = new MutableListModel();
2806
2651
  this._editorSessions = new MutableListModel();
2652
+ this._createForm = function (row) { return new Form(); };
2807
2653
  this.identityOf = sourceOfTruth.identityOf;
2808
2654
  var _a = 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;
2809
2655
  this._columnsById = chain(this._columns).indexBy('columnId');
@@ -2843,6 +2689,9 @@ var TableModel = /** @class */ (function () {
2843
2689
  TableModel.prototype.pluck = function (property) {
2844
2690
  return this.addColumn(new PropertyColumnModel(property, this));
2845
2691
  };
2692
+ TableModel.prototype.pluckList = function (property) {
2693
+ return this.addColumn(new ListPropertyColumnModel(property, this));
2694
+ };
2846
2695
  TableModel.prototype.addSelectionColumn = function (selectionModel) {
2847
2696
  return this.addColumn(new SelectionColumnModel('selection', this, selectionModel));
2848
2697
  };
@@ -2853,6 +2702,13 @@ var TableModel = /** @class */ (function () {
2853
2702
  TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
2854
2703
  return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
2855
2704
  };
2705
+ TableModel.prototype.addTemplateColumn = function (columnId) {
2706
+ return this.addColumn(new CustomTemplateColumnModel(columnId, this));
2707
+ };
2708
+ TableModel.prototype.useFormFactory = function (factory) {
2709
+ this._createForm = factory;
2710
+ return this;
2711
+ };
2856
2712
  TableModel.prototype.addColumn = function (column) {
2857
2713
  if (this._columnsById.get(column.columnId)) {
2858
2714
  lang.illegalState("Column with id=" + column.columnId + " already exists");
@@ -2876,14 +2732,14 @@ var TableModel = /** @class */ (function () {
2876
2732
  return lang.illegalState("Row with id=" + rowId + " already being edited");
2877
2733
  }
2878
2734
  else {
2879
- var editSession_1 = new EditSession(rowId, row, this.saveCommand);
2735
+ var editSession_1 = new EditSession(rowId, row, this._createForm(row), this.saveCommand);
2880
2736
  var when = Dsl.disposeWith(editSession_1).when;
2881
- when.valueOf(editSession_1.rowValueModel).changes(function (editedValue) {
2737
+ when.valueOf(editSession_1.liveRowValue).changes(function (editedValue) {
2882
2738
  _this._rowsBeingEdited.replaceOrPush(editedValue);
2883
2739
  }, { initialValue: 'triggerChangeUnlessNil' });
2884
2740
  this._editorSessions.push(editSession_1);
2885
2741
  editSession_1.onDispose(function () {
2886
- _this._rowsBeingEdited.remove(editSession_1.rowValueModel.value);
2742
+ _this._rowsBeingEdited.remove(editSession_1.liveRowValue.value);
2887
2743
  _this._editorSessions.remove(editSession_1);
2888
2744
  });
2889
2745
  return editSession_1;
@@ -2911,46 +2767,481 @@ var TableModel = /** @class */ (function () {
2911
2767
  return TableModel;
2912
2768
  }());
2913
2769
 
2914
- /**
2915
- * Create your model:
2916
- * @example
2917
- * this.heroTableModel = TableModel.fromList(heroList, table => {
2918
- * table.pluck("firstName");
2919
- * table.pluck("lastName");
2920
- * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
2921
- * });
2922
- *
2923
- * Create your table
2924
- * @example
2925
- * <aup-table [tableModel]="heroTableModel"></aup-table>
2926
- *
2927
- * Styling
2928
- * @example
2929
- * aup-table {
2930
- * --column-gap: 10px; // defaults to 24px
2931
- * aup-table-cell-renderer {
2932
- * &:first-column {
2933
- * // do stuff
2934
- * }
2935
- * &:last-column {
2936
- * // do stuff
2937
- * }
2938
- * }
2939
- * }
2940
- */
2941
- var TableComponent = /** @class */ (function (_super) {
2942
- __extends(TableComponent, _super);
2943
- function TableComponent() {
2944
- return _super.call(this) || this;
2770
+ var TableCellRendererComponent = /** @class */ (function () {
2771
+ function TableCellRendererComponent() {
2772
+ var _this = this;
2773
+ this.defaultClassNames = 'aup-cell-renderer';
2774
+ this.fillCell = false;
2775
+ this.padChild = false;
2776
+ this.editRowCommand = Command.create(function () {
2777
+ _this.tableModel.startEditSession(_this.row);
2778
+ });
2945
2779
  }
2946
- TableComponent.prototype.ngOnInit = function () {
2947
- var _a = Dsl.disposeWith(this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
2780
+ TableCellRendererComponent.prototype.ngOnInit = function () {
2781
+ this.column.attachCell(this);
2782
+ };
2783
+ TableCellRendererComponent.prototype.hasActiveEditor = function () {
2784
+ return !!this.editSession && !!this.column.hasEditorPortal();
2785
+ };
2786
+ TableCellRendererComponent.prototype.initialiseRenderer = function (instance) {
2787
+ this.column.onRendererAttached(this, instance);
2788
+ };
2789
+ TableCellRendererComponent.prototype.initialiseEditor = function (instance) {
2790
+ this.column.onEditorAttached(this, instance);
2791
+ };
2792
+ // @Trace()
2793
+ TableCellRendererComponent.prototype.ngOnChanges = function (changes) {
2794
+ this.column.updatePortalContent(this);
2795
+ };
2796
+ TableCellRendererComponent.prototype.getRendererPortal = function () {
2797
+ return this[CELL_RENDERER_PORTAL];
2798
+ };
2799
+ TableCellRendererComponent.prototype.getEditorPortal = function () {
2800
+ return this[CELL_EDITOR_PORTAL];
2801
+ };
2802
+ TableCellRendererComponent.prototype.getRowData = function () {
2803
+ return {
2804
+ row: this.row,
2805
+ editSession: this.editSession,
2806
+ editRowCommand: this.editRowCommand
2807
+ };
2808
+ };
2809
+ __decorate([
2810
+ Input(),
2811
+ __metadata("design:type", Object)
2812
+ ], TableCellRendererComponent.prototype, "row", void 0);
2813
+ __decorate([
2814
+ Input(),
2815
+ __metadata("design:type", ColumnModel)
2816
+ ], TableCellRendererComponent.prototype, "column", void 0);
2817
+ __decorate([
2818
+ Input(),
2819
+ __metadata("design:type", EditSession)
2820
+ ], TableCellRendererComponent.prototype, "editSession", void 0);
2821
+ __decorate([
2822
+ Input(),
2823
+ __metadata("design:type", TableModel)
2824
+ ], TableCellRendererComponent.prototype, "tableModel", void 0);
2825
+ __decorate([
2826
+ HostBinding('class'),
2827
+ __metadata("design:type", Object)
2828
+ ], TableCellRendererComponent.prototype, "defaultClassNames", void 0);
2829
+ __decorate([
2830
+ HostBinding('class.fillCell'),
2831
+ __metadata("design:type", Object)
2832
+ ], TableCellRendererComponent.prototype, "fillCell", void 0);
2833
+ __decorate([
2834
+ HostBinding('class.padChild'),
2835
+ __metadata("design:type", Object)
2836
+ ], TableCellRendererComponent.prototype, "padChild", void 0);
2837
+ __decorate([
2838
+ Trace(),
2839
+ __metadata("design:type", Function),
2840
+ __metadata("design:paramtypes", [Object]),
2841
+ __metadata("design:returntype", void 0)
2842
+ ], TableCellRendererComponent.prototype, "initialiseEditor", null);
2843
+ TableCellRendererComponent = __decorate([
2844
+ Component({
2845
+ selector: 'aup-table-cell-renderer',
2846
+ 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",
2847
+ styles: [""]
2848
+ }),
2849
+ __metadata("design:paramtypes", [])
2850
+ ], TableCellRendererComponent);
2851
+ return TableCellRendererComponent;
2852
+ }());
2853
+
2854
+ var HEADER_CELL_RENDERER_PORTAL = Symbol('aup-cell-header-renderer-component-ref');
2855
+ var CELL_RENDERER_PORTAL = Symbol('aup-cell-renderer-component-ref');
2856
+ var CELL_EDITOR_PORTAL = Symbol('aup-cell-editor-component-ref');
2857
+ var PORTAL_RENDERER_COMPONENT = Symbol('aup-cell-renderer-portal-component');
2858
+ var PORTAL_EDITOR_COMPONENT = Symbol('aup-cell-editor-portal-component');
2859
+ var noop = function () {
2860
+ };
2861
+ var ɵ0 = noop;
2862
+ var CellPortalRef = /** @class */ (function () {
2863
+ function CellPortalRef() {
2864
+ }
2865
+ return CellPortalRef;
2866
+ }());
2867
+ var CellHeaderPortalRef = /** @class */ (function (_super) {
2868
+ __extends(CellHeaderPortalRef, _super);
2869
+ function CellHeaderPortalRef(componentType, initialiseHeader) {
2870
+ var _this = _super.call(this) || this;
2871
+ _this.componentType = componentType;
2872
+ _this.initialiseHeader = initialiseHeader;
2873
+ return _this;
2874
+ }
2875
+ CellHeaderPortalRef.prototype.initialiseHost = function (host, columnModel) {
2876
+ assert$1.isTruthy(host);
2877
+ host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
2878
+ };
2879
+ CellHeaderPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
2880
+ this.initialiseHeader(portalComponent, host.column);
2881
+ };
2882
+ return CellHeaderPortalRef;
2883
+ }(CellPortalRef));
2884
+ var CellRendererPortalRef = /** @class */ (function (_super) {
2885
+ __extends(CellRendererPortalRef, _super);
2886
+ function CellRendererPortalRef() {
2887
+ return _super !== null && _super.apply(this, arguments) || this;
2888
+ }
2889
+ return CellRendererPortalRef;
2890
+ }(CellPortalRef));
2891
+ var ComponentCellRendererPortalRef = /** @class */ (function (_super) {
2892
+ __extends(ComponentCellRendererPortalRef, _super);
2893
+ function ComponentCellRendererPortalRef(componentType, updateComponent) {
2894
+ var _this = _super.call(this) || this;
2895
+ _this.componentType = componentType;
2896
+ _this.updateComponent = updateComponent;
2897
+ return _this;
2898
+ }
2899
+ ComponentCellRendererPortalRef.prototype.initialiseHost = function (host, columnModel) {
2900
+ host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
2901
+ };
2902
+ ComponentCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
2903
+ host[PORTAL_RENDERER_COMPONENT] = portalComponent;
2904
+ this.updateComponent(portalComponent, host.getRowData());
2905
+ };
2906
+ ComponentCellRendererPortalRef.prototype.pushState = function (host) {
2907
+ if (host[PORTAL_RENDERER_COMPONENT]) {
2908
+ this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());
2909
+ }
2910
+ };
2911
+ return ComponentCellRendererPortalRef;
2912
+ }(CellRendererPortalRef));
2913
+ var CellEditorPortalRef = /** @class */ (function (_super) {
2914
+ __extends(CellEditorPortalRef, _super);
2915
+ function CellEditorPortalRef(componentType, initialiseEditorSession) {
2916
+ var _this = _super.call(this) || this;
2917
+ _this.componentType = componentType;
2918
+ _this.initialiseEditorSession = initialiseEditorSession;
2919
+ return _this;
2920
+ }
2921
+ CellEditorPortalRef.prototype.initialiseHost = function (host, columnModel) {
2922
+ assert$1.isTruthy(host);
2923
+ host[CELL_EDITOR_PORTAL] = new ComponentPortal(this.componentType);
2924
+ };
2925
+ CellEditorPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
2926
+ host[PORTAL_EDITOR_COMPONENT] = portalComponent;
2927
+ this.initialiseEditorSession(portalComponent, host.editSession);
2928
+ };
2929
+ __decorate([
2930
+ Trace(),
2931
+ __metadata("design:type", Function),
2932
+ __metadata("design:paramtypes", [TableCellRendererComponent, Object]),
2933
+ __metadata("design:returntype", void 0)
2934
+ ], CellEditorPortalRef.prototype, "onPortalAttached", null);
2935
+ return CellEditorPortalRef;
2936
+ }(CellPortalRef));
2937
+ var TemplateCellRendererPortalRef = /** @class */ (function (_super) {
2938
+ __extends(TemplateCellRendererPortalRef, _super);
2939
+ function TemplateCellRendererPortalRef() {
2940
+ return _super.call(this) || this;
2941
+ }
2942
+ TemplateCellRendererPortalRef.prototype.registerPortal = function (templateRef, viewContainer, fillCell, padChild) {
2943
+ this.templateRef = templateRef;
2944
+ this.viewContainer = viewContainer;
2945
+ this.fillCell = fillCell;
2946
+ this.padChild = padChild;
2947
+ };
2948
+ TemplateCellRendererPortalRef.prototype.initialiseHost = function (host, columnModel) {
2949
+ assert$1.isTruthy(host);
2950
+ };
2951
+ TemplateCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
2952
+ // don't care
2953
+ };
2954
+ TemplateCellRendererPortalRef.prototype.pushState = function (host) {
2955
+ host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());
2956
+ host.fillCell = this.fillCell;
2957
+ host.padChild = this.padChild;
2958
+ };
2959
+ TemplateCellRendererPortalRef.prototype.createPortal = function (data) {
2960
+ return new TemplatePortal(this.templateRef, this.viewContainer, __assign(__assign({}, (data)), { $implicit: data.row }));
2961
+ };
2962
+ __decorate([
2963
+ Trace(),
2964
+ __metadata("design:type", Function),
2965
+ __metadata("design:paramtypes", [TableCellRendererComponent, void 0]),
2966
+ __metadata("design:returntype", void 0)
2967
+ ], TemplateCellRendererPortalRef.prototype, "onPortalAttached", null);
2968
+ return TemplateCellRendererPortalRef;
2969
+ }(CellRendererPortalRef));
2970
+ var ColumnModel = /** @class */ (function () {
2971
+ function ColumnModel(columnId, defaults) {
2972
+ this.columnId = columnId;
2973
+ this.defaults = defaults;
2974
+ this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
2975
+ component.headerText = column.getHeaderText();
2976
+ });
2977
+ }
2978
+ ColumnModel.prototype.getHeaderText = function () {
2979
+ var _a;
2980
+ return ((_a = this.getColumnTextProperties()) === null || _a === void 0 ? void 0 : _a.headerText()) || this.getDefaultHeaderText();
2981
+ };
2982
+ ColumnModel.prototype.getDefaultHeaderText = function () {
2983
+ return this.columnId;
2984
+ };
2985
+ ColumnModel.prototype.getColumnTextProperties = function () {
2986
+ return this._columnTextProperties || this.defaults.getColumnTextProperties(this);
2987
+ };
2988
+ ColumnModel.prototype.textProperties = function (columnTextProperties) {
2989
+ this._columnTextProperties = columnTextProperties;
2990
+ return this;
2991
+ };
2992
+ ColumnModel.prototype.configureHeaderRenderer = function (config) {
2993
+ this._columnHeaderPortalRef = config;
2994
+ };
2995
+ ColumnModel.prototype.configureCellRenderer = function (config) {
2996
+ this._cellRendererPortalRef = config;
2997
+ };
2998
+ ColumnModel.prototype.configureCellEditor = function (cellEditor) {
2999
+ this._cellEditorPortalRef = cellEditor;
3000
+ };
3001
+ ColumnModel.prototype.cellHeaderRenderer = function (componentType, initialiser) {
3002
+ this.configureHeaderRenderer(new CellHeaderPortalRef(componentType, initialiser));
3003
+ return this;
3004
+ };
3005
+ ColumnModel.prototype.hasEditorPortal = function () {
3006
+ return !!this._cellEditorPortalRef;
3007
+ };
3008
+ ColumnModel.prototype.attachHeaderCell = function (host) {
3009
+ this._columnHeaderPortalRef.initialiseHost(host, this);
3010
+ };
3011
+ ColumnModel.prototype.attachCell = function (host) {
3012
+ this._cellRendererPortalRef.initialiseHost(host, this);
3013
+ if (this.hasEditorPortal()) {
3014
+ this._cellEditorPortalRef.initialiseHost(host, this);
3015
+ }
3016
+ };
3017
+ ColumnModel.prototype.onHeaderAttached = function (host, component) {
3018
+ this._columnHeaderPortalRef.onPortalAttached(host, component);
3019
+ };
3020
+ ColumnModel.prototype.onRendererAttached = function (host, component) {
3021
+ this._cellRendererPortalRef.onPortalAttached(host, component);
3022
+ };
3023
+ ColumnModel.prototype.onEditorAttached = function (host, component) {
3024
+ this._cellEditorPortalRef.onPortalAttached(host, component);
3025
+ };
3026
+ ColumnModel.prototype.updatePortalContent = function (host) {
3027
+ this._cellRendererPortalRef.pushState(host);
3028
+ };
3029
+ __decorate([
3030
+ Memoize(),
3031
+ __metadata("design:type", Function),
3032
+ __metadata("design:paramtypes", []),
3033
+ __metadata("design:returntype", String)
3034
+ ], ColumnModel.prototype, "getHeaderText", null);
3035
+ __decorate([
3036
+ Memoize(),
3037
+ __metadata("design:type", Function),
3038
+ __metadata("design:paramtypes", []),
3039
+ __metadata("design:returntype", Object)
3040
+ ], ColumnModel.prototype, "getColumnTextProperties", null);
3041
+ __decorate([
3042
+ Trace(),
3043
+ __metadata("design:type", Function),
3044
+ __metadata("design:paramtypes", [TableCellRendererComponent, Object]),
3045
+ __metadata("design:returntype", void 0)
3046
+ ], ColumnModel.prototype, "onEditorAttached", null);
3047
+ return ColumnModel;
3048
+ }());
3049
+ var PropertyColumnModel = /** @class */ (function (_super) {
3050
+ __extends(PropertyColumnModel, _super);
3051
+ function PropertyColumnModel(property, defaults) {
3052
+ var _this = _super.call(this, property.toString(), defaults) || this;
3053
+ _this.property = property;
3054
+ _this._format = function (value) { return value; };
3055
+ _this.cellRenderer(DefaultCellRendererComponent);
3056
+ return _this;
3057
+ }
3058
+ PropertyColumnModel.prototype.cellRenderer = function (componentType) {
3059
+ var _this = this;
3060
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
3061
+ component.value = _this._format(rowData.row[_this.property]);
3062
+ }));
3063
+ return this;
3064
+ };
3065
+ PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, initialiseComponent) {
3066
+ var _this = this;
3067
+ var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
3068
+ var initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
3069
+ this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
3070
+ var formValueModel = editSession.form.pluck(_this.property);
3071
+ if (validators) {
3072
+ formValueModel.validateUsing(validators);
3073
+ }
3074
+ component.valueModel = formValueModel;
3075
+ if (initialiser) {
3076
+ initialiser(component);
3077
+ }
3078
+ }));
3079
+ return this;
3080
+ };
3081
+ PropertyColumnModel.prototype.format = function (formatter) {
3082
+ assert$1.isFunction(formatter);
3083
+ this._format = formatter;
3084
+ return this;
3085
+ };
3086
+ return PropertyColumnModel;
3087
+ }(ColumnModel));
3088
+ var ListPropertyColumnModel = /** @class */ (function (_super) {
3089
+ __extends(ListPropertyColumnModel, _super);
3090
+ function ListPropertyColumnModel(property, defaults) {
3091
+ var _this = _super.call(this, property.toString(), defaults) || this;
3092
+ _this.property = property;
3093
+ _this._format = function (value) { return value.map(function (v) { return v === null || v === void 0 ? void 0 : v.toString(); }).join(', '); };
3094
+ _this.cellRenderer(DefaultCellRendererComponent);
3095
+ return _this;
3096
+ }
3097
+ ListPropertyColumnModel.prototype.cellRenderer = function (componentType) {
3098
+ var _this = this;
3099
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
3100
+ component.value = _this._format(rowData.row[_this.property]);
3101
+ }));
3102
+ return this;
3103
+ };
3104
+ ListPropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, initialiseComponent) {
3105
+ var _this = this;
3106
+ var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
3107
+ var initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
3108
+ this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
3109
+ var formListModel = editSession.form.pluckList(_this.property);
3110
+ if (validators) {
3111
+ formListModel.validateUsing(validators);
3112
+ }
3113
+ component.listModel = formListModel;
3114
+ if (initialiser) {
3115
+ initialiser(component);
3116
+ }
3117
+ }));
3118
+ return this;
3119
+ };
3120
+ ListPropertyColumnModel.prototype.format = function (formatter) {
3121
+ assert$1.isFunction(formatter);
3122
+ this._format = formatter;
3123
+ return this;
3124
+ };
3125
+ return ListPropertyColumnModel;
3126
+ }(ColumnModel));
3127
+ var CustomValueColumnModel = /** @class */ (function (_super) {
3128
+ __extends(CustomValueColumnModel, _super);
3129
+ function CustomValueColumnModel(columnId, defaults, getValue) {
3130
+ var _this = _super.call(this, columnId, defaults) || this;
3131
+ _this.getValue = getValue;
3132
+ _this.cellRenderer(DefaultCellRendererComponent);
3133
+ return _this;
3134
+ }
3135
+ CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
3136
+ var _this = this;
3137
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
3138
+ component.value = _this.getValue(rowData.row);
3139
+ }));
3140
+ return this;
3141
+ };
3142
+ return CustomValueColumnModel;
3143
+ }(ColumnModel));
3144
+ var EditorControlColumnModel = /** @class */ (function (_super) {
3145
+ __extends(EditorControlColumnModel, _super);
3146
+ function EditorControlColumnModel(columnId, saveCommand, defaults) {
3147
+ var _this = _super.call(this, columnId, defaults) || this;
3148
+ _this.cellRenderer(EditRowControls);
3149
+ return _this;
3150
+ }
3151
+ EditorControlColumnModel.prototype.cellRenderer = function (componentType) {
3152
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
3153
+ component.row = rowData.row;
3154
+ component.editSession = rowData.editSession;
3155
+ component.editRowCommand = rowData.editRowCommand;
3156
+ }));
3157
+ return this;
3158
+ };
3159
+ EditorControlColumnModel.prototype.getDefaultHeaderText = function () {
3160
+ return '';
3161
+ };
3162
+ return EditorControlColumnModel;
3163
+ }(ColumnModel));
3164
+ var CustomTemplateColumnModel = /** @class */ (function (_super) {
3165
+ __extends(CustomTemplateColumnModel, _super);
3166
+ function CustomTemplateColumnModel(columnId, defaults) {
3167
+ var _this = _super.call(this, columnId, defaults) || this;
3168
+ _this.config = new TemplateCellRendererPortalRef();
3169
+ _this.configureCellRenderer(_this.config);
3170
+ return _this;
3171
+ }
3172
+ CustomTemplateColumnModel.prototype.setTemplate = function (templateRef, viewContainer, fillCell, padChild) {
3173
+ this.config.registerPortal(templateRef, viewContainer, fillCell, padChild);
3174
+ };
3175
+ return CustomTemplateColumnModel;
3176
+ }(ColumnModel));
3177
+ var SelectionColumnModel = /** @class */ (function (_super) {
3178
+ __extends(SelectionColumnModel, _super);
3179
+ function SelectionColumnModel(columnId, defaults, selectionModel) {
3180
+ var _this = _super.call(this, columnId, defaults) || this;
3181
+ if (selectionModel instanceof MultipleSelectionModel) {
3182
+ _this.cellHeaderRenderer(SelectHeaderCellRendererComponent, function (component) {
3183
+ component.selectionModel = selectionModel;
3184
+ });
3185
+ }
3186
+ _this.configureCellRenderer(new ComponentCellRendererPortalRef(SelectCellRendererComponent, function (component, rowData) {
3187
+ component.row = rowData.row;
3188
+ component.selectionModel = selectionModel;
3189
+ }));
3190
+ return _this;
3191
+ }
3192
+ SelectionColumnModel.prototype.getDefaultHeaderText = function () {
3193
+ return '';
3194
+ };
3195
+ return SelectionColumnModel;
3196
+ }(ColumnModel));
3197
+
3198
+ /**
3199
+ * Create your model:
3200
+ * @example
3201
+ * this.heroTableModel = TableModel.fromList(heroList, table => {
3202
+ * table.pluck("firstName");
3203
+ * table.pluck("lastName");
3204
+ * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
3205
+ * });
3206
+ *
3207
+ * Create your table
3208
+ * @example
3209
+ * <aup-table [tableModel]="heroTableModel"></aup-table>
3210
+ *
3211
+ * Styling
3212
+ * @example
3213
+ * aup-table {
3214
+ * --column-gap: 10px; // defaults to 24px
3215
+ * aup-table-cell-renderer {
3216
+ * &:first-column {
3217
+ * // do stuff
3218
+ * }
3219
+ * &:last-column {
3220
+ * // do stuff
3221
+ * }
3222
+ * }
3223
+ * }
3224
+ */
3225
+ var TableComponent = /** @class */ (function (_super) {
3226
+ __extends(TableComponent, _super);
3227
+ function TableComponent() {
3228
+ return _super.call(this) || this;
3229
+ }
3230
+ TableComponent.prototype.ngOnInit = function () {
3231
+ var _a = Dsl.disposeWith(this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
2948
3232
  this.columns = chain(this.tableModel.columns);
2949
3233
  this.columnIds = chain(this.columns).pluck('columnId');
3234
+ this.columnsById = chain(this.columns).indexBy('columnId');
2950
3235
  };
2951
3236
  TableComponent.prototype.isEditing = function (row) {
2952
3237
  return !!this.tableModel.getEditSessionFor(row);
2953
3238
  };
3239
+ TableComponent.prototype.registerColumnTemplate = function (columnId, templateRef, viewContainer, fillCell, padChild) {
3240
+ var column = this.columnsById.get(columnId);
3241
+ if (column instanceof CustomTemplateColumnModel) {
3242
+ column.setTemplate(templateRef, viewContainer, fillCell, padChild);
3243
+ }
3244
+ };
2954
3245
  __decorate([
2955
3246
  Input(),
2956
3247
  TrackExternal(),
@@ -2969,94 +3260,62 @@ var TableComponent = /** @class */ (function (_super) {
2969
3260
 
2970
3261
  var ColumnTemplateDirective = /** @class */ (function () {
2971
3262
  function ColumnTemplateDirective(host, templateRef, viewContainer) {
3263
+ this.host = host;
2972
3264
  this.templateRef = templateRef;
2973
3265
  this.viewContainer = viewContainer;
3266
+ this.aupColumnTemplateFillCell = false;
3267
+ this.aupColumnTemplateAutoPadChild = undefined;
2974
3268
  }
3269
+ ColumnTemplateDirective.prototype.ngOnInit = function () {
3270
+ var _a;
3271
+ assert.isTruthy(this.aupColumnTemplateColumnId);
3272
+ this.host.registerColumnTemplate(this.aupColumnTemplateColumnId, this.templateRef, this.viewContainer, this.aupColumnTemplateFillCell, (_a = this.aupColumnTemplateAutoPadChild) !== null && _a !== void 0 ? _a : this.aupColumnTemplateFillCell);
3273
+ };
2975
3274
  ColumnTemplateDirective.ctorParameters = function () { return [
2976
3275
  { type: TableComponent },
2977
3276
  { type: TemplateRef },
2978
3277
  { type: ViewContainerRef }
2979
3278
  ]; };
2980
- ColumnTemplateDirective = __decorate([
2981
- Directive({
2982
- selector: '[aupColumnTemplate]'
2983
- }),
2984
- __metadata("design:paramtypes", [TableComponent,
2985
- TemplateRef,
2986
- ViewContainerRef])
2987
- ], ColumnTemplateDirective);
2988
- return ColumnTemplateDirective;
2989
- }());
2990
-
2991
- var TableCellRendererComponent = /** @class */ (function () {
2992
- function TableCellRendererComponent() {
2993
- var _this = this;
2994
- this.defaultClassNames = "aup-header-cell-renderer";
2995
- this.editRowCommand = Command.create(function () {
2996
- _this.tableModel.startEditSession(_this.row);
2997
- });
2998
- }
2999
- TableCellRendererComponent.prototype.initialiseRenderer = function (instance) {
3000
- if (this.renderer !== instance) {
3001
- this.renderer = instance;
3002
- this.column.updateCellRenderer(this.renderer, this.row, this.editRowCommand, this.editSession);
3003
- }
3004
- };
3005
- TableCellRendererComponent.prototype.initialiseEditor = function (instance) {
3006
- if (this.editor !== instance) {
3007
- this.editor = instance;
3008
- this.column.initialiseEditor(this.editor, this.editSession);
3009
- }
3010
- };
3011
- TableCellRendererComponent.prototype.ngOnChanges = function (changes) {
3012
- if (this.renderer) {
3013
- this.column.updateCellRenderer(this.renderer, this.row, this.editRowCommand, this.editSession);
3014
- this.renderer.editSession = this.editSession;
3015
- }
3016
- };
3017
- TableCellRendererComponent.prototype.hasActiveEditor = function () {
3018
- return this.editSession && this.column.hasEditor();
3019
- };
3020
3279
  __decorate([
3021
3280
  Input(),
3022
- __metadata("design:type", Object)
3023
- ], TableCellRendererComponent.prototype, "row", void 0);
3281
+ __metadata("design:type", String)
3282
+ ], ColumnTemplateDirective.prototype, "aupColumnTemplate", void 0);
3024
3283
  __decorate([
3025
3284
  Input(),
3026
- __metadata("design:type", ColumnModel)
3027
- ], TableCellRendererComponent.prototype, "column", void 0);
3285
+ __metadata("design:type", String)
3286
+ ], ColumnTemplateDirective.prototype, "aupColumnTemplateColumnId", void 0);
3028
3287
  __decorate([
3029
3288
  Input(),
3030
- __metadata("design:type", EditSession)
3031
- ], TableCellRendererComponent.prototype, "editSession", void 0);
3289
+ __metadata("design:type", Object)
3290
+ ], ColumnTemplateDirective.prototype, "aupColumnTemplateFillCell", void 0);
3032
3291
  __decorate([
3033
3292
  Input(),
3034
- __metadata("design:type", TableModel)
3035
- ], TableCellRendererComponent.prototype, "tableModel", void 0);
3036
- __decorate([
3037
- HostBinding('class'),
3038
3293
  __metadata("design:type", Object)
3039
- ], TableCellRendererComponent.prototype, "defaultClassNames", void 0);
3040
- TableCellRendererComponent = __decorate([
3041
- Component({
3042
- selector: 'aup-table-cell-renderer',
3043
- 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",
3044
- styles: [":host{display:flex;flex-direction:column;align-items:stretch}"]
3294
+ ], ColumnTemplateDirective.prototype, "aupColumnTemplateAutoPadChild", void 0);
3295
+ ColumnTemplateDirective = __decorate([
3296
+ Directive({
3297
+ selector: '[aupColumnTemplate]'
3045
3298
  }),
3046
- __metadata("design:paramtypes", [])
3047
- ], TableCellRendererComponent);
3048
- return TableCellRendererComponent;
3299
+ __metadata("design:paramtypes", [TableComponent,
3300
+ TemplateRef,
3301
+ ViewContainerRef])
3302
+ ], ColumnTemplateDirective);
3303
+ return ColumnTemplateDirective;
3049
3304
  }());
3050
3305
 
3051
3306
  var TableHeaderCellRendererComponent = /** @class */ (function () {
3052
3307
  function TableHeaderCellRendererComponent() {
3053
- this.defaultClassNames = "aup-header-cell-renderer";
3308
+ this.defaultClassNames = 'aup-header-cell-renderer';
3054
3309
  }
3310
+ TableHeaderCellRendererComponent.prototype.ngOnInit = function () {
3311
+ this.column.attachHeaderCell(this);
3312
+ };
3313
+ // @Trace()
3055
3314
  TableHeaderCellRendererComponent.prototype.initialiseHeader = function (instance) {
3056
- if (this.renderer !== instance) {
3057
- this.renderer = instance;
3058
- this.column.initialiseHeader(this.renderer);
3059
- }
3315
+ this.column.onHeaderAttached(this, instance);
3316
+ };
3317
+ TableHeaderCellRendererComponent.prototype.getPortal = function () {
3318
+ return this[HEADER_CELL_RENDERER_PORTAL];
3060
3319
  };
3061
3320
  __decorate([
3062
3321
  Input(),
@@ -3069,8 +3328,8 @@ var TableHeaderCellRendererComponent = /** @class */ (function () {
3069
3328
  TableHeaderCellRendererComponent = __decorate([
3070
3329
  Component({
3071
3330
  selector: 'aup-table-header-cell-renderer',
3072
- template: "<ng-container [cdkPortalOutlet]=\"column.columnHeaderCellRendererPortal\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
3073
- styles: [":host{display:flex;flex-direction:column;align-items:stretch}"]
3331
+ template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
3332
+ styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
3074
3333
  }),
3075
3334
  __metadata("design:paramtypes", [])
3076
3335
  ], TableHeaderCellRendererComponent);
@@ -3162,6 +3421,58 @@ var VerticalFocusContainerComponent = /** @class */ (function (_super) {
3162
3421
  return VerticalFocusContainerComponent;
3163
3422
  }(FocusContainerComponent));
3164
3423
 
3424
+ var MultipleSelectInputComponent = /** @class */ (function (_super) {
3425
+ __extends(MultipleSelectInputComponent, _super);
3426
+ function MultipleSelectInputComponent() {
3427
+ var _this = _super.call(this) || this;
3428
+ _this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
3429
+ return _this;
3430
+ }
3431
+ MultipleSelectInputComponent.prototype.ngOnInit = function () {
3432
+ };
3433
+ __decorate([
3434
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
3435
+ __metadata("design:type", Object)
3436
+ ], MultipleSelectInputComponent.prototype, "listModel", void 0);
3437
+ __decorate([
3438
+ Input(), TrackExternal(),
3439
+ __metadata("design:type", ListModel)
3440
+ ], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
3441
+ __decorate([
3442
+ Input(), StoreInListModel('optionsModel'),
3443
+ __metadata("design:type", Array)
3444
+ ], MultipleSelectInputComponent.prototype, "options", void 0);
3445
+ __decorate([
3446
+ Input(),
3447
+ __metadata("design:type", Object)
3448
+ ], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
3449
+ __decorate([
3450
+ Input(),
3451
+ __metadata("design:type", Boolean)
3452
+ ], MultipleSelectInputComponent.prototype, "allowNil", void 0);
3453
+ __decorate([
3454
+ ContentChild('optionTemplate'),
3455
+ __metadata("design:type", TemplateRef)
3456
+ ], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
3457
+ __decorate([
3458
+ ContentChild('nilOptionTemplate'),
3459
+ __metadata("design:type", TemplateRef)
3460
+ ], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
3461
+ __decorate([
3462
+ Input(),
3463
+ __metadata("design:type", Function)
3464
+ ], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
3465
+ MultipleSelectInputComponent = __decorate([
3466
+ Component({
3467
+ selector: 'aup-multiple-select-input',
3468
+ 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",
3469
+ styles: [":host{display:inline-block}mat-form-field{width:100%}"]
3470
+ }),
3471
+ __metadata("design:paramtypes", [])
3472
+ ], MultipleSelectInputComponent);
3473
+ return MultipleSelectInputComponent;
3474
+ }(AbstractListInputComponent));
3475
+
3165
3476
  var ComponentsModule = /** @class */ (function () {
3166
3477
  function ComponentsModule() {
3167
3478
  }
@@ -3169,6 +3480,8 @@ var ComponentsModule = /** @class */ (function () {
3169
3480
  NgModule({
3170
3481
  declarations: [
3171
3482
  AbstractInputComponent,
3483
+ AbstractValueInputComponent,
3484
+ AbstractListInputComponent,
3172
3485
  AbstractInputActivity,
3173
3486
  NumberInputComponent,
3174
3487
  StringInputComponent,
@@ -3194,7 +3507,8 @@ var ComponentsModule = /** @class */ (function () {
3194
3507
  SelectCellRendererComponent,
3195
3508
  SelectHeaderCellRendererComponent,
3196
3509
  DefaultHeaderCellRendererComponent,
3197
- TableHeaderCellRendererComponent
3510
+ TableHeaderCellRendererComponent,
3511
+ MultipleSelectInputComponent
3198
3512
  ],
3199
3513
  imports: [
3200
3514
  CommonModule,
@@ -3230,7 +3544,8 @@ var ComponentsModule = /** @class */ (function () {
3230
3544
  CardContainerComponent,
3231
3545
  TableComponent,
3232
3546
  EditRowControls,
3233
- ColumnTemplateDirective
3547
+ ColumnTemplateDirective,
3548
+ MultipleSelectInputComponent
3234
3549
  ],
3235
3550
  providers: [
3236
3551
  FocusBindingFactory,
@@ -6128,5 +6443,5 @@ function VisitParameterList(options) {
6128
6443
  * Generated bundle index. Do not edit.
6129
6444
  */
6130
6445
 
6131
- export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CardContainerComponent, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ModalInteractionContextFactory, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputComponent, SelectionColumnModel, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, CardContainerComponent as ɵba, TableComponent as ɵbb, EditRowControls as ɵbc, ColumnTemplateDirective as ɵbd, DefaultCellRendererComponent as ɵbe, TableCellRendererComponent as ɵbf, SelectCellRendererComponent as ɵbg, SelectHeaderCellRendererComponent as ɵbh, DefaultHeaderCellRendererComponent as ɵbi, TableHeaderCellRendererComponent as ɵbj, InteractionModule as ɵbk, ActivityContainerComponent as ɵbl, AbstractInteractionContext as ɵbm, ActivityOutletComponent as ɵbn, ConfirmationDialogComponent as ɵbo, ACTIVITY_DATA as ɵbp, Activity as ɵbq, ConfirmThenDialogComponent as ɵbs, AlertDialogComponent as ɵbt, InPlaceInteractionContextComponent as ɵbv, InteractionService as ɵbw, ModalInteractionContextFactory as ɵbx, AddItemInteractionContextComponent as ɵby, ActivityActionsComponent as ɵbz, FocusBindingDirective as ɵc, PopupInteractionContextComponent as ɵca, InteractionContextTriggerFor as ɵcb, PlaceModule as ɵcc, EmptyStateComponent as ɵcd, BusyOverlayComponent as ɵce, PlaceOutletComponent as ɵcf, leftRightPlaceAnimation as ɵcg, LEFT_RIGHT_PLACE_ANIMATION as ɵch, AUP_PLACE_CONFIG as ɵci, PlaceRouter as ɵck, UrlService as ɵcl, PlaceHistory as ɵcm, TabbedPlaceNavigationComponent as ɵcn, AbstractPlaceNavigationComponent as ɵco, ListPlaceNavComponent as ɵcp, SidePlaceNavigationComponent as ɵcq, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, AbstractInputComponent as ɵg, AbstractInputActivity as ɵh, Activity as ɵi, ACTIVITY_DATA as ɵj, NumberInputComponent as ɵk, StringInputComponent as ɵl, StringInputActivity as ɵm, TextInputComponent as ɵn, PasswordInputComponent as ɵo, SelectInputComponent as ɵp, CheckboxInputComponent as ɵq, ScrollContainerComponent as ɵr, NoopComponent as ɵs, SwitchCaseOption as ɵt, SwitchCaseWhenDirective as ɵu, SwitchCaseDefaultDirective as ɵv, SwitchCaseComponent as ɵw, FocusContainerComponent as ɵx, VerticalFocusContainerComponent as ɵy, FocusableComponent as ɵz };
6446
+ export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandDirective, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalInteractionContextFactory, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputComponent, SelectionColumnModel, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TemplateCellRendererPortalRef, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0, DirectivesModule as ɵa, CommandDirective as ɵb, VerticalFocusContainerComponent as ɵba, FocusableComponent as ɵbb, CardContainerComponent as ɵbc, TableComponent as ɵbd, EditRowControls as ɵbe, ColumnTemplateDirective as ɵbf, DefaultCellRendererComponent as ɵbg, TableCellRendererComponent as ɵbh, SelectCellRendererComponent as ɵbi, SelectHeaderCellRendererComponent as ɵbj, DefaultHeaderCellRendererComponent as ɵbk, TableHeaderCellRendererComponent as ɵbl, MultipleSelectInputComponent as ɵbm, InteractionModule as ɵbn, ActivityContainerComponent as ɵbo, AbstractInteractionContext as ɵbp, ActivityOutletComponent as ɵbq, ConfirmationDialogComponent as ɵbr, ACTIVITY_DATA as ɵbs, Activity as ɵbt, ConfirmThenDialogComponent as ɵbv, AlertDialogComponent as ɵbw, InPlaceInteractionContextComponent as ɵby, InteractionService as ɵbz, FocusBindingDirective as ɵc, ModalInteractionContextFactory as ɵca, AddItemInteractionContextComponent as ɵcb, ActivityActionsComponent as ɵcc, PopupInteractionContextComponent as ɵcd, InteractionContextTriggerFor as ɵce, PlaceModule as ɵcf, EmptyStateComponent as ɵcg, BusyOverlayComponent as ɵch, PlaceOutletComponent as ɵci, leftRightPlaceAnimation as ɵcj, LEFT_RIGHT_PLACE_ANIMATION as ɵck, AUP_PLACE_CONFIG as ɵcl, PlaceRouter as ɵcn, UrlService as ɵco, PlaceHistory as ɵcp, TabbedPlaceNavigationComponent as ɵcq, AbstractPlaceNavigationComponent as ɵcr, ListPlaceNavComponent as ɵcs, SidePlaceNavigationComponent as ɵct, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, AbstractInputComponent as ɵg, AbstractValueInputComponent as ɵh, AbstractListInputComponent as ɵi, AbstractInputActivity as ɵj, Activity as ɵk, ACTIVITY_DATA as ɵl, NumberInputComponent as ɵm, StringInputComponent as ɵn, StringInputActivity as ɵo, TextInputComponent as ɵp, PasswordInputComponent as ɵq, SelectInputComponent as ɵr, CheckboxInputComponent as ɵs, ScrollContainerComponent as ɵt, NoopComponent as ɵu, SwitchCaseOption as ɵv, SwitchCaseWhenDirective as ɵw, SwitchCaseDefaultDirective as ɵx, SwitchCaseComponent as ɵy, FocusContainerComponent as ɵz };
6132
6447
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map