@coolon/angular-ui-powerups 12.4.0-alpha.65 → 12.4.0-alpha.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +32 -5
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/coolon-angular-ui-powerups.metadata.json +1 -1
  4. package/esm2015/lib/components/exports.js +1 -0
  5. package/esm2015/lib/components/exports.js.map +1 -1
  6. package/esm2015/lib/components/exports.metadata.json +1 -1
  7. package/esm2015/lib/components/tables/abstract-table-model.js +3 -0
  8. package/esm2015/lib/components/tables/abstract-table-model.js.map +1 -1
  9. package/esm2015/lib/components/tables/abstract-table-model.metadata.json +1 -1
  10. package/esm2015/lib/components/tables/table/cell-renderer.js.map +1 -1
  11. package/esm2015/lib/components/tables/table/column-model.js +22 -4
  12. package/esm2015/lib/components/tables/table/column-model.js.map +1 -1
  13. package/esm2015/lib/components/tables/table/column-model.metadata.json +1 -1
  14. package/esm2015/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.js +3 -0
  15. package/esm2015/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.js.map +1 -1
  16. package/esm2015/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.metadata.json +1 -1
  17. package/esm2015/lib/components/tables/table/table-row-menu/table-row-menu.component.js +0 -2
  18. package/esm2015/lib/components/tables/table/table-row-menu/table-row-menu.component.js.map +1 -1
  19. package/esm2015/lib/components/tables/table/table-row-menu/table-row-menu.component.metadata.json +1 -1
  20. package/esm2015/lib/components/tables/table/text-search-predicate.js +2 -0
  21. package/esm2015/lib/components/tables/table/text-search-predicate.js.map +1 -0
  22. package/esm2015/lib/components/tables/table/text-search-predicate.metadata.json +1 -0
  23. package/fesm2015/coolon-angular-ui-powerups.js +28 -6
  24. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  25. package/lib/components/exports.d.ts +1 -0
  26. package/lib/components/tables/abstract-table-model.d.ts +1 -0
  27. package/lib/components/tables/table/cell-renderer.d.ts +2 -0
  28. package/lib/components/tables/table/column-model.d.ts +9 -0
  29. package/lib/components/tables/table/default-cell-renderer/default-cell-renderer.component.d.ts +3 -1
  30. package/lib/components/tables/table/table-row-menu/table-row-menu.component.d.ts +2 -3
  31. package/lib/components/tables/table/text-search-predicate.d.ts +1 -0
  32. package/package.json +1 -1
  33. package/schematics/activity/index.js +1 -1
  34. package/schematics/activity/index.js.map +1 -1
  35. package/schematics/aup-i18n/index.js +1 -1
  36. package/schematics/aup-i18n/index.js.map +1 -1
@@ -2314,6 +2314,9 @@ class DefaultCellRendererComponent {
2314
2314
  get value() {
2315
2315
  return this._value;
2316
2316
  }
2317
+ matches(row, text) {
2318
+ return row.toString().includes(text);
2319
+ }
2317
2320
  }
2318
2321
  DefaultCellRendererComponent.decorators = [
2319
2322
  { type: Component, args: [{
@@ -2461,6 +2464,8 @@ const noop = () => {
2461
2464
  };
2462
2465
  const ɵ0 = noop;
2463
2466
  const CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol('aup-cell-renderer:row-data-cache');
2467
+ const DEFAULT_TEXT_SEARCH_PREDICATE = (row, text) => false;
2468
+ const ɵ1 = DEFAULT_TEXT_SEARCH_PREDICATE;
2464
2469
  class ColumnModel extends GarbageCollector {
2465
2470
  constructor(columnId, textPropertiesProvider) {
2466
2471
  super();
@@ -2470,6 +2475,8 @@ class ColumnModel extends GarbageCollector {
2470
2475
  this._flex = false;
2471
2476
  this._defaultVisibility = this.registerDisposable(new DelegatingValueModel().withDefault(true));
2472
2477
  this._visible = this.registerDisposable(new DelegatingValueModel().withDefault(this._defaultVisibility));
2478
+ this._columnModelTextSearchPredicate = undefined;
2479
+ this._cellRendererTextSearchPredicate = undefined;
2473
2480
  this.installHeaderRenderer();
2474
2481
  this.dasherisedColumnId = Stringy.from(columnId).dasherize().toString();
2475
2482
  }
@@ -2498,6 +2505,17 @@ class ColumnModel extends GarbageCollector {
2498
2505
  getDefaultHeaderText() {
2499
2506
  return this.columnId;
2500
2507
  }
2508
+ get isTextMatch() {
2509
+ return this._columnModelTextSearchPredicate || this._cellRendererTextSearchPredicate || DEFAULT_TEXT_SEARCH_PREDICATE;
2510
+ }
2511
+ /**
2512
+ * Sets the predicate to use when checking if the specified row is a text match for this column.
2513
+ * @param predicate
2514
+ */
2515
+ useTextSearchPredicate(predicate) {
2516
+ this._columnModelTextSearchPredicate = predicate;
2517
+ return this;
2518
+ }
2501
2519
  getColumnTextProperties() {
2502
2520
  return this._columnTextProperties || this.textPropertiesProvider();
2503
2521
  }
@@ -2548,6 +2566,12 @@ class ColumnModel extends GarbageCollector {
2548
2566
  }
2549
2567
  onRendererAttached(host, component) {
2550
2568
  this._cellRendererPortalRef.onPortalAttached(host, component);
2569
+ if (___default.isFunction(component.matches)) {
2570
+ this._cellRendererTextSearchPredicate = (row, text) => component.matches(row, text);
2571
+ }
2572
+ else {
2573
+ this._cellRendererTextSearchPredicate = undefined;
2574
+ }
2551
2575
  }
2552
2576
  // @Trace()
2553
2577
  onEditorAttached(host, component) {
@@ -2596,9 +2620,6 @@ class PropertyColumnModel extends ColumnModel {
2596
2620
  }
2597
2621
  }
2598
2622
  component.value = this._format(rowData.row[this.property]);
2599
- if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
2600
- onComponentInitOrOptions.onRowUpdate(component, rowData.row);
2601
- }
2602
2623
  }));
2603
2624
  return this;
2604
2625
  }
@@ -3048,6 +3069,9 @@ class AbstractTableModel extends GarbageCollector {
3048
3069
  this.lastVisibleColumn = chain(this._columnList).last();
3049
3070
  this.rowSelectionDisabledOnAllColumns = chain(this._columnList).select(column => column.isRowSelectionEnabled()).count().equals(0);
3050
3071
  }
3072
+ findMatchingColumns(row, text) {
3073
+ return this.columns.value.filter(c => c.isTextMatch(row, text));
3074
+ }
3051
3075
  setDataSource(sourceOfTruth) {
3052
3076
  this._dataSource.setDelegate(sourceOfTruth);
3053
3077
  }
@@ -3312,8 +3336,6 @@ class TableRowMenuComponent extends DisposableComponent {
3312
3336
  registerMoreAction(commandFactory, properties) {
3313
3337
  this.moreActions.push(new MenuItemData(commandFactory, properties));
3314
3338
  }
3315
- ngOnInit() {
3316
- }
3317
3339
  createMoreMenuCommand(item, value) {
3318
3340
  const { when } = Dsl.disposeWith(this);
3319
3341
  const command = item.factory.create(value);
@@ -9105,5 +9127,5 @@ VisibilityService.ctorParameters = () => [
9105
9127
  * Generated bundle index. Do not edit.
9106
9128
  */
9107
9129
 
9108
- export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CardStackComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnListModel, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadingContainerComponent, 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, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, treeNodeDecorator, ɵ0 };
9130
+ export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CardStackComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnListModel, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadingContainerComponent, 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, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, treeNodeDecorator, ɵ0, ɵ1 };
9109
9131
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map