x4js 2.2.69 → 2.2.71
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/package.json
CHANGED
|
@@ -57,6 +57,7 @@ export interface GridColumn {
|
|
|
57
57
|
formatter?: (input: any) => string; // for "custom" type
|
|
58
58
|
type?: ColType;
|
|
59
59
|
cls?: string;
|
|
60
|
+
tooltip?: boolean; // allow tooltip for each cell of thi column
|
|
60
61
|
sortable?: boolean | SortCallback;
|
|
61
62
|
footer_val?: string;
|
|
62
63
|
classifier?: CellClassifier;
|
|
@@ -777,7 +778,12 @@ export class Gridview<P extends GridviewProps = GridviewProps, E extends Gridvie
|
|
|
777
778
|
}
|
|
778
779
|
}
|
|
779
780
|
|
|
780
|
-
return new Component({
|
|
781
|
+
return new Component({
|
|
782
|
+
tag: "span",
|
|
783
|
+
cls,
|
|
784
|
+
content: data,
|
|
785
|
+
tooltip: column.tooltip ? data : undefined
|
|
786
|
+
});
|
|
781
787
|
}
|
|
782
788
|
|
|
783
789
|
/**
|
|
@@ -172,22 +172,35 @@ export class Menu extends Popup {
|
|
|
172
172
|
|
|
173
173
|
this.addClass( "x4vbox" );
|
|
174
174
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
else if( itm instanceof Component ) {
|
|
183
|
-
return itm;
|
|
175
|
+
if( props.items ) {
|
|
176
|
+
let children = props.items.filter( x=> !!x);
|
|
177
|
+
|
|
178
|
+
// trim separators
|
|
179
|
+
while( children.at(0)=='-' ) {
|
|
180
|
+
children.shift( );
|
|
184
181
|
}
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
|
|
183
|
+
while( children.at(-1)=='-' ) {
|
|
184
|
+
children.pop( );
|
|
187
185
|
}
|
|
188
|
-
});
|
|
189
186
|
|
|
190
|
-
|
|
187
|
+
const items = children.map( itm => {
|
|
188
|
+
if( itm==="-" ) {
|
|
189
|
+
return new CMenuSep( );
|
|
190
|
+
}
|
|
191
|
+
else if( isString(itm) ) {
|
|
192
|
+
return new CMenuItem( { text: itm, click: null, cls: 'title' } );
|
|
193
|
+
}
|
|
194
|
+
else if( itm instanceof Component ) {
|
|
195
|
+
return itm;
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
return new CMenuItem( itm );
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
this.setContent( items );
|
|
203
|
+
}
|
|
191
204
|
}
|
|
192
205
|
}
|
|
193
206
|
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
--propertygrid-odd-background: var(--color-primary-a5);
|
|
13
13
|
--propertygrid-even-background: transparent;
|
|
14
14
|
--propertygrid-disabled-background: rgb(170 170 170 / 14%);
|
|
15
|
+
|
|
16
|
+
--propertygrid-group-background: var( --color-primary-a5 );
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
.x4propertygrid {
|
|
@@ -43,7 +45,7 @@
|
|
|
43
45
|
.group {
|
|
44
46
|
padding: 6px 4px 4px 4px;
|
|
45
47
|
min-height: 2em;
|
|
46
|
-
background-color: var( --background
|
|
48
|
+
background-color: var( --propertygrid-group-background );
|
|
47
49
|
margin-bottom: 8px;
|
|
48
50
|
box-shadow: 4px 3px 8px rgba(0, 0, 0, 0.4);
|
|
49
51
|
color: var(--color-primary-a50);
|