@coolon/angular-ui-powerups 16.1.0-alpha.221 → 16.1.0-alpha.223
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.
- package/assets/table.scss +6 -1
- package/esm2022/lib/components/cards/abstract-card-container.component.mjs +1 -1
- package/esm2022/lib/components/commands/command/command.component.mjs +1 -1
- package/esm2022/lib/components/commands/group/popup-aware.component.mjs +1 -1
- package/esm2022/lib/components/commands/group/popup-container.mjs +1 -1
- package/esm2022/lib/components/commands/group/popup-menu/abstract-popup-menu.component.mjs +1 -1
- package/esm2022/lib/components/commands/group/popup-menu/more-menu.component.mjs +1 -1
- package/esm2022/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.mjs +1 -1
- package/esm2022/lib/components/commands/group/popup-menu/popup-menu.component.mjs +1 -1
- package/esm2022/lib/components/commands/separator.component.mjs +1 -1
- package/esm2022/lib/components/components.module.mjs +3 -3
- package/esm2022/lib/components/file/file-download/file-download.component.mjs +1 -1
- package/esm2022/lib/components/forms/abstract-input.component.mjs +1 -1
- package/esm2022/lib/components/forms/string-input/string-input.component.mjs +1 -1
- package/esm2022/lib/components/loadable-component.mjs +1 -1
- package/esm2022/lib/components/resize-aware.component.mjs +1 -1
- package/esm2022/lib/components/tables/abstract-table-model.mjs +1 -1
- package/esm2022/lib/components/tables/abstract-table.component.mjs +1 -1
- package/esm2022/lib/components/tables/column/column-manager.mjs +1 -1
- package/esm2022/lib/components/tables/column/column-model.mjs +1 -1
- package/esm2022/lib/components/tables/column/column-order-manager.mjs +1 -1
- package/esm2022/lib/components/tables/column/custom-template-column-model.mjs +1 -1
- package/esm2022/lib/components/tables/column/custom-value-column-model.mjs +1 -1
- package/esm2022/lib/components/tables/column/list-propery-column-model.mjs +1 -1
- package/esm2022/lib/components/tables/column/property-column-model.mjs +1 -1
- package/esm2022/lib/components/tables/column/selection-column-model.mjs +1 -1
- package/esm2022/lib/components/tables/filter/enable-cell-text-search.decorator.mjs +1 -1
- package/esm2022/lib/components/tables/filter/table-filter-model.mjs +1 -1
- package/esm2022/lib/components/tables/footer/footer-row-model.mjs +1 -1
- package/esm2022/lib/components/tables/renderer/abstract-cell-renderer.mjs +1 -1
- package/esm2022/lib/components/tables/renderer/cell-portal-ref.mjs +1 -1
- package/esm2022/lib/components/tables/renderer/default-cell-renderer/default-cell-renderer.component.mjs +1 -1
- package/esm2022/lib/components/tables/renderer/editable-cell-renderer.mjs +1 -1
- package/esm2022/lib/components/tables/renderer/select-header-cell/selection-header-cell.component.mjs +1 -1
- package/esm2022/lib/components/tables/renderer/table-action-column/menu-builder.mjs +1 -1
- package/esm2022/lib/components/tables/renderer/table-action-column/table-action-column.component.mjs +1 -1
- package/esm2022/lib/components/tables/renderer/table-body/table-body.component.mjs +1 -1
- package/esm2022/lib/components/tables/renderer/table-cell/table-cell.component.mjs +1 -1
- package/esm2022/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu-popup.component.mjs +1 -1
- package/esm2022/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu.component.mjs +1 -1
- package/esm2022/lib/components/tables/renderer/table-footer-row/table-footer-row.component.mjs +1 -1
- package/esm2022/lib/components/tables/table/table-model.mjs +1 -1
- package/esm2022/lib/components/tables/table/table.component.mjs +1 -1
- package/esm2022/lib/components/tables/tree-table/flattened-tree-list-model.mjs +1 -1
- package/esm2022/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.mjs +1 -2
- package/esm2022/lib/components/tables/tree-table/tree-label-column-model.mjs +1 -1
- package/esm2022/lib/components/tables/tree-table/tree-table-component.mjs +1 -1
- package/esm2022/lib/components/tables/tree-table/tree-table-model.mjs +1 -1
- package/esm2022/lib/directives/directives.module.mjs +1 -1
- package/esm2022/lib/directives/highlight.pipe.mjs +1 -1
- package/esm2022/lib/directives/resize-observer.directive.mjs +1 -1
- package/esm2022/lib/interaction/abstract-interaction-context.mjs +1 -1
- package/esm2022/lib/interaction/activity-context.mjs +1 -1
- package/esm2022/lib/interaction/activity-ref.mjs +1 -1
- package/esm2022/lib/interaction/activity.mjs +1 -1
- package/esm2022/lib/interaction/components/abstract-confirm-dialog.component.mjs +1 -1
- package/esm2022/lib/interaction/components/abstract-dialog.component.mjs +1 -1
- package/esm2022/lib/interaction/components/activity-container/activity-container.component.mjs +1 -1
- package/esm2022/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.mjs +1 -1
- package/esm2022/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.mjs +1 -1
- package/esm2022/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.mjs +1 -1
- package/esm2022/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.mjs +1 -1
- package/esm2022/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.mjs +1 -1
- package/esm2022/lib/interaction/components/add-card-activity/add-card-activity.component.mjs +1 -1
- package/esm2022/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.mjs +1 -1
- package/esm2022/lib/interaction/components/alert-dialog/alert-dialog.component.mjs +1 -1
- package/esm2022/lib/interaction/components/alert-renderer/alert-renderer.component.mjs +1 -1
- package/esm2022/lib/interaction/components/confirm-renderer/confirm-renderer.component.mjs +1 -1
- package/esm2022/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.mjs +1 -1
- package/esm2022/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.mjs +1 -1
- package/esm2022/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.mjs +1 -1
- package/esm2022/lib/interaction/components/editors/inline-string-editor/inline-editor-model.mjs +1 -1
- package/esm2022/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.mjs +1 -1
- package/esm2022/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.mjs +1 -1
- package/esm2022/lib/interaction/components/input-activities/input-activity.mjs +1 -1
- package/esm2022/lib/interaction/components/input-activities/select-input-activity.mjs +1 -1
- package/esm2022/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.mjs +1 -1
- package/esm2022/lib/interaction/components/slide-down-interaction-context/slide-down-interaction-context.component.mjs +1 -1
- package/esm2022/lib/interaction/directives/interaction-context-trigger-for.directive.mjs +1 -1
- package/esm2022/lib/interaction/in-place-interaction-context.mjs +1 -1
- package/esm2022/lib/interaction/interaction-context-provider.mjs +1 -1
- package/esm2022/lib/interaction/interaction-context.mjs +1 -1
- package/esm2022/lib/interaction/interaction.module.mjs +2 -2
- package/esm2022/lib/interaction/route-synchronisation-adapter.mjs +1 -1
- package/esm2022/lib/interaction/services/interaction-service-routing-adapter.mjs +1 -1
- package/esm2022/lib/interaction/services/interaction.service.mjs +1 -1
- package/esm2022/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.mjs +1 -1
- package/esm2022/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.mjs +1 -1
- package/esm2022/lib/interaction/services/modal-interaction-context.factory.mjs +1 -1
- package/esm2022/lib/place/components/abstract-place-navigation.component.mjs +1 -1
- package/esm2022/lib/place/components/place-outlet/place-outlet.component.mjs +1 -1
- package/esm2022/lib/place/guards/place.guard.mjs +1 -1
- package/esm2022/lib/place/navigation/place-component-deactivation-handler.mjs +1 -1
- package/esm2022/lib/place/navigation/session/abstract-pop-state-navigation.mjs +1 -1
- package/esm2022/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.mjs +1 -1
- package/esm2022/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-navigation-interaction-cancelation-type-determined.mjs +1 -1
- package/esm2022/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.mjs +1 -1
- package/esm2022/lib/place/navigation/session/interactions/navigating-during-interaction.mjs +1 -1
- package/esm2022/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.mjs +1 -1
- package/esm2022/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.mjs +1 -1
- package/esm2022/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.mjs +1 -1
- package/esm2022/lib/place/navigation/session/navigating.mjs +1 -1
- package/esm2022/lib/place/navigation/session/navigation-context.mjs +1 -1
- package/esm2022/lib/place/navigation/session/navigation-session.mjs +1 -1
- package/esm2022/lib/place/navigation/session/pop-state-navigation.mjs +1 -1
- package/esm2022/lib/place/place-access-guard.mjs +1 -1
- package/esm2022/lib/place/place-auth-service.mjs +3 -3
- package/esm2022/lib/place/place-component.mjs +6 -8
- package/esm2022/lib/place/place-definition.mjs +1 -1
- package/esm2022/lib/place/place-history.mjs +1 -1
- package/esm2022/lib/place/place-metadata.mjs +16 -0
- package/esm2022/lib/place/place-router.mjs +3 -3
- package/esm2022/lib/place/place.module.mjs +2 -2
- package/esm2022/lib/place/route/parameter-decorators.mjs +2 -2
- package/esm2022/lib/place/route/parameter-definition.mjs +1 -1
- package/esm2022/lib/place/route/parameter-sanitiser.mjs +1 -1
- package/esm2022/lib/place/route/parameter-snapshot.mjs +1 -1
- package/esm2022/lib/place/route/visit-segment-sanitiser.mjs +1 -1
- package/esm2022/lib/place/url-service.mjs +1 -1
- package/esm2022/lib/place/url-snapshot.mjs +1 -1
- package/esm2022/lib/place/visit-segment.mjs +1 -1
- package/esm2022/lib/place/visit.mjs +4 -4
- package/fesm2022/coolon-angular-ui-powerups.mjs +434 -423
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/commands/group/popup-aware.component.d.ts +1 -1
- package/lib/components/commands/group/popup-container.d.ts +1 -1
- package/lib/components/commands/group/popup-menu/abstract-popup-menu.component.d.ts +1 -1
- package/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.d.ts +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +1 -1
- package/lib/components/resize-aware.component.d.ts +1 -1
- package/lib/components/tables/abstract-table-model.d.ts +7 -7
- package/lib/components/tables/abstract-table.component.d.ts +2 -2
- package/lib/components/tables/column/column-manager.d.ts +1 -1
- package/lib/components/tables/column/column-model.d.ts +5 -5
- package/lib/components/tables/column/column-order-manager.d.ts +1 -1
- package/lib/components/tables/column/custom-template-column-model.d.ts +1 -1
- package/lib/components/tables/column/custom-value-column-model.d.ts +2 -2
- package/lib/components/tables/column/list-propery-column-model.d.ts +2 -2
- package/lib/components/tables/column/property-column-model.d.ts +4 -4
- package/lib/components/tables/column/selection-column-model.d.ts +1 -1
- package/lib/components/tables/filter/enable-cell-text-search.decorator.d.ts +1 -1
- package/lib/components/tables/filter/table-filter-model.d.ts +1 -1
- package/lib/components/tables/renderer/abstract-cell-renderer.d.ts +1 -1
- package/lib/components/tables/renderer/cell-portal-ref.d.ts +3 -3
- package/lib/components/tables/renderer/default-cell-renderer/default-cell-renderer.component.d.ts +1 -1
- package/lib/components/tables/renderer/editable-cell-renderer.d.ts +1 -1
- package/lib/components/tables/renderer/table-action-column/menu-builder.d.ts +1 -1
- package/lib/components/tables/renderer/table-action-column/table-action-column.component.d.ts +4 -4
- package/lib/components/tables/renderer/table-body/table-body.component.d.ts +1 -1
- package/lib/components/tables/renderer/table-cell/table-cell.component.d.ts +1 -1
- package/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu-popup.component.d.ts +2 -2
- package/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu.component.d.ts +2 -2
- package/lib/components/tables/table/table.component.d.ts +1 -1
- package/lib/components/tables/tree-table/flattened-tree-list-model.d.ts +1 -1
- package/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.d.ts +2 -2
- package/lib/components/tables/tree-table/tree-label-column-model.d.ts +2 -2
- package/lib/components/tables/tree-table/tree-table-component.d.ts +2 -2
- package/lib/components/tables/tree-table/tree-table-model.d.ts +1 -1
- package/lib/interaction/abstract-interaction-context.d.ts +4 -4
- package/lib/interaction/activity-context.d.ts +1 -1
- package/lib/interaction/activity-ref.d.ts +2 -2
- package/lib/interaction/activity.d.ts +1 -1
- package/lib/interaction/components/abstract-confirm-dialog.component.d.ts +1 -1
- package/lib/interaction/components/abstract-dialog.component.d.ts +1 -1
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +3 -3
- package/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.d.ts +2 -2
- package/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.d.ts +2 -2
- package/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.d.ts +1 -1
- package/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.d.ts +1 -1
- package/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.d.ts +1 -1
- package/lib/interaction/components/add-card-activity/add-card-activity.component.d.ts +2 -2
- package/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.d.ts +1 -1
- package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +1 -1
- package/lib/interaction/components/alert-renderer/alert-renderer.component.d.ts +1 -1
- package/lib/interaction/components/confirm-renderer/confirm-renderer.component.d.ts +1 -1
- package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +2 -2
- package/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.d.ts +2 -2
- package/lib/interaction/components/editors/inline-string-editor/inline-editor-model.d.ts +1 -1
- package/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.d.ts +1 -1
- package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +5 -5
- package/lib/interaction/components/input-activities/input-activity.d.ts +1 -1
- package/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.d.ts +1 -1
- package/lib/interaction/components/slide-down-interaction-context/slide-down-interaction-context.component.d.ts +5 -5
- package/lib/interaction/directives/interaction-context-trigger-for.directive.d.ts +2 -2
- package/lib/interaction/in-place-interaction-context.d.ts +2 -2
- package/lib/interaction/interaction-context-provider.d.ts +2 -2
- package/lib/interaction/interaction-context.d.ts +3 -3
- package/lib/interaction/route-synchronisation-adapter.d.ts +2 -2
- package/lib/interaction/services/interaction-service-routing-adapter.d.ts +2 -2
- package/lib/interaction/services/interaction.service.d.ts +3 -3
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.d.ts +2 -2
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +3 -3
- package/lib/interaction/services/modal-interaction-context.factory.d.ts +2 -2
- package/lib/place/components/abstract-place-navigation.component.d.ts +2 -2
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +3 -3
- package/lib/place/guards/place.guard.d.ts +1 -1
- package/lib/place/navigation/place-component-deactivation-handler.d.ts +4 -4
- package/lib/place/navigation/session/abstract-pop-state-navigation.d.ts +1 -1
- package/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.d.ts +3 -3
- package/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-navigation-interaction-cancelation-type-determined.d.ts +3 -3
- package/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.d.ts +3 -3
- package/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.d.ts +1 -1
- package/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.d.ts +1 -1
- package/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.d.ts +1 -1
- package/lib/place/navigation/session/navigation-context.d.ts +5 -5
- package/lib/place/navigation/session/navigation-session.d.ts +8 -8
- package/lib/place/place-access-guard.d.ts +1 -1
- package/lib/place/place-auth-service.d.ts +3 -3
- package/lib/place/place-component.d.ts +5 -6
- package/lib/place/place-definition.d.ts +2 -2
- package/lib/place/place-history.d.ts +3 -3
- package/lib/place/place-metadata.d.ts +8 -0
- package/lib/place/place-router.d.ts +4 -4
- package/lib/place/route/parameter-decorators.d.ts +2 -2
- package/lib/place/route/parameter-definition.d.ts +3 -3
- package/lib/place/route/parameter-sanitiser.d.ts +1 -1
- package/lib/place/route/parameter-snapshot.d.ts +1 -1
- package/lib/place/route/visit-segment-sanitiser.d.ts +3 -3
- package/lib/place/url-service.d.ts +1 -1
- package/lib/place/url-snapshot.d.ts +1 -1
- package/lib/place/visit-segment.d.ts +2 -2
- package/lib/place/visit.d.ts +2 -2
- package/package.json +3 -3
|
@@ -58,7 +58,7 @@ import { A11yModule } from '@angular/cdk/a11y';
|
|
|
58
58
|
import * as i1$7 from '@angular/material/dialog';
|
|
59
59
|
import { MatDialogModule, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
60
60
|
import * as i1$5 from '@angular/router';
|
|
61
|
-
import {
|
|
61
|
+
import { UrlSegment, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterModule, ActivatedRoute, ActivatedRouteSnapshot } from '@angular/router';
|
|
62
62
|
import 'reflect-metadata';
|
|
63
63
|
import * as i1$6 from '@angular/cdk/overlay';
|
|
64
64
|
import { style, trigger, transition, animate, group, query } from '@angular/animations';
|
|
@@ -5843,145 +5843,6 @@ var DecoratedTreeNode;
|
|
|
5843
5843
|
DecoratedTreeNode.Decorator = Decorator;
|
|
5844
5844
|
})(DecoratedTreeNode || (DecoratedTreeNode = {}));
|
|
5845
5845
|
|
|
5846
|
-
class TreeLabelColumnModel extends ColumnModel {
|
|
5847
|
-
expansionModel;
|
|
5848
|
-
labelFactory = () => undefined;
|
|
5849
|
-
iconFactory;
|
|
5850
|
-
constructor(columnId, order, textPropertiesProvider, expansionModel) {
|
|
5851
|
-
super(columnId, order, textPropertiesProvider);
|
|
5852
|
-
this.expansionModel = expansionModel;
|
|
5853
|
-
this.cellRenderer(TreeLabelCellRendererComponent);
|
|
5854
|
-
}
|
|
5855
|
-
pluck(property) {
|
|
5856
|
-
this.useLabel(row => row[property]);
|
|
5857
|
-
}
|
|
5858
|
-
useLabel(factory) {
|
|
5859
|
-
this.labelFactory = factory;
|
|
5860
|
-
}
|
|
5861
|
-
/**
|
|
5862
|
-
* @deprecated use #useIcon instead.
|
|
5863
|
-
* @param factory
|
|
5864
|
-
*/
|
|
5865
|
-
addIcon(factory) {
|
|
5866
|
-
this.useIcon(factory);
|
|
5867
|
-
}
|
|
5868
|
-
useIcon(factory) {
|
|
5869
|
-
this.iconFactory = factory;
|
|
5870
|
-
}
|
|
5871
|
-
cellRenderer(componentType) {
|
|
5872
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
5873
|
-
if (firstTime) {
|
|
5874
|
-
component.treeTableModel = this.expansionModel;
|
|
5875
|
-
}
|
|
5876
|
-
component.value = rowData.row;
|
|
5877
|
-
component.label = this.labelFactory(rowData.row);
|
|
5878
|
-
component.iconFactory = this.iconFactory;
|
|
5879
|
-
}));
|
|
5880
|
-
return this;
|
|
5881
|
-
}
|
|
5882
|
-
}
|
|
5883
|
-
|
|
5884
|
-
// TODO:
|
|
5885
|
-
// Selection Models:
|
|
5886
|
-
// - as simple navigation tree
|
|
5887
|
-
// - as editable grid (selecte all, even hidden etc?)
|
|
5888
|
-
// - fixing selection on underlying model changes.
|
|
5889
|
-
// - rendering selection: row highlighting, checkboxes (in the tree renderer or in separate column), both.
|
|
5890
|
-
// Expansion Models:
|
|
5891
|
-
// - Add ability to auto show to depth
|
|
5892
|
-
// - Add a predicate to check default expansion (i.e. has children of a certain type)
|
|
5893
|
-
//
|
|
5894
|
-
class TreeTableModel extends AbstractTableModel {
|
|
5895
|
-
treeExpansionModel;
|
|
5896
|
-
flattenedDataSource;
|
|
5897
|
-
childExtractor;
|
|
5898
|
-
_isExpandedPredicate$ = this.registerDisposable(new DelegatingValueModel());
|
|
5899
|
-
constructor(source$, childAccessor, builder) {
|
|
5900
|
-
super();
|
|
5901
|
-
if (builder)
|
|
5902
|
-
builder(this);
|
|
5903
|
-
this.childExtractor = isFunction(childAccessor) ? childAccessor : row => row[childAccessor];
|
|
5904
|
-
this.addRowClass('aup-node-collapsed', row => this.isCollapsed(row));
|
|
5905
|
-
this.setDataSource(source$);
|
|
5906
|
-
}
|
|
5907
|
-
get isExpandedPredicate$() {
|
|
5908
|
-
return this._isExpandedPredicate$.readonly$;
|
|
5909
|
-
}
|
|
5910
|
-
bindToTable(expansionModel, filteredRows$, visibleRows$, cdr) {
|
|
5911
|
-
this.treeExpansionModel = expansionModel;
|
|
5912
|
-
// TODO: Move all the expansion model stuff out of here and have things use the expansion model directly
|
|
5913
|
-
this._isExpandedPredicate$.setDelegate(this.treeExpansionModel.isExpandedPredicate$);
|
|
5914
|
-
this._filteredRows$.setDelegate(filteredRows$);
|
|
5915
|
-
this._visibleRows$.setDelegate(visibleRows$);
|
|
5916
|
-
}
|
|
5917
|
-
treeControlColumn(builder) {
|
|
5918
|
-
const columnId = 'tree-label';
|
|
5919
|
-
const column = new TreeLabelColumnModel(columnId, this.columnManager, () => this.getColumnTextProperties(columnId), this);
|
|
5920
|
-
builder(column);
|
|
5921
|
-
this.addColumn(column);
|
|
5922
|
-
}
|
|
5923
|
-
expand(node) {
|
|
5924
|
-
this.treeExpansionModel.expand(node);
|
|
5925
|
-
}
|
|
5926
|
-
collapse(node) {
|
|
5927
|
-
this.treeExpansionModel.collapse(node);
|
|
5928
|
-
}
|
|
5929
|
-
isCollapsed(node) {
|
|
5930
|
-
return this.treeExpansionModel.isCollapsed(node);
|
|
5931
|
-
}
|
|
5932
|
-
ensureAncestorsAndSelfVisible(node) {
|
|
5933
|
-
this.treeExpansionModel.ensureAncestorsAndSelfVisible(node);
|
|
5934
|
-
}
|
|
5935
|
-
isExpanded(row) {
|
|
5936
|
-
return this.treeExpansionModel.isExpanded(row);
|
|
5937
|
-
}
|
|
5938
|
-
}
|
|
5939
|
-
// export class FlattenStrategy<T extends VisitableTree<any>> extends SelfAndDescendantsVisitor<T> {
|
|
5940
|
-
//
|
|
5941
|
-
// private _areas: T[] = [];
|
|
5942
|
-
// private _collapsed: Set<T>;
|
|
5943
|
-
//
|
|
5944
|
-
// constructor(private collapsedIds: T[]) {
|
|
5945
|
-
// super();
|
|
5946
|
-
// this._collapsed = new Set<T>(collapsedIds);
|
|
5947
|
-
// }
|
|
5948
|
-
//
|
|
5949
|
-
// protected onVisit(it: T) {
|
|
5950
|
-
// this._areas.push(it);
|
|
5951
|
-
// }
|
|
5952
|
-
//
|
|
5953
|
-
// protected shouldVisitChildrenOf(it: T): boolean {
|
|
5954
|
-
// return !this._collapsed.has(it);
|
|
5955
|
-
// }
|
|
5956
|
-
//
|
|
5957
|
-
// get flattenedAreas(): T[] {
|
|
5958
|
-
// return this._areas;
|
|
5959
|
-
// }
|
|
5960
|
-
//
|
|
5961
|
-
// }
|
|
5962
|
-
// class DecoratorCache {
|
|
5963
|
-
//
|
|
5964
|
-
// private map = new Map<number, T>();
|
|
5965
|
-
//
|
|
5966
|
-
// get(area:T): T {
|
|
5967
|
-
//
|
|
5968
|
-
// if (!area) return null;
|
|
5969
|
-
//
|
|
5970
|
-
// let decoratedArea = this.map.get(area.id);
|
|
5971
|
-
// if (!decoratedArea) {
|
|
5972
|
-
// decoratedArea = TreeModel.AreaDecorator.decorate(area);
|
|
5973
|
-
// this.map.set(area.id, decoratedArea);
|
|
5974
|
-
// }
|
|
5975
|
-
// return decoratedArea;
|
|
5976
|
-
// }
|
|
5977
|
-
//
|
|
5978
|
-
// clear() {
|
|
5979
|
-
// this.map.clear();
|
|
5980
|
-
// }
|
|
5981
|
-
//
|
|
5982
|
-
//
|
|
5983
|
-
// }
|
|
5984
|
-
|
|
5985
5846
|
class TreeLabelCellRendererComponent extends DisposableComponent {
|
|
5986
5847
|
node$ = new MutableValueModel();
|
|
5987
5848
|
#value_accessor_storage;
|
|
@@ -6172,6 +6033,145 @@ class TreeExpansionModel extends GarbageCollector {
|
|
|
6172
6033
|
}
|
|
6173
6034
|
ProxyRegistry.registerOneTimeBinding(TreeExpansionModel);
|
|
6174
6035
|
|
|
6036
|
+
class TreeLabelColumnModel extends ColumnModel {
|
|
6037
|
+
expansionModel;
|
|
6038
|
+
labelFactory = () => undefined;
|
|
6039
|
+
iconFactory;
|
|
6040
|
+
constructor(columnId, order, textPropertiesProvider, expansionModel) {
|
|
6041
|
+
super(columnId, order, textPropertiesProvider);
|
|
6042
|
+
this.expansionModel = expansionModel;
|
|
6043
|
+
this.cellRenderer(TreeLabelCellRendererComponent);
|
|
6044
|
+
}
|
|
6045
|
+
pluck(property) {
|
|
6046
|
+
this.useLabel(row => row[property]);
|
|
6047
|
+
}
|
|
6048
|
+
useLabel(factory) {
|
|
6049
|
+
this.labelFactory = factory;
|
|
6050
|
+
}
|
|
6051
|
+
/**
|
|
6052
|
+
* @deprecated use #useIcon instead.
|
|
6053
|
+
* @param factory
|
|
6054
|
+
*/
|
|
6055
|
+
addIcon(factory) {
|
|
6056
|
+
this.useIcon(factory);
|
|
6057
|
+
}
|
|
6058
|
+
useIcon(factory) {
|
|
6059
|
+
this.iconFactory = factory;
|
|
6060
|
+
}
|
|
6061
|
+
cellRenderer(componentType) {
|
|
6062
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
6063
|
+
if (firstTime) {
|
|
6064
|
+
component.treeTableModel = this.expansionModel;
|
|
6065
|
+
}
|
|
6066
|
+
component.value = rowData.row;
|
|
6067
|
+
component.label = this.labelFactory(rowData.row);
|
|
6068
|
+
component.iconFactory = this.iconFactory;
|
|
6069
|
+
}));
|
|
6070
|
+
return this;
|
|
6071
|
+
}
|
|
6072
|
+
}
|
|
6073
|
+
|
|
6074
|
+
// TODO:
|
|
6075
|
+
// Selection Models:
|
|
6076
|
+
// - as simple navigation tree
|
|
6077
|
+
// - as editable grid (selecte all, even hidden etc?)
|
|
6078
|
+
// - fixing selection on underlying model changes.
|
|
6079
|
+
// - rendering selection: row highlighting, checkboxes (in the tree renderer or in separate column), both.
|
|
6080
|
+
// Expansion Models:
|
|
6081
|
+
// - Add ability to auto show to depth
|
|
6082
|
+
// - Add a predicate to check default expansion (i.e. has children of a certain type)
|
|
6083
|
+
//
|
|
6084
|
+
class TreeTableModel extends AbstractTableModel {
|
|
6085
|
+
treeExpansionModel;
|
|
6086
|
+
flattenedDataSource;
|
|
6087
|
+
childExtractor;
|
|
6088
|
+
_isExpandedPredicate$ = this.registerDisposable(new DelegatingValueModel());
|
|
6089
|
+
constructor(source$, childAccessor, builder) {
|
|
6090
|
+
super();
|
|
6091
|
+
if (builder)
|
|
6092
|
+
builder(this);
|
|
6093
|
+
this.childExtractor = isFunction(childAccessor) ? childAccessor : row => row[childAccessor];
|
|
6094
|
+
this.addRowClass('aup-node-collapsed', row => this.isCollapsed(row));
|
|
6095
|
+
this.setDataSource(source$);
|
|
6096
|
+
}
|
|
6097
|
+
get isExpandedPredicate$() {
|
|
6098
|
+
return this._isExpandedPredicate$.readonly$;
|
|
6099
|
+
}
|
|
6100
|
+
bindToTable(expansionModel, filteredRows$, visibleRows$, cdr) {
|
|
6101
|
+
this.treeExpansionModel = expansionModel;
|
|
6102
|
+
// TODO: Move all the expansion model stuff out of here and have things use the expansion model directly
|
|
6103
|
+
this._isExpandedPredicate$.setDelegate(this.treeExpansionModel.isExpandedPredicate$);
|
|
6104
|
+
this._filteredRows$.setDelegate(filteredRows$);
|
|
6105
|
+
this._visibleRows$.setDelegate(visibleRows$);
|
|
6106
|
+
}
|
|
6107
|
+
treeControlColumn(builder) {
|
|
6108
|
+
const columnId = 'tree-label';
|
|
6109
|
+
const column = new TreeLabelColumnModel(columnId, this.columnManager, () => this.getColumnTextProperties(columnId), this);
|
|
6110
|
+
builder(column);
|
|
6111
|
+
this.addColumn(column);
|
|
6112
|
+
}
|
|
6113
|
+
expand(node) {
|
|
6114
|
+
this.treeExpansionModel.expand(node);
|
|
6115
|
+
}
|
|
6116
|
+
collapse(node) {
|
|
6117
|
+
this.treeExpansionModel.collapse(node);
|
|
6118
|
+
}
|
|
6119
|
+
isCollapsed(node) {
|
|
6120
|
+
return this.treeExpansionModel.isCollapsed(node);
|
|
6121
|
+
}
|
|
6122
|
+
ensureAncestorsAndSelfVisible(node) {
|
|
6123
|
+
this.treeExpansionModel.ensureAncestorsAndSelfVisible(node);
|
|
6124
|
+
}
|
|
6125
|
+
isExpanded(row) {
|
|
6126
|
+
return this.treeExpansionModel.isExpanded(row);
|
|
6127
|
+
}
|
|
6128
|
+
}
|
|
6129
|
+
// export class FlattenStrategy<T extends VisitableTree<any>> extends SelfAndDescendantsVisitor<T> {
|
|
6130
|
+
//
|
|
6131
|
+
// private _areas: T[] = [];
|
|
6132
|
+
// private _collapsed: Set<T>;
|
|
6133
|
+
//
|
|
6134
|
+
// constructor(private collapsedIds: T[]) {
|
|
6135
|
+
// super();
|
|
6136
|
+
// this._collapsed = new Set<T>(collapsedIds);
|
|
6137
|
+
// }
|
|
6138
|
+
//
|
|
6139
|
+
// protected onVisit(it: T) {
|
|
6140
|
+
// this._areas.push(it);
|
|
6141
|
+
// }
|
|
6142
|
+
//
|
|
6143
|
+
// protected shouldVisitChildrenOf(it: T): boolean {
|
|
6144
|
+
// return !this._collapsed.has(it);
|
|
6145
|
+
// }
|
|
6146
|
+
//
|
|
6147
|
+
// get flattenedAreas(): T[] {
|
|
6148
|
+
// return this._areas;
|
|
6149
|
+
// }
|
|
6150
|
+
//
|
|
6151
|
+
// }
|
|
6152
|
+
// class DecoratorCache {
|
|
6153
|
+
//
|
|
6154
|
+
// private map = new Map<number, T>();
|
|
6155
|
+
//
|
|
6156
|
+
// get(area:T): T {
|
|
6157
|
+
//
|
|
6158
|
+
// if (!area) return null;
|
|
6159
|
+
//
|
|
6160
|
+
// let decoratedArea = this.map.get(area.id);
|
|
6161
|
+
// if (!decoratedArea) {
|
|
6162
|
+
// decoratedArea = TreeModel.AreaDecorator.decorate(area);
|
|
6163
|
+
// this.map.set(area.id, decoratedArea);
|
|
6164
|
+
// }
|
|
6165
|
+
// return decoratedArea;
|
|
6166
|
+
// }
|
|
6167
|
+
//
|
|
6168
|
+
// clear() {
|
|
6169
|
+
// this.map.clear();
|
|
6170
|
+
// }
|
|
6171
|
+
//
|
|
6172
|
+
//
|
|
6173
|
+
// }
|
|
6174
|
+
|
|
6175
6175
|
/**
|
|
6176
6176
|
* Create your model:
|
|
6177
6177
|
* @example
|
|
@@ -6707,49 +6707,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
6707
6707
|
CommandFaceComponent,
|
|
6708
6708
|
MoreMenuComponent,
|
|
6709
6709
|
SeparatorComponent,
|
|
6710
|
-
FlexComponent,
|
|
6711
|
-
TreeTableComponent,
|
|
6712
|
-
BusyOverlayComponent,
|
|
6713
|
-
EmptyStateComponent,
|
|
6714
|
-
PaginatorComponent,
|
|
6715
|
-
LabelledValueComponent,
|
|
6716
|
-
LoadingContainerComponent,
|
|
6717
|
-
MarkdownComponent,
|
|
6718
|
-
TableCustomMoreMenuComponent,
|
|
6719
|
-
TableCustomMoreMenuPopupComponent,
|
|
6720
|
-
SearchInputComponent,
|
|
6721
|
-
ButtonRendererComponent,
|
|
6722
|
-
],
|
|
6723
|
-
providers: [FocusBindingFactory, MarkdownService],
|
|
6724
|
-
}]
|
|
6725
|
-
}] });
|
|
6726
|
-
|
|
6727
|
-
class TextSearchContext {
|
|
6728
|
-
row;
|
|
6729
|
-
searchText;
|
|
6730
|
-
searchRegex;
|
|
6731
|
-
constructor(row, searchText, searchRegex) {
|
|
6732
|
-
this.row = row;
|
|
6733
|
-
this.searchText = searchText;
|
|
6734
|
-
this.searchRegex = searchRegex;
|
|
6735
|
-
}
|
|
6736
|
-
getOrCreate(type, create) {
|
|
6737
|
-
// TODO: stub awaiting per-context cache implementation
|
|
6738
|
-
}
|
|
6739
|
-
matchesText(text) {
|
|
6740
|
-
return this.searchRegex.test(text);
|
|
6741
|
-
}
|
|
6742
|
-
}
|
|
6743
|
-
|
|
6744
|
-
class AbstractCellRenderer extends LoadableComponent {
|
|
6745
|
-
constructor() {
|
|
6746
|
-
super();
|
|
6747
|
-
}
|
|
6748
|
-
}
|
|
6749
|
-
|
|
6750
|
-
/**
|
|
6751
|
-
* @file Automatically generated by barrelsby.
|
|
6752
|
-
*/
|
|
6710
|
+
FlexComponent,
|
|
6711
|
+
TreeTableComponent,
|
|
6712
|
+
BusyOverlayComponent,
|
|
6713
|
+
EmptyStateComponent,
|
|
6714
|
+
PaginatorComponent,
|
|
6715
|
+
LabelledValueComponent,
|
|
6716
|
+
LoadingContainerComponent,
|
|
6717
|
+
MarkdownComponent,
|
|
6718
|
+
TableCustomMoreMenuComponent,
|
|
6719
|
+
TableCustomMoreMenuPopupComponent,
|
|
6720
|
+
SearchInputComponent,
|
|
6721
|
+
ButtonRendererComponent,
|
|
6722
|
+
],
|
|
6723
|
+
providers: [FocusBindingFactory, MarkdownService],
|
|
6724
|
+
}]
|
|
6725
|
+
}] });
|
|
6753
6726
|
|
|
6754
6727
|
const ACTIVITY_DATA = new InjectionToken("InteractionActivityData");
|
|
6755
6728
|
// eslint-disable-next-line @angular-eslint/component-class-suffix
|
|
@@ -7334,6 +7307,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
7334
7307
|
InteractionService.ApiAdapter = ApiAdapter;
|
|
7335
7308
|
})(InteractionService || (InteractionService = {}));
|
|
7336
7309
|
|
|
7310
|
+
// Raw place metadata access, split out of place-component.ts so collaborators that
|
|
7311
|
+
// PlaceComponent itself depends on (visit, place-router, place-auth-service) can read
|
|
7312
|
+
// definitions without a value-level import cycle. Use PlaceComponent.getDefinition /
|
|
7313
|
+
// injectDefinition unless importing place-component.ts would create a cycle.
|
|
7314
|
+
// RAKE: making this Symbol(...) broke things.
|
|
7315
|
+
const DEFINITION_META_DATA_KEY = 'PLACE_DEFINITION_OPTIONS';
|
|
7316
|
+
// this one seems ok.
|
|
7317
|
+
const ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
|
|
7318
|
+
function getPlaceDefinition(placeComponent) {
|
|
7319
|
+
return Reflect.getMetadata(DEFINITION_META_DATA_KEY, placeComponent);
|
|
7320
|
+
}
|
|
7321
|
+
function setPlaceDefinition(placeComponent, definition) {
|
|
7322
|
+
Reflect.defineMetadata(DEFINITION_META_DATA_KEY, definition, placeComponent);
|
|
7323
|
+
}
|
|
7324
|
+
|
|
7337
7325
|
var ParameterSanitiser;
|
|
7338
7326
|
(function (ParameterSanitiser) {
|
|
7339
7327
|
class Factory {
|
|
@@ -7646,242 +7634,39 @@ class PlaceDefinition {
|
|
|
7646
7634
|
}
|
|
7647
7635
|
__decorate([
|
|
7648
7636
|
Memoize(),
|
|
7649
|
-
__metadata("design:type", Function),
|
|
7650
|
-
__metadata("design:paramtypes", []),
|
|
7651
|
-
__metadata("design:returntype", Array)
|
|
7652
|
-
], PlaceDefinition.prototype, "ancestors", null);
|
|
7653
|
-
__decorate([
|
|
7654
|
-
Memoize(),
|
|
7655
|
-
__metadata("design:type", Function),
|
|
7656
|
-
__metadata("design:paramtypes", []),
|
|
7657
|
-
__metadata("design:returntype", Array)
|
|
7658
|
-
], PlaceDefinition.prototype, "ancestorsAndSelf", null);
|
|
7659
|
-
__decorate([
|
|
7660
|
-
Memoize(),
|
|
7661
|
-
__metadata("design:type", String),
|
|
7662
|
-
__metadata("design:paramtypes", [])
|
|
7663
|
-
], PlaceDefinition.prototype, "placeId", null);
|
|
7664
|
-
__decorate([
|
|
7665
|
-
Memoize(),
|
|
7666
|
-
__metadata("design:type", Function),
|
|
7667
|
-
__metadata("design:paramtypes", []),
|
|
7668
|
-
__metadata("design:returntype", ParameterDefinition)
|
|
7669
|
-
], PlaceDefinition.prototype, "getRouteIdParameterDef", null);
|
|
7670
|
-
__decorate([
|
|
7671
|
-
Memoize(),
|
|
7672
|
-
__metadata("design:type", Function),
|
|
7673
|
-
__metadata("design:paramtypes", [Object]),
|
|
7674
|
-
__metadata("design:returntype", Array)
|
|
7675
|
-
], PlaceDefinition.prototype, "getRouteParameterDefs", null);
|
|
7676
|
-
__decorate([
|
|
7677
|
-
Memoize(),
|
|
7678
|
-
__metadata("design:type", Function),
|
|
7679
|
-
__metadata("design:paramtypes", [Object]),
|
|
7680
|
-
__metadata("design:returntype", Array)
|
|
7681
|
-
], PlaceDefinition.prototype, "getVisitParameterDefs", null);
|
|
7682
|
-
|
|
7683
|
-
// RAKE: making this Symbol(...) broke things.
|
|
7684
|
-
const DEFINITION_META_DATA_KEY = 'PLACE_DEFINITION_OPTIONS';
|
|
7685
|
-
// this one seems ok.
|
|
7686
|
-
const ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
|
|
7687
|
-
// class ParameterChangeInterceptor<T> {
|
|
7688
|
-
// constructor(parameterDef: ParameterDefinition<T>, model: ValueModel<T>, callback: PlaceComponent.InterceptCallback<T>, options: PlaceComponent.InterceptOptions) {
|
|
7689
|
-
// }
|
|
7690
|
-
//
|
|
7691
|
-
// async canProceed(nextState: VisitSegment, interactionContext: InteractionContext) {
|
|
7692
|
-
// return true;
|
|
7693
|
-
// }
|
|
7694
|
-
// }
|
|
7695
|
-
class PlaceComponent extends LoadableComponent {
|
|
7696
|
-
_placeReadyCallbacks = [];
|
|
7697
|
-
visit$ = new MutableValueModel();
|
|
7698
|
-
_inVisitUpdate = new Guard();
|
|
7699
|
-
_active = new MutableValueModel(false);
|
|
7700
|
-
interactionContext;
|
|
7701
|
-
childPlaces$;
|
|
7702
|
-
// private readonly _parameterChangeInterceptors: ParameterChangeInterceptor<any>[] = [];
|
|
7703
|
-
placeId;
|
|
7704
|
-
placeRouter = inject(PlaceRouter);
|
|
7705
|
-
activatedRoute = inject(ActivatedRoute);
|
|
7706
|
-
constructor() {
|
|
7707
|
-
super();
|
|
7708
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
7709
|
-
when(this._active).becomesTruthy(() => this._notifyPlaceReady());
|
|
7710
|
-
this.childPlaces$ = ListModel.constant(this.placeDefinition.children.map(d => d.component));
|
|
7711
|
-
this.placeId = this.placeDefinition.placeId;
|
|
7712
|
-
if (isEmpty(this.placeId)) {
|
|
7713
|
-
lang.illegalState("placeId property is missing from the route data parameters");
|
|
7714
|
-
}
|
|
7715
|
-
}
|
|
7716
|
-
initialiseVisit(visit, notifyVisitChanged) {
|
|
7717
|
-
assert.isNil(this.visit$.value);
|
|
7718
|
-
const { when } = Dsl.disposeWith(this);
|
|
7719
|
-
this.visit$.value = visit;
|
|
7720
|
-
DebugContext.getOrCreate(this.visit$).tag(`${this.placeDefinition.component.name}.visit$`);
|
|
7721
|
-
// we track if the any of the bindings updated the route. If so we remember it and update the
|
|
7722
|
-
// route in one go at the end.
|
|
7723
|
-
this.placeDefinition
|
|
7724
|
-
.getVisitParameterDefs()
|
|
7725
|
-
.forEach(parameterDef => this.installAndInitialiseBinding(visit, parameterDef));
|
|
7726
|
-
when(this.visit$).changes((current, previous) => {
|
|
7727
|
-
notifyVisitChanged(current, previous);
|
|
7728
|
-
}, { unless: this._inVisitUpdate });
|
|
7729
|
-
// TODO: this needs to do a replace url option so that the new url isn't put in the history.... for
|
|
7730
|
-
// now we're not doing it as it's a fair bit of effort and will only affect people if they're
|
|
7731
|
-
// cutting and pasting urls to each other.
|
|
7732
|
-
// // the binding process can update the visit (e.g. if a selection model has already selected during
|
|
7733
|
-
// // component construction) and there was no value specified in the route
|
|
7734
|
-
// if (visit.hasRoutingChangedFrom(this.visitModel.value)) {
|
|
7735
|
-
// notifyVisitChanged(this.visitModel.value, visit)
|
|
7736
|
-
// }
|
|
7737
|
-
}
|
|
7738
|
-
get childPlaces() {
|
|
7739
|
-
return this.childPlaces$.value;
|
|
7740
|
-
}
|
|
7741
|
-
updateVisit(visit) {
|
|
7742
|
-
assert.isTruthy(this.isInitialised());
|
|
7743
|
-
assert.notNil(visit);
|
|
7744
|
-
this._inVisitUpdate.whileTrue(() => {
|
|
7745
|
-
this.visit$.value = visit;
|
|
7746
|
-
});
|
|
7747
|
-
}
|
|
7748
|
-
isInitialised() {
|
|
7749
|
-
return !!this.visit$.value;
|
|
7750
|
-
}
|
|
7751
|
-
// @Trace()
|
|
7752
|
-
/**
|
|
7753
|
-
* Initialised the component bindings. If any binding has an initial model value (e.g. a selection model
|
|
7754
|
-
* initialised during the constructor) and the route has nothing, then the visit will be udpated and this
|
|
7755
|
-
* method will return ture to nofiy the the visit has changed.
|
|
7756
|
-
*/
|
|
7757
|
-
installAndInitialiseBinding(initialVisit, parameterDef) {
|
|
7758
|
-
const model = this[parameterDef.propertyName];
|
|
7759
|
-
assert.notNil(model);
|
|
7760
|
-
DebugContext.tag(model, `${this.placeDefinition.component.name}.${parameterDef.propertyName}`);
|
|
7761
|
-
const binding = this.registerDisposable(new Binding(this.visit$, model, {
|
|
7762
|
-
toRight(visit) {
|
|
7763
|
-
const value = visit.getParameterValue(parameterDef);
|
|
7764
|
-
// console.log('push to component', { name: parameterDef.name, value, visit });
|
|
7765
|
-
return value;
|
|
7766
|
-
},
|
|
7767
|
-
toLeft(value, currentVisit) {
|
|
7768
|
-
// console.log('push to route', { name: parameterDef.name, value, currentVisit });
|
|
7769
|
-
return currentVisit.replace(parameterDef, value);
|
|
7770
|
-
}
|
|
7771
|
-
}));
|
|
7772
|
-
// Now we need to initialise the binding direction. If we have a value in the Url then we should always push
|
|
7773
|
-
// that to the view. If we don't and the view already has a value (e.g. a selection model has already initialised in the
|
|
7774
|
-
// component constructor) then we should push that to the route.
|
|
7775
|
-
const isInVisit = !isNil(initialVisit.getParameterValue(parameterDef));
|
|
7776
|
-
const isInModel = !isNil(model.value);
|
|
7777
|
-
if (!isInVisit && isInModel) {
|
|
7778
|
-
binding.writeLeft(); // push it to the route
|
|
7779
|
-
}
|
|
7780
|
-
else {
|
|
7781
|
-
binding.writeRight(); // push it to the model
|
|
7782
|
-
}
|
|
7783
|
-
}
|
|
7784
|
-
get placeDefinition() {
|
|
7785
|
-
const definition = PlaceComponent.getDefinition(this.constructor);
|
|
7786
|
-
if (!definition) {
|
|
7787
|
-
lang.illegalState(`${this.constructor.name} extends PlaceComponent but doesn't have @Place({..}) decorator.`);
|
|
7788
|
-
}
|
|
7789
|
-
return definition;
|
|
7790
|
-
}
|
|
7791
|
-
get active() {
|
|
7792
|
-
return this._active.readonly$;
|
|
7793
|
-
}
|
|
7794
|
-
/**
|
|
7795
|
-
* Called by the router to see if this component can deactivate. This isn't called for route parameter changes.
|
|
7796
|
-
* @param interactionContext
|
|
7797
|
-
*/
|
|
7798
|
-
async _canLeavePlace(interactionContext) {
|
|
7799
|
-
return this.canDeactivate ? this.canDeactivate(interactionContext) : true;
|
|
7800
|
-
}
|
|
7801
|
-
/**
|
|
7802
|
-
* Called by the router to see if this component can deactivate. This isn't called for route parameter changes.
|
|
7803
|
-
* @param interactionContext
|
|
7804
|
-
* @param nextState
|
|
7805
|
-
*/
|
|
7806
|
-
async _canChangeRouteParameters(interactionContext, nextState) {
|
|
7807
|
-
// if (this._parameterChangeInterceptors.length > 0) {
|
|
7808
|
-
// const visit = nextState.createVisitSegmentFor(this.placeDefinition);
|
|
7809
|
-
// for (let i = 0; i < this._parameterChangeInterceptors.length; i++) {
|
|
7810
|
-
// const interceptor = this._parameterChangeInterceptors[i];
|
|
7811
|
-
// const keepGoing = await interceptor.canProceed(visit, interactionContext);
|
|
7812
|
-
// if (!keepGoing) {
|
|
7813
|
-
// return false;
|
|
7814
|
-
// }
|
|
7815
|
-
// }
|
|
7816
|
-
// }
|
|
7817
|
-
return true;
|
|
7818
|
-
}
|
|
7819
|
-
/**
|
|
7820
|
-
* Called by the router when the place is ready to interact after any animations have run.
|
|
7821
|
-
*/
|
|
7822
|
-
_notifyActive(active) {
|
|
7823
|
-
this._active.value = active;
|
|
7824
|
-
}
|
|
7825
|
-
/**
|
|
7826
|
-
* Called by the router when the place is ready to interact after any animations have run.
|
|
7827
|
-
*/
|
|
7828
|
-
_notifyPlaceReady() {
|
|
7829
|
-
if (this.onPlaceReady.length === 1) {
|
|
7830
|
-
this._placeReadyCallbacks.forEach(callback => callback());
|
|
7831
|
-
}
|
|
7832
|
-
else {
|
|
7833
|
-
console.warn('Overriding PlaceComponent.onPlaceReady has been deprecated. Use PlaceComponent.onPlaceReady(() => {... do stuff...}) instead.');
|
|
7834
|
-
this.onPlaceReady(undefined);
|
|
7835
|
-
}
|
|
7836
|
-
}
|
|
7837
|
-
onPlaceReady(callback) {
|
|
7838
|
-
this._placeReadyCallbacks.push(callback);
|
|
7839
|
-
}
|
|
7840
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: PlaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
7841
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.9", type: PlaceComponent, host: { properties: { "attr.place-id": "this.placeId" } }, usesInheritance: true, ngImport: i0 });
|
|
7842
|
-
}
|
|
7843
|
-
__decorate([
|
|
7844
|
-
MemoizeGet(),
|
|
7845
|
-
__metadata("design:type", PlaceDefinition),
|
|
7846
|
-
__metadata("design:paramtypes", [])
|
|
7847
|
-
], PlaceComponent.prototype, "placeDefinition", null);
|
|
7848
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: PlaceComponent, decorators: [{
|
|
7849
|
-
type: Directive
|
|
7850
|
-
}], ctorParameters: function () { return []; }, propDecorators: { placeId: [{
|
|
7851
|
-
type: HostBinding,
|
|
7852
|
-
args: ["attr.place-id"]
|
|
7853
|
-
}], placeDefinition: [] } });
|
|
7854
|
-
(function (PlaceComponent) {
|
|
7855
|
-
function isPlaceComponentConstructor(target) {
|
|
7856
|
-
return lang.constructorChain(target).includes(PlaceComponent);
|
|
7857
|
-
}
|
|
7858
|
-
PlaceComponent.isPlaceComponentConstructor = isPlaceComponentConstructor;
|
|
7859
|
-
function getRouteParameters(klass) {
|
|
7860
|
-
return Klass.get(klass).getMetadataList(ROUTE_PARAMETER_LIST_KEY);
|
|
7861
|
-
}
|
|
7862
|
-
PlaceComponent.getRouteParameters = getRouteParameters;
|
|
7863
|
-
function getDefinition(snapshotOrConstructor) {
|
|
7864
|
-
if (snapshotOrConstructor instanceof ActivatedRouteSnapshot) {
|
|
7865
|
-
const component = snapshotOrConstructor.component;
|
|
7866
|
-
if (!isPlaceComponentConstructor(component)) {
|
|
7867
|
-
throw new Error(`ActivatedRouteSnapshot component is not a PlaceComponent, got ${component}`);
|
|
7868
|
-
}
|
|
7869
|
-
return Reflect.getMetadata(DEFINITION_META_DATA_KEY, component);
|
|
7870
|
-
}
|
|
7871
|
-
else {
|
|
7872
|
-
return Reflect.getMetadata(DEFINITION_META_DATA_KEY, snapshotOrConstructor);
|
|
7873
|
-
}
|
|
7874
|
-
}
|
|
7875
|
-
PlaceComponent.getDefinition = getDefinition;
|
|
7876
|
-
function injectDefinition(klass, definition) {
|
|
7877
|
-
Reflect.defineMetadata(DEFINITION_META_DATA_KEY, definition, klass);
|
|
7878
|
-
}
|
|
7879
|
-
PlaceComponent.injectDefinition = injectDefinition;
|
|
7880
|
-
// export type InterceptCallback<T> = (is: T, was: T, interactionContext: InteractionContext) => boolean | Promise<boolean>;
|
|
7881
|
-
// export interface InterceptOptions {
|
|
7882
|
-
// initialValue: 'evaluationUnlessNil' | 'evaluate'
|
|
7883
|
-
// }
|
|
7884
|
-
})(PlaceComponent || (PlaceComponent = {}));
|
|
7637
|
+
__metadata("design:type", Function),
|
|
7638
|
+
__metadata("design:paramtypes", []),
|
|
7639
|
+
__metadata("design:returntype", Array)
|
|
7640
|
+
], PlaceDefinition.prototype, "ancestors", null);
|
|
7641
|
+
__decorate([
|
|
7642
|
+
Memoize(),
|
|
7643
|
+
__metadata("design:type", Function),
|
|
7644
|
+
__metadata("design:paramtypes", []),
|
|
7645
|
+
__metadata("design:returntype", Array)
|
|
7646
|
+
], PlaceDefinition.prototype, "ancestorsAndSelf", null);
|
|
7647
|
+
__decorate([
|
|
7648
|
+
Memoize(),
|
|
7649
|
+
__metadata("design:type", String),
|
|
7650
|
+
__metadata("design:paramtypes", [])
|
|
7651
|
+
], PlaceDefinition.prototype, "placeId", null);
|
|
7652
|
+
__decorate([
|
|
7653
|
+
Memoize(),
|
|
7654
|
+
__metadata("design:type", Function),
|
|
7655
|
+
__metadata("design:paramtypes", []),
|
|
7656
|
+
__metadata("design:returntype", ParameterDefinition)
|
|
7657
|
+
], PlaceDefinition.prototype, "getRouteIdParameterDef", null);
|
|
7658
|
+
__decorate([
|
|
7659
|
+
Memoize(),
|
|
7660
|
+
__metadata("design:type", Function),
|
|
7661
|
+
__metadata("design:paramtypes", [Object]),
|
|
7662
|
+
__metadata("design:returntype", Array)
|
|
7663
|
+
], PlaceDefinition.prototype, "getRouteParameterDefs", null);
|
|
7664
|
+
__decorate([
|
|
7665
|
+
Memoize(),
|
|
7666
|
+
__metadata("design:type", Function),
|
|
7667
|
+
__metadata("design:paramtypes", [Object]),
|
|
7668
|
+
__metadata("design:returntype", Array)
|
|
7669
|
+
], PlaceDefinition.prototype, "getVisitParameterDefs", null);
|
|
7885
7670
|
|
|
7886
7671
|
/* eslint-disable @typescript-eslint/no-explicit-any -- visit segments carry arbitrary route params */
|
|
7887
7672
|
class VisitSegment {
|
|
@@ -7976,7 +7761,7 @@ class Visit {
|
|
|
7976
7761
|
destinationSegment;
|
|
7977
7762
|
destinationPlaceDef;
|
|
7978
7763
|
static goto(placeComponent, visitParameters) {
|
|
7979
|
-
return new Visit([new VisitSegment(
|
|
7764
|
+
return new Visit([new VisitSegment(getPlaceDefinition(placeComponent), visitParameters)]);
|
|
7980
7765
|
}
|
|
7981
7766
|
static fromSegments(segments) {
|
|
7982
7767
|
return new Visit(segments);
|
|
@@ -7997,7 +7782,7 @@ class Visit {
|
|
|
7997
7782
|
if (!this.destinationPlaceDef.hasAncestor(placeComponent)) {
|
|
7998
7783
|
throw new Error(`Place ${placeComponent.name} is not an ancestor of ${this.destinationPlaceDef.component.name}`);
|
|
7999
7784
|
}
|
|
8000
|
-
this.segmentsByPlaceComponent.set(placeComponent, new VisitSegment(
|
|
7785
|
+
this.segmentsByPlaceComponent.set(placeComponent, new VisitSegment(getPlaceDefinition(placeComponent), parameters));
|
|
8001
7786
|
return this;
|
|
8002
7787
|
}
|
|
8003
7788
|
get segments() {
|
|
@@ -8963,7 +8748,7 @@ class PlaceAuthService extends GarbageCollector {
|
|
|
8963
8748
|
const { chain } = Dsl.disposeWith(this);
|
|
8964
8749
|
const when$ = options.when$ ? options.when$ : chain(options.unless$).isFalsey();
|
|
8965
8750
|
// NOTE: we're wrapping the when$ so callers can pass in the same model multiple times (pectin doesn't support depending on multiples of the same model yet)
|
|
8966
|
-
this.enabledPlaceChecker.enableWhen(
|
|
8751
|
+
this.enabledPlaceChecker.enableWhen(getPlaceDefinition(placeDefinition), chain(when$).isTruthy(), options);
|
|
8967
8752
|
}
|
|
8968
8753
|
async waitUntilAuthenticationReady() {
|
|
8969
8754
|
await toPromise(this, this._authNReady$);
|
|
@@ -9591,7 +9376,7 @@ class PlaceRouter extends GarbageCollector {
|
|
|
9591
9376
|
}
|
|
9592
9377
|
filterAuthorizedPlaces(places, options) {
|
|
9593
9378
|
const { chain } = Dsl.disposeWith(options.disposedWith);
|
|
9594
|
-
return chain(this.authService.accessGuard$).mapToList((g) => places.filter((p) => g.isAuthorised(
|
|
9379
|
+
return chain(this.authService.accessGuard$).mapToList((g) => places.filter((p) => g.isAuthorised(getPlaceDefinition(p))));
|
|
9595
9380
|
}
|
|
9596
9381
|
async notifyVisitSegmentChanged(is, was) {
|
|
9597
9382
|
// console.log("PlaceRouter.notifyVisitSegmentChanged", is.toDebugString(), was.toDebugString());
|
|
@@ -11792,6 +11577,205 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
11792
11577
|
}]
|
|
11793
11578
|
}] });
|
|
11794
11579
|
|
|
11580
|
+
// class ParameterChangeInterceptor<T> {
|
|
11581
|
+
// constructor(parameterDef: ParameterDefinition<T>, model: ValueModel<T>, callback: PlaceComponent.InterceptCallback<T>, options: PlaceComponent.InterceptOptions) {
|
|
11582
|
+
// }
|
|
11583
|
+
//
|
|
11584
|
+
// async canProceed(nextState: VisitSegment, interactionContext: InteractionContext) {
|
|
11585
|
+
// return true;
|
|
11586
|
+
// }
|
|
11587
|
+
// }
|
|
11588
|
+
class PlaceComponent extends LoadableComponent {
|
|
11589
|
+
_placeReadyCallbacks = [];
|
|
11590
|
+
visit$ = new MutableValueModel();
|
|
11591
|
+
_inVisitUpdate = new Guard();
|
|
11592
|
+
_active = new MutableValueModel(false);
|
|
11593
|
+
interactionContext;
|
|
11594
|
+
childPlaces$;
|
|
11595
|
+
// private readonly _parameterChangeInterceptors: ParameterChangeInterceptor<any>[] = [];
|
|
11596
|
+
placeId;
|
|
11597
|
+
placeRouter = inject(PlaceRouter);
|
|
11598
|
+
activatedRoute = inject(ActivatedRoute);
|
|
11599
|
+
constructor() {
|
|
11600
|
+
super();
|
|
11601
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
11602
|
+
when(this._active).becomesTruthy(() => this._notifyPlaceReady());
|
|
11603
|
+
this.childPlaces$ = ListModel.constant(this.placeDefinition.children.map(d => d.component));
|
|
11604
|
+
this.placeId = this.placeDefinition.placeId;
|
|
11605
|
+
if (isEmpty(this.placeId)) {
|
|
11606
|
+
lang.illegalState("placeId property is missing from the route data parameters");
|
|
11607
|
+
}
|
|
11608
|
+
}
|
|
11609
|
+
initialiseVisit(visit, notifyVisitChanged) {
|
|
11610
|
+
assert.isNil(this.visit$.value);
|
|
11611
|
+
const { when } = Dsl.disposeWith(this);
|
|
11612
|
+
this.visit$.value = visit;
|
|
11613
|
+
DebugContext.getOrCreate(this.visit$).tag(`${this.placeDefinition.component.name}.visit$`);
|
|
11614
|
+
// we track if the any of the bindings updated the route. If so we remember it and update the
|
|
11615
|
+
// route in one go at the end.
|
|
11616
|
+
this.placeDefinition
|
|
11617
|
+
.getVisitParameterDefs()
|
|
11618
|
+
.forEach(parameterDef => this.installAndInitialiseBinding(visit, parameterDef));
|
|
11619
|
+
when(this.visit$).changes((current, previous) => {
|
|
11620
|
+
notifyVisitChanged(current, previous);
|
|
11621
|
+
}, { unless: this._inVisitUpdate });
|
|
11622
|
+
// TODO: this needs to do a replace url option so that the new url isn't put in the history.... for
|
|
11623
|
+
// now we're not doing it as it's a fair bit of effort and will only affect people if they're
|
|
11624
|
+
// cutting and pasting urls to each other.
|
|
11625
|
+
// // the binding process can update the visit (e.g. if a selection model has already selected during
|
|
11626
|
+
// // component construction) and there was no value specified in the route
|
|
11627
|
+
// if (visit.hasRoutingChangedFrom(this.visitModel.value)) {
|
|
11628
|
+
// notifyVisitChanged(this.visitModel.value, visit)
|
|
11629
|
+
// }
|
|
11630
|
+
}
|
|
11631
|
+
get childPlaces() {
|
|
11632
|
+
return this.childPlaces$.value;
|
|
11633
|
+
}
|
|
11634
|
+
updateVisit(visit) {
|
|
11635
|
+
assert.isTruthy(this.isInitialised());
|
|
11636
|
+
assert.notNil(visit);
|
|
11637
|
+
this._inVisitUpdate.whileTrue(() => {
|
|
11638
|
+
this.visit$.value = visit;
|
|
11639
|
+
});
|
|
11640
|
+
}
|
|
11641
|
+
isInitialised() {
|
|
11642
|
+
return !!this.visit$.value;
|
|
11643
|
+
}
|
|
11644
|
+
// @Trace()
|
|
11645
|
+
/**
|
|
11646
|
+
* Initialised the component bindings. If any binding has an initial model value (e.g. a selection model
|
|
11647
|
+
* initialised during the constructor) and the route has nothing, then the visit will be udpated and this
|
|
11648
|
+
* method will return ture to nofiy the the visit has changed.
|
|
11649
|
+
*/
|
|
11650
|
+
installAndInitialiseBinding(initialVisit, parameterDef) {
|
|
11651
|
+
const model = this[parameterDef.propertyName];
|
|
11652
|
+
assert.notNil(model);
|
|
11653
|
+
DebugContext.tag(model, `${this.placeDefinition.component.name}.${parameterDef.propertyName}`);
|
|
11654
|
+
const binding = this.registerDisposable(new Binding(this.visit$, model, {
|
|
11655
|
+
toRight(visit) {
|
|
11656
|
+
const value = visit.getParameterValue(parameterDef);
|
|
11657
|
+
// console.log('push to component', { name: parameterDef.name, value, visit });
|
|
11658
|
+
return value;
|
|
11659
|
+
},
|
|
11660
|
+
toLeft(value, currentVisit) {
|
|
11661
|
+
// console.log('push to route', { name: parameterDef.name, value, currentVisit });
|
|
11662
|
+
return currentVisit.replace(parameterDef, value);
|
|
11663
|
+
}
|
|
11664
|
+
}));
|
|
11665
|
+
// Now we need to initialise the binding direction. If we have a value in the Url then we should always push
|
|
11666
|
+
// that to the view. If we don't and the view already has a value (e.g. a selection model has already initialised in the
|
|
11667
|
+
// component constructor) then we should push that to the route.
|
|
11668
|
+
const isInVisit = !isNil(initialVisit.getParameterValue(parameterDef));
|
|
11669
|
+
const isInModel = !isNil(model.value);
|
|
11670
|
+
if (!isInVisit && isInModel) {
|
|
11671
|
+
binding.writeLeft(); // push it to the route
|
|
11672
|
+
}
|
|
11673
|
+
else {
|
|
11674
|
+
binding.writeRight(); // push it to the model
|
|
11675
|
+
}
|
|
11676
|
+
}
|
|
11677
|
+
get placeDefinition() {
|
|
11678
|
+
const definition = PlaceComponent.getDefinition(this.constructor);
|
|
11679
|
+
if (!definition) {
|
|
11680
|
+
lang.illegalState(`${this.constructor.name} extends PlaceComponent but doesn't have @Place({..}) decorator.`);
|
|
11681
|
+
}
|
|
11682
|
+
return definition;
|
|
11683
|
+
}
|
|
11684
|
+
get active() {
|
|
11685
|
+
return this._active.readonly$;
|
|
11686
|
+
}
|
|
11687
|
+
/**
|
|
11688
|
+
* Called by the router to see if this component can deactivate. This isn't called for route parameter changes.
|
|
11689
|
+
* @param interactionContext
|
|
11690
|
+
*/
|
|
11691
|
+
async _canLeavePlace(interactionContext) {
|
|
11692
|
+
return this.canDeactivate ? this.canDeactivate(interactionContext) : true;
|
|
11693
|
+
}
|
|
11694
|
+
/**
|
|
11695
|
+
* Called by the router to see if this component can deactivate. This isn't called for route parameter changes.
|
|
11696
|
+
* @param interactionContext
|
|
11697
|
+
* @param nextState
|
|
11698
|
+
*/
|
|
11699
|
+
async _canChangeRouteParameters(interactionContext, nextState) {
|
|
11700
|
+
// if (this._parameterChangeInterceptors.length > 0) {
|
|
11701
|
+
// const visit = nextState.createVisitSegmentFor(this.placeDefinition);
|
|
11702
|
+
// for (let i = 0; i < this._parameterChangeInterceptors.length; i++) {
|
|
11703
|
+
// const interceptor = this._parameterChangeInterceptors[i];
|
|
11704
|
+
// const keepGoing = await interceptor.canProceed(visit, interactionContext);
|
|
11705
|
+
// if (!keepGoing) {
|
|
11706
|
+
// return false;
|
|
11707
|
+
// }
|
|
11708
|
+
// }
|
|
11709
|
+
// }
|
|
11710
|
+
return true;
|
|
11711
|
+
}
|
|
11712
|
+
/**
|
|
11713
|
+
* Called by the router when the place is ready to interact after any animations have run.
|
|
11714
|
+
*/
|
|
11715
|
+
_notifyActive(active) {
|
|
11716
|
+
this._active.value = active;
|
|
11717
|
+
}
|
|
11718
|
+
/**
|
|
11719
|
+
* Called by the router when the place is ready to interact after any animations have run.
|
|
11720
|
+
*/
|
|
11721
|
+
_notifyPlaceReady() {
|
|
11722
|
+
if (this.onPlaceReady.length === 1) {
|
|
11723
|
+
this._placeReadyCallbacks.forEach(callback => callback());
|
|
11724
|
+
}
|
|
11725
|
+
else {
|
|
11726
|
+
console.warn('Overriding PlaceComponent.onPlaceReady has been deprecated. Use PlaceComponent.onPlaceReady(() => {... do stuff...}) instead.');
|
|
11727
|
+
this.onPlaceReady(undefined);
|
|
11728
|
+
}
|
|
11729
|
+
}
|
|
11730
|
+
onPlaceReady(callback) {
|
|
11731
|
+
this._placeReadyCallbacks.push(callback);
|
|
11732
|
+
}
|
|
11733
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: PlaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
11734
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.9", type: PlaceComponent, host: { properties: { "attr.place-id": "this.placeId" } }, usesInheritance: true, ngImport: i0 });
|
|
11735
|
+
}
|
|
11736
|
+
__decorate([
|
|
11737
|
+
MemoizeGet(),
|
|
11738
|
+
__metadata("design:type", PlaceDefinition),
|
|
11739
|
+
__metadata("design:paramtypes", [])
|
|
11740
|
+
], PlaceComponent.prototype, "placeDefinition", null);
|
|
11741
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: PlaceComponent, decorators: [{
|
|
11742
|
+
type: Directive
|
|
11743
|
+
}], ctorParameters: function () { return []; }, propDecorators: { placeId: [{
|
|
11744
|
+
type: HostBinding,
|
|
11745
|
+
args: ["attr.place-id"]
|
|
11746
|
+
}], placeDefinition: [] } });
|
|
11747
|
+
(function (PlaceComponent) {
|
|
11748
|
+
function isPlaceComponentConstructor(target) {
|
|
11749
|
+
return lang.constructorChain(target).includes(PlaceComponent);
|
|
11750
|
+
}
|
|
11751
|
+
PlaceComponent.isPlaceComponentConstructor = isPlaceComponentConstructor;
|
|
11752
|
+
function getRouteParameters(klass) {
|
|
11753
|
+
return Klass.get(klass).getMetadataList(ROUTE_PARAMETER_LIST_KEY);
|
|
11754
|
+
}
|
|
11755
|
+
PlaceComponent.getRouteParameters = getRouteParameters;
|
|
11756
|
+
function getDefinition(snapshotOrConstructor) {
|
|
11757
|
+
if (snapshotOrConstructor instanceof ActivatedRouteSnapshot) {
|
|
11758
|
+
const component = snapshotOrConstructor.component;
|
|
11759
|
+
if (!isPlaceComponentConstructor(component)) {
|
|
11760
|
+
throw new Error(`ActivatedRouteSnapshot component is not a PlaceComponent, got ${component}`);
|
|
11761
|
+
}
|
|
11762
|
+
return getPlaceDefinition(component);
|
|
11763
|
+
}
|
|
11764
|
+
else {
|
|
11765
|
+
return getPlaceDefinition(snapshotOrConstructor);
|
|
11766
|
+
}
|
|
11767
|
+
}
|
|
11768
|
+
PlaceComponent.getDefinition = getDefinition;
|
|
11769
|
+
function injectDefinition(klass, definition) {
|
|
11770
|
+
setPlaceDefinition(klass, definition);
|
|
11771
|
+
}
|
|
11772
|
+
PlaceComponent.injectDefinition = injectDefinition;
|
|
11773
|
+
// export type InterceptCallback<T> = (is: T, was: T, interactionContext: InteractionContext) => boolean | Promise<boolean>;
|
|
11774
|
+
// export interface InterceptOptions {
|
|
11775
|
+
// initialValue: 'evaluationUnlessNil' | 'evaluate'
|
|
11776
|
+
// }
|
|
11777
|
+
})(PlaceComponent || (PlaceComponent = {}));
|
|
11778
|
+
|
|
11795
11779
|
const AUP_PLACE_CONFIG = new InjectionToken('AUP_PLACE_CONFIG');
|
|
11796
11780
|
|
|
11797
11781
|
class NotAuthorisedNoticeComponent {
|
|
@@ -12480,6 +12464,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
12480
12464
|
}]
|
|
12481
12465
|
}] });
|
|
12482
12466
|
|
|
12467
|
+
/**
|
|
12468
|
+
* @file Automatically generated by barrelsby.
|
|
12469
|
+
*/
|
|
12470
|
+
|
|
12471
|
+
class TextSearchContext {
|
|
12472
|
+
row;
|
|
12473
|
+
searchText;
|
|
12474
|
+
searchRegex;
|
|
12475
|
+
constructor(row, searchText, searchRegex) {
|
|
12476
|
+
this.row = row;
|
|
12477
|
+
this.searchText = searchText;
|
|
12478
|
+
this.searchRegex = searchRegex;
|
|
12479
|
+
}
|
|
12480
|
+
getOrCreate(type, create) {
|
|
12481
|
+
// TODO: stub awaiting per-context cache implementation
|
|
12482
|
+
}
|
|
12483
|
+
matchesText(text) {
|
|
12484
|
+
return this.searchRegex.test(text);
|
|
12485
|
+
}
|
|
12486
|
+
}
|
|
12487
|
+
|
|
12488
|
+
class AbstractCellRenderer extends LoadableComponent {
|
|
12489
|
+
constructor() {
|
|
12490
|
+
super();
|
|
12491
|
+
}
|
|
12492
|
+
}
|
|
12493
|
+
|
|
12483
12494
|
/**
|
|
12484
12495
|
* @file Automatically generated by barrelsby.
|
|
12485
12496
|
*/
|