Commit 301de368 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

chore: update to solidify 2.3.5 to allow to simplify configuration

parent 0a9418d8
......@@ -16232,9 +16232,9 @@
}
},
"solidify-frontend": {
"version": "2.3.4",
"resolved": "https://nexus.unige.ch/repository/npm-all/solidify-frontend/-/solidify-frontend-2.3.4.tgz",
"integrity": "sha512-4QCCQ8LcCOc7KwASJN/JpBr+C8KocBMHWltNkVtRdbiirQzDyM4VXnVHm+h1fD+9qtzGBuS0VOioe8C56oHedA==",
"version": "2.3.5",
"resolved": "https://nexus.unige.ch/repository/npm-all/solidify-frontend/-/solidify-frontend-2.3.5.tgz",
"integrity": "sha512-MrlZuqhKC3FDjD8SfsqN2m5T8MtgiuWUGrAECx52ZwtR6M4i/aHtJmd9ngz3ban0X9aB2/iqK7WUFhyY3zxYVg==",
"requires": {
"tslib": "^2.3.0"
}
......
......@@ -88,6 +88,8 @@ import {
ENVIRONMENT,
HttpTranslateLoaderExtra,
ICONS_LIST,
isFalse,
isNullOrUndefined,
LABEL_TRANSLATE,
NotificationService,
NOTIFIER_SERVICE,
......@@ -182,10 +184,10 @@ export const HttpLoaderFactory: (http: HttpClient) => HttpTranslateLoaderExtra =
NgxsLoggerPluginModule.forRoot({
logger: console,
collapsed: false,
disabled: environment.production,
disabled: isFalse(environment.showDebugInformation) || isNullOrUndefined(environment.showDebugInformation),
}),
NgxsReduxDevtoolsPluginModule.forRoot({
disabled: environment.production,
disabled: isFalse(environment.showDebugInformation) || isNullOrUndefined(environment.showDebugInformation),
}),
NgxsRouterPluginModule.forRoot(),
......
import {MatFormFieldAppearance} from "@angular/material/form-field";
import {ThemeEnum} from "@app/shared/enums/theme.enum";
import {Enums} from "@enums";
import {ViewModeTableEnum} from "@shared/enums/view-mode-table.enum";
import {DefaultSolidifyEnvironment} from "solidify-frontend";
export interface DlcmEnvironment extends DefaultSolidifyEnvironment {
appTitle: string;
appDescription: string;
isDemoMode: boolean;
maintenanceMode: boolean;
ribbonEnabled: boolean;
ribbonColor: string;
ribbonText: string;
carouselUrl: string | undefined;
theme: ThemeEnum;
defaultLanguage: Enums.Language.LanguageEnum;
appLanguages: Enums.Language.LanguageEnum[];
defaultPageSize: number;
defaultPageSizeHomePage: number;
defaultEnumValuePageSizeOption: number;
defaultEnumValuePageSizeLazyLoad: number;
pageSizeOptions: number[];
defaultHomeOrgUnitSize: number;
minimalPageSizeToRetrievePaginationInfo: number;
maximalPageSizeToRetrievePaginationInfo: number;
computeOAuthEndpoint: boolean;
googleAnalyticsId: string | undefined;
googleAnalyticsLearnMorePage: string;
appearanceInputMaterial: MatFormFieldAppearance;
defaultStickyDatatableHeight: number;
displayPrivacyPolicyAndTermsOfUseApprovalDialog: boolean;
privacyPolicyLink: string;
termsOfUseLink: string;
......@@ -55,10 +28,6 @@ export interface DlcmEnvironment extends DefaultSolidifyEnvironment {
documentationTocUserGuidePath: string | undefined;
documentationTocUserGuide: string | undefined;
// OAuth2 properties
tokenInMemoryStorage: boolean;
reloadAfterLogout: boolean;
// Orcid properties
orcidQueryParam: string;
orcidAuthorizeUrl: string;
......@@ -67,39 +36,20 @@ export interface DlcmEnvironment extends DefaultSolidifyEnvironment {
// Access request
accessRequestRoute: string;
// Breakpoints
breakpointXs: string;
breakpointSm: string;
breakpointMd: string;
breakpointLg: string;
// Others
modalHeight: string;
modalWidth: string;
showDebugInformation: boolean;
institutionUrl: string;
// Spinner
defaultSpinnerStrokeWidth: number;
defaultSpinnerDiameter: number;
defaultButtonSpinnerStrokeWidth: number;
defaultButtonSpinnerDiameter: number;
// Home
carouselUrl: string | undefined;
defaultPageSizeHomePage: number;
defaultHomeOrgUnitSize: number;
defaultHomeViewModeTableEnum: ViewModeTableEnum;
// Tweeter
frequencyChangeCarouselTileInSecond: number;
twitterAccount: string;
twitterTweetToDisplay: number;
// Carousel
frequencyChangeCarouselTileInSecond: number;
urlNationalArchivePronom: string;
// Tooltip duration
timeBeforeDisplayTooltipOnDataTable: number;
doiLink: string;
// Polling
......@@ -107,9 +57,4 @@ export interface DlcmEnvironment extends DefaultSolidifyEnvironment {
refreshOrderAvailableIntervalInSecond: number;
refreshNotificationInboxAvailableIntervalInSecond: number;
refreshDepositSubmittedIntervalInSecond: number;
pollingMaxIntervalInSecond: number;
cdkDropListIdPrefix: string;
classInputIgnored: string;
classInputHide: string;
}
......@@ -9,28 +9,16 @@ import {
RoutesEnum,
} from "@shared/enums/routes.enum";
import {ViewModeTableEnum} from "@shared/enums/view-mode-table.enum";
import {
ChemicalMoleculeVisualizationEnum,
SnackbarPresentational,
} from "solidify-frontend";
import {defaultSolidifyEnvironment} from "solidify-frontend";
import {DlcmEnvironment} from "./environment.defaults.model";
export const defaultEnvironment: DlcmEnvironment = {
baseHref: "/",
...defaultSolidifyEnvironment,
appTitle: "DLCM - Portal",
appDescription: "Platform for archiving research data",
production: false,
forceRuntimeOverrideSetting: false,
isDemoMode: false,
maintenanceMode: false,
listTagsComponentsWhereClickAllowToEnterInEditMode: [
"dlcm-shared-table-person-orgunit-role-container",
],
positionLabelInputMaterial: "auto",
ribbonEnabled: true,
ribbonColor: "#e60000",
ribbonText: "Dev",
defaultLanguage: Enums.Language.LanguageEnum.en,
appLanguages: [Enums.Language.LanguageEnum.en, Enums.Language.LanguageEnum.fr],
appLanguagesTranslate: Enums.Language.LanguageEnumTranslate,
......@@ -41,16 +29,9 @@ export const defaultEnvironment: DlcmEnvironment = {
{key: ThemeEnum.olos, value: "Olos"},
],
theme: ThemeEnum.dlcm,
appState: undefined,
appUserState: undefined,
routeHomePage: RoutesEnum.homePage,
routeSegmentEdit: AppRoutesEnum.edit,
defaultEnumValuePageSizeLazyLoad: 20,
googleAnalyticsId: undefined, // Format "UA-000000000-1"
googleAnalyticsLearnMorePage: undefined,
appearanceInputMaterial: "outline",
defaultStickyDatatableHeight: 40,
displayPrivacyPolicyAndTermsOfUseApprovalDialog: false,
privacyPolicyLink: "",
termsOfUseLink: "",
......@@ -65,27 +46,6 @@ export const defaultEnvironment: DlcmEnvironment = {
documentationTocUserGuidePath: undefined,
documentationTocUserGuide: undefined,
// OAuth2 properties
computeOAuthEndpoint: false,
authorization: "http://localhost:4200",
oidc: false,
requestAccessToken: true,
dummyClientSecret: "123abc",
clientId: "local-dev-angular",
responseType: "token",
scope: "READ",
requireHttps: false,
allowedUrls: [],
redirectUrl: window.location.origin,
timeoutFactor: 0.75,
postLogoutRedirectUri: "",
logoutUrl: "",
nonceStateSeparator: ";",
disableNonceCheck: false,
sendAccessToken: true,
tokenInMemoryStorage: false,
reloadAfterLogout: false,
// Orcid
orcidQueryParam: "orcid",
orcidAuthorizeUrl: "https://orcid.org/oauth/authorize",
......@@ -94,59 +54,22 @@ export const defaultEnvironment: DlcmEnvironment = {
// Access request
accessRequestRoute: "accessRequest",
// Datatable
pageSizeOptions: [5, 10, 25, 50, 100],
cdkDropListIdPrefix: "cdkDropList-",
maximalPageSizeToRetrievePaginationInfo: 2000,
defaultPageSize: 10,
// Breakpoint
breakpointXs: "0px",
breakpointSm: "576px",
breakpointMd: "992px",
breakpointLg: "1360px",
// === Solidify Notification Environment ===
defaultNotificationComponent: SnackbarPresentational as any,
defaultNotificationErrorDurationInSeconds: 5,
defaultNotificationSuccessDurationInSeconds: 3,
defaultNotificationWarningDurationInSeconds: 3,
defaultNotificationInformationDurationInSeconds: 3,
modalHeight: "400px",
modalWidth: "90%",
showDebugInformation: false,
institutionUrl: "https://www.unige.ch/",
// === Solidify Spinner Environment ===
defaultSpinnerStrokeWidth: 3,
defaultSpinnerDiameter: 75,
defaultButtonSpinnerStrokeWidth: 3,
defaultButtonSpinnerDiameter: 24,
// === Solidify Upload Environment ===
errorUploadDuplicateFile: ErrorBackendKeyEnum.UPLOAD_DUPLICATE_DATA_FILES,
// === Local Environment ===
// Home
defaultHomeViewModeTableEnum: ViewModeTableEnum.tiles,
defaultPageSizeHomePage: 10,
defaultEnumValuePageSizeOption: 10000,
defaultHomeOrgUnitSize: 1000,
minimalPageSizeToRetrievePaginationInfo: 1,
carouselUrl: undefined,
// Home
defaultHomeViewModeTableEnum: ViewModeTableEnum.tiles,
// Tweeter
frequencyChangeCarouselTileInSecond: 5,
twitterAccount: "dlcm_ch",
twitterTweetToDisplay: 4,
frequencyChangeCarouselTileInSecond: 5,
urlNationalArchivePronom: "https://www.nationalarchives.gov.uk/PRONOM/",
// Tooltip duration
timeBeforeDisplayTooltip: 680,
doiLink: "https://doi.org/",
// Polling
......@@ -154,92 +77,11 @@ export const defaultEnvironment: DlcmEnvironment = {
refreshOrderAvailableIntervalInSecond: 5,
refreshNotificationInboxAvailableIntervalInSecond: 60,
refreshDepositSubmittedIntervalInSecond: 2,
pollingMaxIntervalInSecond: 60,
// === Solidify Download Environment ===
useDownloadToken: true,
timeBeforeDisplayTooltipOnDataTable: 500,
// Errors
httpErrorKeyToSkipInErrorHandler: [
ErrorBackendKeyEnum.UPLOAD_DUPLICATE_DATA_FILES,
],
errorToSkipInErrorHandler: new Error("ERROR TO SKIP IN ERROR HANDLER"),
classInputIgnored: "ignored-input",
classInputHide: "hidden-input",
// Visualization
visualizationMaxSizeFile: 300000000,
visualizationChemicalMoleculeMode: ChemicalMoleculeVisualizationEnum.threeAndTwoDimensional,
visualizationChemicalMolecule2dLibs: ["JSmolJME.js", "jsme.nocache.js"],
visualizationChemicalMolecule3dLib: "JSmol.min.js",
// tiff constant
visualizationTiffExtensions: ["tiff"],
visualizationTiffContentType: ["image/tiff"],
visualizationTiffMimeType: ["image/tiff", "image/x-tiff"],
visualizationTiffPronomId: ["fmt/353"],
// image constant
visualizationImageExtensions: ["png", "gif", "jpeg", "svg"],
visualizationImageContentType: ["image/gif", "image/png", "image/jpeg", "image/svg+xml"],
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"],
// movie constant for all movie
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"],
// movie constant
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"],
// pdf constant
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"],
// office constant
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"],
// ng2-xs- viewer
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"],
// sound constant
visualizationSoundExtension: ["mp3", "mp4", "flac", "ogg", "wav", "acc"],
visualizationSoundContentType: ["audio/mpeg"],
visualizationSoundMimeType: ["audio/aac ", "audio/aacp"],
visualizationSoundPronomId: [],
// mol constant
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: [],
// sme constant
visualizationSmeExtension: ["mol"],
visualizationSmeContentType: ["text/plain"],
visualizationSmeMimeType: [],
visualizationSmePronomId: [],
// text constant
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: [],
archivalStorageName: [
"File",
......
......@@ -4,19 +4,11 @@ import {DlcmEnvironment} from "./environment.defaults.model";
export const environment: DlcmEnvironment = {
...defaultEnvironment,
// Override OAuth2 properties
appTitle: "DLCM - Portal",
production: true,
theme: ThemeEnum.yareta,
computeOAuthEndpoint: true,
admin: "https://test.dlcm.ch/administration/",
// OAuth2 properties
dummyClientSecret: "123abc",
clientId: "dlcm-test-angular",
responseType: "token",
scope: "READ",
requireHttps: false,
redirectUrl: "https://test.dlcm.ch/portal/",
showDebugInformation: false,
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment