[AAE-26767] - Fixed lint

This commit is contained in:
VitoAlbano
2025-01-14 13:53:46 +00:00
parent 6c306da29a
commit 78d3a9b614
176 changed files with 812 additions and 0 deletions

View File

@@ -274,6 +274,7 @@ export class AdfHttpClient implements ee.Emitter, JsApiHttpClient {
/**
* Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
*
* @param contentTypes a contentType array
* @returns The chosen content type, preferring JSON.
*/
@@ -298,6 +299,7 @@ export class AdfHttpClient implements ee.Emitter, JsApiHttpClient {
* <li>application/json; charset=UTF8</li>
* <li>APPLICATION/JSON</li>
* </ul>
*
* @param contentType The MIME content type to check.
* @returns <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
*/
@@ -342,6 +344,7 @@ export class AdfHttpClient implements ee.Emitter, JsApiHttpClient {
/**
* Deserialize an HTTP response body into a value of the specified type.
*
* @param response response object
* @param returnType return type
* @returns deserialized object

View File

@@ -69,6 +69,7 @@ export const getQueryParamsWithCustomEncoder = (
/**
* Removes null and undefined values from an object.
*
* @param obj object to process
* @returns object with updated values
*/

View File

@@ -32,6 +32,7 @@ type StoryWithoutFunction<T> = NonFunctionProperties<StoryFn<T>>;
/**
* Copy storybook story
*
* @param story story
* @param annotations annotations
* @returns a copy of the story

View File

@@ -23,6 +23,7 @@ import { DummyFeaturesService } from '../services/dummy-features.service';
/**
* Provides the dummy feature flags.
*
* @returns Environment Providers for Feature Flags.
*/
export function provideDummyFeatureFlags() {

View File

@@ -69,6 +69,7 @@ export class DebugFeaturesService implements IDebugFeaturesService {
/**
* Gets the flags as an observable.
*
* @returns the observable that emits the flag changeset.
*/
getFlags$(): Observable<FlagChangeset> {
@@ -79,6 +80,7 @@ export class DebugFeaturesService implements IDebugFeaturesService {
/**
* Resets the specified flags.
*
* @param flags The flags to reset.
*/
resetFlags(flags: FlagSet): void {

View File

@@ -41,6 +41,7 @@ export class ShellModule {
/**
* Resolve module for routes
*
* @param routes route configuration
* @returns module with providers
*/
@@ -59,6 +60,7 @@ function getModuleForRoutes(routes: Routes): ModuleWithProviders<ShellModule> {
/**
* Resolve a module for the route configuration
*
* @param config route configuration
* @returns module with providers
*/

View File

@@ -22,6 +22,7 @@ import { StoragePrefixFactory } from './app-config-storage-prefix.factory';
/**
* Create a factory to load app configuration
*
* @param appConfigService app config service
* @param storageService storage service
* @param adfHttpClient http client

View File

@@ -95,6 +95,7 @@ export class AppConfigService {
/**
* Requests notification of a property value when it is loaded.
*
* @param property The desired property value
* @returns Property value, when loaded
*/
@@ -107,6 +108,7 @@ export class AppConfigService {
/**
* Gets the value of a named property.
*
* @param key Name of the property
* @param defaultValue Value to return if the key is not found
* @returns Value of the property
@@ -137,6 +139,7 @@ export class AppConfigService {
/**
* Gets the location.protocol value.
*
* @returns The location.protocol string
*/
getLocationProtocol(): string {
@@ -145,6 +148,7 @@ export class AppConfigService {
/**
* Gets the location.hostname property.
*
* @returns Value of the property
*/
getLocationHostname(): string {
@@ -153,6 +157,7 @@ export class AppConfigService {
/**
* Gets the location.port property.
*
* @param prefix Text added before port value
* @returns Port with prefix
*/
@@ -182,6 +187,7 @@ export class AppConfigService {
/**
* Loads the config file.
*
* @param callback an optional callback to execute when configuration is loaded
* @returns Notification when loading is complete
*/
@@ -217,6 +223,7 @@ export class AppConfigService {
/**
* Call the discovery API to fetch configuration
*
* @param hostIdp host address
* @returns Discovery configuration
*/
@@ -237,6 +244,7 @@ export class AppConfigService {
/**
* OAuth2 configuration
*
* @returns auth config model
*/
get oauth2(): OauthConfigModel {

View File

@@ -81,6 +81,7 @@ export class ContentAuth {
/**
* login Alfresco API
*
* @param username username to login
* @param password password to login
* @returns A promise that returns {new authentication ticket} if resolved and {error} if rejected.
@@ -122,6 +123,7 @@ export class ContentAuth {
/**
* logout Alfresco API
*
* @returns A promise that returns { authentication ticket} if resolved and {error} if rejected.
*/
logout(): Promise<any> {
@@ -149,6 +151,7 @@ export class ContentAuth {
/**
* Set the current Ticket
*
* @param ticket a string representing the ticket
*/
setTicket(ticket: string) {

View File

@@ -67,6 +67,7 @@ export class ProcessAuth {
/**
* login Activiti API
*
* @param username Username to login
* @param password Password to login
* @returns A promise that returns {new authentication ticket} if resolved and {error} if rejected.
@@ -123,6 +124,7 @@ export class ProcessAuth {
/**
* logout Alfresco API
*
* @returns A promise that returns {new authentication ticket} if resolved and {error} if rejected.
*/
async logout(): Promise<any> {
@@ -164,6 +166,7 @@ export class ProcessAuth {
/**
* Set the current Ticket
*
* @param ticket a string representing the ticket
*/
setTicket(ticket: string) {

View File

@@ -39,6 +39,7 @@ describe('Auth Guard SSO role service', () => {
/**
* Spy on user access
*
* @param realmRoles roles
* @param resourceAccess resource access values
*/

View File

@@ -24,6 +24,7 @@ import { OauthConfigModel } from '../models/oauth-config.model';
/**
* Create auth configuration factory
*
* @param authConfigService auth config service
* @returns factory function
*/

View File

@@ -35,6 +35,7 @@ export const JWT_STORAGE_SERVICE = new InjectionToken<OAuthStorage>('JWT_STORAGE
/**
* Create a Login Factory function
*
* @param redirectService auth redirect service
* @returns a factory function
*/

View File

@@ -26,6 +26,7 @@ export class RetryLoginService {
/**
* Attempts to log in a specified number of times if the initial login attempt fails.
*
* @param loginOptions - The options to be used for the login attempt.
* @param maxLoginAttempts - The maximum number of login attempts. Defaults to 3.
* @returns A promise that resolves to `true` if the login is successful, or rejects with an error if all attempts fail.

View File

@@ -59,6 +59,7 @@ export abstract class BaseAuthenticationService implements AuthenticationService
/**
* Adds the auth token to an HTTP header using the 'bearer' scheme.
*
* @param requestUrl the request url
* @param headersArg Header that will receive the token
* @returns The new header with the token added
@@ -87,6 +88,7 @@ export abstract class BaseAuthenticationService implements AuthenticationService
/**
* Does the provider support BPM?
*
* @returns True if supported, false otherwise
*/
isBPMProvider(): boolean {
@@ -100,6 +102,7 @@ export abstract class BaseAuthenticationService implements AuthenticationService
/**
* Does the provider support both ECM and BPM?
*
* @returns True if both are supported, false otherwise
*/
isALLProvider(): boolean {
@@ -114,6 +117,7 @@ export abstract class BaseAuthenticationService implements AuthenticationService
/**
* Prints an error message in the console browser
*
* @param error Error message
* @returns Object representing the error message
*/

View File

@@ -40,6 +40,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Gets all groups.
*
* @returns Array of group information objects
*/
getGroups(): Observable<IdentityGroupModel[]> {
@@ -49,6 +50,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Gets available roles
*
* @param groupId Id of the group.
* @returns Array of available roles information objects
*/
@@ -59,6 +61,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Gets assigned roles
*
* @param groupId Id of the group.
* @returns Array of available roles
*/
@@ -69,6 +72,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Assigns roles to the group
*
* @param groupId The ID of the group
* @param roles Array of roles to assign
* @returns request result
@@ -82,6 +86,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Removes roles from the group
*
* @param groupId The ID of the group
* @param roles Array of roles to remove
* @returns request result
@@ -95,6 +100,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Get effective roles
*
* @param groupId Id of the group
* @returns Array of effective roles
*/
@@ -105,6 +111,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Queries groups.
*
* @param requestQuery query settings
* @returns Array of user information objects
*/
@@ -135,6 +142,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Gets groups total count.
*
* @returns Number of groups count.
*/
getTotalGroupsCount(): Observable<IdentityGroupCountModel> {
@@ -144,6 +152,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Creates new group.
*
* @param newGroup Object of containing the new group details.
* @returns Empty response when the group created.
*/
@@ -156,6 +165,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Updates group details.
*
* @param groupId Id of the targeted group.
* @param updatedGroup Object of containing the group details
* @returns Empty response when the group updated.
@@ -169,6 +179,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Deletes Group.
*
* @param groupId Id of the group.
* @returns Empty response when the group deleted.
*/
@@ -179,6 +190,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Finds groups filtered by name.
*
* @param searchParams Object containing the name filter string
* @returns List of group information
*/
@@ -194,6 +206,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Gets details for a specified group.
*
* @param groupId Id of the target group
* @returns Group details
*/
@@ -204,6 +217,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Check that a group has one or more roles from the supplied list.
*
* @param groupId Id of the target group
* @param roleNames Array of role names
* @returns True if the group has one or more of the roles, false otherwise
@@ -228,6 +242,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Gets the client Id using the app name.
*
* @param applicationName Name of the app
* @returns client Id string
*/
@@ -240,6 +255,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Gets client roles.
*
* @param groupId Id of the target group
* @param clientId Id of the client
* @returns List of roles
@@ -251,6 +267,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Checks if a group has a client app.
*
* @param groupId Id of the target group
* @param clientId Id of the client
* @returns True if the group has the client app, false otherwise
@@ -261,6 +278,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
/**
* Check if a group has any of the client app roles in the supplied list.
*
* @param groupId Id of the target group
* @param clientId Id of the client
* @param roleNames Array of role names to check

View File

@@ -42,6 +42,7 @@ export class IdentityRoleService {
/**
* Ret all roles
*
* @param skipCount skip count
* @param size page size
* @returns List of roles
@@ -65,6 +66,7 @@ export class IdentityRoleService {
/**
* Add new role
*
* @param newRole Role model
* @returns Server result payload
*/
@@ -77,6 +79,7 @@ export class IdentityRoleService {
/**
* Delete existing role
*
* @param deletedRole Role model
* @returns Server result payload
*/
@@ -86,6 +89,7 @@ export class IdentityRoleService {
/**
* Update existing role
*
* @param updatedRole Role model
* @param roleId Role id
* @returns Server result payload

View File

@@ -48,6 +48,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Gets the name and other basic details of the current user.
*
* @returns The user's details
*/
getCurrentUserInfo(): IdentityUserModel {
@@ -60,6 +61,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Find users based on search input.
*
* @param search Search query string
* @returns List of users
*/
@@ -75,6 +77,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Find users based on username input.
*
* @param username Search query string
* @returns List of users
*/
@@ -90,6 +93,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Find users based on email input.
*
* @param email Search query string
* @returns List of users
*/
@@ -105,6 +109,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Find users based on id input.
*
* @param id Search query string
* @returns users object
*/
@@ -118,6 +123,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Get client roles of a user for a particular client.
*
* @param userId ID of the target user
* @param clientId ID of the client app
* @returns List of client roles
@@ -129,6 +135,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Checks whether user has access to a client app.
*
* @param userId ID of the target user
* @param clientId ID of the client app
* @returns True if the user has access, false otherwise
@@ -139,6 +146,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Checks whether a user has any of the client app roles.
*
* @param userId ID of the target user
* @param clientId ID of the client app
* @param roleNames List of role names to check for
@@ -165,6 +173,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Gets the client ID for an application.
*
* @param applicationName Name of the application
* @returns Client ID string
*/
@@ -177,6 +186,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Checks if a user has access to an application.
*
* @param userId ID of the user
* @param applicationName Name of the application
* @returns True if the user has access, false otherwise
@@ -187,6 +197,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Checks if a user has any application role.
*
* @param userId ID of the target user
* @param applicationName Name of the application
* @param roleNames List of role names to check for
@@ -200,6 +211,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Gets details for all users.
*
* @returns Array of user info objects
*/
getUsers(): Observable<IdentityUserModel[]> {
@@ -209,6 +221,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Gets a list of roles for a user.
*
* @param userId ID of the user
* @returns Array of role info objects
*/
@@ -219,6 +232,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Gets an array of users (including the current user) who have any of the roles in the supplied list.
*
* @param roleNames List of role names to look for
* @returns Array of user info objects
*/
@@ -240,6 +254,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Gets an array of users (not including the current user) who have any of the roles in the supplied list.
*
* @param roleNames List of role names to look for
* @returns Array of user info objects
*/
@@ -275,6 +290,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Checks if a user has one of the roles from a list.
*
* @param userId ID of the target user
* @param roleNames Array of roles to check for
* @returns True if the user has one of the roles, false otherwise
@@ -299,6 +315,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Gets details for all users.
*
* @param requestQuery query model
* @returns Array of user information objects.
*/
@@ -329,6 +346,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Gets users total count.
*
* @returns Number of users count.
*/
getTotalUsersCount(): Observable<number> {
@@ -338,6 +356,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Creates new user.
*
* @param newUser Object containing the new user details.
* @returns Empty response when the user created.
*/
@@ -350,6 +369,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Updates user details.
*
* @param userId Id of the user.
* @param updatedUser Object containing the user details.
* @returns Empty response when the user updated.
@@ -363,6 +383,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Deletes User.
*
* @param userId Id of the user.
* @returns Empty response when the user deleted.
*/
@@ -373,6 +394,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Changes user password.
*
* @param userId Id of the user.
* @param newPassword Details of user Credentials.
* @returns Empty response when the password changed.
@@ -386,6 +408,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Gets involved groups.
*
* @param userId Id of the user.
* @returns Array of involved groups information objects.
*/
@@ -398,6 +421,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Joins group.
*
* @param joinGroupRequest Details of join group request (IdentityJoinGroupRequestModel).
* @returns Empty response when the user joined the group.
*/
@@ -410,6 +434,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Leaves group.
*
* @param userId Id of the user.
* @param groupId Id of the group.
* @returns Empty response when the user left the group.
@@ -421,6 +446,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Gets available roles
*
* @param userId Id of the user.
* @returns Array of available roles information objects
*/
@@ -431,6 +457,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Gets assigned roles.
*
* @param userId Id of the user.
* @returns Array of assigned roles information objects
*/
@@ -443,6 +470,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Gets effective roles.
*
* @param userId Id of the user.
* @returns Array of composite roles information objects
*/
@@ -455,6 +483,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Assigns roles to the user.
*
* @param userId Id of the user.
* @param roles Array of roles.
* @returns Empty response when the role assigned.
@@ -468,6 +497,7 @@ export class IdentityUserService implements IdentityUserServiceInterface {
/**
* Removes assigned roles.
*
* @param userId Id of the user.
* @param removedRoles Array of roles.
* @returns Empty response when the role removed.

View File

@@ -37,6 +37,7 @@ export class JwtHelperService {
/**
* Decodes a JSON web token into a JS object.
*
* @param token Token in encoded form
* @returns Decoded token data object
*/
@@ -78,6 +79,7 @@ export class JwtHelperService {
/**
* Gets a named value from the user access or id token.
*
* @param key Key name of the field to retrieve
* @returns Value from the token
*/
@@ -87,6 +89,7 @@ export class JwtHelperService {
/**
* Gets a named value from the user access token.
*
* @param key Key name of the field to retrieve
* @returns Value from the token
*/
@@ -96,6 +99,7 @@ export class JwtHelperService {
/**
* Gets access token
*
* @returns access token
*/
getAccessToken(): string {
@@ -104,6 +108,7 @@ export class JwtHelperService {
/**
* Gets a named value from the user id token.
*
* @param key Key name of the field to retrieve
* @returns Value from the token
*/
@@ -113,6 +118,7 @@ export class JwtHelperService {
/**
* Gets id token
*
* @returns id token
*/
getIdToken(): string {
@@ -121,6 +127,7 @@ export class JwtHelperService {
/**
* Gets a named value from the user access token.
*
* @param token your SSO access token where the value is encode
* @param key Key name of the field to retrieve
* @returns Value from the token
@@ -137,6 +144,7 @@ export class JwtHelperService {
/**
* Gets realm roles.
*
* @returns Array of realm roles
*/
getRealmRoles(): string[] {
@@ -146,6 +154,7 @@ export class JwtHelperService {
/**
* Gets Client roles.
*
* @param clientName client name
* @returns Array of client roles
*/
@@ -156,6 +165,7 @@ export class JwtHelperService {
/**
* Checks for single realm role.
*
* @param role Role name to check
* @returns True if it contains given role, false otherwise
*/
@@ -170,6 +180,7 @@ export class JwtHelperService {
/**
* Checks for realm roles.
*
* @param rolesToCheck List of role names to check
* @returns True if it contains at least one of the given roles, false otherwise
*/
@@ -179,6 +190,7 @@ export class JwtHelperService {
/**
* Checks for client roles.
*
* @param clientName Targeted client name
* @param rolesToCheck List of role names to check
* @returns True if it contains at least one of the given roles, false otherwise
@@ -189,6 +201,7 @@ export class JwtHelperService {
/**
* Checks for client role.
*
* @param clientName Targeted client name
* @param role Role name to check
* @returns True if it contains given role, false otherwise

View File

@@ -73,6 +73,7 @@ export class TimeSyncService {
/**
* Checks if the local time is out of sync with the server time.
*
* @param maxAllowedClockSkewInSec - The maximum allowed clock skew in seconds.
* @returns An Observable that emits a boolean indicating whether the local time is out of sync.
*/

View File

@@ -40,6 +40,7 @@ describe('UserAccessService', () => {
/**
* spy on auth realm access
*
* @param realmRoles roles
* @param resourceAccess access settings
*/
@@ -53,6 +54,7 @@ describe('UserAccessService', () => {
/**
* spy on HxP authorisation
*
* @param appkey app key
* @param roles roles list
*/

View File

@@ -67,6 +67,7 @@ export class UserAccessService {
/**
* Checks for global roles access.
*
* @param rolesToCheck List of the roles to check
* @returns True if it contains at least one of the given roles, false otherwise
*/
@@ -90,6 +91,7 @@ export class UserAccessService {
/**
* Checks for global roles access.
*
* @param appName The app name
* @param rolesToCheck List of the roles to check
* @returns True if it contains at least one of the given roles, false otherwise

View File

@@ -249,6 +249,7 @@ describe('CardViewComponent', () => {
/**
* Return the card view item dispatcher component
*
* @returns the dispatcher component instance
*/
function getCardViewItemDispatcherComponent(): CardViewItemDispatcherComponent {

View File

@@ -52,6 +52,7 @@ export class CardViewUpdateService implements BaseCardViewUpdate {
/**
* Updates the cardview items property
*
* @param notification notification value
*/
updateElement(notification: CardViewBaseItemModel) {

View File

@@ -25,6 +25,7 @@ export class ClipboardService {
/**
* Checks if the target element can have its text copied.
*
* @param target Target HTML element
* @returns True if the text can be copied, false otherwise
*/
@@ -37,6 +38,7 @@ export class ClipboardService {
/**
* Copies text from an HTML element to the clipboard.
*
* @param target HTML element to be copied
* @param message Snackbar message to alert when copying happens
*/
@@ -59,6 +61,7 @@ export class ClipboardService {
/**
* Copies a text string to the clipboard.
*
* @param content Text to copy
* @param message Snackbar message to alert when copying happens
*/

View File

@@ -36,6 +36,7 @@ export class CookieService {
/**
* Checks if cookies are enabled.
*
* @returns True if enabled, false otherwise
*/
isEnabled(): boolean {
@@ -44,6 +45,7 @@ export class CookieService {
/**
* Retrieves a cookie by its key.
*
* @param key Key to identify the cookie
* @returns The cookie data or null if it is not found
*/
@@ -55,6 +57,7 @@ export class CookieService {
/**
* Sets a cookie.
*
* @param key Key to identify the cookie
* @param data Data value to set for the cookie
* @param expiration Expiration date of the data
@@ -66,6 +69,7 @@ export class CookieService {
/**
* Delete a cookie Key.
*
* @param key Key to identify the cookie
* @param path "Pathname" to store the cookie
*/

View File

@@ -59,6 +59,7 @@ export class DownloadService {
/**
* Invokes content download for a Blob with a file name.
*
* @param blob Content to download.
* @param fileName Name of the resulting file.
*/
@@ -68,6 +69,7 @@ export class DownloadService {
/**
* Invokes content download for a data array with a file name.
*
* @param data Data to download.
* @param fileName Name of the resulting file.
*/
@@ -77,6 +79,7 @@ export class DownloadService {
/**
* Invokes content download for a JSON object with a file name.
*
* @param json JSON object to download.
* @param fileName Name of the resulting file.
*/
@@ -86,6 +89,7 @@ export class DownloadService {
/**
* Invokes the download of the file by its URL address.
*
* @param url Url address pointing to the file.
* @param fileName Name of the file download.
*/

View File

@@ -39,6 +39,7 @@ export abstract class DynamicComponentMapper {
/**
* Gets the currently active DynamicComponentResolveFunction for a field type.
*
* @param type The type whose resolver you want
* @param defaultValue Default type returned for types that are not yet mapped
* @returns Resolver function
@@ -52,6 +53,7 @@ export abstract class DynamicComponentMapper {
/**
* Sets or optionally replaces a DynamicComponentResolveFunction for a field type.
*
* @param type The type whose resolver you want to set
* @param resolver The new resolver function
* @param override The new resolver will only replace an existing one if this parameter is true
@@ -75,6 +77,7 @@ export abstract class DynamicComponentMapper {
/**
* Register multiple components
*
* @param components map of components to register
* @param override replace existing components
*/
@@ -88,6 +91,7 @@ export abstract class DynamicComponentMapper {
/**
* Finds the component type that is needed to render a form field.
*
* @param model Form field model for the field to render
* @param defaultValue Default type returned for field types that are not yet mapped.
* @returns Component type

View File

@@ -28,6 +28,7 @@ export interface HighlightTransformResult {
export class HighlightTransformService {
/**
* Searches for `search` string(s) within `text` and highlights all occurrences.
*
* @param text Text to search within
* @param search Text pattern to search for
* @param wrapperClass CSS class used to provide highlighting style

View File

@@ -47,6 +47,7 @@ export class LogService {
/**
* Logs a message at the "ERROR" level.
*
* @param message Message to log
* @param optionalParams Interpolation values for the message in "printf" format
*/
@@ -60,6 +61,7 @@ export class LogService {
/**
* Logs a message at the "DEBUG" level.
*
* @param message Message to log
* @param optionalParams Interpolation values for the message in "printf" format
*/
@@ -73,6 +75,7 @@ export class LogService {
/**
* Logs a message at the "INFO" level.
*
* @param message Message to log
* @param optionalParams Interpolation values for the message in "printf" format
*/
@@ -86,6 +89,7 @@ export class LogService {
/**
* Logs a message at any level from "TRACE" upwards.
*
* @param message Message to log
* @param optionalParams Interpolation values for the message in "printf" format
*/
@@ -99,6 +103,7 @@ export class LogService {
/**
* Logs a message at the "TRACE" level.
*
* @param message Message to log
* @param optionalParams Interpolation values for the message in "printf" format
*/
@@ -112,6 +117,7 @@ export class LogService {
/**
* Logs a message at the "WARN" level.
*
* @param message Message to log
* @param optionalParams Interpolation values for the message in "printf" format
*/
@@ -125,6 +131,7 @@ export class LogService {
/**
* Logs a message if a boolean test fails.
*
* @param test Test value (typically a boolean expression)
* @param message Message to show if test is false
* @param optionalParams Interpolation values for the message in "printf" format
@@ -139,6 +146,7 @@ export class LogService {
/**
* Starts an indented group of log messages.
*
* @param groupTitle Title shown at the start of the group
* @param optionalParams Interpolation values for the title in "printf" format
*/
@@ -159,6 +167,7 @@ export class LogService {
/**
* Converts a log level name string into its numeric equivalent.
*
* @param level Level name
* @returns Numeric log level
*/
@@ -170,6 +179,7 @@ export class LogService {
/**
* Triggers notification callback for log messages.
*
* @param text Message text
* @param logLevel Log level for the message
*/

View File

@@ -34,6 +34,7 @@ export class PageTitleService {
/**
* Sets the page title.
*
* @param value The new title
*/
setTitle(value: string = '') {

View File

@@ -39,6 +39,7 @@ export class StorageService {
/**
* Gets an item.
*
* @param key Key to identify the item
* @returns The item (if any) retrieved by the key
*/
@@ -79,6 +80,7 @@ export class StorageService {
/**
* Stores an item
*
* @param key Key to identify the item
* @param data Data to store
*/
@@ -101,6 +103,7 @@ export class StorageService {
/**
* Removes a single item.
*
* @param key Key to identify the item
*/
removeItem(key: string) {
@@ -113,6 +116,7 @@ export class StorageService {
/**
* Is any item currently stored under `key`?
*
* @param key Key identifying item to check
* @returns True if key retrieves an item, false otherwise
*/

View File

@@ -172,6 +172,7 @@ export class ThumbnailService {
/**
* Gets a thumbnail URL for a MIME type.
*
* @param mimeType MIME type for the thumbnail
* @returns URL string
*/
@@ -182,6 +183,7 @@ export class ThumbnailService {
/**
* Gets a "miscellaneous" thumbnail URL for types with no other icon defined.
*
* @returns URL string
*/
getDefaultMimeTypeIcon(): string {

View File

@@ -27,6 +27,7 @@ export class UrlService {
/**
* Creates a trusted object URL from the Blob.
* WARNING: calling this method with untrusted user data exposes your application to XSS security risks!
*
* @param blob Data to wrap into object URL
* @returns URL string
*/

View File

@@ -91,6 +91,7 @@ export class UserPreferencesService {
/**
* Sets up a callback to notify when a property has changed.
*
* @param property The property to watch
* @returns Notification callback
*/
@@ -103,6 +104,7 @@ export class UserPreferencesService {
/**
* Gets a preference property.
*
* @param property Name of the property
* @param defaultValue Default to return if the property is not found
* @returns Preference property
@@ -118,6 +120,7 @@ export class UserPreferencesService {
/**
* Sets a preference property.
*
* @param property Name of the property
* @param value New value for the property
*/
@@ -132,6 +135,7 @@ export class UserPreferencesService {
/**
* Sets a preference property.
*
* @param property Name of the property
* @param value New value for the property
*/
@@ -145,6 +149,7 @@ export class UserPreferencesService {
/**
* Check if an item is present in the storage
*
* @param property Name of the property
* @returns True if the item is present, false otherwise
*/
@@ -157,6 +162,7 @@ export class UserPreferencesService {
/**
* Gets the active storage prefix for preferences.
*
* @returns Storage prefix
*/
getStoragePrefix(): string {
@@ -165,6 +171,7 @@ export class UserPreferencesService {
/**
* Sets the active storage prefix for preferences.
*
* @param value Name of the prefix
*/
setStoragePrefix(value: string | null) {
@@ -174,6 +181,7 @@ export class UserPreferencesService {
/**
* Gets the full property key with prefix.
*
* @param property The property name
* @returns Property key
*/
@@ -183,6 +191,7 @@ export class UserPreferencesService {
/**
* Gets an array containing the available page sizes.
*
* @returns Array of page size values
*/
get supportedPageSizes(): number[] {
@@ -216,6 +225,7 @@ export class UserPreferencesService {
/**
* Current locale setting.
*
* @returns locale name
*/
get locale(): string {
@@ -228,6 +238,7 @@ export class UserPreferencesService {
/**
* Gets the default locale.
*
* @returns Default locale language code
*/
getDefaultLocale(): string {

View File

@@ -27,6 +27,7 @@ import { isValid, Locale, parse } from 'date-fns';
*
* Automatically switches locales based on user preferences.
* Supports custom display format.
*
* @example
*
* Add the following to the component `providers` section

View File

@@ -101,6 +101,7 @@ export class DateFnsUtils {
/**
* Converts a Moment.js date format string to the equivalent date-fns format string.
*
* @param dateDisplayFormat - The Moment.js date format string to convert.
* @returns The equivalent date-fns format string.
*/
@@ -119,6 +120,7 @@ export class DateFnsUtils {
/**
* Formats a date using the specified date format.
*
* @param date - The date to format, can be a number or a Date object.
* @param dateFormat - The date format string to use for formatting.
* @returns The formatted date as a string
@@ -132,6 +134,7 @@ export class DateFnsUtils {
/**
* Parses a date string using the specified date format.
*
* @param value - The date value to parse. Can be a string or a Date (for generic calls)
* @param dateFormat - The date format string to use for parsing.
* @param options - Additional options
@@ -154,6 +157,7 @@ export class DateFnsUtils {
/**
* Parses a datetime string using the ISO format
*
* @param value - The date and time string to parse
* @returns returns the parsed Date object
*/
@@ -163,6 +167,7 @@ export class DateFnsUtils {
/**
* Checks if the date string is a valid date according to the specified format
*
* @param dateValue Date value
* @param dateFormat The date format
* @returns `true` if the date is valid, otherwise `false`
@@ -177,6 +182,7 @@ export class DateFnsUtils {
/**
* Validates a date is before another one
*
* @param source source date to compare
* @param target target date to compare
* @returns `true` if the source date is before the target one, otherwise `false`
@@ -187,6 +193,7 @@ export class DateFnsUtils {
/**
* Validates a date is after another one
*
* @param source source date to compare
* @param target target date to compare
* @returns `true` if the source date is after the target one, otherwise `false`

View File

@@ -19,6 +19,7 @@ export class ObjectUtils {
/**
* Gets a value from an object by composed key
* ObjectUtils.getValue({ item: { nodeType: 'cm:folder' }}, 'item.nodeType') ==> 'cm:folder'
*
* @param target target object
* @param key object property key
* @returns object property value

View File

@@ -60,6 +60,7 @@ export class UnsavedChangesDialogComponent implements OnInit {
/**
* Sets 'unsaved_changes__modal_visible' checked state (true or false string) as new item in local storage.
*
* @param savePreferences - MatCheckboxChange object with information about checkbox state.
*/
onToggleCheckboxPreferences(savePreferences: MatCheckboxChange) {

View File

@@ -38,6 +38,7 @@ export class UnsavedChangesGuard implements CanDeactivate<any> {
/**
* Allows to deactivate route when there is no unsaved changes, otherwise displays dialog to confirm discarding changes.
*
* @returns boolean | Observable<boolean> true when there is no unsaved changes or changes can be discarded, false otherwise.
*/
canDeactivate(): boolean | Observable<boolean> {

View File

@@ -191,6 +191,7 @@ export class UploadDirective implements OnInit, OnDestroy {
/**
* Extract files from the DataTransfer object used to hold the data that is being dragged during a drag and drop operation.
*
* @param dataTransfer DataTransfer object
* @returns a list of file info objects
*/
@@ -251,6 +252,7 @@ export class UploadDirective implements OnInit, OnDestroy {
/**
* Invoked when user selects files or folders by means of File Dialog
*
* @param event DOM event
*/
onSelectFiles(event: any): void {

View File

@@ -48,6 +48,7 @@ describe('DynamicChipListComponent', () => {
/**
* Find 'More' button
*
* @returns native element
*/
function findViewMoreButton(): HTMLButtonElement {
@@ -56,6 +57,7 @@ describe('DynamicChipListComponent', () => {
/**
* Get the chips
*
* @returns native element list
*/
function findChips(): DebugElement[] {
@@ -172,6 +174,7 @@ describe('DynamicChipListComponent', () => {
/**
* Render chips
*
* @param chipsToRender chips to render
*/
async function renderChips(chipsToRender?: Chip[]) {

View File

@@ -171,6 +171,7 @@ export abstract class FormBaseComponent {
/**
* Invoked when user clicks outcome button.
*
* @param outcome Form outcome model
* @returns `true` if outcome button was clicked, otherwise `false`
*/

View File

@@ -105,6 +105,7 @@ export class FormRendererComponent<T> implements OnInit, OnDestroy {
/**
* Serializes column fields
*
* @param content container model
* @returns a list of form field models
*/
@@ -141,6 +142,7 @@ export class FormRendererComponent<T> implements OnInit, OnDestroy {
/**
* Calculate the column width based on the numberOfColumns and current field's colspan property
*
* @param container container model
* @returns the column width for the given model
*/

View File

@@ -68,6 +68,7 @@ describe('BaseViewerWidgetComponent', () => {
/**
* Assert the field value
*
* @param value field value
* @param expectedFileId field id
* @param fakeForm form model

View File

@@ -551,6 +551,7 @@ export class FormFieldModel extends FormWidgetModel {
/**
* Check if the field type is invalid, requires a type to be a `container`
*
* @param type field type
* @returns `true` if type is a `container`, otherwise `false`
*/

View File

@@ -171,6 +171,7 @@ export class FormModel implements ProcessFormModel {
/**
* Validates a specific form field, triggers form validation.
*
* @param field Form field to validate.
*/
validateField(field: FormFieldModel): void {
@@ -255,6 +256,7 @@ export class FormModel implements ProcessFormModel {
/**
* Returns a form variable that matches the identifier.
*
* @param identifier The `name` or `id` value.
* @returns form variable model
*/
@@ -268,6 +270,7 @@ export class FormModel implements ProcessFormModel {
/**
* Returns a value of the form variable that matches the identifier.
* Provides additional conversion of types (date, boolean).
*
* @param identifier The `name` or `id` value
* @returns form variable value
*/
@@ -285,6 +288,7 @@ export class FormModel implements ProcessFormModel {
* Returns a process variable value.
* When mapping a process variable with a form variable the mapping
* is already resolved by the rest API with the name of variables.formVariableName
*
* @param name Variable name
* @returns process variable value
*/

View File

@@ -26,6 +26,7 @@ export const FORM_RULES_MANAGER = new InjectionToken<FormRulesManager<any>>('for
/**
* A factory for forms rule manager
*
* @param injector Angular injector
* @returns FormsRuleManager instance
*/

View File

@@ -68,6 +68,7 @@ export class FormService implements FormValidationService {
/**
* Parses JSON data to create a corresponding Form model.
*
* @param json JSON to create the form
* @param data Values for the form fields
* @param readOnly Should the form fields be read-only?

View File

@@ -204,6 +204,7 @@ export class LoginComponent implements OnInit {
/**
* Method called on submit form
*
* @param values login form values
*/
onSubmit(values: LoginFormValues): void {
@@ -230,6 +231,7 @@ export class LoginComponent implements OnInit {
/**
* The method check the error in the form and push the error in the formError object
*
* @param data form data
*/
onValueChanged(data: any) {
@@ -282,6 +284,7 @@ export class LoginComponent implements OnInit {
/**
* Check and display the right error message in the UI
*
* @param err error object
*/
private displayErrorMessage(err: any): void {
@@ -298,6 +301,7 @@ export class LoginComponent implements OnInit {
/**
* Add a custom form error for a field
*
* @param field field
* @param msg error message
*/
@@ -307,6 +311,7 @@ export class LoginComponent implements OnInit {
/**
* Add a custom validation rule error for a field
*
* @param field field
* @param ruleId - i.e. required | minlength | maxlength
* @param msg message
@@ -323,6 +328,7 @@ export class LoginComponent implements OnInit {
/**
* Display and hide the password value.
*
* @param event input event
*/
toggleShowPassword(event: Event) {
@@ -332,6 +338,7 @@ export class LoginComponent implements OnInit {
/**
* The method return if a field is valid or not
*
* @param field form field to check
* @returns `true` if form field should display an error, otherwise `false`
*/
@@ -341,6 +348,7 @@ export class LoginComponent implements OnInit {
/**
* Trim username
*
* @param event event
*/
trimUsername(event: any) {

View File

@@ -38,6 +38,7 @@ export class NotificationService {
/**
* Opens a SnackBar notification to show a message.
*
* @param message The message (or resource key) to show.
* @param config Time before notification disappears after being shown or MatSnackBarConfig object
* @param interpolateArgs The interpolation parameters to add for the translation
@@ -53,6 +54,7 @@ export class NotificationService {
/**
* Opens a SnackBar notification with a message and a response button.
*
* @param message The message (or resource key) to show.
* @param action Caption for the response button
* @param config Time before notification disappears after being shown or MatSnackBarConfig object
@@ -70,6 +72,7 @@ export class NotificationService {
/**
* Rase error message
*
* @param message Text message or translation key for the message.
* @param action Action name
* @param interpolateArgs The interpolation parameters to add for the translation
@@ -92,6 +95,7 @@ export class NotificationService {
/**
* Rase info message
*
* @param message Text message or translation key for the message.
* @param action Action name
* @param interpolateArgs The interpolation parameters to add for the translation
@@ -114,6 +118,7 @@ export class NotificationService {
/**
* Rase warning message
*
* @param message Text message or translation key for the message.
* @param action Action name
* @param interpolateArgs The interpolation parameters to add for the translation
@@ -143,6 +148,7 @@ export class NotificationService {
/**
* Push new notification to Notification History
*
* @param notification - Notification model to be pushed.
*/
pushToNotificationHistory(notification: NotificationModel) {

View File

@@ -45,6 +45,7 @@ export class ProgressComponent {
/**
* The value of the progress bar or spinner.
* Changes the mode to `determinate` if a value is provided.
*
* @returns The progress value
*/
get value(): number | undefined {
@@ -64,6 +65,7 @@ export class ProgressComponent {
*
* For progress spinner, the mode can be either `indeterminate` or `determinate`.
* For progress bar, the mode can be either `determinate`, `indeterminate`, `buffer`, or `query`.
*
* @returns The progress mode
*/
get mode(): ProgressMode {

View File

@@ -179,6 +179,7 @@ describe('SearchTextInputComponent', () => {
/**
* Runs a test for ltr/rtl margin values
*
* @param isLtr sets ltr or rtl value to test
*/
function testMarginValue(isLtr: boolean): void {
@@ -199,6 +200,7 @@ describe('SearchTextInputComponent', () => {
/**
* Runs a test for ltr/rtl transform values
*
* @param isLtr sets ltr or rtl value to test
*/
function testTransformValue(isLtr: boolean): void {

View File

@@ -20,6 +20,7 @@ import { StorageService } from '../common/services/storage.service';
/**
* Loads application config file
*
* @param appConfigService configuration service
* @param storageService storage service
* @returns a factory to load application config

View File

@@ -30,6 +30,7 @@ export interface TranslationProvider {
/**
* Generate translation provider
*
* @param id Unique identifier
* @param path Path to translation files
* @returns Provider
@@ -80,6 +81,7 @@ export class TranslationService {
/**
* Adds a new folder of translation source files.
*
* @param name Name for the translation provider
* @param path Path to the folder
*/
@@ -97,6 +99,7 @@ export class TranslationService {
/**
* Loads a translation file.
*
* @param lang Language code for the language to load
* @param fallback Language code to fall back to if the first one was unavailable
*/
@@ -116,6 +119,7 @@ export class TranslationService {
/**
* Triggers a notification callback when the translation language changes.
*
* @param lang The new language code
*/
onTranslationChanged(lang: string): void {
@@ -127,6 +131,7 @@ export class TranslationService {
/**
* Sets the target language for translations.
*
* @param lang Code name for the language
* @returns Translations available for the language
*/
@@ -137,6 +142,7 @@ export class TranslationService {
/**
* Gets the translation for the supplied key.
*
* @param key Key to translate
* @param interpolateParams String(s) to be interpolated into the main message
* @returns Translated text
@@ -147,6 +153,7 @@ export class TranslationService {
/**
* Directly returns the translation for the supplied key.
*
* @param key Key to translate
* @param interpolateParams String(s) to be interpolated into the main message
* @returns Translated text

View File

@@ -344,6 +344,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* Method to scale the page current support implementation
*
* @param scaleMode - new scale mode
*/
scalePage(scaleMode: PdfScaleMode) {
@@ -451,6 +452,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* Update all the pages with the newScale scale
*
* @param newScale - new scale page
*/
setScaleUpdatePages(newScale: number) {
@@ -465,6 +467,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* Check if the request scale of the page is the same for avoid useless re-rendering
*
* @param oldScale - old scale page
* @param newScale - new scale page
* @returns `true` if the scale is the same, otherwise `false`
@@ -475,6 +478,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* Check if is a land scape view
*
* @param width target width
* @param height target height
* @returns `true` if the target is in the landscape mode, otherwise `false`
@@ -503,6 +507,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* zoom in page pdf
*
* @param ticks number of ticks to zoom
*/
zoomIn(ticks?: number): void {
@@ -518,6 +523,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* zoom out page pdf
*
* @param ticks number of ticks to scale
*/
zoomOut(ticks?: number): void {
@@ -557,6 +563,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* load the page in input
*
* @param page to load
*/
inputPage(page: string) {
@@ -573,6 +580,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* Page Change Event
*
* @param event event
*/
onPageChange(event: any) {
@@ -616,6 +624,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* Keyboard Event Listener
*
* @param event KeyboardEvent
*/
@HostListener('document:keydown', ['$event'])

View File

@@ -54,6 +54,7 @@ export class ViewerExtensionDirective implements AfterContentInit {
/**
* Check if the current extension in the viewer is compatible with this extension checking against `supportedExtensions`
*
* @param fileExtension file extension to check
* @returns `true` if file extension is compatible, otherwise `false`
*/

View File

@@ -44,6 +44,7 @@ export class RenderingQueueServices {
/**
* Set the instance of the PDF Viewer
*
* @param pdfViewer viewer instance
*/
setViewer(pdfViewer): void {
@@ -52,6 +53,7 @@ export class RenderingQueueServices {
/**
* Sets the instance of the PDF Thumbnail Viewer
*
* @param pdfThumbnailViewer viewer instance
*/
setThumbnailViewer(pdfThumbnailViewer): void {
@@ -60,6 +62,7 @@ export class RenderingQueueServices {
/**
* Check if the view has highest rendering priority
*
* @param view view to render
* @returns `true` if the view has higher priority, otherwise `false`
*/
@@ -137,6 +140,7 @@ export class RenderingQueueServices {
/**
* Checks if the view rendering is finished
*
* @param view the View instance to check
* @returns `true` if rendering is finished, otherwise `false`
*/
@@ -148,6 +152,7 @@ export class RenderingQueueServices {
* Render a page or thumbnail view. This calls the appropriate function
* based on the views state. If the view is already rendered it will return
* false.
*
* @param view View instance to render
* @returns the rendered state of the view
*/

View File

@@ -40,6 +40,7 @@ export class ViewUtilService {
/**
* Returns a list of the active Viewer content extensions.
*
* @returns list of extension references
*/
get viewerExtensions(): ViewerExtensionRef[] {
@@ -48,6 +49,7 @@ export class ViewUtilService {
/**
* Provides a list of file extensions supported by external plugins.
*
* @returns list of extensions
*/
get externalExtensions(): string[] {
@@ -58,6 +60,7 @@ export class ViewUtilService {
/**
* get File name from url
*
* @param url - url file
* @returns file name portion of the url
*/
@@ -73,6 +76,7 @@ export class ViewUtilService {
* Supports the URL formats like:
* http://localhost/test.jpg?cache=1000
* http://localhost/test.jpg#cache=1000
*
* @param fileName - file name
* @returns file extension
*/