@coolon/angular-ui-powerups 3.18.0 → 11.0.0-alpha.10

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 (135) hide show
  1. package/assets/activities.scss +2 -1
  2. package/assets/styles.scss +1 -2
  3. package/assets/table.scss +13 -6
  4. package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.js +207 -110
  6. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  7. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  8. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  9. package/coolon-angular-ui-powerups.metadata.json +1 -1
  10. package/cypress/package.json +1 -1
  11. package/esm2015/lib/components/busy-overlay/busy-overlay.component.js +1 -1
  12. package/esm2015/lib/components/busy-overlay/busy-overlay.component.metadata.json +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/commands/command/command.component.js +5 -1
  16. package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
  17. package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
  18. package/esm2015/lib/components/commands/command-face/command-face.component.js +1 -1
  19. package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -1
  20. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +1 -1
  21. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +1 -1
  22. package/esm2015/lib/components/components.module.js +0 -3
  23. package/esm2015/lib/components/components.module.js.map +1 -1
  24. package/esm2015/lib/components/components.module.metadata.json +1 -1
  25. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  26. package/esm2015/lib/components/empty-state/empty-state.component.js +1 -1
  27. package/esm2015/lib/components/empty-state/empty-state.component.metadata.json +1 -1
  28. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
  29. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
  30. package/esm2015/lib/components/icon/icon.component.js +1 -1
  31. package/esm2015/lib/components/icon/icon.component.metadata.json +1 -1
  32. package/esm2015/lib/components/scroll-container/scroll-container.component.js +1 -1
  33. package/esm2015/lib/components/scroll-container/scroll-container.component.metadata.json +1 -1
  34. package/esm2015/lib/components/section-header/section-header.component.js +1 -1
  35. package/esm2015/lib/components/section-header/section-header.component.metadata.json +1 -1
  36. package/esm2015/lib/components/switch-case/switch-case.component.js +1 -1
  37. package/esm2015/lib/components/switch-case/switch-case.component.metadata.json +1 -1
  38. package/esm2015/lib/components/table/column-model.js +2 -1
  39. package/esm2015/lib/components/table/column-model.js.map +1 -1
  40. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  41. package/esm2015/lib/components/table/paginator/paginator.component.js +1 -1
  42. package/esm2015/lib/components/table/paginator/paginator.component.metadata.json +1 -1
  43. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
  44. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
  45. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -1
  46. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.metadata.json +1 -1
  47. package/esm2015/lib/components/table/table-model.js +9 -0
  48. package/esm2015/lib/components/table/table-model.js.map +1 -1
  49. package/esm2015/lib/components/table/table-model.metadata.json +1 -1
  50. package/esm2015/lib/components/table/table.component.js +31 -4
  51. package/esm2015/lib/components/table/table.component.js.map +1 -1
  52. package/esm2015/lib/components/table/table.component.metadata.json +1 -1
  53. package/esm2015/lib/components/tree-table/decorated-tree-node.js +19 -22
  54. package/esm2015/lib/components/tree-table/decorated-tree-node.js.map +1 -1
  55. package/esm2015/lib/components/tree-table/tree-inheritance-icon/tree-inheritance-icon.component.js +1 -1
  56. package/esm2015/lib/components/tree-table/tree-inheritance-icon/tree-inheritance-icon.component.metadata.json +1 -1
  57. package/esm2015/lib/components/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.js +1 -1
  58. package/esm2015/lib/components/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.metadata.json +1 -1
  59. package/esm2015/lib/components/tree-table/tree-table-component.js +22 -5
  60. package/esm2015/lib/components/tree-table/tree-table-component.js.map +1 -1
  61. package/esm2015/lib/components/tree-table/tree-table-component.metadata.json +1 -1
  62. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
  63. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  64. package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js +1 -1
  65. package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.metadata.json +1 -1
  66. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +1 -1
  67. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.metadata.json +1 -1
  68. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +1 -1
  69. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.metadata.json +1 -1
  70. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +1 -1
  71. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.metadata.json +1 -1
  72. package/esm2015/lib/place/components/abstract-place-navigation.component.js +18 -3
  73. package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  74. package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
  75. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +2 -2
  76. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  77. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
  78. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js +14 -0
  79. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js.map +1 -0
  80. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.metadata.json +1 -0
  81. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.ngfactory.js.map +1 -0
  82. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.scss.shim.ngstyle.js.map +1 -0
  83. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +23 -14
  84. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  85. package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
  86. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +2 -2
  87. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
  88. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.metadata.json +1 -1
  89. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
  90. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  91. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
  92. package/esm2015/lib/place/exports.js +1 -0
  93. package/esm2015/lib/place/exports.js.map +1 -1
  94. package/esm2015/lib/place/exports.metadata.json +1 -1
  95. package/esm2015/lib/place/guards/place.guard.js +5 -8
  96. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  97. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +2 -0
  98. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
  99. package/esm2015/lib/place/place-component.js +1 -3
  100. package/esm2015/lib/place/place-component.js.map +1 -1
  101. package/esm2015/lib/place/place-component.metadata.json +1 -1
  102. package/esm2015/lib/place/place-router.js +15 -4
  103. package/esm2015/lib/place/place-router.js.map +1 -1
  104. package/esm2015/lib/place/place-router.metadata.json +1 -1
  105. package/esm2015/lib/place/place.module.js +6 -2
  106. package/esm2015/lib/place/place.module.js.map +1 -1
  107. package/esm2015/lib/place/place.module.metadata.json +1 -1
  108. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  109. package/fesm2015/coolon-angular-ui-powerups.js +187 -92
  110. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  111. package/lib/components/commands/command/command.component.d.ts +2 -1
  112. package/lib/components/table/column-model.d.ts +1 -0
  113. package/lib/components/table/table-model.d.ts +9 -0
  114. package/lib/components/table/table.component.d.ts +24 -6
  115. package/lib/components/tree-table/tree-table-component.d.ts +9 -0
  116. package/lib/place/components/abstract-place-navigation.component.d.ts +8 -1
  117. package/lib/place/components/not-authorised-notice/not-authorised-notice.component.d.ts +3 -0
  118. package/lib/place/components/place-outlet/place-outlet.component.d.ts +10 -3
  119. package/lib/place/exports.d.ts +1 -0
  120. package/lib/place/place-component.d.ts +1 -1
  121. package/lib/place/place-router.d.ts +10 -6
  122. package/package.json +22 -20
  123. package/schematics/bootstrap-app/templates/styles/global-variables.scss.template +1 -0
  124. package/schematics/bootstrap-app/templates/styles.scss.template +10 -3
  125. package/schematics/ng-add/index.js +1 -1
  126. package/schematics/ng-add/index.js.map +1 -1
  127. package/schematics/place-add/index.js +7 -10
  128. package/schematics/place-add/index.js.map +1 -1
  129. package/schematics/utils/build-context.d.ts +4 -5
  130. package/schematics/utils/template-utilities.js +1 -9
  131. package/schematics/utils/template-utilities.js.map +1 -1
  132. package/schematics/utils/workspace.d.ts +3 -4
  133. package/schematics/utils/workspace.js.map +1 -1
  134. package/CHANGELOG.md +0 -1369
  135. package/schematics/bootstrap-app/templates/styles/theme.scss.template +0 -37
@@ -1,5 +1,5 @@
1
1
  import { AfterViewInit, ElementRef, OnInit } from '@angular/core';
2
- import { Command, ListModelChain, ValueModel, ValueModelChain } from '@coolon/pectin';
2
+ import { BooleanValueModelChain, Command, ListModelChain, ValueModel, ValueModelChain } from '@coolon/pectin';
3
3
  import { CommandFace } from '../command-face';
4
4
  import { PopupAwareComponent } from '../group/popup-aware.component';
5
5
  import { PopupContainer } from '../group/popup-container';
@@ -17,6 +17,7 @@ export declare class CommandComponent extends PopupAwareComponent implements OnI
17
17
  readonly buttonStyle: ValueModelChain<string>;
18
18
  readonly colorModel: ValueModelChain<'primary' | 'accent' | 'warn' | undefined>;
19
19
  private activeFace;
20
+ readonly iconOnly: BooleanValueModelChain;
20
21
  constructor(element: ElementRef, parent?: PopupContainer);
21
22
  isActive(face: CommandFace): boolean;
22
23
  ngOnInit(): void;
@@ -32,6 +32,7 @@ export declare class ColumnModel<Row> {
32
32
  private _selectRowOnClick;
33
33
  private _flex;
34
34
  private _visibleModel;
35
+ readonly dasherisedColumnId: string;
35
36
  constructor(columnId: string, textPropertiesProvider: ColumnModel.TextPropertiesProvider);
36
37
  protected installHeaderRenderer(): void;
37
38
  getHeaderText(): string;
@@ -54,6 +54,15 @@ import { SelectionColumnModel } from './column-model';
54
54
  * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
55
55
  * });
56
56
  *
57
+ * Template columns
58
+ * @example
59
+ * const model = TableModel.fromList(heroList, table => {
60
+ * table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
61
+ * table.addTemplateColumn("myTemplate");
62
+ * });
63
+ *
64
+ * <div *aupColumnTemplate="let hero; columnId: 'myTemplate'">{{hero.age}}</div>
65
+ *
57
66
  * I18n
58
67
  * @example
59
68
  * [table.yml]
@@ -31,15 +31,32 @@ import { ColumnModel } from './column-model';
31
31
  *
32
32
  * Styling
33
33
  * @example
34
+ * // global settings
35
+ * :root {
36
+ * --aup-table-column-gap: 10px; // defaults to 24px
37
+ * --aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)
38
+ * --aup-table-row-selected-background-color: rebeccapurple; // defaults to transparent
39
+ * --aup-table-first-column-padding-left: 18px // defaults to --column-gap
40
+ * --aup-table-last-column-padding-right: 18px // defaults to --column-gap
41
+ * }
42
+ *
43
+ * // per table settings.
34
44
  * aup-table {
35
45
  * --column-gap: 10px; // defaults to 24px
36
46
  * --row-hover-background-color, rgba(0, 0, 0, 0.05)
37
47
  * --row-selected-background-color: rebeccapurple; // defaults to transparent
48
+ * --first-column-padding-left: 18px // defaults to --column-gap
49
+ * --last-column-padding-right: 18px // defaults to --column-gap
50
+ *
51
+ * aup-table-header-cell-renderer,
38
52
  * aup-table-cell-renderer {
39
- * &:first-column {
53
+ * &.aup-col-my-dasherised-column-id {
40
54
  * // do stuff
41
55
  * }
42
- * &:last-column {
56
+ * &.first-visible-column {
57
+ * // do stuff
58
+ * }
59
+ * &.last-visible-column {
43
60
  * // do stuff
44
61
  * }
45
62
  * }
@@ -49,16 +66,16 @@ export declare class TableComponent<Row> extends ResizeAwareComponent implements
49
66
  tableModel: AbstractTableModel<Row>;
50
67
  showHeaderModel: ValueModel<boolean>;
51
68
  showHeader: boolean;
52
- columns: ListModelChain<ColumnModel<Row>>;
53
- columnIds: ListModelChain<string>;
54
- private columnsById;
55
- readonly visibleRowCount: ValueModel<number>;
56
69
  /**
57
70
  * Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
58
71
  * need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
59
72
  * containment area.
60
73
  */
61
74
  enableScrolling: boolean;
75
+ columns: ListModelChain<ColumnModel<Row>>;
76
+ columnIds: ListModelChain<string>;
77
+ private columnsById;
78
+ readonly visibleRowCount: ValueModel<number>;
62
79
  private readonly headerHeight;
63
80
  private readonly rowHeight;
64
81
  constructor(elementRef: ElementRef, ngZone: NgZone);
@@ -69,4 +86,5 @@ export declare class TableComponent<Row> extends ResizeAwareComponent implements
69
86
  notifyCellClicked(columnModel: ColumnModel<Row>, row: Row): void;
70
87
  isFirstVisibleColumn(columnId: string): boolean;
71
88
  isLastVisibleColumn(columnId: string): boolean;
89
+ getColumnClasses(columnId: string): string[];
72
90
  }
@@ -1,7 +1,16 @@
1
+ import { ValueModel } from '@coolon/pectin';
1
2
  import { DisposableComponent } from '../disposable-component';
2
3
  import { TreeNode } from './tree-node';
3
4
  import { TreeTableModel } from './tree-table-model';
4
5
  export declare class TreeTableComponent<T extends TreeNode<T>> extends DisposableComponent {
5
6
  treeTableModel: TreeTableModel<T>;
7
+ showHeaderModel: ValueModel<boolean>;
8
+ showHeader: boolean;
9
+ /**
10
+ * Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
11
+ * need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
12
+ * containment area.
13
+ */
14
+ enableScrolling: boolean;
6
15
  constructor();
7
16
  }
@@ -6,18 +6,25 @@ import { PlaceComponent } from '../place-component';
6
6
  import { PlaceDefinition } from '../place-definition';
7
7
  import { PlaceRouter } from '../place-router';
8
8
  import { PlaceOutletComponent } from './place-outlet/place-outlet.component';
9
+ interface MenuItem {
10
+ active: boolean;
11
+ place: PlaceDefinition;
12
+ }
9
13
  export declare class AbstractPlaceNavigationComponent extends DisposableComponent implements OnInit {
10
14
  readonly placeRouter: PlaceRouter;
11
15
  places: Constructable<PlaceComponent>[];
12
16
  placesModel: ListModel<Constructable<PlaceComponent>>;
13
17
  placeOutlet: PlaceOutletComponent;
14
18
  placeOutletModel: ValueModel<PlaceOutletComponent>;
15
- readonly placeDefinitions: ListModelChain<PlaceDefinition>;
19
+ private readonly placeDefinitions;
20
+ readonly menuItems: ListModelChain<MenuItem>;
16
21
  readonly commandFactory: Command.Factory<PlaceDefinition, void>;
17
22
  readonly _activePlaceComponent: DelegatingValueModel<PlaceComponent>;
18
23
  private activePlaceDefinition;
24
+ readonly trackByPlaceDef: (data: MenuItem) => PlaceDefinition;
19
25
  constructor(placeRouter: PlaceRouter);
20
26
  getNavigationFace(placeDef: PlaceDefinition): CommandFace;
21
27
  isActive(place: PlaceDefinition): boolean;
22
28
  ngOnInit(): void;
23
29
  }
30
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare class NotAuthorisedNoticeComponent {
2
+ constructor();
3
+ }
@@ -1,15 +1,19 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
1
+ import { ComponentPortal } from '@angular/cdk/portal';
2
+ import { ChangeDetectorRef, EventEmitter, InjectionToken, OnInit } from '@angular/core';
2
3
  import { ActivatedRoute, Router, RouterOutlet } from '@angular/router';
3
4
  import { BooleanValueModelChain, Constructable, ListModel, ValueModel, ValueModelChain } from '@coolon/pectin';
4
5
  import { DisposableComponent } from '../../../components/disposable-component';
5
6
  import { PlaceComponent } from '../../place-component';
6
7
  import { PlaceConfig } from '../../place-config';
8
+ import { PlaceDefinition } from '../../place-definition';
7
9
  import { PlaceRouter } from '../../place-router';
8
10
  import { Visit } from '../../visit';
11
+ export declare const AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT: InjectionToken<Constructable<any>>;
9
12
  export declare class PlaceOutletComponent extends DisposableComponent implements OnInit {
10
13
  private readonly router;
11
14
  private readonly placeRouter;
12
15
  readonly placeConfig: PlaceConfig;
16
+ private readonly cdr;
13
17
  animate: boolean;
14
18
  animateModel: ValueModel<boolean>;
15
19
  customPlaceAnimationOrderModel: ListModel<Constructable<PlaceComponent>>;
@@ -20,7 +24,7 @@ export declare class PlaceOutletComponent extends DisposableComponent implements
20
24
  private outletActivated;
21
25
  private readonly _activatedRouteModel;
22
26
  private readonly _activePlaceModel;
23
- private readonly _activePlaceDefinition;
27
+ readonly _activePlaceDefinition: ValueModelChain<PlaceDefinition>;
24
28
  private parentOutletModel;
25
29
  readonly activePlaceAnimationPosition: ValueModelChain<number>;
26
30
  private initialPlaceIndex;
@@ -31,10 +35,13 @@ export declare class PlaceOutletComponent extends DisposableComponent implements
31
35
  private placesInAnimationOrder;
32
36
  private animationSupported;
33
37
  readonly animationEnabled: BooleanValueModelChain;
34
- constructor(router: Router, placeRouter: PlaceRouter, placeConfig: PlaceConfig, parentOutlet: PlaceOutletComponent);
38
+ readonly authorised: ValueModelChain<boolean>;
39
+ readonly notAuthorisedNoticePortal: ComponentPortal<any>;
40
+ constructor(router: Router, placeRouter: PlaceRouter, placeConfig: PlaceConfig, unauthorisedPlaceNotice: Constructable<any>, parentOutlet: PlaceOutletComponent, cdr: ChangeDetectorRef);
35
41
  ngOnInit(): void;
36
42
  getAnimationOrder(): number;
37
43
  get animationDuration(): string;
44
+ get isAuthorised(): boolean;
38
45
  navigate(visit: Visit): void;
39
46
  get parentOutlet(): PlaceOutletComponent;
40
47
  get activePlaceModel(): ValueModel<PlaceComponent>;
@@ -15,6 +15,7 @@ export * from "./url-snapshot";
15
15
  export * from "./visit";
16
16
  export * from "./components/abstract-place-navigation.component";
17
17
  export * from "./components/list-place-nav/list-place-nav.component";
18
+ export * from "./components/not-authorised-notice/not-authorised-notice.component";
18
19
  export * from "./components/place-outlet/place-outlet.component";
19
20
  export * from "./components/place-outlet/route-animations";
20
21
  export * from "./components/side-place-navigation/side-place-navigation.component";
@@ -13,6 +13,7 @@ export declare class PlaceComponent extends DisposableComponent {
13
13
  private _inVisitUpdate;
14
14
  private _active;
15
15
  interactionContext?: InteractionContext;
16
+ readonly childPlaces: ReadonlyArray<Constructable<PlaceComponent>>;
16
17
  canDeactivate?(interactionContext: InteractionContext): boolean | Promise<boolean>;
17
18
  constructor();
18
19
  initialiseVisit(visit: Visit, notifyVisitChanged: (current: Visit, previous: Visit) => void): void;
@@ -20,7 +21,6 @@ export declare class PlaceComponent extends DisposableComponent {
20
21
  isInitialised(): boolean;
21
22
  private installBinding;
22
23
  get placeDefinition(): PlaceDefinition;
23
- get childPlaces(): Constructable<PlaceComponent>[];
24
24
  get active(): import("@coolon/pectin").ValueModel<boolean>;
25
25
  /**
26
26
  * Called by the router when the place is ready to interact after any animations have run.
@@ -1,6 +1,6 @@
1
1
  import { Location } from '@angular/common';
2
2
  import { ActivatedRoute, ActivatedRouteSnapshot, NavigationCancel, NavigationEnd, NavigationError, NavigationExtras, NavigationStart, Router, RouterStateSnapshot } from '@angular/router';
3
- import { GarbageCollector, ListModel, MapModelChain, MutableValueModel, ValueModel, ValueModelChain } from '@coolon/pectin';
3
+ import { GarbageCollector, ListModel, MutableValueModel, ValueModel, ValueModelChain } from '@coolon/pectin';
4
4
  import { InteractionService } from '../interaction/services/interaction.service';
5
5
  import { NavigationSession } from './navigation/session/navigation-session';
6
6
  import { PlaceAccessGuard } from './place-access-guard';
@@ -20,20 +20,19 @@ export declare class PlaceRouter extends GarbageCollector {
20
20
  readonly navigationSessionName: ValueModelChain<string>;
21
21
  private readonly navigationContext;
22
22
  private readonly _activeVisits;
23
- readonly activeVisitsByPlaceDefinition: MapModelChain<PlaceDefinition, Visit>;
24
- private routerInteractionAdapter;
23
+ private readonly routerInteractionAdapter;
25
24
  private sessionFinishedJobs;
25
+ readonly state: ValueModel<PlaceRouter.State>;
26
26
  /**
27
27
  * An observable model containing the authoriser function. This allows places to react to changes
28
28
  * in permissions when any underlying auth logic changes, e.g. a role being removed from a user.
29
29
  */
30
- private _accessGuard;
30
+ private readonly _accessGuard;
31
31
  private redirections;
32
32
  constructor(angularRouter: Router, angularLocation: Location, interactionService: InteractionService, urlService: UrlService, placeHistory: PlaceHistory);
33
33
  get accessGuard(): ValueModel<PlaceAccessGuard>;
34
34
  configureAuth(accessGrant: ValueModel<PlaceAccessGuard>, redirections: PlaceRouter.Redirections): void;
35
35
  getAuthenticationFailureRedirect(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Visit;
36
- getAuthorisationFailureRedirect(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Visit;
37
36
  get navigationSession(): NavigationSession;
38
37
  get currentSession(): NavigationSession;
39
38
  isNavigating(): boolean;
@@ -66,6 +65,11 @@ export declare class PlaceRouter extends GarbageCollector {
66
65
  export declare namespace PlaceRouter {
67
66
  interface Redirections {
68
67
  onAuthenticationFailure(activatedRoute?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Visit;
69
- onAuthorisationFailure(activatedRoute?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Visit;
68
+ }
69
+ class State {
70
+ private readonly activeVisits;
71
+ constructor(activeVisits: Visit[]);
72
+ isPlaceActive(placeDefinition: PlaceDefinition): boolean;
73
+ getVisitFor(placeDefinition: PlaceDefinition): Visit;
70
74
  }
71
75
  }
package/package.json CHANGED
@@ -1,36 +1,38 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "3.18.0",
3
+ "version": "11.0.0-alpha.10",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "dependencies": {
6
6
  "@coolon/typescript-utilities": "^2.2.0",
7
+ "typescript-string-enums": "^1.0.0",
7
8
  "@typescript-plus/fast-memoize-decorator": "^0.1.0",
8
9
  "json5": "^2.1.0",
9
10
  "ts-morph": "^9.1.0",
10
11
  "wake-event": "^0.0.1",
11
- "tslib": "^2.0.0",
12
- "typescript-string-enums": "^1.0.0"
13
- },
14
- "peerDependencies": {
15
- "@angular/common": "^10.1.1",
16
- "@angular/core": "^10.1.1",
17
- "@angular/material": "^10.2.0",
18
- "@angular/animations": "^10.1.1",
19
- "@angular/cdk": "^10.2.0",
20
- "@coolon/pectin": ">=3.10.1",
21
- "resize-observer-polyfill": "^1.5.1",
22
- "@fortawesome/angular-fontawesome": "^0.8.1",
12
+ "@fortawesome/angular-fontawesome": "^0.8.2",
23
13
  "@fortawesome/fontawesome-svg-core": "^1.2.34",
24
14
  "@fortawesome/free-solid-svg-icons": "^5.15.2",
25
15
  "@fortawesome/fontawesome-free": "5.15.2",
26
- "@angular/forms": "^10.1.1",
27
- "@angular/platform-browser": "^10.1.1",
28
- "@angular/platform-browser-dynamic": "^10.1.1",
29
- "@angular/flex-layout": "^10.0.0-beta.32",
30
- "@angular/router": "^10.1.1",
16
+ "resize-observer-polyfill": "^1.5.1",
17
+ "tslib": "^2.0.0"
18
+ },
19
+ "peerDependencies": {
20
+ "@angular/animations": "^11.2.3",
21
+ "@angular/cdk": "^11.2.2",
22
+ "@angular/common": "^11.2.3",
23
+ "@angular/compiler": "^11.2.3",
24
+ "@angular/core": "^11.2.3",
25
+ "@angular/flex-layout": "^11.0.0-beta.33",
26
+ "@angular/forms": "^11.2.3",
27
+ "@angular/material": "^11.2.2",
28
+ "@angular/material-moment-adapter": "^11.2.2",
29
+ "@angular/platform-browser": "^11.2.3",
30
+ "@angular/platform-browser-dynamic": "^11.2.3",
31
+ "@angular/router": "^11.2.3",
31
32
  "rxjs": "~6.6.3",
32
33
  "reflect-metadata": "^0.1.13",
33
- "zone.js": "~0.10.3"
34
+ "zone.js": "~0.10.3",
35
+ "@coolon/pectin": ">=3.10.1"
34
36
  },
35
37
  "main": "bundles/coolon-angular-ui-powerups.umd.js",
36
38
  "module": "fesm2015/coolon-angular-ui-powerups.js",
@@ -40,4 +42,4 @@
40
42
  "typings": "coolon-angular-ui-powerups.d.ts",
41
43
  "metadata": "coolon-angular-ui-powerups.metadata.json",
42
44
  "sideEffects": false
43
- }
45
+ }
@@ -10,3 +10,4 @@
10
10
  --sub-header-height: 48px;
11
11
  }
12
12
 
13
+
@@ -1,10 +1,17 @@
1
1
  /* You can add global styles to this file, and also import other style files */
2
2
 
3
+ @use '~@angular/material/theming' as ng;
4
+ @use "~@coolon/angular-ui-powerups/assets/styles" as aup;
5
+ @use "./styles/global-variables";
6
+
7
+ $primary: ng.mat-palette(ng.$mat-indigo);
8
+ $accent: ng.mat-palette(ng.$mat-pink);
9
+
10
+ @include aup.apply-light-theme($primary, $accent);
11
+
3
12
  @import "./assets/fonts/material-design-icons/material-icons.css";
4
13
  @import "~roboto-fontface/css/roboto/roboto-fontface.css";
5
- @import "./styles/theme";
6
- @import "./styles/global-variables";
7
- @import "~@coolon/angular-ui-powerups/assets/styles";
14
+
8
15
 
9
16
  html, body {
10
17
  height: 100%;
@@ -19,7 +19,7 @@ function installDependencies(_options) {
19
19
  return (tree, _) => {
20
20
  return package_util_1.updatePackageJson(tree, draft => {
21
21
  draft.scripts = Object.assign(Object.assign({}, draft.scripts), { "place-routes": "run-s place-routes:**", "i18n": "run-s i18n:**", "watch": "npm-watch" });
22
- draft.dependencies = Object.assign(Object.assign({}, draft.dependencies), { "@coolon/pectin": "^3.7.0", "@coolon/typescript-utilities": "^2.0.2", "@angular/flex-layout": "^11.0.0-beta.33", "roboto-fontface": "^0.10.0", "@fortawesome/angular-fontawesome": "^0.8.1", "@fortawesome/fontawesome-svg-core": "^1.2.34", "@fortawesome/free-solid-svg-icons": "^5.15.2", "@fortawesome/fontawesome-free": "5.15.2", "@js-joda/core": "^3.2.0", "@js-joda/locale": "^3.2.0", "@js-joda/timezone": "^2.3.0", "cldr-data": "^36.0.0", "cldrjs": "^0.5.4", "immer": "^7.0.5", "reflect-metadata": "^0.1.13", "resize-observer-polyfill": "^1.5.1", "typescript-string-enums": "^1.0.0", "format-message-interpret": "^6.2.3", "@angular/material-moment-adapter": "^10.2.1", "moment": "2.27.0" });
22
+ draft.dependencies = Object.assign(Object.assign({}, draft.dependencies), { "@coolon/pectin": "^3.10.1", "@coolon/typescript-utilities": "^2.0.2", "roboto-fontface": "^0.10.0", "@js-joda/core": "^3.2.0", "@js-joda/locale": "^3.2.0", "@js-joda/timezone": "^2.3.0", "cldr-data": "^36.0.0", "cldrjs": "^0.5.4", "immer": "^7.0.5", "typescript-string-enums": "^1.0.0", "format-message-interpret": "^6.2.3", "moment": "^2.18.1" });
23
23
  draft.devDependencies = Object.assign(Object.assign({}, draft.devDependencies), { "husky": "^4.2.0", "@coolon/i18n-resource-generator": "^2.0.13", "cypress-wait-until": "^1.6.1", "barrelsby": "^2.1.1", "dotenv": "6.2.0", "cz-conventional-changelog": "^3.1.0", "@commitlint/cli": "^8.3.5", "git-is-clean": "^3.0.1", "shx": "^0.3.2", 'standard-version': '^8.0.0', "npm-watch": "^0.7.0" });
24
24
  draft.watch = Object.assign({}, draft.watch);
25
25
  draft.config = Object.assign(Object.assign({}, draft.config), { commitizen: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AACjF,4DAA0E;AAC1E,kDAAoD;AAEpD,uBAAuB;AACvB,SAAgB,KAAK,CAAC,Q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C,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,WAAW,GACrB,CAAC;YAEF,KAAK,CAAC,YAAY,mCACb,KAAK,CAAC,YAAY,KACrB,gBAAgB,EAAE,SAAS,EAC3B,8BAA8B,EAAE,QAAQ,EACxC,iBAAiB,EAAE,SAAS,EAC5B,eAAe,EAAE,QAAQ,EACzB,iBAAiB,EAAE,QAAQ,EAC3B,mBAAmB,EAAE,QAAQ,EAC7B,WAAW,EAAE,SAAS,EACtB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,QAAQ,EACjB,yBAAyB,EAAE,QAAQ,EACnC,0BAA0B,EAAE,QAAQ,EACpC,QAAQ,EAAE,SAAS,GACpB,CAAC;YAEF,KAAK,CAAC,eAAe,mCAChB,KAAK,CAAC,eAAe,KACxB,OAAO,EAAE,QAAQ,EACjB,iCAAiC,EAAE,SAAS,EAC5C,oBAAoB,EAAE,QAAQ,EAC9B,WAAW,EAAE,QAAQ,EACrB,QAAQ,EAAE,OAAO,EACjB,2BAA2B,EAAE,QAAQ,EACrC,iBAAiB,EAAE,QAAQ,EAC3B,cAAc,EAAE,QAAQ,EACxB,KAAK,EAAE,QAAQ,EACf,kBAAkB,EAAE,QAAQ,EAC5B,WAAW,EAAE,QAAQ,GACtB,CAAC;YAEF,KAAK,CAAC,KAAK,qBACN,KAAK,CAAC,KAAK,CACf,CAAA;YAED,KAAK,CAAC,MAAM,mCACP,KAAK,CAAC,MAAM,KACf,UAAU,EAAE;oBACV,IAAI,EAAE,0CAA0C;iBACjD,GACF,CAAC;YAEF,KAAK,CAAC,KAAK,GAAG;gBACZ,OAAO,EAAE;oBACP,YAAY,EAAE,gCAAgC;iBAC/C;aACF,CAAC;QAEJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AA5DD,kDA4DC"}
@@ -16,8 +16,12 @@ function addPlace(_options) {
16
16
  if (!placeModulePath) {
17
17
  throw new Error(`Places must be created in or under a directory containing a 'places.module.ts'. I couldn't find one in ${pathToSourceRoot.join('/')} or in any ancestor of it. You can run ng g @coolon/angular-ui-powerups:place-bootstrap --dir=<directory> to initialise one`);
18
18
  }
19
- const placeModule = buildContext.getSourceFile(placeModulePath);
20
- const newPlaceModuleContent = updatePlaceModule(placeModule);
19
+ // we'll let angular do it by just create a default component then we'll clobber it with our real templates later.
20
+ const updateModule = schematics_1.externalSchematic('@schematics/angular', 'component', {
21
+ project: _options.project,
22
+ name: _options.name,
23
+ module: placeModulePath.slice(buildContext.sourceCodeRoot.length)
24
+ });
21
25
  const componentFiles = template_utilities_1.applyTemplatesWithOverwrite(tree, 'templates/component', {
22
26
  name: componentName,
23
27
  selectorPrefix: buildContext.selectorPrefix,
@@ -26,15 +30,8 @@ function addPlace(_options) {
26
30
  const additionalFiles = template_utilities_1.applyTemplatesWithOverwrite(tree, 'templates/files', {
27
31
  name: componentName
28
32
  }, buildContext.sourceRoot);
29
- return schematics_1.chain([componentFiles, additionalFiles])(tree, context);
33
+ return schematics_1.chain([updateModule, componentFiles, additionalFiles])(tree, context);
30
34
  };
31
35
  }
32
36
  exports.addPlace = addPlace;
33
- function updatePlaceModule(placeModule) {
34
- // TODO: Make this work.
35
- // const imports = placeModule.getImportDeclarations();
36
- const moduleClass = placeModule.findClassWithDecorator('@NgModule');
37
- const decorator = moduleClass.getClassDecoratorNode('@NgModule');
38
- return placeModule.getFullText();
39
- }
40
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/place-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AAGjF,oEAA0E;AAC1E,kDAA+C;AAI/C,SAAgB,QAAQ,CAAC,QAAgB;IAEvC,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAE/C,MAAM,SAAS,GAAG,qBAAS,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,SAAS,CA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AAe,EAAE;YACpB,MAAM,IAAI,KAAK,CAAC,2GAA2G,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,6HAA6H,CAAC,CAAC;SACrR;QACD,kHAAkH;QAClH,MAAM,YAAY,GAAG,8BAAiB,CAAC,qBAAqB,EAAE,WAAW,EAAE;YACzE,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,MAAM,CAAC;SAClE,CAAC,CAAC;QAEH,MAAM,cAAc,GAAG,gDAA2B,CAChD,IAAI,EACJ,qBAAqB,EACrB;YACE,IAAI,EAAE,aAAa;YACnB,cAAc,EAAE,YAAY,CAAC,cAAc;YAC3C,UAAU,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;SACtD,EACD,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,aAAa,EAAE,CACnD,CAAC;QAGF,MAAM,eAAe,GAAG,gDAA2B,CACjD,IAAI,EACJ,iBAAiB,EACjB;YACE,IAAI,EAAE,aAAa;SACpB,EACD,YAAY,CAAC,UAAU,CAAC,CAAC;QAE3B,OAAO,kBAAK,CAAC,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAE/E,CAAC,CAAC;AAEJ,CAAC;AA9CD,4BA8CC"}
@@ -1,4 +1,3 @@
1
- import { experimental } from '@angular-devkit/core';
2
1
  import { SchematicContext, Tree } from '@angular-devkit/schematics';
3
2
  import { ClassDeclaration, SourceFile } from 'ts-morph';
4
3
  import { DecoratedSourceFile } from './decorators/decorated-source-file';
@@ -12,8 +11,8 @@ export declare abstract class BuildContext {
12
11
  get logger(): import("@angular-devkit/core/src/logger").LoggerApi;
13
12
  get tsConfigPath(): string;
14
13
  get sourceCodeRoot(): string;
15
- get sourceRoot(): string;
16
- get rootDir(): string;
14
+ get sourceRoot(): any;
15
+ get rootDir(): any;
17
16
  private loadTypeScriptProject;
18
17
  scanClassesInTree(tree: Tree, scanRootDirectory: string, scanClass: (sourceFile: SourceFile, classDeclaration: ClassDeclaration, path: string) => void): void;
19
18
  findFileInAncestorPath(pathToSourceRoot: string[], fileName: string): string;
@@ -21,12 +20,12 @@ export declare abstract class BuildContext {
21
20
  }
22
21
  export declare namespace BuildContext {
23
22
  interface Settings {
24
- readonly workspaceProject: experimental.workspace.WorkspaceProject;
23
+ readonly workspaceProject: any;
25
24
  readonly projectType: string;
26
25
  readonly tsConfigPath: string;
27
26
  }
28
27
  class App extends BuildContext {
29
- get selectorPrefix(): string;
28
+ get selectorPrefix(): any;
30
29
  }
31
30
  class Lib extends BuildContext {
32
31
  }
@@ -9,16 +9,8 @@ function applyTemplatesWithOverwrite(tree, templateUrl, templateData, outDir) {
9
9
  const newFiles = schematics_1.apply(schematics_1.url(templateUrl), [
10
10
  schematics_1.applyTemplates(Object.assign(Object.assign({}, templateData), core_1.strings)),
11
11
  schematics_1.move(`${outDir}`),
12
- // @see https://github.com/angular/angular-cli/issues/11337#issuecomment-448259549
13
- schematics_1.forEach((fileEntry) => {
14
- // this.context.logger.info(fileEntry.path);
15
- if (tree.exists(fileEntry.path)) {
16
- tree.overwrite(fileEntry.path, fileEntry.content);
17
- }
18
- return fileEntry;
19
- })
20
12
  ]);
21
- return schematics_1.mergeWith(newFiles);
13
+ return schematics_1.mergeWith(newFiles, schematics_1.MergeStrategy.Overwrite);
22
14
  }
23
15
  exports.applyTemplatesWithOverwrite = applyTemplatesWithOverwrite;
24
16
  //# sourceMappingURL=template-utilities.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"template-utilities.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/utils/template-utilities.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,2DAUoC;AAEpC,SAAgB,2BAA2B,CAAC,IAAU,EAAE,WAAmB,EAAE,YAAoB,EAAE,MAAc;IAC/G,uFAAuF;IACvF,2CAA2C;IAC3C,MAAM,QAAQ,GAAG,kBAAK,CACpB,gBAAG,CAAC,WAAW,CAAC,EAChB;QACE,2BAAc,iCACT,YAAY,GACZ,cAAO,EACV;QACF,iBAAI,CAAC,GAAG,MAAM,EAAE,CAAC;QACjB,kFAAkF;QAClF,oBAAO,CAAC,CAAC,SAAoB,EAAE,EAAE;YAC/B,4CAA4C;YAC5C,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;gBAC/B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;aACnD;YACD,OAAO,SAAS,CAAC;QACnB,CAAC,CAAC;KACH,CAAC,CAAC;IACL,OAAO,sBAAS,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;AArBD,kEAqBC"}
1
+ {"version":3,"file":"template-utilities.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/utils/template-utilities.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,2DAWoC;AAEpC,SAAgB,2BAA2B,CAAC,IAAU,EAAE,WAAmB,EAAE,YAAoB,EAAE,MAAc;IAC/G,uFAAuF;IACvF,2CAA2C;IAC3C,MAAM,QAAQ,GAAG,kBAAK,CACpB,gBAAG,CAAC,WAAW,CAAC,EAChB;QACE,2BAAc,iCACT,YAAY,GACZ,cAAO,EACV;QACF,iBAAI,CAAC,GAAG,MAAM,EAAE,CAAC;KASlB,CAAC,CAAC;IACL,OAAO,sBAAS,CAAC,QAAQ,EAAE,0BAAa,CAAC,SAAS,CAAC,CAAC;AACtD,CAAC;AArBD,kEAqBC"}
@@ -1,12 +1,11 @@
1
- import { experimental } from '@angular-devkit/core';
2
1
  import { SchematicContext, Tree } from '@angular-devkit/schematics';
3
2
  import { BuildContext } from './build-context';
4
3
  export declare class Workspace {
5
- readonly schema: experimental.workspace.WorkspaceSchema;
4
+ readonly schema: any;
6
5
  readonly tree: Tree;
7
6
  readonly context: SchematicContext;
8
- get defaultProject(): string;
9
- constructor(schema: experimental.workspace.WorkspaceSchema, tree: Tree, context: SchematicContext);
7
+ get defaultProject(): any;
8
+ constructor(schema: any, tree: Tree, context: SchematicContext);
10
9
  static load(tree: Tree, _context: SchematicContext): Workspace;
11
10
  getApplication(projectName: string): BuildContext.App;
12
11
  getApplicationOrDefault(projectName: string | undefined): BuildContext.App;
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/utils/workspace.ts"],"names":[],"mappings":";;;AAEA,mDAA+C;AAC/C,MAAa,SAAS;IAMpB,YAAqB,MAA8C,EAAW,IAAU,EAAW,OAAyB;QAAvG,WAAM,GAAN,MAAM,CAAwC;QAAW,SAAI,GAAJ,IAAI,CAAM;QAAW,YAAO,GAAP,OAAO,CAAkB;IAC5H,CAAC;IALD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;IACpC,CAAC;IAKD,MAAM,CAAC,IAAI,CAAC,IAAU,EAAE,QAA0B;QAChD,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACnD,IAAI,CAAC,eAAe,EAAE;YACpB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;SACnE;QACD,MAAM,gBAAgB,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAC;QACpD,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IACrE,CAAC;IAED,cAAc,CAAC,WAAmB;QAChC,MAAM,QAAQ,GAAG,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAClE,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