environment.defaults.ts 10.4 KB
Newer Older
1
2
// This file should contains all the defaults settings shared in all environment files
// If you want to override properties for specific environment, do it in these files
3

4
import {ErrorBackendKeyEnum} from "@app/shared/enums/error-backend-key.enum";
5
import {ThemeEnum} from "@app/shared/enums/theme.enum";
Florent POITTEVIN's avatar
Florent POITTEVIN committed
6
import {Enums} from "@enums";
7
import {ChemicalMoleculeVisualizationEnum} from "@shared/enums/chemical-molecule-visualization.enum";
8
9
10
11
import {
  AppRoutesEnum,
  RoutesEnum,
} from "@shared/enums/routes.enum";
12
import {ViewModeTableEnum} from "@shared/enums/view-mode-table.enum";
13
import {SnackbarPresentational} from "solidify-frontend";
14
import {DlcmEnvironment} from "./environment.defaults.model";
15
16

export const defaultEnvironment: DlcmEnvironment = {
17
  appTitle: "DLCM - Portal",
18
  appDescription: "Platform for archiving research data",
19
  production: false,
20
21
  forceRuntimeOverrideSetting: false,
  isDemoMode: false,
22
  maintenanceMode: false,
23
24
  listTagsComponentsWhereClickAllowToEnterInEditMode: [], // TODO DEFINED
  positionLabelInputMaterial: "auto",
25
  ribbonEnabled: true,
26
  ribbonColor: "#e60000",
27
  ribbonText: "Dev",
28

Florent POITTEVIN's avatar
Florent POITTEVIN committed
29
  defaultLanguage: Enums.Language.LanguageEnum.en,
30
  appLanguages: [Enums.Language.LanguageEnum.en, Enums.Language.LanguageEnum.fr],
31
32
33
34
35
36
37
38
39
40
41
42
43
  appLanguagesTranslate: Enums.Language.LanguageEnumTranslate,
  appThemes: [ThemeEnum.dlcm, ThemeEnum.yareta, ThemeEnum.olos],
  appThemesTranslate: [
    {key: ThemeEnum.dlcm, value: "DLCM"},
    {key: ThemeEnum.yareta, value: "Yareta"},
    {key: ThemeEnum.olos, value: "Olos"},
  ],
  theme: ThemeEnum.dlcm,
  appState: undefined,
  appUserState: undefined,
  routeHomePage: RoutesEnum.homePage,
  routeSegmentEdit: AppRoutesEnum.edit,

44
  defaultEnumValuePageSizeLazyLoad: 20,
45
  computeOAuthEndpoint: false,
46
  googleAnalyticsId: undefined, // Format "UA-000000000-1"
47
  googleAnalyticsLearnMorePage: undefined,
48
  appearanceInputMaterial: "outline",
49
  defaultStickyDatatableHeight: 40,
50
51
52
  displayPrivacyPolicyAndTermsOfUseApprovalDialog: false,
  privacyPolicyLink: "",
  termsOfUseLink: "",
53

Homada.Boumedane's avatar
Homada.Boumedane committed
54
55
  // Base URL For Module Applications (override by AppAction.LoadModules)
  admin: "http://localhost:16115/dlcm/admin",
56

57
58
59
60
  // Documentation
  documentationTocApisGuide: "DLCM-APIs-toc.html",
  documentationTocIntegrationGuide: "DLCM-IntegrationGuide-toc.html",
  documentationTocToolsGuide: "DLCM-ToolsGuide-toc.html",
61
  documentationTocUserGuidePath: undefined,
62
63
  documentationTocUserGuide: undefined,

64
  // OAuth2 properties
65
66
  oidc: false,
  requestAccessToken: true,
67
  tokenEndpoint: "http://localhost:4200/dlcm/oauth/token",
68
69
70
71
72
  dummyClientSecret: "123abc",
  clientId: "local-dev-angular",
  responseType: "token",
  scope: "READ",
  requireHttps: false,
73
  loginUrl: "http://localhost:4200/dlcm/oauth/authorize",
74
  allowedUrls: [],
75
76
77
78
79
80
81
  redirectUrl: window.location.origin,
  timeoutFactor: 0.75,
  postLogoutRedirectUri: "",
  logoutUrl: "",
  nonceStateSeparator: ";",
  disableNonceCheck: false,
  sendAccessToken: true,
82
  tokenInMemoryStorage: false,
83
  reloadAfterLogout: false,
84

85
  // Orcid
86
  orcidQueryParam: "orcid",
87
  orcidAuthorizeUrl: "https://orcid.org/oauth/authorize",
88
  orcidUrl: "http://orcid.org",
89

90
91
92
  // Access request
  accessRequestRoute: "accessRequest",

93
94
95
96
97
98
  // Datatable
  pageSizeOptions: [5, 10, 25, 50, 100],
  cdkDropListIdPrefix: "cdkDropList-",
  maximalPageSizeToRetrievePaginationInfo: 2000,
  defaultPageSize: 10,

99
  // Breakpoint
100
101
102
103
  breakpointXs: "0px",
  breakpointSm: "576px",
  breakpointMd: "992px",
  breakpointLg: "1360px",
104

105
106
  // === Solidify Notification Environment ===
  defaultNotificationComponent: SnackbarPresentational as any,
107
108
109
110
  defaultNotificationErrorDurationInSeconds: 5,
  defaultNotificationSuccessDurationInSeconds: 3,
  defaultNotificationWarningDurationInSeconds: 3,
  defaultNotificationInformationDurationInSeconds: 3,
111

Florent Poittevin's avatar
Florent Poittevin committed
112
  modalHeight: "400px",
113
  modalWidth: "90%",
114
  showDebugInformation: false,
115
  institutionUrl: "https://www.unige.ch/",
116

117
  // === Solidify Spinner Environment ===
118
119
120
121
122
  defaultSpinnerStrokeWidth: 3,
  defaultSpinnerDiameter: 75,
  defaultButtonSpinnerStrokeWidth: 3,
  defaultButtonSpinnerDiameter: 24,

123
124
125
126
127
128
129
  // === Local Environment ===
  defaultPageSizeHomePage: 10,
  defaultEnumValuePageSizeOption: 10000,
  defaultHomeOrgUnitSize: 1000,
  minimalPageSizeToRetrievePaginationInfo: 1,
  carouselUrl: undefined,

130
131
  // Home
  defaultHomeViewModeTableEnum: ViewModeTableEnum.tiles,
Florent Poittevin's avatar
Florent Poittevin committed
132
133
134

  // Tweeter
  twitterAccount: "dlcm_ch",
135
  twitterTweetToDisplay: 4,
Florent POITTEVIN's avatar
Florent POITTEVIN committed
136
  frequencyChangeCarouselTileInSecond: 5,
Florent Poittevin's avatar
Florent Poittevin committed
137

138
139
  urlNationalArchivePronom: "https://www.nationalarchives.gov.uk/PRONOM/",

140
  // Tooltip duration
141
  timeBeforeDisplayTooltipOnInput: 680,
142

143
144
  doiLink: "https://doi.org/",

Florent Poittevin's avatar
Florent Poittevin committed
145
  // Polling
146
  refreshTabStatusCounterIntervalInSecond: 60,
Florent Poittevin's avatar
Florent Poittevin committed
147
  refreshOrderAvailableIntervalInSecond: 5,
148
  refreshNotificationInboxAvailableIntervalInSecond: 60,
149
  refreshDepositSubmittedIntervalInSecond: 2,
150
151
  pollingMaxIntervalInSecond: 60,

152
153
154
155
156
  // === Solidify Download Environment ===
  downloadTokenEndpoint: undefined, // TODO DEFINE
  useSelfHostedStreamSaverMitm: false,
  timeBeforeDisplayTooltipOnDataTable: 500,

157
  // Errors
158
159
160
161
  httpErrorKeyToSkipInErrorHandler: [
    ErrorBackendKeyEnum.UPLOAD_DUPLICATE_DATA_FILES,
  ],
  errorToSkipInErrorHandler: new Error("ERROR TO SKIP IN ERROR HANDLER"),
162

163
  classInputIgnored: "ignored-input",
164
  classInputHide: "hidden-input",
Quentin Torck's avatar
Quentin Torck committed
165
166

  // Visualization
Quentin Torck's avatar
Quentin Torck committed
167
168
169
170
  visualizationMaxSizeFile: 300000000,
  visualizationChemicalMoleculeMode: ChemicalMoleculeVisualizationEnum.threeAndTwoDimensional,
  visualizationChemicalMolecule2dLibs: ["JSmolJME.js", "jsme.nocache.js"],
  visualizationChemicalMolecule3dLib: "JSmol.min.js",
Quentin Torck's avatar
Quentin Torck committed
171
172

  // image constant
173
174
  visualizationImageExtensions: ["png", "gif", "jpeg", "svg"],
  visualizationImageContentType: ["image/gif", "image/png", "image/jpeg", "image/svg+xml"],
175
176
  visualizationImageMimeType: ["image/gif", "image/png", "image/jpeg", "image/svg+xml"],
  visualizationImagePronomId: ["fmt/3", "fmt/4", "fmt/11", "fmt/12", "fmt/13", "fmt/42", "fmt/43", "fmt/44", "fmt/353", "x-fmt/399", "x-fmt/388", "xfmt/387", "fmt/155", "fmt/154", "fmt/153", "fmt/91", "fmt/92", "fmt/413", "x-fmt/109", "fmt/579", "fmt/580", "fmt/581", "fmt/582", "fmt/702"],
Quentin Torck's avatar
Quentin Torck committed
177
178

  // movie constant for all movie
Quentin Torck's avatar
Quentin Torck committed
179
180
181
182
  visualizationMovieExtensions: ["webm", "flv", "gif", "gifv", "avi", "mov", "qt", "mpg", "mp2", "mpeg", "mpe", "mpv"],
  visualizationMovieContentType: ["video/mp4", "video/dv", "video/mpeg", "video/mj2", "video/xmatroska", "audio/xmatroska", "video/ogg", "audio/ogg", "application/ogg"],
  visualizationMovieMimeType: ["video/mp4", "video/dv", "video/mpeg", "video/mj2", "video/xmatroska", "audio/xmatroska", "video/ogg", "audio/ogg", "application/ogg"],
  visualizationMoviePronomId: ["fmt/199", "x-fmt/152", "fmt/649", "fmt/640", "fmt/337", "fmt/569", "fmt/569", "fmt/203", "fmt/945"],
Quentin Torck's avatar
Quentin Torck committed
183
184

  // movie constant
Quentin Torck's avatar
Quentin Torck committed
185
186
187
188
  visualizationClassicalMovieExtensions: ["mp4", "ogg", "webm"],
  visualizationClassicalMovieContentType: [],
  visualizationClassicalMovieMimeType: ["video/mp4", "video/ogg", "audio/ogg", "video/webm"],
  visualizationClassicalMoviePronomId: ["fmt/199", "fmt/203", "fmt/944", "fmt/945", "fmt/946", "fmt/947", "fmt/948"],
Quentin Torck's avatar
Quentin Torck committed
189
190

  // pdf constant
Quentin Torck's avatar
Quentin Torck committed
191
192
193
194
  visualizationPdfExtensions: ["pdf"],
  visualizationPdfContentType: [],
  visualizationPdfMimeType: ["application/pdf"],
  visualizationPdfPronomId: ["fmt/95", "fmt/3", "fmt/476", "fmt/477", "fmt/479", "fmt/480", "fmt/18", "fmt/19", "fmt/20", "fmt/276"],
Quentin Torck's avatar
Quentin Torck committed
195
196

  // office constant
Quentin Torck's avatar
Quentin Torck committed
197
198
199
200
  visualizationOfficeFileExtensions: ["pdf", "odt", "xls"],
  visualizationOfficeContentType: ["application/pdf", "application/vnd.oasis.opendocument.text", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
  visualizationOfficeMimeType: [],
  visualizationOfficePronomId: ["fmt/95", "fmt/3", "fmt/476", "fmt/477", "fmt/479", "fmt/480", "fmt/18", "fmt/19", "fmt/20", "fmt/276", "fmt/290", "fmt/189"],
Quentin Torck's avatar
Quentin Torck committed
201
202

  // ng2-xs- viewer
Quentin Torck's avatar
Quentin Torck committed
203
204
205
206
  visualizationNg2XsViewerExtensions: ["pdf", "odt", "xls"],
  visualizationNg2XsViewerContentType: [],
  visualizationNg2XsViewerMimeType: ["application/pdf", "application/vnd.oasis.opendocument.text", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
  visualizationNg2XsViewerPronomId: ["fmt/95", "fmt/3", "fmt/476", "fmt/477", "fmt/479", "fmt/480", "fmt/18", "fmt/19", "fmt/20", "fmt/276", "fmt/290", "fmt/189"],
Quentin Torck's avatar
Quentin Torck committed
207
208

  // sound constant
Quentin Torck's avatar
Quentin Torck committed
209
210
  visualizationSoundExtension: ["mp3", "mp4", "flac", "ogg", "wav", "acc"],
  visualizationSoundContentType: ["audio/mpeg"],
211
  visualizationSoundMimeType: ["audio/aac ", "audio/aacp"],
Quentin Torck's avatar
Quentin Torck committed
212
  visualizationSoundPronomId: [],
Quentin Torck's avatar
Quentin Torck committed
213
214

  // mol constant
Quentin Torck's avatar
Quentin Torck committed
215
216
217
218
  visualizationMolExtension: ["sdf", "log"],
  visualizationMolContentType: [],
  visualizationMolMimeType: ["text/plain", "chemical/x-jcamp-dx", "chemical/x-sketchel", "chemical/x-kinemage", "chemical/x-macmolecule", "chemical/x-macromodel-input", "chemical/x-daylight-smiles", "chemical/x-isostar", "chemical/x-genbank", "chemical/x-gcg8-sequence", "chemical/x-gaussian-input", "chemical/x-gaussian-cube", "chemical/x-gaussian-checkpoint", "chemical/x-gamess-input", "chemical/x-galactic-spc", "chemical/x-embl-dl-nucleotide", "chemical/x-cxf", "chemical/x-chem3d", "chemical/x-ctx", "chemical/x-csml", "chemical/x-crossfire", "chemical/x-compass", "chemical/x-cml", "chemical/x-cmdf", "chemical/x-cif", "chemical/x-chemdraw", "text/plain", "chemical/x-mdl-sdfile", "chemical/x-mdl-molfile", "chemical/x-alchemy", "chemical/x-cache-csf", "chemical/x-cerius", "chemical/x-cactvs-binary"],
  visualizationMolPronomId: [],
Quentin Torck's avatar
Quentin Torck committed
219

Quentin Torck's avatar
Quentin Torck committed
220
  // sme constant
Quentin Torck's avatar
Quentin Torck committed
221
222
223
224
  visualizationSmeExtension: ["mol"],
  visualizationSmeContentType: ["text/plain"],
  visualizationSmeMimeType: [],
  visualizationSmePronomId: [],
Quentin Torck's avatar
Quentin Torck committed
225

Quentin Torck's avatar
Quentin Torck committed
226
  // text constant
Quentin Torck's avatar
Quentin Torck committed
227
228
229
230
  visualizationTextFileExtension: ["txt", "json", "xml", "java", "yml", "ts", "css", "scss", "ads", "adb", "ada", "bash", "sh", "h", "cpp", "hpp", "cpp", "html", "htm", "shtml", "shtm", "xhtml", "xhtm", "jsp", "mak", "php", "php3", "php4", "php5", "phpml", "phps", "phps", "sql", "yml", "yaml"],
  visualizationTextFileContentType: [],
  visualizationTextFileMimeType: ["text/plain"],
  visualizationTextFilePronomId: [],
231
232
233
234
235
236

  archivalStorageName: [
    "File",
    "S2",
  ],
  defaultStorageIndex: 0,
237
238
239
240
241
242
243
244
245
246
};

/*
 * For easier debugging in development mode, you can import the following file
 * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
 *
 * This import should be commented out in production mode because it will have a negative impact
 * on performance if an error is thrown.
 */
// import 'zone.js/dist/zone-error';  // Included with Angular CLI.