basesite-shared-grid-lib 21.0.1-beta.9 → 21.0.1-beta.93
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.1-beta.93.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.1-beta.9.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) {
|
|
@@ -2141,6 +2141,13 @@ class GridLibraryComponent {
|
|
|
2141
2141
|
this._Tool_Owner = 'Tool Owner';
|
|
2142
2142
|
this._Area_Coordinator = 'Area Coordinator';
|
|
2143
2143
|
this._TiPm = 'TI PM';
|
|
2144
|
+
// Columns that are completely removed for specific sites. A restricted column
|
|
2145
|
+
// is stripped from the coldefs entirely, so no saved view can reveal it, it
|
|
2146
|
+
// never appears in the column menu, and it is excluded from exports — the user
|
|
2147
|
+
// cannot activate it in any way. Keyed by siteId (compared as a string).
|
|
2148
|
+
this._restrictedColumnsBySite = {
|
|
2149
|
+
'4': ['funding'],
|
|
2150
|
+
};
|
|
2144
2151
|
//unsubscribe subject
|
|
2145
2152
|
this.unsubscribe$ = new Subject();
|
|
2146
2153
|
//custom pagination properties
|
|
@@ -2329,8 +2336,14 @@ class GridLibraryComponent {
|
|
|
2329
2336
|
return !column.visible || isDacHidden;
|
|
2330
2337
|
}
|
|
2331
2338
|
}
|
|
2339
|
+
_isColumnRestricted(field) {
|
|
2340
|
+
const restricted = this._restrictedColumnsBySite[String(this.siteId)];
|
|
2341
|
+
return !!restricted && restricted.includes(field);
|
|
2342
|
+
}
|
|
2332
2343
|
_mapColumnDef(columns, userRoles) {
|
|
2333
|
-
return columns
|
|
2344
|
+
return columns
|
|
2345
|
+
?.filter((res) => !this._isColumnRestricted(res.field))
|
|
2346
|
+
.map((res) => {
|
|
2334
2347
|
if (res.isButton === false) {
|
|
2335
2348
|
if (res.columnType === 'checkbox') {
|
|
2336
2349
|
return {
|
|
@@ -2412,7 +2425,10 @@ class GridLibraryComponent {
|
|
|
2412
2425
|
};
|
|
2413
2426
|
}
|
|
2414
2427
|
else if (res.columnType === 'fill') {
|
|
2415
|
-
const
|
|
2428
|
+
const hasConfiguredValues = (Array.isArray(res.filterValues) && res.filterValues.length > 0) ||
|
|
2429
|
+
(typeof res.fieldValue === 'string' && res.fieldValue.trim() !== '') ||
|
|
2430
|
+
(Array.isArray(res.fieldValue) && res.fieldValue.length > 0);
|
|
2431
|
+
const valueLabelMap = hasConfiguredValues ? this._buildFillValueLabelMap(res) : null;
|
|
2416
2432
|
return {
|
|
2417
2433
|
width: 120,
|
|
2418
2434
|
pinned: res.pinPosition,
|
|
@@ -2429,25 +2445,28 @@ class GridLibraryComponent {
|
|
|
2429
2445
|
field: res.field,
|
|
2430
2446
|
},
|
|
2431
2447
|
filterable: res.filterable,
|
|
2432
|
-
filter: 'agSetColumnFilter',
|
|
2433
|
-
filterParams:
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2448
|
+
filter: hasConfiguredValues ? 'agSetColumnFilter' : 'agTextColumnFilter',
|
|
2449
|
+
filterParams: hasConfiguredValues
|
|
2450
|
+
? {
|
|
2451
|
+
values: (params) => this._getFillFilterValues(res, params),
|
|
2452
|
+
refreshValuesOnOpen: true,
|
|
2453
|
+
defaultToNothingSelected: true,
|
|
2454
|
+
buttons: ['reset'],
|
|
2455
|
+
valueFormatter: (p) => {
|
|
2456
|
+
if (p?.value == null || p.value === '')
|
|
2457
|
+
return p?.value;
|
|
2458
|
+
return valueLabelMap?.get(String(p.value)) ?? p.value;
|
|
2459
|
+
},
|
|
2460
|
+
textFormatter: (v) => v == null ? '' : String(v).trim().toLowerCase(),
|
|
2461
|
+
}
|
|
2462
|
+
: {
|
|
2463
|
+
comparator: (filterLocalDateAtMidnight, cellValue) => {
|
|
2464
|
+
if (cellValue == null)
|
|
2465
|
+
return 0;
|
|
2466
|
+
return 0;
|
|
2467
|
+
},
|
|
2468
|
+
buttons: ['reset'],
|
|
2447
2469
|
},
|
|
2448
|
-
// Case-insensitive search within the dropdown's filter box
|
|
2449
|
-
textFormatter: (v) => v == null ? '' : String(v).trim().toLowerCase(),
|
|
2450
|
-
},
|
|
2451
2470
|
};
|
|
2452
2471
|
}
|
|
2453
2472
|
else {
|
|
@@ -2968,6 +2987,7 @@ class GridLibraryComponent {
|
|
|
2968
2987
|
let columnsToBeDisplayedForExcel = [];
|
|
2969
2988
|
this.exportColumnsList.forEach((column) => {
|
|
2970
2989
|
if (column.visible == true &&
|
|
2990
|
+
!this._isColumnRestricted(column.field) &&
|
|
2971
2991
|
column.columnType != 'checkbox' &&
|
|
2972
2992
|
column.columnType != 'dropdown' &&
|
|
2973
2993
|
column.columnType != '') {
|