@coolon/angular-ui-powerups 14.15.0 → 14.17.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.
@@ -3347,6 +3347,7 @@ class SelectionColumnModel extends ColumnModel {
3347
3347
  this._enableHeaderControls = true;
3348
3348
  this._color = "accent";
3349
3349
  this.selectionModel = DelegatingSelectionModel.createDelegate();
3350
+ const { chain } = Dsl.disposeWith(this);
3350
3351
  this._selectRowOnClick(false);
3351
3352
  this.cellHeaderRenderer(SelectionHeaderCellComponent, (component) => {
3352
3353
  component.selectionModel = this.selectionModel;
@@ -3360,10 +3361,10 @@ class SelectionColumnModel extends ColumnModel {
3360
3361
  }));
3361
3362
  this.setSelectionModel(selectionModel);
3362
3363
  this.setMasterVisibility(this.selectionModel.enabled$);
3364
+ this.setDefaultVisibility(chain(this.selectionModel.mode$).equals(SelectionModel.Mode.MULTIPLE));
3363
3365
  }
3364
3366
  setSelectionModel(selectionModel) {
3365
3367
  this.selectionModel.setDelegate(selectionModel);
3366
- this.setDefaultVisibility(selectionModel instanceof MultipleSelectionModel ? ValueModel.TRUE : ValueModel.FALSE);
3367
3368
  }
3368
3369
  getDefaultHeaderText() {
3369
3370
  return '';
@@ -3387,9 +3388,9 @@ class SelectionColumnModel extends ColumnModel {
3387
3388
  }
3388
3389
 
3389
3390
  // TODO: Merge MarsUi FilterRegistry into this.
3390
- class AbstractTableFilterModel extends GarbageCollector {
3391
+ class TableFilterModel extends GarbageCollector {
3391
3392
  }
3392
- TrackExternal.useDelegate(AbstractTableFilterModel, options => {
3393
+ TrackExternal.useDelegate(TableFilterModel, options => {
3393
3394
  return DelegateProxyHandler.create("AbstractTableFilterModel", b => {
3394
3395
  b.forProperty("rowFilter$", () => new DelegatingValueModel());
3395
3396
  b.forProperty("highlightText$", () => new DelegatingValueModel());
@@ -3603,9 +3604,9 @@ class AbstractTableModel extends GarbageCollector {
3603
3604
  }
3604
3605
  }
3605
3606
  __decorate([
3606
- 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??
3607
+ TrackExternal() // hack instead of creating a delegating one from scratch.
3607
3608
  ,
3608
- __metadata("design:type", AbstractTableFilterModel)
3609
+ __metadata("design:type", TableFilterModel)
3609
3610
  ], AbstractTableModel.prototype, "filterModel", void 0);
3610
3611
  TrackExternal.oneTimeBinding(AbstractTableModel);
3611
3612
 
@@ -8445,15 +8446,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
8445
8446
  }]
8446
8447
  }] });
8447
8448
 
8448
- class TableFilterModel extends AbstractTableFilterModel {
8449
- constructor(builder) {
8449
+ class DefaultTableFilterModel extends TableFilterModel {
8450
+ constructor(configuration) {
8450
8451
  super();
8451
8452
  this._rowPredicate$ = this.registerDisposable(new DelegatingValueModel());
8452
8453
  this._searchText$ = this.registerDisposable(new DelegatingValueModel());
8453
8454
  this.inUpdate = new Guard();
8454
8455
  const { chain } = Dsl.disposeWith(this);
8455
- if (builder) {
8456
- this.registerModels(builder);
8456
+ if (configuration) {
8457
+ this.configure({ ...configuration, disposedWith: this });
8457
8458
  }
8458
8459
  const textSearchRegex$ = chain(this._searchText$).map(text => {
8459
8460
  return isEmpty$1(text) ? undefined : new RegExp(escapeStringRegexp(text), "i");
@@ -8478,25 +8479,15 @@ class TableFilterModel extends AbstractTableFilterModel {
8478
8479
  get highlightText$() {
8479
8480
  return this._searchText$.readonly;
8480
8481
  }
8481
- registerModels(builder) {
8482
- // TODO: calling this twice without disposing woudl result in confusion... I should probably
8483
- // change how this works...
8484
- const self = this;
8482
+ configure(configuration) {
8485
8483
  this.inUpdate.whileTrue(() => {
8486
- builder({
8487
- usePredicate(predicate$) {
8488
- self._rowPredicate$.setDelegate(predicate$);
8489
- return this;
8490
- },
8491
- useSearchText(searchText$) {
8492
- self._searchText$.setDelegate(searchText$);
8493
- return this;
8494
- }
8495
- });
8484
+ this._rowPredicate$.setDelegate(configuration.predicate$);
8485
+ this._searchText$.setDelegate(configuration.searchText$);
8496
8486
  });
8497
- return {
8487
+ const self = this;
8488
+ configuration.disposedWith.registerDisposable({
8498
8489
  dispose: () => self.clear()
8499
- };
8490
+ });
8500
8491
  }
8501
8492
  clear() {
8502
8493
  this.inUpdate.whileTrue(() => {
@@ -8505,19 +8496,6 @@ class TableFilterModel extends AbstractTableFilterModel {
8505
8496
  });
8506
8497
  }
8507
8498
  }
8508
- (function (TableFilterModel) {
8509
- class BuilderImp {
8510
- usePredicate(predicate$) {
8511
- this.rowPredicate$ = predicate$;
8512
- return this;
8513
- }
8514
- useSearchText(searchText$) {
8515
- this.searchText$ = searchText$;
8516
- return this;
8517
- }
8518
- }
8519
- TableFilterModel.BuilderImp = BuilderImp;
8520
- })(TableFilterModel || (TableFilterModel = {}));
8521
8499
 
8522
8500
  /**
8523
8501
  * @file Automatically generated by barrelsby.
@@ -10466,5 +10444,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
10466
10444
  * Generated bundle index. Do not edit.
10467
10445
  */
10468
10446
 
10469
- 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 };
10447
+ 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 };
10470
10448
  //# sourceMappingURL=coolon-angular-ui-powerups.mjs.map