@coolon/angular-ui-powerups 13.5.2 → 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.
@@ -2961,34 +2961,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
2961
2961
  type: Input
2962
2962
  }] } });
2963
2963
 
2964
- const TEXT_SEARCH_FORMATTER_KEY = `aup:table:textSearchFormatter`;
2965
- const Keys = Enum("useFunction", "useInstance", "useClass");
2966
- function EnableCellTextSearch(options) {
2967
- assert$1.notNil(options);
2968
- return (constructor) => {
2969
- const klass = Klass.get(constructor);
2970
- assert$1.isFalsey(klass.hasOwnMetadata(TEXT_SEARCH_FORMATTER_KEY), "class already decorated with @EnableCellTextSearch");
2971
- klass.defineMetadata(TEXT_SEARCH_FORMATTER_KEY, options);
2972
- };
2973
- }
2974
- (function (EnableCellTextSearch) {
2975
- function getFormatter(renderer, useDefault) {
2976
- const options = Klass.get(renderer).getMetadata(TEXT_SEARCH_FORMATTER_KEY) ?? {};
2977
- if (options[Keys.useFunction]) {
2978
- return ColumnTextSearchFormatter.forFormatter(options[Keys.useFunction]);
2979
- }
2980
- if (options[Keys.useInstance]) {
2981
- return options[Keys.useInstance];
2982
- }
2983
- if (options[Keys.useClass]) {
2984
- return new ColumnTextSearchFormatter.Delegating(options[Keys.useClass]);
2985
- }
2986
- return useDefault();
2987
- }
2988
- EnableCellTextSearch.getFormatter = getFormatter;
2989
- })(EnableCellTextSearch || (EnableCellTextSearch = {}));
2990
-
2991
- let DefaultCellRendererComponent = class DefaultCellRendererComponent {
2964
+ class DefaultCellRendererComponent {
2992
2965
  constructor() {
2993
2966
  }
2994
2967
  set value(value) {
@@ -2997,13 +2970,9 @@ let DefaultCellRendererComponent = class DefaultCellRendererComponent {
2997
2970
  get value() {
2998
2971
  return this._value;
2999
2972
  }
3000
- };
2973
+ }
3001
2974
  DefaultCellRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3002
2975
  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 } });
3003
- DefaultCellRendererComponent = __decorate([
3004
- EnableCellTextSearch({ useClass: ColumnTextSearchFormatter.DefaultValueFormatter }),
3005
- __metadata("design:paramtypes", [])
3006
- ], DefaultCellRendererComponent);
3007
2976
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultCellRendererComponent, decorators: [{
3008
2977
  type: Component,
3009
2978
  args: [{ selector: "aup-default-cell-renderer", template: "<span [innerHTML]=\"value| aupHighlight\"></span>\n", styles: [""] }]
@@ -3077,37 +3046,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
3077
3046
  type: Input
3078
3047
  }] } });
3079
3048
 
3080
- let formatter = (row) => row.map(e => e?.toString()).join(", ");
3081
- let DefaultListCellRendererComponent = class DefaultListCellRendererComponent extends DisposableComponent {
3082
- constructor() {
3083
- super();
3084
- const { chain } = Dsl.disposeWith(this);
3085
- this.text$ = chain(this.value$).reduce(formatter);
3086
- }
3087
- };
3088
- DefaultListCellRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultListCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3089
- 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 } });
3090
- __decorate([
3091
- TrackExternal(),
3092
- __metadata("design:type", ListModel)
3093
- ], DefaultListCellRendererComponent.prototype, "value$", void 0);
3094
- __decorate([
3095
- StoreInListModel("value$"),
3096
- __metadata("design:type", Array)
3097
- ], DefaultListCellRendererComponent.prototype, "value", void 0);
3098
- DefaultListCellRendererComponent = __decorate([
3099
- EnableCellTextSearch({ useClass: ColumnTextSearchFormatter.DefaultArrayFormatter }),
3100
- __metadata("design:paramtypes", [])
3101
- ], DefaultListCellRendererComponent);
3102
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultListCellRendererComponent, decorators: [{
3103
- type: Component,
3104
- args: [{ selector: "aup-default-list-cell-renderer", template: "<span [innerHTML]=\"text$.value| aupHighlight\"></span>\n", styles: [""] }]
3105
- }], ctorParameters: function () { return []; }, propDecorators: { value$: [{
3106
- type: Input
3107
- }], value: [{
3108
- type: Input
3109
- }] } });
3110
-
3111
3049
  class SelectionCellComponent extends DisposableComponent {
3112
3050
  constructor() {
3113
3051
  super();
@@ -3189,6 +3127,33 @@ class ColumnListModel extends AbstractComputedListModel {
3189
3127
  }
3190
3128
  }
3191
3129
 
3130
+ const TEXT_SEARCH_FORMATTER_KEY = `aup:table:textSearchFormatter`;
3131
+ const Keys = Enum("useFunction", "useInstance", "useClass");
3132
+ function EnableCellTextSearch(options) {
3133
+ assert$1.notNil(options);
3134
+ return (constructor) => {
3135
+ const klass = Klass.get(constructor);
3136
+ assert$1.isFalsey(klass.hasOwnMetadata(TEXT_SEARCH_FORMATTER_KEY), "class already decorated with @EnableCellTextSearch");
3137
+ klass.defineMetadata(TEXT_SEARCH_FORMATTER_KEY, options);
3138
+ };
3139
+ }
3140
+ (function (EnableCellTextSearch) {
3141
+ function getFormatter(renderer, useDefault) {
3142
+ const options = Klass.get(renderer).getMetadata(TEXT_SEARCH_FORMATTER_KEY) ?? {};
3143
+ if (options[Keys.useFunction]) {
3144
+ return ColumnTextSearchFormatter.forFormatter(options[Keys.useFunction]);
3145
+ }
3146
+ if (options[Keys.useInstance]) {
3147
+ return options[Keys.useInstance];
3148
+ }
3149
+ if (options[Keys.useClass]) {
3150
+ return new ColumnTextSearchFormatter.Delegating(options[Keys.useClass]);
3151
+ }
3152
+ return useDefault();
3153
+ }
3154
+ EnableCellTextSearch.getFormatter = getFormatter;
3155
+ })(EnableCellTextSearch || (EnableCellTextSearch = {}));
3156
+
3192
3157
  class CustomValueColumnModel extends ColumnModel {
3193
3158
  constructor(columnId, defaults, getValue) {
3194
3159
  super(columnId, defaults);
@@ -3242,11 +3207,11 @@ class ListPropertyColumnModel extends ColumnModel {
3242
3207
  constructor(id, property, defaults) {
3243
3208
  super(id, defaults);
3244
3209
  this.property = property;
3245
- this._format = (value) => value.map(v => v?.toString()).join(", ");
3246
- this.cellRenderer(DefaultListCellRendererComponent);
3210
+ this._format = (value) => value?.map(v => v?.toString()).join(", ");
3211
+ this.cellRenderer(DefaultCellRendererComponent);
3247
3212
  }
3248
3213
  cellRenderer(componentType) {
3249
- this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => new ColumnTextSearchFormatter.DefaultArrayFormatter()), row => row[this.property]);
3214
+ this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => ColumnTextSearchFormatter.forFormatter(value => this._format(value))), row => row[this.property]);
3250
3215
  this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
3251
3216
  let rowElement = rowData.row[this.property];
3252
3217
  // @ts-ignore Started complaining in ts 4.5.. but I think my logic is correct...
@@ -3287,7 +3252,7 @@ class PropertyColumnModel extends ColumnModel {
3287
3252
  this.cellRenderer(DefaultCellRendererComponent);
3288
3253
  }
3289
3254
  cellRenderer(componentType, onComponentInitOrOptions) {
3290
- this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => new ColumnTextSearchFormatter.DefaultValueFormatter()), row => row[this.property]);
3255
+ this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => ColumnTextSearchFormatter.forFormatter(value => this._format(value))), row => row[this.property]);
3291
3256
  this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
3292
3257
  if (firstTime) {
3293
3258
  if (isFunction(onComponentInitOrOptions)) {
@@ -4700,7 +4665,6 @@ ComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
4700
4665
  EditRowControls,
4701
4666
  ColumnTemplateDirective,
4702
4667
  DefaultCellRendererComponent,
4703
- DefaultListCellRendererComponent,
4704
4668
  TableCellComponent,
4705
4669
  SelectionCellComponent,
4706
4670
  SelectionHeaderCellComponent,
@@ -4864,7 +4828,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
4864
4828
  EditRowControls,
4865
4829
  ColumnTemplateDirective,
4866
4830
  DefaultCellRendererComponent,
4867
- DefaultListCellRendererComponent,
4868
4831
  TableCellComponent,
4869
4832
  SelectionCellComponent,
4870
4833
  SelectionHeaderCellComponent,
@@ -10198,5 +10161,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
10198
10161
  * Generated bundle index. Do not edit.
10199
10162
  */
10200
10163
 
10201
- 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 };
10164
+ 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 };
10202
10165
  //# sourceMappingURL=coolon-angular-ui-powerups.mjs.map