Index

libs/core/src/lib/form-support/plugins-validation.ts

__pluginValidators
Type : PluginValidatorUnion[]

libs/core/validation-errors/src/internal-validator-messages.ts

$localize
Type : LocalizeFn
INTERNAL_VALIDATOR_MESSAGES
Type : InternalValidatorMessage[]
Default value : [ { validatorId: ValidatorId.nxDatefieldParse, validatorName: 'nxDatefieldParse', errorMessage: $localize`:@@validation.error.nxDatefieldParse:This field has an invalid format!`, ignoreValidators: ['required'] }, { validatorId: ValidatorId.nxDatefieldParseYears, validatorName: 'nxDatefieldParse', errorMessage: $localize`:@@validation.error.nxDatefieldParse.years:Please use the format YYYY using only numbers.`, ignoreValidators: ['required'] } ]

NDBX datefield adds a validation error nxDatefieldParse when it cannot parse the given input. We need a way to show such errors those are added to the form-control by third party libraries. When such errors are shown, we need an option to ignore other validator errors as well.

Eg. when nxDatefieldParse error is shown, hide required error.

We can use INTERNAL_VALIDATOR_MESSAGES to configure such errors.

libs/core/src/lib/form-support/base-validation.ts

$localize
Type : LocalizeFn
BASE_VALIDATIONS
Type : ValidationDefinitions
Default value : { ...STATIC_VALIDATIONS, ...DYNAMIC_VALIDATIONS }
DYNAMIC_VALIDATIONS
Type : ValidationDefinitions
Default value : { DYNAMIC_MIN: (item: ValidationConfigItem) => { const minValue = item.min as Observable<number>; const errorMessage = item.errorMessage || minValue.pipe( map((value) => TRANSLATIONS.min(value)), // this delay(0) avoids an ExpressionChangedAfterItHasBeenCheckedError // like a `setTimeout(..., 0)` would in a non-rxjs context delay(0) ); const validator = (control: AbstractControl): Observable<ValidationErrors | null> => { return minValue.pipe( // take(1) is required here since the Angular asyncValidator only works with a complete observable. take(1), map((min) => Validators.min(min)(control)) ); }; return { min: minValue, validator: validator, async: true, validatorName: 'min', errorMessage: errorMessage }; }, DYNAMIC_MAX: (item: ValidationConfigItem) => { const maxValue = item.max as Observable<number>; const errorMessage = item.errorMessage || maxValue.pipe( map((value) => TRANSLATIONS.max(value)), // this delay(0) avoids an ExpressionChangedAfterItHasBeenCheckedError // like a `setTimeout(..., 0)` would in a non-rxjs context delay(0) ); const validator = (control: AbstractControl): Observable<ValidationErrors | null> => { return maxValue.pipe( // take(1) is required here since the Angular asyncValidator only works with a complete observable. take(1), map((max) => Validators.max(max)(control)) ); }; return { max: maxValue, validator: validator, async: true, validatorName: 'max', errorMessage: errorMessage }; } }
STATIC_VALIDATIONS
Type : ValidationDefinitions
Default value : { REQUIRED: (item: ValidationConfigItem) => { return { validator: Validators.required, validatorName: 'required', errorMessage: item.errorMessage || TRANSLATIONS.required }; }, REQUIRED_TRUE: (item: ValidationConfigItem) => { return { validator: Validators.requiredTrue, validatorName: 'required', errorMessage: item.errorMessage || TRANSLATIONS.requiredTrue }; }, MIN: (item: ValidationConfigItem) => { const minValue = item.min as number; return { min: minValue, validator: Validators.min(minValue), validatorName: 'min', errorMessage: item.errorMessage || TRANSLATIONS.min(minValue) }; }, MAX: (item: ValidationConfigItem) => { const maxValue = item.max as number; return { max: maxValue, validator: Validators.max(maxValue), validatorName: 'max', errorMessage: item.errorMessage || TRANSLATIONS.max(maxValue) }; }, MIN_LENGTH: (item: ValidationConfigItem) => { const minLength = item.minLength as number; return { minLength, validator: Validators.minLength(minLength), validatorName: 'minlength', errorMessage: item.errorMessage || TRANSLATIONS.minLength(minLength) }; }, MAX_LENGTH: (item: ValidationConfigItem) => { const maxLength = item.maxLength as number; return { maxLength, validator: Validators.maxLength(maxLength), validatorName: 'maxlength', errorMessage: item.errorMessage || TRANSLATIONS.maxLength(maxLength) }; }, MIN_DATE: (item: ValidationConfigItem) => { const itemMinDate = item.minDate as string; let minDate: string; if (isNaturalDateString(itemMinDate)) { minDate = parseNaturalDateString(itemMinDate) as string; } else if (isIsoDateString(itemMinDate)) { minDate = itemMinDate; } else { throw createDateStringFormatError(item, 'minDate'); } return { minDate, validator({ value }: AbstractControl) { if (!value) { return null; } const date = dayjs(value); if (date.isBefore(minDate)) { return { mindate: { actual: date.format('YYYY-MM-DD'), minDate: minDate } }; } return null; }, validatorName: 'mindate', errorMessage: item.errorMessage || TRANSLATIONS.minDate }; }, MAX_DATE: (item: ValidationConfigItem) => { const itemMaxDate = item.maxDate as string; let maxDate: string; if (isNaturalDateString(itemMaxDate)) { maxDate = parseNaturalDateString(itemMaxDate) as string; } else if (isIsoDateString(itemMaxDate)) { maxDate = itemMaxDate; } else { throw createDateStringFormatError(item, 'maxDate'); } return { maxDate, validator({ value }: AbstractControl) { if (!value) { return null; } const date = dayjs(value); if (date.isAfter(maxDate)) { return { maxdate: { actual: date.format('YYYY-MM-DD'), maxDate: maxDate } }; } return null; }, validatorName: 'maxdate', errorMessage: item.errorMessage || TRANSLATIONS.maxDate }; }, EMAIL: (item: ValidationConfigItem) => { const topLevelDomainValidator = (control: AbstractControl) => { if (!control.value || !control.value.includes('@')) { return null; } const emailParts = (control.value as string).split('@'); const domainPart = emailParts[emailParts.length - 1]; if (domainPart.includes('.')) { return null; } return { email: true }; }; // Validators.compose() possibly returns null, but only if we provide an // empty array. In this case we definitely know that the array is not // empty so we can safely disable the no-non-null-assertion rule // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const resultingValidator = Validators.compose([Validators.email, topLevelDomainValidator])!; return { validator: resultingValidator, validatorName: 'email', errorMessage: item.errorMessage || TRANSLATIONS.email }; }, PATTERN: (item: ValidationConfigItem) => { return { pattern: item.pattern, validator: Validators.pattern(item.pattern as string), validatorName: 'pattern', errorMessage: item.errorMessage || TRANSLATIONS.pattern }; } }
TRANSLATIONS
Type : object
Default value : { required: $localize`:@@validation.error.required:This field is required!`, requiredTrue: $localize`:@@validation.error.requiredtrue:This field is required to be true!`, min: (min: number) => // TODO: fix typo $localize`:@@validaton.error.min: This field needs to have a minimum value of ${min}:min:.`, max: (max: number) => // TODO: fix typo $localize`:@@validaton.error.max: This field needs to have a maximum value of ${max}:max:.`, minLength: (minLength: number) => $localize`:@@validation.error.minlength:This field can only have a min length of ${minLength}:minlength: characters.`, maxLength: (maxLength: number) => $localize`:@@validation.error.maxlength:This field can only have a max length of ${maxLength}:maxlength: characters.`, minDate: $localize`:@@validation.error.mindate:This field requires a more recent date`, maxDate: $localize`:@@validation.error.maxdate:This field requires a older date`, email: $localize`:@@validation.error.email:This field requires a valid email`, pattern: $localize`:@@validation.error.pattern:This field has invalid format.` }

libs/common/ui/src/wip-banner/wip-banner.component.ts

$localize
Type : LocalizeFn

libs/common/frame/src/frame-parts/actions/actions.component.ts

$localize
Type : LocalizeFn

libs/common/frame/src/frame-parts/navigation/navigation.component.ts

$localize
Type : LocalizeFn

libs/common/frame/src/frame-parts/spinner/spinner.component.ts

$localize
Type : LocalizeFn

libs/nx/src/generators/journey-src/lib/add-acl-defaults-to-policy/create-updated-policy.ts

ACL_DEFAULTS_HEADER
Default value : `# ACL DEFAULTS - AUTO GENERATED BY TALY GENERATOR # DO NOT EDIT MANUALLY`

libs/acl/angular/src/lib/tokens/acl-policy-content-token.ts

ACL_POLICY_CONTENT_TOKEN
Default value : new InjectionToken('ACL Policy for Building Blocks')

libs/acl/angular/src/lib/services/missing-policy-warning.ts

ACL_RUNTIME_WARNING
Default value : `Could not find any ACL policy. Make sure to inject one via the 'ACL_POLICY_CONTENT' InjectionToken. To learn more have a look at the ACL documentation: https://taly.frameworks.allianz.io/additional-documentation/acl.html `
ACL_TEST_MOCK_MESSAGE
Default value : `You are running a test where the ACL Service is involved. Consider using the AclTestingModule: import { AclTestingModule } from '@allianz/taly-acl/testing'; // ... // in your test's imports section imports: [..., AclTestingModule, ...] //... AclTestingModule.setHidden('path/to/my/resource', true); AclTestingModule.setDisabled('path/to/other/resource', false); `
jest

libs/acl/angular/src/lib/tokens/acl-store-adapter-token.ts

ACL_STORE_ADAPTER_TOKEN
Type : InjectionToken<ExpressionStoreAdapter>
Default value : new InjectionToken<ExpressionStoreAdapter>( 'ACL_STORE_ADAPTER_TOKEN - Token to provide ExpressionStoreAdapter' )

libs/acl/angular/src/lib/tokens/acl-tag-name-async-token.ts

ACL_TAG_NAME_ASYNC_TOKEN
Default value : new InjectionToken<BehaviorSubject<string>>( 'async acl tag name behaviour subject' )

libs/acl/angular/src/lib/tokens/acl-tag-token.ts

ACL_TAG_TOKEN
Default value : new InjectionToken<AclTag>('acl tag injection token')

libs/acl/angular/src/lib/tokens/acl-tag-transient.ts

ACL_TAG_TRANSIENT
Default value : new InjectionToken<BehaviorSubject<string>>( 'acl transient behaviour subject' )

libs/acl/testing/src/acl-testing.module.ts

aclMock
Default value : createAclMock()

libs/acl/src/lib/acl-engine/types.ts

aclResetStates
Default value : ['visible', 'editable'] as const
aclResourceStates
Default value : ['hidden', 'readonly', 'disabled'] as const
aclRuleStates
Default value : [...aclResetStates, ...aclResourceStates] as const

libs/nx/src/generators/building-block/lib/add-bb-dependencies-to-library/add-bb-dependencies-to-library.ts

addBbDependenciesToLibrary
Type : Generator<AddBbDependenciesToLibraryOptions>
Default value : async ( tree: Tree, options: AddBbDependenciesToLibraryOptions ) => { const packageJsonPath = joinPathFragments(options.projectRoot, 'package.json'); const packageJson = readJson(tree, packageJsonPath); packageJson.peerDependencies = { ...packageJson.peerDependencies, ...buildingBlockDeps.peerDependencies }; writeJson(tree, packageJsonPath, packageJson); }

libs/nx/src/generators/library/updaters/add-library-dependencies/add-library-dependencies.ts

addBbDependenciesToLibrary
Type : Generator<AddBbDependenciesToLibraryOptions>
Default value : async ( tree: Tree, options: AddBbDependenciesToLibraryOptions ) => { const packageJsonPath = joinPathFragments(options.projectRoot, 'package.json'); const packageJson = readJson(tree, packageJsonPath); packageJson.peerDependencies = { ...packageJson.peerDependencies, ...libraryDeps.peerDependencies }; packageJson.dependencies = { ...packageJson.dependencies, ...libraryDeps.dependencies }; writeJson(tree, packageJsonPath, packageJson); }

libs/sdk/src/node/journey/generate/utils/constants.ts

appsFolder
Type : string
Default value : 'apps'
configFolder
Type : string
Default value : 'config'
isLocalPath
Default value : (path: string) => !path.startsWith('~')

libs/sdk/src/lib/journey/config/migrations/shared/jsonc-comments.ts

assign_non_prop_comments
Default value : (target: unknown, source: any) => { NON_PROP_SYMBOL_KEYS.forEach((key) => { const comments = source[key]; if (comments) { define(target, key, comments); } }); }
COLON
Type : string
Default value : ':'
copy_comments
Default value : ( target: unknown, source: any, target_key: string, source_key: string, remove_source: boolean ) => { SYMBOL_PREFIXES.forEach((prefix) => { copy_comments_by_kind(target, source, target_key, source_key, prefix, remove_source); }); }
copy_comments_by_kind
Default value : ( target: unknown, source: any, target_key: string, source_key: string, prefix: unknown, remove_source: boolean ) => { const source_prop = symbol(prefix, source_key); if (!Object.prototype.hasOwnProperty.call(source, source_prop)) { return; } const target_prop = target_key === source_key ? source_prop : symbol(prefix, target_key); define(target, target_prop, source[source_prop]); if (remove_source) { delete source[source_prop]; } }
define
Default value : (target: unknown, key: PropertyKey, value: any) => Object.defineProperty(target, key, { value, writable: true, configurable: true })
NON_PROP_SYMBOL_KEYS
Default value : [PREFIX_BEFORE, PREFIX_BEFORE_ALL, PREFIX_AFTER_ALL].map(Symbol.for)
PREFIX_AFTER
Type : string
Default value : 'after'
PREFIX_AFTER_ALL
Type : string
Default value : 'after-all'
PREFIX_AFTER_COLON
Type : string
Default value : 'after-colon'
PREFIX_AFTER_PROP
Type : string
Default value : 'after-prop'
PREFIX_AFTER_VALUE
Type : string
Default value : 'after-value'
PREFIX_BEFORE
Type : string
Default value : 'before'

The following code is taken from the comment-json package:

PREFIX_BEFORE_ALL
Type : string
Default value : 'before-all'
symbol
Default value : (prefix: unknown, key: string) => Symbol.for(prefix + COLON + key)
SYMBOL_PREFIXES
Type : []
Default value : [ PREFIX_BEFORE, PREFIX_AFTER_PROP, PREFIX_AFTER_COLON, PREFIX_AFTER_VALUE, PREFIX_AFTER ]

libs/acl/form-support/src/lib/binding/auto-form-binding.ts

autoFormBindingFactory
Default value : ({ overrides = [], excludes = [] }: AutoFormBindingFactoryParams = {}) => (acl: AclEvaluationInterface, form: FormGroup): FormBindingReturnValue => { if (!form) { throw new Error( 'Trying to ACL-bind a malformed form. The given form is probably null or undefined.' ); } const verbose = false; const aclControlList = createControlListFromForm(form, verbose, excludes); const aclControlListOverrides = createControlListFromMap(form, overrides); const mergedList = mergeControlList(aclControlList, aclControlListOverrides); const stream$ = bindControlList(mergedList, acl, form); const clearFn = clearAclReadOnlyValues(aclControlList, acl); const patchFn = getAclPatchObject(aclControlList, form, acl); return { stream$, clearAclReadOnlyValues: clearFn, getPatchObject: patchFn } as FormBindingReturnValue; }

libs/core/src/lib/tokens.ts

BFF_BASE_URL_TOKEN
Default value : new InjectionToken<string>('BFF_BASE_URL_TOKEN')
BUILDING_BLOCK_META_DATA
Default value : new InjectionToken('Building Block Meta Data')
CHANNEL_TOKEN
Default value : new InjectionToken<CHANNEL>('Channel (retail/expert)', { factory: () => CHANNEL.RETAIL })
JOURNEY_USAGE_TARGET
Default value : new InjectionToken<JourneyTarget>('JOURNEY_USAGE_TARGET')
PAGES_CONFIGURATION
Default value : new InjectionToken('Pages Configuration')
PLUGIN_VALIDATORS
Default value : new InjectionToken<PluginValidatorUnion[]>('PLUGIN_VALIDATORS', { factory: () => [] })
TALY_APP_TITLE
Default value : new InjectionToken<string>('TALY_APP_TITLE')
USE_NEW_VERTICAL_SPACING
Default value : new InjectionToken<boolean>('USE_NEW_VERTICAL_SPACING', { factory: () => false })

libs/acl/form-support/src/lib/binding/bind-control-list.ts

bindControlList
Default value : ( aclControlList: AclControlItem[], acl: AclEvaluationInterface, form: UntypedFormGroup ): Observable<boolean> => { return merge( controlEnforcer(aclControlList, ({ control, aclKey }) => syncControlEdit(control, acl.isDisabled$(aclKey).pipe(map((value) => !value))) ), controlEnforcer(aclControlList, (item) => syncControlView( form, item.controlKey, acl.isHidden$(item.aclKey).pipe(map((value) => !value)) ) ), controlEnforcer(aclControlList, (item) => { const aclObservable = combineLatest([ acl.isReadonly$(item.aclKey), // We listen to changes in the nativeElement$. This happens for example, when the input field is // hidden and re-appears. In this case we need to re-apply the readonly attribute in the DOM getNativeElement$(item.control), getNxAbstractControl$(item.control) ]); return syncControlReadonly(aclObservable).pipe(map(([isReadonly]) => isReadonly)); }) ); }

Consume a list of AclControlItem where each entry corresponds to a control with an acl key.

libs/nx/src/migrations/update-validation-errors-component/update-validation-errors-component.ts

CC_VALIDATION_ERRORS_MODULE_NAME
Type : string
Default value : 'CcValidationErrorsModule'

libs/core/dynamic-form/checkbox/src/checkbox.model.ts

CheckboxLabelSize
Default value : { Small: 'small', Large: 'large' } as const
DfCheckboxTypeName
Type : string
Default value : 'CHECKBOX'

The value to use for the type attribute of checkbox formfield configs.

libs/acl/form-support/src/lib/data/clear-acl-read-only.ts

clearAclReadOnlyValues
Default value : (aclControlList: AclControlItem[], acl: AclEvaluationInterface) => (state: Record<string, unknown>) => { if (!state) { return; } // ensure we have a copy state = JSON.parse(JSON.stringify(state)); function removeValueFromStateIf(path: string, condition: () => boolean) { if (hasInObject(state, path) && condition()) { unsetObject(state, path); } } // If ACL locks some fields no need to hydrate it ever — this must be coming from resources (if any) // DOUBT: setState & setResources will never appear in fixed order. Most of the time // Resources will come after state and that multiple times for (const item of aclControlList) { removeValueFromStateIf( item.controlKey, () => acl.isDisabled(item.aclKey) || acl.isReadonly(item.aclKey) ); } return state; }

Given a form that was automatically bound (i.e. has acl keys that exactly match the form structure) we can remove values from a given state (by using the control path) if the bound acl resource is read-only

libs/sdk/src/cli/index.ts

cli
Default value : new Command().name('npx taly').description(`CLI for the TALY SDK (v${version})`)

libs/acl/src/lib/acl-engine/policy.ts

COMMENT_MARKER
Type : string
Default value : '#'
INACTIVE_MARKER
Type : string
Default value : '##'
RULE_PART_SEPARATOR
Default value : /,(?![^(]*\))/g

libs/acl/src/lib/acl-engine/condition.ts

conditionFunctionCache
Default value : new Map<string, (obj: any) => any>()

libs/oauth/src/lib-test/mock-config.ts

configWithAcrValues
Type : OauthConfig
Default value : { name: 'Mock config with acrValues', authorizeUrl: 'https://idp-non-default.com/authorize', clientId: 'ClientIdNonDefault', tokenUrl: 'https://token-non-default', appTokenUrl: 'https://my-app-non-default/token', scope: 'scope', bffBaseUrl: 'https://bff-non-default', refreshBeforeExpiryThreshold: 1000, acrValues: ['aus-xx-test', 'aus-xx-hotfix'] }
configWithLogoutSupport
Type : OauthConfig
Default value : { default: false, name: 'Mock config with logout support', authorizeUrl: 'https://idp.com/authorize', clientId: 'ClientId', tokenUrl: 'https://token', appTokenUrl: 'https://my-app/token', scope: 'scope', bffBaseUrl: 'https://bff', refreshBeforeExpiryThreshold: 1000, revokeUrl: 'https://idp.com/revoke', endSessionUrl: 'https://idp.com/end_session' }
defaultMockConfig
Type : OauthConfig
Default value : { default: true, name: 'My Default Mock Config', authorizeUrl: 'https://idp.com/authorize', clientId: 'ClientId', tokenUrl: 'https://token', appTokenUrl: 'https://my-app/token', scope: 'scope', bffBaseUrl: 'https://bff', refreshBeforeExpiryThreshold: 1000 }
mockConfigurations
Type : OauthConfig[]
Default value : [ defaultMockConfig, namedNonDefaultMockConfig, configWithLogoutSupport, configWithAcrValues ]
namedNonDefaultMockConfig
Type : OauthConfig
Default value : { name: 'My Non-Default Mock Config', authorizeUrl: 'https://idp-non-default.com/authorize', clientId: 'ClientIdNonDefault', tokenUrl: 'https://token-non-default', appTokenUrl: 'https://my-app-non-default/token', scope: 'scope', bffBaseUrl: 'https://bff-non-default', refreshBeforeExpiryThreshold: 1000 }

libs/core/dynamic-form/src/form/form.component.ts

ContainerLayout
Default value : { SingleColumn: 'single-column', MultiColumn: 'multi-column', CustomColumn: 'custom-column' } as const

libs/sdk/src/lib/journey/config/migrations/footer-copyright/footer-copyright.ts

COPYRIGHT_HOLDER_KEY
Type : string
Default value : 'copyrightHolder'
COPYRIGHT_KEY
Type : string
Default value : 'copyright'

libs/common/frame/src/services/frame-layout.service.ts

createBreakpointFactory
Default value : (service: NxViewportService) => (breakpoint: NxBreakpoints) => { return service .max(breakpoint) .pipe(startWith(window.innerWidth <= breakpoint), distinctUntilChanged()); }

libs/nx/src/generators/journey-src/lib/create-pages/single-page/create-page-data-assignment.ts

createI18nKey
Default value : (pageId: string, key: string, value: string) => { return `:@@${pageId}.${key}:${value}`; }

Helper utility to generate an i18n key with the default value to be used with $localize.

const i18nMakerFn = createI18nKey('my-page', 'works', 'string value')
// outputs `:@@my-page.works:string value`
createLocalizeAssignment
Default value : (pageId: string) => ({ identifier, i18n, text }: { identifier: string; i18n: string; text?: string }) => { if (!text) { return []; } const value = createI18nKey(pageId, i18n, text); return [ factory.createPropertyAssignment( factory.createIdentifier(identifier), createLocalizeTemplateExpression(value) ) ]; }

Create a localize assignment in the form of a property inside an object. It's meant to be curried with the page id so we don't carry it around everywhere.

createLocalizeAssignment('my-page-id')({
   identifier: "objectKey",
   i18n: "my-key",
   text: "desired value"
})
{
   objectKey: $localize`:@@my-key:desired value`
}
createObjectLiteral
Default value : (literalExpressions: ts.ObjectLiteralElementLike[]) => { return factory.createPropertyDeclaration( [factory.createModifier(ts.SyntaxKind.OverrideKeyword)], factory.createIdentifier('pageData'), undefined, factory.createTypeReferenceNode(factory.createIdentifier('PageDataForTemplate'), undefined), factory.createObjectLiteralExpression(literalExpressions, true) ); }

Establish the empty object literal to begin with.

pageData: PageData = {};

We can pass in any amount of literal expression to build that object then.

createPropertyBoolean
Default value : (identifier: string, value?: boolean) => { if (value === undefined) { return []; } return [ factory.createPropertyAssignment( factory.createIdentifier(identifier), value ? factory.createTrue() : factory.createFalse() ) ]; }

Create a boolean assignment in an object literal

key: true
createPropertyString
Default value : (identifier: string, value?: string) => { if (!value) { return []; } return [ factory.createPropertyAssignment( factory.createIdentifier(identifier), factory.createStringLiteral(value) ) ]; }

Create a string assignment in an object literal

key: "value"

libs/nx/src/executors/introspection/compat/base/create-inspector.ts

createInspector
Default value : (introspectionContext: IntrospectionContext): InspectionFn => { const inspectGenericsFn = processTypeArguments(introspectionContext); return (fileOrSourceFile: string | ts.SourceFile) => { let sourceFile: ts.SourceFile; if (typeof fileOrSourceFile === 'string') { sourceFile = getSingleSourceFile(introspectionContext.program, fileOrSourceFile); } else { sourceFile = fileOrSourceFile; } const { classSymbol, typeArguments, node } = findClassWithAbstractBase(introspectionContext)(sourceFile); if (classSymbol) { const formProperties = extractFormProperties(introspectionContext, sourceFile, node); return { ...inspectGenericsFn((typeArguments ?? []) as ts.NodeArray<ts.TypeNode>), formContract: formProperties }; } return { stateContract: [], resourceContract: [], formContract: [] }; }; }

Creates an inspection function which can receive a source path or ts.SourceFile to perform the inspection steps (findClassesWithHeritages & processGenericsFromClass).

This method (and many others from this introspection codebase) uses currying to accept a program, checker & context (for logging) that has been created once before. That way we can create the actual InspectionFn in a central place and we clearly know what's the environment (program, checker) and what is the actual argument (fileOrSourceFile) we are dealing with.

libs/core/dynamic-form/src/base/custom.component.ts

CUSTOM_COMPONENT_TYPE
Type : string
Default value : 'CUSTOM_COMPONENT'
CUSTOM_DYNAMIC_FORM_COMPONENT
Default value : new InjectionToken<DfComponentConfig[]>( 'CUSTOM_DYNAMIC_FORM_COMPONENT' )

libs/core/src/lib/utils/natural-dates.ts

dateUnitAlias
Type : object
Default value : { d: 'd', day: 'd', days: 'd', w: 'w', week: 'w', weeks: 'w', m: 'm', month: 'm', months: 'm', y: 'y', year: 'y', years: 'y' }

libs/pfe-connector/src/lib/utils/pfe-resources.ts

DEBOUNCE_STORE_UPDATES_TIME
Type : number
Default value : 300
pfeObservableExpressionBuilder
Default value : (businessService: PfeBusinessService) => (query: string) => businessService.getObservableForExpressionKey(query, true)

Create curried methods to save us from passing around the business service This technique reduces our dependency to the actual PFE business service and will allow use to move large parts into the ITMP core as we can't have any PFE dependencies in there.

VERBOSE
Default value : false

libs/common/frame/src/core/small-print-marker/small-print-marker.directive.ts

DEFAULT_INDEX
Type : number
Default value : 0

libs/nx/src/executors/extract-i18n/executor.ts

DEFAULT_TRANSLATION_FILE_FORMAT
Type : string
Default value : 'xlf'

libs/common/src/lib/normalize-url/token.ts

DEPLOY_URL
Default value : new InjectionToken<string>('DEPLOY_URL')

libs/core/dynamic-form/src/utils/normalize-url/token.ts

DEPLOY_URL
Default value : new InjectionToken<string>('DEPLOY_URL')

libs/core/dynamic-form/date/src/date.component.ts

Df_DATE_PICKER_PARSE_FORMAT
Type : InjectionToken<string>
Default value : new InjectionToken<string>( 'Df_DATE_PICKER_PARSE_FORMAT' )
ISO_STRING_FORMAT
Type : string
Default value : 'YYYY-MM-DD'

libs/core/dynamic-form/src/info-icon/info-icon/info-icon.model.ts

Df_INFO_ICON_DEFAULT_OPTIONS
Default value : new InjectionToken<DfInfoIconOptions>( 'DfInfoIconDefaultOptions', { providedIn: 'root', factory: () => ({ icon: 'info-circle-o', hoverIcon: 'info-circle', size: 'small', modalComponent: DfInfoIconModalComponent } as DfInfoIconOptions) } )

libs/core/dynamic-form/date/src/iso-date-adapter/iso-date-format-testing.ts

Df_ISO_DATE_FORMAT
Type : NxDateFormats
Default value : { parse: { dateInput: 'L' }, display: { dateInput: 'L', monthYearLabel: 'MMM YYYY', dateA11yLabel: 'LL', monthYearA11yLabel: 'MMMM YYYY' } }

libs/core/dynamic-form/circle-toggle-group/src/circle-toggle-group.model.ts

DfCircleToggleGroupTypeName
Type : string
Default value : 'CIRCLE_TOGGLE_GROUP'

Definition of the type - dynamic circle toggles

libs/core/dynamic-form/date/src/date.model.ts

DfDateDefaultValues
Default value : { Yesterday: 'YESTERDAY', Today: 'TODAY', Tomorrow: 'TOMORROW' } as const

Default values for the DATE

DfDateStartViewType
Default value : { Month: 'month', Year: 'year', MultiYear: 'multi-year' } as const

Available views that the date picker's calendar can start with.

month: Start the calendar on the month view, which shows all days of that month. year: Start the calendar on the year view, which shows all months of that year. multi-year: Start the calendar on the multi-year view, which shows a range of years.

DfDateTypeName
Type : string
Default value : 'DATE'

The value to use for the type attribute of date formfield configs.

libs/core/dynamic-form/dropdown/src/dropdown.model.ts

DfDropdownTypeName
Type : string
Default value : 'DROPDOWN'

The value to use for the type attribute of dropdown formfield configs.

libs/core/dynamic-form/src/base/base.model.ts

DfFormfieldSpacing
Default value : { none: 'NONE', xs: 'XS', s: 'S', m: 'M', l: 'L', xl: 'XL', xxl: 'XXL' } as const
NATIVE_DYNAMIC_FORM_COMPONENTS
Default value : new InjectionToken<Record<string, DfComponentConfig>>( 'NATIVE_DYNAMIC_FORM_COMPONENTS', { factory: () => { throw new Error('NATIVE_DYNAMIC_FORM_COMPONENTS is not provided'); } } )

libs/core/dynamic-form/src/utils/form-layout/form-layout.model.ts

DfFormLayout
Default value : { OneColumn: 'ONE_COLUMN', TwoColumn: 'TWO_COLUMN', ThreeColumn: 'THREE_COLUMN', FourColumn: 'FOUR_COLUMN', CustomColumn: 'CUSTOM_COLUMN' } as const
DfFormLayoutClassName
Type : string
Default value : { ONE_COLUMN: 'single-column', TWO_COLUMN: 'two-column-element', THREE_COLUMN: 'three-column-element', FOUR_COLUMN: 'four-column-element', CUSTOM_COLUMN: '' }

libs/core/dynamic-form/headline/src/headline.model.ts

DfHeadlineTypeName
Type : string
Default value : 'HEADLINE'

The value to use for the type attribute of headline formfield configs.

HeaderType
Default value : { h1: 'h1', h2: 'h2', h3: 'h3', h4: 'h4', h5: 'h5', h6: 'h6' } as const

libs/core/dynamic-form/input/src/input.model.ts

DfInputTypeName
Type : string
Default value : 'INPUT'

The value to use for the type attribute of input formfield configs.

libs/core/dynamic-form/line-break/src/line-break.model.ts

DfLineBreakTypeName
Type : string
Default value : 'LINE_BREAK'

The value to use for the type attribute of line break formfield configs.

libs/core/dynamic-form/paragraph/src/paragraph.model.ts

DfParagraphTypeName
Type : string
Default value : 'PARAGRAPH'

The value to use for the type attribute of paragraph formfield configs.

libs/core/dynamic-form/radio/src/radio.model.ts

DfRadioTypeName
Type : string
Default value : 'RADIO'

The value to use for the type attribute of radiobutton group formfield configs.

libs/core/dynamic-form/switcher/src/switcher.model.ts

DfSwitcherTypeName
Type : string
Default value : 'SWITCHER'

The value to use for the type attribute of switcher formfield configs.

SwitcherLabelPosition
Default value : { Left: 'left', Right: 'right' } as const
SwitcherSize
Default value : { Small: 'small', Large: 'large' } as const

libs/core/dynamic-form/text-area/src/text-area.model.ts

DfTextAreaTypeName
Type : string
Default value : 'TEXT_AREA'

Definition of the type - dynamic text area

libs/common/src/lib/dynamic-form-bb/dynamic-form-bb.example-data.ts

dynamicFormBuildingBlockExampleData
Type : BuildingBlockExampleData<DynamicFormBbState, DynamicFormBbResources>
Default value : { default: { state: {}, resources: { dynamicFormConfig: { layout: 'ONE_COLUMN', fields: [ { id: 'myCheckbox', type: 'CHECKBOX', label: 'my checkbox' } ] } } } }

libs/core/dynamic-form/src/utils/form-layout/form-layout.utils.ts

EMPTY_FORMS
Type : DfFormWithLayout[]
Default value : [ { layout: DfFormLayout.OneColumn, fields: [] } ]

libs/nx/src/utils/jest/path-matcher.ts

ensurePosixPathSeparators
Default value : (origPath: string) => origPath.split(path.sep).join(path.posix.sep)

Converts Windows paths that use \ as separator to /

libs/sdk/src/utils/jest/path-matcher.ts

ensurePosixPathSeparators
Default value : (origPath: string) => origPath.split(path.sep).join(path.posix.sep)

Converts Windows paths that use \ as separator to /

libs/nx/src/executors/shared/metadata-utils/windows-compat.ts

ensurePosixPathSeparators
Default value : (origPath: string) => origPath.split(path.sep).join(path.posix.sep)

Converts Windows paths that use \ as separator to /

libs/core/runtime-utils/src/plugins-config.ts

ENV_VAR_MARKER
Type : string
Default value : '@environment.'
extractValueFromEnvObj
Default value : ( optionValue: string, envObj: Record<string, unknown> ): Record<string, unknown> => { const envPathKeys = optionValue.replace(ENV_VAR_MARKER, '').split('.'); const processedOptionValue = envPathKeys.reduce((currentValue, propertyName) => { if (currentValue !== undefined) { return currentValue[propertyName] as Record<string, unknown>; } return currentValue; }, envObj); return processedOptionValue; }
isEnvVarPlaceholder
Default value : (value: unknown): value is string => { return typeof value === 'string' && value.startsWith(ENV_VAR_MARKER); }
processOptionsPortion
Default value : ( optionsObj: unknown | unknown[], envObj: Record<string, unknown> ): unknown => { if (!optionsObj) return optionsObj; if (Array.isArray(optionsObj)) { return optionsObj.map((value) => { return processOptionsPortion(value, envObj); }); } if (typeof optionsObj === 'object') { return Object.entries(optionsObj).reduce((acc, [key, value]) => { return { ...acc, [key]: processOptionsPortion(value, envObj) }; }, {}); } if (isEnvVarPlaceholder(optionsObj)) { return extractValueFromEnvObj(optionsObj, envObj) ?? optionsObj; } return optionsObj; }
processPluginOptions
Default value : ( options: unknown, envObj: Record<string, unknown> // We return an any value here, to ensure that the plugin options can be handed over to any plugin, where we don't know the options type. // eslint-disable-next-line @typescript-eslint/no-explicit-any ): any | undefined => { if (!options) return undefined; return processOptionsPortion(options, envObj); }

Utility function to be used in a generated app to parse the env variables placeholders in Plugin options

libs/nx/src/executors/shared/metadata-utils/__test/my-team-plugin-lib/src/other/injectable-files/validator-validation-method-with-untyped-param.ts

ESCAPED_MAX_LENGTH_PLUGIN_OPTIONS
Default value : new InjectionToken<EscapedMaxLengthValidatorPluginOptions>('ESCAPED_MAX_LENGTH_PLUGIN_OPTIONS')

libs/sdk/src/node/journey/generate/utils/exec-async.ts

execAsync
Default value : promisify(exec)

libs/nx/src/generators/journey-src/lib/create-pages/single-page/__fixtures__/expected-bb-configs.ts

EXPECTED_BB_CONFIGS
Type : []
Default value : [ { aclTag: 'my-acl-tag', exampleState: { works: true }, id: 'block-0', module: 'MyModule', package: '@allianz/building-blocks', selector: 'bb-block-0' }, { id: 'block-a', module: 'MyModule2', package: '@allianz/building-blocks', panel: 'panel1', selector: 'bb-block-a' }, { id: 'block-b', module: 'MyModule3', package: '@allianz/building-blocks', panel: 'panel2', selector: 'bb-block-b' }, { id: 'block-c', module: 'MyModule4', package: '@allianz/building-blocks', panel: 'panel2', selector: 'bb-block-c' }, { id: 'block-d', module: 'MyModule', package: '@allianz/building-blocks', panel: 'panelNotExisting', selector: 'bb-block-d' }, { id: 'block-e', module: 'OtherModule', package: '@allianz/some-building-blocks', selector: 'bb-block-e' }, { id: 'block-f', module: 'MyModule4', package: '@allianz/building-blocks', section: 'section-a', selector: 'bb-block-f' }, { id: 'block-g', module: 'MyModule4', package: '@allianz/building-blocks', section: 'section-a', selector: 'bb-block-g' } ]

libs/nx/src/executors/extract-plugin-metadata/compat/utils/markdown/extract-md-file-data.ts

extractMdFileDataFactory
Default value : ({ logger }: IntrospectionContext) => async (markdownFile: string): Promise<MarkdownAttributes> => { const mdAttributes = await readMarkdownAttributes(markdownFile); const mdValidationErrors = validateMarkdownAttributes(mdAttributes); if (mdValidationErrors.length) { logger.error( `Markdown attribute validation failed. Errors ${JSON.stringify(mdValidationErrors)}` ); } return { type: mdAttributes.type, title: mdAttributes.title, description: mdAttributes.description }; }

Transform Markdown Frontmatter Data into individual objects for further processing.

isTypeAttributeSetToPlugin
Default value : async (markdownFile: string): Promise<boolean> => { const mdAttributes = await readMarkdownAttributes(markdownFile); return mdAttributes.type === TypeInMarkdown.PLUGIN; }

libs/nx/src/executors/extract-plugin-metadata/compat/extract-plugin-folders-metadata.ts

extractPluginFoldersMetadataFactory
Default value : (context: BuilderContext, logger: Logger, projectPath: string) => async (pluginFoldersCollection: PluginFoldersCollection[]): Promise<SinglePluginMetadata[]> => { const pluginMetadata: SinglePluginMetadata[] = []; const packageJsonData = extractPackageJsonData(projectPath); for (const entry of pluginFoldersCollection) { const { secondaryEntryPoint, result, skipped } = entry; secondaryEntryPoint ? context.logger.info(`📚 Processing secondary entry point '${secondaryEntryPoint}'`) : context.logger.info(`📚 Processing main entry point`); const noPluginFoundInEntryPoint = result.length === 0; if (noPluginFoundInEntryPoint) { logger.warn(`Could not find any Plugin in entry point`); continue; } for (const stats of skipped) { logPluginFolderWarnings(stats, context.logger); } const entrypointPackageName = secondaryEntryPoint ? posix.join(packageJsonData.name, secondaryEntryPoint) : packageJsonData.name; for (const pluginFolderStats of result) { const pluginMetadataExtraction: PluginMetadataExtraction | undefined = await runPluginMetadata(context, logger, projectPath, pluginFolderStats); if (pluginMetadataExtraction === undefined) { continue; } const singlePluginMetadata: SinglePluginMetadata = { id: pluginMetadataExtraction.id, title: pluginMetadataExtraction.markdownAttributes?.title, description: pluginMetadataExtraction.markdownAttributes?.description, package: entrypointPackageName, version: packageJsonData.version, module: pluginMetadataExtraction.ngModuleClassName, pluginType: pluginMetadataExtraction.pluginType, options: pluginMetadataExtraction.optionsIntrospectionResult, injectable: pluginMetadataExtraction.injectable }; pluginMetadata.push(singlePluginMetadata); } } return pluginMetadata; }

libs/nx/src/executors/introspection/compat/utils/find-class-with-abstract-base.ts

findClassWithAbstractBase
Default value : ({ checker }: IntrospectionContext) => (sourceFile: ts.SourceFile) => { // Find the first class that extends something — this should be our AbstractBuildingBlock class const classDefinitions = findInheritedClasses(checker)(sourceFile); const classWithAbstractBuildingBlockBase = classDefinitions.find((classDefinition) => { const baseClassSymbol = checker.getSymbolAtLocation( classDefinition.expressionWithType.expression ); return baseClassSymbol?.getName() === 'AbstractBuildingBlock'; }); if (!classWithAbstractBuildingBlockBase) { return {}; } return { classSymbol: classWithAbstractBuildingBlockBase.symbol, typeArguments: classWithAbstractBuildingBlockBase.expressionWithType.typeArguments, node: classWithAbstractBuildingBlockBase.node }; }

Find classes that inherit from "AbstractBuildingBlock" That's a convenient function to remove the logic from the overall runner extract the types.

libs/nx/src/executors/extract-plugin-metadata/compat/utils/find-implemented-interface.ts

findImplementedInterface
Default value : ( node: ts.ClassDeclaration ): ts.ExpressionWithTypeArguments | undefined => { /** * Find the Heritage Clause that matches `ImplementsKeyword` as we can potentially encounter * other clauses like `extends` etc. */ const implementsClause = node.heritageClauses?.find( (item) => item.token === ts.SyntaxKind.ImplementsKeyword ); if (!implementsClause) { return undefined; } const baseInterface: ts.ExpressionWithTypeArguments = implementsClause.types[0]; return baseInterface; }

Helping utility to find what interface a class might implement

libs/nx/src/executors/introspection/compat/utils/find-inherited-classes.ts

findInheritedClasses
Default value : (checker: ts.TypeChecker) => (sourceFile: ts.SourceFile): ClassResult[] => { const result: ClassResult[] = []; ts.forEachChild(sourceFile, visit); return result; function visit(node: ts.Node) { if (ts.isClassDeclaration(node) && node.name && node.heritageClauses) { /** * Find the Heritage Clause that matches `ExtendsKeyword` as we can potentially encounter * other clauses like `implements` etc. */ const extendedClause = node.heritageClauses.find( (item) => item.token === ts.SyntaxKind.ExtendsKeyword ); if (!extendedClause) { return; } const abstractBaseClass = extendedClause.types[0]; // that's the actual class const classSymbol = checker.getSymbolAtLocation(node.name); result.push({ symbol: classSymbol, expressionWithType: abstractBaseClass, node }); } } }

Helping utility to find all classes in a file that extend from something

libs/nx/src/executors/extract-plugin-metadata/compat/utils/find-injectable-class.ts

findInjectableClassFactory
Default value : ({ program, checker, logger }: IntrospectionContext) => ( file: string ): { injectableClassNode: ts.ClassDeclaration | undefined; injectableClassSymbol: ts.Symbol | undefined; } => { const sourceFile = getSingleSourceFile(program, file); let classSymbol; let classNode; ts.forEachChild(sourceFile, (node) => { if (ts.isClassDeclaration(node) && node.name) { classNode = node; const injectableDecorator = ts .getDecorators(classNode) ?.find( (decorator) => ((decorator.expression as ts.CallExpression).expression as ts.Identifier) .escapedText === 'Injectable' ); if (!injectableDecorator) { logger.error(`Error: no @Injectable symbol found. Ignoring`); return; } classSymbol = checker.getSymbolAtLocation(classNode.name as ts.Identifier); } }); if (!classNode) { logger.error(`Error: no class declaration found. Ignoring`); } return { injectableClassNode: classNode, injectableClassSymbol: classSymbol }; }

libs/nx/src/executors/extract-plugin-metadata/compat/utils/find-ng-module-class.ts

findNgModuleClassFactory
Default value : ({ checker, program, logger }: IntrospectionContext) => (file: string): ts.Symbol | undefined => { const sourceFile = getSingleSourceFile(program, file); let classSymbol; let classNode; ts.forEachChild(sourceFile, (node) => { if (ts.isClassDeclaration(node) && node.name) { classNode = node; const ngModuleDecorator = ts .getDecorators(classNode) ?.find( (decorator) => ((decorator.expression as ts.CallExpression).expression as ts.Identifier) .escapedText === 'NgModule' ); if (!ngModuleDecorator) { logger.error(`Error: no "@NgModule" symbol found. Ignoring`); return; } classSymbol = checker.getSymbolAtLocation(classNode.name as ts.Identifier); } }); if (!classNode) { logger.error(`Error: no class declaration found. Ignoring`); } return classSymbol; }

libs/acl/form-support/src/lib/data/get-acl-path-object.ts

getAclPatchObject
Default value : (aclControlList: AclControlItem[], form: UntypedFormGroup, acl: AclEvaluationInterface) => (state: Record<string, unknown>) => { const result = {}; function storeValueForControl(aclKey: string) { const formKey = camelize(aclKey).split('/').join('.'); const value = getObject(state, formKey); const controlExists = !!form.get(formKey); if (controlExists && value) { setObject(result, formKey, value); } } for (const item of aclControlList) { const isAclDisabled = acl.isDisabled(item.aclKey); const isAclVisible = !acl.isHidden(item.aclKey); if (isAclDisabled && isAclVisible) { storeValueForControl(item.aclKey); } } return result; }

Given a form that was automatically bound (i.e. has acl keys that exactly match the form structure) we can use the given convention between the control path to get a patch object for all read all values from a given state that matches the form group hierarchy.

STRING_CAMELIZE_REGEXP
Default value : /(-|_|\.|\s)+(.)?/g

libs/nx/src/generators/journey-src/lib/append-error-to-app-component-html/append-error-to-app-component-html.ts

getContent
Default value : (errorMessage: string) => ` <div class="journey-generation-error"> <h1>TALY: Journey Generation Error</h1> <pre class="error-stack">${errorMessage}</pre> </div> `

libs/core/runtime-utils/src/get-data-for-page.ts

getDataForPage
Default value : ( pagesConfig: PageConfigurationWithTransformedDynamicForms[], id: string, pageConfigOverrides: PageConfigOverrides = {}, showroomDataForPage?: PageInJourneyExampleData ): DataForPage => { const page = pagesConfig.find((item) => item.id === id); if (!page) { console.warn(`Could not find data for page '${id}'`); return {}; } const blockData = getAllBlocks(page); if (!blockData || blockData.length === 0) { console.warn( `Page '${id}' seems to be empty. Please add Building Blocks to this page or remove it.` ); return {}; } const blockMap = blockData .map((block) => { const blockOverrides = pageConfigOverrides[block.id] ?? {}; return { ...block, ...blockOverrides }; }) .map((block) => { const blockShowroomResources = showroomDataForPage?.[block.id]?.resources; if (!block.resources && blockShowroomResources) { return { ...block, resources: blockShowroomResources }; } return block; }) .reduce((collection, item) => { return { ...collection, [item.id]: item }; }, {}); return blockMap; }

Utility function to be used in a generated page to extract the meta data matching the given page id.

libs/nx/src/executors/journal/compat/utils/bb-markdown-validators.ts

getMissingAttributes
Default value : ( attrs: BbMarkdownAttributes ): (keyof BbMarkdownAttributes)[] => { return REQUIRED_MD_ATTRIBUTES.filter((key) => !attrs[key]); }
isValidChannel
Default value : (channel: string) => { return VALID_CHANNELS.includes(channel); }
isValidLOB
Default value : (lob: string) => { return VALID_LOBS.has(lob); }
REQUIRED_MD_ATTRIBUTES
Type : []
Default value : ['title', 'channel', 'lob']
VALID_CHANNELS
Type : []
Default value : ['expert', 'retail']
validateMarkdownAttributes
Default value : (attrs: BbMarkdownAttributes) => { const errors: { error: string; details?: string[] }[] = []; const missingAttributes = getMissingAttributes(attrs); if (missingAttributes.length) { errors.push({ error: 'missing attributes', details: missingAttributes }); } if (attrs.channel?.length) { const invalidChannels = attrs.channel.filter((ch) => !isValidChannel(ch)); if (invalidChannels.length) { errors.push({ error: 'invalid channels', details: invalidChannels }); } } else if (attrs.channel) { errors.push({ error: 'no channels defined' }); } if (attrs.lob?.length) { const invalidLOBs = attrs.lob.filter((lob) => !isValidLOB(lob)); if (invalidLOBs.length) { errors.push({ error: 'invalid LOBs', details: invalidLOBs }); } } else if (attrs.lob) { errors.push({ error: 'no LOB defined' }); } return errors; }

libs/nx/src/executors/extract-plugin-metadata/compat/utils/markdown/markdown-validators.ts

getMissingAttributes
Default value : (attrs: MarkdownAttributes) => { return REQUIRED_MD_ATTRIBUTES.filter((key) => !attrs[key]); }
REQUIRED_MD_ATTRIBUTES
Type : []
Default value : ['type', 'title', 'description']
validateMarkdownAttributes
Default value : (attrs: MarkdownAttributes) => { const errors: { error: string; details?: string[] }[] = []; const missingAttributes = getMissingAttributes(attrs); if (missingAttributes.length) { errors.push({ error: 'missing attributes', details: missingAttributes }); } return errors; }

libs/nx/src/generators/library/updaters/add-project-config/add-project-config.ts

getProjectConfiguration
Default value : async (options: ExpandedLibraryGeneratorSchema) => { // If the ProjectType is not imported dynamically and an incorrect Nx // workspace setup is used, the library generation is canceled without an // error message from TALY. Due to the dynamic import, an error message is // displayed by TALY before the generation aborts. const { ProjectType } = await import('@nx/workspace'); return { name: options.projectName, projectType: ProjectType.Library, root: options.projectRoot, sourceRoot: joinPathFragments(options.projectRoot, 'src'), schematics: { '@nx/angular:component': { style: 'scss' } }, prefix: options.prefix, targets: { build: { executor: '@nx/angular:package', configurations: { production: {} }, options: { project: `${options.projectRoot}/ng-package.json`, tsConfig: `${options.projectRoot}/tsconfig.lib.json` }, dependsOn: ['^build', 'journal', 'introspection'], inputs: ['production', '^production'] }, lint: { executor: '@nx/eslint:lint' }, test: { executor: '@nx/jest:jest', options: { jestConfig: `${options.projectRoot}/jest.config.ts` } }, introspection: { executor: '@allianz/taly-nx:introspection', options: { outputFile: `${options.projectRoot}/introspection.json`, project: `${options.projectRoot}` } }, journal: { executor: '@allianz/taly-nx:journal', options: { outputFile: `${options.projectRoot}/journal.json`, project: `${options.projectRoot}` } }, 'test-accessibility': { executor: '@nx/jest:jest', options: { jestConfig: `${options.projectRoot}/jest.a11y.config.ts` } } } }; }

libs/common/frame/src/frame-parts/navigation/navigation-utils.ts

getSectionForPage
Default value : (page: string, sections: SectionConfig) => { for (const [sectionId, section] of sections) { if (section?.pages?.includes(page)) { return sectionId; } } return null; }

OBSERVATIONS:

  1. We need to work on the assumption of at least one fixture and that is a list of sections which group pages in distinct "zones".
  2. A section has a unique SECTION ID and a set of pages.
  3. A page can't belong to multiple section (assumption)
  4. A section can have various states depending on the containing pages compared with a given active page.
  5. A group of sections is always ordered and that order is fixed.
  6. A page can either belong to a single section or to none.
  7. A page without a section is a dangling page.
  8. The page history is an ordered list of pages. The last entry is the current page, any entry before are pages visited before.
  9. We assume that sections are (usually) navigated linear.

libs/acl/src/lib/acl-engine/rule.ts

globMatchCache
Default value : new Map<string, boolean>()

libs/nx/src/migrations/update-schemas-imports/cherry-picked/import-manager.ts

hasFlag
Default value : (data: AnalyzedImport, flag: ImportState) => (data.state & flag) !== 0

Checks whether an analyzed import has the given import flag set.

libs/nx/src/migrations/update-validation-errors-imports/cherry-picked/import-manager.ts

hasFlag
Default value : (data: AnalyzedImport, flag: ImportState) => (data.state & flag) !== 0

Checks whether an analyzed import has the given import flag set.

libs/common/module-integration/src/utils/tokens.ts

HOST_ENV_DATA
Default value : new InjectionToken<Record<string, unknown>>( 'HOST_ENV_DATA (for the module integration, the host app can provide env data so that the TALY generated module can read it)' )

libs/common/frame/src/frame-parts/notification/notification.component.ts

I18N_NOTIFICATION_CONTEXT
Type : Record<NotificationContext, string>
Default value : { info: $localize`:Context of an info notification:info`, success: $localize`:Context of a success notification:success`, warning: $localize`:Context of a warning notification:warning`, error: $localize`:Context of an error notification:error` }

libs/nx/src/executors/extract-plugin-metadata/compat/utils/inspect-injectable-class.ts

inspectInjectableClassFactory
Default value : (introspectionContext: IntrospectionContext, projectPath: string) => (fileName: string): injectableFileInspectionResult | undefined => { const { injectableClassNode, injectableClassSymbol } = findInjectableClassFactory(introspectionContext)(fileName); if (!injectableClassNode || !injectableClassSymbol) { return undefined; } const pluginType = extractPluginType(introspectionContext.checker, injectableClassNode); let pluginValidatorData = {}; if (pluginType === 'Validator') { pluginValidatorData = extractPluginValidatorData( fileName, injectableClassNode, introspectionContext.logger ); } return { injectableClassData: { file: posix.relative( ensurePosixPathSeparators(projectPath), ensurePosixPathSeparators(fileName) ), className: injectableClassSymbol.getName(), ...pluginValidatorData }, pluginType }; }

libs/nx/src/executors/extract-plugin-metadata/compat/base/create-inspector.ts

inspectorFactory
Default value : (introspectionContext: IntrospectionContext): InspectionFn => (classSymbol): OptionsContractType[] => { let pluginOptionsContract: OptionsContractType[] = []; if (!classSymbol) { return pluginOptionsContract; } const forRootExport = classSymbol.exports?.get('forRoot' as ts.__String); if (!forRootExport) { introspectionContext.logger?.error(`Error: no "forRoot" method`); return pluginOptionsContract; } const pluginOptionsParam: ts.ParameterDeclaration = ( forRootExport.declarations?.[0] as unknown as ts.SignatureDeclaration ).parameters?.[0]; if (!pluginOptionsParam) { return pluginOptionsContract; } const pluginOptionsType: ts.TypeNode | undefined = pluginOptionsParam.type; if (!pluginOptionsType) { introspectionContext.logger.error( `Error: "forRoot" method has "options" argument, but the type for this argument is missing` ); return pluginOptionsContract; } if (pluginOptionsType) { // create the working horse traversing all properties and constructing the list of types const inspectTypeFn = inspectTypeFactory(introspectionContext); const pluginOptions = getCoercedTypeNode(pluginOptionsType); pluginOptionsContract = inspectTypeFn(pluginOptions as ts.TypeReferenceNode); } return pluginOptionsContract; }

Creates an inspection function which receives a file path to perform the inspection steps

This method (and many others from this introspection codebase) uses currying to accept a program, checker & context (for logging) that has been created once before. That way we can create the actual InspectionFn in a central place and we clearly know what's the environment (program, checker) and what is the actual argument (sourceFile) we are dealing with.

libs/nx/src/executors/shared/introspection/inspect-type.ts

inspectTypeFactory
Default value : ({ program, checker, logger }: IntrospectionContext) => { const processPropertiesFn = processPropertiesFactory({ program, checker, logger }); return (typeReferenceNode: ts.TypeReferenceNode): IntrospectionContractType[] => { if (!typeReferenceNode) { return []; } const type = checker.getTypeFromTypeNode(typeReferenceNode); let symbol = checker.getSymbolAtLocation(typeReferenceNode.typeName); if (symbol === undefined) { logger.error( `Can't inspect contract. Could not get symbol at location ${typeReferenceNode.typeName.kind}` ); return []; } /** * Check if this is an aliased type coming from an import * which we need to resolve first. */ if (symbol.flags & ts.SymbolFlags.Alias) { const previousSymbolBeforeOverriden = symbol; symbol = checker.getAliasedSymbol(symbol); if (checker.isUnknownSymbol(symbol)) { checker.getAliasedSymbol(previousSymbolBeforeOverriden); logger.error( `Error during resolving (getAliasedSymbol) '${previousSymbolBeforeOverriden.getName()}'. Sometimes this means that an import statement couldn't be resolved. Maybe some error in the tsconfig file.` ); return []; } } /** * Ignore anything that isn't an interface. This could be a type literal. * Something like that AbstractBuildingBlock<string, boolean> which is not allowed * as the underlying facade always creates and passes a resource object. We apply the * same rules to the state object to stay in line with the convention. */ if ((symbol.flags & ts.SymbolFlags.Interface) !== ts.SymbolFlags.Interface) { logger.error( `Given generic '${symbol.getName()}' is not an interface. Is it a Type Declaration? Change it to an interface instead.` ); return []; } /** * Finally process and return the containing types. */ return processPropertiesFn(type, symbol); }; }

Given a typeReferenceNode (one of the generics in AbstractBuildingBlock<A, B>) we check if it's an interface and if yes we run processPropertiesFn over it to collect all types.

libs/nx/src/migrations/update-schemas-imports/update-schemas-imports.ts

INTERFACES
Type : []
Default value : [ 'PageActionConfig', 'Stage', 'ValidationRule', 'ValidationParam', 'BusinessEventConfig', 'BusinessEventServiceActivator', 'BusinessEventAction', 'BusinessEventPfeActionConfig', 'Navigation', 'PageData', 'ExtraPageAction', 'PageTitle', 'PageTitleObject', 'PageTitleAsStageBase', 'PageTitleAsStageWithSubline', 'PageTitleAsStageWithTopline', 'BasicValidationRule', 'CustomValidationRule', 'MinValidatorRule', 'DynamicMinValidatorRule', 'MaxValidatorRule', 'DynamicMaxValidatorRule', 'MinDateValidatorRule', 'MaxDateValidatorRule', 'MinLengthValidatorRule', 'MaxLengthValidatorRule', 'PatternValidatorRule' ]
NEW_IMPORT
Type : string
Default value : '@allianz/taly-core'
OLD_IMPORT
Type : string
Default value : '@allianz/taly-core/schemas'

libs/nx/src/migrations/update-validation-errors-imports/update-validation-errors-imports.ts

INTERFACES
Type : []
Default value : ['ValidationErrorsModule', 'ValidationErrorsComponent']
NEW_IMPORT
Type : string
Default value : '@allianz/taly-core/validation-errors'
OLD_IMPORT
Type : string
Default value : '@allianz/taly-common/validation-errors'

libs/nx/src/generators/journey-src/lib/create-pages/single-page/render-markdown-as-html.ts

INTERNAL_LINK_PREFIX
Type : string
Default value : 'page://'

libs/core/src/lib/building-block/navigation.ts

isImplicitNavigation
Default value : (value: BUILDING_BLOCK_NAVIGATION_TYPE) => value === BUILDING_BLOCK_NAVIGATION_TYPE.Back || value === BUILDING_BLOCK_NAVIGATION_TYPE.Next || value === BUILDING_BLOCK_NAVIGATION_TYPE.Home

libs/core/dynamic-form/date/src/iso-date-adapter/iso-date-adapter-testing.ts

ISO_REGEX
Default value : /^([0-9]{4})(-?)(1[0-2]|0[1-9])\2(3[01]|0[1-9]|[12][0-9])$/
ISO_STRING_FORMAT
Type : string
Default value : 'YYYY-MM-DD'

libs/nx/src/executors/journal/compat/constants.ts

JOURNAL_FORMAT_VERSION
Type : string
Default value : '1'
VALID_LOBS
Default value : new Map([ ['motor', 'KB'], ['household', 'HH'], ['life', 'LE'], ['health', 'KV'], ['commercial lines', 'GS'], ['any', 'ANY'] ])

Available LOB values.

libs/nx/src/executors/shared/metadata-utils/__test/my-team-plugin-lib/src/other/module-files/module-without-for-root-method.ts

LANGUAGE_INTERCEPTOR_PLUGIN_OPTIONS
Default value : new InjectionToken<LanguageInterceptorPluginOptions>('LANGUAGE_INTERCEPTOR_PLUGIN_OPTIONS')

libs/nx/src/executors/shared/metadata-utils/__test/my-team-plugin-lib/src/other/module-files/no-class-declaration.ts

LANGUAGE_INTERCEPTOR_PLUGIN_OPTIONS
Default value : new InjectionToken<LanguageInterceptorPluginOptions>('LANGUAGE_INTERCEPTOR_PLUGIN_OPTIONS')

libs/nx/src/executors/shared/metadata-utils/__test/my-team-plugin-lib/src/other/module-files/no-ng-module-decorator.ts

LANGUAGE_INTERCEPTOR_PLUGIN_OPTIONS
Default value : new InjectionToken<LanguageInterceptorPluginOptions>('LANGUAGE_INTERCEPTOR_PLUGIN_OPTIONS')

libs/nx/src/executors/shared/metadata-utils/__test/my-team-plugin-lib/src/other/module-files/plugin-options-not-typed.ts

LANGUAGE_INTERCEPTOR_PLUGIN_OPTIONS
Default value : new InjectionToken<LanguageInterceptorPluginOptions>('LANGUAGE_INTERCEPTOR_PLUGIN_OPTIONS')

libs/nx/src/executors/shared/metadata-utils/__test/my-team-plugin-lib/src/lib/language-interceptor/tokens.ts

LANGUAGE_INTERCEPTOR_PLUGIN_OPTIONS
Default value : new InjectionToken<LanguageInterceptorPluginOptions>('LANGUAGE_INTERCEPTOR_PLUGIN_OPTIONS')

libs/nx/src/executors/shared/metadata-utils/__test/my-team-plugin-lib-secondary-entry-point/plugins/src/lib/language-interceptor/tokens.ts

LANGUAGE_INTERCEPTOR_PLUGIN_OPTIONS
Default value : new InjectionToken<LanguageInterceptorPluginOptions>('LANGUAGE_INTERCEPTOR_PLUGIN_OPTIONS')

libs/core/dynamic-form/src/base/base.component.ts

lineBreakCounter
Type : number
Default value : 0

libs/oauth/src/lib/symbols.ts

LOCATION
Default value : new InjectionToken<Location>('LOCATION', { providedIn: 'root', factory: () => window.location })
OAUTH_CONFIGURATIONS
Default value : new InjectionToken<OauthConfig>('OAUTH_CONFIGURATIONS')
STORAGE
Default value : new InjectionToken<Storage>('STORAGE', { providedIn: 'root', factory: () => sessionStorage })

libs/acl/form-support/src/lib/binding/manual-form-binding.ts

manualFormBindingFactory
Default value : (aclMapping: AclMapItem[] = []) => (acl: AclEvaluationInterface, form: UntypedFormGroup): Observable<boolean> => { const verbose = false; const aclControlList = createControlListFromMap(form, aclMapping, verbose); return bindControlList(aclControlList, acl, form); }

Use createControlListFromMap to bind a manually curated map of controls & acl keys

libs/acl/testing/src/acl-mock.ts

MOCK_ANY_RESOURCE
Type : string
Default value : '*'

libs/sdk/src/lib/journey/utils/validate-parameters.ts

nameRegex
Default value : /^[a-z][0-9a-z]*([- ][0-9a-z]+)*$/i

libs/oauth/pfe/src/lib/oauth-pfe-integration/oauth-pfe-integration.service.ts

OauthAuthorizeActionType
Type : string
Default value : 'OAUTH_AUTHORIZE'
OauthDecodeClientStateActionType
Type : string
Default value : 'OAUTH_DECODE_CLIENT_STATE'
OauthGetTokenActionType
Type : string
Default value : 'OAUTH_GET_TOKEN'
OauthLogoutActionType
Type : string
Default value : 'OAUTH_LOGOUT'

libs/pfe-connector/src/lib/frame/pfe-frame-navigation.service.ts

PFE_HISTORY_KEY
Type : string
Default value : 'pfeHistory'

libs/playground-test-bbs/src/lib/pgr-contact-us/pgr-contact-us.example-data.ts

pgrContactUsExampleData
Type : BuildingBlockExampleData<undefined, PgrContactUsResources>
Default value : { default: { resources: { label: 'Contact us' } } }

libs/playground-test-bbs/src/lib/pgr-placeholder/pgr-placeholder.example-data.ts

pgrPlaceholderExampleData
Type : BuildingBlockExampleData<undefined, PgrPlaceholderResources>
Default value : { default: { state: null, resources: { headline: 'Example headline', content: 'Example content' } } }

libs/playground-test-bbs/src/lib/pgr-simple/pgr-simple.example-data.ts

pgrSimpleExampleData
Type : BuildingBlockExampleData<PgrSimpleState, PgrSimpleResources>
Default value : { default: { state: { person: { firstName: 'Peter', lastName: 'Parker' } }, resources: { resourcesData: 'some showroom resources data' } } }

libs/core/src/lib/taly-placeholder-bb/taly-placeholder-bb.example-data.ts

placeholderExampleData
Type : BuildingBlockExampleData<, PlaceHolderResources<Record<string, >>>
Default value : { default: { resources: { title: 'Not implemented yet - placeholder', expectedState: { someDataForTheStore: 'lorem ipsum' }, purpose: 'My purpose description' }, state: undefined } }

libs/nx/src/executors/extract-plugin-metadata/compat/utils/write-plugin-metadata.ts

PLUGIN_LIB_METADATA_FORMAT_VERSION
Type : string
Default value : '1'
writeFile
Default value : util.promisify(fs.writeFile)

libs/nx/src/generators/journey-src/lib/add-acl-defaults-to-policy/__fixtures__/my-app/generated/src/config/policy.ts

POLICY
Default value : `# some custom rules here path,, disabled`

libs/acl/angular/src/lib/policy-editor/presets/presets.component.ts

PRESETS
Type : PolicyPreset[]
Default value : [ { name: 'Allow All', content: ` *,,view,allow *,,edit,allow ` }, { name: 'Read Only', content: ` *,,view,allow *,,edit,deny ` }, { name: 'Deny All', content: ` *,,view,deny *,,edit,deny ` } ]

libs/nx/src/executors/introspection/compat/utils/process-properties.ts

processPropertiesFactory
Default value : ({ program, checker, logger }: Pick<IntrospectionContext, 'program' | 'checker' | 'logger'>): ProcessPropertiesFunction => { // we name this function to allow us to recursively call it again function processor( typeReference: ts.Type, rootSymbol: ts.Symbol, visitedParentTypeIds: number[] = [] ) { if (undefined === typeReference?.symbol?.getDeclarations()) { return []; } const typeProperties = typeReference.getProperties(); const foundProperties = typeProperties.reduce( (accu: IntrospectionContractType[], propertySymbol: ts.Symbol) => { const propertyDeclaration = propertySymbol.declarations?.[0]; /** * Can't process properties without declarations, like enums * This will be silently ignored as we can't communicate any fix * to the user right now. */ if (!propertyDeclaration) { return accu; } let propertyOrElementType: ts.Type = checker.getTypeOfSymbolAtLocation( propertySymbol, propertyDeclaration ); const propertyTypeName: string = checker.typeToString(propertyOrElementType); // eslint-disable-next-line @typescript-eslint/no-explicit-any const propertyTypeId: number | undefined = (propertyOrElementType as any)?.symbol?.id; const hasRecursion = propertyTypeId && visitedParentTypeIds.includes(propertyTypeId); if (hasRecursion) { logger.error(` Recursion detected in a State or Resources interface: '${propertyTypeName}' of '${propertySymbol.escapedName}' is recursively defined. Recursive types/interfaces cannot be used as the State or Resources of a Building Block. Please remove the recursion and rerun this. `); return accu; } // eslint-disable-next-line @typescript-eslint/no-explicit-any const propertyParentTypeId: number | undefined = (propertySymbol as any)?.parent?.id; if (propertyParentTypeId && !visitedParentTypeIds.includes(propertyParentTypeId)) { visitedParentTypeIds.push(propertyParentTypeId); } const sourceFile: ts.SourceFile | undefined = propertySymbol.valueDeclaration?.getSourceFile(); const hasSource = sourceFile !== undefined; let propertyOrElementTypeNode: ts.TypeNode | undefined = ( propertyDeclaration as ts.PropertySignature )?.type; const isStandardLibrary = hasSource && program.isSourceFileDefaultLibrary(sourceFile); const isExternal = hasSource && program.isSourceFileFromExternalLibrary(sourceFile); /** * We don't want to show properties which are defined in the standard library * so exit immediately for this property */ if (isStandardLibrary || isExternal) { return accu; } // Can't process anything else than a property signature if (propertyDeclaration?.kind !== ts.SyntaxKind.PropertySignature) { const kind = getSyntaxKindToName(propertyDeclaration.kind); logger.error( `Found an unexpected syntax kind. Found '${kind}' where a 'PropertySignature' was expected. Please check object '${rootSymbol.escapedName}'.` ); return accu; } let typeIsArray = false; let elementTypeName = ''; if (propertyOrElementTypeNode && ts.isArrayTypeNode(propertyOrElementTypeNode)) { typeIsArray = true; propertyOrElementTypeNode = propertyOrElementTypeNode.elementType; propertyOrElementType = checker.getTypeFromTypeNode(propertyOrElementTypeNode); elementTypeName = checker.typeToString(propertyOrElementType); } const nestedProperties = processor(propertyOrElementType, rootSymbol, [ ...visitedParentTypeIds ]); const entry: IntrospectionContractType = { name: propertySymbol.getName(), type: propertyTypeName }; /** * Literals don't have a property name and makes it difficult to decide if one property matches another * You will get types like `type: '{ propC1: string; deeper: { and: { deeper: boolean; }; }; }'` * It's best to have dedicated types. We warn here and replace it with 'unknown'. */ if (propertyOrElementTypeNode?.kind === ts.SyntaxKind.TypeLiteral) { logger.warn( `Found a TypeLiteral which can't be properly stored as a type name. Found the value '${propertyTypeName}' in contract type '${rootSymbol.escapedName}'. Replaced with 'unknown'. Consider creating a local interface with a proper name.` ); entry.type = 'unknown'; } if (typeIsArray) { entry.items = { name: '', type: elementTypeName }; } if (nestedProperties && nestedProperties.length > 0) { if (entry.items) { entry.items['properties'] = nestedProperties; } else { entry.properties = nestedProperties; } } accu.push(entry); return accu; }, [] ); return foundProperties; } return processor; }

The work horse among all files: We traverse all nodes of the given ts.Type and proceed recursively to collect all types. While doing so we check for types that belong to the standard library or external libraries to prevent those types to appear in our exported file. Type "Date" would contain toString, getUTCSeconds & friends which we don't want.

libs/nx/src/executors/introspection/compat/base/process-generic.ts

processTypeArguments
Default value : ({ program, checker, context, logger }: IntrospectionContext) => { // create the working horse traversing all properties and constructing the list of types const inspectTypeFn = inspectTypeFactory({ program, checker, context, logger }); return (typeArgumentsData: ts.NodeArray<ts.TypeNode>) => { const [state, resource] = typeArgumentsData; let stateContract: IntrospectionContractType[] = []; let resourceContract: IntrospectionContractType[] = []; const stateType = getCoercedTypeNode(state); stateContract = inspectTypeFn(stateType as ts.TypeReferenceNode); const resourceType = getCoercedTypeNode(resource); resourceContract = inspectTypeFn(resourceType as ts.TypeReferenceNode); const result: Introspection = { stateContract, resourceContract }; if (stateContract.length === 0 && resourceContract.length === 0) { logger.warn( 'State & Resource Contracts are empty. Ensure this is expected as this indicates is a purely static Building Block with no data contracts' ); } return result; }; }

This function will receive a list of types extracted from a class with generics. E.g. a statement like AbstractBuildingBlock<A, B> has two type arguments A & B

We will use an instance of inspectTypeFactory to inspect each of A & B which represent the State (A) and the Resources (B) by convention (check the Abstract Building Block class)

If there are not types the inspect function handles it gracefully. type literals like string, number etc although valid for a state definition are not allowed currently. You can't do this for example AbstractBuildingBlock<number, number>

libs/nx/src/executors/shared/read-markdown.ts

readFile
Default value : util.promisify(fs.readFile)

libs/nx/src/executors/shared/metadata-utils/read-markdown.ts

readFile
Default value : util.promisify(fs.readFile)

libs/nx/src/generators/journey-src/lib/create-pages/single-page/single-page.ts

renderBuildingBlockFactory
Default value : ( exampleStateItems: BuildingBlockWithExampleMap, showDebugPanel: boolean, respectDebugToolsService: boolean ) => (block: BuildingBlockConfiguration) => { const exampleStateIdentifier = exampleState.createIdentifier(block.id); const value = exampleStateItems.has(block.id) ? exampleStateIdentifier : null; const properties = { id: block.id, aclTag: block.aclTag ?? block.id, selector: block.selector, sidebar: block.sidebar, templateReferenceID: `bb${strings.classify(block.id)}`, exampleStateIdentifier: value, showDebugPanel, respectDebugToolsService }; const content = fs .readFileSync(joinPathFragments(__dirname, 'partials/building-block')) .toString(); const renderedContent = ejs.render(content, properties, {}); return renderedContent; }

Render a Building Block. Pulled out of the actual template and rendered instead by code by using the underlying template method to prevent duplication in the template as we have two places to output Building Blocks.

libs/nx/src/executors/introspection/compat/run-introspection.ts

runIntrospectionOnFiles
Default value : (context: BuilderContext, logger: Logger) => (root: string, files: string[]): IntrospectionFileSchemaObject[] => { const results: IntrospectionFileSchemaObject[] = []; const introspectionContext = createIntrospectionContext({ root, files, context, logger }); if (!introspectionContext) { logger.error( `Unable to create introspection context for root ${root}. This is most likely not an issue with the TALY Executor but rather an issue with your TypeScript configuration. Please verify that your TypeScript project is set up properly.` ); return []; } const inspectorFn = createInspector(introspectionContext); const sourceFiles = getSourceFiles(introspectionContext.program); for (const sourceFile of sourceFiles) { const { classSymbol } = findClassWithAbstractBase(introspectionContext)(sourceFile); if (classSymbol === undefined) { continue; } logger.info(`• Inspecting '${classSymbol.getName()}'`); const introspectionResult = inspectorFn(sourceFile); const item: IntrospectionFileSchemaObject = { id: getBuildingBlockId(classSymbol), meta: { className: classSymbol.getName(), file: relative(root, sourceFile.fileName) }, introspection: introspectionResult }; results.push(item); } return results; }

Given a set of source files:

  1. For every single source file traverse the AST and check all nodes
  2. Find the first class that extends from a class named "AbstractBuildingBlock"
  3. Inspect the containing Generic Types
  4. Collect the introspection result and store it with the ID of the Building Block
  5. The result is an array full of inspections for every Building Block in the source files.

libs/sdk/src/utils/test-fixtures/page-fixture.ts

SAMPLE_PAGE
Type : Page
Default value : { pagesConfig: { blocks: [ { id: 'some-building-block', module: 'SomeBuildingBlockModule', package: 'my-library', selector: 'bb-some-building-block' } ], id: 'my-test-page' }, pfeConfig: { pageId: 'my-test-page' } }
SAMPLE_PAGE_INCOHERENT_ID
Type : Page
Default value : { ...SAMPLE_PAGE, pfeConfig: { pageId: SAMPLE_PAGE.pfeConfig.pageId + '-suffix' } }

libs/sdk/src/cli/migrations/migrate.ts

spinner
Default value : ora()

libs/sdk/src/node/journey/load/split-journey/split-journey.ts

SPLIT_JOURNEY_PATHS
Default value : { FILES: { APPLICATION: 'application', NAVIGATION: 'navigation', POLICY: 'policy.txt' }, FOLDERS: { SERVICE_ACTIVATORS: 'service-activators', PAGES: 'pages', ACTIONS: 'actions' } } as const

libs/core/src/lib/utils.ts

STRING_CAMELIZE_REGEXP
Default value : /(-|_|\.|\s)+(.)?/g
STRING_DASHERIZE_REGEXP
Default value : /[ _]/g

Cherry picked from Angular Sources to have a dasherize function at hands.

STRING_DECAMELIZE_REGEXP
Default value : /([a-z\d])([A-Z])/g

libs/acl/src/lib/acl-engine/strings.ts

STRING_DASHERIZE_REGEXP
Default value : /[ _]/g

Cherry picked from Angular Sources to have a dasherize function at hands.

STRING_DECAMELIZE_REGEXP
Default value : /([a-z\d])([A-Z])/g

libs/sdk/src/lib/journey/utils/string-utils.ts

STRING_DASHERIZE_REGEXP
Default value : /[ _.]/g

dasherize & decamelize are cherry-picked from '@nx/devkit/src/utils/string-utils' to have a dasherize function at hands.

STRING_DECAMELIZE_REGEXP
Default value : /([a-z\d])([A-Z])/g

libs/common/frame/src/core/tokens.ts

TALY_FRAME_FOOTER_CONFIG
Default value : new InjectionToken<FooterConfiguration>( `TALY_FRAME_FOOTER_CONFIG - Configuration for TALY Frame Footer` )
TALY_FRAME_HEADER_CONFIG
Default value : new InjectionToken<HeaderConfiguration>( `TALY_FRAME_HEADER_CONFIG - Configuration for TALY Frame Header` )
TALY_FRAME_NAVIGATION_CONFIG
Default value : new InjectionToken<NavigationConfig>( `TALY_FRAME_NAVIGATION_CONFIG - Configuration for TALY Frame Navigation` )
TALY_FRAME_STAGE_CONFIG
Default value : new InjectionToken<StageConfiguration>( `TALY_FRAME_STAGE_CONFIG - Configuration for TALY Frame Stage` )

libs/nx/src/generators/journey-src/lib/scaffold-core/theme-file.ts

THEME_STORE_FOLDER
Type : string
Default value : 'assets'

libs/core/src/lib/form-support/validation.ts

validationMapCache
Default value : new Map< UntypedFormGroup, { validationMap: Map<string, ValidationConfig[]>; cleanup$: ReplaySubject<void> } >()

libs/nx/src/generators/journey-src/lib/create-pages/single-page/example-state.ts

VARIABLE_IDENTIFIER_SUFFIX
Type : string
Default value : 'ExampleState'

libs/common/web-components/src/utils/tokens.ts

WEB_COMPONENT_ID
Default value : new InjectionToken('WEB_COMPONENT_ID')

libs/common/web-components/src/utils/utils.ts

WEB_COMPONENT_ROUTE_COMBINER
Type : string
Default value : ':'
WEB_COMPONENT_ROUTE_REGEX
Default value : /\((.*?)\)/
WEB_COMPONENT_ROUTE_SEPARATOR
Type : string
Default value : ','

libs/nx/src/executors/introspection/compat/introspection.impl.ts

writeFile
Default value : util.promisify(fs.writeFile)

libs/nx/src/executors/journal/compat/write-journal.ts

writeFile
Default value : util.promisify(fs.writeFile)

results matching ""

    No results matching ""