addAlphaToHexColor | ||||||
addAlphaToHexColor(color, opacity)
|
||||||
Parameters :
|
getHue |
getHue(r: number, g: number, b: number)
|
Source ://gist.github.com/mjackson/5311256https |
addPropertySchema | ||||||||||||
addPropertySchema(target, propertyName: string, propertySchema: EntitySchemaField)
|
||||||||||||
Parameters :
|
DatabaseField | ||||||||||
DatabaseField(propertySchema: EntitySchemaField)
|
||||||||||
Decorator (Annotation also see
Parameters :
|
getEntitySchema | ||||
getEntitySchema(ctor)
|
||||
Returns the schema map of this entity (not the superclass). Creates and assigns a new one if it doesn't exist yet.
Parameters :
Returns :
EntitySchema
|
addToGroup | ||||||||
addToGroup(allGroups, currentValue, currentElement)
|
||||||||
Parameters :
|
calculateAge | ||||||
calculateAge(dateOfBirth: Date)
|
||||||
Parameters :
Returns :
number
|
compareEnums | |||||||||
compareEnums(a: ConfigurableEnumValue, b: ConfigurableEnumValue)
|
|||||||||
Parameters :
Returns :
boolean
|
dateToString | ||||||
dateToString(value: Date)
|
||||||
Parameters :
|
equals | ||||||
equals(a, b)
|
||||||
Comparing two values for equality that might be different than just object equality
Parameters :
Returns :
boolean
|
getParentUrl | ||||||
getParentUrl(router: Router)
|
||||||
Parameters :
Returns :
string
|
getUrlWithoutParams | ||||||
getUrlWithoutParams(router: Router)
|
||||||
Parameters :
Returns :
string
|
isValidDate | ||||||
isValidDate(date: any)
|
||||||
Parameters :
Returns :
boolean
|
readFile | ||||||
readFile(file: Blob)
|
||||||
Parameters :
Returns :
Promise<string>
|
serviceProvider | |||||||||
serviceProvider(service, factory)
|
|||||||||
This is a simple shorthand function to create factories for services. The use case is, when multiple services extend the same class and one of these services will be provided.
Parameters :
Returns :
FactoryProvider
|
sortByAttribute | |||||||||
sortByAttribute(attribute, order)
|
|||||||||
Parameters :
Returns :
number
|
addTooltip | ||||||
addTooltip(profile: ExternalProfile)
|
||||||
Parameters :
|
applyTextToCreatedEntity |
applyTextToCreatedEntity(entity: Entity, input: string)
|
Update the given entity by applying the text entered by a user to the most likely appropriate entity field, inferred from the toString representation. |
isMulti | ||||||
isMulti(cmp: EntitySelectComponent)
|
||||||
Parameters :
Returns :
EntitySelectComponent<any | string[]>
|
applyUpdate | ||||||||||||||||||||
applyUpdate(entities, next: UpdatedEntity, addIfMissing: boolean)
|
||||||||||||||||||||
Updates a list of entities given an updated version of the entity. This updated version can either be a new entity (that should be inserted into the list), or an existing entity that should be updated or deleted. The given array will not be mutated but will be returned when the given new entity or type is illegal
Parameters :
Returns :
T[]
An array of the given entities with the update applied |
asArray | ||||
asArray(x)
|
||||
Convert wrap a value in an array if it is not already an array.
Parameters :
Returns :
T[]
|
bootstrap |
bootstrap()
|
buildReadonlyValidator | ||||||
buildReadonlyValidator(entity: Entity)
|
||||||
Validator to ensure a field becomes readonly after it has been saved once.
Parameters :
Returns :
literal type
|
calculateAverageAttendance | ||||||
calculateAverageAttendance(event: Note)
|
||||||
Parameters :
Returns :
AverageAttendanceStats
|
calculateDateRange | ||||||
calculateDateRange(dateRangeOption: DateRangeFilterConfigOption)
|
||||||
Parameters :
Returns :
DateRange<Date>
|
closeOnlySubmenu | |||||||||
closeOnlySubmenu(menu: MatMenuTrigger, event: MouseEvent)
|
|||||||||
Close the mat-menu of the given menu trigger and stop propagation of the event to avoid closing parent menus as well.
Parameters :
|
compareValues | ||||||
compareValues(a, b)
|
||||||
Parameters :
|
getComparableValue | |||||||||
getComparableValue(obj: OBJECT, key: PROPERTY)
|
|||||||||
Parameters :
Returns :
number | string | Symbol
|
tableSort | ||||||||||||||||
tableSort(data, __namedParameters: {direction: "asc" | "desc" | string, active: PROPERTY | string})
|
||||||||||||||||
Custom sort implementation for a MatTableDataSource<TableRow
Parameters :
Returns :
TableRow[]
the sorted table rows |
createEntityOfType |
createEntityOfType(type: string, id: string)
|
"Simulate" a custom entity type that saves all fields without transformations through a mocked EntitySchema. This is a utility function to help demo data creation because the dynamically migrated config is not ready at the time of demo data generation yet. |
createSkillApiDummyData | ||||||
createSkillApiDummyData(externalId: string)
|
||||||
Parameters :
Returns :
ExternalProfile
|
createTestingConfigService | ||||||||
createTestingConfigService(configsObject: any)
|
||||||||
Parameters :
Returns :
ConfigService
|
createTestingConfigurableEnumService |
createTestingConfigurableEnumService()
|
DatabaseEntity | ||||||||
DatabaseEntity(entityType: string)
|
||||||||
Decorator (Annotation also see
Parameters :
|
deleteEmptyProperties | ||||||
deleteEmptyProperties(data: Object)
|
||||||
Delete properties on an object which are "empty", to clean up redundant details.
Parameters :
|
extendArray |
extendArray(array: any, newSize: number)
|
Pad an array with additional empty arrays up to the given new size. |
enhanceSentryBreadcrumb | |||||||||
enhanceSentryBreadcrumb(breadcrumb, hint: SentryBreadcrumbHint)
|
|||||||||
Add more human-readable descriptions to Sentry breadcrumbs for debugging. see https://docs.sentry.io/platforms/javascript/enriching-events/breadcrumbs/
Parameters :
|
entityFilterPredicate |
entityFilterPredicate(data: Entity, filter: string)
|
Returns :
boolean
|
expectObservable | ||||||
expectObservable(observable: Observable)
|
||||||
Parameters :
Returns :
ObservableMatchers<T>
|
extractHumanReadableLabel | ||||
extractHumanReadableLabel(value)
|
||||
Get a human-readable string from the given value as a label.
Parameters :
Returns :
string
|
fieldsIncludingId | ||||||||||||||||
fieldsIncludingId(entity: Entity, refId: string, relevantFields)
|
||||||||||||||||
Return the fields of entity that contain the given refId. If there is no such referenced ID, the array will be empty.
Parameters :
Returns :
FormFieldConfig[]
|
findFieldInFieldGroups | |||||||||
findFieldInFieldGroups(formConfig: PublicFormConfig, id: string)
|
|||||||||
Parameters :
Returns :
FormFieldConfig
|
migratePublicFormConfig | ||||||
migratePublicFormConfig(formConfig: PublicFormConfig)
|
||||||
Parameters :
Returns :
PublicFormConfig
|
generateDefaultNotificationConfig |
generateDefaultNotificationConfig(userId: string, userEntity: string)
|
generateEventWithAttendance | ||||||||||||||||||||
generateEventWithAttendance(participating, date, activity?: RecurringActivity)
|
||||||||||||||||||||
Generate a event with children for the given AttendanceStatus array. This is particularly useful to generate simple data for demo or test purposes.
Parameters :
Returns :
EventNote
|
generateFormFieldStory | ||||||||||||||||||||||||||||||
generateFormFieldStory(editComponent, defaultValue, withTooltip, additionalSchema: object, additionalProviders: [])
|
||||||||||||||||||||||||||||||
Parameters :
Returns :
literal type
|
generateIdFromLabel | ||||||||
generateIdFromLabel(label: string)
|
||||||||
Create a simplified id string from the given text. This generates a camelCase string and replacing special characters with underscores.
Parameters :
Returns :
string | undefined
|
generateLabelFromInterval | ||||||
generateLabelFromInterval(interval: TimeInterval)
|
||||||
Parameters :
|
getConfigsByMode | ||||||
getConfigsByMode(fieldConfigs, mode)
|
||||||
Get the default value configs filtered for the given mode.
Parameters :
Returns :
Map<string, DefaultValueConfig>
|
getGroupingInformationString | ||||
getGroupingInformationString(groupedBy)
|
||||
Parameters :
Returns :
string
|
getValueDescription |
getValueDescription(value: any, property: string)
|
Returns :
string
|
getHueForEntity | |||||||||||||||
getHueForEntity(entity: Entity, offset: number)
|
|||||||||||||||
Translates the color of an entity to the necessary hue-rotate filter
Parameters :
Returns :
string
|
getKmDistance | |||||||||
getKmDistance(x: Coordinates, y: Coordinates)
|
|||||||||
Calculate distance between two points Source ://henry-rossiter.medium.com/calculating-distance-between-geographic-coordinates-with-javascript-5f3097b61898https
Parameters :
|
getLocationProperties | ||||||
getLocationProperties(entity: EntityConstructor)
|
||||||
Get all properties of an entity that represent a geographic location
Parameters :
|
getReadableValue | ||||||||
getReadableValue(value: any)
|
||||||||
An enhanced sortingDataAccessor function that can be set for a MatTableDataSource in order to support sorting by ConfigurableEnum columns and other Entity specific values.
Parameters :
Returns :
any
|
isConfigurableEnum | ||||||
isConfigurableEnum(value: any)
|
||||||
Parameters :
Returns :
ConfigurableEnumValue
|
isGeoLocation | ||||||
isGeoLocation(value: any)
|
||||||
Parameters :
Returns :
GeoLocation
|
transformToReadableFormat | ||||||
transformToReadableFormat(obj: any)
|
||||||
Transform a whole object into a readable format.
This also transforms date objects to
Parameters :
|
getWarningLevelColor | ||||||
getWarningLevelColor(warningLevel: WarningLevel)
|
||||||
Parameters :
|
hasOrdinalValue | ||||||
hasOrdinalValue(value: any)
|
||||||
Parameters :
Returns :
HasOrdinal
|
imposeTotalOrdering | ||||||||
imposeTotalOrdering(values: Array)
|
||||||||
Extends an array of configurable enum values with an ordinal value so that the ordinal value of each enum value matches the position of the element in the array. Note that this should be used 'early' in the pipeline, i.e. when the
Parameters :
Returns :
Array<EnumValue<T>>
|
initEnvironmentConfig |
initEnvironmentConfig()
|
Overwrite environment settings with the settings from the |
initFirebaseConfigToEnvironment |
initFirebaseConfigToEnvironment()
|
Load Push Notifications config for Firebase. Please add assets/firebase-config.json with your own Firebase config |
initLanguage | ||||||||
initLanguage(locale?: string)
|
||||||||
Load translation files and apply them to angular localize system.
Parameters :
Returns :
Promise<void>
|
makeCustomMatcher | ||||||||||||
makeCustomMatcher(condition, compareMessage, negativeCompareMessage)
|
||||||||||||
Create a custom matcher that checks a condition and
displays a message when that condition fails, resp. a message when the
inverse of that condition fails
Parameters :
Returns :
jasmine.CustomMatcher
|
migrateIsoDatesToInferredDateOnly | ||||||
migrateIsoDatesToInferredDateOnly(value: string)
|
||||||
Parameters :
Returns :
string
|
mockEntityMapper | ||||||
mockEntityMapper(withData)
|
||||||
Parameters :
Returns :
MockEntityMapperService
|
normalizeValue | ||||||||
normalizeValue(val: any)
|
||||||||
Normalizes a value for comparison, converting it to a standardized string format. Ensures both numbers and strings are treated consistently.
Parameters :
Returns :
string
The normalized value as a string. |
parseJwt | ||||||
parseJwt(token)
|
||||||
Parses and returns the payload of a JWT into a JSON object. For me info see ://jwt.iohttps.
Parameters :
Returns :
ParsedJWT
|
patternWithMessage | ||||||||||||
patternWithMessage(pattern, message: string)
|
||||||||||||
creates a pattern validator that also carries a predefined message
Parameters :
Returns :
ValidatorFn
|
PerformanceAnalysisLogging |
PerformanceAnalysisLogging(target: Object, propertyKey: string, descriptor: TypedPropertyDescriptor)
|
Extend any class method to measure the duration it takes to finish and log it to the console. |
random |
random(min: number, max: number)
|
retryOnServerError | ||||||
retryOnServerError(maxRetries: number)
|
||||||
Retry a request on server error (status code 5xx).
Use this in Retries are done with exponential backoff delays that are randomized (in case there are many parallel requests to be spread out).
Parameters :
Returns :
MonoTypeOperatorFunction<T>
|
resizeImage | ||||||||||||
resizeImage(file: File, maxSize: number)
|
||||||||||||
Parameters :
Returns :
Promise<HTMLCanvasElement>
|
sortExportOnlyLast | |||||||||
sortExportOnlyLast(a: AdditionalImportAction, b: AdditionalImportAction)
|
|||||||||
Parameters :
|
statsToEntityWithRecentNoteInfo | ||||||||||||
statsToEntityWithRecentNoteInfo(stat, queryRange: number)
|
||||||||||||
Map a result entry from getDaysSinceLastNoteOfEachEntity to the EntityWithRecentNoteInfo interface
Parameters :
Returns :
EntityWithRecentNoteInfo
|
toFormFieldConfig | ||||||
toFormFieldConfig(column: ColumnConfig)
|
||||||
Parameters :
Returns :
FormFieldConfig
|
TranslatableMatPaginator |
TranslatableMatPaginator()
|
uniqueIdValidator | ||||
uniqueIdValidator(existingIds)
|
||||
Parameters :
Returns :
AsyncPromiseValidatorFn
|
waitForChangeTo | ||||||||
waitForChangeTo(state: State)
|
||||||||
Waits until the state of a source observable is equal to the given
state, then emit that state. All other states are discarded.
Parameters :
Returns :
MonoTypeOperatorFunction<State>
|