@linzjs/step-ag-grid 17.4.6 → 17.4.8
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/GridTheme.scss +122 -76
- package/dist/index.css +5 -51
- package/dist/step-ag-grid.cjs.js +1 -1
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +1 -1
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Grid.tsx +1 -0
- package/src/stories/grid/GridDragRow.stories.tsx +1 -1
- package/src/styles/Grid.scss +6 -54
- package/src/styles/GridTheme.scss +122 -76
package/package.json
CHANGED
package/src/components/Grid.tsx
CHANGED
|
@@ -109,7 +109,7 @@ const GridDragRowTemplate: ComponentStory<typeof Grid> = (props: GridProps) => {
|
|
|
109
109
|
columnDefs={columnDefs}
|
|
110
110
|
defaultColDef={{ sortable: false }}
|
|
111
111
|
rowData={rowData}
|
|
112
|
-
onRowDragEnd={(row, _, targetIndex) => {
|
|
112
|
+
onRowDragEnd={async (row, _, targetIndex) => {
|
|
113
113
|
alert(`Row ${row.id} request to be moved to index ${targetIndex}.`);
|
|
114
114
|
}}
|
|
115
115
|
rowDragText={(params) => `${params.rowNode?.data.id} - ${params.rowNode?.data.position}`}
|
package/src/styles/Grid.scss
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
flex: 1;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
|
|
18
19
|
.Grid-sortIsStale {
|
|
19
20
|
span.ag-icon.ag-icon-desc::after {
|
|
20
21
|
content: "*";
|
|
@@ -71,60 +72,6 @@
|
|
|
71
72
|
padding: 0.375rem 0.75rem;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
.ag-cell-value {
|
|
75
|
-
display: flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.ag-cell .GridCell-editableIcon {
|
|
80
|
-
fill: colors.$silver;
|
|
81
|
-
visibility: hidden;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.ag-cell:hover .GridCell-editableIcon, .ag-cell.ag-cell-focus .GridCell-editableIcon {
|
|
85
|
-
visibility: visible;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.ag-drag-handle.ag-row-drag{
|
|
89
|
-
opacity: 0;
|
|
90
|
-
|
|
91
|
-
.ag-icon-grip{
|
|
92
|
-
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%239999B3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2Zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2Zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z' /%3E%3C/svg%3E");
|
|
93
|
-
background-repeat: no-repeat no-repeat;
|
|
94
|
-
background-position: center center;
|
|
95
|
-
background-size: cover;
|
|
96
|
-
color:transparent;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.ag-row:hover{
|
|
101
|
-
.ag-drag-handle.ag-row-drag{
|
|
102
|
-
opacity: 1;
|
|
103
|
-
transition: opacity 0.2s ease-in-out;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.GridFormMessage-container {
|
|
108
|
-
padding: 4px 8px;
|
|
109
|
-
max-width: 400px;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.GridCell-readonly {
|
|
113
|
-
color: colors.$fuscous;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.Grid-container.ag-theme-alpine .ag-cell:not(.ag-cell-focus) .Grid-displayWhenCellFocused {
|
|
117
|
-
visibility: hidden;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.Grid-container.ag-theme-alpine .ag-cell:hover .Grid-displayWhenCellFocused {
|
|
121
|
-
visibility: inherit;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.Grid-container.ag-theme-alpine .ag-cell-wrapper {
|
|
125
|
-
width: 100%;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
75
|
.flex-col-center {
|
|
129
76
|
display: flex;
|
|
130
77
|
flex-direction: column;
|
|
@@ -137,3 +84,8 @@
|
|
|
137
84
|
align-items: center;
|
|
138
85
|
}
|
|
139
86
|
|
|
87
|
+
.GridFormMessage-container {
|
|
88
|
+
padding: 4px 8px;
|
|
89
|
+
max-width: 400px;
|
|
90
|
+
}
|
|
91
|
+
|
|
@@ -8,13 +8,13 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
|
|
|
8
8
|
@include ag.grid-styles(
|
|
9
9
|
(
|
|
10
10
|
themes: (
|
|
11
|
-
step-compact: (
|
|
11
|
+
'step-compact.theme-specific': (
|
|
12
12
|
extend-theme: alpine,
|
|
13
13
|
--ag-row-height: 36px,
|
|
14
14
|
--ag-header-height: 36px,
|
|
15
15
|
--ag-font-size: calc($grid-base-font-size - 2px),
|
|
16
16
|
),
|
|
17
|
-
step-default: (
|
|
17
|
+
'step-default.theme-specific': (
|
|
18
18
|
extend-theme: alpine,
|
|
19
19
|
--ag-row-height: 40px,
|
|
20
20
|
--ag-header-height: 40px,
|
|
@@ -47,98 +47,144 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
|
|
|
47
47
|
)
|
|
48
48
|
);
|
|
49
49
|
|
|
50
|
+
.ag-theme-step-default.theme-specific,
|
|
51
|
+
.ag-theme-step-compact.theme-specific {
|
|
52
|
+
.ag-cell[col-id="selection"] {
|
|
53
|
+
display: flex; // Fix that when you click below checkbox it doesn't process a click
|
|
54
|
+
}
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
// fix alignment of cell content when grabber is present
|
|
57
|
+
.ag-header-cell-comp-wrapper {
|
|
58
|
+
justify-content: end;
|
|
59
|
+
}
|
|
54
60
|
|
|
55
|
-
//
|
|
56
|
-
.ag-
|
|
57
|
-
|
|
58
|
-
}
|
|
61
|
+
// Fix that when you click below checkbox it doesn't process a click
|
|
62
|
+
.ag-cell-wrapper > *:not(.ag-cell-value, .ag-group-value) {
|
|
63
|
+
height: auto;
|
|
64
|
+
}
|
|
59
65
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
66
|
+
.ag-row:last-of-type {
|
|
67
|
+
border-bottom: 1px solid lui.$dew;
|
|
68
|
+
}
|
|
64
69
|
|
|
65
|
-
.ag-
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
.ag-header-cell {
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
font-weight: 600;
|
|
73
|
+
|
|
74
|
+
// fix: Display descender line
|
|
75
|
+
padding: 0 11px;
|
|
68
76
|
|
|
69
|
-
.
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
.LuiIcon {
|
|
78
|
+
fill: lui.$surfie;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
72
81
|
|
|
73
|
-
|
|
74
|
-
|
|
82
|
+
.ag-cell-label-container {
|
|
83
|
+
padding: 8px 0;
|
|
75
84
|
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
// Help ag-grid to calculate column height in react portal
|
|
86
|
+
height: fit-content;
|
|
78
87
|
}
|
|
79
|
-
}
|
|
80
88
|
|
|
81
|
-
.ag-cell-
|
|
82
|
-
|
|
89
|
+
.ag-header .ag-header-cell[aria-colindex="1"] {
|
|
90
|
+
padding-left: 17px;
|
|
91
|
+
padding-right: 15px;
|
|
92
|
+
}
|
|
83
93
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
94
|
+
.ag-cell[aria-colindex="1"] {
|
|
95
|
+
padding-left: lui.$unit-rg;
|
|
96
|
+
}
|
|
87
97
|
|
|
88
|
-
.ag-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
98
|
+
.ag-cell {
|
|
99
|
+
padding-left: 11px;
|
|
100
|
+
padding-right: 11px;
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
}
|
|
92
104
|
|
|
93
|
-
.ag-cell
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
105
|
+
.ag-cell-wrap-text {
|
|
106
|
+
word-break: break-word;
|
|
107
|
+
}
|
|
97
108
|
|
|
98
|
-
.ag-cell
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
.ag-cell.ag-cell-popup-editing,
|
|
110
|
+
.ag-cell.ag-selected-for-edit,
|
|
111
|
+
.ag-cell-inline-editing {
|
|
112
|
+
padding-left: 9px;
|
|
113
|
+
padding-right: 9px;
|
|
114
|
+
background: rgb(72 160 244 / 20%);
|
|
102
115
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
align-items: center;
|
|
108
|
-
}
|
|
116
|
+
// These are important, it needs to override ag-grid to work
|
|
117
|
+
border: 3px solid #48a0f4 !important;
|
|
118
|
+
border-right: 3px solid #48a0f4 !important;
|
|
119
|
+
}
|
|
109
120
|
|
|
110
|
-
.ag-cell-
|
|
111
|
-
|
|
112
|
-
|
|
121
|
+
.ag-row .ag-cell-data-changed {
|
|
122
|
+
// ag-grid natively has !important on this style so we have to use it here :(
|
|
123
|
+
background-color: lightgoldenrodyellow;
|
|
124
|
+
}
|
|
113
125
|
|
|
114
|
-
.ag-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
background: rgb(72 160 244 / 20%);
|
|
126
|
+
.ag-center-cols-clipper {
|
|
127
|
+
// when using domLayout={"autoHeight"}, ag grid has a default min-height
|
|
128
|
+
// set to 150px so the !important is necessary here
|
|
129
|
+
min-height: 40px !important;
|
|
130
|
+
}
|
|
120
131
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
132
|
+
.ag-body-horizontal-scroll-viewport {
|
|
133
|
+
// It's set to scroll by default, but this causes issues with selecting the last row
|
|
134
|
+
overflow-x: auto;
|
|
135
|
+
}
|
|
125
136
|
|
|
126
|
-
.ag-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
137
|
+
.ag-cell {
|
|
138
|
+
font-weight: 400;
|
|
139
|
+
}
|
|
130
140
|
|
|
131
|
-
.ag-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
141
|
+
.ag-cell-value {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
}
|
|
136
145
|
|
|
137
|
-
.ag-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
146
|
+
.ag-cell .GridCell-editableIcon {
|
|
147
|
+
fill: lui.$silver;
|
|
148
|
+
visibility: hidden;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.ag-cell:hover .GridCell-editableIcon,
|
|
152
|
+
.ag-cell.ag-cell-focus .GridCell-editableIcon {
|
|
153
|
+
visibility: visible;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.ag-drag-handle.ag-row-drag {
|
|
157
|
+
opacity: 0;
|
|
141
158
|
|
|
142
|
-
.
|
|
143
|
-
|
|
144
|
-
|
|
159
|
+
.ag-icon-grip {
|
|
160
|
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%239999B3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2Zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2Zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z' /%3E%3C/svg%3E");
|
|
161
|
+
background-repeat: no-repeat no-repeat;
|
|
162
|
+
background-position: center center;
|
|
163
|
+
background-size: cover;
|
|
164
|
+
color: transparent;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.ag-row:hover {
|
|
169
|
+
.ag-drag-handle.ag-row-drag {
|
|
170
|
+
opacity: 1;
|
|
171
|
+
transition: opacity 0.2s ease-in-out;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.GridCell-readonly {
|
|
176
|
+
color: lui.$fuscous;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.ag-cell:not(.ag-cell-focus) .Grid-displayWhenCellFocused {
|
|
180
|
+
visibility: hidden;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.ag-cell:hover .Grid-displayWhenCellFocused {
|
|
184
|
+
visibility: inherit;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.ag-cell-wrapper {
|
|
188
|
+
width: 100%;
|
|
189
|
+
}
|
|
190
|
+
}
|