@one-paragon/angular-utilities 0.1.31 → 0.1.32-beta
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/action-state/action-state-spinner/action-state-spinner.component.d.ts +12 -12
- package/action-state/action-state-ui/action-state-ui.module.d.ts +9 -9
- package/action-state/index.d.ts +4 -4
- package/action-state/ngrx-ext/ngrx-ext.module.d.ts +8 -8
- package/action-state/ngrx.d.ts +31 -31
- package/esm2020/action-state/action-state-spinner/action-state-spinner.component.mjs +23 -23
- package/esm2020/action-state/action-state-ui/action-state-ui.module.mjs +28 -28
- package/esm2020/action-state/index.mjs +8 -8
- package/esm2020/action-state/ngrx-ext/ngrx-ext.module.mjs +23 -23
- package/esm2020/action-state/ngrx.mjs +42 -42
- package/esm2020/http-request-state/HttpRequestStateFactory.mjs +26 -26
- package/esm2020/http-request-state/HttpRequestStateStore.mjs +96 -96
- package/esm2020/http-request-state/directives/HttpStateDirectiveBase.mjs +33 -33
- package/esm2020/http-request-state/directives/http-error-state-directive.mjs +28 -28
- package/esm2020/http-request-state/directives/http-inProgress-state-directive.mjs +28 -28
- package/esm2020/http-request-state/directives/http-notStarted-state-directive.mjs +28 -28
- package/esm2020/http-request-state/directives/http-success-state-directive.mjs +33 -33
- package/esm2020/http-request-state/directives/index.mjs +5 -5
- package/esm2020/http-request-state/directives/request-state-directive.mjs +59 -59
- package/esm2020/http-request-state/helpers.mjs +21 -21
- package/esm2020/http-request-state/http-request-state.mjs +38 -38
- package/esm2020/http-request-state/http-state-module.mjs +40 -40
- package/esm2020/http-request-state/index.mjs +6 -6
- package/esm2020/http-request-state/rxjs/getRequestorBody.mjs +3 -3
- package/esm2020/http-request-state/rxjs/getRequestorState.mjs +2 -2
- package/esm2020/http-request-state/rxjs/index.mjs +4 -4
- package/esm2020/http-request-state/rxjs/tapError.mjs +11 -11
- package/esm2020/http-request-state/rxjs/tapSuccess.mjs +11 -11
- package/esm2020/http-request-state/types.mjs +15 -15
- package/esm2020/ngrx/actionable-selector.mjs +75 -75
- package/esm2020/ngrx/index.mjs +1 -1
- package/esm2020/one-paragon-angular-utilities.mjs +4 -4
- package/esm2020/public-api.mjs +19 -19
- package/esm2020/rxjs/defaultShareReplay.mjs +6 -6
- package/esm2020/rxjs/index.mjs +5 -5
- package/esm2020/rxjs/mapError.mjs +7 -7
- package/esm2020/rxjs/rxjs-operators.mjs +91 -91
- package/esm2020/rxjs/subjectifier.mjs +15 -15
- package/esm2020/table-builder/classes/DefaultSettings.mjs +6 -6
- package/esm2020/table-builder/classes/GenericTableDataSource.mjs +13 -13
- package/esm2020/table-builder/classes/MatTableObservableDataSource.mjs +41 -21
- package/esm2020/table-builder/classes/TableBuilderConfig.mjs +3 -3
- package/esm2020/table-builder/classes/TableState.mjs +31 -31
- package/esm2020/table-builder/classes/data-filter.mjs +26 -26
- package/esm2020/table-builder/classes/display-col.mjs +1 -1
- package/esm2020/table-builder/classes/filter-info.mjs +73 -73
- package/esm2020/table-builder/classes/table-builder-general-settings.mjs +67 -67
- package/esm2020/table-builder/classes/table-builder.mjs +76 -76
- package/esm2020/table-builder/classes/table-store.mjs +292 -292
- package/esm2020/table-builder/components/array-column.component.mjs +32 -32
- package/esm2020/table-builder/components/column-builder/column-builder.component.mjs +112 -112
- package/esm2020/table-builder/components/date-filter/date-filter.component.mjs +25 -25
- package/esm2020/table-builder/components/date-time-filter/date-time-filter.component.mjs +22 -22
- package/esm2020/table-builder/components/filter/filter.component.mjs +54 -54
- package/esm2020/table-builder/components/filter/in-list/in-list-filter.component.mjs +79 -79
- package/esm2020/table-builder/components/gen-col-displayer/gen-col-displayer.component.mjs +45 -45
- package/esm2020/table-builder/components/generic-table/generic-table.component.mjs +204 -202
- package/esm2020/table-builder/components/generic-table/paginator.component.mjs +60 -60
- package/esm2020/table-builder/components/group-by-list/group-by-list.component.mjs +22 -22
- package/esm2020/table-builder/components/header-menu/header-menu.component.mjs +90 -90
- package/esm2020/table-builder/components/in-filter/in-filter.component.mjs +63 -63
- package/esm2020/table-builder/components/index.mjs +10 -10
- package/esm2020/table-builder/components/initialization-component/initialization-component.mjs +33 -33
- package/esm2020/table-builder/components/link-column.component.mjs +30 -30
- package/esm2020/table-builder/components/number-filter/number-filter.component.mjs +26 -26
- package/esm2020/table-builder/components/sort-menu/sort-menu.component-store.mjs +41 -41
- package/esm2020/table-builder/components/sort-menu/sort-menu.component.mjs +75 -75
- package/esm2020/table-builder/components/table-container/table-container.mjs +322 -322
- package/esm2020/table-builder/components/table-container-filter/filter-list/filter-list.component.mjs +42 -42
- package/esm2020/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.mjs +30 -30
- package/esm2020/table-builder/components/table-container-filter/table-wrapper-filter-store.mjs +24 -24
- package/esm2020/table-builder/directives/custom-cell-directive.mjs +58 -58
- package/esm2020/table-builder/directives/index.mjs +6 -6
- package/esm2020/table-builder/directives/multi-sort.directive.mjs +42 -42
- package/esm2020/table-builder/directives/resize-column.directive.mjs +85 -85
- package/esm2020/table-builder/directives/table-wrapper.directive.mjs +26 -26
- package/esm2020/table-builder/directives/tb-filter.directive.mjs +403 -403
- package/esm2020/table-builder/enums/filterTypes.mjs +72 -72
- package/esm2020/table-builder/functions/boolean-filter-function.mjs +9 -9
- package/esm2020/table-builder/functions/date-filter-function.mjs +58 -58
- package/esm2020/table-builder/functions/download-data.mjs +11 -11
- package/esm2020/table-builder/functions/null-filter-function.mjs +7 -7
- package/esm2020/table-builder/functions/number-filter-function.mjs +31 -31
- package/esm2020/table-builder/functions/sort-data-function.mjs +4 -4
- package/esm2020/table-builder/functions/string-filter-function.mjs +40 -40
- package/esm2020/table-builder/interfaces/ColumnInfo.mjs +1 -1
- package/esm2020/table-builder/interfaces/dictionary.mjs +1 -1
- package/esm2020/table-builder/interfaces/report-def.mjs +35 -35
- package/esm2020/table-builder/material.module.mjs +207 -207
- package/esm2020/table-builder/ngrx/actions.mjs +4 -4
- package/esm2020/table-builder/ngrx/effects.mjs +47 -47
- package/esm2020/table-builder/ngrx/reducer.mjs +51 -51
- package/esm2020/table-builder/ngrx/selectors.mjs +23 -23
- package/esm2020/table-builder/pipes/column-total.pipe.mjs +19 -19
- package/esm2020/table-builder/pipes/format-filter-type.pipe.mjs +17 -17
- package/esm2020/table-builder/pipes/format-filter-value.pipe.mjs +45 -45
- package/esm2020/table-builder/pipes/key-display.mjs +19 -19
- package/esm2020/table-builder/services/export-to-csv.service.mjs +88 -88
- package/esm2020/table-builder/services/link-creator.service.mjs +42 -42
- package/esm2020/table-builder/services/table-template-service.mjs +44 -44
- package/esm2020/table-builder/services/transform-creator.mjs +75 -75
- package/esm2020/table-builder/table-builder.module.mjs +215 -207
- package/esm2020/utilities/directives/auto-focus.directive.mjs +25 -25
- package/esm2020/utilities/directives/clickEmitterDirective.mjs +20 -20
- package/esm2020/utilities/directives/clickSubject.mjs +26 -26
- package/esm2020/utilities/directives/conditional-classes.directive.mjs +35 -35
- package/esm2020/utilities/directives/dialog-service.mjs +25 -25
- package/esm2020/utilities/directives/dialog.mjs +137 -137
- package/esm2020/utilities/directives/mat-toggle-group-directive.mjs +59 -59
- package/esm2020/utilities/directives/prevent-enter.directive.mjs +18 -18
- package/esm2020/utilities/directives/stop-propagation.directive.mjs +24 -24
- package/esm2020/utilities/directives/styler.mjs +25 -25
- package/esm2020/utilities/directives/trim-whitespace.directive.mjs +29 -29
- package/esm2020/utilities/index.mjs +16 -16
- package/esm2020/utilities/module.mjs +91 -91
- package/esm2020/utilities/pipes/function.pipe.mjs +20 -20
- package/esm2020/utilities/pipes/phone.pipe.mjs +19 -19
- package/esm2020/utilities/pipes/space-case.pipes.mjs +28 -28
- package/fesm2015/one-paragon-angular-utilities.mjs +4442 -4413
- package/fesm2015/one-paragon-angular-utilities.mjs.map +1 -1
- package/fesm2020/one-paragon-angular-utilities.mjs +4422 -4393
- package/fesm2020/one-paragon-angular-utilities.mjs.map +1 -1
- package/http-request-state/HttpRequestStateFactory.d.ts +14 -14
- package/http-request-state/HttpRequestStateStore.d.ts +48 -48
- package/http-request-state/directives/HttpStateDirectiveBase.d.ts +16 -16
- package/http-request-state/directives/http-error-state-directive.d.ts +12 -12
- package/http-request-state/directives/http-inProgress-state-directive.d.ts +12 -12
- package/http-request-state/directives/http-notStarted-state-directive.d.ts +12 -12
- package/http-request-state/directives/http-success-state-directive.d.ts +21 -21
- package/http-request-state/directives/index.d.ts +5 -5
- package/http-request-state/directives/request-state-directive.d.ts +35 -35
- package/http-request-state/helpers.d.ts +9 -9
- package/http-request-state/http-request-state.d.ts +12 -12
- package/http-request-state/http-state-module.d.ts +11 -11
- package/http-request-state/index.d.ts +6 -6
- package/http-request-state/rxjs/getRequestorBody.d.ts +3 -3
- package/http-request-state/rxjs/getRequestorState.d.ts +3 -3
- package/http-request-state/rxjs/index.d.ts +4 -4
- package/http-request-state/rxjs/tapError.d.ts +3 -3
- package/http-request-state/rxjs/tapSuccess.d.ts +3 -3
- package/http-request-state/types.d.ts +36 -36
- package/index.d.ts +5 -5
- package/ngrx/actionable-selector.d.ts +15 -15
- package/ngrx/index.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +15 -15
- package/rxjs/defaultShareReplay.d.ts +2 -2
- package/rxjs/index.d.ts +4 -4
- package/rxjs/mapError.d.ts +2 -2
- package/rxjs/rxjs-operators.d.ts +12 -12
- package/rxjs/subjectifier.d.ts +9 -9
- package/table-builder/classes/DefaultSettings.d.ts +9 -9
- package/table-builder/classes/GenericTableDataSource.d.ts +8 -8
- package/table-builder/classes/MatTableObservableDataSource.d.ts +17 -9
- package/table-builder/classes/TableBuilderConfig.d.ts +20 -20
- package/table-builder/classes/TableState.d.ts +46 -46
- package/table-builder/classes/data-filter.d.ts +9 -9
- package/table-builder/classes/display-col.d.ts +5 -5
- package/table-builder/classes/filter-info.d.ts +40 -40
- package/table-builder/classes/table-builder-general-settings.d.ts +43 -43
- package/table-builder/classes/table-builder.d.ts +14 -14
- package/table-builder/classes/table-store.d.ts +114 -114
- package/table-builder/components/array-column.component.d.ts +14 -14
- package/table-builder/components/column-builder/column-builder.component.d.ts +50 -50
- package/table-builder/components/date-filter/date-filter.component.d.ts +10 -10
- package/table-builder/components/date-time-filter/date-time-filter.component.d.ts +10 -10
- package/table-builder/components/filter/filter.component.d.ts +371 -371
- package/table-builder/components/filter/in-list/in-list-filter.component.d.ts +27 -27
- package/table-builder/components/gen-col-displayer/gen-col-displayer.component.d.ts +16 -16
- package/table-builder/components/generic-table/generic-table.component.d.ts +73 -73
- package/table-builder/components/generic-table/paginator.component.d.ts +28 -28
- package/table-builder/components/group-by-list/group-by-list.component.d.ts +10 -10
- package/table-builder/components/header-menu/header-menu.component.d.ts +25 -25
- package/table-builder/components/in-filter/in-filter.component.d.ts +21 -21
- package/table-builder/components/index.d.ts +9 -9
- package/table-builder/components/initialization-component/initialization-component.d.ts +12 -12
- package/table-builder/components/link-column.component.d.ts +17 -17
- package/table-builder/components/number-filter/number-filter.component.d.ts +12 -12
- package/table-builder/components/sort-menu/sort-menu.component-store.d.ts +24 -24
- package/table-builder/components/sort-menu/sort-menu.component.d.ts +25 -25
- package/table-builder/components/table-container/table-container.d.ts +68 -68
- package/table-builder/components/table-container-filter/filter-list/filter-list.component.d.ts +17 -17
- package/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.d.ts +14 -14
- package/table-builder/components/table-container-filter/table-wrapper-filter-store.d.ts +14 -14
- package/table-builder/directives/custom-cell-directive.d.ts +19 -19
- package/table-builder/directives/index.d.ts +5 -5
- package/table-builder/directives/multi-sort.directive.d.ts +11 -11
- package/table-builder/directives/resize-column.directive.d.ts +43 -43
- package/table-builder/directives/table-wrapper.directive.d.ts +11 -11
- package/table-builder/directives/tb-filter.directive.d.ts +120 -120
- package/table-builder/enums/filterTypes.d.ts +37 -37
- package/table-builder/functions/boolean-filter-function.d.ts +3 -3
- package/table-builder/functions/date-filter-function.d.ts +4 -4
- package/table-builder/functions/download-data.d.ts +1 -1
- package/table-builder/functions/null-filter-function.d.ts +2 -2
- package/table-builder/functions/number-filter-function.d.ts +4 -4
- package/table-builder/functions/sort-data-function.d.ts +3 -3
- package/table-builder/functions/string-filter-function.d.ts +7 -7
- package/table-builder/interfaces/ColumnInfo.d.ts +6 -6
- package/table-builder/interfaces/dictionary.d.ts +3 -3
- package/table-builder/interfaces/report-def.d.ts +142 -142
- package/table-builder/material.module.d.ts +32 -32
- package/table-builder/ngrx/actions.d.ts +23 -23
- package/table-builder/ngrx/effects.d.ts +19 -19
- package/table-builder/ngrx/reducer.d.ts +15 -15
- package/table-builder/ngrx/selectors.d.ts +22 -22
- package/table-builder/pipes/column-total.pipe.d.ts +8 -8
- package/table-builder/pipes/format-filter-type.pipe.d.ts +8 -8
- package/table-builder/pipes/format-filter-value.pipe.d.ts +14 -14
- package/table-builder/pipes/key-display.d.ts +11 -11
- package/table-builder/services/export-to-csv.service.d.ts +22 -22
- package/table-builder/services/link-creator.service.d.ts +12 -12
- package/table-builder/services/table-template-service.d.ts +14 -14
- package/table-builder/services/transform-creator.d.ts +19 -19
- package/table-builder/table-builder.module.d.ts +48 -46
- package/utilities/directives/auto-focus.directive.d.ts +10 -10
- package/utilities/directives/clickEmitterDirective.d.ts +7 -7
- package/utilities/directives/clickSubject.d.ts +9 -9
- package/utilities/directives/conditional-classes.directive.d.ts +14 -14
- package/utilities/directives/dialog-service.d.ts +10 -10
- package/utilities/directives/dialog.d.ts +46 -46
- package/utilities/directives/mat-toggle-group-directive.d.ts +21 -21
- package/utilities/directives/prevent-enter.directive.d.ts +6 -6
- package/utilities/directives/stop-propagation.directive.d.ts +7 -7
- package/utilities/directives/styler.d.ts +9 -9
- package/utilities/directives/trim-whitespace.directive.d.ts +9 -9
- package/utilities/index.d.ts +15 -15
- package/utilities/module.d.ts +19 -19
- package/utilities/pipes/function.pipe.d.ts +7 -7
- package/utilities/pipes/phone.pipe.d.ts +7 -7
- package/utilities/pipes/space-case.pipes.d.ts +17 -17
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';
|
|
2
|
-
import { Component } from '@angular/core';
|
|
3
|
-
import { BehaviorSubject } from 'rxjs';
|
|
4
|
-
import { first, map, tap } from 'rxjs/operators';
|
|
5
|
-
import { SortDirection } from '../../interfaces/report-def';
|
|
6
|
-
import { SortMenuComponentStore } from './sort-menu.component-store';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "../../classes/table-store";
|
|
9
|
-
import * as i2 from "./sort-menu.component-store";
|
|
10
|
-
import * as i3 from "@angular/common";
|
|
11
|
-
import * as i4 from "@angular/material/button";
|
|
12
|
-
import * as i5 from "@angular/material/tooltip";
|
|
13
|
-
import * as i6 from "@angular/material/menu";
|
|
14
|
-
import * as i7 from "@angular/material/icon";
|
|
15
|
-
import * as i8 from "@ngrx/component";
|
|
16
|
-
import * as i9 from "@angular/cdk/drag-drop";
|
|
17
|
-
import * as i10 from "../../../utilities/directives/stop-propagation.directive";
|
|
18
|
-
import * as i11 from "../../../utilities/pipes/space-case.pipes";
|
|
19
|
-
export class SortMenuComponent {
|
|
20
|
-
constructor(tableState, store) {
|
|
21
|
-
this.tableState = tableState;
|
|
22
|
-
this.store = store;
|
|
23
|
-
this.SortDirection = SortDirection;
|
|
24
|
-
this.dirty$ = new BehaviorSubject(false);
|
|
25
|
-
this.apply = this.store.effect((obs) => obs.pipe(tap(() => {
|
|
26
|
-
this.dirty$.next(false);
|
|
27
|
-
this.tableState.setAllSort(this.store.sorted$.pipe(first()));
|
|
28
|
-
})));
|
|
29
|
-
this.sorted$ = this.store.sorted$.pipe(map(data => [...data]));
|
|
30
|
-
this.notSorted$ = this.store.notSorted$.pipe(map(data => [...data]));
|
|
31
|
-
}
|
|
32
|
-
reset() {
|
|
33
|
-
this.dirty$.next(false);
|
|
34
|
-
this.store.reset();
|
|
35
|
-
}
|
|
36
|
-
ngOnInit() {
|
|
37
|
-
this.store.reset();
|
|
38
|
-
}
|
|
39
|
-
dropIntoSorted(event) {
|
|
40
|
-
this.dirty$.next(true);
|
|
41
|
-
if (event.previousContainer === event.container) {
|
|
42
|
-
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
43
|
-
this.store.setSorted(event.container.data);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
47
|
-
event.container.data[event.currentIndex] = { ...event.container.data[event.currentIndex], direction: SortDirection.asc };
|
|
48
|
-
this.store.setSorted(event.container.data);
|
|
49
|
-
this.store.setNotSorted(event.previousContainer.data);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
dropIntoNotSorted(event) {
|
|
53
|
-
if (event.previousContainer === event.container) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
this.dirty$.next(true);
|
|
58
|
-
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
59
|
-
event.container.data[event.currentIndex] = { ...event.container.data[event.currentIndex] };
|
|
60
|
-
this.store.setNotSorted(event.container.data);
|
|
61
|
-
this.store.setSorted(event.previousContainer.data);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
setDirection(sort) {
|
|
65
|
-
this.dirty$.next(true);
|
|
66
|
-
this.store.setDirection(sort);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
SortMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SortMenuComponent, deps: [{ token: i1.TableStore }, { token: i2.SortMenuComponentStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
-
SortMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: SortMenuComponent, selector: "tb-sort-menu", providers: [SortMenuComponentStore], ngImport: i0, template: "<ng-container *ngrxLet=\"dirty$ as dirty\">\n<ng-container *ngIf=\"sorted$ | async as sorted\">\n <ng-container *ngIf=\"notSorted$ | async as notSorted\">\n <!-- Menu Trigger -->\n <span matTooltip=\"Sort\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">swap_vert</mat-icon>\n </button>\n </span>\n\n <!-- Menu -->\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\" (closed)=\"reset()\">\n <div mat-menu-item class=\"menu-button\">\n <div class=\"close-button-wrapper\">\n <span matTooltip=\"Close\">\n <mat-icon>close</mat-icon>\n </span>\n <span *ngIf=\"dirty\" matTooltip=\"Undo\" stop-propagation (click)=\"reset()\">\n <mat-icon>undo</mat-icon>\n </span>\n </div>\n </div>\n\n <!-- Apply Button -->\n <div class=\"apply-button-wrapper\">\n <button mat-button color=\"primary\" (click)=\"apply(null)\"\n stop-propagation [class.apply-border]=\"dirty\"\n [disabled]=\"!dirty\">\n Apply\n <ng-container *ngIf=\"dirty\">Unsaved Changes</ng-container>\n </button>\n </div>\n\n <!-- Default Sorting Text -->\n <div *ngIf=\"!sorted.length\" class=\"tip\" >\n Sorting List\n </div>\n\n <!-- Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #sortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[notSortedGroup]\"\n [cdkDropListData]=\"sorted\"\n (cdkDropListDropped)=\"dropIntoSorted($event)\">\n\n <!-- Menu Item Wrapper -->\n <ng-container *ngFor=\"let sort of sorted;let i=index\">\n\n <!-- Menu Item Headers -->\n <span *ngIf=\"sorted.length > 1 && i === 0 \" class=\"description\" class=\"sort-header\">First By</span>\n <span *ngIf=\"sorted.length > 1 && i !== 0 \" class=\"description\" class=\"sort-header\">Then By</span>\n\n <!-- Menu Item -->\n <div mat-menu-item cdkDrag class=\"menu-item\">\n <div class=\"sort-item\">\n <span class=\"sorted-name\">\n {{sort.displayName || (sort.active | spaceCase)}}\n <span class=\"direction-text\">{{sort.direction}}</span>\n </span>\n\n <!-- Sort Direction Buttons -->\n <div class=\"up-down-buttons-wrapper\">\n <button class=\"up-down-button up-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.asc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction !== SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_upward\n </mat-icon>\n </button>\n\n <button class=\"up-down-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.desc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction === SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_downward\n </mat-icon>\n </button>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n\n <!-- Default Not Sorted Text -->\n <div *ngIf=\"!notSorted.length\" class=\"tip\" >\n Not Sorted List\n </div>\n <!-- Not Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #notSortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[sortedGroup]\"\n [cdkDropListData]=\"notSorted\"\n (cdkDropListDropped)=\"dropIntoNotSorted($event)\">\n <div mat-menu-item *ngFor=\"let sort of notSorted\" class=\"menu-item\" cdkDrag>\n <span class=\"not-sorted-name\">{{sort.displayName || (sort.active | spaceCase)}}</span>\n </div>\n </div>\n </mat-menu>\n </ng-container>\n</ng-container>\n</ng-container>\n", styles: [".cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.list{padding:5px 2px;border-bottom:solid 1px #ccc;color:#000000de;background:white}.light-arrow{color:#93b1ea78}.dark-arrow{color:#224e9c}.up-down-button{background-color:#fff;border-radius:30%;border-color:#0ff;padding:1px 1px 0;border-width:.5px;cursor:pointer;height:27px}.mat-icon.up-down-icon{margin-right:0;font-size:20px;font-weight:lighter}.sort-item{display:flex;align-items:center;justify-content:space-between}.up-down-buttons-wrapper{margin-left:2rem}.up-button{margin-right:.3rem}.mat-mdc-menu-item.menu-item,.mat-mdc-menu-item.menu-button{min-height:initial;padding:0 3px;line-height:25px;height:30px}.mat-mdc-menu-item.menu-item{cursor:move}.sorted-name{color:#224e9c;font-size:17px;font-weight:700}.not-sorted-name{color:#93b1ea;font-size:17px;font-weight:700}.apply-border{border:#224e9c solid .5px}.apply-border:hover{background-color:#faebd7}.apply-button-wrapper{display:grid;justify-content:center}.sort-header{font-size:10px;font-style:italic}.tip{padding:0 3px;color:#d3d3d3}.direction-text{font-size:small;font-weight:400}.close-button-wrapper{display:flex;flex-direction:row-reverse}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i6.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "directive", type: i9.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i9.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i10.StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i11.SpaceCasePipe, name: "spaceCase" }] });
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SortMenuComponent, decorators: [{
|
|
72
|
-
type: Component,
|
|
73
|
-
args: [{ selector: 'tb-sort-menu', providers: [SortMenuComponentStore], template: "<ng-container *ngrxLet=\"dirty$ as dirty\">\n<ng-container *ngIf=\"sorted$ | async as sorted\">\n <ng-container *ngIf=\"notSorted$ | async as notSorted\">\n <!-- Menu Trigger -->\n <span matTooltip=\"Sort\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">swap_vert</mat-icon>\n </button>\n </span>\n\n <!-- Menu -->\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\" (closed)=\"reset()\">\n <div mat-menu-item class=\"menu-button\">\n <div class=\"close-button-wrapper\">\n <span matTooltip=\"Close\">\n <mat-icon>close</mat-icon>\n </span>\n <span *ngIf=\"dirty\" matTooltip=\"Undo\" stop-propagation (click)=\"reset()\">\n <mat-icon>undo</mat-icon>\n </span>\n </div>\n </div>\n\n <!-- Apply Button -->\n <div class=\"apply-button-wrapper\">\n <button mat-button color=\"primary\" (click)=\"apply(null)\"\n stop-propagation [class.apply-border]=\"dirty\"\n [disabled]=\"!dirty\">\n Apply\n <ng-container *ngIf=\"dirty\">Unsaved Changes</ng-container>\n </button>\n </div>\n\n <!-- Default Sorting Text -->\n <div *ngIf=\"!sorted.length\" class=\"tip\" >\n Sorting List\n </div>\n\n <!-- Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #sortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[notSortedGroup]\"\n [cdkDropListData]=\"sorted\"\n (cdkDropListDropped)=\"dropIntoSorted($event)\">\n\n <!-- Menu Item Wrapper -->\n <ng-container *ngFor=\"let sort of sorted;let i=index\">\n\n <!-- Menu Item Headers -->\n <span *ngIf=\"sorted.length > 1 && i === 0 \" class=\"description\" class=\"sort-header\">First By</span>\n <span *ngIf=\"sorted.length > 1 && i !== 0 \" class=\"description\" class=\"sort-header\">Then By</span>\n\n <!-- Menu Item -->\n <div mat-menu-item cdkDrag class=\"menu-item\">\n <div class=\"sort-item\">\n <span class=\"sorted-name\">\n {{sort.displayName || (sort.active | spaceCase)}}\n <span class=\"direction-text\">{{sort.direction}}</span>\n </span>\n\n <!-- Sort Direction Buttons -->\n <div class=\"up-down-buttons-wrapper\">\n <button class=\"up-down-button up-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.asc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction !== SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_upward\n </mat-icon>\n </button>\n\n <button class=\"up-down-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.desc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction === SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_downward\n </mat-icon>\n </button>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n\n <!-- Default Not Sorted Text -->\n <div *ngIf=\"!notSorted.length\" class=\"tip\" >\n Not Sorted List\n </div>\n <!-- Not Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #notSortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[sortedGroup]\"\n [cdkDropListData]=\"notSorted\"\n (cdkDropListDropped)=\"dropIntoNotSorted($event)\">\n <div mat-menu-item *ngFor=\"let sort of notSorted\" class=\"menu-item\" cdkDrag>\n <span class=\"not-sorted-name\">{{sort.displayName || (sort.active | spaceCase)}}</span>\n </div>\n </div>\n </mat-menu>\n </ng-container>\n</ng-container>\n</ng-container>\n", styles: [".cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.list{padding:5px 2px;border-bottom:solid 1px #ccc;color:#000000de;background:white}.light-arrow{color:#93b1ea78}.dark-arrow{color:#224e9c}.up-down-button{background-color:#fff;border-radius:30%;border-color:#0ff;padding:1px 1px 0;border-width:.5px;cursor:pointer;height:27px}.mat-icon.up-down-icon{margin-right:0;font-size:20px;font-weight:lighter}.sort-item{display:flex;align-items:center;justify-content:space-between}.up-down-buttons-wrapper{margin-left:2rem}.up-button{margin-right:.3rem}.mat-mdc-menu-item.menu-item,.mat-mdc-menu-item.menu-button{min-height:initial;padding:0 3px;line-height:25px;height:30px}.mat-mdc-menu-item.menu-item{cursor:move}.sorted-name{color:#224e9c;font-size:17px;font-weight:700}.not-sorted-name{color:#93b1ea;font-size:17px;font-weight:700}.apply-border{border:#224e9c solid .5px}.apply-border:hover{background-color:#faebd7}.apply-button-wrapper{display:grid;justify-content:center}.sort-header{font-size:10px;font-style:italic}.tip{padding:0 3px;color:#d3d3d3}.direction-text{font-size:small;font-weight:400}.close-button-wrapper{display:flex;flex-direction:row-reverse}\n"] }]
|
|
74
|
-
}], ctorParameters: function () { return [{ type: i1.TableStore }, { type: i2.SortMenuComponentStore }]; } });
|
|
75
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29ydC1tZW51LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItdXRpbGl0aWVzL3NyYy90YWJsZS1idWlsZGVyL2NvbXBvbmVudHMvc29ydC1tZW51L3NvcnQtbWVudS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLXV0aWxpdGllcy9zcmMvdGFibGUtYnVpbGRlci9jb21wb25lbnRzL3NvcnQtbWVudS9zb3J0LW1lbnUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFlLGVBQWUsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3pGLE9BQU8sRUFBRSxTQUFTLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFDbEQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUV2QyxPQUFPLEVBQUUsS0FBSyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUVqRCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDNUQsT0FBTyxFQUFFLHNCQUFzQixFQUFnQixNQUFNLDZCQUE2QixDQUFBOz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GV2ZW50LmNvbnRhaW5lci5kYXRhLCBldmVudC5wcmV2aW91c0luZGV4LCBldmVudC5jdXJyZW50SW5kZXgpO1xyXG4gICAgICB0aGlzLnN0b3JlLnNldFNvcnRlZChldmVudC5jb250YWluZXIuZGF0YSk7XHJcbiAgICB9IGVsc2Uge1xyXG5cclxuICAgICAgdHJhbnNmZXJBcnJheUl0ZW0oZXZlbnQucHJldmlvdXNDb250YWluZXIuZGF0YSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnQuY29udGFpbmVyLmRhdGEsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50LnByZXZpb3VzSW5kZXgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50LmN1cnJlbnRJbmRleCk7XHJcbiAgICAgIGV2ZW50LmNvbnRhaW5lci5kYXRhW2V2ZW50LmN1cnJlbnRJbmRleF0gPSB7Li4uZXZlbnQuY29udGFpbmVyLmRhdGFbZXZlbnQuY3VycmVudEluZGV4XSxkaXJlY3Rpb246U29ydERpcmVjdGlvbi5hc2N9O1xyXG4gICAgICB0aGlzLnN0b3JlLnNldFNvcnRlZChldmVudC5jb250YWluZXIuZGF0YSk7XHJcbiAgICAgIHRoaXMuc3RvcmUuc2V0Tm90U29ydGVkKGV2ZW50LnByZXZpb3VzQ29udGFpbmVyLmRhdGEpO1xyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgZHJvcEludG9Ob3RTb3J0ZWQoZXZlbnQ6IENka0RyYWdEcm9wPFNvcnRXaXRoTmFtZVtdPil7XHJcbiAgICBpZiAoZXZlbnQucHJldmlvdXNDb250YWluZXIgPT09IGV2ZW50LmNvbnRhaW5lcikge1xyXG4gICAgICByZXR1cm47XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICB0aGlzLmRpcnR5JC5uZXh0KHRydWUpO1xyXG4gICAgICB0cmFuc2ZlckFycmF5SXRlbShldmVudC5wcmV2aW91c0NvbnRhaW5lci5kYXRhLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBldmVudC5jb250YWluZXIuZGF0YSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmlvdXNJbmRleCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnQuY3VycmVudEluZGV4KTtcclxuICAgICAgZXZlbnQuY29udGFpbmVyLmRhdGFbZXZlbnQuY3VycmVudEluZGV4XSA9IHsuLi5ldmVudC5jb250YWluZXIuZGF0YVtldmVudC5jdXJyZW50SW5kZXhdfTtcclxuXHJcbiAgICAgIHRoaXMuc3RvcmUuc2V0Tm90U29ydGVkKGV2ZW50LmNvbnRhaW5lci5kYXRhKTtcclxuICAgICAgdGhpcy5zdG9yZS5zZXRTb3J0ZWQoZXZlbnQucHJldmlvdXNDb250YWluZXIuZGF0YSk7XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICBhcHBseSA9IHRoaXMuc3RvcmUuZWZmZWN0KChvYnM6T2JzZXJ2YWJsZTxudWxsPik9PlxyXG4gICAgb2JzLnBpcGUodGFwKCgpPT57XHJcbiAgICAgIHRoaXMuZGlydHkkLm5leHQoZmFsc2UpO1xyXG4gICAgICB0aGlzLnRhYmxlU3RhdGUuc2V0QWxsU29ydCh0aGlzLnN0b3JlLnNvcnRlZCQucGlwZShmaXJzdCgpKSlcclxuICB9KSkpO1xyXG5cclxuICBzZXREaXJlY3Rpb24oc29ydDpTb3J0V2l0aE5hbWUpe1xyXG4gICAgdGhpcy5kaXJ0eSQubmV4dCh0cnVlKTtcclxuICAgIHRoaXMuc3RvcmUuc2V0RGlyZWN0aW9uKHNvcnQpO1xyXG4gIH1cclxuXHJcbn1cclxuXHJcblxyXG4iLCI8bmctY29udGFpbmVyICpuZ3J4TGV0PVwiZGlydHkkIGFzIGRpcnR5XCI+XG48bmctY29udGFpbmVyICAqbmdJZj1cInNvcnRlZCQgfCBhc3luYyBhcyBzb3J0ZWRcIj5cbiAgPG5nLWNvbnRhaW5lciAqbmdJZj1cIm5vdF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QuZGlzcGxheU5hbWV9KVwiPlxuICAgICAgICAgICAgICAgICAgPG1hdC1pY29uIFtuZ0NsYXNzXT1cInNvcnQuZGlyZWN0aW9uICE9PSBTb3J0RGlyZWN0aW9uLmFzYyA/ICdsaWdodC1hcnJvdycgOiAnZGFyay1hcnJvdydcIiBjbGFzcz1cInVwLWRvd24taWNvblwiPlxuICAgICAgICAgICAgICAgICAgYXJyb3dfdXB3YXJkXG4gICAgICAgICAgICAgICAgICA8L21hdC1pY29uPlxuICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxuXG4gICAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz1cInVwLWRvd24tYnV0dG9uXCIgc3RvcC1wcm9wYWdhdGlvblxuICAgICAgICAgICAgICAgIChjbGljayk9XCJzZXREaXJlY3Rpb24oe2FjdGl2ZTpzb3J0LmFjdGl2ZSxkaXJlY3Rpb246U29ydERpcmVjdGlvbi5kZXNjLGRpc3BsYXlOYW1lOnNvcnQuZGlzcGxheU5hbWV9KVwiPlxuICAgICAgICAgICAgICAgICAgPG1hdC1pY29uIFtuZ0NsYXNzXT1cInNvcnQuZGlyZWN0aW9uID09PSBTb3J0RGlyZWN0aW9uLmFzYyA/ICdsaWdodC1hcnJvdycgOiAnZGFyay1hcnJvdydcIiBjbGFzcz1cInVwLWRvd24taWNvblwiPlxuICAgICAgICAgICAgICAgICAgICBhcnJvd19kb3dud2FyZFxuICAgICAgICAgICAgICAgICAgPC9tYXQtaWNvbj5cbiAgICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICA8L2Rpdj5cblxuICAgICAgPCEtLSBEZWZhdWx0IE5vdCBTb3J0ZWQgVGV4dCAtLT5cbiAgICAgIDxkaXYgKm5nSWY9XCIhbm90U29ydGVkLmxlbmd0aFwiIGNsYXNzPVwidGlwXCIgPlxuICAgICAgICBOb3QgU29ydGVkIExpc3RcbiAgICAgIDwvZGl2PlxuICAgICAgPCEtLSBOb3QgU29ydGVkIE1lbnUgTGlzdCAtLT5cbiAgICAgIDxkaXYgY2xhc3M9XCJsaXN0XCJcbiAgICAgICAgY2RrRHJvcExpc3RcbiAgICAgICAgI25vdFNvcnRlZEdyb3VwPVwiY2RrRHJvcExpc3RcIlxuICAgICAgICBbY2RrRHJvcExpc3RDb25uZWN0ZWRUb109XCJbc29ydGVkR3JvdXBdXCJcbiAgICAgICAgW2Nka0Ryb3BMaXN0RGF0YV09XCJub3RTb3J0ZWRcIlxuICAgICAgICAoY2RrRHJvcExpc3REcm9wcGVkKT1cImRyb3BJbnRvTm90U29ydGVkKCRldmVudClcIj5cbiAgICAgICAgPGRpdiBtYXQtbWVudS1pdGVtICpuZ0Zvcj1cImxldCBzb3J0IG9mIG5vdFNvcnRlZFwiICBjbGFzcz1cIm1lbnUtaXRlbVwiIGNka0RyYWc+XG4gICAgICAgICAgPHNwYW4gY2xhc3M9XCJub3Qtc29ydGVkLW5hbWVcIj57e3NvcnQuZGlzcGxheU5hbWUgfHwgKHNvcnQuYWN0aXZlIHwgc3BhY2VDYXNlKX19PC9zcGFuPlxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvZGl2PlxuICAgIDwvbWF0LW1lbnU+XG4gIDwvbmctY29udGFpbmVyPlxuPC9uZy1jb250YWluZXI+XG48L25nLWNvbnRhaW5lcj5cbiJdfQ==
|
|
1
|
+
import { moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import { first, map, tap } from 'rxjs/operators';
|
|
5
|
+
import { SortDirection } from '../../interfaces/report-def';
|
|
6
|
+
import { SortMenuComponentStore } from './sort-menu.component-store';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "../../classes/table-store";
|
|
9
|
+
import * as i2 from "./sort-menu.component-store";
|
|
10
|
+
import * as i3 from "@angular/common";
|
|
11
|
+
import * as i4 from "@angular/material/button";
|
|
12
|
+
import * as i5 from "@angular/material/tooltip";
|
|
13
|
+
import * as i6 from "@angular/material/menu";
|
|
14
|
+
import * as i7 from "@angular/material/icon";
|
|
15
|
+
import * as i8 from "@ngrx/component";
|
|
16
|
+
import * as i9 from "@angular/cdk/drag-drop";
|
|
17
|
+
import * as i10 from "../../../utilities/directives/stop-propagation.directive";
|
|
18
|
+
import * as i11 from "../../../utilities/pipes/space-case.pipes";
|
|
19
|
+
export class SortMenuComponent {
|
|
20
|
+
constructor(tableState, store) {
|
|
21
|
+
this.tableState = tableState;
|
|
22
|
+
this.store = store;
|
|
23
|
+
this.SortDirection = SortDirection;
|
|
24
|
+
this.dirty$ = new BehaviorSubject(false);
|
|
25
|
+
this.apply = this.store.effect((obs) => obs.pipe(tap(() => {
|
|
26
|
+
this.dirty$.next(false);
|
|
27
|
+
this.tableState.setAllSort(this.store.sorted$.pipe(first()));
|
|
28
|
+
})));
|
|
29
|
+
this.sorted$ = this.store.sorted$.pipe(map(data => [...data]));
|
|
30
|
+
this.notSorted$ = this.store.notSorted$.pipe(map(data => [...data]));
|
|
31
|
+
}
|
|
32
|
+
reset() {
|
|
33
|
+
this.dirty$.next(false);
|
|
34
|
+
this.store.reset();
|
|
35
|
+
}
|
|
36
|
+
ngOnInit() {
|
|
37
|
+
this.store.reset();
|
|
38
|
+
}
|
|
39
|
+
dropIntoSorted(event) {
|
|
40
|
+
this.dirty$.next(true);
|
|
41
|
+
if (event.previousContainer === event.container) {
|
|
42
|
+
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
43
|
+
this.store.setSorted(event.container.data);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
47
|
+
event.container.data[event.currentIndex] = { ...event.container.data[event.currentIndex], direction: SortDirection.asc };
|
|
48
|
+
this.store.setSorted(event.container.data);
|
|
49
|
+
this.store.setNotSorted(event.previousContainer.data);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
dropIntoNotSorted(event) {
|
|
53
|
+
if (event.previousContainer === event.container) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this.dirty$.next(true);
|
|
58
|
+
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
59
|
+
event.container.data[event.currentIndex] = { ...event.container.data[event.currentIndex] };
|
|
60
|
+
this.store.setNotSorted(event.container.data);
|
|
61
|
+
this.store.setSorted(event.previousContainer.data);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
setDirection(sort) {
|
|
65
|
+
this.dirty$.next(true);
|
|
66
|
+
this.store.setDirection(sort);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
SortMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SortMenuComponent, deps: [{ token: i1.TableStore }, { token: i2.SortMenuComponentStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
+
SortMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: SortMenuComponent, selector: "tb-sort-menu", providers: [SortMenuComponentStore], ngImport: i0, template: "<ng-container *ngrxLet=\"dirty$ as dirty\">\n<ng-container *ngIf=\"sorted$ | async as sorted\">\n <ng-container *ngIf=\"notSorted$ | async as notSorted\">\n <!-- Menu Trigger -->\n <span matTooltip=\"Sort\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">swap_vert</mat-icon>\n </button>\n </span>\n\n <!-- Menu -->\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\" (closed)=\"reset()\">\n <div mat-menu-item class=\"menu-button\">\n <div class=\"close-button-wrapper\">\n <span matTooltip=\"Close\">\n <mat-icon>close</mat-icon>\n </span>\n <span *ngIf=\"dirty\" matTooltip=\"Undo\" stop-propagation (click)=\"reset()\">\n <mat-icon>undo</mat-icon>\n </span>\n </div>\n </div>\n\n <!-- Apply Button -->\n <div class=\"apply-button-wrapper\">\n <button mat-button color=\"primary\" (click)=\"apply(null)\"\n stop-propagation [class.apply-border]=\"dirty\"\n [disabled]=\"!dirty\">\n Apply\n <ng-container *ngIf=\"dirty\">Unsaved Changes</ng-container>\n </button>\n </div>\n\n <!-- Default Sorting Text -->\n <div *ngIf=\"!sorted.length\" class=\"tip\" >\n Sorting List\n </div>\n\n <!-- Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #sortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[notSortedGroup]\"\n [cdkDropListData]=\"sorted\"\n (cdkDropListDropped)=\"dropIntoSorted($event)\">\n\n <!-- Menu Item Wrapper -->\n <ng-container *ngFor=\"let sort of sorted;let i=index\">\n\n <!-- Menu Item Headers -->\n <span *ngIf=\"sorted.length > 1 && i === 0 \" class=\"description\" class=\"sort-header\">First By</span>\n <span *ngIf=\"sorted.length > 1 && i !== 0 \" class=\"description\" class=\"sort-header\">Then By</span>\n\n <!-- Menu Item -->\n <div mat-menu-item cdkDrag class=\"menu-item\">\n <div class=\"sort-item\">\n <span class=\"sorted-name\">\n {{sort.displayName || (sort.active | spaceCase)}}\n <span class=\"direction-text\">{{sort.direction}}</span>\n </span>\n\n <!-- Sort Direction Buttons -->\n <div class=\"up-down-buttons-wrapper\">\n <button class=\"up-down-button up-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.asc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction !== SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_upward\n </mat-icon>\n </button>\n\n <button class=\"up-down-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.desc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction === SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_downward\n </mat-icon>\n </button>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n\n <!-- Default Not Sorted Text -->\n <div *ngIf=\"!notSorted.length\" class=\"tip\" >\n Not Sorted List\n </div>\n <!-- Not Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #notSortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[sortedGroup]\"\n [cdkDropListData]=\"notSorted\"\n (cdkDropListDropped)=\"dropIntoNotSorted($event)\">\n <div mat-menu-item *ngFor=\"let sort of notSorted\" class=\"menu-item\" cdkDrag>\n <span class=\"not-sorted-name\">{{sort.displayName || (sort.active | spaceCase)}}</span>\n </div>\n </div>\n </mat-menu>\n </ng-container>\n</ng-container>\n</ng-container>\n", styles: [".cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.list{padding:5px 2px;border-bottom:solid 1px #ccc;color:#000000de;background:white}.light-arrow{color:#93b1ea78}.dark-arrow{color:#224e9c}.up-down-button{background-color:#fff;border-radius:30%;border-color:#0ff;padding:1px 1px 0;border-width:.5px;cursor:pointer;height:27px}.mat-icon.up-down-icon{margin-right:0;font-size:20px;font-weight:lighter}.sort-item{display:flex;align-items:center;justify-content:space-between}.up-down-buttons-wrapper{margin-left:2rem}.up-button{margin-right:.3rem}.mat-mdc-menu-item.menu-item,.mat-mdc-menu-item.menu-button{min-height:initial;padding:0 3px;line-height:25px;height:30px}.mat-mdc-menu-item.menu-item{cursor:move}.sorted-name{color:#224e9c;font-size:17px;font-weight:700}.not-sorted-name{color:#93b1ea;font-size:17px;font-weight:700}.apply-border{border:#224e9c solid .5px}.apply-border:hover{background-color:#faebd7}.apply-button-wrapper{display:grid;justify-content:center}.sort-header{font-size:10px;font-style:italic}.tip{padding:0 3px;color:#d3d3d3}.direction-text{font-size:small;font-weight:400}.close-button-wrapper{display:flex;flex-direction:row-reverse}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i6.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "directive", type: i9.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i9.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i10.StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i11.SpaceCasePipe, name: "spaceCase" }] });
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SortMenuComponent, decorators: [{
|
|
72
|
+
type: Component,
|
|
73
|
+
args: [{ selector: 'tb-sort-menu', providers: [SortMenuComponentStore], template: "<ng-container *ngrxLet=\"dirty$ as dirty\">\n<ng-container *ngIf=\"sorted$ | async as sorted\">\n <ng-container *ngIf=\"notSorted$ | async as notSorted\">\n <!-- Menu Trigger -->\n <span matTooltip=\"Sort\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">swap_vert</mat-icon>\n </button>\n </span>\n\n <!-- Menu -->\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\" (closed)=\"reset()\">\n <div mat-menu-item class=\"menu-button\">\n <div class=\"close-button-wrapper\">\n <span matTooltip=\"Close\">\n <mat-icon>close</mat-icon>\n </span>\n <span *ngIf=\"dirty\" matTooltip=\"Undo\" stop-propagation (click)=\"reset()\">\n <mat-icon>undo</mat-icon>\n </span>\n </div>\n </div>\n\n <!-- Apply Button -->\n <div class=\"apply-button-wrapper\">\n <button mat-button color=\"primary\" (click)=\"apply(null)\"\n stop-propagation [class.apply-border]=\"dirty\"\n [disabled]=\"!dirty\">\n Apply\n <ng-container *ngIf=\"dirty\">Unsaved Changes</ng-container>\n </button>\n </div>\n\n <!-- Default Sorting Text -->\n <div *ngIf=\"!sorted.length\" class=\"tip\" >\n Sorting List\n </div>\n\n <!-- Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #sortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[notSortedGroup]\"\n [cdkDropListData]=\"sorted\"\n (cdkDropListDropped)=\"dropIntoSorted($event)\">\n\n <!-- Menu Item Wrapper -->\n <ng-container *ngFor=\"let sort of sorted;let i=index\">\n\n <!-- Menu Item Headers -->\n <span *ngIf=\"sorted.length > 1 && i === 0 \" class=\"description\" class=\"sort-header\">First By</span>\n <span *ngIf=\"sorted.length > 1 && i !== 0 \" class=\"description\" class=\"sort-header\">Then By</span>\n\n <!-- Menu Item -->\n <div mat-menu-item cdkDrag class=\"menu-item\">\n <div class=\"sort-item\">\n <span class=\"sorted-name\">\n {{sort.displayName || (sort.active | spaceCase)}}\n <span class=\"direction-text\">{{sort.direction}}</span>\n </span>\n\n <!-- Sort Direction Buttons -->\n <div class=\"up-down-buttons-wrapper\">\n <button class=\"up-down-button up-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.asc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction !== SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_upward\n </mat-icon>\n </button>\n\n <button class=\"up-down-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.desc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction === SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_downward\n </mat-icon>\n </button>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n\n <!-- Default Not Sorted Text -->\n <div *ngIf=\"!notSorted.length\" class=\"tip\" >\n Not Sorted List\n </div>\n <!-- Not Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #notSortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[sortedGroup]\"\n [cdkDropListData]=\"notSorted\"\n (cdkDropListDropped)=\"dropIntoNotSorted($event)\">\n <div mat-menu-item *ngFor=\"let sort of notSorted\" class=\"menu-item\" cdkDrag>\n <span class=\"not-sorted-name\">{{sort.displayName || (sort.active | spaceCase)}}</span>\n </div>\n </div>\n </mat-menu>\n </ng-container>\n</ng-container>\n</ng-container>\n", styles: [".cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.list{padding:5px 2px;border-bottom:solid 1px #ccc;color:#000000de;background:white}.light-arrow{color:#93b1ea78}.dark-arrow{color:#224e9c}.up-down-button{background-color:#fff;border-radius:30%;border-color:#0ff;padding:1px 1px 0;border-width:.5px;cursor:pointer;height:27px}.mat-icon.up-down-icon{margin-right:0;font-size:20px;font-weight:lighter}.sort-item{display:flex;align-items:center;justify-content:space-between}.up-down-buttons-wrapper{margin-left:2rem}.up-button{margin-right:.3rem}.mat-mdc-menu-item.menu-item,.mat-mdc-menu-item.menu-button{min-height:initial;padding:0 3px;line-height:25px;height:30px}.mat-mdc-menu-item.menu-item{cursor:move}.sorted-name{color:#224e9c;font-size:17px;font-weight:700}.not-sorted-name{color:#93b1ea;font-size:17px;font-weight:700}.apply-border{border:#224e9c solid .5px}.apply-border:hover{background-color:#faebd7}.apply-button-wrapper{display:grid;justify-content:center}.sort-header{font-size:10px;font-style:italic}.tip{padding:0 3px;color:#d3d3d3}.direction-text{font-size:small;font-weight:400}.close-button-wrapper{display:flex;flex-direction:row-reverse}\n"] }]
|
|
74
|
+
}], ctorParameters: function () { return [{ type: i1.TableStore }, { type: i2.SortMenuComponentStore }]; } });
|
|
75
|
+
//# sourceMappingURL=data:application/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JbmRleCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50LmN1cnJlbnRJbmRleCk7XG4gICAgICBldmVudC5jb250YWluZXIuZGF0YVtldmVudC5jdXJyZW50SW5kZXhdID0gey4uLmV2ZW50LmNvbnRhaW5lci5kYXRhW2V2ZW50LmN1cnJlbnRJbmRleF0sZGlyZWN0aW9uOlNvcnREaXJlY3Rpb24uYXNjfTtcbiAgICAgIHRoaXMuc3RvcmUuc2V0U29ydGVkKGV2ZW50LmNvbnRhaW5lci5kYXRhKTtcbiAgICAgIHRoaXMuc3RvcmUuc2V0Tm90U29ydGVkKGV2ZW50LnByZXZpb3VzQ29udGFpbmVyLmRhdGEpO1xuICAgIH1cbiAgfVxuXG4gIGRyb3BJbnRvTm90U29ydGVkKGV2ZW50OiBDZGtEcmFnRHJvcDxTb3J0V2l0aE5hbWVbXT4pe1xuICAgIGlmIChldmVudC5wcmV2aW91c0NvbnRhaW5lciA9PT0gZXZlbnQuY29udGFpbmVyKSB7XG4gICAgICByZXR1cm47XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMuZGlydHkkLm5leHQodHJ1ZSk7XG4gICAgICB0cmFuc2ZlckFycmF5SXRlbShldmVudC5wcmV2aW91c0NvbnRhaW5lci5kYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnQuY29udGFpbmVyLmRhdGEsXG4gICAgICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2aW91c0luZGV4LFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnQuY3VycmVudEluZGV4KTtcbiAgICAgIGV2ZW50LmNvbnRhaW5lci5kYXRhW2V2ZW50LmN1cnJlbnRJbmRleF0gPSB7Li4uZXZlbnQuY29udGFpbmVyLmRhdGFbZXZlbnQuY3VycmVudEluZGV4XX07XG5cbiAgICAgIHRoaXMuc3RvcmUuc2V0Tm90U29ydGVkKGV2ZW50LmNvbnRhaW5lci5kYXRhKTtcbiAgICAgIHRoaXMuc3RvcmUuc2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