@beinformed/ui 1.18.4 → 1.18.5
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 +9 -0
- package/esm/hooks/useAuthentication.js +7 -50
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/i18n/Locales.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/esm/models/tab/TabModel.js.map +1 -1
- package/esm/modularui/Authenticate.js +2 -1
- package/esm/modularui/Authenticate.js.map +1 -1
- package/esm/redux/actions/SignOut.js +6 -2
- package/esm/redux/actions/SignOut.js.map +1 -1
- package/esm/redux/connectors/SignIn.js +3 -2
- package/esm/redux/connectors/SignIn.js.map +1 -1
- package/esm/redux/connectors/SignOut.js +4 -1
- package/esm/redux/connectors/SignOut.js.map +1 -1
- package/esm/redux/reducers/AuthReducer.js +0 -10
- package/esm/redux/reducers/AuthReducer.js.map +1 -1
- package/esm/redux/types.js.map +1 -1
- package/esm/utils/helpers/checkResource.js +2 -0
- package/esm/utils/helpers/checkResource.js.map +1 -1
- package/lib/constants/LayoutHints.js.map +1 -1
- package/lib/constants/Settings.js.map +1 -1
- package/lib/exceptions/FetchException.js.map +1 -1
- package/lib/hooks/__tests__/useAuthentication.spec.js.flow +15 -1
- package/lib/hooks/useAllFormsOnModel.js.map +1 -1
- package/lib/hooks/useAuthentication.js +7 -55
- package/lib/hooks/useAuthentication.js.flow +4 -37
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useContent.js.map +1 -1
- package/lib/hooks/useDeepCompareEffect.js.map +1 -1
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useI18n.js.map +1 -1
- package/lib/hooks/useModal.js.map +1 -1
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModels.js.map +1 -1
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useModularUIModel.js.map +1 -1
- package/lib/hooks/useModularUIRequest.js.map +1 -1
- package/lib/hooks/useNotification.js.map +1 -1
- package/lib/hooks/usePreference.js.map +1 -1
- package/lib/hooks/useProgressIndicator.js.map +1 -1
- package/lib/hooks/useRouter.js.map +1 -1
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js.map +1 -1
- package/lib/i18n/Message.js.map +1 -1
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/AttributeModel.js.map +1 -1
- package/lib/models/attributes/AttributeSetModel.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
- package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
- package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
- package/lib/models/attributes/StringAttributeModel.js.map +1 -1
- package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/lib/models/base/BaseCollection.js.map +1 -1
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/content/SubSectionModel.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
- package/lib/models/detail/DetailModel.js.map +1 -1
- package/lib/models/filters/BaseFilterModel.js.map +1 -1
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/lib/models/links/LinkCollection.js.map +1 -1
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListHeaderModel.js.map +1 -1
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
- package/lib/models/paging/PagingModel.js.map +1 -1
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/parameter/Parameter.js.map +1 -1
- package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/models/user/UserServicesModel.js.map +1 -1
- package/lib/modularui/Authenticate.js +3 -1
- package/lib/modularui/Authenticate.js.flow +3 -2
- package/lib/modularui/Authenticate.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/ModularUIResponse.js.map +1 -1
- package/lib/react/ErrorBoundaryFallback.js.map +1 -1
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-client/rehydrate.js.map +1 -1
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/serverNoSSR.js.map +1 -1
- package/lib/react-server/serverSSR.js.map +1 -1
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/react-theme/ThemeProvider.js.map +1 -1
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/react-theme/useTheme.js.map +1 -1
- package/lib/react-theme/utils/background.js.map +1 -1
- package/lib/react-theme/utils/colors.js.map +1 -1
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/react-theme/utils/themeProps.js.map +1 -1
- package/lib/redux/_i18n/actions.js.map +1 -1
- package/lib/redux/_i18n/reducer.js.map +1 -1
- package/lib/redux/_modularui/actions.js.map +1 -1
- package/lib/redux/_modularui/connector.js.map +1 -1
- package/lib/redux/_modularui/middleware.js.map +1 -1
- package/lib/redux/_modularui/modularuiUtils.js.map +1 -1
- package/lib/redux/_modularui/reducer.js.map +1 -1
- package/lib/redux/_modularui/selectors.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/connectors.js.map +1 -1
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/Form.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/lib/redux/actions/FormAutosave.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/FormValidations.js.map +1 -1
- package/lib/redux/actions/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/actions/SignIn.js.map +1 -1
- package/lib/redux/actions/SignOut.js +6 -1
- package/lib/redux/actions/SignOut.js.flow +9 -5
- package/lib/redux/actions/SignOut.js.map +1 -1
- package/lib/redux/connectors/Application.js.map +1 -1
- package/lib/redux/connectors/Breadcrumb.js.map +1 -1
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/Modal.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/Notification.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/Preferences.js.map +1 -1
- package/lib/redux/connectors/Progress.js.map +1 -1
- package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/SignIn.js +3 -5
- package/lib/redux/connectors/SignIn.js.flow +1 -6
- package/lib/redux/connectors/SignIn.js.map +1 -1
- package/lib/redux/connectors/SignOut.js +5 -1
- package/lib/redux/connectors/SignOut.js.flow +2 -1
- package/lib/redux/connectors/SignOut.js.map +1 -1
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.js +0 -11
- package/lib/redux/reducers/AuthReducer.js.flow +0 -11
- package/lib/redux/reducers/AuthReducer.js.map +1 -1
- package/lib/redux/reducers/__tests__/AuthReducer.spec.js.flow +0 -9
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/redux/types.js.flow +0 -1
- package/lib/redux/types.js.map +1 -1
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/checkResource.js +2 -0
- package/lib/utils/helpers/checkResource.js.flow +3 -0
- package/lib/utils/helpers/checkResource.js.map +1 -1
- package/lib/utils/helpers/objects.js.map +1 -1
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/helpers/text.js.map +1 -1
- package/lib/utils/number/formatValue.js.map +1 -1
- package/lib/utils/number/parseNumbers.js.map +1 -1
- package/package.json +17 -17
- package/src/hooks/__tests__/useAuthentication.spec.js +15 -1
- package/src/hooks/useAuthentication.js +4 -37
- package/src/modularui/Authenticate.js +3 -2
- package/src/redux/actions/SignOut.js +9 -5
- package/src/redux/connectors/SignIn.js +1 -6
- package/src/redux/connectors/SignOut.js +2 -1
- package/src/redux/reducers/AuthReducer.js +0 -11
- package/src/redux/reducers/__tests__/AuthReducer.spec.js +0 -9
- package/src/redux/types.js +0 -1
- package/src/utils/helpers/checkResource.js +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormAttributeSetRepeatable.js","names":["addRepeatableAttributeSet","form","newForm","clone","addEmptyFormObject","cancelRepeatableAttributeSet","formObject","removeFormObject","removeRepeatableAttributeSet"],"sources":["../../../src/redux/actions/FormAttributeSetRepeatable.js"],"sourcesContent":["// @flow\nimport { updateModel } from \"../_modularui/actions\";\n\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\nimport type { UpdateModelAction } from \"../_modularui/types\";\n\n/**\n */\nexport const addRepeatableAttributeSet = (\n form: FormModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n\n return updateModel(newForm);\n};\n\n/**\n */\nexport const cancelRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n newForm.removeFormObject(formObject);\n\n return updateModel(newForm);\n};\n\n/**\n */\nexport const removeRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.removeFormObject(formObject);\n\n return updateModel(newForm);\n};\n"],"mappings":";;;;;;;AACA;;AAMA;AACA;AACO,IAAMA,yBAAyB,GAAG,SAA5BA,yBAA4B,CACvCC,IADuC,EAEjB;EACtB,IAAMC,OAAO,GAAGD,IAAI,CAACE,KAAL,EAAhB;EAEAD,OAAO,CAACE,kBAAR;EAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"FormAttributeSetRepeatable.js","names":["addRepeatableAttributeSet","form","newForm","clone","addEmptyFormObject","updateModel","cancelRepeatableAttributeSet","formObject","removeFormObject","removeRepeatableAttributeSet"],"sources":["../../../src/redux/actions/FormAttributeSetRepeatable.js"],"sourcesContent":["// @flow\nimport { updateModel } from \"../_modularui/actions\";\n\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\nimport type { UpdateModelAction } from \"../_modularui/types\";\n\n/**\n */\nexport const addRepeatableAttributeSet = (\n form: FormModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n\n return updateModel(newForm);\n};\n\n/**\n */\nexport const cancelRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n newForm.removeFormObject(formObject);\n\n return updateModel(newForm);\n};\n\n/**\n */\nexport const removeRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.removeFormObject(formObject);\n\n return updateModel(newForm);\n};\n"],"mappings":";;;;;;;AACA;;AAMA;AACA;AACO,IAAMA,yBAAyB,GAAG,SAA5BA,yBAA4B,CACvCC,IADuC,EAEjB;EACtB,IAAMC,OAAO,GAAGD,IAAI,CAACE,KAAL,EAAhB;EAEAD,OAAO,CAACE,kBAAR;EAEA,OAAO,IAAAC,oBAAA,EAAYH,OAAZ,CAAP;AACD,CARM;AAUP;AACA;;;;;AACO,IAAMI,4BAA4B,GAAG,SAA/BA,4BAA+B,CAC1CL,IAD0C,EAE1CM,UAF0C,EAGpB;EACtB,IAAML,OAAO,GAAGD,IAAI,CAACE,KAAL,EAAhB;EAEAD,OAAO,CAACE,kBAAR;EACAF,OAAO,CAACM,gBAAR,CAAyBD,UAAzB;EAEA,OAAO,IAAAF,oBAAA,EAAYH,OAAZ,CAAP;AACD,CAVM;AAYP;AACA;;;;;AACO,IAAMO,4BAA4B,GAAG,SAA/BA,4BAA+B,CAC1CR,IAD0C,EAE1CM,UAF0C,EAGpB;EACtB,IAAML,OAAO,GAAGD,IAAI,CAACE,KAAL,EAAhB;EAEAD,OAAO,CAACM,gBAAR,CAAyBD,UAAzB;EAEA,OAAO,IAAAF,oBAAA,EAAYH,OAAZ,CAAP;AACD,CATM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormAutosave.js","names":["updateAutosave","status","model","type","payload","autosave","dispatch","form","AUTOSAVE_STATUS","START","formdata","getFormData","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","data","childmodels","locale","fetch","then","savedForm","FormModel","lastServerUpdate","FINISHED","debouncedAutosave","VALIDATE_DEBOUNCE_TIMEOUT","autosaveFormObject"],"sources":["../../../src/redux/actions/FormAutosave.js"],"sourcesContent":["// @flow\nimport debounce from \"lodash/debounce\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\nimport FormModel from \"../../models/form/FormModel\";\n\nimport {\n HTTP_METHODS,\n VALIDATE_DEBOUNCE_TIMEOUT,\n AUTOSAVE_STATUS,\n} from \"../../constants/Constants\";\n\nimport { updateModel } from \"../_modularui/actions\";\n\nimport type { UpdateAutosaveAction, ThunkAction, Dispatch } from \"../types\";\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateAutosave = (\n status: $Keys<typeof AUTOSAVE_STATUS>,\n model: FormModel\n): UpdateAutosaveAction => ({\n type: \"UPDATE_AUTOSAVE_STATUS\",\n payload: {\n status,\n model,\n },\n});\n\n/**\n */\nconst autosave = (dispatch: Dispatch, form: FormModel) => {\n dispatch(updateAutosave(AUTOSAVE_STATUS.START, form));\n\n const formdata = form.getFormData(true, false);\n\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"true\"), {\n method: HTTP_METHODS.POST,\n data: formdata,\n childmodels: false,\n locale: form.locale,\n })\n .fetch()\n .then((savedForm) => {\n if (savedForm instanceof FormModel) {\n // update last server update to indicate an update has happened\n // send the existing form to prevent updates in the ui based on autosave results\n form.lastServerUpdate = savedForm.lastServerUpdate;\n\n dispatch(updateModel(form));\n dispatch(updateAutosave(AUTOSAVE_STATUS.FINISHED, savedForm));\n }\n });\n};\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedAutosave = debounce((dispatch, form) => {\n autosave(dispatch, form);\n}, VALIDATE_DEBOUNCE_TIMEOUT);\n\n/**\n */\nexport const autosaveFormObject =\n (form: FormModel): ThunkAction =>\n (dispatch) =>\n debouncedAutosave(dispatch, form);\n"],"mappings":";;;;;;;;;AACA;;AAEA;;AACA;;AAEA;;AAMA;;AAIA;AACA;AACA;AACA;AACA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CACrBC,MADqB,EAErBC,KAFqB;EAAA,OAGK;IAC1BC,IAAI,EAAE,wBADoB;IAE1BC,OAAO,EAAE;MACPH,MAAM,EAANA,MADO;MAEPC,KAAK,EAALA;IAFO;EAFiB,CAHL;AAAA,CAAvB;AAWA;AACA;;;AACA,IAAMG,QAAQ,GAAG,SAAXA,QAAW,CAACC,QAAD,EAAqBC,IAArB,EAAyC;EACxDD,QAAQ,CAACN,cAAc,CAACQ,
|
|
1
|
+
{"version":3,"file":"FormAutosave.js","names":["updateAutosave","status","model","type","payload","autosave","dispatch","form","AUTOSAVE_STATUS","START","formdata","getFormData","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","data","childmodels","locale","fetch","then","savedForm","FormModel","lastServerUpdate","updateModel","FINISHED","debouncedAutosave","debounce","VALIDATE_DEBOUNCE_TIMEOUT","autosaveFormObject"],"sources":["../../../src/redux/actions/FormAutosave.js"],"sourcesContent":["// @flow\nimport debounce from \"lodash/debounce\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\nimport FormModel from \"../../models/form/FormModel\";\n\nimport {\n HTTP_METHODS,\n VALIDATE_DEBOUNCE_TIMEOUT,\n AUTOSAVE_STATUS,\n} from \"../../constants/Constants\";\n\nimport { updateModel } from \"../_modularui/actions\";\n\nimport type { UpdateAutosaveAction, ThunkAction, Dispatch } from \"../types\";\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateAutosave = (\n status: $Keys<typeof AUTOSAVE_STATUS>,\n model: FormModel\n): UpdateAutosaveAction => ({\n type: \"UPDATE_AUTOSAVE_STATUS\",\n payload: {\n status,\n model,\n },\n});\n\n/**\n */\nconst autosave = (dispatch: Dispatch, form: FormModel) => {\n dispatch(updateAutosave(AUTOSAVE_STATUS.START, form));\n\n const formdata = form.getFormData(true, false);\n\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"true\"), {\n method: HTTP_METHODS.POST,\n data: formdata,\n childmodels: false,\n locale: form.locale,\n })\n .fetch()\n .then((savedForm) => {\n if (savedForm instanceof FormModel) {\n // update last server update to indicate an update has happened\n // send the existing form to prevent updates in the ui based on autosave results\n form.lastServerUpdate = savedForm.lastServerUpdate;\n\n dispatch(updateModel(form));\n dispatch(updateAutosave(AUTOSAVE_STATUS.FINISHED, savedForm));\n }\n });\n};\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedAutosave = debounce((dispatch, form) => {\n autosave(dispatch, form);\n}, VALIDATE_DEBOUNCE_TIMEOUT);\n\n/**\n */\nexport const autosaveFormObject =\n (form: FormModel): ThunkAction =>\n (dispatch) =>\n debouncedAutosave(dispatch, form);\n"],"mappings":";;;;;;;;;AACA;;AAEA;;AACA;;AAEA;;AAMA;;AAIA;AACA;AACA;AACA;AACA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CACrBC,MADqB,EAErBC,KAFqB;EAAA,OAGK;IAC1BC,IAAI,EAAE,wBADoB;IAE1BC,OAAO,EAAE;MACPH,MAAM,EAANA,MADO;MAEPC,KAAK,EAALA;IAFO;EAFiB,CAHL;AAAA,CAAvB;AAWA;AACA;;;AACA,IAAMG,QAAQ,GAAG,SAAXA,QAAW,CAACC,QAAD,EAAqBC,IAArB,EAAyC;EACxDD,QAAQ,CAACN,cAAc,CAACQ,0BAAA,CAAgBC,KAAjB,EAAwBF,IAAxB,CAAf,CAAR;EAEA,IAAMG,QAAQ,GAAGH,IAAI,CAACI,WAAL,CAAiB,IAAjB,EAAuB,KAAvB,CAAjB;EAEA,IAAIC,yBAAJ,CAAqBL,IAAI,CAACM,QAAL,CAAcC,YAAd,CAA2B,QAA3B,EAAqC,MAArC,CAArB,EAAmE;IACjEC,MAAM,EAAEC,uBAAA,CAAaC,IAD4C;IAEjEC,IAAI,EAAER,QAF2D;IAGjES,WAAW,EAAE,KAHoD;IAIjEC,MAAM,EAAEb,IAAI,CAACa;EAJoD,CAAnE,EAMGC,KANH,GAOGC,IAPH,CAOQ,UAACC,SAAD,EAAe;IACnB,IAAIA,SAAS,YAAYC,kBAAzB,EAAoC;MAClC;MACA;MACAjB,IAAI,CAACkB,gBAAL,GAAwBF,SAAS,CAACE,gBAAlC;MAEAnB,QAAQ,CAAC,IAAAoB,oBAAA,EAAYnB,IAAZ,CAAD,CAAR;MACAD,QAAQ,CAACN,cAAc,CAACQ,0BAAA,CAAgBmB,QAAjB,EAA2BJ,SAA3B,CAAf,CAAR;IACD;EACF,CAhBH;AAiBD,CAtBD;AAwBA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMK,iBAAiB,GAAG,IAAAC,iBAAA,EAAS,UAACvB,QAAD,EAAWC,IAAX,EAAoB;EACrDF,QAAQ,CAACC,QAAD,EAAWC,IAAX,CAAR;AACD,CAFyB,EAEvBuB,oCAFuB,CAA1B;AAIA;AACA;;AACO,IAAMC,kBAAkB,GAC7B,SADWA,kBACX,CAACxB,IAAD;EAAA,OACA,UAACD,QAAD;IAAA,OACEsB,iBAAiB,CAACtB,QAAD,EAAWC,IAAX,CADnB;EAAA,CADA;AAAA,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormAutosubmit.js","names":["autosubmitFormObject","form","attribute","forceUpdate","allObjects","length","currentFormObject","hasAttributeByKey","key","setPreviousObject","isChanged","connectKey","selfhref","method","HTTP_METHODS","POST","data","formdata","updateModel"],"sources":["../../../src/redux/actions/FormAutosubmit.js"],"sourcesContent":["// @flow\nimport { loadModularUI } from \"../_modularui/actions\";\nimport { HTTP_METHODS } from \"../../constants/Constants\";\n\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { ThunkAction } from \"../types\";\n\n/**\n */\nexport const autosubmitFormObject = (\n form: FormModel,\n attribute: AttributeType,\n forceUpdate: boolean = false\n): ?ThunkAction => {\n // As long as we have form objects,\n // and the current attribute is not found in the current form object, go back.\n // When a form has a result, the current form object is null\n while (\n form.allObjects.length > 0 &&\n (!form.currentFormObject ||\n !form.currentFormObject.hasAttributeByKey(attribute.key))\n ) {\n form.setPreviousObject();\n }\n\n if (form.isChanged() || forceUpdate) {\n return loadModularUI(form.connectKey, form.selfhref, {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateModel: form,\n });\n }\n\n return null;\n};\n"],"mappings":";;;;;;;AACA;;AACA;;AAMA;AACA;AACO,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAuB,CAClCC,IADkC,EAElCC,SAFkC,EAIjB;EAAA,IADjBC,WACiB,uEADM,KACN;;EACjB;EACA;EACA;EACA,OACEF,IAAI,CAACG,UAAL,CAAgBC,MAAhB,GAAyB,CAAzB,KACC,CAACJ,IAAI,CAACK,iBAAN,IACC,CAACL,IAAI,CAACK,iBAAL,CAAuBC,iBAAvB,CAAyCL,SAAS,CAACM,GAAnD,CAFH,CADF,EAIE;IACAP,IAAI,CAACQ,iBAAL;EACD;;EAED,IAAIR,IAAI,CAACS,SAAL,MAAoBP,WAAxB,EAAqC;IACnC,OAAO,
|
|
1
|
+
{"version":3,"file":"FormAutosubmit.js","names":["autosubmitFormObject","form","attribute","forceUpdate","allObjects","length","currentFormObject","hasAttributeByKey","key","setPreviousObject","isChanged","loadModularUI","connectKey","selfhref","method","HTTP_METHODS","POST","data","formdata","updateModel"],"sources":["../../../src/redux/actions/FormAutosubmit.js"],"sourcesContent":["// @flow\nimport { loadModularUI } from \"../_modularui/actions\";\nimport { HTTP_METHODS } from \"../../constants/Constants\";\n\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { ThunkAction } from \"../types\";\n\n/**\n */\nexport const autosubmitFormObject = (\n form: FormModel,\n attribute: AttributeType,\n forceUpdate: boolean = false\n): ?ThunkAction => {\n // As long as we have form objects,\n // and the current attribute is not found in the current form object, go back.\n // When a form has a result, the current form object is null\n while (\n form.allObjects.length > 0 &&\n (!form.currentFormObject ||\n !form.currentFormObject.hasAttributeByKey(attribute.key))\n ) {\n form.setPreviousObject();\n }\n\n if (form.isChanged() || forceUpdate) {\n return loadModularUI(form.connectKey, form.selfhref, {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateModel: form,\n });\n }\n\n return null;\n};\n"],"mappings":";;;;;;;AACA;;AACA;;AAMA;AACA;AACO,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAuB,CAClCC,IADkC,EAElCC,SAFkC,EAIjB;EAAA,IADjBC,WACiB,uEADM,KACN;;EACjB;EACA;EACA;EACA,OACEF,IAAI,CAACG,UAAL,CAAgBC,MAAhB,GAAyB,CAAzB,KACC,CAACJ,IAAI,CAACK,iBAAN,IACC,CAACL,IAAI,CAACK,iBAAL,CAAuBC,iBAAvB,CAAyCL,SAAS,CAACM,GAAnD,CAFH,CADF,EAIE;IACAP,IAAI,CAACQ,iBAAL;EACD;;EAED,IAAIR,IAAI,CAACS,SAAL,MAAoBP,WAAxB,EAAqC;IACnC,OAAO,IAAAQ,sBAAA,EAAcV,IAAI,CAACW,UAAnB,EAA+BX,IAAI,CAACY,QAApC,EAA8C;MACnDC,MAAM,EAAEC,uBAAA,CAAaC,IAD8B;MAEnDC,IAAI,EAAEhB,IAAI,CAACiB,QAFwC;MAGnDC,WAAW,EAAElB;IAHsC,CAA9C,CAAP;EAKD;;EAED,OAAO,IAAP;AACD,CAzBM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormValidations.js","names":["updateValidations","form","formWithValidations","dispatch","getState","currentForm","modularui","connectKey","validatedForm","model","clone","FormModel","data","debouncedValidateFormObject","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","validationData","childmodels","isValidationRequest","locale","fetch","then","VALIDATE_DEBOUNCE_TIMEOUT","leading","trailing","validateFormObject"],"sources":["../../../src/redux/actions/FormValidations.js"],"sourcesContent":["// @flow\nimport debounce from \"lodash/debounce\";\n\nimport { updateModel } from \"../_modularui/actions\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\n\nimport {\n HTTP_METHODS,\n VALIDATE_DEBOUNCE_TIMEOUT,\n} from \"../../constants/Constants\";\n\nimport FormModel from \"../../models/form/FormModel\";\n\nimport type { Dispatch, ThunkAction } from \"../types\";\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateValidations =\n (form, formWithValidations) => (dispatch, getState) => {\n const currentForm = getState().modularui[form.connectKey];\n\n if (currentForm) {\n const validatedForm = currentForm.model.clone(true);\n if (validatedForm instanceof FormModel) {\n validatedForm.updateValidations(formWithValidations.data);\n }\n\n dispatch(updateModel(validatedForm));\n }\n };\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedValidateFormObject = debounce<\n (dispatch: Dispatch, form: FormModel) => void\n>(\n (dispatch, form: FormModel) => {\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"false\"), {\n method: HTTP_METHODS.POST,\n data: form.validationData,\n childmodels: false,\n isValidationRequest: true,\n locale: form.locale,\n })\n .fetch()\n .then((formWithValidations) =>\n dispatch(updateValidations(form, formWithValidations))\n );\n },\n VALIDATE_DEBOUNCE_TIMEOUT,\n {\n leading: true,\n trailing: true,\n }\n);\n\n/**\n */\nexport const validateFormObject =\n (form: FormModel): ThunkAction =>\n (dispatch) =>\n debouncedValidateFormObject(dispatch, form);\n"],"mappings":";;;;;;;;;AACA;;AAEA;;AAEA;;AAEA;;AAKA;;AAIA;AACA;AACA;AACA;AACA,IAAMA,iBAAiB,GACrB,SADIA,iBACJ,CAACC,IAAD,EAAOC,mBAAP;EAAA,OAA+B,UAACC,QAAD,EAAWC,QAAX,EAAwB;IACrD,IAAMC,WAAW,GAAGD,QAAQ,GAAGE,SAAX,CAAqBL,IAAI,CAACM,UAA1B,CAApB;;IAEA,IAAIF,WAAJ,EAAiB;MACf,IAAMG,aAAa,GAAGH,WAAW,CAACI,KAAZ,CAAkBC,KAAlB,CAAwB,IAAxB,CAAtB;;MACA,IAAIF,aAAa,YAAYG,kBAA7B,EAAwC;QACtCH,aAAa,CAACR,iBAAd,CAAgCE,mBAAmB,CAACU,IAApD;MACD;;MAEDT,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"FormValidations.js","names":["updateValidations","form","formWithValidations","dispatch","getState","currentForm","modularui","connectKey","validatedForm","model","clone","FormModel","data","updateModel","debouncedValidateFormObject","debounce","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","validationData","childmodels","isValidationRequest","locale","fetch","then","VALIDATE_DEBOUNCE_TIMEOUT","leading","trailing","validateFormObject"],"sources":["../../../src/redux/actions/FormValidations.js"],"sourcesContent":["// @flow\nimport debounce from \"lodash/debounce\";\n\nimport { updateModel } from \"../_modularui/actions\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\n\nimport {\n HTTP_METHODS,\n VALIDATE_DEBOUNCE_TIMEOUT,\n} from \"../../constants/Constants\";\n\nimport FormModel from \"../../models/form/FormModel\";\n\nimport type { Dispatch, ThunkAction } from \"../types\";\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateValidations =\n (form, formWithValidations) => (dispatch, getState) => {\n const currentForm = getState().modularui[form.connectKey];\n\n if (currentForm) {\n const validatedForm = currentForm.model.clone(true);\n if (validatedForm instanceof FormModel) {\n validatedForm.updateValidations(formWithValidations.data);\n }\n\n dispatch(updateModel(validatedForm));\n }\n };\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedValidateFormObject = debounce<\n (dispatch: Dispatch, form: FormModel) => void\n>(\n (dispatch, form: FormModel) => {\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"false\"), {\n method: HTTP_METHODS.POST,\n data: form.validationData,\n childmodels: false,\n isValidationRequest: true,\n locale: form.locale,\n })\n .fetch()\n .then((formWithValidations) =>\n dispatch(updateValidations(form, formWithValidations))\n );\n },\n VALIDATE_DEBOUNCE_TIMEOUT,\n {\n leading: true,\n trailing: true,\n }\n);\n\n/**\n */\nexport const validateFormObject =\n (form: FormModel): ThunkAction =>\n (dispatch) =>\n debouncedValidateFormObject(dispatch, form);\n"],"mappings":";;;;;;;;;AACA;;AAEA;;AAEA;;AAEA;;AAKA;;AAIA;AACA;AACA;AACA;AACA,IAAMA,iBAAiB,GACrB,SADIA,iBACJ,CAACC,IAAD,EAAOC,mBAAP;EAAA,OAA+B,UAACC,QAAD,EAAWC,QAAX,EAAwB;IACrD,IAAMC,WAAW,GAAGD,QAAQ,GAAGE,SAAX,CAAqBL,IAAI,CAACM,UAA1B,CAApB;;IAEA,IAAIF,WAAJ,EAAiB;MACf,IAAMG,aAAa,GAAGH,WAAW,CAACI,KAAZ,CAAkBC,KAAlB,CAAwB,IAAxB,CAAtB;;MACA,IAAIF,aAAa,YAAYG,kBAA7B,EAAwC;QACtCH,aAAa,CAACR,iBAAd,CAAgCE,mBAAmB,CAACU,IAApD;MACD;;MAEDT,QAAQ,CAAC,IAAAU,oBAAA,EAAYL,aAAZ,CAAD,CAAR;IACD;EACF,CAXD;AAAA,CADF;AAcA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMM,2BAA2B,GAAG,IAAAC,iBAAA,EAGlC,UAACZ,QAAD,EAAWF,IAAX,EAA+B;EAC7B,IAAIe,yBAAJ,CAAqBf,IAAI,CAACgB,QAAL,CAAcC,YAAd,CAA2B,QAA3B,EAAqC,OAArC,CAArB,EAAoE;IAClEC,MAAM,EAAEC,uBAAA,CAAaC,IAD6C;IAElET,IAAI,EAAEX,IAAI,CAACqB,cAFuD;IAGlEC,WAAW,EAAE,KAHqD;IAIlEC,mBAAmB,EAAE,IAJ6C;IAKlEC,MAAM,EAAExB,IAAI,CAACwB;EALqD,CAApE,EAOGC,KAPH,GAQGC,IARH,CAQQ,UAACzB,mBAAD;IAAA,OACJC,QAAQ,CAACH,iBAAiB,CAACC,IAAD,EAAOC,mBAAP,CAAlB,CADJ;EAAA,CARR;AAWD,CAfiC,EAgBlC0B,oCAhBkC,EAiBlC;EACEC,OAAO,EAAE,IADX;EAEEC,QAAQ,EAAE;AAFZ,CAjBkC,CAApC;AAuBA;AACA;;AACO,IAAMC,kBAAkB,GAC7B,SADWA,kBACX,CAAC9B,IAAD;EAAA,OACA,UAACE,QAAD;IAAA,OACEW,2BAA2B,CAACX,QAAD,EAAWF,IAAX,CAD7B;EAAA,CADA;AAAA,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.js","names":["dismissNotification","type","showNotification","message","error","timeout","dispatch","payload","setTimeout","getNotificationMessageId","form","actiontype","showFormNotification","NOTIFICATION_TYPES","SUCCESS","id","showXHRErrorNotification","ERROR","defaultMessage","parameters","properties"],"sources":["../../../src/redux/actions/Notification.js"],"sourcesContent":["// @flow\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\n\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { NOTIFICATION_TYPES } from \"../../constants/Constants\";\n\nimport type { DismissNotificationAction, ThunkAction } from \"../types\";\nimport type { MessageObject } from \"../../i18n/types\";\nimport type ErrorResponse from \"../../models/error/ErrorResponse\";\nimport type FormModel from \"../../models/form/FormModel\";\n\n/**\n * Dismiss notification message\n */\nexport const dismissNotification = (): DismissNotificationAction => ({\n type: \"DISMISS_NOTIFICATION\",\n});\n\n/**\n */\nexport const showNotification =\n (\n type: $Keys<typeof NOTIFICATION_TYPES>,\n message: MessageObject,\n error?: ?ErrorResponse,\n timeout?: ?number\n ): ThunkAction =>\n (dispatch) => {\n dispatch({\n type: \"SHOW_NOTIFICATION\",\n payload: {\n type,\n message,\n error,\n },\n });\n\n if (timeout) {\n setTimeout(() => {\n dispatch(dismissNotification());\n }, timeout);\n }\n };\n\n/**\n */\nconst getNotificationMessageId = (form) => {\n if (form.actiontype === \"create\") {\n return \"Notification.Msg.Create\";\n }\n\n if (form.actiontype === \"update\") {\n return \"Notification.Msg.Update\";\n }\n\n if (form.actiontype === \"delete\") {\n return \"Notification.Msg.Delete\";\n }\n\n return \"Notification.Msg.Generic\";\n};\n\n/**\n * Show form notification\n */\nexport const showFormNotification =\n (form: FormModel): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n\n dispatch(\n showNotification(NOTIFICATION_TYPES.SUCCESS, {\n id: getNotificationMessageId(form),\n })\n );\n\n setTimeout(() => {\n dispatch(dismissNotification());\n }, getSetting(\"HIDE_NOTIFICATION_TIMEOUT\"));\n\n return dispatch(finishProgress());\n };\n\n/**\n * Show error notification\n */\nexport const showXHRErrorNotification =\n (error: ErrorResponse): ThunkAction =>\n (dispatch) =>\n dispatch(\n showNotification(\n NOTIFICATION_TYPES.ERROR,\n {\n id: error.id,\n defaultMessage: error.message,\n parameters: error.properties,\n },\n error\n )\n );\n"],"mappings":";;;;;;;AACA;;AAEA;;AAEA;;AAOA;AACA;AACA;AACO,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB;EAAA,OAAkC;IACnEC,IAAI,EAAE;EAD6D,CAAlC;AAAA,CAA5B;AAIP;AACA;;;;;AACO,IAAMC,gBAAgB,GAC3B,SADWA,gBACX,CACED,IADF,EAEEE,OAFF,EAGEC,KAHF,EAIEC,OAJF;EAAA,OAMA,UAACC,QAAD,EAAc;IACZA,QAAQ,CAAC;MACPL,IAAI,EAAE,mBADC;MAEPM,OAAO,EAAE;QACPN,IAAI,EAAJA,IADO;QAEPE,OAAO,EAAPA,OAFO;QAGPC,KAAK,EAALA;MAHO;IAFF,CAAD,CAAR;;IASA,IAAIC,OAAJ,EAAa;MACXG,UAAU,CAAC,YAAM;QACfF,QAAQ,CAACN,mBAAmB,EAApB,CAAR;MACD,CAFS,EAEPK,OAFO,CAAV;IAGD;EACF,CArBD;AAAA,CADK;AAwBP;AACA;;;;;AACA,IAAMI,wBAAwB,GAAG,SAA3BA,wBAA2B,CAACC,IAAD,EAAU;EACzC,IAAIA,IAAI,CAACC,UAAL,KAAoB,QAAxB,EAAkC;IAChC,OAAO,yBAAP;EACD;;EAED,IAAID,IAAI,CAACC,UAAL,KAAoB,QAAxB,EAAkC;IAChC,OAAO,yBAAP;EACD;;EAED,IAAID,IAAI,CAACC,UAAL,KAAoB,QAAxB,EAAkC;IAChC,OAAO,yBAAP;EACD;;EAED,OAAO,0BAAP;AACD,CAdD;AAgBA;AACA;AACA;;;AACO,IAAMC,oBAAoB,GAC/B,SADWA,oBACX,CAACF,IAAD;EAAA,OACA,UAACJ,QAAD,EAAc;IACZA,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"Notification.js","names":["dismissNotification","type","showNotification","message","error","timeout","dispatch","payload","setTimeout","getNotificationMessageId","form","actiontype","showFormNotification","startProgress","NOTIFICATION_TYPES","SUCCESS","id","getSetting","finishProgress","showXHRErrorNotification","ERROR","defaultMessage","parameters","properties"],"sources":["../../../src/redux/actions/Notification.js"],"sourcesContent":["// @flow\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\n\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { NOTIFICATION_TYPES } from \"../../constants/Constants\";\n\nimport type { DismissNotificationAction, ThunkAction } from \"../types\";\nimport type { MessageObject } from \"../../i18n/types\";\nimport type ErrorResponse from \"../../models/error/ErrorResponse\";\nimport type FormModel from \"../../models/form/FormModel\";\n\n/**\n * Dismiss notification message\n */\nexport const dismissNotification = (): DismissNotificationAction => ({\n type: \"DISMISS_NOTIFICATION\",\n});\n\n/**\n */\nexport const showNotification =\n (\n type: $Keys<typeof NOTIFICATION_TYPES>,\n message: MessageObject,\n error?: ?ErrorResponse,\n timeout?: ?number\n ): ThunkAction =>\n (dispatch) => {\n dispatch({\n type: \"SHOW_NOTIFICATION\",\n payload: {\n type,\n message,\n error,\n },\n });\n\n if (timeout) {\n setTimeout(() => {\n dispatch(dismissNotification());\n }, timeout);\n }\n };\n\n/**\n */\nconst getNotificationMessageId = (form) => {\n if (form.actiontype === \"create\") {\n return \"Notification.Msg.Create\";\n }\n\n if (form.actiontype === \"update\") {\n return \"Notification.Msg.Update\";\n }\n\n if (form.actiontype === \"delete\") {\n return \"Notification.Msg.Delete\";\n }\n\n return \"Notification.Msg.Generic\";\n};\n\n/**\n * Show form notification\n */\nexport const showFormNotification =\n (form: FormModel): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n\n dispatch(\n showNotification(NOTIFICATION_TYPES.SUCCESS, {\n id: getNotificationMessageId(form),\n })\n );\n\n setTimeout(() => {\n dispatch(dismissNotification());\n }, getSetting(\"HIDE_NOTIFICATION_TIMEOUT\"));\n\n return dispatch(finishProgress());\n };\n\n/**\n * Show error notification\n */\nexport const showXHRErrorNotification =\n (error: ErrorResponse): ThunkAction =>\n (dispatch) =>\n dispatch(\n showNotification(\n NOTIFICATION_TYPES.ERROR,\n {\n id: error.id,\n defaultMessage: error.message,\n parameters: error.properties,\n },\n error\n )\n );\n"],"mappings":";;;;;;;AACA;;AAEA;;AAEA;;AAOA;AACA;AACA;AACO,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB;EAAA,OAAkC;IACnEC,IAAI,EAAE;EAD6D,CAAlC;AAAA,CAA5B;AAIP;AACA;;;;;AACO,IAAMC,gBAAgB,GAC3B,SADWA,gBACX,CACED,IADF,EAEEE,OAFF,EAGEC,KAHF,EAIEC,OAJF;EAAA,OAMA,UAACC,QAAD,EAAc;IACZA,QAAQ,CAAC;MACPL,IAAI,EAAE,mBADC;MAEPM,OAAO,EAAE;QACPN,IAAI,EAAJA,IADO;QAEPE,OAAO,EAAPA,OAFO;QAGPC,KAAK,EAALA;MAHO;IAFF,CAAD,CAAR;;IASA,IAAIC,OAAJ,EAAa;MACXG,UAAU,CAAC,YAAM;QACfF,QAAQ,CAACN,mBAAmB,EAApB,CAAR;MACD,CAFS,EAEPK,OAFO,CAAV;IAGD;EACF,CArBD;AAAA,CADK;AAwBP;AACA;;;;;AACA,IAAMI,wBAAwB,GAAG,SAA3BA,wBAA2B,CAACC,IAAD,EAAU;EACzC,IAAIA,IAAI,CAACC,UAAL,KAAoB,QAAxB,EAAkC;IAChC,OAAO,yBAAP;EACD;;EAED,IAAID,IAAI,CAACC,UAAL,KAAoB,QAAxB,EAAkC;IAChC,OAAO,yBAAP;EACD;;EAED,IAAID,IAAI,CAACC,UAAL,KAAoB,QAAxB,EAAkC;IAChC,OAAO,yBAAP;EACD;;EAED,OAAO,0BAAP;AACD,CAdD;AAgBA;AACA;AACA;;;AACO,IAAMC,oBAAoB,GAC/B,SADWA,oBACX,CAACF,IAAD;EAAA,OACA,UAACJ,QAAD,EAAc;IACZA,QAAQ,CAAC,IAAAO,gCAAA,GAAD,CAAR;IAEAP,QAAQ,CACNJ,gBAAgB,CAACY,6BAAA,CAAmBC,OAApB,EAA6B;MAC3CC,EAAE,EAAEP,wBAAwB,CAACC,IAAD;IADe,CAA7B,CADV,CAAR;IAMAF,UAAU,CAAC,YAAM;MACfF,QAAQ,CAACN,mBAAmB,EAApB,CAAR;IACD,CAFS,EAEP,IAAAiB,oBAAA,EAAW,2BAAX,CAFO,CAAV;IAIA,OAAOX,QAAQ,CAAC,IAAAY,iCAAA,GAAD,CAAf;EACD,CAfD;AAAA,CADK;AAkBP;AACA;AACA;;;;;AACO,IAAMC,wBAAwB,GACnC,SADWA,wBACX,CAACf,KAAD;EAAA,OACA,UAACE,QAAD;IAAA,OACEA,QAAQ,CACNJ,gBAAgB,CACdY,6BAAA,CAAmBM,KADL,EAEd;MACEJ,EAAE,EAAEZ,KAAK,CAACY,EADZ;MAEEK,cAAc,EAAEjB,KAAK,CAACD,OAFxB;MAGEmB,UAAU,EAAElB,KAAK,CAACmB;IAHpB,CAFc,EAOdnB,KAPc,CADV,CADV;EAAA,CADA;AAAA,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preferences.js","names":["getServerPreferenceValue","preferenceName","defaultValue","type","value","preferencesProvider","getPreferenceByName","split","val","setServerPreference","propertyName","setPreference","propertyValue","payload","setPreferences","preferences","setThemePreference","configTheme","themeData","JSON","parse","error","JsonParseException","settings","setAllContentInDataSetting","state","allContentInDataSetting","getModularUIContentInData","ALL_CONTENT_IN_DATA_SETTING","setLoginPreferences","loginSettings","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING"],"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 = 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 = 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] ?? `/j_security_check`\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] ?? `/Logoff`\n ),\n };\n\n setSettings(loginSettings);\n return setPreferences(loginSettings);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;AASA;;;;;;AASA;AACA;AACA,IAAMA,wBAAwB,GAAG,SAA3BA,wBAA2B,CAC/BC,cAD+B,EAI5B;EAAA,IAFHC,YAEG,uEAF6B,IAE7B;EAAA,IADHC,IACG;EACH,IAAIC,KAAK,GAAG,IAAZ;;EACA,IAAI,OAAOC,mBAAP,KAA+B,WAAnC,EAAgD;IAC9CD,KAAK,GAAGC,mBAAmB,CAACC,mBAApB,CAAwCL,cAAxC,CAAR;EACD;;EAED,IAAIG,KAAK,IAAI,IAAb,EAAmB;IACjBA,KAAK,GAAGF,YAAR;EACD;;EAED,IAAI,OAAOE,KAAP,KAAiB,QAAjB,IAA6BD,IAAI,KAAK,QAAtC,IAAkD,uBAAAC,KAAK,MAAL,CAAAA,KAAK,EAAU,GAAV,CAA3D,EAA2E;IAAA;;IACzEA,KAAK,GAAG,6BAAAA,KAAK,CAACG,KAAN,CAAY,GAAZ,kBAAqB,UAACC,GAAD;MAAA,OAAS,mBAAAA,GAAG,MAAH,CAAAA,GAAG,CAAZ;IAAA,CAArB,CAAR;EACD;;EAED,OAAOJ,KAAP;AACD,CAnBD;AAqBA;AACA;;;AACO,IAAMK,mBAAmB,GAAG,SAAtBA,mBAAsB,CACjCC,YADiC,EAIT;EAAA,IAFxBR,YAEwB,uEAFQ,IAER;EAAA,IADxBC,IACwB;EACxB,IAAMC,KAAK,GAAGJ,wBAAwB,CAACU,YAAD,EAAeR,YAAf,EAA6BC,IAA7B,CAAtC;EACA,OAAOQ,aAAa,CAACD,YAAD,EAAeN,KAAf,CAApB;AACD,CAPM;AASP;AACA;;;;;AACO,IAAMO,aAAa,GAAG,SAAhBA,aAAgB,CAC3BD,YAD2B;EAAA,IAE3BE,aAF2B,uEAEM,IAFN;EAAA,OAGF;IACzBT,IAAI,EAAE,gBADmB;IAEzBU,OAAO,oCACJH,YADI,EACWE,aADX;EAFkB,CAHE;AAAA,CAAtB;AAUP;AACA;;;;;AACO,IAAME,cAAc,GAAG,SAAjBA,cAAiB,CAACC,WAAD;EAAA,OAAgD;IAC5EZ,IAAI,EAAE,iBADsE;IAE5EU,OAAO,oBACFE,WADE;EAFqE,CAAhD;AAAA,CAAvB;AAOP;AACA;;;;;AACO,IAAMC,kBAAkB,GAAG,SAArBA,kBAAqB,CAChCC,WADgC,EAER;EACxB,IAAIC,SAAS,GAAG,EAAhB;;EAEA,IAAI;IACFA,SAAS,GAAGD,WAAW,GAAGE,IAAI,CAACC,KAAL,CAAWH,WAAX,CAAH,GAA6B,IAApD;EACD,CAFD,CAEE,OAAOI,KAAP,EAAc;IACd,MAAM,IAAIC,8BAAJ,6CAA4DD,KAA5D,EAAN;EACD;;EAED,IAAIH,SAAS,IAAI,
|
|
1
|
+
{"version":3,"file":"Preferences.js","names":["getServerPreferenceValue","preferenceName","defaultValue","type","value","preferencesProvider","getPreferenceByName","split","val","setServerPreference","propertyName","setPreference","propertyValue","payload","setPreferences","preferences","setThemePreference","configTheme","themeData","JSON","parse","error","JsonParseException","isPlainObject","setSettings","settings","setAllContentInDataSetting","state","allContentInDataSetting","getModularUIContentInData","ALL_CONTENT_IN_DATA_SETTING","setSetting","setLoginPreferences","loginSettings","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING"],"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 = 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 = 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] ?? `/j_security_check`\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] ?? `/Logoff`\n ),\n };\n\n setSettings(loginSettings);\n return setPreferences(loginSettings);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;AASA;;;;;;AASA;AACA;AACA,IAAMA,wBAAwB,GAAG,SAA3BA,wBAA2B,CAC/BC,cAD+B,EAI5B;EAAA,IAFHC,YAEG,uEAF6B,IAE7B;EAAA,IADHC,IACG;EACH,IAAIC,KAAK,GAAG,IAAZ;;EACA,IAAI,OAAOC,mBAAP,KAA+B,WAAnC,EAAgD;IAC9CD,KAAK,GAAGC,mBAAmB,CAACC,mBAApB,CAAwCL,cAAxC,CAAR;EACD;;EAED,IAAIG,KAAK,IAAI,IAAb,EAAmB;IACjBA,KAAK,GAAGF,YAAR;EACD;;EAED,IAAI,OAAOE,KAAP,KAAiB,QAAjB,IAA6BD,IAAI,KAAK,QAAtC,IAAkD,uBAAAC,KAAK,MAAL,CAAAA,KAAK,EAAU,GAAV,CAA3D,EAA2E;IAAA;;IACzEA,KAAK,GAAG,6BAAAA,KAAK,CAACG,KAAN,CAAY,GAAZ,kBAAqB,UAACC,GAAD;MAAA,OAAS,mBAAAA,GAAG,MAAH,CAAAA,GAAG,CAAZ;IAAA,CAArB,CAAR;EACD;;EAED,OAAOJ,KAAP;AACD,CAnBD;AAqBA;AACA;;;AACO,IAAMK,mBAAmB,GAAG,SAAtBA,mBAAsB,CACjCC,YADiC,EAIT;EAAA,IAFxBR,YAEwB,uEAFQ,IAER;EAAA,IADxBC,IACwB;EACxB,IAAMC,KAAK,GAAGJ,wBAAwB,CAACU,YAAD,EAAeR,YAAf,EAA6BC,IAA7B,CAAtC;EACA,OAAOQ,aAAa,CAACD,YAAD,EAAeN,KAAf,CAApB;AACD,CAPM;AASP;AACA;;;;;AACO,IAAMO,aAAa,GAAG,SAAhBA,aAAgB,CAC3BD,YAD2B;EAAA,IAE3BE,aAF2B,uEAEM,IAFN;EAAA,OAGF;IACzBT,IAAI,EAAE,gBADmB;IAEzBU,OAAO,oCACJH,YADI,EACWE,aADX;EAFkB,CAHE;AAAA,CAAtB;AAUP;AACA;;;;;AACO,IAAME,cAAc,GAAG,SAAjBA,cAAiB,CAACC,WAAD;EAAA,OAAgD;IAC5EZ,IAAI,EAAE,iBADsE;IAE5EU,OAAO,oBACFE,WADE;EAFqE,CAAhD;AAAA,CAAvB;AAOP;AACA;;;;;AACO,IAAMC,kBAAkB,GAAG,SAArBA,kBAAqB,CAChCC,WADgC,EAER;EACxB,IAAIC,SAAS,GAAG,EAAhB;;EAEA,IAAI;IACFA,SAAS,GAAGD,WAAW,GAAGE,IAAI,CAACC,KAAL,CAAWH,WAAX,CAAH,GAA6B,IAApD;EACD,CAFD,CAEE,OAAOI,KAAP,EAAc;IACd,MAAM,IAAIC,8BAAJ,6CAA4DD,KAA5D,EAAN;EACD;;EAED,IAAIH,SAAS,IAAI,IAAAK,sBAAA,EAAcL,SAAd,CAAjB,EAA2C;IACzC,IAAAM,qBAAA,EAAYN,SAAS,CAACO,QAAtB;EACD;;EAED,OAAOd,aAAa,CAAC,OAAD,EAAUO,SAAV,CAApB;AACD,CAhBM;AAkBP;AACA;AACA;;;;;AACO,IAAMQ,0BAA0B,GAAG,SAA7BA,0BAA6B,CACxCC,KADwC,EAEhB;EACxB,IAAIC,uBAAuB,GAAG,KAA9B;;EAEA,IACE,OAAOvB,mBAAP,KAA+B,WAA/B,IACA,OAAOA,mBAAmB,CAACwB,yBAA3B,KAAyD,WAF3D,EAGE;IACAD,uBAAuB,GAAGvB,mBAAmB,CAACwB,yBAApB,EAA1B;EACD,CALD,MAKO,IAAI,OAAOF,KAAP,KAAiB,WAArB,EAAkC;IACvCC,uBAAuB,GAAGD,KAAK,CAACZ,WAAN,CAAkBe,sCAAlB,CAA1B;EACD;;EAED,IAAAC,oBAAA,EAAWD,sCAAX,EAAwC,CAAC,CAACF,uBAA1C;EACA,OAAOjB,aAAa,CAACmB,sCAAD,EAA8BF,uBAA9B,CAApB;AACD,CAhBM;AAkBP;AACA;AACA;;;;;AACO,IAAMI,mBAAmB,GAAG,SAAtBA,mBAAsB,CACjCL,KADiC,EAER;EAAA;;EACzB,IAAMM,aAAa,uEAChBC,qBADgB,EACHlC,wBAAwB,CACpCkC,qBADoC,EAEpCP,KAFoC,aAEpCA,KAFoC,uBAEpCA,KAAK,CAAEZ,WAAP,CAAmBmB,qBAAnB,CAFoC,CADrB,iDAKhBC,6BALgB,EAKKnC,wBAAwB,CAC5CmC,6BAD4C,2BAE5CR,KAF4C,aAE5CA,KAF4C,uBAE5CA,KAAK,CAAEZ,WAAP,CAAmBoB,6BAAnB,CAF4C,6FAL7B,iDAShBC,iCATgB,EASSpC,wBAAwB,CAChDoC,iCADgD,4BAEhDT,KAFgD,aAEhDA,KAFgD,uBAEhDA,KAAK,CAAEZ,WAAP,CAAmBqB,iCAAnB,CAFgD,2EAEF,YAFE,CATjC,iDAahBC,iCAbgB,EAaSrC,wBAAwB,CAChDqC,iCADgD,4BAEhDV,KAFgD,aAEhDA,KAFgD,uBAEhDA,KAAK,CAAEZ,WAAP,CAAmBsB,iCAAnB,CAFgD,2EAEF,YAFE,CAbjC,iDAiBhBC,8BAjBgB,EAiBMtC,wBAAwB,CAC7CsC,8BAD6C,4BAE7CX,KAF6C,aAE7CA,KAF6C,uBAE7CA,KAAK,CAAEZ,WAAP,CAAmBuB,8BAAnB,CAF6C,qFAjB9B,kBAAnB;EAuBA,IAAAd,qBAAA,EAAYS,aAAZ;EACA,OAAOnB,cAAc,CAACmB,aAAD,CAArB;AACD,CA5BM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignIn.js","names":["loginFailed","errorMessage","type","payload","resetAuthErrors","loginSuccess","changePassword","dispatch","getState","isModal","router","location","state","modal","locationFrom","from","CHANGEPASSWORD_PATH","login","username","password","Authenticate","then","Cache","addItem","catch","error","id","dispatchedReloadApplication","resolve"],"sources":["../../../src/redux/actions/SignIn.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\nimport Authenticate from \"../../modularui/Authenticate\";\n\nimport { reloadApplication } from \"./Application\";\n\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\nimport { push } from \"../_router/actions\";\nimport { CHANGEPASSWORD_PATH } from \"../../constants/Constants\";\n\nimport type {\n LoginFailedAction,\n ResetAuthErrorsAction,\n LoginSuccessAction,\n ThunkAction,\n} from \"../types\";\n\n/**\n * Send login failed action\n */\nexport const loginFailed = (errorMessage: string): LoginFailedAction => ({\n type: \"AUTHENTICATION_ERROR\",\n payload: errorMessage,\n});\n\n/**\n * Resets any authentication errors\n */\nexport const resetAuthErrors = (): ResetAuthErrorsAction => ({\n type: \"AUTHENTICATION_RESET_ERRORS\",\n});\n\n/**\n * Send login success action\n */\nexport const loginSuccess = (): LoginSuccessAction => ({\n type: \"AUTHENTICATION_SUCCESS\",\n});\n\n/**\n * Send change password action\n */\nexport const changePassword = (): ThunkAction => (dispatch, getState) => {\n dispatch({\n type: \"CHANGE_PASSWORD\",\n });\n\n const isModal = getState().router.location?.state?.modal;\n const locationFrom = getState().router.location?.state?.from;\n return dispatch(\n push(CHANGEPASSWORD_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n modal: isModal,\n })\n );\n};\n\n/**\n */\nexport const login =\n (username: string, password: string): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n\n return new Authenticate()\n .login(username, password)\n .then(() => dispatch(reloadApplication()))\n .then(() => {\n Cache.addItem(\"auth\", true);\n dispatch(loginSuccess());\n\n return dispatch(finishProgress());\n })\n .catch((error) => {\n if (error.id === \"Error.ChangePasswordRequired\") {\n const dispatchedReloadApplication = dispatch(reloadApplication());\n\n return Promise.resolve(dispatchedReloadApplication).then(() => {\n Cache.addItem(\"auth\", true);\n return dispatch(changePassword());\n });\n }\n\n dispatch(loginFailed(error.id));\n return dispatch(finishProgress());\n });\n };\n"],"mappings":";;;;;;;;;;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AASA;AACA;AACA;AACO,IAAMA,WAAW,GAAG,SAAdA,WAAc,CAACC,YAAD;EAAA,OAA8C;IACvEC,IAAI,EAAE,sBADiE;IAEvEC,OAAO,EAAEF;EAF8D,CAA9C;AAAA,CAApB;AAKP;AACA;AACA;;;;;AACO,IAAMG,eAAe,GAAG,SAAlBA,eAAkB;EAAA,OAA8B;IAC3DF,IAAI,EAAE;EADqD,CAA9B;AAAA,CAAxB;AAIP;AACA;AACA;;;;;AACO,IAAMG,YAAY,GAAG,SAAfA,YAAe;EAAA,OAA2B;IACrDH,IAAI,EAAE;EAD+C,CAA3B;AAAA,CAArB;AAIP;AACA;AACA;;;;;AACO,IAAMI,cAAc,GAAG,SAAjBA,cAAiB;EAAA,OAAmB,UAACC,QAAD,EAAWC,QAAX,EAAwB;IAAA;;IACvED,QAAQ,CAAC;MACPL,IAAI,EAAE;IADC,CAAD,CAAR;IAIA,IAAMO,OAAO,4BAAGD,QAAQ,GAAGE,MAAX,CAAkBC,QAArB,oFAAG,sBAA4BC,KAA/B,2DAAG,uBAAmCC,KAAnD;IACA,IAAMC,YAAY,6BAAGN,QAAQ,GAAGE,MAAX,CAAkBC,QAArB,qFAAG,uBAA4BC,KAA/B,2DAAG,uBAAmCG,IAAxD;IACA,OAAOR,QAAQ,CACb,
|
|
1
|
+
{"version":3,"file":"SignIn.js","names":["loginFailed","errorMessage","type","payload","resetAuthErrors","loginSuccess","changePassword","dispatch","getState","isModal","router","location","state","modal","locationFrom","from","push","CHANGEPASSWORD_PATH","login","username","password","startProgress","Authenticate","then","reloadApplication","Cache","addItem","finishProgress","catch","error","id","dispatchedReloadApplication","resolve"],"sources":["../../../src/redux/actions/SignIn.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\nimport Authenticate from \"../../modularui/Authenticate\";\n\nimport { reloadApplication } from \"./Application\";\n\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\nimport { push } from \"../_router/actions\";\nimport { CHANGEPASSWORD_PATH } from \"../../constants/Constants\";\n\nimport type {\n LoginFailedAction,\n ResetAuthErrorsAction,\n LoginSuccessAction,\n ThunkAction,\n} from \"../types\";\n\n/**\n * Send login failed action\n */\nexport const loginFailed = (errorMessage: string): LoginFailedAction => ({\n type: \"AUTHENTICATION_ERROR\",\n payload: errorMessage,\n});\n\n/**\n * Resets any authentication errors\n */\nexport const resetAuthErrors = (): ResetAuthErrorsAction => ({\n type: \"AUTHENTICATION_RESET_ERRORS\",\n});\n\n/**\n * Send login success action\n */\nexport const loginSuccess = (): LoginSuccessAction => ({\n type: \"AUTHENTICATION_SUCCESS\",\n});\n\n/**\n * Send change password action\n */\nexport const changePassword = (): ThunkAction => (dispatch, getState) => {\n dispatch({\n type: \"CHANGE_PASSWORD\",\n });\n\n const isModal = getState().router.location?.state?.modal;\n const locationFrom = getState().router.location?.state?.from;\n return dispatch(\n push(CHANGEPASSWORD_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n modal: isModal,\n })\n );\n};\n\n/**\n */\nexport const login =\n (username: string, password: string): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n\n return new Authenticate()\n .login(username, password)\n .then(() => dispatch(reloadApplication()))\n .then(() => {\n Cache.addItem(\"auth\", true);\n dispatch(loginSuccess());\n\n return dispatch(finishProgress());\n })\n .catch((error) => {\n if (error.id === \"Error.ChangePasswordRequired\") {\n const dispatchedReloadApplication = dispatch(reloadApplication());\n\n return Promise.resolve(dispatchedReloadApplication).then(() => {\n Cache.addItem(\"auth\", true);\n return dispatch(changePassword());\n });\n }\n\n dispatch(loginFailed(error.id));\n return dispatch(finishProgress());\n });\n };\n"],"mappings":";;;;;;;;;;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AASA;AACA;AACA;AACO,IAAMA,WAAW,GAAG,SAAdA,WAAc,CAACC,YAAD;EAAA,OAA8C;IACvEC,IAAI,EAAE,sBADiE;IAEvEC,OAAO,EAAEF;EAF8D,CAA9C;AAAA,CAApB;AAKP;AACA;AACA;;;;;AACO,IAAMG,eAAe,GAAG,SAAlBA,eAAkB;EAAA,OAA8B;IAC3DF,IAAI,EAAE;EADqD,CAA9B;AAAA,CAAxB;AAIP;AACA;AACA;;;;;AACO,IAAMG,YAAY,GAAG,SAAfA,YAAe;EAAA,OAA2B;IACrDH,IAAI,EAAE;EAD+C,CAA3B;AAAA,CAArB;AAIP;AACA;AACA;;;;;AACO,IAAMI,cAAc,GAAG,SAAjBA,cAAiB;EAAA,OAAmB,UAACC,QAAD,EAAWC,QAAX,EAAwB;IAAA;;IACvED,QAAQ,CAAC;MACPL,IAAI,EAAE;IADC,CAAD,CAAR;IAIA,IAAMO,OAAO,4BAAGD,QAAQ,GAAGE,MAAX,CAAkBC,QAArB,oFAAG,sBAA4BC,KAA/B,2DAAG,uBAAmCC,KAAnD;IACA,IAAMC,YAAY,6BAAGN,QAAQ,GAAGE,MAAX,CAAkBC,QAArB,qFAAG,uBAA4BC,KAA/B,2DAAG,uBAAmCG,IAAxD;IACA,OAAOR,QAAQ,CACb,IAAAS,aAAA,EAAKC,8BAAL,EAA0B;MACxBF,IAAI,EAAED,YAAY,GAAGA,YAAH,GAAkBN,QAAQ,GAAGE,MAAX,CAAkBC,QAD9B;MAExBE,KAAK,EAAEJ;IAFiB,CAA1B,CADa,CAAf;EAMD,CAb6B;AAAA,CAAvB;AAeP;AACA;;;;;AACO,IAAMS,KAAK,GAChB,SADWA,KACX,CAACC,QAAD,EAAmBC,QAAnB;EAAA,OACA,UAACb,QAAD,EAAc;IACZA,QAAQ,CAAC,IAAAc,gCAAA,GAAD,CAAR;IAEA,OAAO,IAAIC,qBAAJ,GACJJ,KADI,CACEC,QADF,EACYC,QADZ,EAEJG,IAFI,CAEC;MAAA,OAAMhB,QAAQ,CAAC,IAAAiB,8BAAA,GAAD,CAAd;IAAA,CAFD,EAGJD,IAHI,CAGC,YAAM;MACVE,cAAA,CAAMC,OAAN,CAAc,MAAd,EAAsB,IAAtB;;MACAnB,QAAQ,CAACF,YAAY,EAAb,CAAR;MAEA,OAAOE,QAAQ,CAAC,IAAAoB,iCAAA,GAAD,CAAf;IACD,CARI,EASJC,KATI,CASE,UAACC,KAAD,EAAW;MAChB,IAAIA,KAAK,CAACC,EAAN,KAAa,8BAAjB,EAAiD;QAC/C,IAAMC,2BAA2B,GAAGxB,QAAQ,CAAC,IAAAiB,8BAAA,GAAD,CAA5C;QAEA,OAAO,iBAAQQ,OAAR,CAAgBD,2BAAhB,EAA6CR,IAA7C,CAAkD,YAAM;UAC7DE,cAAA,CAAMC,OAAN,CAAc,MAAd,EAAsB,IAAtB;;UACA,OAAOnB,QAAQ,CAACD,cAAc,EAAf,CAAf;QACD,CAHM,CAAP;MAID;;MAEDC,QAAQ,CAACP,WAAW,CAAC6B,KAAK,CAACC,EAAP,CAAZ,CAAR;MACA,OAAOvB,QAAQ,CAAC,IAAAoB,iCAAA,GAAD,CAAf;IACD,CArBI,CAAP;EAsBD,CA1BD;AAAA,CADK"}
|
|
@@ -13,6 +13,8 @@ var _ProgressIndicator = require("./ProgressIndicator");
|
|
|
13
13
|
|
|
14
14
|
var _actions = require("../_modularui/actions");
|
|
15
15
|
|
|
16
|
+
var _Application = require("./Application");
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
19
|
* Send logout success action
|
|
18
20
|
*/
|
|
@@ -31,7 +33,10 @@ var logout = function logout() {
|
|
|
31
33
|
return function (dispatch) {
|
|
32
34
|
dispatch((0, _ProgressIndicator.startProgress)());
|
|
33
35
|
return new _Authenticate.default().logout().then(function () {
|
|
34
|
-
dispatch((0, _actions.resetModularUI)());
|
|
36
|
+
return dispatch((0, _actions.resetModularUI)());
|
|
37
|
+
}).then(function () {
|
|
38
|
+
return dispatch((0, _Application.reloadApplication)());
|
|
39
|
+
}).then(function () {
|
|
35
40
|
dispatch(logoutSuccess());
|
|
36
41
|
return dispatch((0, _ProgressIndicator.finishProgress)());
|
|
37
42
|
});
|
|
@@ -4,6 +4,7 @@ import { startProgress, finishProgress } from "./ProgressIndicator";
|
|
|
4
4
|
import { resetModularUI } from "../_modularui/actions";
|
|
5
5
|
|
|
6
6
|
import type { Dispatch, LogoutSuccessAction, ThunkAction } from "../types";
|
|
7
|
+
import { reloadApplication } from "./Application";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Send logout success action
|
|
@@ -17,9 +18,12 @@ export const logoutSuccess = (): LogoutSuccessAction => ({
|
|
|
17
18
|
export const logout = (): ThunkAction => (dispatch: Dispatch) => {
|
|
18
19
|
dispatch(startProgress());
|
|
19
20
|
|
|
20
|
-
return new Authenticate()
|
|
21
|
-
|
|
22
|
-
dispatch(
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
return new Authenticate()
|
|
22
|
+
.logout()
|
|
23
|
+
.then(() => dispatch(resetModularUI()))
|
|
24
|
+
.then(() => dispatch(reloadApplication()))
|
|
25
|
+
.then(() => {
|
|
26
|
+
dispatch(logoutSuccess());
|
|
27
|
+
return dispatch(finishProgress());
|
|
28
|
+
});
|
|
25
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignOut.js","names":["logoutSuccess","type","logout","dispatch","Authenticate","then"],"sources":["../../../src/redux/actions/SignOut.js"],"sourcesContent":["// @flow\nimport Authenticate from \"../../modularui/Authenticate\";\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\nimport { resetModularUI } from \"../_modularui/actions\";\n\nimport type { Dispatch, LogoutSuccessAction, ThunkAction } from \"../types\";\n\n/**\n * Send logout success action\n */\nexport const logoutSuccess = (): LogoutSuccessAction => ({\n type: \"AUTHENTICATION_LOGOUT\",\n});\n\n/**\n */\nexport const logout = (): ThunkAction => (dispatch: Dispatch) => {\n dispatch(startProgress());\n\n return new Authenticate().logout().then(() =>
|
|
1
|
+
{"version":3,"file":"SignOut.js","names":["logoutSuccess","type","logout","dispatch","startProgress","Authenticate","then","resetModularUI","reloadApplication","finishProgress"],"sources":["../../../src/redux/actions/SignOut.js"],"sourcesContent":["// @flow\nimport Authenticate from \"../../modularui/Authenticate\";\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\nimport { resetModularUI } from \"../_modularui/actions\";\n\nimport type { Dispatch, LogoutSuccessAction, ThunkAction } from \"../types\";\nimport { reloadApplication } from \"./Application\";\n\n/**\n * Send logout success action\n */\nexport const logoutSuccess = (): LogoutSuccessAction => ({\n type: \"AUTHENTICATION_LOGOUT\",\n});\n\n/**\n */\nexport const logout = (): ThunkAction => (dispatch: Dispatch) => {\n dispatch(startProgress());\n\n return new Authenticate()\n .logout()\n .then(() => dispatch(resetModularUI()))\n .then(() => dispatch(reloadApplication()))\n .then(() => {\n dispatch(logoutSuccess());\n return dispatch(finishProgress());\n });\n};\n"],"mappings":";;;;;;;;;AACA;;AACA;;AACA;;AAGA;;AAEA;AACA;AACA;AACO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB;EAAA,OAA4B;IACvDC,IAAI,EAAE;EADiD,CAA5B;AAAA,CAAtB;AAIP;AACA;;;;;AACO,IAAMC,MAAM,GAAG,SAATA,MAAS;EAAA,OAAmB,UAACC,QAAD,EAAwB;IAC/DA,QAAQ,CAAC,IAAAC,gCAAA,GAAD,CAAR;IAEA,OAAO,IAAIC,qBAAJ,GACJH,MADI,GAEJI,IAFI,CAEC;MAAA,OAAMH,QAAQ,CAAC,IAAAI,uBAAA,GAAD,CAAd;IAAA,CAFD,EAGJD,IAHI,CAGC;MAAA,OAAMH,QAAQ,CAAC,IAAAK,8BAAA,GAAD,CAAd;IAAA,CAHD,EAIJF,IAJI,CAIC,YAAM;MACVH,QAAQ,CAACH,aAAa,EAAd,CAAR;MACA,OAAOG,QAAQ,CAAC,IAAAM,iCAAA,GAAD,CAAf;IACD,CAPI,CAAP;EAQD,CAXqB;AAAA,CAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Application.js","names":["connectApplication","propName"],"sources":["../../../src/redux/connectors/Application.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectApplication: ModularUIConnector = modularui(\n \"Application\",\n \"/\",\n {\n propName: \"application\",\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,kBAAsC,GAAG,
|
|
1
|
+
{"version":3,"file":"Application.js","names":["connectApplication","modularui","propName"],"sources":["../../../src/redux/connectors/Application.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectApplication: ModularUIConnector = modularui(\n \"Application\",\n \"/\",\n {\n propName: \"application\",\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,kBAAsC,GAAG,IAAAC,kBAAA,EACpD,aADoD,EAEpD,GAFoD,EAGpD;EACEC,QAAQ,EAAE;AADZ,CAHoD,CAA/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.js","names":["mapStateToProps","state","items","connectBreadcrumb"],"sources":["../../../src/redux/connectors/Breadcrumb.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { getActiveModels } from \"../_modularui/selectors\";\n\nimport type { ReduxState } from \"../types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n items: Array<{ key: string, href: Href, label: string, type: string }>,\n};\ntype Props = { ...StateProps, ... };\n\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n items: getActiveModels(state),\n});\n\n/**\n */\nexport const connectBreadcrumb: ComponentType<any> = connect<\n Props,\n {},\n _,\n _,\n _,\n _\n>(mapStateToProps);\n"],"mappings":";;;;;;;AACA;;AAEA;;AAWA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD;EAAA,OAAoC;IAC1DC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Breadcrumb.js","names":["mapStateToProps","state","items","getActiveModels","connectBreadcrumb","connect"],"sources":["../../../src/redux/connectors/Breadcrumb.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { getActiveModels } from \"../_modularui/selectors\";\n\nimport type { ReduxState } from \"../types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n items: Array<{ key: string, href: Href, label: string, type: string }>,\n};\ntype Props = { ...StateProps, ... };\n\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n items: getActiveModels(state),\n});\n\n/**\n */\nexport const connectBreadcrumb: ComponentType<any> = connect<\n Props,\n {},\n _,\n _,\n _,\n _\n>(mapStateToProps);\n"],"mappings":";;;;;;;AACA;;AAEA;;AAWA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD;EAAA,OAAoC;IAC1DC,KAAK,EAAE,IAAAC,0BAAA,EAAgBF,KAAhB;EADmD,CAApC;AAAA,CAAxB;AAIA;AACA;;;AACO,IAAMG,iBAAqC,GAAG,IAAAC,mBAAA,EAOnDL,eAPmD,CAA9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseView.js","names":["connectCaseView","match","url","propName"],"sources":["../../../src/redux/connectors/CaseView.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectCaseView: ModularUIConnector = modularui(\n \"CaseView\",\n ({ match }) => match.url,\n {\n propName: \"caseview\",\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,eAAmC,GAAG,
|
|
1
|
+
{"version":3,"file":"CaseView.js","names":["connectCaseView","modularui","match","url","propName"],"sources":["../../../src/redux/connectors/CaseView.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectCaseView: ModularUIConnector = modularui(\n \"CaseView\",\n ({ match }) => match.url,\n {\n propName: \"caseview\",\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,eAAmC,GAAG,IAAAC,kBAAA,EACjD,UADiD,EAEjD;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,GAArB;AAAA,CAFiD,EAGjD;EACEC,QAAQ,EAAE;AADZ,CAHiD,CAA5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConceptDetail.js","names":["connectConceptDetail","concept","location","search","propName"],"sources":["../../../src/redux/connectors/ConceptDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectConceptDetail: ModularUIConnector = modularui(\n \"ConceptDetail\",\n ({ concept, location }) => `/concepts/${concept}${location.search}`,\n { propName: \"conceptDetail\" }\n);\n"],"mappings":";;;;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,oBAAwC,GAAG,
|
|
1
|
+
{"version":3,"file":"ConceptDetail.js","names":["connectConceptDetail","modularui","concept","location","search","propName"],"sources":["../../../src/redux/connectors/ConceptDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectConceptDetail: ModularUIConnector = modularui(\n \"ConceptDetail\",\n ({ concept, location }) => `/concepts/${concept}${location.search}`,\n { propName: \"conceptDetail\" }\n);\n"],"mappings":";;;;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,oBAAwC,GAAG,IAAAC,kBAAA,EACtD,eADsD,EAEtD;EAAA;;EAAA,IAAGC,OAAH,QAAGA,OAAH;EAAA,IAAYC,QAAZ,QAAYA,QAAZ;EAAA,2DAAwCD,OAAxC,kBAAkDC,QAAQ,CAACC,MAA3D;AAAA,CAFsD,EAGtD;EAAEC,QAAQ,EAAE;AAAZ,CAHsD,CAAjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentBrowser.js","names":["connectContentBrowser","href","propName"],"sources":["../../../src/redux/connectors/ContentBrowser.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentBrowser: ModularUIConnector = modularui(\n \"ContentBrowser\",\n ({ href }) => href,\n {\n propName: \"contentindex\",\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,qBAAyC,GAAG,
|
|
1
|
+
{"version":3,"file":"ContentBrowser.js","names":["connectContentBrowser","modularui","href","propName"],"sources":["../../../src/redux/connectors/ContentBrowser.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentBrowser: ModularUIConnector = modularui(\n \"ContentBrowser\",\n ({ href }) => href,\n {\n propName: \"contentindex\",\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,qBAAyC,GAAG,IAAAC,kBAAA,EACvD,gBADuD,EAEvD;EAAA,IAAGC,IAAH,QAAGA,IAAH;EAAA,OAAcA,IAAd;AAAA,CAFuD,EAGvD;EACEC,QAAQ,EAAE;AADZ,CAHuD,CAAlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentDetail.js","names":["connectContentDetail","content","location","decodeURIComponent","search","propName"],"sources":["../../../src/redux/connectors/ContentDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetail: ModularUIConnector = modularui(\n \"ContentDetail\",\n ({ content, location }) =>\n `/content/${decodeURIComponent(content)}${location.search}`,\n { propName: \"contentTOC\" }\n);\n"],"mappings":";;;;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,oBAAwC,GAAG,
|
|
1
|
+
{"version":3,"file":"ContentDetail.js","names":["connectContentDetail","modularui","content","location","decodeURIComponent","search","propName"],"sources":["../../../src/redux/connectors/ContentDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetail: ModularUIConnector = modularui(\n \"ContentDetail\",\n ({ content, location }) =>\n `/content/${decodeURIComponent(content)}${location.search}`,\n { propName: \"contentTOC\" }\n);\n"],"mappings":";;;;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,oBAAwC,GAAG,IAAAC,kBAAA,EACtD,eADsD,EAEtD;EAAA;;EAAA,IAAGC,OAAH,QAAGA,OAAH;EAAA,IAAYC,QAAZ,QAAYA,QAAZ;EAAA,0DACcC,kBAAkB,CAACF,OAAD,CADhC,kBAC4CC,QAAQ,CAACE,MADrD;AAAA,CAFsD,EAItD;EAAEC,QAAQ,EAAE;AAAZ,CAJsD,CAAjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentDetailSection.js","names":["connectContentDetailSection","sectioncontent","section","entryDate","Href","decodeURIComponent","addParameter","propName"],"sources":["../../../src/redux/connectors/ContentDetailSection.js"],"sourcesContent":["// @flow\nimport Href from \"../../models/href/Href\";\n\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetailSection: ModularUIConnector = modularui(\n \"ContentDetailSection\",\n ({ sectioncontent, section, entryDate }) =>\n new Href(\n `/content/${decodeURIComponent(sectioncontent)}/${section}`\n ).addParameter(\"entryDate\", entryDate),\n { propName: \"content\" }\n);\n"],"mappings":";;;;;;;;;;;AACA;;AAEA;;AAIA;AACA;AACO,IAAMA,2BAA+C,GAAG,
|
|
1
|
+
{"version":3,"file":"ContentDetailSection.js","names":["connectContentDetailSection","modularui","sectioncontent","section","entryDate","Href","decodeURIComponent","addParameter","propName"],"sources":["../../../src/redux/connectors/ContentDetailSection.js"],"sourcesContent":["// @flow\nimport Href from \"../../models/href/Href\";\n\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetailSection: ModularUIConnector = modularui(\n \"ContentDetailSection\",\n ({ sectioncontent, section, entryDate }) =>\n new Href(\n `/content/${decodeURIComponent(sectioncontent)}/${section}`\n ).addParameter(\"entryDate\", entryDate),\n { propName: \"content\" }\n);\n"],"mappings":";;;;;;;;;;;AACA;;AAEA;;AAIA;AACA;AACO,IAAMA,2BAA+C,GAAG,IAAAC,kBAAA,EAC7D,sBAD6D,EAE7D;EAAA;;EAAA,IAAGC,cAAH,QAAGA,cAAH;EAAA,IAAmBC,OAAnB,QAAmBA,OAAnB;EAAA,IAA4BC,SAA5B,QAA4BA,SAA5B;EAAA,OACE,IAAIC,aAAJ,oDACcC,kBAAkB,CAACJ,cAAD,CADhC,uBACoDC,OADpD,GAEEI,YAFF,CAEe,WAFf,EAE4BH,SAF5B,CADF;AAAA,CAF6D,EAM7D;EAAEI,QAAQ,EAAE;AAAZ,CAN6D,CAAxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","names":["mapStateToProps","state","ownProps","isModal","router","location","modal","mapDispatchToProps","onPrevious","previousObject","onCancel","cancelForm","showFormNotification","reduxConnectedForm","moduiConnectedForm","href","formHref","Href","pathname","search","addParameter","propName","method","HTTP_METHODS","POST","connectForm"],"sources":["../../../src/redux/connectors/Form.js"],"sourcesContent":["// @flow\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\n\nimport modularui from \"../_modularui/connector\";\n\nimport { HTTP_METHODS } from \"../../constants/Constants\";\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { cancelForm, previousObject } from \"../actions/Form\";\nimport { showFormNotification } from \"../actions/Notification\";\n\nimport Href from \"../../models/href/Href\";\n\nimport type { AbstractComponent } from \"react\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { ContextRouter } from \"react-router\";\nimport type { ReduxState, ThunkAction } from \"../types\";\nimport type {\n ModularUIConnector,\n UpdateModelAction,\n} from \"../_modularui/types\";\n\ntype OwnProps = {\n ...?ContextRouter,\n href?: Href,\n isModal?: boolean,\n redirectTo?: string,\n};\n\ntype StateProps = {\n isModal: boolean,\n};\n\ntype DispatchProps = {\n onPrevious: (form: FormModel) => UpdateModelAction,\n onCancel: (form: FormModel) => ThunkAction,\n showFormNotification: (form: FormModel) => ThunkAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (\n state: ReduxState,\n ownProps: OwnProps\n): StateProps => ({\n isModal: state.router.location?.state?.modal || ownProps.isModal || false,\n});\n\nconst mapDispatchToProps: DispatchProps = {\n onPrevious: previousObject,\n onCancel: cancelForm,\n showFormNotification,\n};\n\nconst reduxConnectedForm = connect<Props, OwnProps, StateProps, _, _, _>(\n mapStateToProps,\n mapDispatchToProps\n);\n\nconst moduiConnectedForm: ModularUIConnector = modularui(\n \"Form\",\n ({ href, location }) => {\n const formHref = href || new Href(`${location.pathname}${location.search}`);\n\n if (getSetting(\"ALWAYS_COMMIT_FORM\")) {\n return formHref;\n }\n\n return formHref.addParameter(\"commit\", \"false\");\n },\n { propName: \"form\", method: HTTP_METHODS.POST }\n);\n\n/**\n */\nexport const connectForm: (\n Component: AbstractComponent<Props>\n) => AbstractComponent<OwnProps> = compose(\n moduiConnectedForm,\n reduxConnectedForm\n);\n"],"mappings":";;;;;;;;;;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;AACA;;AAEA;;AAkCA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CACtBC,KADsB,EAEtBC,QAFsB;EAAA;;EAAA,OAGN;IAChBC,OAAO,EAAE,0BAAAF,KAAK,CAACG,MAAN,CAAaC,QAAb,0GAAuBJ,KAAvB,kFAA8BK,KAA9B,KAAuCJ,QAAQ,CAACC,OAAhD,IAA2D;EADpD,CAHM;AAAA,CAAxB;;AAOA,IAAMI,kBAAiC,GAAG;EACxCC,UAAU,EAAEC,oBAD4B;EAExCC,QAAQ,EAAEC,gBAF8B;EAGxCC,oBAAoB,EAApBA;AAHwC,CAA1C;AAMA,IAAMC,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"Form.js","names":["mapStateToProps","state","ownProps","isModal","router","location","modal","mapDispatchToProps","onPrevious","previousObject","onCancel","cancelForm","showFormNotification","reduxConnectedForm","connect","moduiConnectedForm","modularui","href","formHref","Href","pathname","search","getSetting","addParameter","propName","method","HTTP_METHODS","POST","connectForm","compose"],"sources":["../../../src/redux/connectors/Form.js"],"sourcesContent":["// @flow\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\n\nimport modularui from \"../_modularui/connector\";\n\nimport { HTTP_METHODS } from \"../../constants/Constants\";\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { cancelForm, previousObject } from \"../actions/Form\";\nimport { showFormNotification } from \"../actions/Notification\";\n\nimport Href from \"../../models/href/Href\";\n\nimport type { AbstractComponent } from \"react\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { ContextRouter } from \"react-router\";\nimport type { ReduxState, ThunkAction } from \"../types\";\nimport type {\n ModularUIConnector,\n UpdateModelAction,\n} from \"../_modularui/types\";\n\ntype OwnProps = {\n ...?ContextRouter,\n href?: Href,\n isModal?: boolean,\n redirectTo?: string,\n};\n\ntype StateProps = {\n isModal: boolean,\n};\n\ntype DispatchProps = {\n onPrevious: (form: FormModel) => UpdateModelAction,\n onCancel: (form: FormModel) => ThunkAction,\n showFormNotification: (form: FormModel) => ThunkAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (\n state: ReduxState,\n ownProps: OwnProps\n): StateProps => ({\n isModal: state.router.location?.state?.modal || ownProps.isModal || false,\n});\n\nconst mapDispatchToProps: DispatchProps = {\n onPrevious: previousObject,\n onCancel: cancelForm,\n showFormNotification,\n};\n\nconst reduxConnectedForm = connect<Props, OwnProps, StateProps, _, _, _>(\n mapStateToProps,\n mapDispatchToProps\n);\n\nconst moduiConnectedForm: ModularUIConnector = modularui(\n \"Form\",\n ({ href, location }) => {\n const formHref = href || new Href(`${location.pathname}${location.search}`);\n\n if (getSetting(\"ALWAYS_COMMIT_FORM\")) {\n return formHref;\n }\n\n return formHref.addParameter(\"commit\", \"false\");\n },\n { propName: \"form\", method: HTTP_METHODS.POST }\n);\n\n/**\n */\nexport const connectForm: (\n Component: AbstractComponent<Props>\n) => AbstractComponent<OwnProps> = compose(\n moduiConnectedForm,\n reduxConnectedForm\n);\n"],"mappings":";;;;;;;;;;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;AACA;;AAEA;;AAkCA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CACtBC,KADsB,EAEtBC,QAFsB;EAAA;;EAAA,OAGN;IAChBC,OAAO,EAAE,0BAAAF,KAAK,CAACG,MAAN,CAAaC,QAAb,0GAAuBJ,KAAvB,kFAA8BK,KAA9B,KAAuCJ,QAAQ,CAACC,OAAhD,IAA2D;EADpD,CAHM;AAAA,CAAxB;;AAOA,IAAMI,kBAAiC,GAAG;EACxCC,UAAU,EAAEC,oBAD4B;EAExCC,QAAQ,EAAEC,gBAF8B;EAGxCC,oBAAoB,EAApBA;AAHwC,CAA1C;AAMA,IAAMC,kBAAkB,GAAG,IAAAC,mBAAA,EACzBd,eADyB,EAEzBO,kBAFyB,CAA3B;AAKA,IAAMQ,kBAAsC,GAAG,IAAAC,kBAAA,EAC7C,MAD6C,EAE7C,gBAAwB;EAAA;;EAAA,IAArBC,IAAqB,QAArBA,IAAqB;EAAA,IAAfZ,QAAe,QAAfA,QAAe;EACtB,IAAMa,QAAQ,GAAGD,IAAI,IAAI,IAAIE,aAAJ,2CAAYd,QAAQ,CAACe,QAArB,kBAAgCf,QAAQ,CAACgB,MAAzC,EAAzB;;EAEA,IAAI,IAAAC,oBAAA,EAAW,oBAAX,CAAJ,EAAsC;IACpC,OAAOJ,QAAP;EACD;;EAED,OAAOA,QAAQ,CAACK,YAAT,CAAsB,QAAtB,EAAgC,OAAhC,CAAP;AACD,CAV4C,EAW7C;EAAEC,QAAQ,EAAE,MAAZ;EAAoBC,MAAM,EAAEC,uBAAA,CAAaC;AAAzC,CAX6C,CAA/C;AAcA;AACA;;AACO,IAAMC,WAEmB,GAAG,IAAAC,cAAA,EACjCd,kBADiC,EAEjCF,kBAFiC,CAF5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormAttributeSet.js","names":["mapDispatchToProps","dispatch","ownProps","onAttributeChange","attribute","value","options","autosubmit","autosave","form","object","onAddAttributeSetClick","onCancelAttributeSetClick","formObject","onRemoveAttributeSetClick","connectFormAttributeSet"],"sources":["../../../src/redux/connectors/FormAttributeSet.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { updateFormAttribute } from \"../actions/FormAttributeSet\";\nimport {\n addRepeatableAttributeSet,\n cancelRepeatableAttributeSet,\n removeRepeatableAttributeSet,\n} from \"../actions/FormAttributeSetRepeatable\";\n\nimport type { ThunkAction, UpdateFormOptions } from \"../types\";\nimport type { UpdateModelAction } from \"../_modularui/types\";\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\nimport type { DispatchAPI } from \"redux\";\nimport type { ComponentType } from \"react\";\n\ntype Dispatch = DispatchAPI<UpdateModelAction> & DispatchAPI<ThunkAction>;\n\ntype OwnProps = {\n form: FormModel,\n object: FormObjectModel,\n formLayout?: \"vertical\" | \"horizontal\" | \"compact\",\n autosubmit?: boolean,\n autosave?: boolean,\n};\n\ntype DispatchProps = {\n onAttributeChange: (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions\n ) => ThunkAction,\n onAddAttributeSetClick: () => UpdateModelAction,\n onCancelAttributeSetClick: (formObject: FormObjectModel) => UpdateModelAction,\n onRemoveAttributeSetClick: (formObject: FormObjectModel) => UpdateModelAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...DispatchProps,\n};\n\nconst mapDispatchToProps = (\n dispatch: Dispatch,\n ownProps: OwnProps\n): DispatchProps => ({\n onAttributeChange: (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions = {\n autosubmit: ownProps.autosubmit || false,\n autosave: ownProps.autosave || false,\n }\n ) =>\n dispatch(\n updateFormAttribute(\n ownProps.form,\n ownProps.object,\n attribute,\n value,\n options\n )\n ),\n onAddAttributeSetClick: () =>\n dispatch(addRepeatableAttributeSet(ownProps.form)),\n onCancelAttributeSetClick: (formObject: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(ownProps.form, formObject)),\n onRemoveAttributeSetClick: (formObject: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(ownProps.form, formObject)),\n});\n\n/**\n */\nexport const connectFormAttributeSet: ComponentType<any> = connect<\n Props,\n OwnProps,\n _,\n DispatchProps,\n _,\n _\n>(null, mapDispatchToProps);\n"],"mappings":";;;;;;;AACA;;AAEA;;AACA;;AAwCA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAqB,CACzBC,QADyB,EAEzBC,QAFyB;EAAA,OAGN;IACnBC,iBAAiB,EAAE,2BACjBC,SADiB,EAEjBC,KAFiB;MAAA,IAGjBC,OAHiB,uEAGY;QAC3BC,UAAU,EAAEL,QAAQ,CAACK,UAAT,IAAuB,KADR;QAE3BC,QAAQ,EAAEN,QAAQ,CAACM,QAAT,IAAqB;MAFJ,CAHZ;MAAA,OAQjBP,QAAQ,CACN,
|
|
1
|
+
{"version":3,"file":"FormAttributeSet.js","names":["mapDispatchToProps","dispatch","ownProps","onAttributeChange","attribute","value","options","autosubmit","autosave","updateFormAttribute","form","object","onAddAttributeSetClick","addRepeatableAttributeSet","onCancelAttributeSetClick","formObject","cancelRepeatableAttributeSet","onRemoveAttributeSetClick","removeRepeatableAttributeSet","connectFormAttributeSet","connect"],"sources":["../../../src/redux/connectors/FormAttributeSet.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { updateFormAttribute } from \"../actions/FormAttributeSet\";\nimport {\n addRepeatableAttributeSet,\n cancelRepeatableAttributeSet,\n removeRepeatableAttributeSet,\n} from \"../actions/FormAttributeSetRepeatable\";\n\nimport type { ThunkAction, UpdateFormOptions } from \"../types\";\nimport type { UpdateModelAction } from \"../_modularui/types\";\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\nimport type { DispatchAPI } from \"redux\";\nimport type { ComponentType } from \"react\";\n\ntype Dispatch = DispatchAPI<UpdateModelAction> & DispatchAPI<ThunkAction>;\n\ntype OwnProps = {\n form: FormModel,\n object: FormObjectModel,\n formLayout?: \"vertical\" | \"horizontal\" | \"compact\",\n autosubmit?: boolean,\n autosave?: boolean,\n};\n\ntype DispatchProps = {\n onAttributeChange: (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions\n ) => ThunkAction,\n onAddAttributeSetClick: () => UpdateModelAction,\n onCancelAttributeSetClick: (formObject: FormObjectModel) => UpdateModelAction,\n onRemoveAttributeSetClick: (formObject: FormObjectModel) => UpdateModelAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...DispatchProps,\n};\n\nconst mapDispatchToProps = (\n dispatch: Dispatch,\n ownProps: OwnProps\n): DispatchProps => ({\n onAttributeChange: (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions = {\n autosubmit: ownProps.autosubmit || false,\n autosave: ownProps.autosave || false,\n }\n ) =>\n dispatch(\n updateFormAttribute(\n ownProps.form,\n ownProps.object,\n attribute,\n value,\n options\n )\n ),\n onAddAttributeSetClick: () =>\n dispatch(addRepeatableAttributeSet(ownProps.form)),\n onCancelAttributeSetClick: (formObject: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(ownProps.form, formObject)),\n onRemoveAttributeSetClick: (formObject: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(ownProps.form, formObject)),\n});\n\n/**\n */\nexport const connectFormAttributeSet: ComponentType<any> = connect<\n Props,\n OwnProps,\n _,\n DispatchProps,\n _,\n _\n>(null, mapDispatchToProps);\n"],"mappings":";;;;;;;AACA;;AAEA;;AACA;;AAwCA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAqB,CACzBC,QADyB,EAEzBC,QAFyB;EAAA,OAGN;IACnBC,iBAAiB,EAAE,2BACjBC,SADiB,EAEjBC,KAFiB;MAAA,IAGjBC,OAHiB,uEAGY;QAC3BC,UAAU,EAAEL,QAAQ,CAACK,UAAT,IAAuB,KADR;QAE3BC,QAAQ,EAAEN,QAAQ,CAACM,QAAT,IAAqB;MAFJ,CAHZ;MAAA,OAQjBP,QAAQ,CACN,IAAAQ,qCAAA,EACEP,QAAQ,CAACQ,IADX,EAEER,QAAQ,CAACS,MAFX,EAGEP,SAHF,EAIEC,KAJF,EAKEC,OALF,CADM,CARS;IAAA,CADA;IAkBnBM,sBAAsB,EAAE;MAAA,OACtBX,QAAQ,CAAC,IAAAY,qDAAA,EAA0BX,QAAQ,CAACQ,IAAnC,CAAD,CADc;IAAA,CAlBL;IAoBnBI,yBAAyB,EAAE,mCAACC,UAAD;MAAA,OACzBd,QAAQ,CAAC,IAAAe,wDAAA,EAA6Bd,QAAQ,CAACQ,IAAtC,EAA4CK,UAA5C,CAAD,CADiB;IAAA,CApBR;IAsBnBE,yBAAyB,EAAE,mCAACF,UAAD;MAAA,OACzBd,QAAQ,CAAC,IAAAiB,wDAAA,EAA6BhB,QAAQ,CAACQ,IAAtC,EAA4CK,UAA5C,CAAD,CADiB;IAAA;EAtBR,CAHM;AAAA,CAA3B;AA6BA;AACA;;;AACO,IAAMI,uBAA2C,GAAG,IAAAC,mBAAA,EAOzD,IAPyD,EAOnDpB,kBAPmD,CAApD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListDetail.js","names":["connectListDetail","href","propName","targetModel","ListDetailModel"],"sources":["../../../src/redux/connectors/ListDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\nimport ListDetailModel from \"../../models/list/ListDetailModel\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectListDetail: ModularUIConnector = modularui(\n \"ListDetail\",\n ({ href }) => href,\n {\n propName: \"detail\",\n targetModel: ListDetailModel,\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AACA;;AAIA;AACA;AACO,IAAMA,iBAAqC,GAAG,
|
|
1
|
+
{"version":3,"file":"ListDetail.js","names":["connectListDetail","modularui","href","propName","targetModel","ListDetailModel"],"sources":["../../../src/redux/connectors/ListDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\nimport ListDetailModel from \"../../models/list/ListDetailModel\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectListDetail: ModularUIConnector = modularui(\n \"ListDetail\",\n ({ href }) => href,\n {\n propName: \"detail\",\n targetModel: ListDetailModel,\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AACA;;AAIA;AACA;AACO,IAAMA,iBAAqC,GAAG,IAAAC,kBAAA,EACnD,YADmD,EAEnD;EAAA,IAAGC,IAAH,QAAGA,IAAH;EAAA,OAAcA,IAAd;AAAA,CAFmD,EAGnD;EACEC,QAAQ,EAAE,QADZ;EAEEC,WAAW,EAAEC;AAFf,CAHmD,CAA9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","names":["mapStateToProps","state","visibleModal","modals","modal","visible","visibleModalKey","key","visibleModalSize","size","mapDispatchToProps","onShowModal","showModal","onCloseModal","closeModal","connectModal"],"sources":["../../../src/redux/connectors/Modal.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { showModal, closeModal } from \"../actions/Modals\";\n\nimport type { ReduxState, ShowModalAction, CloseModalAction } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n visibleModalKey: string | null,\n visibleModalSize?: string | null,\n};\n\ntype DispatchProps = {\n onShowModal: (modalKey: string) => ShowModalAction,\n onCloseModal: (modalKey: string) => CloseModalAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => {\n const visibleModal = state.modals.modals.find((modal) => modal.visible);\n\n return {\n visibleModalKey: visibleModal ? visibleModal.key : null,\n visibleModalSize: visibleModal ? visibleModal.size : null,\n };\n};\n\nconst mapDispatchToProps = {\n onShowModal: showModal,\n onCloseModal: closeModal,\n};\n\n/**\n */\nexport const connectModal: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;;;;;;AACA;;AAEA;;AAoBA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD,EAAmC;EAAA;;EACzD,IAAMC,YAAY,GAAG,8BAAAD,KAAK,CAACE,MAAN,CAAaA,MAAb,iBAAyB,UAACC,KAAD;IAAA,OAAWA,KAAK,CAACC,OAAjB;EAAA,CAAzB,CAArB;EAEA,OAAO;IACLC,eAAe,EAAEJ,YAAY,GAAGA,YAAY,CAACK,GAAhB,GAAsB,IAD9C;IAELC,gBAAgB,EAAEN,YAAY,GAAGA,YAAY,CAACO,IAAhB,GAAuB;EAFhD,CAAP;AAID,CAPD;;AASA,IAAMC,kBAAkB,GAAG;EACzBC,WAAW,EAAEC,iBADY;EAEzBC,YAAY,EAAEC;AAFW,CAA3B;AAKA;AACA;;AACO,IAAMC,YAAgC,GAAG,
|
|
1
|
+
{"version":3,"file":"Modal.js","names":["mapStateToProps","state","visibleModal","modals","modal","visible","visibleModalKey","key","visibleModalSize","size","mapDispatchToProps","onShowModal","showModal","onCloseModal","closeModal","connectModal","connect"],"sources":["../../../src/redux/connectors/Modal.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { showModal, closeModal } from \"../actions/Modals\";\n\nimport type { ReduxState, ShowModalAction, CloseModalAction } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n visibleModalKey: string | null,\n visibleModalSize?: string | null,\n};\n\ntype DispatchProps = {\n onShowModal: (modalKey: string) => ShowModalAction,\n onCloseModal: (modalKey: string) => CloseModalAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => {\n const visibleModal = state.modals.modals.find((modal) => modal.visible);\n\n return {\n visibleModalKey: visibleModal ? visibleModal.key : null,\n visibleModalSize: visibleModal ? visibleModal.size : null,\n };\n};\n\nconst mapDispatchToProps = {\n onShowModal: showModal,\n onCloseModal: closeModal,\n};\n\n/**\n */\nexport const connectModal: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;;;;;;AACA;;AAEA;;AAoBA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD,EAAmC;EAAA;;EACzD,IAAMC,YAAY,GAAG,8BAAAD,KAAK,CAACE,MAAN,CAAaA,MAAb,iBAAyB,UAACC,KAAD;IAAA,OAAWA,KAAK,CAACC,OAAjB;EAAA,CAAzB,CAArB;EAEA,OAAO;IACLC,eAAe,EAAEJ,YAAY,GAAGA,YAAY,CAACK,GAAhB,GAAsB,IAD9C;IAELC,gBAAgB,EAAEN,YAAY,GAAGA,YAAY,CAACO,IAAhB,GAAuB;EAFhD,CAAP;AAID,CAPD;;AASA,IAAMC,kBAAkB,GAAG;EACzBC,WAAW,EAAEC,iBADY;EAEzBC,YAAY,EAAEC;AAFW,CAA3B;AAKA;AACA;;AACO,IAAMC,YAAgC,GAAG,IAAAC,mBAAA,EAO9ChB,eAP8C,EAO7BU,kBAP6B,CAAzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelCatalog.js","names":["connectModelCatalog","match","url","propName"],"sources":["../../../src/redux/connectors/ModelCatalog.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectModelCatalog: ModularUIConnector = modularui(\n \"ModelCatalog\",\n ({ match }) => match.url,\n {\n propName: \"modelcatalog\",\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,mBAAuC,GAAG,
|
|
1
|
+
{"version":3,"file":"ModelCatalog.js","names":["connectModelCatalog","modularui","match","url","propName"],"sources":["../../../src/redux/connectors/ModelCatalog.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectModelCatalog: ModularUIConnector = modularui(\n \"ModelCatalog\",\n ({ match }) => match.url,\n {\n propName: \"modelcatalog\",\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,mBAAuC,GAAG,IAAAC,kBAAA,EACrD,cADqD,EAErD;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,GAArB;AAAA,CAFqD,EAGrD;EACEC,QAAQ,EAAE;AADZ,CAHqD,CAAhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.js","names":["mapStateToProps","state","messageType","notification","message","error","render","mapDispatchToProps","onDismiss","dismissNotification","connectNotification"],"sources":["../../../src/redux/connectors/Notification.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { dismissNotification } from \"../actions/Notification\";\n\nimport type { ReduxState, DismissNotificationAction } from \"../types\";\nimport type { MessageObject } from \"../../i18n/types\";\nimport type ErrorResponse from \"../../models/error/ErrorResponse\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n messageType: string | null,\n message: MessageObject | null,\n error: ?ErrorResponse,\n render: boolean,\n};\n\ntype DispatchProps = {\n onDismiss: () => DismissNotificationAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n messageType: state.notification.messageType,\n message: state.notification.message,\n error: state.notification.error,\n render: state.notification.render,\n});\n\nconst mapDispatchToProps = {\n onDismiss: dismissNotification,\n};\n\n/**\n */\nexport const connectNotification: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;;AACA;;AAEA;;AAuBA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD;EAAA,OAAoC;IAC1DC,WAAW,EAAED,KAAK,CAACE,YAAN,CAAmBD,WAD0B;IAE1DE,OAAO,EAAEH,KAAK,CAACE,YAAN,CAAmBC,OAF8B;IAG1DC,KAAK,EAAEJ,KAAK,CAACE,YAAN,CAAmBE,KAHgC;IAI1DC,MAAM,EAAEL,KAAK,CAACE,YAAN,CAAmBG;EAJ+B,CAApC;AAAA,CAAxB;;AAOA,IAAMC,kBAAkB,GAAG;EACzBC,SAAS,EAAEC;AADc,CAA3B;AAIA;AACA;;AACO,IAAMC,mBAAuC,GAAG,
|
|
1
|
+
{"version":3,"file":"Notification.js","names":["mapStateToProps","state","messageType","notification","message","error","render","mapDispatchToProps","onDismiss","dismissNotification","connectNotification","connect"],"sources":["../../../src/redux/connectors/Notification.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { dismissNotification } from \"../actions/Notification\";\n\nimport type { ReduxState, DismissNotificationAction } from \"../types\";\nimport type { MessageObject } from \"../../i18n/types\";\nimport type ErrorResponse from \"../../models/error/ErrorResponse\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n messageType: string | null,\n message: MessageObject | null,\n error: ?ErrorResponse,\n render: boolean,\n};\n\ntype DispatchProps = {\n onDismiss: () => DismissNotificationAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n messageType: state.notification.messageType,\n message: state.notification.message,\n error: state.notification.error,\n render: state.notification.render,\n});\n\nconst mapDispatchToProps = {\n onDismiss: dismissNotification,\n};\n\n/**\n */\nexport const connectNotification: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;;AACA;;AAEA;;AAuBA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD;EAAA,OAAoC;IAC1DC,WAAW,EAAED,KAAK,CAACE,YAAN,CAAmBD,WAD0B;IAE1DE,OAAO,EAAEH,KAAK,CAACE,YAAN,CAAmBC,OAF8B;IAG1DC,KAAK,EAAEJ,KAAK,CAACE,YAAN,CAAmBE,KAHgC;IAI1DC,MAAM,EAAEL,KAAK,CAACE,YAAN,CAAmBG;EAJ+B,CAApC;AAAA,CAAxB;;AAOA,IAAMC,kBAAkB,GAAG;EACzBC,SAAS,EAAEC;AADc,CAA3B;AAIA;AACA;;AACO,IAAMC,mBAAuC,GAAG,IAAAC,mBAAA,EAOrDX,eAPqD,EAOpCO,kBAPoC,CAAhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelRenderer.js","names":["connectPanel","href","match","querystring","Error","panelHref","Href","url","isExact","addParametersFromString","propName"],"sources":["../../../src/redux/connectors/PanelRenderer.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\nimport Href from \"../../models/href/Href\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectPanel: ModularUIConnector = modularui(\n \"PanelRenderer\",\n ({ href, match, querystring = \"\" }) => {\n if (!href && !match) {\n throw new Error(\n \"Cannot determine panel url because of missing href and match\"\n );\n }\n\n const panelHref = href ? new Href(href) : new Href(match.url);\n\n if (match && match.isExact) {\n panelHref.addParametersFromString(querystring);\n }\n\n return panelHref;\n },\n {\n propName: \"panel\",\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AACA;;AAIA;AACA;AACO,IAAMA,YAAgC,GAAG,
|
|
1
|
+
{"version":3,"file":"PanelRenderer.js","names":["connectPanel","modularui","href","match","querystring","Error","panelHref","Href","url","isExact","addParametersFromString","propName"],"sources":["../../../src/redux/connectors/PanelRenderer.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\nimport Href from \"../../models/href/Href\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectPanel: ModularUIConnector = modularui(\n \"PanelRenderer\",\n ({ href, match, querystring = \"\" }) => {\n if (!href && !match) {\n throw new Error(\n \"Cannot determine panel url because of missing href and match\"\n );\n }\n\n const panelHref = href ? new Href(href) : new Href(match.url);\n\n if (match && match.isExact) {\n panelHref.addParametersFromString(querystring);\n }\n\n return panelHref;\n },\n {\n propName: \"panel\",\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AACA;;AAIA;AACA;AACO,IAAMA,YAAgC,GAAG,IAAAC,kBAAA,EAC9C,eAD8C,EAE9C,gBAAuC;EAAA,IAApCC,IAAoC,QAApCA,IAAoC;EAAA,IAA9BC,KAA8B,QAA9BA,KAA8B;EAAA,4BAAvBC,WAAuB;EAAA,IAAvBA,WAAuB,iCAAT,EAAS;;EACrC,IAAI,CAACF,IAAD,IAAS,CAACC,KAAd,EAAqB;IACnB,MAAM,IAAIE,KAAJ,CACJ,8DADI,CAAN;EAGD;;EAED,IAAMC,SAAS,GAAGJ,IAAI,GAAG,IAAIK,aAAJ,CAASL,IAAT,CAAH,GAAoB,IAAIK,aAAJ,CAASJ,KAAK,CAACK,GAAf,CAA1C;;EAEA,IAAIL,KAAK,IAAIA,KAAK,CAACM,OAAnB,EAA4B;IAC1BH,SAAS,CAACI,uBAAV,CAAkCN,WAAlC;EACD;;EAED,OAAOE,SAAP;AACD,CAhB6C,EAiB9C;EACEK,QAAQ,EAAE;AADZ,CAjB8C,CAAzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preferences.js","names":["getPreferences","preferences","preferenceName","requestedPreferences","Array","isArray","prefs","forEach","prefName","connectPreferences","WrappedComponent","mapStateToProps","state"],"sources":["../../../src/redux/connectors/Preferences.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport type { AbstractComponent, ComponentType } from \"react\";\nimport type { ReduxState, PreferenceValue } from \"../types\";\n\ntype StateProps = {\n [prefName: string]: PreferenceValue,\n};\n\ntype OwnProps = {};\n\ntype Props = {\n ...StateProps,\n ...OwnProps,\n dispatch: void,\n};\n\n/**\n */\nconst getPreferences = (preferences, preferenceName) => {\n const requestedPreferences = Array.isArray(preferenceName)\n ? preferenceName\n : [preferenceName];\n\n const prefs: $Shape<StateProps> = {};\n\n requestedPreferences.forEach((prefName) => {\n prefs[prefName] = preferences[prefName];\n });\n\n return prefs;\n};\n\n/**\n * Injects a preference by name into a react component\n */\nexport const connectPreferences = (\n WrappedComponent: AbstractComponent<any>,\n preferenceName: string | Array<string>\n): ComponentType<any> => {\n /**\n */\n const mapStateToProps = (state: ReduxState): StateProps =>\n getPreferences(state.preferences, preferenceName);\n\n return connect<Props, OwnProps, _, _, _, _>(mapStateToProps)(\n WrappedComponent\n );\n};\n"],"mappings":";;;;;;;AACA;;AAiBA;AACA;AACA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CAACC,WAAD,EAAcC,cAAd,EAAiC;EACtD,IAAMC,oBAAoB,GAAGC,KAAK,CAACC,OAAN,CAAcH,cAAd,IACzBA,cADyB,GAEzB,CAACA,cAAD,CAFJ;EAIA,IAAMI,KAAyB,GAAG,EAAlC;EAEAH,oBAAoB,CAACI,OAArB,CAA6B,UAACC,QAAD,EAAc;IACzCF,KAAK,CAACE,QAAD,CAAL,GAAkBP,WAAW,CAACO,QAAD,CAA7B;EACD,CAFD;EAIA,OAAOF,KAAP;AACD,CAZD;AAcA;AACA;AACA;;;AACO,IAAMG,kBAAkB,GAAG,SAArBA,kBAAqB,CAChCC,gBADgC,EAEhCR,cAFgC,EAGT;EACvB;AACF;EACE,IAAMS,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD;IAAA,OACtBZ,cAAc,CAACY,KAAK,CAACX,WAAP,EAAoBC,cAApB,CADQ;EAAA,CAAxB;;EAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"Preferences.js","names":["getPreferences","preferences","preferenceName","requestedPreferences","Array","isArray","prefs","forEach","prefName","connectPreferences","WrappedComponent","mapStateToProps","state","connect"],"sources":["../../../src/redux/connectors/Preferences.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport type { AbstractComponent, ComponentType } from \"react\";\nimport type { ReduxState, PreferenceValue } from \"../types\";\n\ntype StateProps = {\n [prefName: string]: PreferenceValue,\n};\n\ntype OwnProps = {};\n\ntype Props = {\n ...StateProps,\n ...OwnProps,\n dispatch: void,\n};\n\n/**\n */\nconst getPreferences = (preferences, preferenceName) => {\n const requestedPreferences = Array.isArray(preferenceName)\n ? preferenceName\n : [preferenceName];\n\n const prefs: $Shape<StateProps> = {};\n\n requestedPreferences.forEach((prefName) => {\n prefs[prefName] = preferences[prefName];\n });\n\n return prefs;\n};\n\n/**\n * Injects a preference by name into a react component\n */\nexport const connectPreferences = (\n WrappedComponent: AbstractComponent<any>,\n preferenceName: string | Array<string>\n): ComponentType<any> => {\n /**\n */\n const mapStateToProps = (state: ReduxState): StateProps =>\n getPreferences(state.preferences, preferenceName);\n\n return connect<Props, OwnProps, _, _, _, _>(mapStateToProps)(\n WrappedComponent\n );\n};\n"],"mappings":";;;;;;;AACA;;AAiBA;AACA;AACA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CAACC,WAAD,EAAcC,cAAd,EAAiC;EACtD,IAAMC,oBAAoB,GAAGC,KAAK,CAACC,OAAN,CAAcH,cAAd,IACzBA,cADyB,GAEzB,CAACA,cAAD,CAFJ;EAIA,IAAMI,KAAyB,GAAG,EAAlC;EAEAH,oBAAoB,CAACI,OAArB,CAA6B,UAACC,QAAD,EAAc;IACzCF,KAAK,CAACE,QAAD,CAAL,GAAkBP,WAAW,CAACO,QAAD,CAA7B;EACD,CAFD;EAIA,OAAOF,KAAP;AACD,CAZD;AAcA;AACA;AACA;;;AACO,IAAMG,kBAAkB,GAAG,SAArBA,kBAAqB,CAChCC,gBADgC,EAEhCR,cAFgC,EAGT;EACvB;AACF;EACE,IAAMS,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD;IAAA,OACtBZ,cAAc,CAACY,KAAK,CAACX,WAAP,EAAoBC,cAApB,CADQ;EAAA,CAAxB;;EAGA,OAAO,IAAAW,mBAAA,EAAqCF,eAArC,EACLD,gBADK,CAAP;AAGD,CAZM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.js","names":["mapDispatchToProps","onStartProgress","startProgress","onFinishProgress","finishProgress","onError","handleError","connectProgress"],"sources":["../../../src/redux/connectors/Progress.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\nimport { finishProgress, startProgress } from \"../actions/ProgressIndicator\";\nimport { handleError } from \"../actions/Error\";\n\nimport type {\n StartProgressAction,\n FinishProgressAction,\n ThunkAction,\n} from \"../types\";\nimport type FetchException from \"../../exceptions/FetchException\";\nimport type { ComponentType } from \"react\";\n\ntype DispatchProps = {\n onStartProgress: () => StartProgressAction,\n onFinishProgress: () => FinishProgressAction,\n onError: (error: Error | FetchException) => ThunkAction,\n};\n\nconst mapDispatchToProps: DispatchProps = {\n onStartProgress: startProgress,\n onFinishProgress: finishProgress,\n onError: handleError,\n};\n\n/**\n */\nexport const connectProgress: ComponentType<any> = connect<\n DispatchProps,\n {},\n _,\n _,\n _,\n _\n>(null, mapDispatchToProps);\n"],"mappings":";;;;;;;AACA;;AACA;;AACA;;AAgBA,IAAMA,kBAAiC,GAAG;EACxCC,eAAe,EAAEC,gCADuB;EAExCC,gBAAgB,EAAEC,iCAFsB;EAGxCC,OAAO,EAAEC;AAH+B,CAA1C;AAMA;AACA;;AACO,IAAMC,eAAmC,GAAG,
|
|
1
|
+
{"version":3,"file":"Progress.js","names":["mapDispatchToProps","onStartProgress","startProgress","onFinishProgress","finishProgress","onError","handleError","connectProgress","connect"],"sources":["../../../src/redux/connectors/Progress.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\nimport { finishProgress, startProgress } from \"../actions/ProgressIndicator\";\nimport { handleError } from \"../actions/Error\";\n\nimport type {\n StartProgressAction,\n FinishProgressAction,\n ThunkAction,\n} from \"../types\";\nimport type FetchException from \"../../exceptions/FetchException\";\nimport type { ComponentType } from \"react\";\n\ntype DispatchProps = {\n onStartProgress: () => StartProgressAction,\n onFinishProgress: () => FinishProgressAction,\n onError: (error: Error | FetchException) => ThunkAction,\n};\n\nconst mapDispatchToProps: DispatchProps = {\n onStartProgress: startProgress,\n onFinishProgress: finishProgress,\n onError: handleError,\n};\n\n/**\n */\nexport const connectProgress: ComponentType<any> = connect<\n DispatchProps,\n {},\n _,\n _,\n _,\n _\n>(null, mapDispatchToProps);\n"],"mappings":";;;;;;;AACA;;AACA;;AACA;;AAgBA,IAAMA,kBAAiC,GAAG;EACxCC,eAAe,EAAEC,gCADuB;EAExCC,gBAAgB,EAAEC,iCAFsB;EAGxCC,OAAO,EAAEC;AAH+B,CAA1C;AAMA;AACA;;AACO,IAAMC,eAAmC,GAAG,IAAAC,mBAAA,EAOjD,IAPiD,EAO3CR,kBAP2C,CAA5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressIndicator.js","names":["mapStateToProps","state","count","progressindicator","timestamp","percentComplete","connectProgressIndicator"],"sources":["../../../src/redux/connectors/ProgressIndicator.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport type { ReduxState } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n count: number,\n timestamp: number,\n percentComplete: number,\n};\n\ntype Props = {\n ...StateProps,\n ...\n};\n\n/**\n */\nconst mapStateToProps = (state: ReduxState) => ({\n count: state.progressindicator.count,\n timestamp: state.progressindicator.timestamp,\n percentComplete: state.progressindicator.percentComplete,\n});\n\n/**\n */\nexport const connectProgressIndicator: ComponentType<any> = connect<\n Props,\n {},\n _,\n _,\n _,\n void\n>(mapStateToProps);\n"],"mappings":";;;;;;;AACA;;AAgBA;AACA;AACA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD;EAAA,OAAwB;IAC9CC,KAAK,EAAED,KAAK,CAACE,iBAAN,CAAwBD,KADe;IAE9CE,SAAS,EAAEH,KAAK,CAACE,iBAAN,CAAwBC,SAFW;IAG9CC,eAAe,EAAEJ,KAAK,CAACE,iBAAN,CAAwBE;EAHK,CAAxB;AAAA,CAAxB;AAMA;AACA;;;AACO,IAAMC,wBAA4C,GAAG,
|
|
1
|
+
{"version":3,"file":"ProgressIndicator.js","names":["mapStateToProps","state","count","progressindicator","timestamp","percentComplete","connectProgressIndicator","connect"],"sources":["../../../src/redux/connectors/ProgressIndicator.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport type { ReduxState } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n count: number,\n timestamp: number,\n percentComplete: number,\n};\n\ntype Props = {\n ...StateProps,\n ...\n};\n\n/**\n */\nconst mapStateToProps = (state: ReduxState) => ({\n count: state.progressindicator.count,\n timestamp: state.progressindicator.timestamp,\n percentComplete: state.progressindicator.percentComplete,\n});\n\n/**\n */\nexport const connectProgressIndicator: ComponentType<any> = connect<\n Props,\n {},\n _,\n _,\n _,\n void\n>(mapStateToProps);\n"],"mappings":";;;;;;;AACA;;AAgBA;AACA;AACA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD;EAAA,OAAwB;IAC9CC,KAAK,EAAED,KAAK,CAACE,iBAAN,CAAwBD,KADe;IAE9CE,SAAS,EAAEH,KAAK,CAACE,iBAAN,CAAwBC,SAFW;IAG9CC,eAAe,EAAEJ,KAAK,CAACE,iBAAN,CAAwBE;EAHK,CAAxB;AAAA,CAAxB;AAMA;AACA;;;AACO,IAAMC,wBAA4C,GAAG,IAAAC,mBAAA,EAO1DP,eAP0D,CAArD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickSearch.js","names":["mapDispatchToProps","push","connectQuickSearch","href","propName"],"sources":["../../../src/redux/connectors/QuickSearch.js"],"sourcesContent":["// @flow\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\n\nimport modularui from \"../_modularui/connector\";\nimport { push } from \"../_router/actions\";\n\nimport type { PushAction } from \"../_router/types\";\nimport type { LocationShape } from \"react-router\";\nimport type { AbstractComponent } from \"react\";\nimport Href from \"../../models/href/Href\";\n\ntype OwnProps = { href: Href };\ntype DispatchProps = {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...DispatchProps,\n};\n\nconst mapDispatchToProps: DispatchProps = {\n push,\n};\n\n/**\n */\nexport const connectQuickSearch: (\n Component: AbstractComponent<Props>\n) => AbstractComponent<OwnProps> = compose(\n connect<Props, OwnProps, _, _, _, _>(null, mapDispatchToProps),\n modularui(\"QuickSearch\", ({ href }) => href, {\n propName: \"search\",\n })\n);\n"],"mappings":";;;;;;;;;AACA;;AACA;;AAEA;;AACA;;AAKA;;AAYA,IAAMA,kBAAiC,GAAG;EACxCC,IAAI,EAAJA;AADwC,CAA1C;AAIA;AACA;;AACO,IAAMC,kBAEmB,GAAG,
|
|
1
|
+
{"version":3,"file":"QuickSearch.js","names":["mapDispatchToProps","push","connectQuickSearch","compose","connect","modularui","href","propName"],"sources":["../../../src/redux/connectors/QuickSearch.js"],"sourcesContent":["// @flow\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\n\nimport modularui from \"../_modularui/connector\";\nimport { push } from \"../_router/actions\";\n\nimport type { PushAction } from \"../_router/types\";\nimport type { LocationShape } from \"react-router\";\nimport type { AbstractComponent } from \"react\";\nimport Href from \"../../models/href/Href\";\n\ntype OwnProps = { href: Href };\ntype DispatchProps = {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...DispatchProps,\n};\n\nconst mapDispatchToProps: DispatchProps = {\n push,\n};\n\n/**\n */\nexport const connectQuickSearch: (\n Component: AbstractComponent<Props>\n) => AbstractComponent<OwnProps> = compose(\n connect<Props, OwnProps, _, _, _, _>(null, mapDispatchToProps),\n modularui(\"QuickSearch\", ({ href }) => href, {\n propName: \"search\",\n })\n);\n"],"mappings":";;;;;;;;;AACA;;AACA;;AAEA;;AACA;;AAKA;;AAYA,IAAMA,kBAAiC,GAAG;EACxCC,IAAI,EAAJA;AADwC,CAA1C;AAIA;AACA;;AACO,IAAMC,kBAEmB,GAAG,IAAAC,cAAA,EACjC,IAAAC,mBAAA,EAAqC,IAArC,EAA2CJ,kBAA3C,CADiC,EAEjC,IAAAK,kBAAA,EAAU,aAAV,EAAyB;EAAA,IAAGC,IAAH,QAAGA,IAAH;EAAA,OAAcA,IAAd;AAAA,CAAzB,EAA6C;EAC3CC,QAAQ,EAAE;AADiC,CAA7C,CAFiC,CAF5B"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -13,12 +11,12 @@ var _SignIn = require("../actions/SignIn");
|
|
|
13
11
|
|
|
14
12
|
var _selectors = require("../_modularui/selectors");
|
|
15
13
|
|
|
16
|
-
var _UserServicesModel = _interopRequireDefault(require("../../models/user/UserServicesModel"));
|
|
17
|
-
|
|
18
14
|
var mapStateToProps = function mapStateToProps(state) {
|
|
15
|
+
var _application$isLogged;
|
|
16
|
+
|
|
19
17
|
var application = (0, _selectors.getApplication)(state);
|
|
20
18
|
return {
|
|
21
|
-
isAuthenticated:
|
|
19
|
+
isAuthenticated: (_application$isLogged = application === null || application === void 0 ? void 0 : application.isLoggedIn) !== null && _application$isLogged !== void 0 ? _application$isLogged : false,
|
|
22
20
|
errorMessage: state.auth.error
|
|
23
21
|
};
|
|
24
22
|
};
|
|
@@ -5,8 +5,6 @@ import { login } from "../actions/SignIn";
|
|
|
5
5
|
|
|
6
6
|
import { getApplication } from "../_modularui/selectors";
|
|
7
7
|
|
|
8
|
-
import UserServicesModel from "../../models/user/UserServicesModel";
|
|
9
|
-
|
|
10
8
|
import type { ReduxState, ThunkAction } from "../types";
|
|
11
9
|
import type { ComponentType } from "react";
|
|
12
10
|
|
|
@@ -28,10 +26,7 @@ const mapStateToProps = (state: ReduxState): StateProps => {
|
|
|
28
26
|
const application = getApplication(state);
|
|
29
27
|
|
|
30
28
|
return {
|
|
31
|
-
isAuthenticated:
|
|
32
|
-
state.auth.isAuthenticated &&
|
|
33
|
-
application?.userServices instanceof UserServicesModel &&
|
|
34
|
-
application.userServices.isLoggedIn,
|
|
29
|
+
isAuthenticated: application?.isLoggedIn ?? false,
|
|
35
30
|
errorMessage: state.auth.error,
|
|
36
31
|
};
|
|
37
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignIn.js","names":["mapStateToProps","state","application","
|
|
1
|
+
{"version":3,"file":"SignIn.js","names":["mapStateToProps","state","application","getApplication","isAuthenticated","isLoggedIn","errorMessage","auth","error","mapDispatchToProps","onSubmit","login","connectSignIn","connect"],"sources":["../../../src/redux/connectors/SignIn.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { login } from \"../actions/SignIn\";\n\nimport { getApplication } from \"../_modularui/selectors\";\n\nimport type { ReduxState, ThunkAction } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n isAuthenticated: boolean,\n errorMessage: ?string,\n};\n\ntype DispatchProps = {\n onSubmit: (username: string, password: string) => ThunkAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => {\n const application = getApplication(state);\n\n return {\n isAuthenticated: application?.isLoggedIn ?? false,\n errorMessage: state.auth.error,\n };\n};\n\nconst mapDispatchToProps: DispatchProps = {\n onSubmit: login,\n};\n\n/**\n */\nexport const connectSignIn: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;;AACA;;AAEA;;AAEA;;AAmBA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD,EAAmC;EAAA;;EACzD,IAAMC,WAAW,GAAG,IAAAC,yBAAA,EAAeF,KAAf,CAApB;EAEA,OAAO;IACLG,eAAe,2BAAEF,WAAF,aAAEA,WAAF,uBAAEA,WAAW,CAAEG,UAAf,yEAA6B,KADvC;IAELC,YAAY,EAAEL,KAAK,CAACM,IAAN,CAAWC;EAFpB,CAAP;AAID,CAPD;;AASA,IAAMC,kBAAiC,GAAG;EACxCC,QAAQ,EAAEC;AAD8B,CAA1C;AAIA;AACA;;AACO,IAAMC,aAAiC,GAAG,IAAAC,mBAAA,EAO/Cb,eAP+C,EAO9BS,kBAP8B,CAA1C"}
|
|
@@ -9,9 +9,13 @@ var _reactRedux = require("react-redux");
|
|
|
9
9
|
|
|
10
10
|
var _SignOut = require("../actions/SignOut");
|
|
11
11
|
|
|
12
|
+
var _modularui = require("../_modularui");
|
|
13
|
+
|
|
12
14
|
var mapStateToProps = function mapStateToProps(state) {
|
|
15
|
+
var _getApplication$isLog, _getApplication;
|
|
16
|
+
|
|
13
17
|
return {
|
|
14
|
-
isAuthenticated: state.
|
|
18
|
+
isAuthenticated: (_getApplication$isLog = (_getApplication = (0, _modularui.getApplication)(state)) === null || _getApplication === void 0 ? void 0 : _getApplication.isLoggedIn) !== null && _getApplication$isLog !== void 0 ? _getApplication$isLog : false
|
|
15
19
|
};
|
|
16
20
|
};
|
|
17
21
|
|
|
@@ -5,6 +5,7 @@ import { logout } from "../actions/SignOut";
|
|
|
5
5
|
|
|
6
6
|
import type { ThunkAction } from "../types";
|
|
7
7
|
import type { ComponentType } from "react";
|
|
8
|
+
import { getApplication } from "../_modularui";
|
|
8
9
|
|
|
9
10
|
type StateProps = {
|
|
10
11
|
isAuthenticated: boolean,
|
|
@@ -20,7 +21,7 @@ type Props = {
|
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
const mapStateToProps = (state): StateProps => ({
|
|
23
|
-
isAuthenticated: state
|
|
24
|
+
isAuthenticated: getApplication(state)?.isLoggedIn ?? false,
|
|
24
25
|
});
|
|
25
26
|
|
|
26
27
|
const mapDispatchToProps = { doLogout: logout };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignOut.js","names":["mapStateToProps","state","isAuthenticated","
|
|
1
|
+
{"version":3,"file":"SignOut.js","names":["mapStateToProps","state","isAuthenticated","getApplication","isLoggedIn","mapDispatchToProps","doLogout","logout","connectSignOut","connect"],"sources":["../../../src/redux/connectors/SignOut.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { logout } from \"../actions/SignOut\";\n\nimport type { ThunkAction } from \"../types\";\nimport type { ComponentType } from \"react\";\nimport { getApplication } from \"../_modularui\";\n\ntype StateProps = {\n isAuthenticated: boolean,\n};\n\ntype DispatchProps = {\n doLogout: () => ThunkAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state): StateProps => ({\n isAuthenticated: getApplication(state)?.isLoggedIn ?? false,\n});\n\nconst mapDispatchToProps = { doLogout: logout };\n\n/**\n */\nexport const connectSignOut: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;;AACA;;AAEA;;AAIA;;AAeA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD;EAAA;;EAAA,OAAwB;IAC9CC,eAAe,8CAAE,IAAAC,yBAAA,EAAeF,KAAf,CAAF,oDAAE,gBAAuBG,UAAzB,yEAAuC;EADR,CAAxB;AAAA,CAAxB;;AAIA,IAAMC,kBAAkB,GAAG;EAAEC,QAAQ,EAAEC;AAAZ,CAA3B;AAEA;AACA;;AACO,IAAMC,cAAkC,GAAG,IAAAC,mBAAA,EAOhDT,eAPgD,EAO/BK,kBAP+B,CAA3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.js","names":["connectTab","match","url","propName"],"sources":["../../../src/redux/connectors/Tab.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectTab: ModularUIConnector = modularui(\n \"Tab\",\n ({ match }) => match.url,\n {\n propName: \"tab\",\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,UAA8B,GAAG,
|
|
1
|
+
{"version":3,"file":"Tab.js","names":["connectTab","modularui","match","url","propName"],"sources":["../../../src/redux/connectors/Tab.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/connector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectTab: ModularUIConnector = modularui(\n \"Tab\",\n ({ match }) => match.url,\n {\n propName: \"tab\",\n }\n);\n"],"mappings":";;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,UAA8B,GAAG,IAAAC,kBAAA,EAC5C,KAD4C,EAE5C;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,GAArB;AAAA,CAF4C,EAG5C;EACEC,QAAQ,EAAE;AADZ,CAH4C,CAAvC"}
|