@coolon/angular-ui-powerups 16.1.0-aplpha.139 → 16.1.0-aplpha.14

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 (208) hide show
  1. package/assets/activities/input-activities.scss +6 -14
  2. package/assets/form.scss +27 -74
  3. package/assets/icons.scss +0 -1
  4. package/assets/styles.scss +0 -2
  5. package/assets/table.scss +27 -47
  6. package/assets/tabs.scss +5 -15
  7. package/esm2022/lib/animations/slide-animations.mjs +10 -15
  8. package/esm2022/lib/components/cards/card-container/card-container.component.mjs +4 -4
  9. package/esm2022/lib/components/commands/command/command.component.mjs +29 -34
  10. package/esm2022/lib/components/commands/command-face/command-face.component.mjs +3 -11
  11. package/esm2022/lib/components/commands/command-face.mjs +11 -12
  12. package/esm2022/lib/components/commands/group/popup-aware.component.mjs +8 -32
  13. package/esm2022/lib/components/commands/group/popup-menu/abstract-popup-menu.component.mjs +23 -25
  14. package/esm2022/lib/components/commands/group/popup-menu/more-menu.component.mjs +20 -11
  15. package/esm2022/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.mjs +7 -12
  16. package/esm2022/lib/components/commands/group/popup-menu/popup-menu.component.mjs +20 -11
  17. package/esm2022/lib/components/commands/group/tool-bar/tool-bar.component.mjs +6 -8
  18. package/esm2022/lib/components/commands/separator.component.mjs +12 -6
  19. package/esm2022/lib/components/components.module.mjs +19 -44
  20. package/esm2022/lib/components/disposable-component.mjs +7 -32
  21. package/esm2022/lib/components/exports.mjs +2 -11
  22. package/esm2022/lib/components/forms/abstract-input.component.mjs +12 -55
  23. package/esm2022/lib/components/forms/autocomplete-input/autocomplete-input.component.mjs +2 -2
  24. package/esm2022/lib/components/forms/checkbox-input/checkbox-input.component.mjs +6 -8
  25. package/esm2022/lib/components/forms/multiple-select-input/multiple-select-input.component.mjs +2 -2
  26. package/esm2022/lib/components/forms/number-input/number-input.component.mjs +9 -84
  27. package/esm2022/lib/components/forms/password-input/password-input.component.mjs +3 -40
  28. package/esm2022/lib/components/forms/select-input/select-input.component.mjs +10 -11
  29. package/esm2022/lib/components/forms/string-input/string-input.component.mjs +10 -26
  30. package/esm2022/lib/components/forms/text-input/text-input.component.mjs +2 -6
  31. package/esm2022/lib/components/icon/icon.component.mjs +4 -7
  32. package/esm2022/lib/components/resize-aware.component.mjs +24 -61
  33. package/esm2022/lib/components/switch-case/switch-case.component.mjs +7 -5
  34. package/esm2022/lib/components/tables/abstract-table-model.mjs +47 -77
  35. package/esm2022/lib/components/tables/abstract-table.component.mjs +5 -19
  36. package/esm2022/lib/components/tables/column/column-list-model.mjs +44 -0
  37. package/esm2022/lib/components/tables/column/column-model.mjs +6 -16
  38. package/esm2022/lib/components/tables/column/custom-template-column-model.mjs +3 -3
  39. package/esm2022/lib/components/tables/column/custom-value-column-model.mjs +3 -3
  40. package/esm2022/lib/components/tables/column/editor-controls-column-model.mjs +3 -3
  41. package/esm2022/lib/components/tables/column/list-propery-column-model.mjs +3 -3
  42. package/esm2022/lib/components/tables/column/property-column-model.mjs +3 -3
  43. package/esm2022/lib/components/tables/column/selection-column-model.mjs +13 -35
  44. package/esm2022/lib/components/tables/editor/edit-row-controls/edit-row-controls.component.mjs +2 -2
  45. package/esm2022/lib/components/tables/editor/edit-session.mjs +1 -3
  46. package/esm2022/lib/components/tables/filter/table-filter-model.mjs +2 -4
  47. package/esm2022/lib/components/tables/filter/text-search-predicate.mjs +2 -16
  48. package/esm2022/lib/components/tables/paginator/paginator.component.mjs +1 -1
  49. package/esm2022/lib/components/tables/renderer/cell-portal-ref.mjs +5 -23
  50. package/esm2022/lib/components/tables/renderer/default-cell-renderer/default-cell-renderer.component.mjs +3 -3
  51. package/esm2022/lib/components/tables/renderer/select-header-cell/selection-header-cell.component.mjs +2 -3
  52. package/esm2022/lib/components/tables/renderer/table-body/table-body.component.mjs +40 -150
  53. package/esm2022/lib/components/tables/renderer/table-cell/table-cell.component.mjs +6 -6
  54. package/esm2022/lib/components/tables/renderer/table-more-menu/table-more-menu-popup/table-more-menu-popup.component.mjs +5 -12
  55. package/esm2022/lib/components/tables/renderer/table-more-menu/table-more-menu.component.mjs +2 -7
  56. package/esm2022/lib/components/tables/table/table-model.mjs +3 -12
  57. package/esm2022/lib/components/tables/table/table.component.mjs +61 -39
  58. package/esm2022/lib/components/tables/tree-table/decorated-tree-node.mjs +4 -5
  59. package/esm2022/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.mjs +1 -1
  60. package/esm2022/lib/components/tables/tree-table/tree-label-column-model.mjs +3 -3
  61. package/esm2022/lib/components/tables/tree-table/tree-table-component.mjs +5 -12
  62. package/esm2022/lib/components/tables/tree-table/tree-table-model.mjs +7 -4
  63. package/esm2022/lib/components/text/markdown/markdown.component.mjs +2 -2
  64. package/esm2022/lib/directives/command.directive.mjs +8 -26
  65. package/esm2022/lib/directives/directives.module.mjs +1 -1
  66. package/esm2022/lib/directives/exports.mjs +1 -2
  67. package/esm2022/lib/directives/highlight.pipe.mjs +7 -9
  68. package/esm2022/lib/interaction/activity.mjs +5 -13
  69. package/esm2022/lib/interaction/alert.mjs +2 -2
  70. package/esm2022/lib/interaction/components/abstract-confirm-dialog.component.mjs +4 -8
  71. package/esm2022/lib/interaction/components/activity-actions/activity-actions.component.mjs +11 -20
  72. package/esm2022/lib/interaction/components/activity-container/activity-container.component.mjs +11 -28
  73. package/esm2022/lib/interaction/components/activity-title/activity-title.component.mjs +4 -4
  74. package/esm2022/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.mjs +1 -1
  75. package/esm2022/lib/interaction/components/add-card-activity/add-card-activity.component.mjs +1 -1
  76. package/esm2022/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.mjs +1 -1
  77. package/esm2022/lib/interaction/components/alert-dialog/alert-dialog.component.mjs +1 -1
  78. package/esm2022/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.mjs +1 -1
  79. package/esm2022/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.mjs +1 -1
  80. package/esm2022/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.mjs +1 -1
  81. package/esm2022/lib/interaction/components/editors/edit-context.mjs +1 -1
  82. package/esm2022/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.mjs +3 -3
  83. package/esm2022/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.mjs +5 -21
  84. package/esm2022/lib/interaction/components/input-activities/input-activity.mjs +2 -2
  85. package/esm2022/lib/interaction/components/input-activities/select-input-activity.mjs +2 -4
  86. package/esm2022/lib/interaction/components/input-activities/string-input-activity.mjs +4 -8
  87. package/esm2022/lib/interaction/directives/interaction-context-trigger-for.directive.mjs +2 -2
  88. package/esm2022/lib/interaction/exports.mjs +1 -3
  89. package/esm2022/lib/interaction/interaction-context.mjs +2 -3
  90. package/esm2022/lib/interaction/interaction.module.mjs +9 -7
  91. package/esm2022/lib/place/components/list-place-nav/list-place-nav.component.mjs +4 -3
  92. package/esm2022/lib/place/components/place-outlet/place-outlet.component.mjs +9 -7
  93. package/esm2022/lib/place/components/side-place-navigation/side-place-navigation.component.mjs +2 -2
  94. package/esm2022/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.mjs +1 -1
  95. package/esm2022/lib/place/guards/consolidated-param-map.mjs +4 -4
  96. package/esm2022/lib/place/guards/place.guard.mjs +5 -6
  97. package/esm2022/lib/place/navigation/place-component-deactivation-handler.mjs +2 -2
  98. package/esm2022/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.mjs +6 -3
  99. package/esm2022/lib/place/place-auth-service.mjs +5 -5
  100. package/esm2022/lib/place/place-component.mjs +19 -29
  101. package/esm2022/lib/place/place-definition.mjs +4 -15
  102. package/esm2022/lib/place/place-history.mjs +2 -2
  103. package/esm2022/lib/place/place-router.mjs +20 -22
  104. package/esm2022/lib/place/place.decorator.mjs +2 -2
  105. package/esm2022/lib/place/place.module.mjs +5 -1
  106. package/esm2022/lib/place/route/formatter.mjs +2 -2
  107. package/esm2022/lib/place/route/parameter-decorators.mjs +50 -54
  108. package/esm2022/lib/place/route/parameter-definition.mjs +2 -2
  109. package/esm2022/lib/place/url-snapshot.mjs +3 -3
  110. package/esm2022/lib/place/visit-segment.mjs +2 -2
  111. package/esm2022/lib/place/visit.mjs +2 -2
  112. package/fesm2022/coolon-angular-ui-powerups.mjs +712 -1835
  113. package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
  114. package/lib/animations/slide-animations.d.ts +0 -1
  115. package/lib/components/cards/card-container/card-container.component.d.ts +1 -1
  116. package/lib/components/commands/command/command.component.d.ts +8 -8
  117. package/lib/components/commands/command-face/command-face.component.d.ts +0 -2
  118. package/lib/components/commands/command-face.d.ts +9 -8
  119. package/lib/components/commands/group/popup-aware.component.d.ts +4 -9
  120. package/lib/components/commands/group/popup-menu/abstract-popup-menu.component.d.ts +4 -4
  121. package/lib/components/commands/group/popup-menu/more-menu.component.d.ts +4 -2
  122. package/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.d.ts +0 -2
  123. package/lib/components/commands/group/popup-menu/popup-menu.component.d.ts +4 -2
  124. package/lib/components/commands/group/tool-bar/tool-bar.component.d.ts +1 -1
  125. package/lib/components/commands/separator.component.d.ts +4 -2
  126. package/lib/components/components.module.d.ts +53 -58
  127. package/lib/components/disposable-component.d.ts +3 -16
  128. package/lib/components/exports.d.ts +1 -10
  129. package/lib/components/forms/abstract-input.component.d.ts +5 -13
  130. package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +0 -2
  131. package/lib/components/forms/number-input/number-input.component.d.ts +4 -16
  132. package/lib/components/forms/password-input/password-input.component.d.ts +1 -7
  133. package/lib/components/forms/select-input/select-input.component.d.ts +3 -4
  134. package/lib/components/forms/string-input/string-input.component.d.ts +1 -6
  135. package/lib/components/forms/text-input/text-input.component.d.ts +0 -3
  136. package/lib/components/resize-aware.component.d.ts +5 -24
  137. package/lib/components/switch-case/switch-case.component.d.ts +3 -2
  138. package/lib/components/tables/abstract-table-model.d.ts +11 -29
  139. package/lib/components/tables/abstract-table.component.d.ts +3 -4
  140. package/lib/components/tables/column/column-list-model.d.ts +13 -0
  141. package/lib/components/tables/column/column-model.d.ts +3 -7
  142. package/lib/components/tables/column/custom-template-column-model.d.ts +2 -3
  143. package/lib/components/tables/column/custom-value-column-model.d.ts +2 -3
  144. package/lib/components/tables/column/editor-controls-column-model.d.ts +2 -3
  145. package/lib/components/tables/column/list-propery-column-model.d.ts +2 -3
  146. package/lib/components/tables/column/property-column-model.d.ts +2 -3
  147. package/lib/components/tables/column/selection-column-model.d.ts +4 -10
  148. package/lib/components/tables/editor/edit-row-controls/edit-row-controls.component.d.ts +1 -1
  149. package/lib/components/tables/editor/edit-session.d.ts +1 -1
  150. package/lib/components/tables/filter/text-search-predicate.d.ts +0 -9
  151. package/lib/components/tables/renderer/cell-portal-ref.d.ts +12 -20
  152. package/lib/components/tables/renderer/table-body/table-body.component.d.ts +16 -40
  153. package/lib/components/tables/renderer/table-cell/table-cell.component.d.ts +3 -2
  154. package/lib/components/tables/renderer/table-more-menu/table-more-menu-popup/table-more-menu-popup.component.d.ts +2 -5
  155. package/lib/components/tables/renderer/table-more-menu/table-more-menu.component.d.ts +1 -2
  156. package/lib/components/tables/table/table-model.d.ts +4 -4
  157. package/lib/components/tables/table/table.component.d.ts +10 -14
  158. package/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.d.ts +1 -1
  159. package/lib/components/tables/tree-table/tree-label-column-model.d.ts +2 -3
  160. package/lib/components/tables/tree-table/tree-table-component.d.ts +0 -3
  161. package/lib/components/tables/tree-table/tree-table-model.d.ts +5 -4
  162. package/lib/directives/command.directive.d.ts +4 -6
  163. package/lib/directives/exports.d.ts +0 -1
  164. package/lib/interaction/activity.d.ts +3 -9
  165. package/lib/interaction/components/abstract-confirm-dialog.component.d.ts +0 -1
  166. package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +5 -10
  167. package/lib/interaction/components/activity-container/activity-container.component.d.ts +3 -7
  168. package/lib/interaction/components/activity-title/activity-title.component.d.ts +1 -1
  169. package/lib/interaction/components/editors/edit-context.d.ts +1 -1
  170. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +3 -5
  171. package/lib/interaction/exports.d.ts +0 -2
  172. package/lib/interaction/interaction-context.d.ts +0 -2
  173. package/lib/interaction/interaction.module.d.ts +28 -28
  174. package/lib/place/components/place-outlet/place-outlet.component.d.ts +4 -3
  175. package/lib/place/place-auth-service.d.ts +4 -4
  176. package/lib/place/place-component.d.ts +5 -7
  177. package/lib/place/place-definition.d.ts +0 -2
  178. package/lib/place/place-router.d.ts +2 -6
  179. package/lib/place/place.module.d.ts +5 -4
  180. package/package.json +4 -6
  181. package/assets/draw.scss +0 -20
  182. package/assets/layout.scss +0 -3
  183. package/esm2022/lib/components/commands/button-renderer/button-renderer.component.mjs +0 -115
  184. package/esm2022/lib/components/file/file-download/file-download.component.mjs +0 -78
  185. package/esm2022/lib/components/forms/form-field.mjs +0 -2
  186. package/esm2022/lib/components/forms/search-input/search-input.component.mjs +0 -33
  187. package/esm2022/lib/components/loadable-component.mjs +0 -49
  188. package/esm2022/lib/components/tables/column/column-manager.mjs +0 -81
  189. package/esm2022/lib/components/tables/column/column-order-manager.mjs +0 -19
  190. package/esm2022/lib/components/tables/footer/footer-row-model.mjs +0 -38
  191. package/esm2022/lib/components/tables/renderer/abstract-cell-renderer.mjs +0 -7
  192. package/esm2022/lib/components/tables/renderer/table-footer-row/table-footer-row.component.mjs +0 -30
  193. package/esm2022/lib/directives/resize-observer.directive.mjs +0 -40
  194. package/esm2022/lib/interaction/components/slide-down-interaction-context/slide-down-interaction-context.component.mjs +0 -134
  195. package/esm2022/lib/interaction/interaction-context-provider.mjs +0 -3
  196. package/lib/components/commands/button-renderer/button-renderer.component.d.ts +0 -30
  197. package/lib/components/file/file-download/file-download.component.d.ts +0 -43
  198. package/lib/components/forms/form-field.d.ts +0 -5
  199. package/lib/components/forms/search-input/search-input.component.d.ts +0 -10
  200. package/lib/components/loadable-component.d.ts +0 -17
  201. package/lib/components/tables/column/column-manager.d.ts +0 -19
  202. package/lib/components/tables/column/column-order-manager.d.ts +0 -20
  203. package/lib/components/tables/footer/footer-row-model.d.ts +0 -22
  204. package/lib/components/tables/renderer/abstract-cell-renderer.d.ts +0 -6
  205. package/lib/components/tables/renderer/table-footer-row/table-footer-row.component.d.ts +0 -11
  206. package/lib/directives/resize-observer.directive.d.ts +0 -16
  207. package/lib/interaction/components/slide-down-interaction-context/slide-down-interaction-context.component.d.ts +0 -53
  208. package/lib/interaction/interaction-context-provider.d.ts +0 -6
@@ -4,10 +4,9 @@ import { AbstractValueInputComponent } from '../abstract-value-input.component';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * Using templates:
7
- * <aup-select-input [value$]="myModel" [options]="myOptions">
7
+ * <aup-select-input [valueModel]="myModel" [options]="myOptions">
8
8
  * <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
9
- * <ng-template #selectedOptionTemplate let-option>{{option.thePropertyYouWant}} note, not used for nils (the placeholder is used)</ng-template>
10
- * <ng-template #nilOptionTemplate>Uses the placeholder by default but you can customise it</ng-template>
9
+ * <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
11
10
  * </aup-select_input>
12
11
  */
13
12
  export declare class SelectInputComponent<T = any> extends AbstractValueInputComponent<T> implements OnInit {
@@ -28,5 +27,5 @@ export declare class SelectInputComponent<T = any> extends AbstractValueInputCom
28
27
  select(item: T): void;
29
28
  ngOnInit(): void;
30
29
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectInputComponent<any>, never>;
31
- static ɵcmp: i0.ɵɵComponentDeclaration<SelectInputComponent<any>, "aup-select-input", never, { "options$": { "alias": "options$"; "required": false; }; "options": { "alias": "options"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "allowNil": { "alias": "allowNil"; "required": false; }; "optionLabelFormat": { "alias": "optionLabelFormat"; "required": false; }; }, {}, ["selectedOptionTemplateRef", "optionTemplateRef", "nilOptionTemplateRef"], ["[select-option-footer]"], false, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectInputComponent<any>, "aup-select-input", never, { "options$": { "alias": "options$"; "required": false; }; "options": { "alias": "options"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "allowNil": { "alias": "allowNil"; "required": false; }; "optionLabelFormat": { "alias": "optionLabelFormat"; "required": false; }; }, {}, ["selectedOptionTemplateRef", "optionTemplateRef", "nilOptionTemplateRef"], never, false, never>;
32
31
  }
@@ -1,4 +1,3 @@
1
- import { ElementRef } from '@angular/core';
2
1
  import { Command, ValueModel } from '@coolon/pectin';
3
2
  import { AbstractValueInputComponent } from '../abstract-value-input.component';
4
3
  import * as i0 from "@angular/core";
@@ -7,12 +6,8 @@ export declare class StringInputComponent extends AbstractValueInputComponent<st
7
6
  accessor enableClear$: ValueModel<boolean>;
8
7
  accessor enableClear: boolean;
9
8
  iconPrefix: string;
10
- accessor suffixCommand: Command;
11
9
  readonly clearCommand: Command<void>;
12
- readonly elementRef: ElementRef<any>;
13
10
  constructor();
14
- get hasSuffixCommand(): boolean;
15
- select(): void;
16
11
  static ɵfac: i0.ɵɵFactoryDeclaration<StringInputComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<StringInputComponent, "aup-string-input", never, { "autocomplete": { "alias": "autocomplete"; "required": false; }; "enableClear$": { "alias": "enableClear$"; "required": false; }; "enableClear": { "alias": "enableClear"; "required": false; }; "iconPrefix": { "alias": "iconPrefix"; "required": false; }; "suffixCommand": { "alias": "suffixCommand"; "required": false; }; }, {}, never, never, false, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<StringInputComponent, "aup-string-input", never, { "autocomplete": { "alias": "autocomplete"; "required": false; }; "enableClear$": { "alias": "enableClear$"; "required": false; }; "enableClear": { "alias": "enableClear"; "required": false; }; "iconPrefix": { "alias": "iconPrefix"; "required": false; }; }, {}, never, never, false, never>;
18
13
  }
@@ -1,12 +1,9 @@
1
- import { ElementRef } from '@angular/core';
2
1
  import { AbstractValueInputComponent } from '../abstract-value-input.component';
3
2
  import * as i0 from "@angular/core";
4
3
  export declare class TextInputComponent extends AbstractValueInputComponent<string> {
5
4
  rows: number;
6
5
  cols: number;
7
- readonly elementRef: ElementRef<any>;
8
6
  constructor();
9
- select(): void;
10
7
  static ɵfac: i0.ɵɵFactoryDeclaration<TextInputComponent, never>;
11
8
  static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "aup-text-input", never, { "rows": { "alias": "rows"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; }, {}, never, never, false, never>;
12
9
  }
@@ -1,13 +1,14 @@
1
1
  import { AfterViewInit, ElementRef, NgZone } from '@angular/core';
2
- import { GarbageCollector, ValueModel } from '@coolon/pectin';
2
+ import { ValueModel } from '@coolon/pectin';
3
3
  import { DisposableComponent } from './disposable-component';
4
4
  import { Bounds } from './types/bounds.class';
5
5
  import { Point } from './types/point.class';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class ResizeAwareComponent extends DisposableComponent implements AfterViewInit {
8
- protected readonly elementRef: ElementRef<any>;
8
+ protected readonly elementRef: ElementRef;
9
9
  protected readonly ngZone: NgZone;
10
- protected boundsTracker: ResizeAwareComponent.ResizeTracker;
10
+ private _bounds$;
11
+ constructor(elementRef: ElementRef, ngZone: NgZone);
11
12
  ngAfterViewInit(): void;
12
13
  get bounds$(): ValueModel<Bounds>;
13
14
  get nativeElement(): any;
@@ -16,29 +17,9 @@ export declare class ResizeAwareComponent extends DisposableComponent implements
16
17
  y: number;
17
18
  } | MouseEvent): Point;
18
19
  get bounds(): Bounds;
20
+ private _updateBounds;
19
21
  static ɵfac: i0.ɵɵFactoryDeclaration<ResizeAwareComponent, never>;
20
22
  static ɵdir: i0.ɵɵDirectiveDeclaration<ResizeAwareComponent, never, never, {}, {}, never, never, false, never>;
21
23
  }
22
24
  export declare namespace ResizeAwareComponent {
23
- class ResizeTracker extends GarbageCollector {
24
- protected readonly elementRef: ElementRef;
25
- protected readonly ngZone: NgZone;
26
- private _bounds$;
27
- readonly width$: ValueModel<number>;
28
- readonly height$: ValueModel<number>;
29
- readonly top$: ValueModel<number>;
30
- readonly left$: ValueModel<number>;
31
- readonly bottom$: ValueModel<number>;
32
- readonly right$: ValueModel<number>;
33
- constructor(elementRef: ElementRef, ngZone: NgZone);
34
- notifyViewReady(): void;
35
- get bounds$(): ValueModel<Bounds>;
36
- get nativeElement(): any;
37
- relativePositionOf(point: {
38
- x: number;
39
- y: number;
40
- } | MouseEvent): Point;
41
- get bounds(): Bounds;
42
- private _updateBounds;
43
- }
44
25
  }
@@ -1,4 +1,4 @@
1
- import { AfterContentInit, QueryList, TemplateRef } from '@angular/core';
1
+ import { AfterContentInit, ChangeDetectorRef, QueryList, TemplateRef } from '@angular/core';
2
2
  import { ValueModel } from '@coolon/pectin';
3
3
  import { DisposableComponent } from '../disposable-component';
4
4
  import * as i0 from "@angular/core";
@@ -32,11 +32,12 @@ export declare class SwitchCaseDefaultDirective<T> extends SwitchCaseOption<T> {
32
32
  * </aup-switch-case>
33
33
  */
34
34
  export declare class SwitchCaseComponent<T> extends DisposableComponent implements AfterContentInit {
35
+ private cdr;
35
36
  accessor switch$: ValueModel<T>;
36
37
  accessor switch: T;
37
38
  switchCaseOptions: QueryList<SwitchCaseOption<T>>;
38
39
  selectedIndex: number;
39
- constructor();
40
+ constructor(cdr: ChangeDetectorRef);
40
41
  ngAfterContentInit(): void;
41
42
  private updateSelection;
42
43
  static ɵfac: i0.ɵɵFactoryDeclaration<SwitchCaseComponent<any>, never>;
@@ -1,9 +1,7 @@
1
1
  import { ComponentType } from "@angular/cdk/overlay";
2
2
  import { Injector } from "@angular/core";
3
- import { BooleanValueModelChain, Command, Constructable, DelegatingListModel, DependsOnOptions, DirtyTrackingForm, Disposable, GarbageCollector, HasValue, ListModel, SelectionModel, Types, ValueModel, ValueModelChain } from "@coolon/pectin";
4
- import { ColumnManager } from "./column/column-manager";
3
+ import { BooleanValueModelChain, Command, Constructable, DelegatingListModel, DirtyTrackingForm, Disposable, GarbageCollector, ListModel, SelectionModel, Types, ValueModel, ValueModelChain } from "@coolon/pectin";
5
4
  import { CellRendererOptions, ColumnModel, OnComponentInit } from "./column/column-model";
6
- import { ColumnOrderManager } from "./column/column-order-manager";
7
5
  import { ColumnTextProperties } from "./column/column-text-properties";
8
6
  import { CustomTemplateColumnModel } from "./column/custom-template-column-model";
9
7
  import { CustomValueColumnModel } from "./column/custom-value-column-model";
@@ -13,24 +11,22 @@ import { PropertyColumnModel } from "./column/property-column-model";
13
11
  import { SelectionColumnModel } from "./column/selection-column-model";
14
12
  import { EditSession } from "./editor/edit-session";
15
13
  import { TextSearchPredicate } from "./filter/text-search-predicate";
16
- import { FooterRowModel } from "./footer/footer-row-model";
17
14
  import { CellRenderer } from "./renderer/cell-renderer";
18
15
  import { TableMoreMenuPopupComponent } from "./renderer/table-more-menu/table-more-menu-popup/table-more-menu-popup.component";
19
- export declare abstract class AbstractTableModel<Row extends object> extends GarbageCollector {
16
+ export declare abstract class AbstractTableModel<Row> extends GarbageCollector {
20
17
  protected readonly _dataSource$: DelegatingListModel<Row>;
21
18
  protected readonly _filteredRows$: DelegatingListModel<Row>;
22
19
  protected readonly _visibleRows$: DelegatingListModel<Row>;
23
- protected readonly columnManager: ColumnManager<Row>;
20
+ private readonly _columnList;
24
21
  private _editorSessions;
25
22
  private readonly _rowsBeingEdited$;
26
23
  private saveCommandFactory;
27
24
  private _editorSessionByRowId;
28
25
  private readonly rowClassNamePredicates;
29
- private readonly rowAttributeGenerators;
30
26
  private _columnTextPropertiesLookup;
31
27
  readonly editing$: BooleanValueModelChain;
32
28
  readonly firstEditableColumn$: ValueModelChain<ColumnModel<Row>>;
33
- readonly selectionColumnModel: SelectionColumnModel<Row>;
29
+ private selectionColumnModel;
34
30
  private rowSelectionDisabledOnAllColumns$;
35
31
  private readonly rowClickListeners;
36
32
  readonly firstVisibleColumn$: ValueModel<ColumnModel<Row>>;
@@ -39,11 +35,10 @@ export declare abstract class AbstractTableModel<Row extends object> extends Gar
39
35
  readonly textSearchPredicate$: ValueModel<TextSearchPredicate<Row>>;
40
36
  protected identityOf: (item: Row) => any;
41
37
  readonly dataSourceEmpty$: ValueModel<boolean>;
38
+ private readonly selectionModelProxy;
42
39
  readonly selectedItems$: ListModel<Row>;
43
40
  readonly leadSelection$: ValueModel<Row>;
44
41
  readonly hasSelection$: BooleanValueModelChain;
45
- footerRowModel: FooterRowModel.Impl<any>;
46
- private readonly _viewDependencies;
47
42
  constructor();
48
43
  protected setDataSource(dataSource$: any): void;
49
44
  /**
@@ -53,16 +48,6 @@ export declare abstract class AbstractTableModel<Row extends object> extends Gar
53
48
  * @param rest
54
49
  */
55
50
  initialise(injector: Injector, identityOf: (item: Row) => any): void;
56
- /**
57
- * Adds additional models that will trigger a table repaint. This is required if the table
58
- * needs to be redrawn outside of changes to the rows of filters. i.e. some eternal state is used
59
- * to assign row classes etc.
60
- *
61
- * Note: This function must be called before the table is bound to the model.
62
- * @param hasValues
63
- */
64
- viewStateDependsOn(...hasValues: ReadonlyArray<HasValue<any>>): void;
65
- get viewStateDependencies(): ReadonlyArray<HasValue<any>>;
66
51
  get dataSource$(): ListModel<Row>;
67
52
  /**
68
53
  * Gets the rows that are visible after any filters are applied. If there are
@@ -78,27 +63,24 @@ export declare abstract class AbstractTableModel<Row extends object> extends Gar
78
63
  startEditSession(row: Row): EditSession<Row>;
79
64
  getEditSessionFor(row: Row): EditSession<Row>;
80
65
  cancelAllEditorSessions(): void;
81
- get columns$(): ListModel<ColumnModel<Row>>;
82
- get visibleColumns$(): ListModel<ColumnModel<Row>>;
66
+ get columns(): ListModel<ColumnModel<Row>>;
67
+ get visibleColumns(): ListModel<ColumnModel<Row>>;
83
68
  pluck<P extends Types.ValuePropertiesOf<Row>>(property: P, options?: {
84
69
  columnId: string;
85
70
  }): PropertyColumnModel<Row, P>;
86
71
  pluckList<P extends Types.ArrayPropertiesOf<Row>>(property: P, options?: {
87
72
  columnId: string;
88
73
  }): ListPropertyColumnModel<Row, P>;
89
- useSelectionModel(selectionModel?: SelectionModel<Row>): void;
74
+ protected _addSelectionColumn(selectionModel?: SelectionModel<Row>, visible?: ValueModel<boolean> | boolean): SelectionColumnModel<Row>;
90
75
  addEditControls(saveCommandFactory: Command.Factory<DirtyTrackingForm<Row>, boolean | Promise<boolean>>, formFactory?: (row: Row) => DirtyTrackingForm<Row>): EditorControlColumnModel<Row>;
91
76
  addCustomColumn<V>(columnId: string, dataAccessor: (row: Row) => V): CustomValueColumnModel<Row, V>;
92
77
  addComponentColumn<C extends CellRenderer<Partial<Row>>>(columnId: string, component: ComponentType<C>, onInit?: OnComponentInit<C>): CustomValueColumnModel<Row, Row>;
93
78
  addComponentColumn<C extends CellRenderer<Partial<Row>>>(columnId: string, component: ComponentType<C>, options?: CellRendererOptions<Row, C>): CustomValueColumnModel<Row, Row>;
94
- addMoreMenu<C extends TableMoreMenuPopupComponent<Row>>(componentClass: Constructable<C>, initialiseCallback?: (component: C) => void): CustomValueColumnModel<Row, Row>;
95
- addFooterRow<C>(component: ComponentType<C>, initialiseCallback?: (component: C) => void): FooterRowModel<C>;
79
+ addMoreMenu(componentClass: Constructable<TableMoreMenuPopupComponent<Row>>): CustomValueColumnModel<Row, Row>;
96
80
  addTemplateColumn<V>(columnId: string): CustomTemplateColumnModel<Row>;
97
- addRowClass(className: string, predicate: (row: Row) => boolean, options?: DependsOnOptions): void;
98
- addRowAttribute(attributeName: string, getValue: (row: Row) => string): void;
81
+ addRowClass(className: string, predicate: (row: Row) => boolean): void;
99
82
  getRowClasses(row: Row): string[];
100
- getRowAttributes(row: Row): Record<string, string>;
101
- protected addColumn<C extends ColumnModel<Row>>(column: C, position?: ColumnOrderManager.Position): C;
83
+ protected addColumn<C extends ColumnModel<Row>>(column: C, index?: number): C;
102
84
  columnTextProperties(columnTextProperties: {
103
85
  [columnName: string]: ColumnTextProperties;
104
86
  }): void;
@@ -63,7 +63,7 @@ import * as i0 from "@angular/core";
63
63
  * }
64
64
  * }
65
65
  */
66
- export declare class AbstractTableComponent<Row extends object> extends DisposableComponent implements OnInit {
66
+ export declare class AbstractTableComponent<Row> extends DisposableComponent implements OnInit {
67
67
  readonly injector: Injector;
68
68
  accessor showHeader$: ValueModel<boolean>;
69
69
  accessor showHeader: boolean;
@@ -72,8 +72,7 @@ export declare class AbstractTableComponent<Row extends object> extends Disposab
72
72
  * need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
73
73
  * containment area.
74
74
  */
75
- accessor enableScrolling$: ValueModel<boolean>;
76
- accessor enableScrolling: boolean;
75
+ enableScrolling: boolean;
77
76
  columns: ListModelChain<ColumnModel<Row>>;
78
77
  columnIds: ListModelChain<string>;
79
78
  private columnsById;
@@ -92,5 +91,5 @@ export declare class AbstractTableComponent<Row extends object> extends Disposab
92
91
  protected getModel(): AbstractTableModel<Row>;
93
92
  registerColumnTemplate(columnId: string, templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean): void;
94
93
  static ɵfac: i0.ɵɵFactoryDeclaration<AbstractTableComponent<any>, never>;
95
- static ɵcmp: i0.ɵɵComponentDeclaration<AbstractTableComponent<any>, "aup-abstract-table", never, { "showHeader$": { "alias": "showHeader$"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "enableScrolling$": { "alias": "enableScrolling$"; "required": false; }; "enableScrolling": { "alias": "enableScrolling"; "required": false; }; }, {}, never, never, false, never>;
94
+ static ɵcmp: i0.ɵɵComponentDeclaration<AbstractTableComponent<any>, "aup-abstract-table", never, { "showHeader$": { "alias": "showHeader$"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "enableScrolling": { "alias": "enableScrolling"; "required": false; }; }, {}, never, never, false, never>;
96
95
  }
@@ -0,0 +1,13 @@
1
+ import { AbstractComputedListModel, ListModel } from '@coolon/pectin';
2
+ import { ColumnModel } from './column-model';
3
+ export declare class ColumnListModel<Row> extends AbstractComputedListModel<ColumnModel<Row>, boolean> {
4
+ private readonly _allColumns$;
5
+ private readonly columnsById$;
6
+ constructor();
7
+ get allColumns$(): ListModel<ColumnModel<Row>>;
8
+ getColumn(id: string): ColumnModel<Row>;
9
+ hasColumn(id: string): boolean;
10
+ hasMatchingColumn(row: Row, regex: RegExp): boolean;
11
+ addColumn<C extends ColumnModel<Row>>(column: C, index?: number): C;
12
+ doComputeValue(): ColumnModel<Row>[];
13
+ }
@@ -7,9 +7,8 @@ import { ColumnTextSearchFormatter } from "../filter/column-text-search-formatte
7
7
  import { CellEditorPortalRef, CellHeaderPortalRef, CellRendererPortalRef } from "../renderer/cell-portal-ref";
8
8
  import { TableCellComponent } from "../renderer/table-cell/table-cell.component";
9
9
  import { TableHeaderCellComponent } from "../renderer/table-header-cell/table-header-cell.component";
10
- import { ColumnOrderManager } from "./column-order-manager";
11
10
  import { ColumnTextProperties } from "./column-text-properties";
12
- export interface RowData<Row extends object> {
11
+ export interface RowData<Row> {
13
12
  row: Row;
14
13
  editSession?: EditSession<Row>;
15
14
  editRowCommand: Command<void>;
@@ -22,9 +21,8 @@ export interface CellRendererOptions<Row, E> {
22
21
  export interface MutableCellRendererOptions<Row, E, P extends keyof Row> extends CellRendererOptions<Row, E> {
23
22
  onValueEdit: (row: Row, is: Row[P], was: Row[P]) => void;
24
23
  }
25
- export declare class ColumnModel<Row extends object> extends GarbageCollector {
24
+ export declare class ColumnModel<Row> extends GarbageCollector {
26
25
  readonly columnId: string;
27
- private readonly order;
28
26
  private textPropertiesProvider;
29
27
  private _columnTextProperties;
30
28
  private _columnHeaderPortalRef;
@@ -38,7 +36,7 @@ export declare class ColumnModel<Row extends object> extends GarbageCollector {
38
36
  readonly dasherisedColumnId: string;
39
37
  private readonly textSearchDelegate;
40
38
  readonly visible$: ValueModel<boolean>;
41
- constructor(columnId: string, order: ColumnOrderManager, textPropertiesProvider: ColumnModel.TextPropertiesProvider);
39
+ constructor(columnId: string, textPropertiesProvider: ColumnModel.TextPropertiesProvider);
42
40
  protected installHeaderRenderer(): void;
43
41
  getHeaderText(): string;
44
42
  isVisible(): boolean;
@@ -53,8 +51,6 @@ export declare class ColumnModel<Row extends object> extends GarbageCollector {
53
51
  */
54
52
  textProperties(columnTextProperties: ColumnTextProperties): this;
55
53
  columnTextProperties(columnTextProperties: ColumnTextProperties): this;
56
- positionAfter(column: ColumnModel<any>): this;
57
- positionBefore(column: ColumnModel<any>): this;
58
54
  getSearchTextFor(row: Row): string;
59
55
  configureColumnTextSearch(formatter: ColumnTextSearchFormatter<Row>): this;
60
56
  configureColumnTextSearch<T>(formatter: ColumnTextSearchFormatter<T>, mapper: (row: Row) => T): this;
@@ -1,9 +1,8 @@
1
1
  import { TemplateRef, ViewContainerRef } from "@angular/core";
2
2
  import { ColumnModel } from "./column-model";
3
- import { ColumnOrderManager } from "./column-order-manager";
4
- export declare class CustomTemplateColumnModel<Row extends object> extends ColumnModel<Row> {
3
+ export declare class CustomTemplateColumnModel<Row> extends ColumnModel<Row> {
5
4
  private readonly config;
6
- constructor(columnId: string, order: ColumnOrderManager, defaults: ColumnModel.TextPropertiesProvider);
5
+ constructor(columnId: string, defaults: ColumnModel.TextPropertiesProvider);
7
6
  setTemplate(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean): void;
8
7
  selectRowOnClick(selectOnRowClick: boolean): this;
9
8
  }
@@ -1,9 +1,8 @@
1
1
  import { ComponentType } from "@angular/cdk/overlay";
2
2
  import { CellRendererOptions, ColumnModel, OnComponentInit } from "./column-model";
3
- import { ColumnOrderManager } from "./column-order-manager";
4
- export declare class CustomValueColumnModel<Row extends object, V> extends ColumnModel<Row> {
3
+ export declare class CustomValueColumnModel<Row, V> extends ColumnModel<Row> {
5
4
  private getValue;
6
- constructor(columnId: string, order: ColumnOrderManager, defaults: ColumnModel.TextPropertiesProvider, getValue: (row: Row) => V);
5
+ constructor(columnId: string, defaults: ColumnModel.TextPropertiesProvider, getValue: (row: Row) => V);
7
6
  cellRenderer<C extends {
8
7
  value: Partial<V>;
9
8
  }>(componentType: ComponentType<C>, onComponentInitOrOptions?: CellRendererOptions<Row, C> | OnComponentInit<C>): this;
@@ -2,9 +2,8 @@ import { ComponentType } from "@angular/cdk/overlay";
2
2
  import { Command, DirtyTrackingForm } from "@coolon/pectin";
3
3
  import { EditSession } from "../editor/edit-session";
4
4
  import { ColumnModel } from "./column-model";
5
- import { ColumnOrderManager } from "./column-order-manager";
6
- export declare class EditorControlColumnModel<Row extends object> extends ColumnModel<Row> {
7
- constructor(columnId: string, order: ColumnOrderManager, saveCommandFactory: Command.Factory<DirtyTrackingForm<Row>, boolean | Promise<boolean>>, defaults: ColumnModel.TextPropertiesProvider);
5
+ export declare class EditorControlColumnModel<Row> extends ColumnModel<Row> {
6
+ constructor(columnId: string, saveCommandFactory: Command.Factory<DirtyTrackingForm<Row>, boolean | Promise<boolean>>, defaults: ColumnModel.TextPropertiesProvider);
8
7
  cellRenderer(componentType: ComponentType<{
9
8
  row: Row;
10
9
  editSession: EditSession<Row>;
@@ -3,12 +3,11 @@ import { Types, Validator } from "@coolon/pectin";
3
3
  import { CellListEditorComponent } from "../renderer/cell-editors";
4
4
  import { CellRenderer } from "../renderer/cell-renderer";
5
5
  import { ColumnModel } from "./column-model";
6
- import { ColumnOrderManager } from "./column-order-manager";
7
- export declare class ListPropertyColumnModel<Row extends object, P extends Types.ArrayPropertiesOf<Row>> extends ColumnModel<Row> {
6
+ export declare class ListPropertyColumnModel<Row, P extends Types.ArrayPropertiesOf<Row>> extends ColumnModel<Row> {
8
7
  readonly property: P;
9
8
  private _userFormat;
10
9
  private _defaultSearchTextFormat;
11
- constructor(id: string, order: ColumnOrderManager, property: P, defaults: ColumnModel.TextPropertiesProvider);
10
+ constructor(id: string, property: P, defaults: ColumnModel.TextPropertiesProvider);
12
11
  cellRenderer(componentType: ComponentType<CellRenderer<Types.ArrayElementType<Row, P>[]>>): Omit<this, "format">;
13
12
  cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validators?: Validator<Types.ArrayElementType<Row, P>[]>[], initialiseComponent?: (component: C) => void): this;
14
13
  cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, initialiseComponent?: (component: C) => void): this;
@@ -4,12 +4,11 @@ import { EditableCellRenderer } from "../editor/editable-cell-renderer";
4
4
  import { CellEditorComponent } from "../renderer/cell-editors";
5
5
  import { CellRenderer } from "../renderer/cell-renderer";
6
6
  import { CellRendererOptions, ColumnModel, MutableCellRendererOptions, OnComponentInit } from "./column-model";
7
- import { ColumnOrderManager } from "./column-order-manager";
8
- export declare class PropertyColumnModel<Row extends object, P extends Types.ValuePropertiesOf<Row>> extends ColumnModel<Row> {
7
+ export declare class PropertyColumnModel<Row, P extends Types.ValuePropertiesOf<Row>> extends ColumnModel<Row> {
9
8
  readonly property: P;
10
9
  private _userFormat;
11
10
  private _defaultSearchTextFormatter;
12
- constructor(id: string, order: ColumnOrderManager, property: P, defaults: ColumnModel.TextPropertiesProvider);
11
+ constructor(id: string, property: P, defaults: ColumnModel.TextPropertiesProvider);
13
12
  cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, options?: CellRendererOptions<Row, E>): Omit<this, "format">;
14
13
  cellRenderer<E extends CellRenderer<Row[P]>>(componentType: ComponentType<E>, onComponentInit?: OnComponentInit<E>): Omit<this, "format">;
15
14
  liveEditCellRenderer<E extends EditableCellRenderer<Row[P]>>(componentType: ComponentType<E>, options: MutableCellRendererOptions<Row, E, P>): this;
@@ -1,16 +1,11 @@
1
1
  import { ThemePalette } from "@angular/material/core";
2
- import { GarbageCollector, SelectionModel } from "@coolon/pectin";
2
+ import { Proxified, SelectionModel } from "@coolon/pectin";
3
3
  import { ColumnModel } from "./column-model";
4
- import { ColumnOrderManager } from "./column-order-manager";
5
- export declare class SelectionColumnModel<Row extends object> extends ColumnModel<Row> {
4
+ export declare class SelectionColumnModel<Row> extends ColumnModel<Row> {
5
+ readonly selectionModel: Proxified<SelectionModel<Row>>;
6
6
  private _enableHeaderControls;
7
7
  private _color;
8
- private readonly _selectionModelProxy;
9
- private _isUsingTemporarySelection$;
10
- private _userSelectionModel;
11
- constructor(columnId: string, order: ColumnOrderManager, defaults: ColumnModel.TextPropertiesProvider);
12
- get selectionModel(): SelectionModel<Row>;
13
- get isUsingTemporarySelectionModel$(): import("@coolon/pectin").ValueModel<boolean>;
8
+ constructor(columnId: string, defaults: ColumnModel.TextPropertiesProvider, selectionModel: Proxified<SelectionModel<Row>>);
14
9
  useSelectionModel(selectionModel: SelectionModel<Row>): void;
15
10
  protected getDefaultHeaderText(): string;
16
11
  enableHeaderControls(enable: boolean): this;
@@ -20,5 +15,4 @@ export declare class SelectionColumnModel<Row extends object> extends ColumnMode
20
15
  color(color: ThemePalette): void;
21
16
  selectRow(row: Row): void;
22
17
  isSelected(row: Row): boolean;
23
- withTemporarySelectionModel<S extends SelectionModel<Row>>(createSelectionModel: (garbage: GarbageCollector) => S, process: (selectionModel: S) => Promise<void>): Promise<void>;
24
18
  }
@@ -2,7 +2,7 @@ import { Command, DirtyTrackingForm } from '@coolon/pectin';
2
2
  import { DisposableComponent } from '../../../disposable-component';
3
3
  import { EditSession } from '../edit-session';
4
4
  import * as i0 from "@angular/core";
5
- export declare class EditRowControlsComponent<Row extends object> extends DisposableComponent {
5
+ export declare class EditRowControlsComponent<Row> extends DisposableComponent {
6
6
  row: Row;
7
7
  accessor editRowCommand: Command<void>;
8
8
  private _session;
@@ -1,5 +1,5 @@
1
1
  import { Command, DirtyTrackingForm, GarbageCollector } from '@coolon/pectin';
2
- export declare class EditSession<Row extends object> extends GarbageCollector {
2
+ export declare class EditSession<Row> extends GarbageCollector {
3
3
  readonly rowId: any;
4
4
  readonly form: DirtyTrackingForm<Row>;
5
5
  readonly saveCommand: Command<boolean | Promise<boolean>>;
@@ -1,10 +1 @@
1
- import { AbstractConstructable } from "@coolon/restilence-plugin";
2
1
  export type TextSearchPredicate<Row> = (row: Row, regex: RegExp) => boolean;
3
- export declare class TextSearchContext<Row> {
4
- readonly row: Row;
5
- readonly searchText: string;
6
- readonly searchRegex: RegExp;
7
- constructor(row: Row, searchText: string, searchRegex: RegExp);
8
- getOrCreate<T>(type: AbstractConstructable<T>, create: () => T): void;
9
- matchesText(text: string): boolean;
10
- }
@@ -1,60 +1,52 @@
1
1
  import { ComponentType } from '@angular/cdk/overlay';
2
- import { Host, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { TemplateRef, ViewContainerRef } from '@angular/core';
3
3
  import { ColumnModel, RowData } from '../column/column-model';
4
4
  import { EditSession } from '../editor/edit-session';
5
5
  import { TableCellComponent } from './table-cell/table-cell.component';
6
6
  import { TableHeaderCellComponent } from './table-header-cell/table-header-cell.component';
7
7
  export declare const HEADER_CELL_RENDERER_PORTAL: unique symbol;
8
- export declare const FOOTER_CELL_RENDERER_PORTAL: unique symbol;
9
8
  export declare const CELL_RENDERER_PORTAL: unique symbol;
10
9
  export declare const CELL_EDITOR_PORTAL: unique symbol;
11
10
  export declare const PORTAL_RENDERER_COMPONENT: unique symbol;
12
11
  export declare const PORTAL_EDITOR_COMPONENT: unique symbol;
13
- export declare abstract class CellPortalRef<Row extends object, Host, Portal> {
14
- abstract initialiseHost(host: Host): void;
12
+ export declare abstract class CellPortalRef<Row, Host, Portal> {
13
+ abstract initialiseHost(host: Host, columnModel: ColumnModel<Row>): void;
15
14
  abstract onPortalAttached(host: Host, portalComponent: Portal): void;
16
15
  }
17
- export declare class CellHeaderPortalRef<Row extends object, C> extends CellPortalRef<Row, TableHeaderCellComponent, C> {
16
+ export declare class CellHeaderPortalRef<Row, C> extends CellPortalRef<Row, TableHeaderCellComponent, C> {
18
17
  readonly componentType: ComponentType<C>;
19
18
  readonly initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void;
20
19
  constructor(componentType: ComponentType<C>, initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void);
21
- initialiseHost(host: Host): void;
20
+ initialiseHost(host: TableHeaderCellComponent, columnModel: ColumnModel<Row>): void;
22
21
  onPortalAttached(host: TableHeaderCellComponent, portalComponent: C): void;
23
22
  }
24
- export declare abstract class CellRendererPortalRef<Row extends object, Portal> extends CellPortalRef<Row, TableCellComponent<Row>, Portal> {
23
+ export declare abstract class CellRendererPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellComponent<Row>, Portal> {
25
24
  abstract pushState(host: TableCellComponent<Row>): void;
26
25
  }
27
- export declare class ComponentCellRendererPortalRef<Row extends object, Portal> extends CellRendererPortalRef<Row, Portal> {
26
+ export declare class ComponentCellRendererPortalRef<Row, Portal> extends CellRendererPortalRef<Row, Portal> {
28
27
  readonly componentType: ComponentType<Portal>;
29
28
  readonly updateComponent: (component: Portal, rowData: RowData<Row>, firstTime: boolean) => void;
30
29
  constructor(componentType: ComponentType<Portal>, updateComponent: (component: Portal, rowData: RowData<Row>, firstTime: boolean) => void);
31
- initialiseHost(host: Host): void;
30
+ initialiseHost(host: TableCellComponent<Row>, columnModel: ColumnModel<Row>): void;
32
31
  onPortalAttached(host: TableCellComponent<Row>, portalComponent: Portal): void;
33
32
  pushState(host: TableCellComponent<Row>): void;
34
33
  }
35
- export declare class CellEditorPortalRef<Row extends object, Portal> extends CellPortalRef<Row, TableCellComponent<Row>, Portal> {
34
+ export declare class CellEditorPortalRef<Row, Portal> extends CellPortalRef<Row, TableCellComponent<Row>, Portal> {
36
35
  readonly componentType: ComponentType<Portal>;
37
36
  readonly initialiseEditorSession: (component: Portal, editSession: EditSession<Row>) => void;
38
37
  constructor(componentType: ComponentType<Portal>, initialiseEditorSession: (component: Portal, editSession: EditSession<Row>) => void);
39
- initialiseHost(host: Host): void;
38
+ initialiseHost(host: TableCellComponent<Row>, columnModel: ColumnModel<Row>): void;
40
39
  onPortalAttached(host: TableCellComponent<Row>, portalComponent: Portal): void;
41
40
  }
42
- export declare class TemplateCellRendererPortalRef<Row extends object> extends CellRendererPortalRef<Row, undefined> {
41
+ export declare class TemplateCellRendererPortalRef<Row> extends CellRendererPortalRef<Row, undefined> {
43
42
  private templateRef;
44
43
  private viewContainer;
45
44
  private fillCell;
46
45
  private padChild;
47
46
  constructor();
48
47
  registerPortal(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean): void;
49
- initialiseHost(host: Host): void;
48
+ initialiseHost(host: TableCellComponent<Row>, columnModel: ColumnModel<Row>): void;
50
49
  onPortalAttached(host: TableCellComponent<Row>, portalComponent: undefined): void;
51
50
  pushState(host: TableCellComponent<Row>): void;
52
51
  private createPortal;
53
52
  }
54
- export declare class CellFooterPortalRef<Row extends object, C> extends CellPortalRef<Row, TableHeaderCellComponent, C> {
55
- readonly componentType: ComponentType<C>;
56
- readonly initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void;
57
- constructor(componentType: ComponentType<C>, initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void);
58
- initialiseHost(host: Host): void;
59
- onPortalAttached(host: TableHeaderCellComponent, portalComponent: C): void;
60
- }
@@ -1,60 +1,36 @@
1
- import { CdkPortalOutletAttachedRef } from "@angular/cdk/portal";
2
- import { CdkVirtualScrollViewport } from "@angular/cdk/scrolling";
3
- import { AfterViewInit, ElementRef, InjectionToken, OnInit } from "@angular/core";
4
- import { ListModel, ListModelChain, MutableValueModel, Proxify, ValueModel } from "@coolon/pectin";
5
- import { TableVirtualScrollDataSource } from "ng-table-virtual-scroll";
1
+ import { ElementRef, EventEmitter, NgZone, OnInit } from "@angular/core";
2
+ import { ListModel, ListModelChain, ValueModel } from "@coolon/pectin";
6
3
  import { ResizeAwareComponent } from "../../../resize-aware.component";
7
4
  import { AbstractTableModel } from "../../abstract-table-model";
8
5
  import { ColumnModel } from "../../column/column-model";
9
- import { FooterRowModel } from "../../footer/footer-row-model";
10
6
  import * as i0 from "@angular/core";
11
- export declare const AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER: InjectionToken<number>;
12
- export declare class TableRowAttributesDirective implements OnInit {
13
- protected readonly elementRef: ElementRef<HTMLElement>;
14
- aupTableRowAttributes: Record<string, string>;
15
- constructor(elementRef: ElementRef<HTMLElement>);
16
- ngOnInit(): void;
17
- static ɵfac: i0.ɵɵFactoryDeclaration<TableRowAttributesDirective, never>;
18
- static ɵdir: i0.ɵɵDirectiveDeclaration<TableRowAttributesDirective, "[aupTableRowAttributes]", never, { "aupTableRowAttributes": { "alias": "aupTableRowAttributes"; "required": false; }; }, {}, never, never, false, never>;
19
- }
20
- export declare class TableBodyComponent<Row extends object> extends ResizeAwareComponent implements AfterViewInit {
21
- protected bufferMultiplier: number;
7
+ export declare class TableBodyComponent<Row> extends ResizeAwareComponent implements OnInit {
22
8
  accessor data$: ListModel<Row>;
23
9
  accessor tableModel: AbstractTableModel<Row>;
24
- accessor footerRow: FooterRowModel.Impl<any>;
25
10
  accessor showHeader$: ValueModel<boolean>;
26
11
  accessor showHeader: boolean;
12
+ readonly visibleRowCount: EventEmitter<number>;
27
13
  trackBy: (index: number, item: Row) => any;
28
- accessor scrollMode$: ValueModel<TableBodyComponent.ScrollMode>;
29
- accessor scrollMode: TableBodyComponent.ScrollMode;
30
- scrollViewport: CdkVirtualScrollViewport;
14
+ /**
15
+ * Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
16
+ * need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
17
+ * containment area.
18
+ */
19
+ enableScrolling: boolean;
31
20
  columns$: ListModelChain<ColumnModel<Row>>;
32
21
  columnIds$: ListModelChain<string>;
33
22
  private columnsById$;
34
- protected readonly headerHeight$: MutableValueModel<number>;
35
- protected rowHeight$: MutableValueModel<number>;
23
+ readonly _visibleRowCount$: ValueModel<number>;
24
+ private readonly headerHeight$;
25
+ private readonly rowHeight$;
36
26
  baseCssClass: string;
37
- protected virtualScrollDataSource: TableVirtualScrollDataSource<Row>;
38
- private virtualScrollActive$;
39
- private scrollTimeout;
40
- constructor(bufferMultiplier?: number);
41
- ngAfterViewInit(): void;
27
+ constructor(elementRef: ElementRef, ngZone: NgZone);
42
28
  get hideHeader(): boolean;
43
- get headerHeightCssVar(): string;
44
- get rowHeightCssVar(): string;
45
29
  isEditing(row: Row): boolean;
46
30
  notifyCellClicked(columnModel: ColumnModel<Row>, row: Row): void;
47
31
  isFirstVisibleColumn(columnId: string): boolean;
48
32
  isLastVisibleColumn(columnId: string): boolean;
49
33
  getColumnClasses(columnId: string): string[];
50
- private scheduleTableHeightCheck;
51
- private notifyScrolled;
52
- private clearScrollTimeout;
53
- initialiseFooter($event: CdkPortalOutletAttachedRef): void;
54
- protected readonly Proxify: typeof Proxify;
55
- static ɵfac: i0.ɵɵFactoryDeclaration<TableBodyComponent<any>, [{ optional: true; }]>;
56
- static ɵcmp: i0.ɵɵComponentDeclaration<TableBodyComponent<any>, "aup-table-body", never, { "data$": { "alias": "data$"; "required": false; }; "tableModel": { "alias": "tableModel"; "required": false; }; "footerRow": { "alias": "footerRow"; "required": false; }; "showHeader$": { "alias": "showHeader$"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "scrollMode$": { "alias": "scrollMode$"; "required": false; }; "scrollMode": { "alias": "scrollMode"; "required": false; }; }, {}, never, never, false, never>;
57
- }
58
- export declare namespace TableBodyComponent {
59
- type ScrollMode = "none" | "classic" | "virtual";
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableBodyComponent<any>, never>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableBodyComponent<any>, "aup-table-body", never, { "data$": { "alias": "data$"; "required": false; }; "tableModel": { "alias": "tableModel"; "required": false; }; "showHeader$": { "alias": "showHeader$"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "enableScrolling": { "alias": "enableScrolling"; "required": false; }; }, { "visibleRowCount": "visibleRowCount"; }, never, never, false, never>;
60
36
  }
@@ -6,17 +6,18 @@ import { ColumnModel, RowData } from "../../column/column-model";
6
6
  import { EditSession } from "../../editor/edit-session";
7
7
  import { CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL } from "../cell-portal-ref";
8
8
  import * as i0 from "@angular/core";
9
- export declare class TableCellComponent<Row extends object> extends DisposableComponent implements OnChanges {
9
+ export declare class TableCellComponent<Row> extends DisposableComponent implements OnChanges {
10
10
  row: Row;
11
11
  column: ColumnModel<Row>;
12
12
  editSession: EditSession<Row>;
13
13
  tableModel: AbstractTableModel<Row>;
14
- private readonly editRowCommand;
14
+ private editRowCommand;
15
15
  [CELL_RENDERER_PORTAL]: Portal<any>;
16
16
  [CELL_EDITOR_PORTAL]: Portal<any>;
17
17
  defaultClassNames: string;
18
18
  fillCell: boolean;
19
19
  padChild: boolean;
20
+ private firstEditableColumn;
20
21
  constructor();
21
22
  hasActiveEditor(): boolean;
22
23
  initialiseRenderer(ref: CdkPortalOutletAttachedRef): void;