@planeasyinc/le-angular 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fesm2022/planeasyinc-le-angular.mjs +305 -25
- package/dist/fesm2022/planeasyinc-le-angular.mjs.map +1 -1
- package/dist/lib/components/container/container.component.d.ts +2 -1
- package/dist/lib/components/filters/filters.component.d.ts +54 -0
- package/dist/lib/directives/le-drawer.directive.d.ts +6 -2
- package/dist/lib/icons/icons-map.d.ts +5 -0
- package/dist/lib/icons/le-icon.component.d.ts +6 -1
- package/dist/lib/icons/svg/close.d.ts +5 -0
- package/dist/lib/services/le-filters.service.d.ts +33 -0
- package/dist/lib/views/table-view/table-view.component.d.ts +5 -0
- package/dist/styles/styles.scss +132 -6
- package/package.json +2 -1
|
@@ -10,7 +10,8 @@ export declare class LeContainerComponent {
|
|
|
10
10
|
}>;
|
|
11
11
|
constructor();
|
|
12
12
|
onSelectionChange(view: LeNode): void;
|
|
13
|
-
private
|
|
13
|
+
private listenAuthState;
|
|
14
|
+
private listenPageInit;
|
|
14
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<LeContainerComponent, never>;
|
|
15
16
|
static ɵcmp: i0.ɵɵComponentDeclaration<LeContainerComponent, "le-container", never, {}, {}, never, never, true, never>;
|
|
16
17
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy, TemplateRef } from '@angular/core';
|
|
2
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
|
3
|
+
import { FormControl, FormGroup } from '@angular/forms';
|
|
4
|
+
import { FilterModel, ColumnFilterModel } from '../../services/le-filters.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class FiltersComponent implements OnDestroy, OnDestroy {
|
|
7
|
+
private filtersService;
|
|
8
|
+
private overlay;
|
|
9
|
+
private viewContainerRef;
|
|
10
|
+
private _filteredOptions;
|
|
11
|
+
private _isDropdownOpened;
|
|
12
|
+
private overlayRef;
|
|
13
|
+
private destroy$;
|
|
14
|
+
readonly isOpened: import("@angular/core").Signal<boolean>;
|
|
15
|
+
readonly options: import("@angular/core").Signal<ColumnFilterModel[]>;
|
|
16
|
+
readonly filteredOptions: import("@angular/core").Signal<ColumnFilterModel[]>;
|
|
17
|
+
readonly isDropdownOpened: import("@angular/core").Signal<boolean>;
|
|
18
|
+
protected inputEl: import("@angular/core").Signal<ElementRef<HTMLInputElement>>;
|
|
19
|
+
protected inputContainerEl: import("@angular/core").Signal<ElementRef<HTMLInputElement>>;
|
|
20
|
+
protected dropdownTpl: import("@angular/core").Signal<TemplateRef<unknown>>;
|
|
21
|
+
protected contentTpl: import("@angular/core").Signal<ElementRef<HTMLDivElement>>;
|
|
22
|
+
protected search: FormControl<any>;
|
|
23
|
+
protected selectedFilters: SelectionModel<{
|
|
24
|
+
key: string;
|
|
25
|
+
type: string;
|
|
26
|
+
label: string;
|
|
27
|
+
options?: string[];
|
|
28
|
+
}>;
|
|
29
|
+
protected filtersForm: FormGroup<{}>;
|
|
30
|
+
constructor();
|
|
31
|
+
ngAfterViewInit(): void;
|
|
32
|
+
ngOnDestroy(): void;
|
|
33
|
+
onApplyClick(event: Event): void;
|
|
34
|
+
onResetClick(event: Event): void;
|
|
35
|
+
onCloseClick(event: Event): void;
|
|
36
|
+
onInput(event: Event): void;
|
|
37
|
+
onInputClearClick(event: Event): void;
|
|
38
|
+
onFocus(event: Event): void;
|
|
39
|
+
onBlur(event: Event): void;
|
|
40
|
+
onOptionClick(control: FilterModel['control']): void;
|
|
41
|
+
onFilterRemoveClick(control: FilterModel['control']): void;
|
|
42
|
+
private closePanel;
|
|
43
|
+
private openPanel;
|
|
44
|
+
private showDropdown;
|
|
45
|
+
private closeDropdown;
|
|
46
|
+
private clearSelection;
|
|
47
|
+
private initFilters;
|
|
48
|
+
private listenSearchChanges;
|
|
49
|
+
private listenSelectionChanges;
|
|
50
|
+
private listenDropdownState;
|
|
51
|
+
private filter;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FiltersComponent, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FiltersComponent, "le-filters", never, {}, {}, never, ["*"], true, never>;
|
|
54
|
+
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
type leDrawerType = 'side' | 'over';
|
|
2
3
|
export declare class LeDrawerDirective {
|
|
3
4
|
opened: import("@angular/core").InputSignal<boolean>;
|
|
4
5
|
width: import("@angular/core").InputSignal<number>;
|
|
5
6
|
hideOnClose: import("@angular/core").InputSignal<boolean>;
|
|
6
|
-
|
|
7
|
+
type: import("@angular/core").InputSignal<leDrawerType>;
|
|
8
|
+
protected _width: import("@angular/core").Signal<number>;
|
|
9
|
+
protected _position: import("@angular/core").Signal<"absolute" | "relative">;
|
|
7
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<LeDrawerDirective, never>;
|
|
8
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<LeDrawerDirective, "[leDrawer]", never, { "opened": { "alias": "opened"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "hideOnClose": { "alias": "hideOnClose"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LeDrawerDirective, "[leDrawer]", never, { "opened": { "alias": "opened"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "hideOnClose": { "alias": "hideOnClose"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
9
12
|
}
|
|
13
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class LeIconComponent {
|
|
3
|
-
name: import("@angular/core").InputSignal<"chevron" | "arrow-down" | "sort">;
|
|
3
|
+
name: import("@angular/core").InputSignal<"chevron" | "arrow-down" | "sort" | "close">;
|
|
4
4
|
size: import("@angular/core").InputSignal<string | number>;
|
|
5
5
|
icon: import("@angular/core").Signal<{
|
|
6
6
|
size: number;
|
|
@@ -17,6 +17,11 @@ export declare class LeIconComponent {
|
|
|
17
17
|
name: string;
|
|
18
18
|
viewBox: string;
|
|
19
19
|
content: string[];
|
|
20
|
+
} | {
|
|
21
|
+
size: number;
|
|
22
|
+
name: string;
|
|
23
|
+
viewBox: string;
|
|
24
|
+
content: string[];
|
|
20
25
|
}>;
|
|
21
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<LeIconComponent, never>;
|
|
22
27
|
static ɵcmp: i0.ɵɵComponentDeclaration<LeIconComponent, "le-icon", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
type filterType = 'EQ' | 'NEQ' | 'GT' | 'GTE' | 'LT' | 'LTE';
|
|
3
|
+
export interface FilterModel {
|
|
4
|
+
type: filterType;
|
|
5
|
+
control: {
|
|
6
|
+
key: string;
|
|
7
|
+
type: string;
|
|
8
|
+
label: string;
|
|
9
|
+
options?: string[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface ColumnFilterModel {
|
|
13
|
+
label: string;
|
|
14
|
+
name: string;
|
|
15
|
+
filters: FilterModel[];
|
|
16
|
+
}
|
|
17
|
+
export declare class LEFiltersService {
|
|
18
|
+
private _shown;
|
|
19
|
+
private _options;
|
|
20
|
+
private _selection;
|
|
21
|
+
readonly shown: import("@angular/core").Signal<boolean>;
|
|
22
|
+
readonly options: import("@angular/core").Signal<ColumnFilterModel[]>;
|
|
23
|
+
readonly selection: import("@angular/core").Signal<Record<string, string>>;
|
|
24
|
+
open(): void;
|
|
25
|
+
close(): void;
|
|
26
|
+
updateSelection(value: Record<string, string>): void;
|
|
27
|
+
setOptions(options: ColumnFilterModel[]): void;
|
|
28
|
+
private filterValues;
|
|
29
|
+
private isEqual;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LEFiltersService, never>;
|
|
31
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LEFiltersService>;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LeTableAction, LeTableNode } from '@planeasyinc/le-core';
|
|
2
2
|
import { TableDataSource } from './table-data-sourse';
|
|
3
3
|
import { PageChange } from './table-view.types';
|
|
4
|
+
import { ColumnFilterModel } from '../../services/le-filters.service';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
interface ColumnModel {
|
|
6
7
|
type: string;
|
|
@@ -14,6 +15,7 @@ interface CellModel {
|
|
|
14
15
|
export declare class TableViewComponent {
|
|
15
16
|
private apiService;
|
|
16
17
|
private dataService;
|
|
18
|
+
private filtersService;
|
|
17
19
|
node: import("@angular/core").InputSignal<LeTableNode>;
|
|
18
20
|
private _columns;
|
|
19
21
|
private _data;
|
|
@@ -39,9 +41,11 @@ export declare class TableViewComponent {
|
|
|
39
41
|
readonly isSortingEnabled: import("@angular/core").Signal<boolean>;
|
|
40
42
|
readonly sortColumnKeys: import("@angular/core").Signal<Set<string>>;
|
|
41
43
|
readonly hasRowClickAction: import("@angular/core").Signal<boolean>;
|
|
44
|
+
readonly filters: import("@angular/core").Signal<ColumnFilterModel[]>;
|
|
42
45
|
constructor();
|
|
43
46
|
onPageChange(pageChange: PageChange): void;
|
|
44
47
|
onSortClick(event: Event, column: ColumnModel): void;
|
|
48
|
+
onFiltersClick(event: Event): void;
|
|
45
49
|
onToolbarActionClick({ actions }: LeTableAction): void;
|
|
46
50
|
onRowClick(row: CellModel): void;
|
|
47
51
|
private processTableAction;
|
|
@@ -50,6 +54,7 @@ export declare class TableViewComponent {
|
|
|
50
54
|
private buildRequest;
|
|
51
55
|
private handleTableDataSuccessResponse;
|
|
52
56
|
private handleTableDataErrorResponse;
|
|
57
|
+
private getFilters;
|
|
53
58
|
private interpolateRowValues;
|
|
54
59
|
private setEffects;
|
|
55
60
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableViewComponent, never>;
|
package/dist/styles/styles.scss
CHANGED
|
@@ -153,6 +153,20 @@ ul {
|
|
|
153
153
|
flex: 1 1 auto;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
.le-divider {
|
|
157
|
+
background-color: var(--le-color-divider);
|
|
158
|
+
|
|
159
|
+
&-horizontal {
|
|
160
|
+
height: 1px;
|
|
161
|
+
width: 100%;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&-vertical {
|
|
165
|
+
width: 1px;
|
|
166
|
+
height: 100%;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
156
170
|
@mixin flex-row {
|
|
157
171
|
display: flex;
|
|
158
172
|
flex-direction: row;
|
|
@@ -442,7 +456,7 @@ ul {
|
|
|
442
456
|
|
|
443
457
|
&.le-menu-group--expanded {
|
|
444
458
|
opacity: 1;
|
|
445
|
-
max-height:
|
|
459
|
+
max-height: 5000px;
|
|
446
460
|
}
|
|
447
461
|
}
|
|
448
462
|
|
|
@@ -451,11 +465,12 @@ ul {
|
|
|
451
465
|
========================== */
|
|
452
466
|
|
|
453
467
|
.le-toolbar {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
468
|
+
@include flex-row;
|
|
469
|
+
@include align-center;
|
|
470
|
+
@include justify-between;
|
|
471
|
+
|
|
458
472
|
height: 60px;
|
|
473
|
+
gap: 16px;
|
|
459
474
|
}
|
|
460
475
|
|
|
461
476
|
.le-table-container {
|
|
@@ -510,6 +525,7 @@ ul {
|
|
|
510
525
|
@include flex-row;
|
|
511
526
|
@include align-center;
|
|
512
527
|
@include justify-between;
|
|
528
|
+
gap: 1rex;
|
|
513
529
|
}
|
|
514
530
|
|
|
515
531
|
.le-table-header-cell {
|
|
@@ -621,7 +637,7 @@ $sort-icon-size: 6px;
|
|
|
621
637
|
@include align-center;
|
|
622
638
|
@include justify-center;
|
|
623
639
|
margin: 0 2px;
|
|
624
|
-
width: calc($sort-icon-size *
|
|
640
|
+
width: calc($sort-icon-size * 7);
|
|
625
641
|
height: calc($sort-icon-size * 3);
|
|
626
642
|
}
|
|
627
643
|
|
|
@@ -758,3 +774,113 @@ $sort-icon-size: 6px;
|
|
|
758
774
|
background-color: var(--le-color-background);
|
|
759
775
|
margin-bottom: 16px;
|
|
760
776
|
}
|
|
777
|
+
|
|
778
|
+
/* =========================
|
|
779
|
+
FILTERS
|
|
780
|
+
========================== */
|
|
781
|
+
.le-filters-container {
|
|
782
|
+
@include flex-column;
|
|
783
|
+
gap: 16px;
|
|
784
|
+
padding: 16px 8px;
|
|
785
|
+
width: 320px;
|
|
786
|
+
overflow-x: hidden;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.le-filters-title {
|
|
790
|
+
font-size: var(--le-font-size-lg);
|
|
791
|
+
font-weight: var(--le-font-weight-semibold);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
.le-filters-actions {
|
|
795
|
+
@include flex-row;
|
|
796
|
+
@include justify-between;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.le-autocomplete-container {
|
|
800
|
+
@include flex-row;
|
|
801
|
+
@include align-center;
|
|
802
|
+
|
|
803
|
+
border: 1px solid var(--le-color-border);
|
|
804
|
+
padding: 2px 4px;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
.le-button-icon {
|
|
808
|
+
@include flex-column;
|
|
809
|
+
@include align-center;
|
|
810
|
+
@include justify-center;
|
|
811
|
+
|
|
812
|
+
flex-shrink: 0;
|
|
813
|
+
border-radius: 50%;
|
|
814
|
+
padding: 0;
|
|
815
|
+
margin: 0;
|
|
816
|
+
border: 0;
|
|
817
|
+
width: 24px;
|
|
818
|
+
height: 24px;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.le-autocomplete-input {
|
|
822
|
+
border: 0;
|
|
823
|
+
width: 100%;
|
|
824
|
+
padding: 4px;
|
|
825
|
+
|
|
826
|
+
&:focus {
|
|
827
|
+
outline: none;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
.le-autocomplete-panel {
|
|
832
|
+
height: 200px;
|
|
833
|
+
overflow: auto;
|
|
834
|
+
box-shadow: var(--le-dropdown-shadow);
|
|
835
|
+
background-color: var(--le-color-background);
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
.le-autocomplete-label, .le-autocomplete-option {
|
|
839
|
+
padding-top: 4px;
|
|
840
|
+
padding-bottom: 4px;
|
|
841
|
+
}
|
|
842
|
+
.le-autocomplete-label {
|
|
843
|
+
color: var(--le-color-gray-500);
|
|
844
|
+
padding-left: 8px;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
.le-autocomplete-option {
|
|
848
|
+
padding-left: 16px;
|
|
849
|
+
cursor: pointer;
|
|
850
|
+
|
|
851
|
+
&:hover {
|
|
852
|
+
background-color: var(--le-color-gray-200);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
&--selected {
|
|
856
|
+
background-color: var(--le-color-gray-100);
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
.le-filters-list {
|
|
861
|
+
@include flex-column;
|
|
862
|
+
gap: 8px;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.le-filters-list-item {
|
|
866
|
+
@include flex-column;
|
|
867
|
+
gap: 4px;
|
|
868
|
+
|
|
869
|
+
div {
|
|
870
|
+
@include flex-row;
|
|
871
|
+
@include align-center;
|
|
872
|
+
gap: 4px;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
select,
|
|
876
|
+
input {
|
|
877
|
+
&:focus {
|
|
878
|
+
outline: none;
|
|
879
|
+
}
|
|
880
|
+
border-color: var(--le-color-border);
|
|
881
|
+
border-style: solid;
|
|
882
|
+
border-width: 1px;
|
|
883
|
+
flex-grow: 1;
|
|
884
|
+
padding: 4px 8px;
|
|
885
|
+
}
|
|
886
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planeasyinc/le-angular",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"@angular/common": ">=17.0.0 <20.0.0",
|
|
22
22
|
"@angular/cdk": ">=17.0.0 <20.0.0",
|
|
23
23
|
"@angular/animations": ">=17.0.0 <20.0.0",
|
|
24
|
+
"@angular/forms": ">=17.0.0 <20.0.0",
|
|
24
25
|
"rxjs": ">=7.0.0",
|
|
25
26
|
"@planeasyinc/le-core": "^0.0.1",
|
|
26
27
|
"@planeasyinc/fe-adapters-old": "^0.1",
|