@coolon/angular-ui-powerups 1.12.0 → 1.13.1

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 +15 -0
  2. package/assets/table.scss +32 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.js +757 -430
  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 +6 -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 +10 -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 +576 -288
  140. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  141. package/fesm5/coolon-angular-ui-powerups.js +670 -362
  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();
@@ -1852,7 +1840,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
1852
1840
  };
1853
1841
  Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
1854
1842
  get: function () {
1855
- return this.delegatingFormValueModel.enabled;
1843
+ return this.inputModel.enabled;
1856
1844
  },
1857
1845
  enumerable: true,
1858
1846
  configurable: true
@@ -1862,7 +1850,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
1862
1850
  };
1863
1851
  Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
1864
1852
  get: function () {
1865
- return this.delegatingFormValueModel.errorList;
1853
+ return this.inputModel.errorList;
1866
1854
  },
1867
1855
  enumerable: true,
1868
1856
  configurable: true
@@ -1874,6 +1862,13 @@ var AbstractInputComponent = /** @class */ (function (_super) {
1874
1862
  enumerable: true,
1875
1863
  configurable: true
1876
1864
  });
1865
+ Object.defineProperty(AbstractInputComponent.prototype, "focusContext", {
1866
+ get: function () {
1867
+ return this.inputModel.focusContext;
1868
+ },
1869
+ enumerable: true,
1870
+ configurable: true
1871
+ });
1877
1872
  __decorate([
1878
1873
  Input(),
1879
1874
  __metadata("design:type", String)
@@ -1955,6 +1950,54 @@ var AbstractInputComponent = /** @class */ (function (_super) {
1955
1950
  return AbstractInputComponent;
1956
1951
  }(DisposableComponent));
1957
1952
 
1953
+ var AbstractListInputComponent = /** @class */ (function (_super) {
1954
+ __extends(AbstractListInputComponent, _super);
1955
+ function AbstractListInputComponent() {
1956
+ var _this = _super !== null && _super.apply(this, arguments) || this;
1957
+ /**
1958
+ * A backing model for all our @Input() valueModel properties which should be defined as follows.
1959
+ *
1960
+ * @Input() @TrackExternal({useExisting: "inputModel"})
1961
+ * valueModel: FormListModel<string> | IMutableListModel<string>;
1962
+ *
1963
+ * This approach allows the input to accept plain or form models but all backed by a form
1964
+ * friendly delegate. We have to use an existing delegate for union types as pectin just
1965
+ * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
1966
+ */
1967
+ // We have to register it as a disposable so it ditches any listeners when we're disposed.
1968
+ _this.inputModel = _this.registerDisposable(new DelegatingFormListModel());
1969
+ return _this;
1970
+ }
1971
+ AbstractListInputComponent = __decorate([
1972
+ Component({ template: '' })
1973
+ ], AbstractListInputComponent);
1974
+ return AbstractListInputComponent;
1975
+ }(AbstractInputComponent));
1976
+
1977
+ var AbstractValueInputComponent = /** @class */ (function (_super) {
1978
+ __extends(AbstractValueInputComponent, _super);
1979
+ function AbstractValueInputComponent() {
1980
+ var _this = _super !== null && _super.apply(this, arguments) || this;
1981
+ /**
1982
+ * A backing model for all our @Input() valueModel properties which should be defined as follows.
1983
+ *
1984
+ * @Input() @TrackExternal({useExisting: "inputModel"})
1985
+ * valueModel: FormValueModel<string> | IMutableValueModel<string>;
1986
+ *
1987
+ * This approach allows the input to accept plain or form models but all backed by a form
1988
+ * friendly delegate. We have to use an existing delegate for union types as pectin just
1989
+ * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
1990
+ */
1991
+ // We have to register it as a disposable so it ditches any listeners when we're disposed.
1992
+ _this.inputModel = _this.registerDisposable(new DelegatingFormValueModel());
1993
+ return _this;
1994
+ }
1995
+ AbstractValueInputComponent = __decorate([
1996
+ Component({ template: '' })
1997
+ ], AbstractValueInputComponent);
1998
+ return AbstractValueInputComponent;
1999
+ }(AbstractInputComponent));
2000
+
1958
2001
  var CheckboxInputComponent = /** @class */ (function (_super) {
1959
2002
  __extends(CheckboxInputComponent, _super);
1960
2003
  function CheckboxInputComponent() {
@@ -1966,7 +2009,7 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
1966
2009
  CheckboxInputComponent.prototype.ngOnInit = function () {
1967
2010
  };
1968
2011
  __decorate([
1969
- Input(), TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
2012
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
1970
2013
  __metadata("design:type", Object)
1971
2014
  ], CheckboxInputComponent.prototype, "valueModel", void 0);
1972
2015
  __decorate([
@@ -1986,7 +2029,7 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
1986
2029
  __metadata("design:paramtypes", [])
1987
2030
  ], CheckboxInputComponent);
1988
2031
  return CheckboxInputComponent;
1989
- }(AbstractInputComponent));
2032
+ }(AbstractValueInputComponent));
1990
2033
 
1991
2034
  var NumberInputComponent = /** @class */ (function (_super) {
1992
2035
  __extends(NumberInputComponent, _super);
@@ -1999,7 +2042,7 @@ var NumberInputComponent = /** @class */ (function (_super) {
1999
2042
  NumberInputComponent.prototype.ngOnInit = function () {
2000
2043
  };
2001
2044
  __decorate([
2002
- Input(), TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
2045
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
2003
2046
  __metadata("design:type", Object)
2004
2047
  ], NumberInputComponent.prototype, "valueModel", void 0);
2005
2048
  __decorate([
@@ -2013,13 +2056,13 @@ var NumberInputComponent = /** @class */ (function (_super) {
2013
2056
  NumberInputComponent = __decorate([
2014
2057
  Component({
2015
2058
  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",
2059
+ 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
2060
  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
2061
  }),
2019
2062
  __metadata("design:paramtypes", [])
2020
2063
  ], NumberInputComponent);
2021
2064
  return NumberInputComponent;
2022
- }(AbstractInputComponent));
2065
+ }(AbstractValueInputComponent));
2023
2066
 
2024
2067
  var PasswordInputComponent = /** @class */ (function (_super) {
2025
2068
  __extends(PasswordInputComponent, _super);
@@ -2029,19 +2072,19 @@ var PasswordInputComponent = /** @class */ (function (_super) {
2029
2072
  PasswordInputComponent.prototype.ngOnInit = function () {
2030
2073
  };
2031
2074
  __decorate([
2032
- Input(), TrackExternal({ delegateTo: "delegatingFormValueModel" }),
2075
+ Input(), TrackExternal({ delegateTo: "inputModel" }),
2033
2076
  __metadata("design:type", Object)
2034
2077
  ], PasswordInputComponent.prototype, "valueModel", void 0);
2035
2078
  PasswordInputComponent = __decorate([
2036
2079
  Component({
2037
2080
  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",
2081
+ 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
2082
  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
2083
  }),
2041
2084
  __metadata("design:paramtypes", [])
2042
2085
  ], PasswordInputComponent);
2043
2086
  return PasswordInputComponent;
2044
- }(AbstractInputComponent));
2087
+ }(AbstractValueInputComponent));
2045
2088
 
2046
2089
  var SelectInputComponent = /** @class */ (function (_super) {
2047
2090
  __extends(SelectInputComponent, _super);
@@ -2053,7 +2096,7 @@ var SelectInputComponent = /** @class */ (function (_super) {
2053
2096
  SelectInputComponent.prototype.ngOnInit = function () {
2054
2097
  };
2055
2098
  __decorate([
2056
- Input(), TrackExternal({ delegateTo: "delegatingFormValueModel" }),
2099
+ Input(), TrackExternal({ delegateTo: "inputModel" }),
2057
2100
  __metadata("design:type", Object)
2058
2101
  ], SelectInputComponent.prototype, "valueModel", void 0);
2059
2102
  __decorate([
@@ -2087,13 +2130,13 @@ var SelectInputComponent = /** @class */ (function (_super) {
2087
2130
  SelectInputComponent = __decorate([
2088
2131
  Component({
2089
2132
  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",
2133
+ 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
2134
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
2092
2135
  }),
2093
2136
  __metadata("design:paramtypes", [])
2094
2137
  ], SelectInputComponent);
2095
2138
  return SelectInputComponent;
2096
- }(AbstractInputComponent));
2139
+ }(AbstractValueInputComponent));
2097
2140
 
2098
2141
  var StringInputActivity = /** @class */ (function (_super) {
2099
2142
  __extends(StringInputActivity, _super);
@@ -2123,7 +2166,7 @@ var StringInputComponent = /** @class */ (function (_super) {
2123
2166
  StringInputComponent.prototype.ngOnInit = function () {
2124
2167
  };
2125
2168
  __decorate([
2126
- Input(), TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
2169
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
2127
2170
  __metadata("design:type", Object)
2128
2171
  ], StringInputComponent.prototype, "valueModel", void 0);
2129
2172
  __decorate([
@@ -2137,13 +2180,13 @@ var StringInputComponent = /** @class */ (function (_super) {
2137
2180
  StringInputComponent = __decorate([
2138
2181
  Component({
2139
2182
  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",
2183
+ 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
2184
  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
2185
  }),
2143
2186
  __metadata("design:paramtypes", [])
2144
2187
  ], StringInputComponent);
2145
2188
  return StringInputComponent;
2146
- }(AbstractInputComponent));
2189
+ }(AbstractValueInputComponent));
2147
2190
 
2148
2191
  var TextInputComponent = /** @class */ (function (_super) {
2149
2192
  __extends(TextInputComponent, _super);
@@ -2156,7 +2199,7 @@ var TextInputComponent = /** @class */ (function (_super) {
2156
2199
  TextInputComponent.prototype.ngOnInit = function () {
2157
2200
  };
2158
2201
  __decorate([
2159
- Input(), TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
2202
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
2160
2203
  __metadata("design:type", Object)
2161
2204
  ], TextInputComponent.prototype, "valueModel", void 0);
2162
2205
  __decorate([
@@ -2170,13 +2213,13 @@ var TextInputComponent = /** @class */ (function (_super) {
2170
2213
  TextInputComponent = __decorate([
2171
2214
  Component({
2172
2215
  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",
2216
+ 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
2217
  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
2218
  }),
2176
2219
  __metadata("design:paramtypes", [])
2177
2220
  ], TextInputComponent);
2178
2221
  return TextInputComponent;
2179
- }(AbstractInputComponent));
2222
+ }(AbstractValueInputComponent));
2180
2223
 
2181
2224
  var NoopComponent = /** @class */ (function () {
2182
2225
  function NoopComponent() {
@@ -2393,17 +2436,20 @@ var DefaultHeaderCellRendererComponent = /** @class */ (function () {
2393
2436
 
2394
2437
  var EditSession = /** @class */ (function (_super) {
2395
2438
  __extends(EditSession, _super);
2396
- function EditSession(rowId, row, saveCommand) {
2439
+ function EditSession(rowId, row, form, saveCommand) {
2397
2440
  var _this = _super.call(this) || this;
2398
2441
  _this.rowId = rowId;
2442
+ _this.form = form;
2399
2443
  _this.saveCommand = saveCommand;
2400
- _this._editorValue = new MutableValueModel();
2401
- _this.rowValueModel = _this._editorValue.readonly;
2402
- _this.form = new Form();
2444
+ _this._liveRowValue = new MutableValueModel();
2445
+ _this.liveRowValue = _this._liveRowValue.readonly;
2403
2446
  _this.form.load(row);
2404
- _this._editorValue.value = row;
2447
+ _this._liveRowValue.value = row;
2405
2448
  _this.form.onEdit(function () {
2406
- _this._editorValue.value = produce(_this._editorValue.value, function (draft) {
2449
+ // if (!this._liveRowValue.value[immerable]) {
2450
+ // console.warn()
2451
+ // }
2452
+ _this._liveRowValue.value = produce(_this._liveRowValue.value, function (draft) {
2407
2453
  _this.form.writeDirtyStateTo(draft);
2408
2454
  });
2409
2455
  });
@@ -2472,28 +2518,13 @@ var SelectCellRendererComponent = /** @class */ (function (_super) {
2472
2518
  });
2473
2519
  return _this;
2474
2520
  }
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
2521
  SelectCellRendererComponent.prototype.isSelected = function () {
2486
2522
  return this.selectionModel.isSelected(this.row);
2487
2523
  };
2488
- __decorate([
2489
- Input(),
2490
- __metadata("design:type", Object),
2491
- __metadata("design:paramtypes", [Object])
2492
- ], SelectCellRendererComponent.prototype, "row", null);
2493
2524
  __decorate([
2494
2525
  Input(),
2495
2526
  __metadata("design:type", Object)
2496
- ], SelectCellRendererComponent.prototype, "selectionModel", void 0);
2527
+ ], SelectCellRendererComponent.prototype, "row", void 0);
2497
2528
  SelectCellRendererComponent = __decorate([
2498
2529
  Component({
2499
2530
  selector: 'aup-select-cell-renderer',
@@ -2515,15 +2546,13 @@ var SelectHeaderCellRendererComponent = /** @class */ (function (_super) {
2515
2546
  return _this;
2516
2547
  }
2517
2548
  SelectHeaderCellRendererComponent.prototype.isSelected = function () {
2518
- return this.selectionModel.allSelected.value;
2549
+ var _a;
2550
+ return ((_a = this.selectionModel) === null || _a === void 0 ? void 0 : _a.allSelected.value) || false;
2519
2551
  };
2520
2552
  SelectHeaderCellRendererComponent.prototype.isIntermediate = function () {
2521
- return this.selectionModel.someSelected.value;
2553
+ var _a;
2554
+ return ((_a = this.selectionModel) === null || _a === void 0 ? void 0 : _a.someSelected.value) || false;
2522
2555
  };
2523
- __decorate([
2524
- Input(),
2525
- __metadata("design:type", MultipleSelectionModel)
2526
- ], SelectHeaderCellRendererComponent.prototype, "selectionModel", void 0);
2527
2556
  SelectHeaderCellRendererComponent = __decorate([
2528
2557
  Component({
2529
2558
  selector: 'aup-select-header-cell-renderer',
@@ -2535,197 +2564,6 @@ var SelectHeaderCellRendererComponent = /** @class */ (function (_super) {
2535
2564
  return SelectHeaderCellRendererComponent;
2536
2565
  }(DisposableComponent));
2537
2566
 
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
2567
  // export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
2730
2568
  // export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
2731
2569
  /**
@@ -2804,6 +2642,7 @@ var TableModel = /** @class */ (function () {
2804
2642
  this._garbage = new GarbageCollector();
2805
2643
  this._columns = new MutableListModel();
2806
2644
  this._editorSessions = new MutableListModel();
2645
+ this._createForm = function (row) { return new Form(); };
2807
2646
  this.identityOf = sourceOfTruth.identityOf;
2808
2647
  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
2648
  this._columnsById = chain(this._columns).indexBy('columnId');
@@ -2843,6 +2682,9 @@ var TableModel = /** @class */ (function () {
2843
2682
  TableModel.prototype.pluck = function (property) {
2844
2683
  return this.addColumn(new PropertyColumnModel(property, this));
2845
2684
  };
2685
+ TableModel.prototype.pluckList = function (property) {
2686
+ return this.addColumn(new ListPropertyColumnModel(property, this));
2687
+ };
2846
2688
  TableModel.prototype.addSelectionColumn = function (selectionModel) {
2847
2689
  return this.addColumn(new SelectionColumnModel('selection', this, selectionModel));
2848
2690
  };
@@ -2853,6 +2695,13 @@ var TableModel = /** @class */ (function () {
2853
2695
  TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
2854
2696
  return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
2855
2697
  };
2698
+ TableModel.prototype.addTemplateColumn = function (columnId) {
2699
+ return this.addColumn(new CustomTemplateColumnModel(columnId, this));
2700
+ };
2701
+ TableModel.prototype.useFormFactory = function (factory) {
2702
+ this._createForm = factory;
2703
+ return this;
2704
+ };
2856
2705
  TableModel.prototype.addColumn = function (column) {
2857
2706
  if (this._columnsById.get(column.columnId)) {
2858
2707
  lang.illegalState("Column with id=" + column.columnId + " already exists");
@@ -2876,14 +2725,14 @@ var TableModel = /** @class */ (function () {
2876
2725
  return lang.illegalState("Row with id=" + rowId + " already being edited");
2877
2726
  }
2878
2727
  else {
2879
- var editSession_1 = new EditSession(rowId, row, this.saveCommand);
2728
+ var editSession_1 = new EditSession(rowId, row, this._createForm(row), this.saveCommand);
2880
2729
  var when = Dsl.disposeWith(editSession_1).when;
2881
- when.valueOf(editSession_1.rowValueModel).changes(function (editedValue) {
2730
+ when.valueOf(editSession_1.liveRowValue).changes(function (editedValue) {
2882
2731
  _this._rowsBeingEdited.replaceOrPush(editedValue);
2883
2732
  }, { initialValue: 'triggerChangeUnlessNil' });
2884
2733
  this._editorSessions.push(editSession_1);
2885
2734
  editSession_1.onDispose(function () {
2886
- _this._rowsBeingEdited.remove(editSession_1.rowValueModel.value);
2735
+ _this._rowsBeingEdited.remove(editSession_1.liveRowValue.value);
2887
2736
  _this._editorSessions.remove(editSession_1);
2888
2737
  });
2889
2738
  return editSession_1;
@@ -2911,45 +2760,480 @@ var TableModel = /** @class */ (function () {
2911
2760
  return TableModel;
2912
2761
  }());
2913
2762
 
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;
2763
+ var TableCellRendererComponent = /** @class */ (function () {
2764
+ function TableCellRendererComponent() {
2765
+ var _this = this;
2766
+ this.defaultClassNames = 'aup-cell-renderer';
2767
+ this.fillCell = false;
2768
+ this.padChild = false;
2769
+ this.editRowCommand = Command.create(function () {
2770
+ _this.tableModel.startEditSession(_this.row);
2771
+ });
2945
2772
  }
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;
2948
- this.columns = chain(this.tableModel.columns);
2949
- this.columnIds = chain(this.columns).pluck('columnId');
2773
+ TableCellRendererComponent.prototype.ngOnInit = function () {
2774
+ this.column.attachCell(this);
2950
2775
  };
2951
- TableComponent.prototype.isEditing = function (row) {
2952
- return !!this.tableModel.getEditSessionFor(row);
2776
+ TableCellRendererComponent.prototype.hasActiveEditor = function () {
2777
+ return !!this.editSession && !!this.column.hasEditorPortal();
2778
+ };
2779
+ TableCellRendererComponent.prototype.initialiseRenderer = function (instance) {
2780
+ this.column.onRendererAttached(this, instance);
2781
+ };
2782
+ TableCellRendererComponent.prototype.initialiseEditor = function (instance) {
2783
+ this.column.onEditorAttached(this, instance);
2784
+ };
2785
+ // @Trace()
2786
+ TableCellRendererComponent.prototype.ngOnChanges = function (changes) {
2787
+ this.column.updatePortalContent(this);
2788
+ };
2789
+ TableCellRendererComponent.prototype.getRendererPortal = function () {
2790
+ return this[CELL_RENDERER_PORTAL];
2791
+ };
2792
+ TableCellRendererComponent.prototype.getEditorPortal = function () {
2793
+ return this[CELL_EDITOR_PORTAL];
2794
+ };
2795
+ TableCellRendererComponent.prototype.getRowData = function () {
2796
+ return {
2797
+ row: this.row,
2798
+ editSession: this.editSession,
2799
+ editRowCommand: this.editRowCommand
2800
+ };
2801
+ };
2802
+ __decorate([
2803
+ Input(),
2804
+ __metadata("design:type", Object)
2805
+ ], TableCellRendererComponent.prototype, "row", void 0);
2806
+ __decorate([
2807
+ Input(),
2808
+ __metadata("design:type", ColumnModel)
2809
+ ], TableCellRendererComponent.prototype, "column", void 0);
2810
+ __decorate([
2811
+ Input(),
2812
+ __metadata("design:type", EditSession)
2813
+ ], TableCellRendererComponent.prototype, "editSession", void 0);
2814
+ __decorate([
2815
+ Input(),
2816
+ __metadata("design:type", TableModel)
2817
+ ], TableCellRendererComponent.prototype, "tableModel", void 0);
2818
+ __decorate([
2819
+ HostBinding('class'),
2820
+ __metadata("design:type", Object)
2821
+ ], TableCellRendererComponent.prototype, "defaultClassNames", void 0);
2822
+ __decorate([
2823
+ HostBinding('class.fillCell'),
2824
+ __metadata("design:type", Object)
2825
+ ], TableCellRendererComponent.prototype, "fillCell", void 0);
2826
+ __decorate([
2827
+ HostBinding('class.padChild'),
2828
+ __metadata("design:type", Object)
2829
+ ], TableCellRendererComponent.prototype, "padChild", void 0);
2830
+ __decorate([
2831
+ Trace(),
2832
+ __metadata("design:type", Function),
2833
+ __metadata("design:paramtypes", [Object]),
2834
+ __metadata("design:returntype", void 0)
2835
+ ], TableCellRendererComponent.prototype, "initialiseEditor", null);
2836
+ TableCellRendererComponent = __decorate([
2837
+ Component({
2838
+ selector: 'aup-table-cell-renderer',
2839
+ 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",
2840
+ styles: [""]
2841
+ }),
2842
+ __metadata("design:paramtypes", [])
2843
+ ], TableCellRendererComponent);
2844
+ return TableCellRendererComponent;
2845
+ }());
2846
+
2847
+ var HEADER_CELL_RENDERER_PORTAL = Symbol('aup-cell-header-renderer-component-ref');
2848
+ var CELL_RENDERER_PORTAL = Symbol('aup-cell-renderer-component-ref');
2849
+ var CELL_EDITOR_PORTAL = Symbol('aup-cell-editor-component-ref');
2850
+ var PORTAL_RENDERER_COMPONENT = Symbol('aup-cell-renderer-portal-component');
2851
+ var PORTAL_EDITOR_COMPONENT = Symbol('aup-cell-editor-portal-component');
2852
+ var noop = function () {
2853
+ };
2854
+ var ɵ0 = noop;
2855
+ var CellPortalRef = /** @class */ (function () {
2856
+ function CellPortalRef() {
2857
+ }
2858
+ return CellPortalRef;
2859
+ }());
2860
+ var CellHeaderPortalRef = /** @class */ (function (_super) {
2861
+ __extends(CellHeaderPortalRef, _super);
2862
+ function CellHeaderPortalRef(componentType, initialiseHeader) {
2863
+ var _this = _super.call(this) || this;
2864
+ _this.componentType = componentType;
2865
+ _this.initialiseHeader = initialiseHeader;
2866
+ return _this;
2867
+ }
2868
+ CellHeaderPortalRef.prototype.initialiseHost = function (host, columnModel) {
2869
+ assert$1.isTruthy(host);
2870
+ host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
2871
+ };
2872
+ CellHeaderPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
2873
+ this.initialiseHeader(portalComponent, host.column);
2874
+ };
2875
+ return CellHeaderPortalRef;
2876
+ }(CellPortalRef));
2877
+ var CellRendererPortalRef = /** @class */ (function (_super) {
2878
+ __extends(CellRendererPortalRef, _super);
2879
+ function CellRendererPortalRef() {
2880
+ return _super !== null && _super.apply(this, arguments) || this;
2881
+ }
2882
+ return CellRendererPortalRef;
2883
+ }(CellPortalRef));
2884
+ var ComponentCellRendererPortalRef = /** @class */ (function (_super) {
2885
+ __extends(ComponentCellRendererPortalRef, _super);
2886
+ function ComponentCellRendererPortalRef(componentType, updateComponent) {
2887
+ var _this = _super.call(this) || this;
2888
+ _this.componentType = componentType;
2889
+ _this.updateComponent = updateComponent;
2890
+ return _this;
2891
+ }
2892
+ ComponentCellRendererPortalRef.prototype.initialiseHost = function (host, columnModel) {
2893
+ host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
2894
+ };
2895
+ ComponentCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
2896
+ host[PORTAL_RENDERER_COMPONENT] = portalComponent;
2897
+ this.updateComponent(portalComponent, host.getRowData());
2898
+ };
2899
+ ComponentCellRendererPortalRef.prototype.pushState = function (host) {
2900
+ if (host[PORTAL_RENDERER_COMPONENT]) {
2901
+ this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());
2902
+ }
2903
+ };
2904
+ return ComponentCellRendererPortalRef;
2905
+ }(CellRendererPortalRef));
2906
+ var CellEditorPortalRef = /** @class */ (function (_super) {
2907
+ __extends(CellEditorPortalRef, _super);
2908
+ function CellEditorPortalRef(componentType, initialiseEditorSession) {
2909
+ var _this = _super.call(this) || this;
2910
+ _this.componentType = componentType;
2911
+ _this.initialiseEditorSession = initialiseEditorSession;
2912
+ return _this;
2913
+ }
2914
+ CellEditorPortalRef.prototype.initialiseHost = function (host, columnModel) {
2915
+ assert$1.isTruthy(host);
2916
+ host[CELL_EDITOR_PORTAL] = new ComponentPortal(this.componentType);
2917
+ };
2918
+ CellEditorPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
2919
+ host[PORTAL_EDITOR_COMPONENT] = portalComponent;
2920
+ this.initialiseEditorSession(portalComponent, host.editSession);
2921
+ };
2922
+ __decorate([
2923
+ Trace(),
2924
+ __metadata("design:type", Function),
2925
+ __metadata("design:paramtypes", [TableCellRendererComponent, Object]),
2926
+ __metadata("design:returntype", void 0)
2927
+ ], CellEditorPortalRef.prototype, "onPortalAttached", null);
2928
+ return CellEditorPortalRef;
2929
+ }(CellPortalRef));
2930
+ var TemplateCellRendererPortalRef = /** @class */ (function (_super) {
2931
+ __extends(TemplateCellRendererPortalRef, _super);
2932
+ function TemplateCellRendererPortalRef() {
2933
+ return _super.call(this) || this;
2934
+ }
2935
+ TemplateCellRendererPortalRef.prototype.registerPortal = function (templateRef, viewContainer, fillCell, padChild) {
2936
+ this.templateRef = templateRef;
2937
+ this.viewContainer = viewContainer;
2938
+ this.fillCell = fillCell;
2939
+ this.padChild = padChild;
2940
+ };
2941
+ TemplateCellRendererPortalRef.prototype.initialiseHost = function (host, columnModel) {
2942
+ assert$1.isTruthy(host);
2943
+ };
2944
+ TemplateCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
2945
+ // don't care
2946
+ };
2947
+ TemplateCellRendererPortalRef.prototype.pushState = function (host) {
2948
+ host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());
2949
+ host.fillCell = this.fillCell;
2950
+ host.padChild = this.padChild;
2951
+ };
2952
+ TemplateCellRendererPortalRef.prototype.createPortal = function (data) {
2953
+ return new TemplatePortal(this.templateRef, this.viewContainer, __assign(__assign({}, (data)), { $implicit: data.row }));
2954
+ };
2955
+ __decorate([
2956
+ Trace(),
2957
+ __metadata("design:type", Function),
2958
+ __metadata("design:paramtypes", [TableCellRendererComponent, void 0]),
2959
+ __metadata("design:returntype", void 0)
2960
+ ], TemplateCellRendererPortalRef.prototype, "onPortalAttached", null);
2961
+ return TemplateCellRendererPortalRef;
2962
+ }(CellRendererPortalRef));
2963
+ var ColumnModel = /** @class */ (function () {
2964
+ function ColumnModel(columnId, defaults) {
2965
+ this.columnId = columnId;
2966
+ this.defaults = defaults;
2967
+ this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
2968
+ component.headerText = column.getHeaderText();
2969
+ });
2970
+ }
2971
+ ColumnModel.prototype.getHeaderText = function () {
2972
+ var _a;
2973
+ return ((_a = this.getColumnTextProperties()) === null || _a === void 0 ? void 0 : _a.headerText()) || this.getDefaultHeaderText();
2974
+ };
2975
+ ColumnModel.prototype.getDefaultHeaderText = function () {
2976
+ return this.columnId;
2977
+ };
2978
+ ColumnModel.prototype.getColumnTextProperties = function () {
2979
+ return this._columnTextProperties || this.defaults.getColumnTextProperties(this);
2980
+ };
2981
+ ColumnModel.prototype.textProperties = function (columnTextProperties) {
2982
+ this._columnTextProperties = columnTextProperties;
2983
+ return this;
2984
+ };
2985
+ ColumnModel.prototype.configureHeaderRenderer = function (config) {
2986
+ this._columnHeaderPortalRef = config;
2987
+ };
2988
+ ColumnModel.prototype.configureCellRenderer = function (config) {
2989
+ this._cellRendererPortalRef = config;
2990
+ };
2991
+ ColumnModel.prototype.configureCellEditor = function (cellEditor) {
2992
+ this._cellEditorPortalRef = cellEditor;
2993
+ };
2994
+ ColumnModel.prototype.cellHeaderRenderer = function (componentType, initialiser) {
2995
+ this.configureHeaderRenderer(new CellHeaderPortalRef(componentType, initialiser));
2996
+ return this;
2997
+ };
2998
+ ColumnModel.prototype.hasEditorPortal = function () {
2999
+ return !!this._cellEditorPortalRef;
3000
+ };
3001
+ ColumnModel.prototype.attachHeaderCell = function (host) {
3002
+ this._columnHeaderPortalRef.initialiseHost(host, this);
3003
+ };
3004
+ ColumnModel.prototype.attachCell = function (host) {
3005
+ this._cellRendererPortalRef.initialiseHost(host, this);
3006
+ if (this.hasEditorPortal()) {
3007
+ this._cellEditorPortalRef.initialiseHost(host, this);
3008
+ }
3009
+ };
3010
+ ColumnModel.prototype.onHeaderAttached = function (host, component) {
3011
+ this._columnHeaderPortalRef.onPortalAttached(host, component);
3012
+ };
3013
+ ColumnModel.prototype.onRendererAttached = function (host, component) {
3014
+ this._cellRendererPortalRef.onPortalAttached(host, component);
3015
+ };
3016
+ ColumnModel.prototype.onEditorAttached = function (host, component) {
3017
+ this._cellEditorPortalRef.onPortalAttached(host, component);
3018
+ };
3019
+ ColumnModel.prototype.updatePortalContent = function (host) {
3020
+ this._cellRendererPortalRef.pushState(host);
3021
+ };
3022
+ __decorate([
3023
+ Memoize(),
3024
+ __metadata("design:type", Function),
3025
+ __metadata("design:paramtypes", []),
3026
+ __metadata("design:returntype", String)
3027
+ ], ColumnModel.prototype, "getHeaderText", null);
3028
+ __decorate([
3029
+ Memoize(),
3030
+ __metadata("design:type", Function),
3031
+ __metadata("design:paramtypes", []),
3032
+ __metadata("design:returntype", Object)
3033
+ ], ColumnModel.prototype, "getColumnTextProperties", null);
3034
+ __decorate([
3035
+ Trace(),
3036
+ __metadata("design:type", Function),
3037
+ __metadata("design:paramtypes", [TableCellRendererComponent, Object]),
3038
+ __metadata("design:returntype", void 0)
3039
+ ], ColumnModel.prototype, "onEditorAttached", null);
3040
+ return ColumnModel;
3041
+ }());
3042
+ var PropertyColumnModel = /** @class */ (function (_super) {
3043
+ __extends(PropertyColumnModel, _super);
3044
+ function PropertyColumnModel(property, defaults) {
3045
+ var _this = _super.call(this, property.toString(), defaults) || this;
3046
+ _this.property = property;
3047
+ _this._format = function (value) { return value; };
3048
+ _this.cellRenderer(DefaultCellRendererComponent);
3049
+ return _this;
3050
+ }
3051
+ PropertyColumnModel.prototype.cellRenderer = function (componentType) {
3052
+ var _this = this;
3053
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
3054
+ component.value = _this._format(rowData.row[_this.property]);
3055
+ }));
3056
+ return this;
3057
+ };
3058
+ PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, initialiseComponent) {
3059
+ var _this = this;
3060
+ var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
3061
+ var initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
3062
+ this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
3063
+ var formValueModel = editSession.form.pluck(_this.property);
3064
+ if (validators) {
3065
+ formValueModel.validateUsing(validators);
3066
+ }
3067
+ component.valueModel = formValueModel;
3068
+ if (initialiser) {
3069
+ initialiser(component);
3070
+ }
3071
+ }));
3072
+ return this;
3073
+ };
3074
+ PropertyColumnModel.prototype.format = function (formatter) {
3075
+ assert$1.isFunction(formatter);
3076
+ this._format = formatter;
3077
+ return this;
3078
+ };
3079
+ return PropertyColumnModel;
3080
+ }(ColumnModel));
3081
+ var ListPropertyColumnModel = /** @class */ (function (_super) {
3082
+ __extends(ListPropertyColumnModel, _super);
3083
+ function ListPropertyColumnModel(property, defaults) {
3084
+ var _this = _super.call(this, property.toString(), defaults) || this;
3085
+ _this.property = property;
3086
+ _this._format = function (value) { return value.map(function (v) { return v === null || v === void 0 ? void 0 : v.toString(); }).join(', '); };
3087
+ _this.cellRenderer(DefaultCellRendererComponent);
3088
+ return _this;
3089
+ }
3090
+ ListPropertyColumnModel.prototype.cellRenderer = function (componentType) {
3091
+ var _this = this;
3092
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
3093
+ component.value = _this._format(rowData.row[_this.property]);
3094
+ }));
3095
+ return this;
3096
+ };
3097
+ ListPropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, initialiseComponent) {
3098
+ var _this = this;
3099
+ var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
3100
+ var initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
3101
+ this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
3102
+ var formListModel = editSession.form.pluckList(_this.property);
3103
+ if (validators) {
3104
+ formListModel.validateUsing(validators);
3105
+ }
3106
+ component.listModel = formListModel;
3107
+ if (initialiser) {
3108
+ initialiser(component);
3109
+ }
3110
+ }));
3111
+ return this;
3112
+ };
3113
+ ListPropertyColumnModel.prototype.format = function (formatter) {
3114
+ assert$1.isFunction(formatter);
3115
+ this._format = formatter;
3116
+ return this;
3117
+ };
3118
+ return ListPropertyColumnModel;
3119
+ }(ColumnModel));
3120
+ var CustomValueColumnModel = /** @class */ (function (_super) {
3121
+ __extends(CustomValueColumnModel, _super);
3122
+ function CustomValueColumnModel(columnId, defaults, getValue) {
3123
+ var _this = _super.call(this, columnId, defaults) || this;
3124
+ _this.getValue = getValue;
3125
+ _this.cellRenderer(DefaultCellRendererComponent);
3126
+ return _this;
3127
+ }
3128
+ CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
3129
+ var _this = this;
3130
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
3131
+ component.value = _this.getValue(rowData.row);
3132
+ }));
3133
+ return this;
3134
+ };
3135
+ return CustomValueColumnModel;
3136
+ }(ColumnModel));
3137
+ var EditorControlColumnModel = /** @class */ (function (_super) {
3138
+ __extends(EditorControlColumnModel, _super);
3139
+ function EditorControlColumnModel(columnId, saveCommand, defaults) {
3140
+ var _this = _super.call(this, columnId, defaults) || this;
3141
+ _this.cellRenderer(EditRowControls);
3142
+ return _this;
3143
+ }
3144
+ EditorControlColumnModel.prototype.cellRenderer = function (componentType) {
3145
+ this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
3146
+ component.row = rowData.row;
3147
+ component.editSession = rowData.editSession;
3148
+ component.editRowCommand = rowData.editRowCommand;
3149
+ }));
3150
+ return this;
3151
+ };
3152
+ EditorControlColumnModel.prototype.getDefaultHeaderText = function () {
3153
+ return '';
3154
+ };
3155
+ return EditorControlColumnModel;
3156
+ }(ColumnModel));
3157
+ var CustomTemplateColumnModel = /** @class */ (function (_super) {
3158
+ __extends(CustomTemplateColumnModel, _super);
3159
+ function CustomTemplateColumnModel(columnId, defaults) {
3160
+ var _this = _super.call(this, columnId, defaults) || this;
3161
+ _this.config = new TemplateCellRendererPortalRef();
3162
+ _this.configureCellRenderer(_this.config);
3163
+ return _this;
3164
+ }
3165
+ CustomTemplateColumnModel.prototype.setTemplate = function (templateRef, viewContainer, fillCell, padChild) {
3166
+ this.config.registerPortal(templateRef, viewContainer, fillCell, padChild);
3167
+ };
3168
+ return CustomTemplateColumnModel;
3169
+ }(ColumnModel));
3170
+ var SelectionColumnModel = /** @class */ (function (_super) {
3171
+ __extends(SelectionColumnModel, _super);
3172
+ function SelectionColumnModel(columnId, defaults, selectionModel) {
3173
+ var _this = _super.call(this, columnId, defaults) || this;
3174
+ if (selectionModel instanceof MultipleSelectionModel) {
3175
+ _this.cellHeaderRenderer(SelectHeaderCellRendererComponent, function (component) {
3176
+ component.selectionModel = selectionModel;
3177
+ });
3178
+ }
3179
+ _this.configureCellRenderer(new ComponentCellRendererPortalRef(SelectCellRendererComponent, function (component, rowData) {
3180
+ component.row = rowData.row;
3181
+ component.selectionModel = selectionModel;
3182
+ }));
3183
+ return _this;
3184
+ }
3185
+ SelectionColumnModel.prototype.getDefaultHeaderText = function () {
3186
+ return '';
3187
+ };
3188
+ return SelectionColumnModel;
3189
+ }(ColumnModel));
3190
+
3191
+ /**
3192
+ * Create your model:
3193
+ * @example
3194
+ * this.heroTableModel = TableModel.fromList(heroList, table => {
3195
+ * table.pluck("firstName");
3196
+ * table.pluck("lastName");
3197
+ * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
3198
+ * });
3199
+ *
3200
+ * Create your table
3201
+ * @example
3202
+ * <aup-table [tableModel]="heroTableModel"></aup-table>
3203
+ *
3204
+ * Styling
3205
+ * @example
3206
+ * aup-table {
3207
+ * --column-gap: 10px; // defaults to 24px
3208
+ * aup-table-cell-renderer {
3209
+ * &:first-column {
3210
+ * // do stuff
3211
+ * }
3212
+ * &:last-column {
3213
+ * // do stuff
3214
+ * }
3215
+ * }
3216
+ * }
3217
+ */
3218
+ var TableComponent = /** @class */ (function (_super) {
3219
+ __extends(TableComponent, _super);
3220
+ function TableComponent() {
3221
+ return _super.call(this) || this;
3222
+ }
3223
+ TableComponent.prototype.ngOnInit = function () {
3224
+ 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;
3225
+ this.columns = chain(this.tableModel.columns);
3226
+ this.columnIds = chain(this.columns).pluck('columnId');
3227
+ this.columnsById = chain(this.columns).indexBy('columnId');
3228
+ };
3229
+ TableComponent.prototype.isEditing = function (row) {
3230
+ return !!this.tableModel.getEditSessionFor(row);
3231
+ };
3232
+ TableComponent.prototype.registerColumnTemplate = function (columnId, templateRef, viewContainer, fillCell, padChild) {
3233
+ var column = this.columnsById.get(columnId);
3234
+ if (column instanceof CustomTemplateColumnModel) {
3235
+ column.setTemplate(templateRef, viewContainer, fillCell, padChild);
3236
+ }
2953
3237
  };
2954
3238
  __decorate([
2955
3239
  Input(),
@@ -2969,94 +3253,62 @@ var TableComponent = /** @class */ (function (_super) {
2969
3253
 
2970
3254
  var ColumnTemplateDirective = /** @class */ (function () {
2971
3255
  function ColumnTemplateDirective(host, templateRef, viewContainer) {
3256
+ this.host = host;
2972
3257
  this.templateRef = templateRef;
2973
3258
  this.viewContainer = viewContainer;
3259
+ this.aupColumnTemplateFillCell = false;
3260
+ this.aupColumnTemplateAutoPadChild = undefined;
2974
3261
  }
3262
+ ColumnTemplateDirective.prototype.ngOnInit = function () {
3263
+ var _a;
3264
+ assert.isTruthy(this.aupColumnTemplateColumnId);
3265
+ this.host.registerColumnTemplate(this.aupColumnTemplateColumnId, this.templateRef, this.viewContainer, this.aupColumnTemplateFillCell, (_a = this.aupColumnTemplateAutoPadChild) !== null && _a !== void 0 ? _a : this.aupColumnTemplateFillCell);
3266
+ };
2975
3267
  ColumnTemplateDirective.ctorParameters = function () { return [
2976
3268
  { type: TableComponent },
2977
3269
  { type: TemplateRef },
2978
3270
  { type: ViewContainerRef }
2979
3271
  ]; };
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
3272
  __decorate([
3021
3273
  Input(),
3022
- __metadata("design:type", Object)
3023
- ], TableCellRendererComponent.prototype, "row", void 0);
3274
+ __metadata("design:type", String)
3275
+ ], ColumnTemplateDirective.prototype, "aupColumnTemplate", void 0);
3024
3276
  __decorate([
3025
3277
  Input(),
3026
- __metadata("design:type", ColumnModel)
3027
- ], TableCellRendererComponent.prototype, "column", void 0);
3278
+ __metadata("design:type", String)
3279
+ ], ColumnTemplateDirective.prototype, "aupColumnTemplateColumnId", void 0);
3028
3280
  __decorate([
3029
3281
  Input(),
3030
- __metadata("design:type", EditSession)
3031
- ], TableCellRendererComponent.prototype, "editSession", void 0);
3282
+ __metadata("design:type", Object)
3283
+ ], ColumnTemplateDirective.prototype, "aupColumnTemplateFillCell", void 0);
3032
3284
  __decorate([
3033
3285
  Input(),
3034
- __metadata("design:type", TableModel)
3035
- ], TableCellRendererComponent.prototype, "tableModel", void 0);
3036
- __decorate([
3037
- HostBinding('class'),
3038
3286
  __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}"]
3287
+ ], ColumnTemplateDirective.prototype, "aupColumnTemplateAutoPadChild", void 0);
3288
+ ColumnTemplateDirective = __decorate([
3289
+ Directive({
3290
+ selector: '[aupColumnTemplate]'
3045
3291
  }),
3046
- __metadata("design:paramtypes", [])
3047
- ], TableCellRendererComponent);
3048
- return TableCellRendererComponent;
3292
+ __metadata("design:paramtypes", [TableComponent,
3293
+ TemplateRef,
3294
+ ViewContainerRef])
3295
+ ], ColumnTemplateDirective);
3296
+ return ColumnTemplateDirective;
3049
3297
  }());
3050
3298
 
3051
3299
  var TableHeaderCellRendererComponent = /** @class */ (function () {
3052
3300
  function TableHeaderCellRendererComponent() {
3053
- this.defaultClassNames = "aup-header-cell-renderer";
3301
+ this.defaultClassNames = 'aup-header-cell-renderer';
3054
3302
  }
3303
+ TableHeaderCellRendererComponent.prototype.ngOnInit = function () {
3304
+ this.column.attachHeaderCell(this);
3305
+ };
3306
+ // @Trace()
3055
3307
  TableHeaderCellRendererComponent.prototype.initialiseHeader = function (instance) {
3056
- if (this.renderer !== instance) {
3057
- this.renderer = instance;
3058
- this.column.initialiseHeader(this.renderer);
3059
- }
3308
+ this.column.onHeaderAttached(this, instance);
3309
+ };
3310
+ TableHeaderCellRendererComponent.prototype.getPortal = function () {
3311
+ return this[HEADER_CELL_RENDERER_PORTAL];
3060
3312
  };
3061
3313
  __decorate([
3062
3314
  Input(),
@@ -3069,8 +3321,8 @@ var TableHeaderCellRendererComponent = /** @class */ (function () {
3069
3321
  TableHeaderCellRendererComponent = __decorate([
3070
3322
  Component({
3071
3323
  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}"]
3324
+ template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
3325
+ styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
3074
3326
  }),
3075
3327
  __metadata("design:paramtypes", [])
3076
3328
  ], TableHeaderCellRendererComponent);
@@ -3162,6 +3414,58 @@ var VerticalFocusContainerComponent = /** @class */ (function (_super) {
3162
3414
  return VerticalFocusContainerComponent;
3163
3415
  }(FocusContainerComponent));
3164
3416
 
3417
+ var MultipleSelectInputComponent = /** @class */ (function (_super) {
3418
+ __extends(MultipleSelectInputComponent, _super);
3419
+ function MultipleSelectInputComponent() {
3420
+ var _this = _super.call(this) || this;
3421
+ _this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
3422
+ return _this;
3423
+ }
3424
+ MultipleSelectInputComponent.prototype.ngOnInit = function () {
3425
+ };
3426
+ __decorate([
3427
+ Input(), TrackExternal({ delegateTo: 'inputModel' }),
3428
+ __metadata("design:type", Object)
3429
+ ], MultipleSelectInputComponent.prototype, "listModel", void 0);
3430
+ __decorate([
3431
+ Input(), TrackExternal(),
3432
+ __metadata("design:type", ListModel)
3433
+ ], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
3434
+ __decorate([
3435
+ Input(), StoreInListModel('optionsModel'),
3436
+ __metadata("design:type", Array)
3437
+ ], MultipleSelectInputComponent.prototype, "options", void 0);
3438
+ __decorate([
3439
+ Input(),
3440
+ __metadata("design:type", Object)
3441
+ ], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
3442
+ __decorate([
3443
+ Input(),
3444
+ __metadata("design:type", Boolean)
3445
+ ], MultipleSelectInputComponent.prototype, "allowNil", void 0);
3446
+ __decorate([
3447
+ ContentChild('optionTemplate'),
3448
+ __metadata("design:type", TemplateRef)
3449
+ ], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
3450
+ __decorate([
3451
+ ContentChild('nilOptionTemplate'),
3452
+ __metadata("design:type", TemplateRef)
3453
+ ], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
3454
+ __decorate([
3455
+ Input(),
3456
+ __metadata("design:type", Function)
3457
+ ], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
3458
+ MultipleSelectInputComponent = __decorate([
3459
+ Component({
3460
+ selector: 'aup-multiple-select-input',
3461
+ 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",
3462
+ styles: [":host{display:inline-block}mat-form-field{width:100%}"]
3463
+ }),
3464
+ __metadata("design:paramtypes", [])
3465
+ ], MultipleSelectInputComponent);
3466
+ return MultipleSelectInputComponent;
3467
+ }(AbstractListInputComponent));
3468
+
3165
3469
  var ComponentsModule = /** @class */ (function () {
3166
3470
  function ComponentsModule() {
3167
3471
  }
@@ -3169,6 +3473,8 @@ var ComponentsModule = /** @class */ (function () {
3169
3473
  NgModule({
3170
3474
  declarations: [
3171
3475
  AbstractInputComponent,
3476
+ AbstractValueInputComponent,
3477
+ AbstractListInputComponent,
3172
3478
  AbstractInputActivity,
3173
3479
  NumberInputComponent,
3174
3480
  StringInputComponent,
@@ -3194,7 +3500,8 @@ var ComponentsModule = /** @class */ (function () {
3194
3500
  SelectCellRendererComponent,
3195
3501
  SelectHeaderCellRendererComponent,
3196
3502
  DefaultHeaderCellRendererComponent,
3197
- TableHeaderCellRendererComponent
3503
+ TableHeaderCellRendererComponent,
3504
+ MultipleSelectInputComponent
3198
3505
  ],
3199
3506
  imports: [
3200
3507
  CommonModule,
@@ -3230,7 +3537,8 @@ var ComponentsModule = /** @class */ (function () {
3230
3537
  CardContainerComponent,
3231
3538
  TableComponent,
3232
3539
  EditRowControls,
3233
- ColumnTemplateDirective
3540
+ ColumnTemplateDirective,
3541
+ MultipleSelectInputComponent
3234
3542
  ],
3235
3543
  providers: [
3236
3544
  FocusBindingFactory,
@@ -6128,5 +6436,5 @@ function VisitParameterList(options) {
6128
6436
  * Generated bundle index. Do not edit.
6129
6437
  */
6130
6438
 
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 };
6439
+ 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
6440
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map