Index

projects/netgrif-components-core/src/lib/utility/array-to-observable.ts

arrayToObservable
arrayToObservable(observables: Array)
Parameters :
Name Type Optional Description
observables Array No

an array of items

Returns : Observable<T>

an observable that emits each item from the array in order.

projects/netgrif-components-core/src/lib/authentication/authentication.factory.ts

authenticationServiceFactory
authenticationServiceFactory(config: ConfigurationService, http: HttpClient)
Parameters :
Name Type Optional
config ConfigurationService No
http HttpClient No

projects/netgrif-components-core/src/commons/angular-cli-devkit-core-strings.ts

camelize
camelize(str: string)

Returns the lowerCamelCase form of a string.

Example :
camelize('innerHTML');          // 'innerHTML'
camelize('action_name');        // 'actionName'
camelize('css-class-name');     // 'cssClassName'
camelize('my favorite items');  // 'myFavoriteItems'
camelize('My Favorite Items');  // 'myFavoriteItems'
Parameters :
Name Type Optional Description
str string No

The string to camelize.

Returns : string

the camelized string.

capitalize
capitalize(str: string)

Returns the Capitalized form of a string

Example :
'innerHTML'.capitalize()         // 'InnerHTML'
'action_name'.capitalize()       // 'Action_name'
'css-class-name'.capitalize()    // 'Css-class-name'
'my favorite items'.capitalize() // 'My favorite items'
Parameters :
Name Type Optional Description
str string No

The string to capitalize.

Returns : string

The capitalized string.

classify
classify(str: string)

Returns the UpperCamelCase form of a string.

Example :
'innerHTML'.classify();          // 'InnerHTML'
'action_name'.classify();        // 'ActionName'
'css-class-name'.classify();     // 'CssClassName'
'my favorite items'.classify();  // 'MyFavoriteItems'
Parameters :
Name Type Optional Description
str string No

the string to classify

Returns : string

the classified string

dasherize
dasherize(str: string)

Replaces underscores, spaces, or camelCase with dashes.

Example :
dasherize('innerHTML');         // 'inner-html'
dasherize('action_name');       // 'action-name'
dasherize('css-class-name');    // 'css-class-name'
dasherize('my favorite items'); // 'my-favorite-items'
Parameters :
Name Type Optional Description
str string No

The string to dasherize.

Returns : string

the dasherized string.

decamelize
decamelize(str: string)

Converts a camelized string into all lower case separated by underscores.

Example :
decamelize('innerHTML');         // 'inner_html'
decamelize('action_name');       // 'action_name'
decamelize('css-class-name');    // 'css-class-name'
decamelize('my favorite items'); // 'my favorite items'
Parameters :
Name Type Optional Description
str string No

The string to decamelize.

Returns : string

the decamelized string.

levenshtein
levenshtein(a: string, b: string)

Calculate the levenshtein distance of two strings. See https://en.wikipedia.org/wiki/Levenshtein_distance. Based off https://gist.github.com/andrei-m/982927 (for using the faster dynamic programming version).

Parameters :
Name Type Optional Description
a string No

String a.

b string No

String b.

Returns : number

A number that represents the distance between the two strings. The greater the number the more distant the strings are from each others.

underscore
underscore(str: string)

More general than decamelize. Returns the lower_case_and_underscored form of a string.

Example :
'innerHTML'.underscore();          // 'inner_html'
'action_name'.underscore();        // 'action_name'
'css-class-name'.underscore();     // 'css_class_name'
'my favorite items'.underscore();  // 'my_favorite_items'
Parameters :
Name Type Optional Description
str string No

The string to underscore.

Returns : string

the underscored string.

projects/netgrif-components-core/src/lib/pfql/pfql-utils.ts

canBeReducedToSimpleExpr
canBeReducedToSimpleExpr(complexExpr: ComplexExpression)
Parameters :
Name Type Optional
complexExpr ComplexExpression No
Returns : boolean
getDateOperatorFromToken
getDateOperatorFromToken(operatorToken, operatorService: OperatorService)

Converts a lexer token into the corresponding date-specific operator instance. Supports date equality, inequality, and relational operators.

Parameters :
Name Type Optional Description
operatorToken No
  • The token representing the operator, or null
operatorService OperatorService No
  • Service providing operator-related functionality

The corresponding date Operator instance, or undefined if the token is null or unrecognized

getDateTimeOperatorFromToken
getDateTimeOperatorFromToken(operatorToken, operatorService: OperatorService)

Converts a lexer token into the corresponding datetime-specific operator instance. Supports datetime equality, inequality, and relational operators.

Parameters :
Name Type Optional Description
operatorToken No
  • The token representing the operator, or null
operatorService OperatorService No
  • Service providing operator-related functionality

The corresponding datetime Operator instance, or undefined if the token is null or unrecognized

getOperatorFromToken
getOperatorFromToken(operatorToken)

Converts a lexer token into the corresponding operator instance for basic comparisons. Supports equality, inequality, substring, and relational operators.

Parameters :
Name Optional Description
operatorToken No
  • The token representing the operator, or null

The corresponding Operator instance, or undefined if the token is null or unrecognized

isSingleComplexExpr
isSingleComplexExpr(items: Array)
Parameters :
Name Type Optional
items Array No
Returns : boolean
parseQuery
parseQuery(query: string, logger: LoggerService, visitor: PfqlVisitor)

Parses a PFQL query string into an array of query items.

Parameters :
Name Type Optional Description
query string No
  • The PFQL query string to parse
logger LoggerService No
  • logger service to log messages
visitor PfqlVisitor No
  • service to parse a query tree into QueryItems
Returns : Array<QueryItem>

An array of QueryItem objects representing the parsed query structure

reduceComplexToSimpleExpressions
reduceComplexToSimpleExpressions(items: Array)
Parameters :
Name Type Optional
items Array No
Returns : Array<QueryItem>

projects/netgrif-components-core/src/lib/utility/tests/utility/configure-category.ts

configureCategory
configureCategory(category: Category, operatorService: OperatorService, operator: Type, operands: Array)

Configures the provided Category instance with the provided operator and operands.

Parameters :
Name Type Optional Description
category Category No

the object that should be configured

operatorService OperatorService No

must be the same OperatorService instance as the one provided to the category's constructor

operator Type No

the desired operator class, must be one of the available operators for the provided category

operands Array No

the desired operands

Returns : void

projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-case.ts

createMockCase
createMockCase(stringId: string, processIdentifier: string, title: string, petriNetId: string)

Creates a mock Case instance with the given attributes.

The attributes are filled with mostly empty values, if you want to make a test that uses some of them, we recommend setting them yourself, as the returned object might change between versions.

Parameters :
Name Type Optional Default value
stringId string No 'stringId'
processIdentifier string No 'processIdentifier'
title string No 'title'
petriNetId string No 'petriNetId'
Returns : Case

projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-case-outcome.ts

createMockCaseOutcome
createMockCaseOutcome(aCase: Case, net: Net, outcomes: Array)

Creates a mock CaseEventOutcome with given case, net and outcomes attributes.

If attributes are not specified, default values are used.

Parameters :
Name Type Optional Default value
aCase Case No createMockCase()
net Net No createMockNet()
outcomes Array No []

projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-datagroup.ts

createMockDataGroup
createMockDataGroup(fields: Array, title?: string, alignment, layoutType, compact?: DataGroupCompact, hideRows?: DataGroupHideEmptyRows, stretch, cols: number, parentTaskId?: string, parentTaskRefId?: string, nestingLevel?: number)

Creates a mock DataGroup object instance containing the provided fields and having the provided configuration.

Parameters :
Name Type Optional Default value Description
fields Array No

the DataFields contained in the data group

title string Yes

the optional title of the data group

alignment No DataGroupAlignment.START

alignment of the fields in non-full rows within the data group (affects flow and legacy layout)

layoutType No DataGroupLayoutType.LEGACY

the layout type of the data group

compact DataGroupCompact Yes

compacting rule for the data group

hideRows DataGroupHideEmptyRows Yes

row hiding rule for the data group

stretch No false

whether the stretch property of the data group is enabled or not

cols number No 4

the number of columns of the data group layout

parentTaskId string Yes

the ID of the parent task (if the data group is task-reffed)

parentTaskRefId string Yes

the ID of the parent task ref (if the data group is task-reffed)

nestingLevel number Yes

the nesting level of the data group (if the data group is task-reffed)

Returns : DataGroup

projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-field.ts

createMockField
createMockField(visible, layout: GridLayout, counterOrStringId, fieldType, taskRefValue: Array)

Creates a mock boolean or button field, with the specified properties

Parameters :
Name Type Optional Default value Description
visible No true

if true the fields behavior is set to editable, if false the fields behavior is set to hidden

layout GridLayout No {x: 0, y: 0, rows: 0, cols: 0}

position of the field in the grid layout

counterOrStringId No 0

if a string is provided its value will be used as the fields ID. If a number is provided the fields ID will be set to 'f'. If an IncrementingCounter is provided the ID will follow the same pattern as for the number argument, but the counter will be used to generate the number.

fieldType No FieldTypeResource.BOOLEAN

determines what type of field should be generated. Currently only boolean, button and task ref fields are supported. If an unsupported field type is used an error is thrown.

taskRefValue Array No []

determines the value of the task ref field if a task ref field is generated

projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-get-data-outcome.ts

createMockGetDataOutcome
createMockGetDataOutcome(data: Array, task: Task, net: Net, aCase: Case, outcomes: Array)
Parameters :
Name Type Optional Default value
data Array No [createMockField()]
task Task No createMockTask()
net Net No createMockNet()
aCase Case No createMockCase()
outcomes Array No []

projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-immediate-data.ts

createMockImmediateData
createMockImmediateData(importId: string, value: any, allowedNets?: Array)

Creates a mock ImmediateData instance with the given attributes.

The attributes are filled with mostly empty values, if you want to make a test that uses some of them, we recommend setting them yourself, as the returned object might change between versions.

Parameters :
Name Type Optional Default value
importId string No 'importId'
value any No ''
allowedNets Array Yes
Returns : ImmediateData

projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-net.ts

createMockNet
createMockNet(stringId: string, identifier: string, title: string, roles: Array, transitions: Array, immediateData: Array, permissions: Permissions)

Creates a mock Net instance with the given attributes.

The attributes are filled with mostly empty values, if you want to make a test that uses some of them, we recommend setting them yourself, as the returned object might change between versions.

Parameters :
Name Type Optional Default value
stringId string No 'stringId'
identifier string No 'identifier'
title string No 'title'
roles Array No []
transitions Array No []
immediateData Array No []
permissions Permissions No {}
Returns : Net

projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-page.ts

createMockPage
createMockPage(content: Array)
Parameters :
Name Type Optional Default value Description
content Array No []

the contents of the page

Returns : Page<T>

a mock Page object with the size equivalent to the number of elements provided in the attribute. If the content is empty the content attribute of the returned object is set to an empty object to mimic backend behavior.

projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-petri-net-outcome.ts

createMockPetriNetOutcome
createMockPetriNetOutcome(net: Net, outcomes: Array)

Creates a mock PetriNetEventOutcome with given net and outcomes attributes.

If attributes are not specified, default values are used.

Parameters :
Name Type Optional Default value
net Net No createMockNet()
outcomes Array No []

projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-set-data-outcome.ts

createMockSetDataOutcome
createMockSetDataOutcome(changedFields: ChangedFieldContainer, task: Task, net: Net, aCase: Case, outcomes: Array)

Creates a mock TaskEventOutcome with given changedFields, task, net, case and outcomes attributes.

If attributes are not specified, default values are used.

Parameters :
Name Type Optional Default value
changedFields ChangedFieldContainer No { changedFields: {}}
task Task No createMockTask()
net Net No createMockNet()
aCase Case No createMockCase()
outcomes Array No []

projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-task.ts

createMockTask
createMockTask(stringId: string, title: string, transitionId: string, cols: number)

Creates a mock Task instance with the given attributes.

The attributes are filled with mostly empty values, if you want to make a test that uses some of them, we recommend setting them yourself, as the returned object might change between versions.

Parameters :
Name Type Optional Default value
stringId string No 'stringId'
title string No 'taskTitle'
transitionId string No 'transitionId'
cols number No 4
Returns : Task

projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-task-outcome.ts

createMockTaskOutcome
createMockTaskOutcome(task: Task, net: Net, aCase: Case, outcomes: Array)

Creates a mock TaskEventOutcome with given task, net, case and outcomes attributes.

If attributes are not specified, default values are used.

Parameters :
Name Type Optional Default value
task Task No createMockTask()
net Net No createMockNet()
aCase Case No createMockCase()
outcomes Array No []

projects/netgrif-components-core/src/lib/utility/pagination/pagination-sort.ts

createSortParam
createSortParam(attribute: string, direction: PaginationSort)

Creates the configuration string for use with the PAGE_SORT configuration attribute

Parameters :
Name Type Optional Description
attribute string No

the name of the attribute that should be used for sorting the results

direction PaginationSort No

the sorting direction

Returns : string

projects/netgrif-components-core/src/lib/task-content/model/task-event-notification.ts

createTaskEventNotification
createTaskEventNotification(task: Task, event: TaskEvent, success: boolean, outcome?: TaskEventOutcome)
Parameters :
Name Type Optional Description
task Task No

affected Task object

event TaskEvent No

the reported Task event

success boolean No

success state of the reported event

outcome TaskEventOutcome Yes

TaskEventOutcome

the notification informing about the event

projects/netgrif-components-core/src/lib/utility/base64.ts

decodeBase64
decodeBase64(encoded: string)
Parameters :
Name Type Optional
encoded string No
Returns : string
encodeBase64
encodeBase64(text: string)
Parameters :
Name Type Optional
text string No
Returns : string

projects/netgrif-components-core/src/lib/search/category-factory/default-categories-factories.ts

defaultCaseSearchCategoriesFactory
[object Object],[object Object],[object Object]
defaultCaseSearchCategoriesFactory(factory: CategoryFactory)

Creates the default case search categories.

Depends on CategoryFactory.

The created categories cannot be used to generate any predicates, as their inner state is preemptively destroyed to avoid memory leaks caused by uncompleted Subjects. They should only be used to create new Category instances with the help of the duplicate() method.

Parameters :
Name Type Optional
factory CategoryFactory No

an Array containing the default case search categories: {@link CaseDataset}, {@link CaseTitle}, {@link CaseCreationDate}, {@link CaseProcess}, {@link CaseAuthor}, {@link CaseStringId} and {@link CasePlainQuery}

defaultTaskSearchCategoriesFactory
[object Object],[object Object],[object Object]
defaultTaskSearchCategoriesFactory(factory: CategoryFactory)

Creates the default task search categories.

Depends on CategoryFactory.

The created categories cannot be used to generate any predicates, as their inner state is preemptively destroyed to avoid memory leaks caused by uncompleted Subjects. They should only be used to create new Category instances with the help of the duplicate() method.

Parameters :
Name Type Optional
factory CategoryFactory No

an Array containing the default task search categories: {@link TaskAssignee}, {@link TaskTask}, {@link TaskProcess} and {@link TaskPlainQuery}

projects/netgrif-components-core/src/lib/utility/destroy-subscription.ts

destroySubscription
destroySubscription(sub: Subscription)

Unsubscribes the provided subscription, if it exists and is still opened

Parameters :
Name Type Optional Description
sub Subscription No

the subscription that should be destroyed

Returns : void

projects/netgrif-components-core/src/lib/navigation/utility/navigation-item-task-utility-methods.ts

extractFieldValueFromData
extractFieldValueFromData(dataSection: Array, fieldId: string)

Extracts field value from data

Parameters :
Name Type Optional
dataSection Array No
fieldId string No
Returns : T

value of extracted field

extractFilterFieldFromData
extractFilterFieldFromData(dataSection: Array, filterFieldId: string)

Extracts the filter field from the navigation item task data.

Parameters :
Name Type Optional Description
dataSection Array No

an array containing the data groups that correspond to a single navigation entry

filterFieldId string No

id of filter field

Returns : FilterField | undefined

The extracted {@link FilterField} or undefined if it could not be extracted.

extractFilterFromFilterField
extractFilterFromFilterField(filterField: FilterField, filterType: FilterType)
Parameters :
Name Type Optional
filterField FilterField No
filterType FilterType No
Returns : Filter

a {@link SimpleFilter} containing the filter stored in the provided {@link FilterField}. Throws an error if this is not possible.

extractIconAndTitle
extractIconAndTitle(dataSection: Array, translateService: TranslateService)

Extracts the item name and item icon (if any) rom a section of the navigation item task data.

Parameters :
Name Type Optional Description
dataSection Array No

an array containing the data groups that correspond to a single navigation entry

translateService TranslateService No

is a service to translate label name

extractRoles
extractRoles(dataSection: Array, roleFieldId: string)

Based on provided parameter extracts allowed or banned roles into an Array of strings from a section of the navigation item task data. Each item has format ROLE_IMPORT_ID:NET_IMPORT_ID

Parameters :
Name Type Optional Description
dataSection Array No

an array containing the data groups that correspond to a single navigation entry

roleFieldId string No

ID of field containing banned or allowed role IDs

Returns : Array<string>

an Array of string values representing role IDs

extractSearchTypeFromData
extractSearchTypeFromData(dataSection: Array, typeFieldId: string)

Extracts the selected search type from enumeration field of the navigation item task data.

Parameters :
Name Type Optional
dataSection Array No
typeFieldId string No
Returns : SearchMode

a {@link SearchMode} containing {@link SearchMode.ADVANCED} or {@link SearchMode.FULLTEXT} or {@link undefined}if unexpected value is found

hasView
hasView(dataSection: Array)

Checks if the data groups contain view

Parameters :
Name Type Optional
dataSection Array No
Returns : boolean

true if the data contains filter

projects/netgrif-components-core/src/lib/header/models/meta-fields-factory.ts

getCaseMetaHeaders
getCaseMetaHeaders()

Returns meta-headers for case view

Returns : HeaderColumn[]
getTaskMetaHeaders
getTaskMetaHeaders()

Returns meta-headers for task view

Returns : HeaderColumn[]
getWorkflowMetaHeaders
getWorkflowMetaHeaders()

Returns meta-headers for workflow view

Returns : HeaderColumn[]

projects/netgrif-components-core/src/lib/utility/get-field.ts

getField
getField(fields: Array, fieldId: string)
Parameters :
Name Type Optional Description
fields Array No

a collection of data fields

fieldId string No

the id of the desired field

a reference to the datafield with the specified id or undefined if such datafield could not be found

getFieldFromDataGroups
getFieldFromDataGroups(groups: Array, fieldId: string)
Parameters :
Name Type Optional Description
groups Array No

a list of searched data groups

fieldId string No

the id of the desired field

a reference to the first occurrence of the datafield with the specified id or undefined if such datafield could not be found

getFieldIndex
getFieldIndex(fields: Array, fieldId: string)
Parameters :
Name Type Optional Description
fields Array No

a collection of data fields

fieldId string No

the id of the desired field

Returns : number

the index of the datafield with the specified id or -1 if such datafield could not be found

getFieldIndexFromDataGroups
getFieldIndexFromDataGroups(groups: Array, fieldId: string)
Parameters :
Name Type Optional Description
groups Array No

a list of searched data groups

fieldId string No

the id of the desired field

Returns : DataGroupFieldIndex | undefined

an object containing the index of the data group and the field within it corresponding to the first occurrence of a datafield with the specified id or undefined if such datafield could not be found

projects/netgrif-components-core/src/lib/utility/get-immediate-data.ts

getImmediateData
getImmediateData(useCase: Case, fieldId: string)
Parameters :
Name Type Optional Description
useCase Case No

the Case object who's immediate data we want to get

fieldId string No

the identifier of the field we want to get

Returns : ImmediateData | undefined

the immediate data field if it exists on the case, undefined otherwise

projects/netgrif-components-core/src/lib/authentication/store/authentication.state.ts

getInitial
getInitial()
Returns : AuthState

projects/netgrif-components-core/src/lib/navigation/group-navigation-component-resolver/group-navigation-view-id-segment-factory.ts

groupNavigationViewIdSegmentFactory
groupNavigationViewIdSegmentFactory(activatedRoute: ActivatedRoute)
Parameters :
Name Type Optional
activatedRoute ActivatedRoute No
Returns : string

projects/netgrif-components-core/src/lib/utility/pagination/page-has-content.ts

hasContent
hasContent(page)
Parameters :
Name Optional Description
page No

a Page of objects returned by backend

Returns : boolean

returns true if the page is defined and has content with non-zero length. Returns false otherwise.

projects/netgrif-components-core/src/lib/translate/translate-lib.module.ts

HttpLoaderFactory
HttpLoaderFactory(http: HttpClient)
Parameters :
Name Type Optional
http HttpClient No

projects/netgrif-components-core/src/lib/utility/pagination/load-all-pages.ts

loadAllPages
loadAllPages(source, filter: any, pagination?: Pagination)

Loads all pages from the given endpoint and returns their content as one array

Parameters :
Name Type Optional Description
source No

the method that is used to load an individual page, it must support pagination parameters

filter any No

the filter/query object that is used to specify the requested objects. The source argument must accept this filter.

pagination Pagination Yes

configuration of the initial pagination. Pages will be loaded from the provided page number onwards, page size will be upheld.

Returns : Observable<Array<T>>

content of all pages from the given page onwards (or from the start if no pagination argument was provided) as a single Array

mapToContent
mapToContent(source, filter: any, pagination: Pagination)
Parameters :
Name Type Optional
source No
filter any No
pagination Pagination No
Returns : Observable<Array<T>>
paginationParams
paginationParams(basePagination: Pagination, pageNumber?: number)
Parameters :
Name Type Optional
basePagination Pagination No
pageNumber number Yes
Returns : HttpParams

projects/netgrif-components-core/src/lib/utility/tests/mocks/mock-user-autocomplete-value.ts

mockUserAutocompleteValue
mockUserAutocompleteValue(userName: string, normalUser, userId?: string)
Parameters :
Name Type Optional Default value Description
userName string No

name of the mock user value

normalUser No true

if not the user is the special ME user option

userId string Yes

id of the mock user value

Returns : SearchAutocompleteOption<Array<string>>

projects/netgrif-components-core/src/lib/utility/navigation-item-default-headers-factory.ts

navigationItemCaseViewDefaultHeadersFactory
navigationItemCaseViewDefaultHeadersFactory(navigationItemTaskData)
Parameters :
Name Optional
navigationItemTaskData No
Returns : Array | undefined
navigationItemDefaultHeadersFactory
navigationItemDefaultHeadersFactory(navigationItemTaskData, useFieldId: string, defaultHeadersFieldId: string)
Parameters :
Name Type Optional
navigationItemTaskData No
useFieldId string No
defaultHeadersFieldId string No
Returns : Array | undefined
navigationItemTaskViewDefaultHeadersFactory
navigationItemTaskViewDefaultHeadersFactory(navigationItemTaskData)
Parameters :
Name Optional
navigationItemTaskData No
Returns : Array | undefined

projects/netgrif-components-core/src/lib/utility/navigation-item-new-case-configuration-factory.ts

navigationItemNewCaseConfigurationFactory
navigationItemNewCaseConfigurationFactory(navigationItemTaskData)
Parameters :
Name Optional
navigationItemTaskData No

projects/netgrif-components-core/src/lib/allowed-nets/services/factory/allowed-nets-service-factory.ts

navigationItemTaskAllowedNetsServiceFactory
navigationItemTaskAllowedNetsServiceFactory(factory: AllowedNetsServiceFactory, baseAllowedNets: BaseAllowedNetsService, isCaseConstants: boolean, navigationItemTaskData?: Array)

Convenience method that can be used as an allowed nets factory for views that are loaded from filter process instances. It has a dependency on this class and NAE_NAVIGATION_ITEM_TASK_DATA injection token.

Parameters :
Name Type Optional
factory AllowedNetsServiceFactory No
baseAllowedNets BaseAllowedNetsService No
isCaseConstants boolean No
navigationItemTaskData Array Yes
Returns : AllowedNetsService
tabbedAllowedNetsServiceFactory
tabbedAllowedNetsServiceFactory(factory: AllowedNetsServiceFactory, tabData: InjectedTabbedTaskViewData, navigationItemTaskData?: Array)

Convenience method that can be used as an allowed nets factory for tabbed task views. If no allowed nets are provided in the injected data then an AllowedNetsService with no allowed nets is created. It has a dependency on this class, NAE_TAB_DATA and NAE_NAVIGATION_ITEM_TASK_DATA injection tokens.

Parameters :
Name Type Optional
factory AllowedNetsServiceFactory No
tabData InjectedTabbedTaskViewData No
navigationItemTaskData Array Yes
Returns : AllowedNetsService

projects/netgrif-components-core/src/lib/utility/navigation-item-task-filter-factory.ts

navigationItemTaskFilterFactory
navigationItemTaskFilterFactory(extractionService: FilterExtractionService, filterFieldId?: string, activatedRoute?: ActivatedRoute, navigationItemTaskData?: Array, filterData?: Filter, filterType?: FilterType)

Converts an NAE_NAVIGATION_ITEM_TASK_DATA injection token into NAE_BASE_FILTER

Parameters :
Name Type Optional Description
extractionService FilterExtractionService No
filterFieldId string Yes

id of the filter field

activatedRoute ActivatedRoute Yes
navigationItemTaskData Array Yes

a navigation item task containing the aggregated data representing a navigation item

filterData Filter Yes

filter to be merged with

filterType FilterType Yes
Returns : BaseFilter

projects/netgrif-components-core/src/lib/utility/of-void.ts

ofVoid
ofVoid()

This function is meant to work as a call to rxjs's of function without any arguments

Returns : Observable<void>

a void Observable, that calls next once and then completes

projects/netgrif-components-core/src/lib/forms/models/password.validator.ts

passwordValidator
passwordValidator(control: AbstractControl)

Validator to check that passwords are the same

Parameters :
Name Type Optional
control AbstractControl No
Returns : literal type | null

projects/netgrif-components-core/src/lib/utility/process-message-response.ts

processMessageResponse
processMessageResponse(message: MessageResource)

Transforms a MessageResource object into a stream containing either the message or an error if the message resource contains an error.

Can be used with rxjs' switchMap process responses from backend.

Parameters :
Name Type Optional Description
message MessageResource No

a MessageResource object

Returns : Observable<MessageResource>

projects/netgrif-components-core/src/lib/utility/refresh-tree.ts

refreshTree
refreshTree(tree: MatTreeNestedDataSource)

Forces a re-render of the tree backed by the datasource

Parameters :
Name Type Optional
tree MatTreeNestedDataSource No

projects/netgrif-components-core/src/lib/utility/stop-propagation.ts

stopPropagation
stopPropagation($event)
Parameters :
Name Optional
$event No

projects/netgrif-components-core/src/lib/view/task-view/models/task-view-configuration-injection-token.ts

tabbedTaskViewConfigurationFactory
tabbedTaskViewConfigurationFactory(injectedTabData: InjectedTabbedTaskViewData)

Convenience method that can be used as a task view configuration object factory for tabbed task views.

If the injected tab data contain information that is included in the TaskViewConfiguration interface, this factory will forward this information into the provided object.

Parameters :
Name Type Optional
injectedTabData InjectedTabbedTaskViewData No

projects/netgrif-components-core/src/lib/resources/types/nae-date-type.ts

toMoment
toMoment(date: NaeDate)
Parameters :
Name Type Optional
date NaeDate No
Returns : Moment

results matching ""

    No results matching ""