@progressio_resources/gravity-design-system 2.2.0 → 2.2.1
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/esm2022/lib/components/gravity-table/gravity-table.component.mjs +50 -60
- package/esm2022/lib/components/gravity-tree-view/gravity-tree-view.component.mjs +11 -4
- package/esm2022/lib/components/gravity-tree-view/node/node.component.mjs +3 -3
- package/esm2022/lib/components/gravity-tree-view/service/tree-service.mjs +7 -140
- package/esm2022/lib/vendor/gravity-tooltip/gravity-tooltip.directive.mjs +1 -3
- package/fesm2022/progressio_resources-gravity-design-system.mjs +65 -204
- package/fesm2022/progressio_resources-gravity-design-system.mjs.map +1 -1
- package/lib/components/gravity-table/gravity-table.component.d.ts +3 -4
- package/lib/components/gravity-tree-view/gravity-tree-view.component.d.ts +4 -2
- package/lib/components/gravity-tree-view/service/tree-service.d.ts +3 -18
- package/lib/vendor/gravity-tooltip/gravity-tooltip.directive.d.ts +0 -1
- package/package.json +1 -1
- package/src/lib/styles/components/_tables.scss +9 -9
- package/src/lib/styles/overwrite/pretty-checkbox/_core.scss +0 -1
- package/src/lib/styles/overwrite/pretty-checkbox/elements/switch/_general.scss +2 -2
- package/src/lib/styles/overwrite/pretty-checkbox/elements/switch/_mixin.scss +1 -1
- package/src/lib/vendor/gravity-tooltip/gravity-tooltip.directive.ts +0 -3
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AfterViewInit, ElementRef, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class GravityTableComponent implements AfterViewInit, OnChanges
|
|
3
|
+
export declare class GravityTableComponent implements AfterViewInit, OnChanges {
|
|
4
4
|
private readonly renderer;
|
|
5
5
|
tableDensity: 'standard' | 'compressed';
|
|
6
6
|
tableSizeInput: 'xl' | 'lg' | 'md' | 'sm' | 'auto';
|
|
7
7
|
readonly tableContainer: ElementRef;
|
|
8
|
-
private firstTime;
|
|
9
8
|
private tableElement;
|
|
10
9
|
tableId: string;
|
|
11
10
|
tableSize: 'xl' | 'lg' | 'md' | 'sm';
|
|
12
11
|
constructor(renderer: Renderer2);
|
|
13
12
|
ngAfterViewInit(): void;
|
|
14
13
|
ngOnChanges(changes: SimpleChanges): void;
|
|
15
|
-
ngAfterContentChecked(): void;
|
|
16
14
|
private getTableHeaders;
|
|
15
|
+
initializeComponent(): void;
|
|
17
16
|
private initializeTable;
|
|
18
17
|
private adjustTableDensity;
|
|
19
18
|
private adjustButtonsSize;
|
|
@@ -8,12 +8,14 @@ export declare class GravityTreeViewComponent implements OnDestroy, OnChanges {
|
|
|
8
8
|
private readonly treeServiceSubscription;
|
|
9
9
|
callbacks: TreeCallbacks;
|
|
10
10
|
nodeItems: NodeItem<any>[];
|
|
11
|
+
showFilterInput: boolean;
|
|
11
12
|
selectedItems: EventEmitter<any>;
|
|
12
13
|
constructor(treeService: TreeService);
|
|
13
14
|
ngOnDestroy(): void;
|
|
14
15
|
ngOnChanges(changes: SimpleChanges): void;
|
|
15
|
-
|
|
16
|
+
initialize(): void;
|
|
16
17
|
private initTreeStructure;
|
|
18
|
+
changeFilter(newValue: string): void;
|
|
17
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<GravityTreeViewComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GravityTreeViewComponent, "gravity-tree-view", never, { "callbacks": { "alias": "callbacks"; "required": false; }; "nodeItems": { "alias": "nodeItems"; "required": false; }; }, { "selectedItems": "selectedItems"; }, never, never, false, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GravityTreeViewComponent, "gravity-tree-view", never, { "callbacks": { "alias": "callbacks"; "required": false; }; "nodeItems": { "alias": "nodeItems"; "required": false; }; "showFilterInput": { "alias": "showFilterInput"; "required": false; }; }, { "selectedItems": "selectedItems"; }, never, never, false, never>;
|
|
19
21
|
}
|
|
@@ -7,10 +7,11 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
export declare class TreeService implements OnDestroy {
|
|
8
8
|
private readonly filterChangeSubjectSubscription;
|
|
9
9
|
callbacks: TreeCallbacks;
|
|
10
|
+
filterValue: string;
|
|
10
11
|
nodeItems: NodeItem<any>[];
|
|
12
|
+
selectedItems: any[];
|
|
11
13
|
treeState: NodeState[];
|
|
12
14
|
private filterChangeSubject;
|
|
13
|
-
private selectedItems;
|
|
14
15
|
private selectedItemsSubject;
|
|
15
16
|
private selectedStates;
|
|
16
17
|
constructor();
|
|
@@ -33,25 +34,9 @@ export declare class TreeService implements OnDestroy {
|
|
|
33
34
|
childStateChanged(state: NodeState): void;
|
|
34
35
|
private anyChildSelected;
|
|
35
36
|
static initState(parent: NodeState, nodeItem: NodeItem<any>): NodeState;
|
|
36
|
-
deleteById(id: string): void;
|
|
37
|
-
deleteByState(state: NodeState): void;
|
|
38
|
-
private delete;
|
|
39
|
-
private toggleExpandedTraverse;
|
|
40
|
-
private static deleteRoot;
|
|
41
|
-
private addNewNode;
|
|
42
|
-
private static remove;
|
|
43
37
|
private allChildrenSelected;
|
|
44
|
-
private toggleExpandedTraverseAsc;
|
|
45
38
|
private anyActiveSelected;
|
|
46
|
-
|
|
47
|
-
private getNodeState;
|
|
48
|
-
toggleExpanded(value: boolean): void;
|
|
49
|
-
addNodeById(nodeState: NodeState, id: string): void;
|
|
50
|
-
editItemById(id: string, item: any): void;
|
|
51
|
-
expandById(id: string): void;
|
|
52
|
-
collapseById(id: string): void;
|
|
53
|
-
getParentById(id: string): NodeItem<any>;
|
|
54
|
-
forceFilterTraverse(): void;
|
|
39
|
+
filterChanged(value: string): void;
|
|
55
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<TreeService, never>;
|
|
56
41
|
static ɵprov: i0.ɵɵInjectableDeclaration<TreeService>;
|
|
57
42
|
}
|
package/package.json
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
thead tr {
|
|
13
13
|
@extend .hr-title, .sm-bold;
|
|
14
14
|
|
|
15
|
-
background-color: var(--
|
|
16
|
-
color: var(--
|
|
15
|
+
background-color: var(--on-bg-highlight-neutro-primary);
|
|
16
|
+
color: var(--on-bg-highlight-neutro-secondary);
|
|
17
17
|
|
|
18
18
|
th:first-of-type {
|
|
19
19
|
border-top-left-radius: $border-radius-sm;
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
|
|
33
33
|
&:has(td.actions-column) {
|
|
34
34
|
@for $dataColumnsCount from 3 through 9 {
|
|
35
|
-
/* N data columns (between 3 and 9) and 1 actions column */
|
|
35
|
+
/* 1 hidden mobile column, N data columns (between 3 and 9) and 1 actions column */
|
|
36
36
|
/* We need to fill the table space with all N columns, and the actions column is fixed width */
|
|
37
|
-
&:has(> :nth-last-child(2):nth-child(#{$dataColumnsCount})) > :not(:last-child) {
|
|
38
|
-
width: calc(100% / #{$dataColumnsCount});
|
|
37
|
+
&:has(> td:nth-last-child(2):nth-child(#{$dataColumnsCount})) > td:not(:last-child) {
|
|
38
|
+
width: calc(100% / (#{$dataColumnsCount} - 1));
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&:not(:has(td.actions-column)) {
|
|
44
44
|
@for $dataColumnsCount from 3 through 9 {
|
|
45
|
-
/* N data columns (between 3 and 9) */
|
|
45
|
+
/* 1 hidden mobile column and N data columns (between 3 and 9) */
|
|
46
46
|
/* We need to fill the table space with all N columns */
|
|
47
|
-
&:has(> :last-child:nth-child(#{$dataColumnsCount})) >
|
|
48
|
-
width: calc(100% / #{$dataColumnsCount});
|
|
47
|
+
&:has(> td:last-child:nth-child(#{$dataColumnsCount})) > td {
|
|
48
|
+
width: calc(100% / (#{$dataColumnsCount} - 1));
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
tr {
|
|
144
144
|
background-color: var(--surface-secondary);
|
|
145
145
|
border-radius: $border-radius-sm;
|
|
146
|
-
margin-bottom:
|
|
146
|
+
margin-bottom: 1rem;
|
|
147
147
|
padding: 0.75rem 1rem; //12px 16px
|
|
148
148
|
|
|
149
149
|
&:has(.actions-column) td:not(:nth-last-of-type(2)):not(.mobile-menu-trigger), &:not(:has(.actions-column)) td:not(:last-of-type):not(.mobile-menu-trigger) {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
border: 1px solid var(--bg-switch-off-primary);
|
|
17
17
|
background-color: var(--bg-switch-off-primary);
|
|
18
18
|
border-radius: 60px;
|
|
19
|
-
width:
|
|
19
|
+
width: calc(3rem - 2px);
|
|
20
20
|
box-sizing: unset;
|
|
21
21
|
height: calc(100% - 2px);
|
|
22
22
|
position: absolute;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
border-color: transparent;
|
|
37
37
|
transform: scale(0.8);
|
|
38
38
|
height: 1.375rem;
|
|
39
|
-
top:
|
|
39
|
+
top: 10%;
|
|
40
40
|
width: 1.375rem;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -272,9 +272,6 @@ export class GravityTooltipDirective implements OnChanges {
|
|
|
272
272
|
}, this.options['hideDelayAfterClick'])
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
ngOnInit(): void {
|
|
276
|
-
}
|
|
277
|
-
|
|
278
275
|
ngOnChanges(changes: SimpleChanges) {
|
|
279
276
|
this.initOptions = this.renameProperties(this.initOptions);
|
|
280
277
|
let changedOptions = this.getProperties(changes);
|