-
Notifications
You must be signed in to change notification settings - Fork 11
/
AppConfig.ts
126 lines (104 loc) · 3.09 KB
/
AppConfig.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
import { SpinnerComponent } from './Components/Spinner';
import { LayoutComponent } from './Components/Layout';
import { ContentAreaSiteConfig } from './Components/ContentArea';
import { IComponentPreloadList } from './Loaders/ComponentPreLoader';
import IInitializableModule from './Core/IInitializableModule';
import IRouteConfig from './Routing/IRouteConfig';
import { AxiosAdapter } from 'axios';
import { IRepositoryConfig } from './Repository/IRepository';
import { IComponentLoaderConfig } from './Loaders/ComponentLoader'
import IContentDeliveryConfig from './ContentDelivery/Config';
import { TypeMapperType } from './Loaders/BaseTypeMapper';
export type AppConfig = {
/**
* Enable debug logging to the console
*/
enableDebug?: boolean;
/**
* Prefer guid for content fetching (preferred if running
* multiple domains).
*/
preferGuid?: boolean;
/**
* Disable all communication with the ContentDelivery API
*/
noAjax?: boolean;
/**
* The base path, relative to the domain where the SPA is running
*/
basePath: string;
/**
* The base URL where the spa is running, if different then the epiBaseUrl;
*/
spaBaseUrl?: string
/**
* The URL where Episerver is running, may or may not be the same as the basePath
*/
epiBaseUrl: string;
/**
* The default language to use, if none specified
*/
defaultLanguage: string;
/**
* Should sub-requests be minimized by loading related content (1 level deep)
* by default?
*/
autoExpandRequests?: boolean;
/**
*
*/
enableSpinner?: boolean;
/**
* If this value is set to a number greater then 0, this is the amount of
* miliseconds to wait before a spinner will be shown
*/
spinnerTimeout?: number;
/**
* The spinner to use
*/
spinner?: SpinnerComponent;
/**
* The layout to apply to the website, this is the "frame" around the routed
* content.
*/
layout?: LayoutComponent;
/**
* Content Area configuration
*/
contentArea?: ContentAreaSiteConfig;
/**
* List of components to be preloaded before hydration of the content, this
* ensures "error-free" hydration at the chance of visitors clicking on links
* before the full SPA has been loaded.
*/
preLoadComponents?: IComponentPreloadList;
/**
* The list of module initializers to included into the bootstrapping process
*/
modules ?: IInitializableModule[];
/**
* The list of routes to be pre-pended to the Episerver route-handler (e.g. the * handler)
*/
routes ?: IRouteConfig
/**
* Override the standard adapter used by Axios to connect to the ContentDelivery API.
*/
networkAdapter ?: AxiosAdapter
/**
* Additional configuration for the IContentRepository
*/
iContentRepository ?: Partial<IRepositoryConfig>
/**
* New configuration location for the ContentDelivery API
*/
iContentDelivery ?: Partial<IContentDeliveryConfig>
/**
* Configure the component loaders
*/
componentLoaders ?: IComponentLoaderConfig
/**
* Create instance objects from raw iContent data
*/
typeMapper ?: TypeMapperType
}
export default AppConfig;