@coolon/angular-ui-powerups 14.14.2 → 14.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3601,9 +3601,9 @@ class EditSession extends GarbageCollector {
3601
3601
  }
3602
3602
 
3603
3603
  // TODO: Merge MarsUi FilterRegistry into this.
3604
- class AbstractTableFilterModel extends GarbageCollector {
3604
+ class TableFilterModel extends GarbageCollector {
3605
3605
  }
3606
- TrackExternal.useDelegate(AbstractTableFilterModel, options => {
3606
+ TrackExternal.useDelegate(TableFilterModel, options => {
3607
3607
  return DelegateProxyHandler.create("AbstractTableFilterModel", b => {
3608
3608
  b.forProperty("rowFilter$", () => new DelegatingValueModel());
3609
3609
  b.forProperty("highlightText$", () => new DelegatingValueModel());
@@ -3820,9 +3820,9 @@ class AbstractTableModel extends GarbageCollector {
3820
3820
  }
3821
3821
  }
3822
3822
  __decorate([
3823
- TrackExternal() // hack instead of creating a delegating one from scratch. Would be nice if this easier to do automated... or better named? @UseProxy or @UseDelegate??
3823
+ TrackExternal() // hack instead of creating a delegating one from scratch.
3824
3824
  ,
3825
- __metadata("design:type", AbstractTableFilterModel)
3825
+ __metadata("design:type", TableFilterModel)
3826
3826
  ], AbstractTableModel.prototype, "filterModel", void 0);
3827
3827
  TrackExternal.oneTimeBinding(AbstractTableModel);
3828
3828
 
@@ -4648,10 +4648,14 @@ class TreeLabelColumnModel extends ColumnModel {
4648
4648
  constructor(columnId, textPropertiesProvider, expansionModel) {
4649
4649
  super(columnId, textPropertiesProvider);
4650
4650
  this.expansionModel = expansionModel;
4651
+ this.labelFactory = () => undefined;
4651
4652
  this.cellRenderer(TreeLabelCellRendererComponent);
4652
4653
  }
4653
4654
  pluck(property) {
4654
- this.labelProperty = property;
4655
+ this.useLabel(row => row[property]);
4656
+ }
4657
+ useLabel(factory) {
4658
+ this.labelFactory = factory;
4655
4659
  }
4656
4660
  /**
4657
4661
  * @deprecated use #useIcon instead.
@@ -4669,7 +4673,7 @@ class TreeLabelColumnModel extends ColumnModel {
4669
4673
  component.treeTableModel = this.expansionModel;
4670
4674
  }
4671
4675
  component.value = rowData.row;
4672
- component.label = isNil(this.labelProperty) ? undefined : rowData.row[this.labelProperty];
4676
+ component.label = this.labelFactory(rowData.row);
4673
4677
  component.iconFactory = this.iconFactory;
4674
4678
  }));
4675
4679
  return this;
@@ -8541,15 +8545,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
8541
8545
  }]
8542
8546
  }] });
8543
8547
 
8544
- class TableFilterModel extends AbstractTableFilterModel {
8545
- constructor(builder) {
8548
+ class DefaultTableFilterModel extends TableFilterModel {
8549
+ constructor(configuration) {
8546
8550
  super();
8547
8551
  this._rowPredicate$ = this.registerDisposable(new DelegatingValueModel());
8548
8552
  this._searchText$ = this.registerDisposable(new DelegatingValueModel());
8549
8553
  this.inUpdate = new Guard();
8550
8554
  const { chain } = Dsl.disposeWith(this);
8551
- if (builder) {
8552
- this.registerModels(builder);
8555
+ if (configuration) {
8556
+ this.configure(Object.assign(Object.assign({}, configuration), { disposedWith: this }));
8553
8557
  }
8554
8558
  const textSearchRegex$ = chain(this._searchText$).map(text => {
8555
8559
  return isEmpty$1(text) ? undefined : new RegExp(escapeStringRegexp(text), "i");
@@ -8574,25 +8578,15 @@ class TableFilterModel extends AbstractTableFilterModel {
8574
8578
  get highlightText$() {
8575
8579
  return this._searchText$.readonly;
8576
8580
  }
8577
- registerModels(builder) {
8578
- // TODO: calling this twice without disposing woudl result in confusion... I should probably
8579
- // change how this works...
8580
- const self = this;
8581
+ configure(configuration) {
8581
8582
  this.inUpdate.whileTrue(() => {
8582
- builder({
8583
- usePredicate(predicate$) {
8584
- self._rowPredicate$.setDelegate(predicate$);
8585
- return this;
8586
- },
8587
- useSearchText(searchText$) {
8588
- self._searchText$.setDelegate(searchText$);
8589
- return this;
8590
- }
8591
- });
8583
+ this._rowPredicate$.setDelegate(configuration.predicate$);
8584
+ this._searchText$.setDelegate(configuration.searchText$);
8592
8585
  });
8593
- return {
8586
+ const self = this;
8587
+ configuration.disposedWith.registerDisposable({
8594
8588
  dispose: () => self.clear()
8595
- };
8589
+ });
8596
8590
  }
8597
8591
  clear() {
8598
8592
  this.inUpdate.whileTrue(() => {
@@ -8601,19 +8595,6 @@ class TableFilterModel extends AbstractTableFilterModel {
8601
8595
  });
8602
8596
  }
8603
8597
  }
8604
- (function (TableFilterModel) {
8605
- class BuilderImp {
8606
- usePredicate(predicate$) {
8607
- this.rowPredicate$ = predicate$;
8608
- return this;
8609
- }
8610
- useSearchText(searchText$) {
8611
- this.searchText$ = searchText$;
8612
- return this;
8613
- }
8614
- }
8615
- TableFilterModel.BuilderImp = BuilderImp;
8616
- })(TableFilterModel || (TableFilterModel = {}));
8617
8598
 
8618
8599
  /**
8619
8600
  * @file Automatically generated by barrelsby.
@@ -10581,5 +10562,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
10581
10562
  * Generated bundle index. Do not edit.
10582
10563
  */
10583
10564
 
10584
- export { ACTIVITY_DATA, ALERT_CONFIG, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableFilterModel, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CardStackComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnListModel, ColumnModel, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EnableCellTextSearch, EventCleanUpSession, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, GarbageCollectorDirective, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, Keys, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectInputActivity, SelectInputComponent, SelectionCellComponent, SelectionColumnModel, SelectionHeaderCellComponent, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableBodyComponent, TableCellComponent, TableComponent, TableFilterModel, TableHeaderCellComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, markdownPillExtension, slideDownOnEnterAnimation, slideRightOnEnterAnimation, treeNodeDecorator };
10565
+ export { ACTIVITY_DATA, ALERT_CONFIG, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CardStackComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnListModel, ColumnModel, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DefaultTableFilterModel, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EnableCellTextSearch, EventCleanUpSession, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, GarbageCollectorDirective, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, Keys, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectInputActivity, SelectInputComponent, SelectionCellComponent, SelectionColumnModel, SelectionHeaderCellComponent, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableBodyComponent, TableCellComponent, TableComponent, TableFilterModel, TableHeaderCellComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, markdownPillExtension, slideDownOnEnterAnimation, slideRightOnEnterAnimation, treeNodeDecorator };
10585
10566
  //# sourceMappingURL=coolon-angular-ui-powerups.mjs.map