src/ui/grid-view-manager/smart-grid-view-manager.service.ts
Properties |
|
Methods |
|
| Public Async buildProfileKey | ||||||||
buildProfileKey(request: SmartGridViewProfileKeyRequest)
|
||||||||
|
Builds the backend profile key used to load and save grid views.
Parameters :
Returns :
Promise<string | null>
The backend profile key, or null on failure. |
| Public canSaveGridViewsOnGroups |
canSaveGridViewsOnGroups()
|
|
Checks if the current user has permission to save grid views on groups. Returns false if the 'StoreUserProfileForGroups' token is in the RestrictedTokens list.
Returns :
boolean
|
| Public Async deleteView | ||||||||
deleteView(userProfileGuid: string)
|
||||||||
|
Deletes a stored view on the backend (DELETE).
Parameters :
Returns :
Promise<boolean>
|
| Public deserializeColumns | ||||||||||||
deserializeColumns(visibleColumns: string, columnWidths: string)
|
||||||||||||
|
Deserializes comma-separated VisibleColumns and ColumnWidths strings into SmartGridViewColumn entries. Only visible columns are returned; columns absent from the list are treated as hidden by applyViewState.
Parameters :
Returns :
SmartGridViewColumn[]
|
| Public deserializeGroupByColumns | ||||||
deserializeGroupByColumns(groupByColumns: string)
|
||||||
|
Deserializes a comma-separated GroupByColumns string into GroupDescriptor[].
Parameters :
Returns :
GroupDescriptor[]
|
| Public deserializeSmartFilter | ||||||
deserializeSmartFilter(smartFilter: string)
|
||||||
|
Deserializes a SmartFilter string into a CompositeFilterDescriptor. Each line is a tab-separated triple: field\tOPERATOR\tvalue. Returns null when the string is empty.
Parameters :
Returns :
CompositeFilterDescriptor | null
|
| Public deserializeSortedColumns | ||||||
deserializeSortedColumns(sortedColumns: string)
|
||||||
|
Deserializes a comma-separated SortedColumns string into SortDescriptor[]. Format: field,ASCENDING,field2,DESCENDING,...
Parameters :
Returns :
SortDescriptor[]
|
| Public Async getGridView | ||||||||
getGridView(userProfileGuid: string)
|
||||||||
|
Fetches the full view data for a single stored view and deserializes it.
Parameters :
Returns :
Promise<SmartGridViewState | null>
|
| Public Async getLastAppliedViewGuid | ||||||||
getLastAppliedViewGuid(profileKey: string)
|
||||||||
|
Loads the last applied stored view GUID for a grid profile key.
Parameters :
Returns :
Promise<string>
The stored view GUID, or an empty string for Default. |
| Public getUserGroupsFromSession |
getUserGroupsFromSession()
|
|
Parses the current user's group list from the session context. SessionContext.UserGroupKeys and UserGroupNames are comma-separated strings whose entries correspond by index. Returns an array of { value, display } objects suitable for a dropdown, where value is the GroupGuid and display is the GroupName.
Returns :
UserGroupOption[]
|
| Public isViewStateDirty | ||||||||||||
isViewStateDirty(currentState: SmartGridViewState | null, savedState: SmartGridViewState | null)
|
||||||||||||
|
Checks whether a current grid state differs from a saved view state.
Parameters :
Returns :
boolean
|
| Public Async loadViews | ||||||||
loadViews(profileKey: string)
|
||||||||
|
Loads stored views from the backend and prepends the default view.
Parameters :
Returns :
Promise<boolean>
True when the backend request succeeded. |
| Public Async persistLastAppliedViewGuid | ||||||||||||
persistLastAppliedViewGuid(profileKey: string, userProfileGuid: string)
|
||||||||||||
|
Persists the last applied stored view GUID for a grid profile key.
Parameters :
Returns :
Promise<void>
|
| Public Async runWithLoading | ||||||||
runWithLoading(operation: () => void)
|
||||||||
Type parameters :
|
||||||||
|
Runs an operation while exposing the loading state to the component.
Parameters :
Returns :
Promise<T>
|
| Public Async saveView | ||||||||||||||||||||
saveView(userProfileGuid: string, viewName: string, state: SmartGridViewState, profileKey: string)
|
||||||||||||||||||||
|
Updates an existing stored view on the backend (PUT).
Parameters :
Returns :
Promise<boolean>
True when the backend update succeeded. |
| Public Async saveViewAs | ||||||||||||||||||||
saveViewAs(viewName: string, groupGuid: string, state: SmartGridViewState, profileKey: string)
|
||||||||||||||||||||
|
Creates a new stored view on the backend (POST) and returns it.
Parameters :
Returns :
Promise<SmartGridView | null>
The newly created view, or null on failure. |
| Public useDefaultViewOnly |
useDefaultViewOnly()
|
|
Resets the available views to the synthetic default view only.
Returns :
void
|
| Public instanceName |
Type : string
|
|
The instance name of the linked SmartGridViewManagerComponent. Must be set before calling loadViews(). |
| Public Readonly isLoading |
Type : unknown
|
Default value : signal(false)
|
| Public Readonly selectedView |
Type : unknown
|
Default value : signal<SmartGridView | null>(null)
|
| Public Readonly userGroups |
Type : unknown
|
Default value : signal<UserGroupOption[]>([])
|
| Public Readonly views |
Type : unknown
|
Default value : signal<SmartGridView[]>([])
|