basesite-shared-grid-lib 21.0.1-beta.91 → 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 +15 -1
- 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.91.tgz +0 -0
|
Binary file
|
|
@@ -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 {
|
|
@@ -2974,6 +2987,7 @@ class GridLibraryComponent {
|
|
|
2974
2987
|
let columnsToBeDisplayedForExcel = [];
|
|
2975
2988
|
this.exportColumnsList.forEach((column) => {
|
|
2976
2989
|
if (column.visible == true &&
|
|
2990
|
+
!this._isColumnRestricted(column.field) &&
|
|
2977
2991
|
column.columnType != 'checkbox' &&
|
|
2978
2992
|
column.columnType != 'dropdown' &&
|
|
2979
2993
|
column.columnType != '') {
|