@one-paragon/angular-utilities 2.8.2 → 2.8.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/karma.conf.js +43 -0
- package/ng-package.json +7 -0
- package/package.json +15 -27
- package/src/action-state/action-state-spinner/action-state-spinner.component.css +16 -0
- package/src/action-state/action-state-spinner/action-state-spinner.component.html +7 -0
- package/src/action-state/action-state-spinner/action-state-spinner.component.spec.ts +25 -0
- package/src/action-state/action-state-spinner/action-state-spinner.component.ts +26 -0
- package/src/action-state/action-state-ui/action-state-ui.module.ts +13 -0
- package/src/action-state/index.ts +8 -0
- package/src/action-state/ngrx-ext/ngrx-ext.module.ts +14 -0
- package/src/action-state/ngrx.ts +69 -0
- package/src/http-request-state/RequestStateFactory.ts +56 -0
- package/src/http-request-state/RequestStateStore.ts +360 -0
- package/src/http-request-state/deprecated.ts +20 -0
- package/src/http-request-state/directives/HttpStateDirectiveBase.ts +29 -0
- package/src/http-request-state/directives/http-error-state-directive.ts +21 -0
- package/src/http-request-state/directives/http-inProgress-state-directive.ts +19 -0
- package/src/http-request-state/directives/http-notStarted-state-directive.ts +19 -0
- package/src/http-request-state/directives/http-success-state-directive.ts +29 -0
- package/src/http-request-state/directives/index.ts +5 -0
- package/src/http-request-state/directives/request-state-directive.spec.ts +73 -0
- package/src/http-request-state/directives/request-state-directive.ts +78 -0
- package/src/http-request-state/documentation/CREATE-REQUESTOR.md +667 -0
- package/src/http-request-state/documentation/README.md +191 -0
- package/src/http-request-state/documentation/REQUEST-STATE-STORE-CONFIG.md +648 -0
- package/src/http-request-state/documentation/REQUESTOR.md +616 -0
- package/src/http-request-state/helpers.ts +30 -0
- package/src/http-request-state/http-state-module.ts +23 -0
- package/src/http-request-state/index.ts +7 -0
- package/src/http-request-state/models/view-context.ts +18 -0
- package/src/http-request-state/observable.spec.ts +43 -0
- package/src/http-request-state/request-state.ts +66 -0
- package/src/http-request-state/rxjs/getRequestorBody.ts +10 -0
- package/src/http-request-state/rxjs/getRequestorState.ts +8 -0
- package/src/http-request-state/rxjs/index.ts +4 -0
- package/src/http-request-state/rxjs/tapError.ts +16 -0
- package/src/http-request-state/rxjs/tapSuccess.ts +16 -0
- package/src/http-request-state/strategies.spec.ts +42 -0
- package/src/http-request-state/types.ts +54 -0
- package/src/ngrx/actionable-selector.ts +189 -0
- package/src/ngrx/index.ts +1 -0
- package/src/public-api.ts +40 -0
- package/src/rxjs/defaultShareReplay.ts +8 -0
- package/src/rxjs/index.ts +5 -0
- package/src/rxjs/mapError.ts +8 -0
- package/src/rxjs/rxjs-operators.ts +130 -0
- package/src/rxjs/subjectifier.ts +17 -0
- package/src/rxjs/subscriber.directive.ts +57 -0
- package/src/specs/clickSubject.spec.ts +99 -0
- package/src/specs/dialog.spec.ts +101 -0
- package/src/specs/toggleGroupDirective.spec.ts +229 -0
- package/src/table-builder/classes/DefaultSettings.ts +11 -0
- package/src/table-builder/classes/MatTableObservableDataSource.ts +23 -0
- package/src/table-builder/classes/TableBuilderConfig.ts +49 -0
- package/src/table-builder/classes/TableBuilderDataSource.ts +64 -0
- package/src/table-builder/classes/TableState.ts +96 -0
- package/src/table-builder/classes/data-store.ts +10 -0
- package/src/table-builder/classes/display-col.ts +5 -0
- package/src/table-builder/classes/filter-info.ts +129 -0
- package/src/table-builder/classes/table-builder-general-settings.ts +233 -0
- package/src/table-builder/classes/table-builder.ts +105 -0
- package/src/table-builder/classes/table-store.helpers.ts +109 -0
- package/src/table-builder/classes/table-store.ts +540 -0
- package/src/table-builder/components/array-column.component.ts +34 -0
- package/src/table-builder/components/column-builder/column-builder.component.html +109 -0
- package/src/table-builder/components/column-builder/column-builder.component.scss +43 -0
- package/src/table-builder/components/column-builder/column-builder.component.spec.ts +49 -0
- package/src/table-builder/components/column-builder/column-builder.component.ts +130 -0
- package/src/table-builder/components/column-builder/column-helpers.ts +54 -0
- package/src/table-builder/components/column-header-menu/column-header-menu.component.html +128 -0
- package/src/table-builder/components/column-header-menu/column-header-menu.component.scss +97 -0
- package/src/table-builder/components/column-header-menu/column-header-menu.component.ts +113 -0
- package/src/table-builder/components/date-filter/date-filter.component.html +39 -0
- package/src/table-builder/components/date-filter/date-filter.component.ts +33 -0
- package/src/table-builder/components/date-time-filter/date-time-filter.component.html +25 -0
- package/src/table-builder/components/date-time-filter/date-time-filter.component.ts +33 -0
- package/src/table-builder/components/filter/filter.component.html +120 -0
- package/src/table-builder/components/filter/filter.component.scss +60 -0
- package/src/table-builder/components/filter/filter.component.spec.ts +86 -0
- package/src/table-builder/components/filter/filter.component.ts +73 -0
- package/src/table-builder/components/filter/in-list/in-list-filter.component.ts +171 -0
- package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.html +60 -0
- package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.scss +57 -0
- package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.ts +44 -0
- package/src/table-builder/components/generic-table/generic-table.component.html +140 -0
- package/src/table-builder/components/generic-table/generic-table.component.scss +45 -0
- package/src/table-builder/components/generic-table/generic-table.component.ts +531 -0
- package/src/table-builder/components/generic-table/paginator.component.ts +125 -0
- package/src/table-builder/components/group-by-list/group-by-list.component.css +24 -0
- package/src/table-builder/components/group-by-list/group-by-list.component.html +21 -0
- package/src/table-builder/components/group-by-list/group-by-list.component.spec.ts +23 -0
- package/src/table-builder/components/group-by-list/group-by-list.component.ts +26 -0
- package/src/table-builder/components/in-filter/in-filter.component.css +22 -0
- package/src/table-builder/components/in-filter/in-filter.component.html +38 -0
- package/src/table-builder/components/in-filter/in-filter.component.ts +66 -0
- package/src/table-builder/components/index.ts +9 -0
- package/src/table-builder/components/initialization-component/initialization.component.html +78 -0
- package/src/table-builder/components/initialization-component/initialization.component.ts +28 -0
- package/src/table-builder/components/link-column.component.ts +42 -0
- package/src/table-builder/components/number-filter/number-filter.component.css +10 -0
- package/src/table-builder/components/number-filter/number-filter.component.html +32 -0
- package/src/table-builder/components/number-filter/number-filter.component.spec.ts +30 -0
- package/src/table-builder/components/number-filter/number-filter.component.ts +34 -0
- package/src/table-builder/components/profiles-menu/profiles-menu.component.html +77 -0
- package/src/table-builder/components/profiles-menu/profiles-menu.component.scss +126 -0
- package/src/table-builder/components/profiles-menu/profiles-menu.component.spec.ts +23 -0
- package/src/table-builder/components/profiles-menu/profiles-menu.component.ts +64 -0
- package/src/table-builder/components/reset-menu/reset-menu.component.css +3 -0
- package/src/table-builder/components/reset-menu/reset-menu.component.html +10 -0
- package/src/table-builder/components/reset-menu/reset-menu.component.ts +87 -0
- package/src/table-builder/components/scroll-strategy.ts +139 -0
- package/src/table-builder/components/sort-menu/sort-menu.component-store.ts +57 -0
- package/src/table-builder/components/sort-menu/sort-menu.component.html +115 -0
- package/src/table-builder/components/sort-menu/sort-menu.component.scss +119 -0
- package/src/table-builder/components/sort-menu/sort-menu.component.ts +88 -0
- package/src/table-builder/components/table-container/table-container.component.html +94 -0
- package/src/table-builder/components/table-container/table-container.component.scss +60 -0
- package/src/table-builder/components/table-container/table-container.component.ts +467 -0
- package/src/table-builder/components/table-container/table-container.helpers/data-state.helpers.ts +113 -0
- package/src/table-builder/components/table-container/table-container.helpers/filter-state.helpers.ts +125 -0
- package/src/table-builder/components/table-container/table-container.helpers/groupBy.helpers.ts +172 -0
- package/src/table-builder/components/table-container/table-container.helpers/meta-data.helpers.ts +19 -0
- package/src/table-builder/components/table-container/table-container.helpers/sort-state.helpers.ts +47 -0
- package/src/table-builder/components/table-container/tableProps.ts +21 -0
- package/src/table-builder/components/table-container/virtual-scroll-container.ts +216 -0
- package/src/table-builder/components/table-container-filter/filter-list/filter-list.component.html +42 -0
- package/src/table-builder/components/table-container-filter/filter-list/filter-list.component.ts +47 -0
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.css +40 -0
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.html +11 -0
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.spec.ts +85 -0
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.ts +35 -0
- package/src/table-builder/components/table-container-filter/table-wrapper-filter-store.ts +13 -0
- package/src/table-builder/components/table-header-menu/table-header-menu.component.css +21 -0
- package/src/table-builder/components/table-header-menu/table-header-menu.component.html +48 -0
- package/src/table-builder/components/table-header-menu/table-header-menu.component.ts +36 -0
- package/src/table-builder/directives/custom-cell-directive.ts +63 -0
- package/src/table-builder/directives/custom-header-directive.ts +16 -0
- package/src/table-builder/directives/group-row-directive.ts +91 -0
- package/src/table-builder/directives/index.ts +8 -0
- package/src/table-builder/directives/multi-sort.directive.spec.ts +124 -0
- package/src/table-builder/directives/multi-sort.directive.ts +58 -0
- package/src/table-builder/directives/resize-column.directive.ts +107 -0
- package/src/table-builder/directives/table-wrapper.directive.ts +13 -0
- package/src/table-builder/directives/tb-filter.directive.ts +376 -0
- package/src/table-builder/documentation/table-builder/CUSTOM-CELL.md +568 -0
- package/src/table-builder/documentation/table-builder/CUSTOM-GROUP-ROW.md +356 -0
- package/src/table-builder/documentation/table-builder/METADATA-DOCUMENTATION.md +517 -0
- package/src/table-builder/documentation/table-builder/STYLER-STYLE.md +228 -0
- package/src/table-builder/documentation/table-builder/TABLE-BUILDER-CONFIG.md +325 -0
- package/src/table-builder/documentation/table-builder/TABLE-BUILDER-SETTINGS.md +515 -0
- package/src/table-builder/documentation/table-builder/TABLE-BUILDER.md +430 -0
- package/src/table-builder/documentation/table-builder/TABLE-CONTAINER.md +628 -0
- package/src/table-builder/enums/filterTypes.ts +39 -0
- package/src/table-builder/functions/boolean-filter-function.ts +12 -0
- package/src/table-builder/functions/date-filter-function.ts +85 -0
- package/src/table-builder/functions/download-data.ts +11 -0
- package/src/table-builder/functions/null-filter-function.ts +9 -0
- package/src/table-builder/functions/number-filter-function.ts +47 -0
- package/src/table-builder/functions/sort-data-function.ts +80 -0
- package/src/table-builder/functions/string-filter-function.ts +59 -0
- package/src/table-builder/interfaces/ColumnInfo.ts +9 -0
- package/src/table-builder/interfaces/dictionary.ts +3 -0
- package/src/table-builder/interfaces/meta-data.ts +279 -0
- package/src/table-builder/ngrx/tableBuilderStateStore.ts +203 -0
- package/src/table-builder/pipes/column-total.pipe.ts +16 -0
- package/src/table-builder/pipes/format-filter-type.pipe.ts +12 -0
- package/src/table-builder/pipes/format-filter-value.pipe.ts +71 -0
- package/src/table-builder/pipes/key-display.ts +13 -0
- package/src/table-builder/services/all-values-filter-creator.service.ts +92 -0
- package/src/table-builder/services/export-to-csv.service.ts +117 -0
- package/src/table-builder/services/link-creator.service.ts +98 -0
- package/src/table-builder/services/table-template-service.ts +47 -0
- package/src/table-builder/services/transform-creator.ts +90 -0
- package/src/table-builder/specs/table-custom-filters.spec.ts +262 -0
- package/src/table-builder/styles/collapser.styles.scss +16 -0
- package/src/table-builder/table-builder.module.ts +42 -0
- package/src/table-builder/types/group-types.ts +42 -0
- package/src/table-builder/types/index.ts +1 -0
- package/src/test.ts +17 -0
- package/src/utilities/array-helpers.ts +13 -0
- package/src/utilities/directives/auto-focus.directive.ts +20 -0
- package/src/utilities/directives/clickEmitterDirective.ts +15 -0
- package/src/utilities/directives/clickSubject.ts +19 -0
- package/src/utilities/directives/conditional-classes.directive.ts +36 -0
- package/src/utilities/directives/dialog-service.ts +19 -0
- package/src/utilities/directives/dialog.ts +174 -0
- package/src/utilities/directives/mat-toggle-group-directive.ts +60 -0
- package/src/utilities/directives/prevent-enter.directive.ts +12 -0
- package/src/utilities/directives/stop-propagation.directive.ts +19 -0
- package/src/utilities/directives/styler.ts +45 -0
- package/src/utilities/directives/trim-whitespace.directive.ts +20 -0
- package/src/utilities/index.ts +22 -0
- package/src/utilities/module.ts +53 -0
- package/src/utilities/pipes/function.pipe.ts +21 -0
- package/src/utilities/pipes/phone.pipe.ts +20 -0
- package/src/utilities/pipes/space-case.pipes.spec.ts +47 -0
- package/src/utilities/pipes/space-case.pipes.ts +29 -0
- package/tsconfig.lib.json +20 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/fesm2022/one-paragon-angular-utilities.mjs +0 -7328
- package/fesm2022/one-paragon-angular-utilities.mjs.map +0 -1
- package/types/one-paragon-angular-utilities.d.ts +0 -2197
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
|
|
2
|
+
:host ::ng-deep .mat-expansion-panel-header{
|
|
3
|
+
padding: 0;
|
|
4
|
+
}
|
|
5
|
+
.current-name{
|
|
6
|
+
color: var(tb-current-profile, blue);
|
|
7
|
+
}
|
|
8
|
+
.menu-item{
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
width: initial;
|
|
11
|
+
flex-grow: 1;
|
|
12
|
+
}
|
|
13
|
+
.profile-line{
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
align-items: center;
|
|
17
|
+
}
|
|
18
|
+
.first-in-line{
|
|
19
|
+
--f-b: 2rem;
|
|
20
|
+
margin-left: var(--mat-menu-item-with-icon-leading-spacing);
|
|
21
|
+
&.first-button{
|
|
22
|
+
height: var(--f-b);
|
|
23
|
+
margin: .2rem;
|
|
24
|
+
}
|
|
25
|
+
.button-save-icon{
|
|
26
|
+
height: var(--f-b);
|
|
27
|
+
width: var(--f-b);
|
|
28
|
+
font-size: var(--f-b);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
.main-save-button{
|
|
32
|
+
height: 4rem;
|
|
33
|
+
width: 4rem;
|
|
34
|
+
padding: .5rem;
|
|
35
|
+
mat-icon{
|
|
36
|
+
height: 3rem;
|
|
37
|
+
width: 3rem;
|
|
38
|
+
font-size: 3rem;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.save-for-default-icon{
|
|
42
|
+
margin: 0;
|
|
43
|
+
}
|
|
44
|
+
.display-none{
|
|
45
|
+
display: none;
|
|
46
|
+
}
|
|
47
|
+
.last-in-line{
|
|
48
|
+
padding-right: var(--mat-menu-item-with-icon-trailing-spacing);
|
|
49
|
+
}
|
|
50
|
+
.default-cursor{
|
|
51
|
+
cursor: default;
|
|
52
|
+
}
|
|
53
|
+
.as-def{
|
|
54
|
+
padding-left: var(--mat-menu-item-with-icon-leading-spacing);
|
|
55
|
+
}
|
|
56
|
+
.divider{
|
|
57
|
+
margin: .2px 0;
|
|
58
|
+
}
|
|
59
|
+
.add-key{
|
|
60
|
+
max-width: 8.5rem;
|
|
61
|
+
margin-left: 2px;
|
|
62
|
+
::ng-deep{
|
|
63
|
+
.mdc-text-field{
|
|
64
|
+
padding: 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
.panel{
|
|
69
|
+
transition: height .1s
|
|
70
|
+
}
|
|
71
|
+
.hide{
|
|
72
|
+
height: 0;
|
|
73
|
+
min-height: 0;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
}
|
|
76
|
+
.open-panel-button{
|
|
77
|
+
width: 100%;
|
|
78
|
+
height: 2.5rem;
|
|
79
|
+
}
|
|
80
|
+
.current-in-list{
|
|
81
|
+
border-left: 3px solid blue;
|
|
82
|
+
background-color: #0000ff0d;
|
|
83
|
+
}
|
|
84
|
+
.not-current-in-list{
|
|
85
|
+
border-left: 3px solid rgba(255, 255, 255, 0);
|
|
86
|
+
}
|
|
87
|
+
.add-new-profile-row, .all-profile-row{
|
|
88
|
+
border-top: rgb(128 128 128 / 25%) solid 1px;
|
|
89
|
+
}
|
|
90
|
+
.all-profiles{
|
|
91
|
+
display: flex;
|
|
92
|
+
justify-content: space-between;
|
|
93
|
+
&:has(.all-profile-arrow-close){
|
|
94
|
+
align-items: center;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
.all-profile-arrow{
|
|
98
|
+
display: inline-block;
|
|
99
|
+
height: .7rem;
|
|
100
|
+
width: .7rem;
|
|
101
|
+
border-color: black;
|
|
102
|
+
transform: rotate(-45deg);
|
|
103
|
+
&-open{
|
|
104
|
+
border-left: solid 2px;
|
|
105
|
+
border-bottom: solid 2px;
|
|
106
|
+
}
|
|
107
|
+
&-close{
|
|
108
|
+
border-right: solid 2px;
|
|
109
|
+
border-top: solid 2px;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
.new-name-input{
|
|
113
|
+
margin-left: 3px;
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
.input-hint{
|
|
117
|
+
font-size: smaller;
|
|
118
|
+
font-weight: 200;
|
|
119
|
+
color: gray;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
.add-button{
|
|
123
|
+
height: 20px;
|
|
124
|
+
line-height: 20px;
|
|
125
|
+
margin: 3px 0 0 3px;
|
|
126
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ProfilesMenuComponent } from './profiles-menu.component';
|
|
4
|
+
|
|
5
|
+
describe('ProfilesMenuComponent', () => {
|
|
6
|
+
let component: ProfilesMenuComponent;
|
|
7
|
+
let fixture: ComponentFixture<ProfilesMenuComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [ProfilesMenuComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(ProfilesMenuComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Component, computed, inject, input, signal, viewChild, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { TableBuilderStateStore } from '../../ngrx/tableBuilderStateStore';
|
|
3
|
+
import { MatMenu, MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
|
|
4
|
+
import { MatIcon } from '@angular/material/icon';
|
|
5
|
+
import { TableStore } from '../../classes/table-store';
|
|
6
|
+
import { MatTooltip } from '@angular/material/tooltip';
|
|
7
|
+
import { MatButton, MatIconButton } from '@angular/material/button';
|
|
8
|
+
import { StopPropagationDirective } from '../../../utilities';
|
|
9
|
+
import { MatInput, MatInputModule } from '@angular/material/input';
|
|
10
|
+
import { MatCheckbox } from '@angular/material/checkbox';
|
|
11
|
+
import { Subject } from 'rxjs';
|
|
12
|
+
import { FormsModule } from '@angular/forms';
|
|
13
|
+
|
|
14
|
+
@Component({
|
|
15
|
+
selector: 'tb-profiles-menu',
|
|
16
|
+
imports: [MatIcon, MatTooltip, MatIconButton, MatMenuModule, MatButton, MatInput,
|
|
17
|
+
MatCheckbox, StopPropagationDirective, MatInputModule, FormsModule
|
|
18
|
+
],
|
|
19
|
+
templateUrl: './profiles-menu.component.html',
|
|
20
|
+
styleUrl: './profiles-menu.component.scss',
|
|
21
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
22
|
+
})
|
|
23
|
+
export class ProfilesMenuComponent {
|
|
24
|
+
stateService = inject(TableBuilderStateStore);
|
|
25
|
+
tableStore = inject(TableStore);
|
|
26
|
+
$tableId = input.required<string>({ alias: 'tableId' });
|
|
27
|
+
$isMatMenuChild = input<boolean>(false, { alias: 'isMatMenuChild' });
|
|
28
|
+
trigger = viewChild<MatMenuTrigger>('trigger');
|
|
29
|
+
menu = viewChild.required(MatMenu)
|
|
30
|
+
allProfilesPanelOpened = signal(false);
|
|
31
|
+
newProfilePanelOpened = signal(false);
|
|
32
|
+
$currentProfile = computed(() => this.stateService.$selectLocalProfileCurrentKey(this.$tableId())());
|
|
33
|
+
$defaultProfile = computed(() => this.stateService.$selectLocalProfileDefaultKey(this.$tableId())());
|
|
34
|
+
$keys = computed(() => this.stateService.$selectLocalProfileKeys(this.$tableId())());
|
|
35
|
+
saveState(key: string) {
|
|
36
|
+
const tableState = this.tableStore.$savableState();
|
|
37
|
+
this.stateService.saveTableSettingsToLocalAndStorage(this.$tableId(), key, tableState);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
addState(key: string, asDefault: boolean){
|
|
41
|
+
const tableState = this.tableStore.$savableState();
|
|
42
|
+
this.stateService.addNewStateToLocalAndStorage(this.$tableId(), key, tableState, asDefault);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
setDefault(key: string){
|
|
46
|
+
this.stateService.setDefaultInLocalAndStorage(this.$tableId(), key);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
unsetDefault(){
|
|
50
|
+
this.stateService.unsetDefaultFromLocalAndStorage(this.$tableId());
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
defaultName = 'My Profile';
|
|
54
|
+
position$ = new Subject<{ top: string, right: string} | undefined>();
|
|
55
|
+
setPosition = (e: HTMLElement) => {
|
|
56
|
+
const rect = e.getBoundingClientRect();
|
|
57
|
+
if(rect.top === 0) return;
|
|
58
|
+
const a = {
|
|
59
|
+
right: `${(window.innerWidth - rect.right)}px`,
|
|
60
|
+
top: `${rect.top}px`,
|
|
61
|
+
}
|
|
62
|
+
return a;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<mat-menu #menu2="matMenu">
|
|
2
|
+
@if($set().length > 1)
|
|
3
|
+
{
|
|
4
|
+
<button mat-menu-item (click)="state.resetState()">All</button>
|
|
5
|
+
}
|
|
6
|
+
@for (item of $set(); track $index)
|
|
7
|
+
{
|
|
8
|
+
<button mat-menu-item (click)="state.resetPart(item)">Reset {{item}}</button>
|
|
9
|
+
}
|
|
10
|
+
</mat-menu>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, inject, output, viewChild } from '@angular/core';
|
|
2
|
+
import { MatMenu, MatMenuModule } from '@angular/material/menu';
|
|
3
|
+
import { resetable } from '../../classes/table-store';
|
|
4
|
+
import { TableContainerComponent } from '../table-container/table-container.component';
|
|
5
|
+
import { sortsAreSame } from '../../directives';
|
|
6
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
7
|
+
import { isCustomFilter } from '../../classes/filter-info';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'lib-reset-menu',
|
|
11
|
+
imports: [MatMenuModule, MatButtonModule],
|
|
12
|
+
templateUrl: './reset-menu.component.html',
|
|
13
|
+
styleUrl: './reset-menu.component.css',
|
|
14
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
15
|
+
})
|
|
16
|
+
export class ResetMenuComponent {
|
|
17
|
+
menu = viewChild.required(MatMenu);
|
|
18
|
+
protected tableContainer = inject(TableContainerComponent);
|
|
19
|
+
state = this.tableContainer.state;
|
|
20
|
+
onStateReset$ = output<null>({ alias: 'onStateReset' });
|
|
21
|
+
protected resetState() {
|
|
22
|
+
this.tableContainer.$customFilterDirectives().forEach( cf => cf.reset());
|
|
23
|
+
this.tableContainer.$filterDirectives().forEach( cf => cf.reset() );
|
|
24
|
+
this.state.resetState();
|
|
25
|
+
this.onStateReset$.emit(null)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
$filtersSet = computed(() => {
|
|
29
|
+
return Object.values(this.state.$filters())
|
|
30
|
+
.filter(f => (isCustomFilter(f) && f.active) || f.filterValue != undefined)
|
|
31
|
+
.length;
|
|
32
|
+
});
|
|
33
|
+
$sortSet = computed(() => {
|
|
34
|
+
const sorts = this.state.$selectSorted();
|
|
35
|
+
if(!sorts.length) return false;
|
|
36
|
+
const preSorts = this.state.$preSort();
|
|
37
|
+
if(!preSorts.length) return true;
|
|
38
|
+
return !sortsAreSame(preSorts, sorts);
|
|
39
|
+
});
|
|
40
|
+
$groupBySet = computed(() => this.state.$groupByData().length || this.state.$userDefinedNoGroups());
|
|
41
|
+
$hiddenSet = computed(() => this.state.$hiddenKeys().length);
|
|
42
|
+
$orderSet = computed(() => Object.keys(this.state.$userDefinedOrder()).length);
|
|
43
|
+
$widthsSet = computed(() => Object.keys(this.state.$getUserDefinedWidths()).length);
|
|
44
|
+
$rowHeightSet = this.state.$userDefinedRowHeight;
|
|
45
|
+
headerHeightSet = this.state.$userDefinedHeaderHeight;
|
|
46
|
+
pageSizeSet = computed(() => this.state.$userDefinedPageSize() && this.state.$userDefinedPageSize() !== this.state.selectSignal(s => s.pageSize)());
|
|
47
|
+
showAllSet = this.state.selectSignal(s => s.userDefined.showAll);
|
|
48
|
+
$set = computed(() => {
|
|
49
|
+
const arr: (typeof resetable[number])[] = [] as (typeof resetable[number])[];
|
|
50
|
+
if(this.$filtersSet()){
|
|
51
|
+
arr.push('Filters')
|
|
52
|
+
}
|
|
53
|
+
if(this.$sortSet()){
|
|
54
|
+
arr.push('Sorting')
|
|
55
|
+
}
|
|
56
|
+
if(this.$groupBySet()){
|
|
57
|
+
arr.push('Group By')
|
|
58
|
+
}
|
|
59
|
+
if(this.$hiddenSet()){
|
|
60
|
+
arr.push('Hidden Columns')
|
|
61
|
+
}
|
|
62
|
+
if(this.$orderSet()){
|
|
63
|
+
arr.push('Column Order')
|
|
64
|
+
}
|
|
65
|
+
if(this.$widthsSet()){
|
|
66
|
+
arr.push('Column Widths')
|
|
67
|
+
}
|
|
68
|
+
if(this.$rowHeightSet()){
|
|
69
|
+
arr.push('Row Height')
|
|
70
|
+
}
|
|
71
|
+
if(this.headerHeightSet()){
|
|
72
|
+
arr.push('Header Height')
|
|
73
|
+
}
|
|
74
|
+
if(this.pageSizeSet()){
|
|
75
|
+
arr.push('Page Size')
|
|
76
|
+
}
|
|
77
|
+
if(this.showAllSet()){
|
|
78
|
+
arr.push('Show All')
|
|
79
|
+
}
|
|
80
|
+
return arr;
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
resetable = resetable;
|
|
84
|
+
reset(s: string){
|
|
85
|
+
this.state.resetPart(s as any);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CdkVirtualScrollViewport,
|
|
3
|
+
VirtualScrollStrategy,
|
|
4
|
+
} from '@angular/cdk/scrolling';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
6
|
+
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
7
|
+
import { subscriber } from '../../rxjs';
|
|
8
|
+
import { VirtualScrollContainer } from './table-container/virtual-scroll-container';
|
|
9
|
+
import { effect, linkedSignal, signal, Signal, untracked } from '@angular/core';
|
|
10
|
+
import { DataStore } from '../classes/data-store';
|
|
11
|
+
|
|
12
|
+
export class TableVirtualScrollStrategy implements VirtualScrollStrategy {
|
|
13
|
+
constructor(scrollContainer: VirtualScrollContainer, dataStore: DataStore) {
|
|
14
|
+
this.$rowHeight = scrollContainer.computedRowHeight;
|
|
15
|
+
this.$headerHeight = scrollContainer.computedHeaderHeight;
|
|
16
|
+
this.viewport = scrollContainer.viewport;
|
|
17
|
+
this.dataStore = dataStore;
|
|
18
|
+
this.$dataLength = scrollContainer.$dataLength;
|
|
19
|
+
}
|
|
20
|
+
private dataStore: DataStore;
|
|
21
|
+
private readonly indexChange = new Subject<number>();
|
|
22
|
+
scrolledIndexChange = this.indexChange.pipe(distinctUntilChanged());
|
|
23
|
+
private viewport: Signal<CdkVirtualScrollViewport>;
|
|
24
|
+
|
|
25
|
+
private $dataLength: Signal<number>;
|
|
26
|
+
$dataLengthChange = linkedSignal<number, {curr: number, previous: number }>({
|
|
27
|
+
source: () => this.$dataLength(),
|
|
28
|
+
computation: (curr, previous) => ({ curr, previous: previous == undefined ? curr : previous.source })
|
|
29
|
+
});
|
|
30
|
+
$rowHeight: Signal<number>;
|
|
31
|
+
$rowHeightChange = linkedSignal<number, {curr: number, previous: number }>({
|
|
32
|
+
source: () => this.$rowHeight(),
|
|
33
|
+
computation: (curr, previous) => {
|
|
34
|
+
return ({ curr, previous: previous == undefined ? curr : previous.source })}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
$headerHeight: Signal<number>;
|
|
38
|
+
$headerHeightChange = linkedSignal<number, {curr: number, previous: number }>({
|
|
39
|
+
source: () => this.$headerHeight(),
|
|
40
|
+
computation: (curr, previous) => ({ curr, previous: previous == undefined ? curr : previous.source })
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
contentScrolled$ = new Subject<number>();
|
|
44
|
+
sub = subscriber(this.contentScrolled$.pipe(
|
|
45
|
+
debounceTime(20),
|
|
46
|
+
distinctUntilChanged()
|
|
47
|
+
), offset => {
|
|
48
|
+
this.updateContent('scroll')
|
|
49
|
+
})
|
|
50
|
+
onContentScrolled(): void {
|
|
51
|
+
this.contentScrolled$.next(this.viewport().measureScrollOffset());
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
#onDataLengthChange = effect(() => {
|
|
55
|
+
const dataLengthChange = this.$dataLengthChange();
|
|
56
|
+
untracked(() => {
|
|
57
|
+
if(dataLengthChange.curr === dataLengthChange.previous) return;
|
|
58
|
+
this.updateContent('data length')
|
|
59
|
+
});
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
#onHeaderChange = effect(() => {
|
|
63
|
+
const headerHeightChange = this.$headerHeightChange();
|
|
64
|
+
untracked(() => {
|
|
65
|
+
if(headerHeightChange.curr === headerHeightChange.previous) return;
|
|
66
|
+
this.updateContent('header height')
|
|
67
|
+
});
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
#onRowChange = effect(() => {
|
|
71
|
+
const rowHeightChange = this.$rowHeightChange();
|
|
72
|
+
untracked(() => {
|
|
73
|
+
if(rowHeightChange.curr === rowHeightChange.previous) return;
|
|
74
|
+
this.updateContent('row height')
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
$currentRange = signal({ start: 0, end: 0 })
|
|
79
|
+
|
|
80
|
+
private updateContent(trigger: ScrollStrategyTrigger): void {
|
|
81
|
+
const viewport = this.viewport && this.viewport()
|
|
82
|
+
if(!viewport || !this.$rowHeight) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const currentContentHeight = +viewport._totalContentHeight().replace('px', '');
|
|
86
|
+
const newContentHeight = this.$dataLength() * this.$rowHeight();
|
|
87
|
+
if(currentContentHeight !== newContentHeight){
|
|
88
|
+
viewport.setTotalContentSize(newContentHeight);
|
|
89
|
+
this.update(trigger, viewport, true)
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
this.update(trigger, viewport)
|
|
93
|
+
}
|
|
94
|
+
update(trigger: ScrollStrategyTrigger, viewport: CdkVirtualScrollViewport, needsScroll = false){
|
|
95
|
+
if(!viewport.getViewportSize()) return;
|
|
96
|
+
|
|
97
|
+
const rowHeightChangeEvent = this.$rowHeightChange();
|
|
98
|
+
const rowHeight = rowHeightChangeEvent.curr;
|
|
99
|
+
const rowHeightAdjustment = trigger === 'row height' ? rowHeightChangeEvent.curr / rowHeightChangeEvent.previous : 1;
|
|
100
|
+
|
|
101
|
+
const amountOfRows = Math.ceil((viewport.getViewportSize() - this.$headerHeight()) / rowHeight);
|
|
102
|
+
const f = viewport.measureScrollOffset();
|
|
103
|
+
const offset = viewport.measureScrollOffset() * rowHeightAdjustment;
|
|
104
|
+
|
|
105
|
+
const buffer = 35 + Math.round((40 - rowHeight) / 10);
|
|
106
|
+
const skip = Math.round(offset / rowHeight);
|
|
107
|
+
const index = skip % 2 === 0 ? skip : skip - 1;
|
|
108
|
+
const start = Math.max(0, index - buffer);
|
|
109
|
+
const end = Math.min(this.$dataLength(), index + amountOfRows + buffer);
|
|
110
|
+
|
|
111
|
+
if(start > this.$dataLength()){
|
|
112
|
+
this.viewport().scrollToOffset(0)
|
|
113
|
+
}
|
|
114
|
+
else if(f !== offset){
|
|
115
|
+
if(offset < f) viewport.scrollToOffset(offset);
|
|
116
|
+
else setTimeout(() => {
|
|
117
|
+
viewport.scrollToOffset(offset)
|
|
118
|
+
}, 0);
|
|
119
|
+
}
|
|
120
|
+
if(this.$currentRange().start === start && this.$currentRange().end === end){
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
this.$currentRange.set({ start, end });
|
|
124
|
+
viewport.setRenderedContentOffset(rowHeight * start);
|
|
125
|
+
this.dataStore.patchState({ virtualScrollOffset: offset });
|
|
126
|
+
viewport.setRenderedRange({ start, end });
|
|
127
|
+
|
|
128
|
+
this.indexChange.next(index);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
attach(viewport: CdkVirtualScrollViewport): void {}
|
|
132
|
+
onDataLengthChanged(): void {}
|
|
133
|
+
detach(): void {}
|
|
134
|
+
onContentRendered(): void {}
|
|
135
|
+
onRenderedOffsetChanged(): void {}
|
|
136
|
+
scrollToIndex(index: number, behavior: ScrollBehavior): void {}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
type ScrollStrategyTrigger = 'scroll' | 'data length' | 'header height' | 'row height';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Injectable, effect, inject, untracked } from '@angular/core';
|
|
2
|
+
import { Sort } from '@angular/material/sort';
|
|
3
|
+
import { ComponentStore } from '@ngrx/component-store';
|
|
4
|
+
import { TableStore } from '../../classes/table-store';
|
|
5
|
+
import { FieldType } from '../../interfaces/meta-data';
|
|
6
|
+
|
|
7
|
+
@Injectable()
|
|
8
|
+
export class SortMenuComponentStore extends ComponentStore<ComponentStoreState> {
|
|
9
|
+
private tableState = inject(TableStore);
|
|
10
|
+
setStoreStateEffect = effect(() => {
|
|
11
|
+
const metaData = this.tableState.$metaData();
|
|
12
|
+
if(!metaData) return;
|
|
13
|
+
this.tableState.$selectSorted();
|
|
14
|
+
untracked(() => this.setStateFromTableStore());
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
setStateFromTableStore = () => {
|
|
18
|
+
const metaData = this.tableState.$metaData();
|
|
19
|
+
const sorted = [...this.tableState.$selectSorted()].map(s => ({
|
|
20
|
+
...s,
|
|
21
|
+
displayName: metaData[s.active]?.displayName
|
|
22
|
+
} as SortWithName));
|
|
23
|
+
const notSorted = this.tableState.$metaDataArray()
|
|
24
|
+
.filter(md => (md.fieldType !== FieldType.NotMapped || md.sortLogic?.sortBy) && !md.noSort && !sorted.some(s => s.active === md.key))
|
|
25
|
+
.map(meta => ({ active: meta.key, displayName: meta.displayName } as SortWithName));
|
|
26
|
+
this.setState({ sorted, notSorted })
|
|
27
|
+
}
|
|
28
|
+
constructor(){
|
|
29
|
+
super({ notSorted: [], sorted: [] })
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
setSorted = this.updater((state, sorted: SortWithName[]) => ({ ...state, sorted }));
|
|
33
|
+
setNotSorted = this.updater((state, notSorted: SortWithName[]) => ({ ...state, notSorted }));
|
|
34
|
+
|
|
35
|
+
$sorted = this.selectSignal(state => state.sorted);
|
|
36
|
+
$notSorted = this.selectSignal(state => state.notSorted);
|
|
37
|
+
|
|
38
|
+
setDirection = this.updater((state, sort: SortWithName) => {
|
|
39
|
+
const index = state.sorted.findIndex(s => s.active === sort.active);
|
|
40
|
+
const sorted = [...state.sorted];
|
|
41
|
+
sorted.splice(index, 1, sort);
|
|
42
|
+
return ({ ...state, sorted });
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
reset = () => {
|
|
46
|
+
this.setStateFromTableStore();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ComponentStoreState {
|
|
51
|
+
sorted : SortWithName[];
|
|
52
|
+
notSorted: SortWithName[];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface SortWithName extends Sort{
|
|
56
|
+
displayName : string;
|
|
57
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
@let dirty = $dirty();
|
|
2
|
+
@let sorted = $sorted();
|
|
3
|
+
@let notSorted = $notSorted();
|
|
4
|
+
|
|
5
|
+
<!-- Menu Trigger -->
|
|
6
|
+
<span matTooltip="Sort">
|
|
7
|
+
<button color="primary" mat-icon-button [matMenuTriggerFor]="menu">
|
|
8
|
+
<mat-icon color="primary">swap_vert</mat-icon>
|
|
9
|
+
</button>
|
|
10
|
+
</span>
|
|
11
|
+
|
|
12
|
+
<!-- Menu -->
|
|
13
|
+
<mat-menu #menu="matMenu" class="my-mat-menu" (closed)="reset()">
|
|
14
|
+
<div mat-menu-item class="menu-button">
|
|
15
|
+
<div class="close-button-wrapper">
|
|
16
|
+
<span matTooltip="Close">
|
|
17
|
+
<mat-icon>close</mat-icon>
|
|
18
|
+
</span>
|
|
19
|
+
@if(dirty)
|
|
20
|
+
{
|
|
21
|
+
<span matTooltip="Undo" stop-propagation (click)="reset()">
|
|
22
|
+
<mat-icon>undo</mat-icon>
|
|
23
|
+
</span>
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<!-- Apply Button -->
|
|
30
|
+
<div class="apply-button-wrapper">
|
|
31
|
+
<button mat-button color="primary" stop-propagation
|
|
32
|
+
[class.apply-border]="dirty" [disabled]="!dirty"
|
|
33
|
+
(click)="apply()">
|
|
34
|
+
Apply @if (dirty) { Unsaved Changes }
|
|
35
|
+
</button>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<!-- Default Sorting Text -->
|
|
39
|
+
@if (!sorted.length)
|
|
40
|
+
{
|
|
41
|
+
<div class="tip" >
|
|
42
|
+
Sorting List
|
|
43
|
+
</div>
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
<!-- Sorted Menu List -->
|
|
47
|
+
<div #sortedGroup="cdkDropList"
|
|
48
|
+
class="list"
|
|
49
|
+
cdkDropList
|
|
50
|
+
[cdkDropListConnectedTo]="[notSortedGroup]"
|
|
51
|
+
[cdkDropListData]="sorted"
|
|
52
|
+
(cdkDropListDropped)="dropIntoSorted($event)">
|
|
53
|
+
|
|
54
|
+
<!-- Menu Item Wrapper -->
|
|
55
|
+
@for (sort of sorted; track sort.active)
|
|
56
|
+
{
|
|
57
|
+
<!-- Menu Item Headers -->
|
|
58
|
+
@if (sorted.length > 1)
|
|
59
|
+
{
|
|
60
|
+
<span class="description sort-header">{{$index === 0 ? 'First By' : 'Then By'}}</span>
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
<!-- Menu Item -->
|
|
64
|
+
<div mat-menu-item cdkDrag class="menu-item">
|
|
65
|
+
<div class="sort-item">
|
|
66
|
+
<span class="sorted-name">
|
|
67
|
+
{{sort.displayName || (sort.active | spaceCase)}}
|
|
68
|
+
<span class="direction-text">{{sort.direction}}</span>
|
|
69
|
+
</span>
|
|
70
|
+
|
|
71
|
+
<!-- Sort Direction Buttons -->
|
|
72
|
+
<div class="up-down-buttons-wrapper">
|
|
73
|
+
<button class="up-down-button up-button" stop-propagation
|
|
74
|
+
(click)="setDirection({active:sort.active,direction:SortDirection.asc,displayName:sort.displayName})">
|
|
75
|
+
<mat-icon class="up-down-icon" [class]="sort.direction !== SortDirection.asc ? 'light-arrow' : 'dark-arrow'">
|
|
76
|
+
arrow_upward
|
|
77
|
+
</mat-icon>
|
|
78
|
+
</button>
|
|
79
|
+
|
|
80
|
+
<button class="up-down-button" stop-propagation
|
|
81
|
+
(click)="setDirection({active:sort.active,direction:SortDirection.desc,displayName:sort.displayName})">
|
|
82
|
+
<mat-icon class="up-down-icon" [class]="sort.direction === SortDirection.asc ? 'light-arrow' : 'dark-arrow'">
|
|
83
|
+
arrow_downward
|
|
84
|
+
</mat-icon>
|
|
85
|
+
</button>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<!-- Default Not Sorted Text -->
|
|
94
|
+
@if(!notSorted.length)
|
|
95
|
+
{
|
|
96
|
+
<div class="tip" >
|
|
97
|
+
Not Sorted List
|
|
98
|
+
</div>
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
<!-- Not Sorted Menu List -->
|
|
102
|
+
<div #notSortedGroup="cdkDropList"
|
|
103
|
+
class="list"
|
|
104
|
+
cdkDropList
|
|
105
|
+
[cdkDropListConnectedTo]="[sortedGroup]"
|
|
106
|
+
[cdkDropListData]="notSorted"
|
|
107
|
+
(cdkDropListDropped)="dropIntoNotSorted($event)">
|
|
108
|
+
@for (sort of notSorted; track sort.active)
|
|
109
|
+
{
|
|
110
|
+
<div mat-menu-item class="menu-item" cdkDrag>
|
|
111
|
+
<span class="not-sorted-name">{{sort.displayName || (sort.active | spaceCase)}}</span>
|
|
112
|
+
</div>
|
|
113
|
+
}
|
|
114
|
+
</div>
|
|
115
|
+
</mat-menu>
|