Module: @ima/core
Enumerations
Classes
- AbstractController
- AbstractExecution
- AbstractExtension
- AbstractPageManager
- AbstractRoute
- AbstractRouter
- Bootstrap
- Cache
- CacheEntry
- CacheFactory
- CacheImpl
- CancelError
- ClientPageManager
- ClientRouter
- ClientWindow
- ComponentUtils
- Controller
- ControllerDecorator
- CookieStorage
- Dictionary
- Dispatcher
- DispatcherImpl
- DynamicRoute
- Entry
- Error
- EventBus
- EventBusImpl
- Execution
- Extension
- GenericError
- HttpAgent
- HttpAgentImpl
- HttpProxy
- MapStorage
- MessageFormatDictionary
- MetaManager
- MetaManagerImpl
- Namespace
- ObjectContainer
- PageFactory
- PageHandler
- PageHandlerRegistry
- PageManager
- PageMetaHandler
- PageNavigationHandler
- PageRenderer
- PageStateManager
- PageStateManagerDecorator
- PageStateManagerImpl
- PluginLoader
- Request
- Response
- RouteFactory
- Router
- SerialBatch
- ServerPageManager
- ServerRouter
- ServerWindow
- SessionMapStorage
- SessionStorage
- StaticRoute
- Storage
- UrlTransformer
- WeakMapStorage
- Window
Interfaces
- AppEnvironment
- BootConfig
- BootServices
- DictionaryMap
- DispatcherEventsMap
- Environment
- GlobalImaObject
- HttpAgentRequestOptions
- ImaRequestInit
- InitAppConfig
- InitImaConfig
- InitPluginConfig
- Manifest
- ManifestAsset
- OCAliasMap
- PageAction
- PageRendererSettings
- Resources
- RouteAction
- RouteFactoryOptions
- RouteLocals
- RouteOptions
- Settings
- Utils
- WindowCustomEventsMap
Type Aliases
AnyParameters
Ƭ AnyParameters: Object
Index signature
▪ [key: string
]: unknown
Defined in
AppSettings
Ƭ AppSettings: Object
App settings function, used in ./app/config/settings.js
Type declaration
Name | Type |
---|---|
dev? | PartialDeep <Settings > |
prod | Settings |
regression? | PartialDeep <Settings > |
test? | PartialDeep <Settings > |
Defined in
AsyncRouteController
Ƭ AsyncRouteController: WithAsync
<RouteController
>
Defined in
packages/core/src/router/AbstractRoute.ts:27
AsyncRouteView
Ƭ AsyncRouteView: WithAsync
<RouteView
>
Defined in
packages/core/src/router/AbstractRoute.ts:28
BootSettings
Ƭ BootSettings: Pick
<GlobalImaObject
, "$Version"
| "$Debug"
| "$Env"
| "$Version"
| "$App"
| "$Protocol"
| "$Language"
| "$Host"
| "$Path"
| "$Root"
| "$LanguagePartPath"
>
Defined in
packages/core/src/Bootstrap.ts:82
Cookie
Ƭ Cookie: Object
Type declaration
Name | Type |
---|---|
options | CookieOptions |
value | string | number | boolean | Date | undefined |
Defined in
packages/core/src/storage/CookieStorage.ts:33
CookieOptions
Ƭ CookieOptions: Object
Type declaration
Name | Type |
---|---|
domain? | string |
expires? | Date |
httpOnly? | boolean |
maxAge? | number |
partitioned? | boolean |
path? | string |
sameSite? | "none" | "lax" | "strict" |
secure? | boolean |
Defined in
packages/core/src/storage/CookieStorage.ts:22
CookieTransformFunction
Ƭ CookieTransformFunction: Object
Type declaration
Name | Type |
---|---|
decode | (value : string ) => string |
encode | (value : string ) => string |
Defined in
packages/core/src/router/Response.ts:10
DecoratedOCAliasMap
Ƭ DecoratedOCAliasMap: AddOCChaining
<OCAliasMap
> & WithOCOptional
<OCAliasMap
> & WithOCOptionalSpread
<OCAliasMap
> & WithOCSpread
<OCAliasMap
>
Defined in
packages/core/src/config/bind.ts:68
Dependencies
Ƭ Dependencies<T
>: Dependency
<T
>[]
Type parameters
Name | Type |
---|---|
T | any |
Defined in
packages/core/src/oc/ObjectContainer.ts:23
Dependency
Ƭ Dependency<T
>: keyof DecoratedOCAliasMap
| OCInjectable
<T
> | [OCInjectable
<T
>, { optional
: boolean
}]
Type parameters
Name |
---|
T |
Defined in
packages/core/src/oc/ObjectContainer.ts:24
DictionaryConfig
Ƭ DictionaryConfig: Object
Type declaration
Name | Type |
---|---|
$Language | string |
dictionary | DictionaryData |
Defined in
packages/core/src/dictionary/Dictionary.ts:3
DictionaryData
Ƭ DictionaryData: Object
Index signature
▪ [key: string
]: DictionaryData
| LocalizationFunction
Defined in
packages/core/src/dictionary/Dictionary.ts:8
DispatcherListener
Ƭ DispatcherListener<D
>: (data
: D
) => void
Type parameters
Name |
---|
D |
Type declaration
▸ (data
): void
Parameters
Name | Type |
---|---|
data | D |
Returns
void
Defined in
packages/core/src/event/Dispatcher.ts:12
EntryOptions
Ƭ EntryOptions: Object
Type declaration
Name | Type |
---|---|
writeable | boolean |
Defined in
packages/core/src/oc/Entry.ts:7
EventBusEventHandler
Ƭ EventBusEventHandler: (data?
: UnknownParameters
) => void
Type declaration
▸ (data?
): void
Parameters
Name | Type |
---|---|
data? | UnknownParameters |
Returns
void
Defined in
packages/core/src/event/EventBus.ts:5
EventBusListener
Ƭ EventBusListener: (event
: CustomEvent
) => unknown
Type declaration
▸ (event
): unknown
Parameters
Name | Type |
---|---|
event | CustomEvent |
Returns
unknown
Defined in
packages/core/src/event/EventBus.ts:3
EventBusOptions
Ƭ EventBusOptions: Object
Type declaration
Name | Type |
---|---|
bubbles? | boolean |
cancelable? | boolean |
composed? | boolean |
Defined in
packages/core/src/event/EventBus.ts:9
ExecutionJob
Ƭ ExecutionJob: (...args
: unknown
[]) => Promise
<unknown
> | unknown
Type declaration
▸ (...args
): Promise
<unknown
> | unknown
Parameters
Name | Type |
---|---|
...args | unknown [] |
Returns
Promise
<unknown
> | unknown
Defined in
packages/core/src/execution/Execution.ts:1
GenericErrorParams
Ƭ GenericErrorParams: Object
Index signature
▪ [key: string
]: unknown
Type declaration
Name | Type |
---|---|
cause? | Error | string |
status? | number |
Defined in
packages/core/src/error/GenericError.ts:3
HttpAgentResponse
Ƭ HttpAgentResponse<B
>: Object
A response from the server.
Type parameters
Name |
---|
B |
Type declaration
Name | Type |
---|---|
body | B |
cached | boolean |
headers | StringParameters |
headersRaw? | Headers |
params | HttpProxyRequestParams |
status | number |
Defined in
packages/core/src/http/HttpAgent.ts:55
HttpProxyErrorParams
Ƭ HttpProxyErrorParams<B
>: { body
: B
; cause
: Error
; errorName
: string
; status
: number
} & HttpProxyRequestParams
An object that describes a failed HTTP request, providing information about both the failure reported by the server and how the request has been sent to the server.
Type parameters
Name | Type |
---|---|
B | unknown |
Defined in
packages/core/src/http/HttpProxy.ts:51
HttpProxyRequestParams
Ƭ HttpProxyRequestParams: Object
An object representing the complete request parameters used to create and send the HTTP request.
Type declaration
Name | Type |
---|---|
data? | UnknownParameters |
method | string |
options | HttpAgentRequestOptions |
transformedUrl | string |
url | string |
Defined in
packages/core/src/http/HttpProxy.ts:27
InitBindFunction
Ƭ InitBindFunction: (ns
: Namespace
, oc
: ObjectContainer
, config
: Required
<BootConfig
>["bind"
], state
: BindingState
) => void
Type declaration
▸ (ns
, oc
, config
, state
): void
Parameters
Name | Type |
---|---|
ns | Namespace |
oc | ObjectContainer |
config | Required <BootConfig >["bind" ] |
state | BindingState |
Returns
void
Defined in
packages/core/src/Bootstrap.ts:16
InitRoutesFunction
Ƭ InitRoutesFunction: (ns
: Namespace
, oc
: ObjectContainer
, routes
: UnknownParameters
| undefined
, router
: Router
) => void
Type declaration
▸ (ns
, oc
, routes
, router
): void
Parameters
Name | Type |
---|---|
ns | Namespace |
oc | ObjectContainer |
routes | UnknownParameters | undefined |
router | Router |
Returns
void
Defined in
packages/core/src/Bootstrap.ts:23
InitServicesFunction
Ƭ InitServicesFunction: (ns
: Namespace
, oc
: ObjectContainer
, config
: BootConfig
["services"
]) => void
Type declaration
▸ (ns
, oc
, config
): void
Parameters
Name | Type |
---|---|
ns | Namespace |
oc | ObjectContainer |
config | BootConfig ["services" ] |
Returns
void
Defined in
packages/core/src/Bootstrap.ts:30
InitSettingsFunction
Ƭ InitSettingsFunction: (ns
: Namespace
, oc
: ObjectContainer
, config
: BootConfig
["settings"
]) => AppSettings
Type declaration
▸ (ns
, oc
, config
): AppSettings
Parameters
Name | Type |
---|---|
ns | Namespace |
oc | ObjectContainer |
config | BootConfig ["settings" ] |
Returns
Defined in
packages/core/src/Bootstrap.ts:36
LoadedResources
Ƭ LoadedResources<T
>: Intersection
<Partial
<Pick
<T
, Matching
<T
, Promise
<any
>>>>, Required
<Pick
<T
, NonMatching
<T
, Promise
<any
>>>>>
Type parameters
Name |
---|
T |
Defined in
packages/core/src/controller/Controller.ts:27
LocalizationFunction
Ƭ LocalizationFunction: (parameters
: ObjectParameters
) => string
Type declaration
▸ (parameters
): string
Parameters
Name | Type |
---|---|
parameters | ObjectParameters |
Returns
string
Defined in
packages/core/src/dictionary/Dictionary.ts:12
ManageArgs
Ƭ ManageArgs: Object
Type declaration
Name | Type |
---|---|
action? | PageAction |
options | RouteOptions |
params? | RouteParams |
route | InstanceType <typeof AbstractRoute > |
Defined in
packages/core/src/page/manager/PageManager.ts:5
ManagedPage
Ƭ ManagedPage: Object
Type declaration
Name | Type |
---|---|
controller | RouteController |
controllerInstance | Controller |
decoratedController | ControllerDecorator |
options | RouteOptions |
params | RouteParams |
route | InstanceType <typeof AbstractRoute > |
state | { abort? : { promise : Promise <void > ; reject : () => void ; resolve : () => void } ; activated : boolean ; cancelled : boolean ; executed : boolean ; initialized : boolean ; mounted : boolean ; page : { promise : Promise <void > ; reject : () => void ; resolve : () => void } } |
state.abort? | { promise : Promise <void > ; reject : () => void ; resolve : () => void } |
state.abort.promise | Promise <void > |
state.abort.reject | () => void |
state.abort.resolve | () => void |
state.activated | boolean |
state.cancelled | boolean |
state.executed | boolean |
state.initialized | boolean |
state.mounted | boolean |
state.page | { promise : Promise <void > ; reject : () => void ; resolve : () => void } |
state.page.promise | Promise <void > |
state.page.reject | () => void |
state.page.resolve | () => void |
view | unknown |
viewInstance | unknown |
Defined in
packages/core/src/page/PageTypes.ts:11
MetaAttributes
Ƭ MetaAttributes: Record
<string
, MetaValue
>
Defined in
packages/core/src/meta/MetaManager.ts:2
MetaManagerRecord
Ƭ MetaManagerRecord<K
>: { [key in K]: MetaValue } & MetaAttributes
Type parameters
Name | Type |
---|---|
K | extends MetaManagerRecordKeys |
Defined in
packages/core/src/meta/MetaManager.ts:5
MetaManagerRecordKeys
Ƭ MetaManagerRecordKeys: "content"
| "href"
Defined in
packages/core/src/meta/MetaManager.ts:4
MetaValue
Ƭ MetaValue: number
| boolean
| string
| null
| undefined
Defined in
packages/core/src/meta/MetaManager.ts:1
NativeListener
Ƭ NativeListener: (event
: CustomEvent
| Event
) => unknown
Type declaration
▸ (event
): unknown
Parameters
Name | Type |
---|---|
event | CustomEvent | Event |
Returns
unknown
Defined in
packages/core/src/event/EventBus.ts:7
OCInjectable
Ƭ OCInjectable<T
>: Constructor
<T
> & WithDependencies
| AbstractConstructor
<T
> & Partial
<WithDependencies
> | Function
& { prototype
: T
} & Partial
<WithDependencies
>
Type parameters
Name |
---|
T |
Defined in
packages/core/src/oc/ObjectContainer.ts:18
OCInstance
Ƭ OCInstance<T
>: T
extends keyof DecoratedOCAliasMap
? DecoratedOCAliasMap
[T
] : T
extends AbstractConstructor
<any
> | Constructor
<any
> ? InstanceType
<T
> : T
extends [AbstractConstructor
<any
> | Constructor
<any
>, { optional
: true
}] ? InstanceType
<T
[0
]> | null
: T
Type parameters
Name | Type |
---|---|
T | extends OCInstanceConstrain |
Defined in
packages/core/src/oc/ObjectContainer.ts:40
OCInstanceConstrain
Ƭ OCInstanceConstrain<T
>: keyof DecoratedOCAliasMap
| Constructor
<T
> | AbstractConstructor
<T
> | [AbstractConstructor
<T
> | Constructor
<T
>, { optional
: true
}]
Type parameters
Name | Type |
---|---|
T | any |
Defined in
packages/core/src/oc/ObjectContainer.ts:34
ObjectParameters
Ƭ ObjectParameters: Object
Index signature
▪ [key: string
]: boolean
| number
| string
| Date
Defined in
PageData
Ƭ PageData: { status
: number
} & UnknownParameters
Defined in
packages/core/src/page/PageTypes.ts:50
PageState
Ƭ PageState: Object
Index signature
▪ [key: string
]: any
Defined in
packages/core/src/page/state/PageStateManager.ts:1
PluginInitBindFunction
Ƭ PluginInitBindFunction: (ns
: Namespace
, oc
: ObjectContainer
, config
: Required
<BootConfig
>["bind"
], isDynamicallyLoaded
: boolean
, name?
: string
) => void
Type declaration
▸ (ns
, oc
, config
, isDynamicallyLoaded
, name?
): void
Parameters
Name | Type |
---|---|
ns | Namespace |
oc | ObjectContainer |
config | Required <BootConfig >["bind" ] |
isDynamicallyLoaded | boolean |
name? | string |
Returns
void
Defined in
packages/core/src/Bootstrap.ts:42
PluginInitServicesFunction
Ƭ PluginInitServicesFunction: (ns
: Namespace
, oc
: ObjectContainer
, config
: BootConfig
["services"
], isDynamicallyLoaded
: boolean
) => void
Type declaration
▸ (ns
, oc
, config
, isDynamicallyLoaded
): void
Parameters
Name | Type |
---|---|
ns | Namespace |
oc | ObjectContainer |
config | BootConfig ["services" ] |
isDynamicallyLoaded | boolean |
Returns
void
Defined in
packages/core/src/Bootstrap.ts:50
PluginInitSettingsFunction
Ƭ PluginInitSettingsFunction: (ns
: Namespace
, oc
: ObjectContainer
, config
: BootConfig
["settings"
], isDynamicallyLoaded
: boolean
) => PartialDeep
<AppSettings
>
Type declaration
▸ (ns
, oc
, config
, isDynamicallyLoaded
): PartialDeep
<AppSettings
>
Parameters
Name | Type |
---|---|
ns | Namespace |
oc | ObjectContainer |
config | BootConfig ["settings" ] |
isDynamicallyLoaded | boolean |
Returns
PartialDeep
<AppSettings
>
Defined in
packages/core/src/Bootstrap.ts:57
Resource
Ƭ Resource: string
| [string
, { [attribute: string]
: unknown
; fallback
: boolean
}]
Defined in
RouteController
Ƭ RouteController: keyof OCAliasMap
| Constructor
<Controller
<any
>> | AbstractConstructor
<Controller
<any
>>
Defined in
packages/core/src/router/AbstractRoute.ts:15
RouteParams
Ƭ RouteParams<T
>: Partial
<{ [K in keyof T]: T[K] }> & { [key: string]
: string
| GenericError
; }
Type parameters
Name | Type |
---|---|
T | {} |
Defined in
packages/core/src/router/AbstractRoute.ts:9
RoutePathExpression
Ƭ RoutePathExpression: Object
Path expression type used for router routes definition.
Type declaration
Name | Type | Description |
---|---|---|
extractParameters | (trimmedPath : string , additionalData : { path : string ; query : RouteParams }) => RouteParams | Function which takes care of parsing url params from given path. It returns object of key/value pairs which correspond to expected path url params and their values. |
matcher | RegExp | RegExp use in router for path matching to current route. |
toPath | (params : RouteParams ) => string | Function that generates valid path from given route params. |
Defined in
packages/core/src/router/DynamicRoute.ts:23
RouteView
Ƭ RouteView: keyof OCAliasMap
| Constructor
<any
> | AbstractConstructor
<any
> | (...args
: any
[]) => any
Defined in
packages/core/src/router/AbstractRoute.ts:20
RouterMiddleware
Ƭ RouterMiddleware: (params
: RouteParams
, locals
: RouteLocals
, next?
: (result
: UnknownParameters
) => void
) => UnknownParameters
| void
| Promise
<UnknownParameters
| void
>
Type declaration
▸ (params
, locals
, next?
): UnknownParameters
| void
| Promise
<UnknownParameters
| void
>
Parameters
Name | Type |
---|---|
params | RouteParams |
locals | RouteLocals |
next? | (result : UnknownParameters ) => void |
Returns
UnknownParameters
| void
| Promise
<UnknownParameters
| void
>
Defined in
packages/core/src/router/Router.ts:29
SerializedCacheEntry
Ƭ SerializedCacheEntry<V
>: Object
Type parameters
Name |
---|
V |
Type declaration
Name | Type |
---|---|
ttl | number | string |
value | V |
Defined in
packages/core/src/cache/CacheEntry.ts:1
SerializedData
Ƭ SerializedData<V
>: Object
Type parameters
Name | Type |
---|---|
V | unknown |
Index signature
▪ [key: string
]: { ttl
: number
; value
: V
}
Defined in
packages/core/src/cache/Cache.ts:1
StringParameters
Ƭ StringParameters: Object
Index signature
▪ [key: string
]: string
Defined in
UnknownParameters
Ƭ UnknownParameters: Object
Index signature
▪ [key: string
]: unknown
Defined in
UnknownPromiseParameters
Ƭ UnknownPromiseParameters: Object
Index signature
▪ [key: string
]: unknown
| Promise
<unknown
>
Defined in
WindowEventTargets
Ƭ WindowEventTargets: Document
| globalThis.Window
| HTMLBodyElement
| SVGSVGElement
| SVGElement
| HTMLMediaElement
| HTMLVideoElement
| Element
Defined in
packages/core/src/window/Window.ts:4
WindowEventTargetsMap
Ƭ WindowEventTargetsMap<E
>: E
extends Document
? DocumentEventMap
: E
extends globalThis.Window
? WindowEventMap
: E
extends HTMLBodyElement
? HTMLBodyElementEventMap
: E
extends SVGSVGElement
? SVGSVGElementEventMap
: E
extends SVGElement
? SVGElementEventMap
: E
extends HTMLMediaElement
? HTMLMediaElementEventMap
: E
extends HTMLVideoElement
? HTMLVideoElementEventMap
: HTMLElementEventMap
& WindowCustomEventsMap
Type parameters
Name | Type |
---|---|
E | extends WindowEventTargets |
Defined in
packages/core/src/window/Window.ts:14
Variables
ns
• Const
ns: Namespace
Defined in
packages/core/src/Namespace.ts:123
pluginLoader
• Const
pluginLoader: PluginLoader
Defined in
packages/core/src/pluginLoader.ts:93
Functions
bootClientApp
▸ bootClientApp(app
, bootConfig
): Object
Parameters
Name | Type |
---|---|
app | Object |
app.bootstrap | Bootstrap |
app.oc | ObjectContainer |
bootConfig | BootConfig |
Returns
Object
Name | Type |
---|---|
bootstrap | Bootstrap |
oc | ObjectContainer |
Defined in
createImaApp
▸ createImaApp(): Object
Returns
Object
Name | Type |
---|---|
bootstrap | Bootstrap |
oc | ObjectContainer |
Defined in
getClientBootConfig
▸ getClientBootConfig(initialAppConfigFunctions
): BootConfig
Parameters
Name | Type |
---|---|
initialAppConfigFunctions | InitAppConfig |
Returns
Defined in
getInitialImaConfigFunctions
▸ getInitialImaConfigFunctions(): InitImaConfig
Returns
Defined in
getInitialPluginConfig
▸ getInitialPluginConfig(): Object
Returns
Object
Name | Type |
---|---|
plugins | { name : string ; plugin : InitPluginConfig }[] |
Defined in
getNamespace
▸ getNamespace(): Namespace
Returns
Defined in
packages/core/src/Namespace.ts:125
onLoad
▸ onLoad(): Promise
<unknown
>
Returns
Promise
<unknown
>
Defined in
reviveClientApp
▸ reviveClientApp(initialAppConfigFunctions
): Promise
<UnknownParameters
& { app
: { bootstrap
: Bootstrap
; oc
: ObjectContainer
} ; bootConfig
: BootConfig
}>
Parameters
Name | Type |
---|---|
initialAppConfigFunctions | InitAppConfig |
Returns
Promise
<UnknownParameters
& { app
: { bootstrap
: Bootstrap
; oc
: ObjectContainer
} ; bootConfig
: BootConfig
}>
Defined in
routeClientApp
▸ routeClientApp(app
): Promise
<void
| UnknownParameters
>
Parameters
Name | Type |
---|---|
app | Object |
app.bootstrap | Bootstrap |
app.oc | ObjectContainer |
Returns
Promise
<void
| UnknownParameters
>