@coolon/angular-ui-powerups 13.5.1 → 13.5.3

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.
@@ -2595,9 +2595,8 @@ class ColumnTextSearchFormatter {
2595
2595
  class DefaultValueFormatter extends ColumnTextSearchFormatter {
2596
2596
  format(value) {
2597
2597
  var _a;
2598
- let s = (_a = value === null || value === void 0 ? void 0 : value.toString()) !== null && _a !== void 0 ? _a : "";
2599
- console.log("DefaultValueFormatter", { value, text: s });
2600
- return s;
2598
+ // console.log("DefaultValueFormatter", { value, text: s })
2599
+ return (_a = value === null || value === void 0 ? void 0 : value.toString()) !== null && _a !== void 0 ? _a : "";
2601
2600
  }
2602
2601
  }
2603
2602
  ColumnTextSearchFormatter.DefaultValueFormatter = DefaultValueFormatter;
@@ -2624,7 +2623,7 @@ class ColumnTextSearchWrapper extends ColumnTextSearchFormatter.Delegate {
2624
2623
  format(row) {
2625
2624
  let value = this._map(row);
2626
2625
  let result = this._delegate ? this._delegate.format(value) : "";
2627
- console.log({ format: row, value, text: result });
2626
+ // console.log({format: row, value, text:result})
2628
2627
  return result;
2629
2628
  }
2630
2629
  setDelegate(formatter, mapper) {
@@ -2689,7 +2688,7 @@ class ColumnModel extends GarbageCollector {
2689
2688
  }
2690
2689
  configureColumnTextSearch(formatter, mapper) {
2691
2690
  assert$1.notNil(formatter);
2692
- console.log({ col: this.columnId, formatter });
2691
+ // console.log({col: this.columnId, formatter});
2693
2692
  this.textSearchDelegate.setDelegate(formatter, mapper);
2694
2693
  }
2695
2694
  configureHeaderRenderer(config) {
@@ -2992,35 +2991,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
2992
2991
  type: Input
2993
2992
  }] } });
2994
2993
 
2995
- const TEXT_SEARCH_FORMATTER_KEY = `aup:table:textSearchFormatter`;
2996
- const Keys = Enum("useFunction", "useInstance", "useClass");
2997
- function EnableCellTextSearch(options) {
2998
- assert$1.notNil(options);
2999
- return (constructor) => {
3000
- const klass = Klass.get(constructor);
3001
- assert$1.isFalsey(klass.hasOwnMetadata(TEXT_SEARCH_FORMATTER_KEY), "class already decorated with @EnableCellTextSearch");
3002
- klass.defineMetadata(TEXT_SEARCH_FORMATTER_KEY, options);
3003
- };
3004
- }
3005
- (function (EnableCellTextSearch) {
3006
- function getFormatter(renderer, useDefault) {
3007
- var _a;
3008
- const options = (_a = Klass.get(renderer).getMetadata(TEXT_SEARCH_FORMATTER_KEY)) !== null && _a !== void 0 ? _a : {};
3009
- if (options[Keys.useFunction]) {
3010
- return ColumnTextSearchFormatter.forFormatter(options[Keys.useFunction]);
3011
- }
3012
- if (options[Keys.useInstance]) {
3013
- return options[Keys.useInstance];
3014
- }
3015
- if (options[Keys.useClass]) {
3016
- return new ColumnTextSearchFormatter.Delegating(options[Keys.useClass]);
3017
- }
3018
- return useDefault();
3019
- }
3020
- EnableCellTextSearch.getFormatter = getFormatter;
3021
- })(EnableCellTextSearch || (EnableCellTextSearch = {}));
3022
-
3023
- let DefaultCellRendererComponent = class DefaultCellRendererComponent {
2994
+ class DefaultCellRendererComponent {
3024
2995
  constructor() {
3025
2996
  }
3026
2997
  set value(value) {
@@ -3029,13 +3000,9 @@ let DefaultCellRendererComponent = class DefaultCellRendererComponent {
3029
3000
  get value() {
3030
3001
  return this._value;
3031
3002
  }
3032
- };
3003
+ }
3033
3004
  DefaultCellRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3034
3005
  DefaultCellRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: DefaultCellRendererComponent, selector: "aup-default-cell-renderer", inputs: { value: "value" }, ngImport: i0, template: "<span [innerHTML]=\"value| aupHighlight\"></span>\n", styles: [""], pipes: { "aupHighlight": HighlightPipe } });
3035
- DefaultCellRendererComponent = __decorate([
3036
- EnableCellTextSearch({ useClass: ColumnTextSearchFormatter.DefaultValueFormatter }),
3037
- __metadata("design:paramtypes", [])
3038
- ], DefaultCellRendererComponent);
3039
3006
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultCellRendererComponent, decorators: [{
3040
3007
  type: Component,
3041
3008
  args: [{ selector: "aup-default-cell-renderer", template: "<span [innerHTML]=\"value| aupHighlight\"></span>\n", styles: [""] }]
@@ -3089,37 +3056,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
3089
3056
  type: Input
3090
3057
  }] } });
3091
3058
 
3092
- let formatter = (row) => row.map(e => e === null || e === void 0 ? void 0 : e.toString()).join(", ");
3093
- let DefaultListCellRendererComponent = class DefaultListCellRendererComponent extends DisposableComponent {
3094
- constructor() {
3095
- super();
3096
- const { chain } = Dsl.disposeWith(this);
3097
- this.text$ = chain(this.value$).reduce(formatter);
3098
- }
3099
- };
3100
- DefaultListCellRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultListCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3101
- DefaultListCellRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: DefaultListCellRendererComponent, selector: "aup-default-list-cell-renderer", inputs: { value$: "value$", value: "value" }, usesInheritance: true, ngImport: i0, template: "<span [innerHTML]=\"text$.value| aupHighlight\"></span>\n", styles: [""], pipes: { "aupHighlight": HighlightPipe } });
3102
- __decorate([
3103
- TrackExternal(),
3104
- __metadata("design:type", ListModel)
3105
- ], DefaultListCellRendererComponent.prototype, "value$", void 0);
3106
- __decorate([
3107
- StoreInListModel("value$"),
3108
- __metadata("design:type", Array)
3109
- ], DefaultListCellRendererComponent.prototype, "value", void 0);
3110
- DefaultListCellRendererComponent = __decorate([
3111
- EnableCellTextSearch({ useClass: ColumnTextSearchFormatter.DefaultArrayFormatter }),
3112
- __metadata("design:paramtypes", [])
3113
- ], DefaultListCellRendererComponent);
3114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultListCellRendererComponent, decorators: [{
3115
- type: Component,
3116
- args: [{ selector: "aup-default-list-cell-renderer", template: "<span [innerHTML]=\"text$.value| aupHighlight\"></span>\n", styles: [""] }]
3117
- }], ctorParameters: function () { return []; }, propDecorators: { value$: [{
3118
- type: Input
3119
- }], value: [{
3120
- type: Input
3121
- }] } });
3122
-
3123
3059
  class SelectionCellComponent extends DisposableComponent {
3124
3060
  constructor() {
3125
3061
  super();
@@ -3391,6 +3327,34 @@ class ColumnListModel extends AbstractComputedListModel {
3391
3327
  }
3392
3328
  }
3393
3329
 
3330
+ const TEXT_SEARCH_FORMATTER_KEY = `aup:table:textSearchFormatter`;
3331
+ const Keys = Enum("useFunction", "useInstance", "useClass");
3332
+ function EnableCellTextSearch(options) {
3333
+ assert$1.notNil(options);
3334
+ return (constructor) => {
3335
+ const klass = Klass.get(constructor);
3336
+ assert$1.isFalsey(klass.hasOwnMetadata(TEXT_SEARCH_FORMATTER_KEY), "class already decorated with @EnableCellTextSearch");
3337
+ klass.defineMetadata(TEXT_SEARCH_FORMATTER_KEY, options);
3338
+ };
3339
+ }
3340
+ (function (EnableCellTextSearch) {
3341
+ function getFormatter(renderer, useDefault) {
3342
+ var _a;
3343
+ const options = (_a = Klass.get(renderer).getMetadata(TEXT_SEARCH_FORMATTER_KEY)) !== null && _a !== void 0 ? _a : {};
3344
+ if (options[Keys.useFunction]) {
3345
+ return ColumnTextSearchFormatter.forFormatter(options[Keys.useFunction]);
3346
+ }
3347
+ if (options[Keys.useInstance]) {
3348
+ return options[Keys.useInstance];
3349
+ }
3350
+ if (options[Keys.useClass]) {
3351
+ return new ColumnTextSearchFormatter.Delegating(options[Keys.useClass]);
3352
+ }
3353
+ return useDefault();
3354
+ }
3355
+ EnableCellTextSearch.getFormatter = getFormatter;
3356
+ })(EnableCellTextSearch || (EnableCellTextSearch = {}));
3357
+
3394
3358
  class CustomValueColumnModel extends ColumnModel {
3395
3359
  constructor(columnId, defaults, getValue) {
3396
3360
  super(columnId, defaults);
@@ -3444,11 +3408,11 @@ class ListPropertyColumnModel extends ColumnModel {
3444
3408
  constructor(id, property, defaults) {
3445
3409
  super(id, defaults);
3446
3410
  this.property = property;
3447
- this._format = (value) => value.map(v => v === null || v === void 0 ? void 0 : v.toString()).join(", ");
3448
- this.cellRenderer(DefaultListCellRendererComponent);
3411
+ this._format = (value) => value === null || value === void 0 ? void 0 : value.map(v => v === null || v === void 0 ? void 0 : v.toString()).join(", ");
3412
+ this.cellRenderer(DefaultCellRendererComponent);
3449
3413
  }
3450
3414
  cellRenderer(componentType) {
3451
- this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => new ColumnTextSearchFormatter.DefaultArrayFormatter()), row => row[this.property]);
3415
+ this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => ColumnTextSearchFormatter.forFormatter(value => this._format(value))), row => row[this.property]);
3452
3416
  this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
3453
3417
  let rowElement = rowData.row[this.property];
3454
3418
  // @ts-ignore Started complaining in ts 4.5.. but I think my logic is correct...
@@ -3489,7 +3453,7 @@ class PropertyColumnModel extends ColumnModel {
3489
3453
  this.cellRenderer(DefaultCellRendererComponent);
3490
3454
  }
3491
3455
  cellRenderer(componentType, onComponentInitOrOptions) {
3492
- this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => new ColumnTextSearchFormatter.DefaultValueFormatter()), row => row[this.property]);
3456
+ this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => ColumnTextSearchFormatter.forFormatter(value => this._format(value))), row => row[this.property]);
3493
3457
  this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
3494
3458
  if (firstTime) {
3495
3459
  if (isFunction(onComponentInitOrOptions)) {
@@ -4746,7 +4710,6 @@ ComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
4746
4710
  EditRowControls,
4747
4711
  ColumnTemplateDirective,
4748
4712
  DefaultCellRendererComponent,
4749
- DefaultListCellRendererComponent,
4750
4713
  TableCellComponent,
4751
4714
  SelectionCellComponent,
4752
4715
  SelectionHeaderCellComponent,
@@ -4910,7 +4873,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
4910
4873
  EditRowControls,
4911
4874
  ColumnTemplateDirective,
4912
4875
  DefaultCellRendererComponent,
4913
- DefaultListCellRendererComponent,
4914
4876
  TableCellComponent,
4915
4877
  SelectionCellComponent,
4916
4878
  SelectionHeaderCellComponent,
@@ -10322,5 +10284,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
10322
10284
  * Generated bundle index. Do not edit.
10323
10285
  */
10324
10286
 
10325
- 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, DefaultListCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EnableCellTextSearch, 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, 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, TableCellComponent, TableComponent, 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 };
10287
+ 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, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EnableCellTextSearch, 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, 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, TableCellComponent, TableComponent, 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 };
10326
10288
  //# sourceMappingURL=coolon-angular-ui-powerups.mjs.map