basesite-shared-grid-lib 21.0.0-beta.6 → 21.0.0-beta.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/basesite-shared-grid-lib-21.0.0-beta.8.tgz +0 -0
- package/fesm2022/basesite-shared-grid-lib.mjs +41 -21
- package/fesm2022/basesite-shared-grid-lib.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/styles/styles.scss +9 -0
- package/types/basesite-shared-grid-lib.d.ts +2 -0
- package/basesite-shared-grid-lib-21.0.0-beta.6.tgz +0 -0
|
Binary file
|
|
@@ -58,7 +58,7 @@ class GridLibraryService {
|
|
|
58
58
|
this.baseUrl = 'https://fcems.intel.com/designhub/api';
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
61
|
-
this.baseUrl = 'https://
|
|
61
|
+
this.baseUrl = 'https://fcelspx-test.intel.com/designhub/api';
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
getColDef(gridId) {
|
|
@@ -2161,6 +2161,13 @@ class GridLibraryComponent {
|
|
|
2161
2161
|
this._Tool_Owner = 'Tool Owner';
|
|
2162
2162
|
this._Area_Coordinator = 'Area Coordinator';
|
|
2163
2163
|
this._TiPm = 'TI PM';
|
|
2164
|
+
// Columns that are completely removed for specific sites. A restricted column
|
|
2165
|
+
// is stripped from the coldefs entirely, so no saved view can reveal it, it
|
|
2166
|
+
// never appears in the column menu, and it is excluded from exports — the user
|
|
2167
|
+
// cannot activate it in any way. Keyed by siteId (compared as a string).
|
|
2168
|
+
this._restrictedColumnsBySite = {
|
|
2169
|
+
'4': ['funding'],
|
|
2170
|
+
};
|
|
2164
2171
|
//unsubscribe subject
|
|
2165
2172
|
this.unsubscribe$ = new Subject();
|
|
2166
2173
|
//custom pagination properties
|
|
@@ -2349,8 +2356,14 @@ class GridLibraryComponent {
|
|
|
2349
2356
|
return !column.visible || isDacHidden;
|
|
2350
2357
|
}
|
|
2351
2358
|
}
|
|
2359
|
+
_isColumnRestricted(field) {
|
|
2360
|
+
const restricted = this._restrictedColumnsBySite[String(this.siteId)];
|
|
2361
|
+
return !!restricted && restricted.includes(field);
|
|
2362
|
+
}
|
|
2352
2363
|
_mapColumnDef(columns, userRoles) {
|
|
2353
|
-
return columns
|
|
2364
|
+
return columns
|
|
2365
|
+
?.filter((res) => !this._isColumnRestricted(res.field))
|
|
2366
|
+
.map((res) => {
|
|
2354
2367
|
if (res.isButton === false) {
|
|
2355
2368
|
if (res.columnType === 'checkbox') {
|
|
2356
2369
|
return {
|
|
@@ -2432,7 +2445,10 @@ class GridLibraryComponent {
|
|
|
2432
2445
|
};
|
|
2433
2446
|
}
|
|
2434
2447
|
else if (res.columnType === 'fill') {
|
|
2435
|
-
const
|
|
2448
|
+
const hasConfiguredValues = (Array.isArray(res.filterValues) && res.filterValues.length > 0) ||
|
|
2449
|
+
(typeof res.fieldValue === 'string' && res.fieldValue.trim() !== '') ||
|
|
2450
|
+
(Array.isArray(res.fieldValue) && res.fieldValue.length > 0);
|
|
2451
|
+
const valueLabelMap = hasConfiguredValues ? this._buildFillValueLabelMap(res) : null;
|
|
2436
2452
|
return {
|
|
2437
2453
|
width: 120,
|
|
2438
2454
|
pinned: res.pinPosition,
|
|
@@ -2449,25 +2465,28 @@ class GridLibraryComponent {
|
|
|
2449
2465
|
field: res.field,
|
|
2450
2466
|
},
|
|
2451
2467
|
filterable: res.filterable,
|
|
2452
|
-
filter: 'agSetColumnFilter',
|
|
2453
|
-
filterParams:
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2468
|
+
filter: hasConfiguredValues ? 'agSetColumnFilter' : 'agTextColumnFilter',
|
|
2469
|
+
filterParams: hasConfiguredValues
|
|
2470
|
+
? {
|
|
2471
|
+
values: (params) => this._getFillFilterValues(res, params),
|
|
2472
|
+
refreshValuesOnOpen: true,
|
|
2473
|
+
defaultToNothingSelected: true,
|
|
2474
|
+
buttons: ['reset'],
|
|
2475
|
+
valueFormatter: (p) => {
|
|
2476
|
+
if (p?.value == null || p.value === '')
|
|
2477
|
+
return p?.value;
|
|
2478
|
+
return valueLabelMap?.get(String(p.value)) ?? p.value;
|
|
2479
|
+
},
|
|
2480
|
+
textFormatter: (v) => v == null ? '' : String(v).trim().toLowerCase(),
|
|
2481
|
+
}
|
|
2482
|
+
: {
|
|
2483
|
+
comparator: (filterLocalDateAtMidnight, cellValue) => {
|
|
2484
|
+
if (cellValue == null)
|
|
2485
|
+
return 0;
|
|
2486
|
+
return 0;
|
|
2487
|
+
},
|
|
2488
|
+
buttons: ['reset'],
|
|
2467
2489
|
},
|
|
2468
|
-
// Case-insensitive search within the dropdown's filter box
|
|
2469
|
-
textFormatter: (v) => v == null ? '' : String(v).trim().toLowerCase(),
|
|
2470
|
-
},
|
|
2471
2490
|
};
|
|
2472
2491
|
}
|
|
2473
2492
|
else {
|
|
@@ -2988,6 +3007,7 @@ class GridLibraryComponent {
|
|
|
2988
3007
|
let columnsToBeDisplayedForExcel = [];
|
|
2989
3008
|
this.exportColumnsList.forEach((column) => {
|
|
2990
3009
|
if (column.visible == true &&
|
|
3010
|
+
!this._isColumnRestricted(column.field) &&
|
|
2991
3011
|
column.columnType != 'checkbox' &&
|
|
2992
3012
|
column.columnType != 'dropdown' &&
|
|
2993
3013
|
column.columnType != '') {
|