@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.
- package/esm2020/lib/components/components.module.mjs +1 -4
- package/esm2020/lib/components/exports.mjs +1 -2
- package/esm2020/lib/components/tables/column/column-model.mjs +3 -3
- package/esm2020/lib/components/tables/column/list-propery-column-model.mjs +5 -5
- package/esm2020/lib/components/tables/column/property-column-model.mjs +2 -2
- package/esm2020/lib/components/tables/renderer/default-cell-renderer/default-cell-renderer.component.mjs +3 -11
- package/esm2020/lib/components/tables/search/column-text-search-formatter.mjs +3 -4
- package/fesm2015/coolon-angular-ui-powerups.mjs +39 -77
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +38 -76
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/components.module.d.ts +51 -52
- package/lib/components/exports.d.ts +0 -1
- package/package.json +1 -1
- package/esm2020/lib/components/tables/renderer/default-list-cell-renderer/default-list-cell-renderer.component.mjs +0 -40
- package/lib/components/tables/renderer/default-list-cell-renderer/default-list-cell-renderer.component.d.ts +0 -12
|
@@ -2569,9 +2569,8 @@ class ColumnTextSearchFormatter {
|
|
|
2569
2569
|
ColumnTextSearchFormatter.Null = Null;
|
|
2570
2570
|
class DefaultValueFormatter extends ColumnTextSearchFormatter {
|
|
2571
2571
|
format(value) {
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
return s;
|
|
2572
|
+
// console.log("DefaultValueFormatter", { value, text: s })
|
|
2573
|
+
return value?.toString() ?? "";
|
|
2575
2574
|
}
|
|
2576
2575
|
}
|
|
2577
2576
|
ColumnTextSearchFormatter.DefaultValueFormatter = DefaultValueFormatter;
|
|
@@ -2598,7 +2597,7 @@ class ColumnTextSearchWrapper extends ColumnTextSearchFormatter.Delegate {
|
|
|
2598
2597
|
format(row) {
|
|
2599
2598
|
let value = this._map(row);
|
|
2600
2599
|
let result = this._delegate ? this._delegate.format(value) : "";
|
|
2601
|
-
console.log({
|
|
2600
|
+
// console.log({format: row, value, text:result})
|
|
2602
2601
|
return result;
|
|
2603
2602
|
}
|
|
2604
2603
|
setDelegate(formatter, mapper) {
|
|
@@ -2662,7 +2661,7 @@ class ColumnModel extends GarbageCollector {
|
|
|
2662
2661
|
}
|
|
2663
2662
|
configureColumnTextSearch(formatter, mapper) {
|
|
2664
2663
|
assert$1.notNil(formatter);
|
|
2665
|
-
console.log({
|
|
2664
|
+
// console.log({col: this.columnId, formatter});
|
|
2666
2665
|
this.textSearchDelegate.setDelegate(formatter, mapper);
|
|
2667
2666
|
}
|
|
2668
2667
|
configureHeaderRenderer(config) {
|
|
@@ -2962,34 +2961,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
2962
2961
|
type: Input
|
|
2963
2962
|
}] } });
|
|
2964
2963
|
|
|
2965
|
-
|
|
2966
|
-
const Keys = Enum("useFunction", "useInstance", "useClass");
|
|
2967
|
-
function EnableCellTextSearch(options) {
|
|
2968
|
-
assert$1.notNil(options);
|
|
2969
|
-
return (constructor) => {
|
|
2970
|
-
const klass = Klass.get(constructor);
|
|
2971
|
-
assert$1.isFalsey(klass.hasOwnMetadata(TEXT_SEARCH_FORMATTER_KEY), "class already decorated with @EnableCellTextSearch");
|
|
2972
|
-
klass.defineMetadata(TEXT_SEARCH_FORMATTER_KEY, options);
|
|
2973
|
-
};
|
|
2974
|
-
}
|
|
2975
|
-
(function (EnableCellTextSearch) {
|
|
2976
|
-
function getFormatter(renderer, useDefault) {
|
|
2977
|
-
const options = Klass.get(renderer).getMetadata(TEXT_SEARCH_FORMATTER_KEY) ?? {};
|
|
2978
|
-
if (options[Keys.useFunction]) {
|
|
2979
|
-
return ColumnTextSearchFormatter.forFormatter(options[Keys.useFunction]);
|
|
2980
|
-
}
|
|
2981
|
-
if (options[Keys.useInstance]) {
|
|
2982
|
-
return options[Keys.useInstance];
|
|
2983
|
-
}
|
|
2984
|
-
if (options[Keys.useClass]) {
|
|
2985
|
-
return new ColumnTextSearchFormatter.Delegating(options[Keys.useClass]);
|
|
2986
|
-
}
|
|
2987
|
-
return useDefault();
|
|
2988
|
-
}
|
|
2989
|
-
EnableCellTextSearch.getFormatter = getFormatter;
|
|
2990
|
-
})(EnableCellTextSearch || (EnableCellTextSearch = {}));
|
|
2991
|
-
|
|
2992
|
-
let DefaultCellRendererComponent = class DefaultCellRendererComponent {
|
|
2964
|
+
class DefaultCellRendererComponent {
|
|
2993
2965
|
constructor() {
|
|
2994
2966
|
}
|
|
2995
2967
|
set value(value) {
|
|
@@ -2998,13 +2970,9 @@ let DefaultCellRendererComponent = class DefaultCellRendererComponent {
|
|
|
2998
2970
|
get value() {
|
|
2999
2971
|
return this._value;
|
|
3000
2972
|
}
|
|
3001
|
-
}
|
|
2973
|
+
}
|
|
3002
2974
|
DefaultCellRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3003
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 } });
|
|
3004
|
-
DefaultCellRendererComponent = __decorate([
|
|
3005
|
-
EnableCellTextSearch({ useClass: ColumnTextSearchFormatter.DefaultValueFormatter }),
|
|
3006
|
-
__metadata("design:paramtypes", [])
|
|
3007
|
-
], DefaultCellRendererComponent);
|
|
3008
2976
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultCellRendererComponent, decorators: [{
|
|
3009
2977
|
type: Component,
|
|
3010
2978
|
args: [{ selector: "aup-default-cell-renderer", template: "<span [innerHTML]=\"value| aupHighlight\"></span>\n", styles: [""] }]
|
|
@@ -3078,37 +3046,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
3078
3046
|
type: Input
|
|
3079
3047
|
}] } });
|
|
3080
3048
|
|
|
3081
|
-
let formatter = (row) => row.map(e => e?.toString()).join(", ");
|
|
3082
|
-
let DefaultListCellRendererComponent = class DefaultListCellRendererComponent extends DisposableComponent {
|
|
3083
|
-
constructor() {
|
|
3084
|
-
super();
|
|
3085
|
-
const { chain } = Dsl.disposeWith(this);
|
|
3086
|
-
this.text$ = chain(this.value$).reduce(formatter);
|
|
3087
|
-
}
|
|
3088
|
-
};
|
|
3089
|
-
DefaultListCellRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultListCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3090
|
-
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 } });
|
|
3091
|
-
__decorate([
|
|
3092
|
-
TrackExternal(),
|
|
3093
|
-
__metadata("design:type", ListModel)
|
|
3094
|
-
], DefaultListCellRendererComponent.prototype, "value$", void 0);
|
|
3095
|
-
__decorate([
|
|
3096
|
-
StoreInListModel("value$"),
|
|
3097
|
-
__metadata("design:type", Array)
|
|
3098
|
-
], DefaultListCellRendererComponent.prototype, "value", void 0);
|
|
3099
|
-
DefaultListCellRendererComponent = __decorate([
|
|
3100
|
-
EnableCellTextSearch({ useClass: ColumnTextSearchFormatter.DefaultArrayFormatter }),
|
|
3101
|
-
__metadata("design:paramtypes", [])
|
|
3102
|
-
], DefaultListCellRendererComponent);
|
|
3103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DefaultListCellRendererComponent, decorators: [{
|
|
3104
|
-
type: Component,
|
|
3105
|
-
args: [{ selector: "aup-default-list-cell-renderer", template: "<span [innerHTML]=\"text$.value| aupHighlight\"></span>\n", styles: [""] }]
|
|
3106
|
-
}], ctorParameters: function () { return []; }, propDecorators: { value$: [{
|
|
3107
|
-
type: Input
|
|
3108
|
-
}], value: [{
|
|
3109
|
-
type: Input
|
|
3110
|
-
}] } });
|
|
3111
|
-
|
|
3112
3049
|
class SelectionCellComponent extends DisposableComponent {
|
|
3113
3050
|
constructor() {
|
|
3114
3051
|
super();
|
|
@@ -3190,6 +3127,33 @@ class ColumnListModel extends AbstractComputedListModel {
|
|
|
3190
3127
|
}
|
|
3191
3128
|
}
|
|
3192
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
|
+
|
|
3193
3157
|
class CustomValueColumnModel extends ColumnModel {
|
|
3194
3158
|
constructor(columnId, defaults, getValue) {
|
|
3195
3159
|
super(columnId, defaults);
|
|
@@ -3243,11 +3207,11 @@ class ListPropertyColumnModel extends ColumnModel {
|
|
|
3243
3207
|
constructor(id, property, defaults) {
|
|
3244
3208
|
super(id, defaults);
|
|
3245
3209
|
this.property = property;
|
|
3246
|
-
this._format = (value) => value
|
|
3247
|
-
this.cellRenderer(
|
|
3210
|
+
this._format = (value) => value?.map(v => v?.toString()).join(", ");
|
|
3211
|
+
this.cellRenderer(DefaultCellRendererComponent);
|
|
3248
3212
|
}
|
|
3249
3213
|
cellRenderer(componentType) {
|
|
3250
|
-
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () =>
|
|
3214
|
+
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => ColumnTextSearchFormatter.forFormatter(value => this._format(value))), row => row[this.property]);
|
|
3251
3215
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
|
|
3252
3216
|
let rowElement = rowData.row[this.property];
|
|
3253
3217
|
// @ts-ignore Started complaining in ts 4.5.. but I think my logic is correct...
|
|
@@ -3288,7 +3252,7 @@ class PropertyColumnModel extends ColumnModel {
|
|
|
3288
3252
|
this.cellRenderer(DefaultCellRendererComponent);
|
|
3289
3253
|
}
|
|
3290
3254
|
cellRenderer(componentType, onComponentInitOrOptions) {
|
|
3291
|
-
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () =>
|
|
3255
|
+
this.configureColumnTextSearch(EnableCellTextSearch.getFormatter(componentType, () => ColumnTextSearchFormatter.forFormatter(value => this._format(value))), row => row[this.property]);
|
|
3292
3256
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {
|
|
3293
3257
|
if (firstTime) {
|
|
3294
3258
|
if (isFunction(onComponentInitOrOptions)) {
|
|
@@ -4701,7 +4665,6 @@ ComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
4701
4665
|
EditRowControls,
|
|
4702
4666
|
ColumnTemplateDirective,
|
|
4703
4667
|
DefaultCellRendererComponent,
|
|
4704
|
-
DefaultListCellRendererComponent,
|
|
4705
4668
|
TableCellComponent,
|
|
4706
4669
|
SelectionCellComponent,
|
|
4707
4670
|
SelectionHeaderCellComponent,
|
|
@@ -4865,7 +4828,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
4865
4828
|
EditRowControls,
|
|
4866
4829
|
ColumnTemplateDirective,
|
|
4867
4830
|
DefaultCellRendererComponent,
|
|
4868
|
-
DefaultListCellRendererComponent,
|
|
4869
4831
|
TableCellComponent,
|
|
4870
4832
|
SelectionCellComponent,
|
|
4871
4833
|
SelectionHeaderCellComponent,
|
|
@@ -10199,5 +10161,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
10199
10161
|
* Generated bundle index. Do not edit.
|
|
10200
10162
|
*/
|
|
10201
10163
|
|
|
10202
|
-
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,
|
|
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 };
|
|
10203
10165
|
//# sourceMappingURL=coolon-angular-ui-powerups.mjs.map
|