@beinformed/ui 1.58.4 → 1.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/esm/constants/Constants.js +10 -0
- package/esm/constants/Constants.js.map +1 -1
- package/esm/constants/Settings.js +5 -1
- package/esm/constants/Settings.js.map +1 -1
- package/esm/models/attributes/DatetimeAttributeModel.js +39 -4
- package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js +31 -2
- package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
- package/esm/react-client/client.js +2 -1
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-server/serverUtil.js +2 -1
- package/esm/react-server/serverUtil.js.map +1 -1
- package/esm/redux/actions/Preferences.js +15 -1
- package/esm/redux/actions/Preferences.js.map +1 -1
- package/esm/utils/datetime/DateTimeUtil.js +292 -94
- package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/constants/Constants.js +11 -1
- package/lib/constants/Constants.js.flow +11 -0
- package/lib/constants/Constants.js.map +1 -1
- package/lib/constants/Settings.js +7 -2
- package/lib/constants/Settings.js.flow +6 -0
- package/lib/constants/Settings.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js +38 -3
- package/lib/models/attributes/DatetimeAttributeModel.js.flow +54 -4
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/__tests__/DatetimeAttributeModel.spec.js.flow +9 -0
- package/lib/models/attributes/__tests__/DatetimeAttributeModel_offset.spec.js.flow +306 -0
- package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js +31 -2
- package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.flow +42 -3
- package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
- package/lib/react-client/client.js +1 -0
- package/lib/react-client/client.js.flow +2 -0
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-server/__tests__/serverUtil.spec.js.flow +12 -0
- package/lib/react-server/serverUtil.js +1 -0
- package/lib/react-server/serverUtil.js.flow +2 -0
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/redux/actions/Preferences.js +17 -2
- package/lib/redux/actions/Preferences.js.flow +22 -0
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/reducers/__tests__/ModelCatalogReducer.spec.js.flow +23 -0
- package/lib/utils/datetime/DateTimeUtil.js +292 -93
- package/lib/utils/datetime/DateTimeUtil.js.flow +482 -172
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/datetime/__tests__/DateTime.spec.js.flow +771 -483
- package/package.json +11 -9
- package/src/constants/Constants.js +11 -0
- package/src/constants/Settings.js +6 -0
- package/src/models/attributes/DatetimeAttributeModel.js +54 -4
- package/src/models/attributes/__tests__/DatetimeAttributeModel.spec.js +9 -0
- package/src/models/attributes/__tests__/DatetimeAttributeModel_offset.spec.js +306 -0
- package/src/models/attributes/input-constraints/DatetimeFormatConstraint.js +42 -3
- package/src/react-client/client.js +2 -0
- package/src/react-server/__tests__/serverUtil.spec.js +12 -0
- package/src/react-server/serverUtil.js +2 -0
- package/src/redux/actions/Preferences.js +22 -0
- package/src/redux/reducers/__tests__/ModelCatalogReducer.spec.js +23 -0
- package/src/utils/datetime/DateTimeUtil.js +482 -172
- package/src/utils/datetime/__tests__/DateTime.spec.js +771 -483
|
@@ -12,7 +12,7 @@ import { availableLocales } from "../i18n/Locales";
|
|
|
12
12
|
import Locales from "../i18n/Locales";
|
|
13
13
|
import { getPreferredLocale } from "./requestInformation";
|
|
14
14
|
import { setLocales } from "../redux/_i18n/I18nActions";
|
|
15
|
-
import { setServerPreference, setThemePreference, setPreference, setAllContentInDataSetting, setLoginPreferences } from "../redux/actions/Preferences";
|
|
15
|
+
import { setServerPreference, setThemePreference, setPreference, setAllContentInDataSetting, setLoginPreferences, setDateTimeSettings } from "../redux/actions/Preferences";
|
|
16
16
|
import { getSetting } from "../constants/Settings";
|
|
17
17
|
import { IllegalArgumentException } from "../exceptions";
|
|
18
18
|
import { initModels } from "../redux";
|
|
@@ -98,6 +98,7 @@ const setServerPreferences = (store, serverPreferences) => {
|
|
|
98
98
|
}
|
|
99
99
|
store.dispatch(setAllContentInDataSetting());
|
|
100
100
|
store.dispatch(setLoginPreferences());
|
|
101
|
+
store.dispatch(setDateTimeSettings());
|
|
101
102
|
if (preferencesProvider && preferencesProvider.isStudioContext && preferencesProvider.isStudioContext()) {
|
|
102
103
|
store.dispatch(setPreference("isStudioContext", true));
|
|
103
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverUtil.js","names":["createMemoryHistory","has","deepmerge","configureStore","availableLocales","Locales","getPreferredLocale","setLocales","setServerPreference","setThemePreference","setPreference","setAllContentInDataSetting","setLoginPreferences","getSetting","IllegalArgumentException","initModels","getLocale","ModularUIRequest","createReduxStore","requestHref","customReducers","initialState","history","initialEntries","toString","store","setI18n","locales","arguments","length","undefined","request","Array","isArray","mergedLocales","_mapInstanceProperty","call","locale","code","customLocale","_findInstanceProperty","custLocale","forEach","some","push","enabledLocales","_filterInstanceProperty","_context","_includesInstanceProperty","localesInstance","preferredLocale","dispatch","setServerPreferencesFromArray","serverPreferences","serverPreference","name","defaultValue","type","setServerPreferences","preferencesProvider","isStudioContext","setConfigurationTheme","configTheme","configFileLocation","getLayoutConfigFileLocation","configFilePath","_startsWithInstanceProperty","dataFetcher","fetch","Error","setApplication","getState","application","fetchSync","connectKey","key","model","e","handleErrors","state","error","shouldThrowOnServer","dehydrate","modularui","status","lastModification","filteredState","_JSON$stringify","replace","createHead","sheet","UUID","helmetContext","style","getStyleTags","meta","helmet"],"sources":["../../src/react-server/serverUtil.js"],"sourcesContent":["// @flow\nimport { createMemoryHistory } from \"history\";\nimport { has } from \"../utils/helpers/objects\";\nimport deepmerge from \"deepmerge\";\n\nimport configureStore from \"../redux/store/configureStore\";\n\nimport { availableLocales } from \"../i18n/Locales\";\nimport Locales from \"../i18n/Locales\";\n\nimport { getPreferredLocale } from \"./requestInformation\";\nimport { setLocales } from \"../redux/_i18n/I18nActions\";\n\nimport {\n setServerPreference,\n setThemePreference,\n setPreference,\n setAllContentInDataSetting,\n setLoginPreferences,\n} from \"../redux/actions/Preferences\";\n\nimport { getSetting } from \"../constants/Settings\";\n\nimport { IllegalArgumentException } from \"../exceptions\";\n\nimport { initModels } from \"../redux\";\nimport { getLocale } from \"../redux/selectors/i18n\";\n\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\n\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { ReduxState, ReduxStore } from \"../redux/types\";\nimport type Href from \"../models/href/Href\";\nimport type { RouterHistory } from \"react-router\";\n\nexport type PreferenceValue = {\n name: string,\n defaultValue?: string | null,\n type?: string,\n};\n\n/**\n */\nconst createReduxStore = (\n requestHref: Href,\n customReducers: Object,\n initialState?: $Shape<ReduxState>,\n): ReduxStore => {\n // $FlowExpectedError\n const history: RouterHistory = createMemoryHistory({\n initialEntries: [requestHref.toString()],\n });\n\n const { store } = configureStore(history, customReducers, initialState);\n\n return store;\n};\n\n/**\n */\nconst setI18n = (\n store: ReduxStore,\n locales: Array<LocaleConfiguration> = [],\n request: HttpServletRequestJava,\n) => {\n if (!Array.isArray(locales)) {\n throw new IllegalArgumentException(\"locales must be an array of objects\");\n }\n if (!request) {\n throw new IllegalArgumentException(\"missing request argument\");\n }\n\n const mergedLocales = availableLocales.map((locale) => {\n const code = locale.code;\n const customLocale = locales.find((custLocale) => custLocale.code === code);\n\n if (customLocale) {\n return deepmerge(locale, customLocale);\n }\n\n return locale;\n });\n\n locales.forEach((customLocale) => {\n if (!mergedLocales.some((locale) => locale.code === customLocale.code)) {\n mergedLocales.push(customLocale);\n }\n });\n\n const enabledLocales = mergedLocales.filter((locale: LocaleConfiguration) =>\n getSetting(\"ENABLED_LOCALES\").includes(locale.code),\n );\n\n const localesInstance = new Locales(enabledLocales);\n const preferredLocale = getPreferredLocale(request, localesInstance);\n store.dispatch(setLocales(localesInstance, preferredLocale ?? \"en\"));\n};\n\nconst setServerPreferencesFromArray = (\n store: ReduxStore,\n serverPreferences: Array<string | PreferenceValue>,\n) => {\n serverPreferences.forEach((serverPreference) => {\n if (typeof serverPreference === \"object\") {\n const { name, defaultValue, type } = serverPreference;\n store.dispatch(setServerPreference(name, defaultValue, type));\n } else {\n store.dispatch(setServerPreference(serverPreference, null));\n }\n });\n};\n\n/**\n * Server preferences can be suplied by an array of preference names,\n * or an array of objects which has the name, an optional default value and an optional type.<br>\n * When the type is set to string, a comma separated value is not converted to an array:\n *\n * @example\n * // value becomes an array [default1, default2]\n * { name: \"prefName\", defaultValue: \"default1, default2\" }\n * // value remains a string \"default1, default2\"\n * { name: \"prefName\", defaultValue: \"default1, default2\", type: \"string\" }\n *\n * @param store\n * @param serverPreferences\n */\nconst setServerPreferences = (\n store: ReduxStore,\n serverPreferences: Array<string | PreferenceValue>,\n) => {\n if (Array.isArray(serverPreferences)) {\n setServerPreferencesFromArray(store, serverPreferences);\n }\n\n store.dispatch(setAllContentInDataSetting());\n store.dispatch(setLoginPreferences());\n\n if (\n preferencesProvider &&\n preferencesProvider.isStudioContext &&\n preferencesProvider.isStudioContext()\n ) {\n store.dispatch(setPreference(\"isStudioContext\", true));\n }\n};\n\n/**\n */\nconst setConfigurationTheme = (store: ReduxStore) => {\n let configTheme = null;\n\n const configFileLocation = preferencesProvider.getLayoutConfigFileLocation();\n if (typeof configFileLocation === \"string\") {\n const configFilePath = configFileLocation.startsWith(\"/\")\n ? `/resource${configFileLocation}`\n : `/resource/${configFileLocation}`;\n\n configTheme = dataFetcher.fetch(configFilePath);\n\n if (configTheme) {\n store.dispatch(setThemePreference(configTheme));\n } else {\n throw new Error(\n `Could not read theme configuration file from: ${configFilePath}`,\n );\n }\n }\n};\n\n/**\n */\nconst setApplication = (store: ReduxStore) => {\n try {\n const locale = getLocale(store.getState());\n const application = new ModularUIRequest(\"/\", {\n locale: locale,\n }).fetchSync();\n\n application.connectKey = `application(/)(${locale})`;\n\n store.dispatch(\n initModels([\n {\n key: `application(/)(${locale})`,\n model: application,\n },\n ]),\n );\n } catch (e) {\n // swallow error, in this case we just don't pre-cache the webapplication,\n // which has not much difference for the end user\n }\n};\n\n/**\n */\nconst handleErrors = (store: ReduxStore) => {\n const state = store.getState();\n\n if (\n state.error &&\n (state.error.shouldThrowOnServer ||\n !has(state.error, \"shouldThrowOnServer\"))\n ) {\n throw state.error;\n }\n};\n\n/**\n */\nconst dehydrate = (store: ReduxStore): string => {\n const state = store.getState();\n\n const modularui: {\n [key: string]: { status: string, lastModification: number, model: ?Object },\n } = {};\n\n for (const key in state.modularui) {\n const { status, model, lastModification } = state.modularui[key];\n\n if (model) {\n modularui[key] = {\n status,\n lastModification,\n model: model.dehydrate(),\n };\n } else {\n modularui[key] = {\n status,\n lastModification,\n model: undefined,\n };\n }\n }\n\n const filteredState = {\n ...state,\n modularui,\n };\n\n return JSON.stringify(filteredState).replace(/</g, \"\\\\u003c\");\n};\n\n/**\n */\nconst createHead = (\n sheet: any,\n UUID: string,\n helmetContext?: Object,\n): Object => {\n const style = sheet.getStyleTags();\n const meta = helmetContext ? [...helmetContext.helmet.meta] : [];\n\n if (helmetContext) {\n return {\n ...helmetContext.helmet,\n style,\n meta,\n };\n }\n\n return {\n style,\n meta,\n };\n};\n\nexport {\n createReduxStore,\n setI18n,\n setApplication,\n setServerPreferences,\n setConfigurationTheme,\n createHead,\n handleErrors,\n dehydrate,\n};\n"],"mappings":";;;;;;AACA,SAASA,mBAAmB,QAAQ,SAAS;AAC7C,SAASC,GAAG,QAAQ,0BAA0B;AAC9C,OAAOC,SAAS,MAAM,WAAW;AAEjC,OAAOC,cAAc,MAAM,+BAA+B;AAE1D,SAASC,gBAAgB,QAAQ,iBAAiB;AAClD,OAAOC,OAAO,MAAM,iBAAiB;AAErC,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,UAAU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iB,CAAC,GAAGN,KAAK,CAACI,SAAS,CAACR,GAAG,CAAC;IAEhE,IAAIC,KAAK,EAAE;MACTO,SAAS,CAACR,GAAG,CAAC,GAAG;QACfS,MAAM;QACNC,gBAAgB;QAChBT,KAAK,EAAEA,KAAK,CAACM,SAAS,CAAC;MACzB,CAAC;IACH,CAAC,MAAM;MACLC,SAAS,CAACR,GAAG,CAAC,GAAG;QACfS,MAAM;QACNC,gBAAgB;QAChBT,KAAK,EAAE9C;MACT,CAAC;IACH;EACF;EAEA,MAAMwD,aAAa,GAAG;IACpB,GAAGP,KAAK;IACRI;EACF,CAAC;EAED,OAAOI,eAAA,CAAeD,aAAa,CAAC,CAACE,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC;AAC/D,CAAC;;AAED;AACA;AACA,MAAMC,UAAU,GAAGA,CACjBC,KAAU,EACVC,IAAY,EACZC,aAAsB,KACX;EACX,MAAMC,KAAK,GAAGH,KAAK,CAACI,YAAY,CAAC,CAAC;EAClC,MAAMC,IAAI,GAAGH,aAAa,GAAG,CAAC,GAAGA,aAAa,CAACI,MAAM,CAACD,IAAI,CAAC,GAAG,EAAE;EAEhE,IAAIH,aAAa,EAAE;IACjB,OAAO;MACL,GAAGA,aAAa,CAACI,MAAM;MACvBH,KAAK;MACLE;IACF,CAAC;EACH;EAEA,OAAO;IACLF,KAAK;IACLE;EACF,CAAC;AACH,CAAC;AAED,SACE7E,gBAAgB,EAChBQ,OAAO,EACP4C,cAAc,EACdZ,oBAAoB,EACpBG,qBAAqB,EACrB4B,UAAU,EACVX,YAAY,EACZI,SAAS","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"serverUtil.js","names":["createMemoryHistory","has","deepmerge","configureStore","availableLocales","Locales","getPreferredLocale","setLocales","setServerPreference","setThemePreference","setPreference","setAllContentInDataSetting","setLoginPreferences","setDateTimeSettings","getSetting","IllegalArgumentException","initModels","getLocale","ModularUIRequest","createReduxStore","requestHref","customReducers","initialState","history","initialEntries","toString","store","setI18n","locales","arguments","length","undefined","request","Array","isArray","mergedLocales","_mapInstanceProperty","call","locale","code","customLocale","_findInstanceProperty","custLocale","forEach","some","push","enabledLocales","_filterInstanceProperty","_context","_includesInstanceProperty","localesInstance","preferredLocale","dispatch","setServerPreferencesFromArray","serverPreferences","serverPreference","name","defaultValue","type","setServerPreferences","preferencesProvider","isStudioContext","setConfigurationTheme","configTheme","configFileLocation","getLayoutConfigFileLocation","configFilePath","_startsWithInstanceProperty","dataFetcher","fetch","Error","setApplication","getState","application","fetchSync","connectKey","key","model","e","handleErrors","state","error","shouldThrowOnServer","dehydrate","modularui","status","lastModification","filteredState","_JSON$stringify","replace","createHead","sheet","UUID","helmetContext","style","getStyleTags","meta","helmet"],"sources":["../../src/react-server/serverUtil.js"],"sourcesContent":["// @flow\nimport { createMemoryHistory } from \"history\";\nimport { has } from \"../utils/helpers/objects\";\nimport deepmerge from \"deepmerge\";\n\nimport configureStore from \"../redux/store/configureStore\";\n\nimport { availableLocales } from \"../i18n/Locales\";\nimport Locales from \"../i18n/Locales\";\n\nimport { getPreferredLocale } from \"./requestInformation\";\nimport { setLocales } from \"../redux/_i18n/I18nActions\";\n\nimport {\n setServerPreference,\n setThemePreference,\n setPreference,\n setAllContentInDataSetting,\n setLoginPreferences,\n setDateTimeSettings,\n} from \"../redux/actions/Preferences\";\n\nimport { getSetting } from \"../constants/Settings\";\n\nimport { IllegalArgumentException } from \"../exceptions\";\n\nimport { initModels } from \"../redux\";\nimport { getLocale } from \"../redux/selectors/i18n\";\n\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\n\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { ReduxState, ReduxStore } from \"../redux/types\";\nimport type Href from \"../models/href/Href\";\nimport type { RouterHistory } from \"react-router\";\n\nexport type PreferenceValue = {\n name: string,\n defaultValue?: string | null,\n type?: string,\n};\n\n/**\n */\nconst createReduxStore = (\n requestHref: Href,\n customReducers: Object,\n initialState?: $Shape<ReduxState>,\n): ReduxStore => {\n // $FlowExpectedError\n const history: RouterHistory = createMemoryHistory({\n initialEntries: [requestHref.toString()],\n });\n\n const { store } = configureStore(history, customReducers, initialState);\n\n return store;\n};\n\n/**\n */\nconst setI18n = (\n store: ReduxStore,\n locales: Array<LocaleConfiguration> = [],\n request: HttpServletRequestJava,\n) => {\n if (!Array.isArray(locales)) {\n throw new IllegalArgumentException(\"locales must be an array of objects\");\n }\n if (!request) {\n throw new IllegalArgumentException(\"missing request argument\");\n }\n\n const mergedLocales = availableLocales.map((locale) => {\n const code = locale.code;\n const customLocale = locales.find((custLocale) => custLocale.code === code);\n\n if (customLocale) {\n return deepmerge(locale, customLocale);\n }\n\n return locale;\n });\n\n locales.forEach((customLocale) => {\n if (!mergedLocales.some((locale) => locale.code === customLocale.code)) {\n mergedLocales.push(customLocale);\n }\n });\n\n const enabledLocales = mergedLocales.filter((locale: LocaleConfiguration) =>\n getSetting(\"ENABLED_LOCALES\").includes(locale.code),\n );\n\n const localesInstance = new Locales(enabledLocales);\n const preferredLocale = getPreferredLocale(request, localesInstance);\n store.dispatch(setLocales(localesInstance, preferredLocale ?? \"en\"));\n};\n\nconst setServerPreferencesFromArray = (\n store: ReduxStore,\n serverPreferences: Array<string | PreferenceValue>,\n) => {\n serverPreferences.forEach((serverPreference) => {\n if (typeof serverPreference === \"object\") {\n const { name, defaultValue, type } = serverPreference;\n store.dispatch(setServerPreference(name, defaultValue, type));\n } else {\n store.dispatch(setServerPreference(serverPreference, null));\n }\n });\n};\n\n/**\n * Server preferences can be suplied by an array of preference names,\n * or an array of objects which has the name, an optional default value and an optional type.<br>\n * When the type is set to string, a comma separated value is not converted to an array:\n *\n * @example\n * // value becomes an array [default1, default2]\n * { name: \"prefName\", defaultValue: \"default1, default2\" }\n * // value remains a string \"default1, default2\"\n * { name: \"prefName\", defaultValue: \"default1, default2\", type: \"string\" }\n *\n * @param store\n * @param serverPreferences\n */\nconst setServerPreferences = (\n store: ReduxStore,\n serverPreferences: Array<string | PreferenceValue>,\n) => {\n if (Array.isArray(serverPreferences)) {\n setServerPreferencesFromArray(store, serverPreferences);\n }\n\n store.dispatch(setAllContentInDataSetting());\n store.dispatch(setLoginPreferences());\n store.dispatch(setDateTimeSettings());\n\n if (\n preferencesProvider &&\n preferencesProvider.isStudioContext &&\n preferencesProvider.isStudioContext()\n ) {\n store.dispatch(setPreference(\"isStudioContext\", true));\n }\n};\n\n/**\n */\nconst setConfigurationTheme = (store: ReduxStore) => {\n let configTheme = null;\n\n const configFileLocation = preferencesProvider.getLayoutConfigFileLocation();\n if (typeof configFileLocation === \"string\") {\n const configFilePath = configFileLocation.startsWith(\"/\")\n ? `/resource${configFileLocation}`\n : `/resource/${configFileLocation}`;\n\n configTheme = dataFetcher.fetch(configFilePath);\n\n if (configTheme) {\n store.dispatch(setThemePreference(configTheme));\n } else {\n throw new Error(\n `Could not read theme configuration file from: ${configFilePath}`,\n );\n }\n }\n};\n\n/**\n */\nconst setApplication = (store: ReduxStore) => {\n try {\n const locale = getLocale(store.getState());\n const application = new ModularUIRequest(\"/\", {\n locale: locale,\n }).fetchSync();\n\n application.connectKey = `application(/)(${locale})`;\n\n store.dispatch(\n initModels([\n {\n key: `application(/)(${locale})`,\n model: application,\n },\n ]),\n );\n } catch (e) {\n // swallow error, in this case we just don't pre-cache the webapplication,\n // which has not much difference for the end user\n }\n};\n\n/**\n */\nconst handleErrors = (store: ReduxStore) => {\n const state = store.getState();\n\n if (\n state.error &&\n (state.error.shouldThrowOnServer ||\n !has(state.error, \"shouldThrowOnServer\"))\n ) {\n throw state.error;\n }\n};\n\n/**\n */\nconst dehydrate = (store: ReduxStore): string => {\n const state = store.getState();\n\n const modularui: {\n [key: string]: { status: string, lastModification: number, model: ?Object },\n } = {};\n\n for (const key in state.modularui) {\n const { status, model, lastModification } = state.modularui[key];\n\n if (model) {\n modularui[key] = {\n status,\n lastModification,\n model: model.dehydrate(),\n };\n } else {\n modularui[key] = {\n status,\n lastModification,\n model: undefined,\n };\n }\n }\n\n const filteredState = {\n ...state,\n modularui,\n };\n\n return JSON.stringify(filteredState).replace(/</g, \"\\\\u003c\");\n};\n\n/**\n */\nconst createHead = (\n sheet: any,\n UUID: string,\n helmetContext?: Object,\n): Object => {\n const style = sheet.getStyleTags();\n const meta = helmetContext ? [...helmetContext.helmet.meta] : [];\n\n if (helmetContext) {\n return {\n ...helmetContext.helmet,\n style,\n meta,\n };\n }\n\n return {\n style,\n meta,\n };\n};\n\nexport {\n createReduxStore,\n setI18n,\n setApplication,\n setServerPreferences,\n setConfigurationTheme,\n createHead,\n handleErrors,\n dehydrate,\n};\n"],"mappings":";;;;;;AACA,SAASA,mBAAmB,QAAQ,SAAS;AAC7C,SAASC,GAAG,QAAQ,0BAA0B;AAC9C,OAAOC,SAAS,MAAM,WAAW;AAEjC,OAAOC,cAAc,MAAM,+BAA+B;AAE1D,SAASC,gBAAgB,QAAQ,iBAAiB;AAClD,OAAOC,OAAO,MAAM,iBAAiB;AAErC,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,UAAU,QAAQ,4BAA4B;AAEvD,SACEC,mBAAmB,EACnBC,kBAAkB,EAClBC,aAAa,EACbC,0BAA0B,EAC1BC,mBAAmB,EACnBC,mBAAmB,QACd,8BAA8B;AAErC,SAASC,UAAU,QAAQ,uBAAuB;AAElD,SAASC,wBAAwB,QAAQ,eAAe;AAExD,SAASC,UAAU,QAAQ,UAAU;AACrC,SAASC,SAAS,QAAQ,yBAAyB;AAEnD,OAAOC,gBAAgB,MAAM,+BAA+B;AAa5D;AACA;AACA,MAAMC,gBAAgB,GAAGA,CACvBC,WAAiB,EACjBC,cAAsB,EACtBC,YAAiC,KAClB;EACf;EACA,MAAMC,OAAsB,GAAGvB,mBAAmB,CAAC;IACjDwB,cAAc,EAAE,CAACJ,WAAW,CAACK,QAAQ,CAAC,CAAC;EACzC,CAAC,CAAC;EAEF,MAAM;IAAEC;EAAM,CAAC,GAAGvB,cAAc,CAACoB,OAAO,EAAEF,cAAc,EAAEC,YAAY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BC,KAAU,EACVC,IAAY,EACZC,aAAsB,KACX;EACX,MAAMC,KAAK,GAAGH,KAAK,CAACI,YAAY,CAAC,CAAC;EAClC,MAAMC,IAAI,GAAGH,aAAa,GAAG,CAAC,GAAGA,aAAa,CAACI,MAAM,CAACD,IAAI,CAAC,GAAG,EAAE;EAEhE,IAAIH,aAAa,EAAE;IACjB,OAAO;MACL,GAAGA,aAAa,CAACI,MAAM;MACvBH,KAAK;MACLE;IACF,CAAC;EACH;EAEA,OAAO;IACLF,KAAK;IACLE;EACF,CAAC;AACH,CAAC;AAED,SACE7E,gBAAgB,EAChBQ,OAAO,EACP4C,cAAc,EACdZ,oBAAoB,EACpBG,qBAAqB,EACrB4B,UAAU,EACVX,YAAY,EACZI,SAAS","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ import _trimInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instanc
|
|
|
4
4
|
import { isPlainObject } from "../../utils/helpers/objects";
|
|
5
5
|
import { JsonParseException } from "../../exceptions";
|
|
6
6
|
import { setSetting, setSettings } from "../../constants/Settings";
|
|
7
|
-
import { ALL_CONTENT_IN_DATA_SETTING, LOGIN_TYPE, LOGIN_PASSWORD_SETTING, LOGIN_PATH_SETTING, LOGIN_USERNAME_SETTING, LOGOUT_PATH_SETTING } from "../../constants";
|
|
7
|
+
import { ALL_CONTENT_IN_DATA_SETTING, INCLUDE_TIME_OFFSET, LOGIN_TYPE, LOGIN_PASSWORD_SETTING, LOGIN_PATH_SETTING, LOGIN_USERNAME_SETTING, LOGOUT_PATH_SETTING } from "../../constants";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
*/
|
|
@@ -84,6 +84,20 @@ export const setAllContentInDataSetting = state => {
|
|
|
84
84
|
return setPreference(ALL_CONTENT_IN_DATA_SETTING, allContentInDataSetting);
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Retrieve settings for date time conversion
|
|
89
|
+
*/
|
|
90
|
+
export const setDateTimeSettings = state => {
|
|
91
|
+
let isIncludeTimeOffsetInDateTimes = false;
|
|
92
|
+
if (typeof preferencesProvider !== "undefined" && typeof preferencesProvider.isIncludeTimeOffsetInDateTimes !== "undefined") {
|
|
93
|
+
isIncludeTimeOffsetInDateTimes = preferencesProvider.isIncludeTimeOffsetInDateTimes();
|
|
94
|
+
} else if (typeof state !== "undefined") {
|
|
95
|
+
isIncludeTimeOffsetInDateTimes = state.preferences[INCLUDE_TIME_OFFSET];
|
|
96
|
+
}
|
|
97
|
+
setSetting(INCLUDE_TIME_OFFSET, !!isIncludeTimeOffsetInDateTimes);
|
|
98
|
+
return setPreference(INCLUDE_TIME_OFFSET, isIncludeTimeOffsetInDateTimes);
|
|
99
|
+
};
|
|
100
|
+
|
|
87
101
|
/**
|
|
88
102
|
* Retrieves login settings from runtime preferences and sets them as setting in the preference reducer
|
|
89
103
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preferences.js","names":["isPlainObject","JsonParseException","setSetting","setSettings","ALL_CONTENT_IN_DATA_SETTING","LOGIN_TYPE","LOGIN_PASSWORD_SETTING","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGOUT_PATH_SETTING","getServerPreferenceValue","preferenceName","defaultValue","arguments","length","undefined","type","value","preferencesProvider","getPreferenceByName","_includesInstanceProperty","call","_context","_mapInstanceProperty","split","val","_trimInstanceProperty","setServerPreference","propertyName","setPreference","propertyValue","payload","setPreferences","preferences","setThemePreference","configTheme","themeData","JSON","parse","error","settings","setAllContentInDataSetting","state","allContentInDataSetting","getModularUIContentInData","setLoginPreferences","loginSettings"],"sources":["../../../src/redux/actions/Preferences.js"],"sourcesContent":["// @flow\nimport { isPlainObject } from \"../../utils/helpers/objects\";\n\nimport { JsonParseException } from \"../../exceptions\";\nimport { setSetting, setSettings } from \"../../constants/Settings\";\n\nimport type {\n PreferenceValue,\n ReduxState,\n SetPreferenceAction,\n SetPreferencesAction,\n} from \"../types\";\n\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n LOGIN_TYPE,\n LOGIN_PASSWORD_SETTING,\n LOGIN_PATH_SETTING,\n LOGIN_USERNAME_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"../../constants\";\n\n/**\n */\nconst getServerPreferenceValue = (\n preferenceName: string,\n defaultValue: PreferenceValue = null,\n type?: string,\n) => {\n let value: PreferenceValue = null;\n if (typeof preferencesProvider !== \"undefined\") {\n value = preferencesProvider.getPreferenceByName(preferenceName);\n }\n\n if (value == null) {\n value = defaultValue;\n }\n\n if (typeof value === \"string\" && type !== \"string\" && value.includes(\",\")) {\n value = value.split(\",\").map((val) => val.trim());\n }\n\n return value;\n};\n\n/**\n */\nexport const setServerPreference = (\n propertyName: string,\n defaultValue: PreferenceValue = null,\n type?: string,\n): SetPreferenceAction => {\n const value = getServerPreferenceValue(propertyName, defaultValue, type);\n return setPreference(propertyName, value);\n};\n\n/**\n */\nexport const setPreference = (\n propertyName: string,\n propertyValue: PreferenceValue = null,\n): SetPreferenceAction => ({\n type: \"SET_PREFERENCE\",\n payload: {\n [propertyName]: propertyValue,\n },\n});\n\n/**\n */\nexport const setPreferences = (preferences: Object): SetPreferencesAction => ({\n type: \"SET_PREFERENCES\",\n payload: {\n ...preferences,\n },\n});\n\n/**\n */\nexport const setThemePreference = (\n configTheme: string,\n): SetPreferenceAction => {\n let themeData;\n\n try {\n themeData = configTheme ? JSON.parse(configTheme) : null;\n } catch (error) {\n throw new JsonParseException(`Theme file contains invalid JSON: ${error}`);\n }\n\n if (themeData && isPlainObject(themeData)) {\n setSettings(themeData.settings);\n }\n\n return setPreference(\"theme\", themeData);\n};\n\n/**\n * Make modular-ui-content-in-data preference available client side\n */\nexport const setAllContentInDataSetting = (\n state?: ReduxState,\n): SetPreferenceAction => {\n let allContentInDataSetting: PreferenceValue = false;\n\n if (\n typeof preferencesProvider !== \"undefined\" &&\n typeof preferencesProvider.getModularUIContentInData !== \"undefined\"\n ) {\n allContentInDataSetting = preferencesProvider.getModularUIContentInData();\n } else if (typeof state !== \"undefined\") {\n allContentInDataSetting = state.preferences[ALL_CONTENT_IN_DATA_SETTING];\n }\n\n setSetting(ALL_CONTENT_IN_DATA_SETTING, !!allContentInDataSetting);\n return setPreference(ALL_CONTENT_IN_DATA_SETTING, allContentInDataSetting);\n};\n\n/**\n * Retrieves login settings from runtime preferences and sets them as setting in the preference reducer\n */\nexport const setLoginPreferences = (\n state?: ReduxState,\n): SetPreferencesAction => {\n const loginSettings = {\n [LOGIN_TYPE]: getServerPreferenceValue(\n LOGIN_TYPE,\n state?.preferences[LOGIN_TYPE],\n ),\n [LOGIN_PATH_SETTING]: getServerPreferenceValue(\n LOGIN_PATH_SETTING,\n state?.preferences[LOGIN_PATH_SETTING] ??\n `/callback?client_name=FormClient`,\n ),\n [LOGIN_USERNAME_SETTING]: getServerPreferenceValue(\n LOGIN_USERNAME_SETTING,\n state?.preferences[LOGIN_USERNAME_SETTING] ?? \"j_username\",\n ),\n [LOGIN_PASSWORD_SETTING]: getServerPreferenceValue(\n LOGIN_PASSWORD_SETTING,\n state?.preferences[LOGIN_PASSWORD_SETTING] ?? \"j_password\",\n ),\n [LOGOUT_PATH_SETTING]: getServerPreferenceValue(\n LOGOUT_PATH_SETTING,\n state?.preferences[LOGOUT_PATH_SETTING] ?? `/logout`,\n ),\n };\n\n setSettings(loginSettings);\n return setPreferences(loginSettings);\n};\n"],"mappings":";;;AACA,SAASA,aAAa,QAAQ,6BAA6B;AAE3D,SAASC,kBAAkB,QAAQ,kBAAkB;AACrD,SAASC,UAAU,EAAEC,WAAW,QAAQ,0BAA0B;AASlE,SACEC,2BAA2B,EAC3BC,UAAU,EACVC,sBAAsB,EACtBC,kBAAkB,EAClBC,sBAAsB,EACtBC,mBAAmB,QACd,iBAAiB;;AAExB;AACA;AACA,MAAMC,wBAAwB,GAAG,SAAAA,CAC/BC,cAAsB,EAGnB;EAAA,IAFHC,YAA6B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,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AE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAAA,OACZ;IACzBG,IAAI,EAAE,gBAAgB;IACtBe,OAAO,EAAE;MACP,CAACH,YAAY,GAAGE;IAClB;EACF,CAAC;AAAA,CAAC;;AAEF;AACA;AACA,OAAO,MAAME,cAAc,GAAIC,WAAmB,KAA4B;EAC5EjB,IAAI,EAAE,iBAAiB;EACvBe,OAAO,EAAE;IACP,GAAGE;EACL;AACF,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMC,kBAAkB,GAC7BC,WAAmB,IACK;EACxB,IAAIC,SAAS;EAEb,IAAI;IACFA,SAAS,GAAGD,WAAW,GAAGE,IAAI,CAACC,KAAK,CAACH,WAAW,CAAC,GAAG,IAAI;EAC1D,CAAC,CAAC,OAAOI,KAAK,EAAE;IACd,MAAM,
|
|
1
|
+
{"version":3,"file":"Preferences.js","names":["isPlainObject","JsonParseException","setSetting","setSettings","ALL_CONTENT_IN_DATA_SETTING","INCLUDE_TIME_OFFSET","LOGIN_TYPE","LOGIN_PASSWORD_SETTING","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGOUT_PATH_SETTING","getServerPreferenceValue","preferenceName","defaultValue","arguments","length","undefined","type","value","preferencesProvider","getPreferenceByName","_includesInstanceProperty","call","_context","_mapInstanceProperty","split","val","_trimInstanceProperty","setServerPreference","propertyName","setPreference","propertyValue","payload","setPreferences","preferences","setThemePreference","configTheme","themeData","JSON","parse","error","settings","setAllContentInDataSetting","state","allContentInDataSetting","getModularUIContentInData","setDateTimeSettings","isIncludeTimeOffsetInDateTimes","setLoginPreferences","loginSettings"],"sources":["../../../src/redux/actions/Preferences.js"],"sourcesContent":["// @flow\nimport { isPlainObject } from \"../../utils/helpers/objects\";\n\nimport { JsonParseException } from \"../../exceptions\";\nimport { setSetting, setSettings } from \"../../constants/Settings\";\n\nimport type {\n PreferenceValue,\n ReduxState,\n SetPreferenceAction,\n SetPreferencesAction,\n} from \"../types\";\n\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n INCLUDE_TIME_OFFSET,\n LOGIN_TYPE,\n LOGIN_PASSWORD_SETTING,\n LOGIN_PATH_SETTING,\n LOGIN_USERNAME_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"../../constants\";\n\n/**\n */\nconst getServerPreferenceValue = (\n preferenceName: string,\n defaultValue: PreferenceValue = null,\n type?: string,\n) => {\n let value: PreferenceValue = null;\n if (typeof preferencesProvider !== \"undefined\") {\n value = preferencesProvider.getPreferenceByName(preferenceName);\n }\n\n if (value == null) {\n value = defaultValue;\n }\n\n if (typeof value === \"string\" && type !== \"string\" && value.includes(\",\")) {\n value = value.split(\",\").map((val) => val.trim());\n }\n\n return value;\n};\n\n/**\n */\nexport const setServerPreference = (\n propertyName: string,\n defaultValue: PreferenceValue = null,\n type?: string,\n): SetPreferenceAction => {\n const value = getServerPreferenceValue(propertyName, defaultValue, type);\n return setPreference(propertyName, value);\n};\n\n/**\n */\nexport const setPreference = (\n propertyName: string,\n propertyValue: PreferenceValue = null,\n): SetPreferenceAction => ({\n type: \"SET_PREFERENCE\",\n payload: {\n [propertyName]: propertyValue,\n },\n});\n\n/**\n */\nexport const setPreferences = (preferences: Object): SetPreferencesAction => ({\n type: \"SET_PREFERENCES\",\n payload: {\n ...preferences,\n },\n});\n\n/**\n */\nexport const setThemePreference = (\n configTheme: string,\n): SetPreferenceAction => {\n let themeData;\n\n try {\n themeData = configTheme ? JSON.parse(configTheme) : null;\n } catch (error) {\n throw new JsonParseException(`Theme file contains invalid JSON: ${error}`);\n }\n\n if (themeData && isPlainObject(themeData)) {\n setSettings(themeData.settings);\n }\n\n return setPreference(\"theme\", themeData);\n};\n\n/**\n * Make modular-ui-content-in-data preference available client side\n */\nexport const setAllContentInDataSetting = (\n state?: ReduxState,\n): SetPreferenceAction => {\n let allContentInDataSetting: PreferenceValue = false;\n\n if (\n typeof preferencesProvider !== \"undefined\" &&\n typeof preferencesProvider.getModularUIContentInData !== \"undefined\"\n ) {\n allContentInDataSetting = preferencesProvider.getModularUIContentInData();\n } else if (typeof state !== \"undefined\") {\n allContentInDataSetting = state.preferences[ALL_CONTENT_IN_DATA_SETTING];\n }\n\n setSetting(ALL_CONTENT_IN_DATA_SETTING, !!allContentInDataSetting);\n return setPreference(ALL_CONTENT_IN_DATA_SETTING, allContentInDataSetting);\n};\n\n/**\n * Retrieve settings for date time conversion\n */\nexport const setDateTimeSettings = (\n state?: ReduxState,\n): SetPreferenceAction => {\n let isIncludeTimeOffsetInDateTimes: PreferenceValue = false;\n if (\n typeof preferencesProvider !== \"undefined\" &&\n typeof preferencesProvider.isIncludeTimeOffsetInDateTimes !== \"undefined\"\n ) {\n isIncludeTimeOffsetInDateTimes =\n preferencesProvider.isIncludeTimeOffsetInDateTimes();\n } else if (typeof state !== \"undefined\") {\n isIncludeTimeOffsetInDateTimes = state.preferences[INCLUDE_TIME_OFFSET];\n }\n\n setSetting(INCLUDE_TIME_OFFSET, !!isIncludeTimeOffsetInDateTimes);\n return setPreference(INCLUDE_TIME_OFFSET, isIncludeTimeOffsetInDateTimes);\n};\n\n/**\n * Retrieves login settings from runtime preferences and sets them as setting in the preference reducer\n */\nexport const setLoginPreferences = (\n state?: ReduxState,\n): SetPreferencesAction => {\n const loginSettings = {\n [LOGIN_TYPE]: getServerPreferenceValue(\n LOGIN_TYPE,\n state?.preferences[LOGIN_TYPE],\n ),\n [LOGIN_PATH_SETTING]: getServerPreferenceValue(\n LOGIN_PATH_SETTING,\n state?.preferences[LOGIN_PATH_SETTING] ??\n `/callback?client_name=FormClient`,\n ),\n [LOGIN_USERNAME_SETTING]: getServerPreferenceValue(\n LOGIN_USERNAME_SETTING,\n state?.preferences[LOGIN_USERNAME_SETTING] ?? \"j_username\",\n ),\n [LOGIN_PASSWORD_SETTING]: getServerPreferenceValue(\n LOGIN_PASSWORD_SETTING,\n state?.preferences[LOGIN_PASSWORD_SETTING] ?? \"j_password\",\n ),\n [LOGOUT_PATH_SETTING]: getServerPreferenceValue(\n LOGOUT_PATH_SETTING,\n state?.preferences[LOGOUT_PATH_SETTING] ?? `/logout`,\n ),\n };\n\n setSettings(loginSettings);\n return setPreferences(loginSettings);\n};\n"],"mappings":";;;AACA,SAASA,aAAa,QAAQ,6BAA6B;AAE3D,SAASC,kBAAkB,QAAQ,kBAAkB;AACrD,SAASC,UAAU,EAAEC,WAAW,QAAQ,0BAA0B;AASlE,SACEC,2BAA2B,EAC3BC,mBAAmB,EACnBC,UAAU,EACVC,sBAAsB,EACtBC,kBAAkB,EAClBC,sBAAsB,EACtBC,mBAAmB,QACd,iBAAiB;;AAExB;AACA;AACA,MAAMC,wBAAwB,GAAG,SAAAA,CAC/BC,cAAsB,EAGnB;EAAA,IAFHC,YAA6B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAAA,IACpCG,IAAa,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEb,IAAIE,KAAsB,GAAG,IAAI;EACjC,IAAI,OAAOC,mBAAmB,KAAK,WAAW,EAAE;IAC9CD,KAAK,GAAGC,mBAAmB,CAACC,mBAAmB,CAACR,cAAc,CAAC;EACjE;EAEA,IAAIM,KAAK,IAAI,IAAI,EAAE;IACjBA,KAAK,GAAGL,YAAY;EACtB;EAEA,IAAI,OAAOK,KAAK,KAAK,QAAQ,IAAID,IAAI,KAAK,QAAQ,IAAII,yBAAA,CAAAH,KAAK,EAAAI,IAAA,CAALJ,KAAK,EAAU,GAAG,CAAC,EAAE;IAAA,IAAAK,QAAA;IACzEL,KAAK,GAAGM,oBAAA,CAAAD,QAAA,GAAAL,KAAK,CAACO,KAAK,CAAC,GAAG,CAAC,EAAAH,IAAA,CAAAC,QAAA,EAAMG,GAAG,IAAKC,qBAAA,CAAAD,GAAG,EAAAJ,IAAA,CAAHI,GAAS,CAAC,CAAC;EACnD;EAEA,OAAOR,KAAK;AACd,CAAC;;AAED;AACA;AACA,OAAO,MAAMU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