@coolon/angular-ui-powerups 12.0.2 → 12.0.4
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/bundles/coolon-angular-ui-powerups.umd.js +57 -40
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/exports.js +1 -0
- package/esm2015/lib/components/exports.js.map +1 -1
- package/esm2015/lib/components/exports.metadata.json +1 -1
- package/esm2015/lib/components/tables/abstract-table-model.js +12 -35
- package/esm2015/lib/components/tables/abstract-table-model.js.map +1 -1
- package/esm2015/lib/components/tables/abstract-table-model.metadata.json +1 -1
- package/esm2015/lib/components/tables/column-list-model.js +38 -0
- package/esm2015/lib/components/tables/column-list-model.js.map +1 -0
- package/esm2015/lib/components/tables/column-list-model.metadata.json +1 -0
- package/esm2015/lib/components/tables/table/table-model.js +1 -1
- package/esm2015/lib/components/tables/table/table-model.js.map +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-table-model.js +2 -3
- package/esm2015/lib/components/tables/tree-table/tree-table-model.js.map +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-table-model.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +49 -37
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/exports.d.ts +1 -0
- package/lib/components/tables/abstract-table-model.d.ts +2 -4
- package/lib/components/tables/column-list-model.d.ts +12 -0
- package/lib/components/tables/tree-table/tree-table-model.d.ts +1 -1
- package/package.json +2 -2
|
@@ -2765,35 +2765,55 @@ ColumnTemplateDirective.propDecorators = {
|
|
|
2765
2765
|
aupColumnTemplateAutoPadChild: [{ type: Input }]
|
|
2766
2766
|
};
|
|
2767
2767
|
|
|
2768
|
-
|
|
2769
|
-
// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
|
|
2770
|
-
class RowClass {
|
|
2771
|
-
constructor(className, matches) {
|
|
2772
|
-
this.className = className;
|
|
2773
|
-
this.matches = matches;
|
|
2774
|
-
}
|
|
2775
|
-
}
|
|
2776
|
-
class VisibleColumnListModel extends AbstractComputedListModel {
|
|
2768
|
+
class ColumnListModel extends AbstractComputedListModel {
|
|
2777
2769
|
constructor() {
|
|
2778
|
-
super(
|
|
2779
|
-
this.
|
|
2770
|
+
super();
|
|
2771
|
+
this._allColumns = new MutableListModel();
|
|
2772
|
+
const { chain } = Dsl.disposeWith(this);
|
|
2773
|
+
this.columnsById = chain(this._allColumns).indexBy('columnId');
|
|
2774
|
+
}
|
|
2775
|
+
get allColumns() {
|
|
2776
|
+
return this._allColumns.readonly;
|
|
2777
|
+
}
|
|
2778
|
+
getColumn(id) {
|
|
2779
|
+
return this.columnsById.get(id);
|
|
2780
2780
|
}
|
|
2781
|
-
|
|
2781
|
+
hasColumn(id) {
|
|
2782
|
+
return !!this.columnsById.get(id);
|
|
2783
|
+
}
|
|
2784
|
+
addColumn(column, index) {
|
|
2785
|
+
if (this.hasColumn(column.columnId)) {
|
|
2786
|
+
lang.illegalState(`Column with id=${column.columnId} already exists`);
|
|
2787
|
+
}
|
|
2782
2788
|
this.runInTransaction(() => {
|
|
2783
|
-
|
|
2789
|
+
if (!_.isNil(index)) {
|
|
2790
|
+
this._allColumns.insert(index, column);
|
|
2791
|
+
}
|
|
2792
|
+
else {
|
|
2793
|
+
this._allColumns.push(column);
|
|
2794
|
+
}
|
|
2784
2795
|
this.trackSource(column.visible);
|
|
2785
2796
|
});
|
|
2797
|
+
return column;
|
|
2786
2798
|
}
|
|
2787
2799
|
doComputeValue() {
|
|
2788
|
-
return this.
|
|
2800
|
+
return this._allColumns.value.filter(c => c.visible.value);
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
|
|
2805
|
+
// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
|
|
2806
|
+
class RowClass {
|
|
2807
|
+
constructor(className, matches) {
|
|
2808
|
+
this.className = className;
|
|
2809
|
+
this.matches = matches;
|
|
2789
2810
|
}
|
|
2790
2811
|
}
|
|
2791
2812
|
class AbstractTableModel extends GarbageCollector {
|
|
2792
2813
|
constructor(sourceOfTruth) {
|
|
2793
2814
|
super();
|
|
2794
2815
|
this.sourceOfTruth = sourceOfTruth;
|
|
2795
|
-
this.
|
|
2796
|
-
this._visibleColumnTracker = new VisibleColumnListModel();
|
|
2816
|
+
this._columnList = this.registerDisposable(new ColumnListModel());
|
|
2797
2817
|
this._editorSessions = new MutableListModel();
|
|
2798
2818
|
this.rowClassNamePredicates = [];
|
|
2799
2819
|
this.rowClickListeners = new EventListenerList();
|
|
@@ -2803,7 +2823,6 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
2803
2823
|
};
|
|
2804
2824
|
this.identityOf = sourceOfTruth.identityOf;
|
|
2805
2825
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
2806
|
-
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
2807
2826
|
this._rowsBeingEdited = new MutableListModel([], {
|
|
2808
2827
|
identifiedWith: this.identityOf
|
|
2809
2828
|
});
|
|
@@ -2811,18 +2830,18 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
2811
2830
|
this.editing = chain(this._editorSessions).count().isGreaterThan(0);
|
|
2812
2831
|
this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
|
|
2813
2832
|
this.firstEditableColumn = chain(this.columns).select(c => c.hasEditorPortal()).first();
|
|
2814
|
-
this.firstVisibleColumn = chain(this.
|
|
2815
|
-
this.lastVisibleColumn = chain(this.
|
|
2816
|
-
this.rowSelectionDisabledOnAllColumns = chain(this.
|
|
2833
|
+
this.firstVisibleColumn = chain(this._columnList).first();
|
|
2834
|
+
this.lastVisibleColumn = chain(this._columnList).last();
|
|
2835
|
+
this.rowSelectionDisabledOnAllColumns = chain(this._columnList).select(column => column.isRowSelectionEnabled()).count().equals(0);
|
|
2817
2836
|
}
|
|
2818
2837
|
get rowsBeingEdited() {
|
|
2819
2838
|
return this._rowsBeingEdited.readonly;
|
|
2820
2839
|
}
|
|
2821
2840
|
get columns() {
|
|
2822
|
-
return this.
|
|
2841
|
+
return this._columnList.allColumns;
|
|
2823
2842
|
}
|
|
2824
2843
|
get visibleColumns() {
|
|
2825
|
-
return this.
|
|
2844
|
+
return this._columnList.readonly;
|
|
2826
2845
|
}
|
|
2827
2846
|
pluck(property, options) {
|
|
2828
2847
|
const columnId = (options === null || options === void 0 ? void 0 : options.columnId) || property.toString();
|
|
@@ -2837,7 +2856,7 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
2837
2856
|
const columnId = 'selection-column';
|
|
2838
2857
|
this.selectionColumnModel = new SelectionColumnModel(columnId, () => this.getColumnTextProperties(columnId), selectionModel);
|
|
2839
2858
|
this.addRowClass('aup-row-selected', row => this.selectionColumnModel.isSelected(row));
|
|
2840
|
-
const selectionColumnModel = this.addColumn(this.selectionColumnModel);
|
|
2859
|
+
const selectionColumnModel = this.addColumn(this.selectionColumnModel, 0);
|
|
2841
2860
|
if (!_.isNil(visible)) {
|
|
2842
2861
|
selectionColumnModel.visibleWhile(visible instanceof ValueModel ? visible : ValueModel.constant(visible));
|
|
2843
2862
|
}
|
|
@@ -2873,15 +2892,8 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
2873
2892
|
this._createForm = factory;
|
|
2874
2893
|
return this;
|
|
2875
2894
|
}
|
|
2876
|
-
addColumn(column) {
|
|
2877
|
-
|
|
2878
|
-
lang.illegalState(`Column with id=${column.columnId} already exists`);
|
|
2879
|
-
}
|
|
2880
|
-
else {
|
|
2881
|
-
this._columns.push(column);
|
|
2882
|
-
this._visibleColumnTracker.addColumn(column);
|
|
2883
|
-
}
|
|
2884
|
-
return column;
|
|
2895
|
+
addColumn(column, index) {
|
|
2896
|
+
return this._columnList.addColumn(column, index);
|
|
2885
2897
|
}
|
|
2886
2898
|
// removeColumn(column: ColumnModel<Row>) {
|
|
2887
2899
|
//
|
|
@@ -3623,7 +3635,7 @@ class TreeToListModel extends ComputedListModel {
|
|
|
3623
3635
|
}
|
|
3624
3636
|
}
|
|
3625
3637
|
|
|
3626
|
-
// import {
|
|
3638
|
+
// import { SelfAndDescendantsVisitor } from '@client/api/light-architect/model/area/visitable.class';
|
|
3627
3639
|
// TODO:
|
|
3628
3640
|
// Selection Models:
|
|
3629
3641
|
// - as simple navigation tree
|
|
@@ -3658,7 +3670,7 @@ class TreeTableModel extends AbstractTableModel {
|
|
|
3658
3670
|
static fromList(sourceOfTruth, builder) {
|
|
3659
3671
|
const treeExpansionModel = new TreeExpansionModel(sourceOfTruth.identityOf);
|
|
3660
3672
|
const nodes = new TreeToListModel(sourceOfTruth, treeExpansionModel);
|
|
3661
|
-
const model = new
|
|
3673
|
+
const model = new this(nodes, treeExpansionModel);
|
|
3662
3674
|
model.registerDisposable(nodes);
|
|
3663
3675
|
if (builder)
|
|
3664
3676
|
builder(model);
|
|
@@ -3668,7 +3680,7 @@ class TreeTableModel extends AbstractTableModel {
|
|
|
3668
3680
|
const columnId = 'tree-label';
|
|
3669
3681
|
const column = new TreeLabelColumnModel(columnId, () => this.getColumnTextProperties(columnId), this.treeExpansionModel);
|
|
3670
3682
|
builder(column);
|
|
3671
|
-
|
|
3683
|
+
this.addColumn(column);
|
|
3672
3684
|
}
|
|
3673
3685
|
expand(node) {
|
|
3674
3686
|
this.treeExpansionModel.expand(node);
|
|
@@ -5435,7 +5447,7 @@ SelectInputActivity.decorators = [
|
|
|
5435
5447
|
*/
|
|
5436
5448
|
class TableModel extends AbstractTableModel {
|
|
5437
5449
|
static fromList(sourceOfTruth, builder) {
|
|
5438
|
-
const model = new
|
|
5450
|
+
const model = new this(sourceOfTruth);
|
|
5439
5451
|
if (builder)
|
|
5440
5452
|
builder(model);
|
|
5441
5453
|
return model;
|
|
@@ -8383,5 +8395,5 @@ VisibilityService.ctorParameters = () => [
|
|
|
8383
8395
|
* Generated bundle index. Do not edit.
|
|
8384
8396
|
*/
|
|
8385
8397
|
|
|
8386
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, 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, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, 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, SelfAndDescendantsVisitor, 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, TreeToListModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0 };
|
|
8398
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, 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, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, 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, SelfAndDescendantsVisitor, 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, TreeToListModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0 };
|
|
8387
8399
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|