File

src/ui/grid-view-manager/smart-grid-view-manager.service.ts

Index

Properties
Methods

Methods

Public Async buildProfileKey
buildProfileKey(request: SmartGridViewProfileKeyRequest)

Builds the backend profile key used to load and save grid views.

Parameters :
Name Type Optional Description
request SmartGridViewProfileKeyRequest No
  • Profile key request data.
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 :
Name Type Optional Description
userProfileGuid string No
  • The GUID of the stored view record to delete.
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 :
Name Type Optional Description
visibleColumns string No
  • Comma-separated field names.
columnWidths string No
  • Comma-separated widths in the same order.
Returns : SmartGridViewColumn[]
Public deserializeGroupByColumns
deserializeGroupByColumns(groupByColumns: string)

Deserializes a comma-separated GroupByColumns string into GroupDescriptor[].

Parameters :
Name Type Optional
groupByColumns string No
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 :
Name Type Optional
smartFilter string No
Returns : CompositeFilterDescriptor | null
Public deserializeSortedColumns
deserializeSortedColumns(sortedColumns: string)

Deserializes a comma-separated SortedColumns string into SortDescriptor[]. Format: field,ASCENDING,field2,DESCENDING,...

Parameters :
Name Type Optional
sortedColumns string No
Returns : SortDescriptor[]
Public Async getGridView
getGridView(userProfileGuid: string)

Fetches the full view data for a single stored view and deserializes it.

Parameters :
Name Type Optional Description
userProfileGuid string No
  • The GUID of the stored view.
Returns : Promise<SmartGridViewState | null>
Public Async getLastAppliedViewGuid
getLastAppliedViewGuid(profileKey: string)

Loads the last applied stored view GUID for a grid profile key.

Parameters :
Name Type Optional Description
profileKey string No
  • The backend grid profile key.
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 :
Name Type Optional Description
currentState SmartGridViewState | null No
  • Current grid state.
savedState SmartGridViewState | null No
  • Saved view state.
Returns : boolean
Public Async loadViews
loadViews(profileKey: string)

Loads stored views from the backend and prepends the default view.

Parameters :
Name Type Optional Description
profileKey string No
  • The backend grid profile key.
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 :
Name Type Optional Description
profileKey string No
  • The backend grid profile key.
userProfileGuid string No
  • The stored view GUID, or empty for Default.
Returns : Promise<void>
Public Async runWithLoading
runWithLoading(operation: () => void)
Type parameters :
  • T

Runs an operation while exposing the loading state to the component.

Parameters :
Name Type Optional Description
operation function No
  • The operation to run.
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 :
Name Type Optional Description
userProfileGuid string No
  • The GUID of the stored view record.
viewName string No
  • The name of the view.
state SmartGridViewState No
  • The grid state to persist.
profileKey string No
  • The backend grid profile key.
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 :
Name Type Optional Description
viewName string No
  • The name for the new view.
groupGuid string No
  • GroupGuid to save for, or '' for the current user.
state SmartGridViewState No
  • The grid state to persist.
profileKey string No

The newly created view, or null on failure.

Public useDefaultViewOnly
useDefaultViewOnly()

Resets the available views to the synthetic default view only.

Returns : void

Properties

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[]>([])

results matching ""

    No results matching ""