@beinformed/ui 1.25.0 → 1.25.1-beta.1
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 +12 -0
- package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/esm/constants/Settings.js.map +1 -1
- package/esm/hooks/useAuthentication.js +1 -1
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/hooks/useModelCatalog.js +0 -1
- package/esm/hooks/useModelCatalog.js.map +1 -1
- package/esm/hooks/useModels.js +1 -1
- package/esm/hooks/useModels.js.map +1 -1
- package/esm/hooks/useModularUI.js +1 -1
- package/esm/hooks/useModularUI.js.map +1 -1
- package/esm/hooks/useModularUIBasic.js +4 -1
- package/esm/hooks/useModularUIBasic.js.map +1 -1
- package/esm/hooks/useRouter.js +1 -1
- package/esm/hooks/useRouter.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js.map +1 -1
- package/esm/models/attributes/AttributeModel.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/esm/models/attributes/NumberAttributeModel.js +5 -2
- package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
- package/esm/models/attributes/_createAttribute.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/esm/models/base/ResourceModel.js.map +1 -1
- package/esm/models/content/ContentTOCModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.js.map +1 -1
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/links/LinkModel.js +3 -1
- package/esm/models/links/LinkModel.js.map +1 -1
- package/esm/models/links/normalizeLinkJSON.js.map +1 -1
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/parameter/Parameter.js +1 -1
- package/esm/models/parameter/Parameter.js.map +1 -1
- package/esm/models/types.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/react-client/client.js +1 -1
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-client/rehydrate.js.map +1 -1
- package/esm/react-server/createSSRComplete.js.map +1 -1
- package/esm/react-server/renderSSRComplete.js +4 -2
- package/esm/react-server/renderSSRComplete.js.map +1 -1
- package/esm/react-server/serverUtil.js +18 -9
- package/esm/react-server/serverUtil.js.map +1 -1
- package/esm/react-theme/ThemeProvider.js +1 -1
- package/esm/react-theme/ThemeProvider.js.map +1 -1
- package/esm/react-theme/createTheme.js +8 -3
- package/esm/react-theme/createTheme.js.map +1 -1
- package/esm/react-theme/utils/contrast.js +3 -1
- package/esm/react-theme/utils/contrast.js.map +1 -1
- package/esm/react-theme/utils/corners.js +3 -1
- package/esm/react-theme/utils/corners.js.map +1 -1
- package/esm/react-theme/utils/spacers.js +9 -3
- package/esm/react-theme/utils/spacers.js.map +1 -1
- package/esm/redux/_i18n/{actions.js → I18nActions.js} +1 -1
- package/esm/redux/_i18n/I18nActions.js.map +1 -0
- package/esm/redux/_i18n/{reducer.js → I18nReducer.js} +1 -1
- package/esm/redux/_i18n/I18nReducer.js.map +1 -0
- package/esm/redux/_i18n/index.js +2 -2
- package/esm/redux/_i18n/index.js.map +1 -1
- package/esm/redux/_modularui/{actions.js → ModularUIActions.js} +1 -1
- package/esm/redux/_modularui/ModularUIActions.js.map +1 -0
- package/esm/redux/_modularui/{connector.js → ModularUIConnector.js} +5 -5
- package/esm/redux/_modularui/ModularUIConnector.js.map +1 -0
- package/esm/redux/_modularui/{middleware.js → ModularUIMiddleware.js} +2 -2
- package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -0
- package/esm/redux/_modularui/{reducer.js → ModularUIReducer.js} +4 -6
- package/esm/redux/_modularui/ModularUIReducer.js.map +1 -0
- package/esm/redux/_modularui/{selectors.js → ModularUISelectors.js} +1 -1
- package/esm/redux/_modularui/ModularUISelectors.js.map +1 -0
- package/esm/redux/_modularui/{modularuiUtils.js → ModularUIUtils.js} +1 -1
- package/esm/redux/_modularui/{modularuiUtils.js.map → ModularUIUtils.js.map} +1 -1
- package/esm/redux/_modularui/index.js +6 -6
- package/esm/redux/_modularui/index.js.map +1 -1
- package/esm/redux/_modularui/types.js.map +1 -1
- package/esm/redux/_modularui/withModularUI.js +1 -1
- package/esm/redux/_modularui/withModularUI.js.map +1 -1
- package/esm/redux/_router/{actions.js → RouterActions.js} +1 -1
- package/esm/redux/_router/RouterActions.js.map +1 -0
- package/esm/redux/_router/{connectors.js → RouterConnectors.js} +2 -2
- package/esm/redux/_router/RouterConnectors.js.map +1 -0
- package/esm/redux/_router/{middleware.js → RouterMiddleware.js} +1 -1
- package/esm/redux/_router/RouterMiddleware.js.map +1 -0
- package/esm/redux/_router/{reducer.js → RouterReducer.js} +1 -1
- package/esm/redux/_router/RouterReducer.js.map +1 -0
- package/esm/redux/_router/index.js +4 -4
- package/esm/redux/_router/index.js.map +1 -1
- package/esm/redux/actions/Application.js +2 -2
- package/esm/redux/actions/Application.js.map +1 -1
- package/esm/redux/actions/Authorization.js +3 -3
- package/esm/redux/actions/Authorization.js.map +1 -1
- package/esm/redux/actions/Error.js +1 -1
- package/esm/redux/actions/Error.js.map +1 -1
- package/esm/redux/actions/Form.js +2 -2
- package/esm/redux/actions/Form.js.map +1 -1
- package/esm/redux/actions/FormAttributeSet.js +1 -1
- package/esm/redux/actions/FormAttributeSet.js.map +1 -1
- package/esm/redux/actions/FormAttributeSetRepeatable.js +1 -1
- package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/esm/redux/actions/FormAutosave.js +1 -1
- package/esm/redux/actions/FormAutosave.js.map +1 -1
- package/esm/redux/actions/FormAutosubmit.js +1 -1
- package/esm/redux/actions/FormAutosubmit.js.map +1 -1
- package/esm/redux/actions/FormValidations.js +1 -1
- package/esm/redux/actions/FormValidations.js.map +1 -1
- package/esm/redux/actions/Notification.js.map +1 -1
- package/esm/redux/actions/Preferences.js +1 -1
- package/esm/redux/actions/Preferences.js.map +1 -1
- package/esm/redux/actions/SignIn.js +1 -1
- package/esm/redux/actions/SignIn.js.map +1 -1
- package/esm/redux/actions/SignOut.js +1 -1
- package/esm/redux/actions/SignOut.js.map +1 -1
- package/esm/redux/connectors/Application.js +1 -1
- package/esm/redux/connectors/Application.js.map +1 -1
- package/esm/redux/connectors/Breadcrumb.js +1 -1
- package/esm/redux/connectors/Breadcrumb.js.map +1 -1
- package/esm/redux/connectors/CaseView.js +1 -1
- package/esm/redux/connectors/CaseView.js.map +1 -1
- package/esm/redux/connectors/ConceptDetail.js +1 -1
- package/esm/redux/connectors/ConceptDetail.js.map +1 -1
- package/esm/redux/connectors/ContentBrowser.js +1 -1
- package/esm/redux/connectors/ContentBrowser.js.map +1 -1
- package/esm/redux/connectors/ContentDetail.js +1 -1
- package/esm/redux/connectors/ContentDetail.js.map +1 -1
- package/esm/redux/connectors/ContentDetailSection.js +1 -1
- package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
- package/esm/redux/connectors/Form.js +1 -1
- package/esm/redux/connectors/Form.js.map +1 -1
- package/esm/redux/connectors/ListDetail.js +1 -1
- package/esm/redux/connectors/ListDetail.js.map +1 -1
- package/esm/redux/connectors/ModelCatalog.js +1 -1
- package/esm/redux/connectors/ModelCatalog.js.map +1 -1
- package/esm/redux/connectors/PanelRenderer.js +1 -1
- package/esm/redux/connectors/PanelRenderer.js.map +1 -1
- package/esm/redux/connectors/Preferences.js.map +1 -1
- package/esm/redux/connectors/QuickSearch.js +2 -2
- package/esm/redux/connectors/QuickSearch.js.map +1 -1
- package/esm/redux/connectors/SignIn.js +1 -1
- package/esm/redux/connectors/SignIn.js.map +1 -1
- package/esm/redux/connectors/SignOut.js.map +1 -1
- package/esm/redux/connectors/Tab.js +1 -1
- package/esm/redux/connectors/Tab.js.map +1 -1
- package/esm/redux/reducers/ModalsReducer.js.map +1 -1
- package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/esm/redux/reducers/createReducer.js +3 -3
- package/esm/redux/reducers/createReducer.js.map +1 -1
- package/esm/redux/store/configureStore.js +4 -4
- package/esm/redux/store/configureStore.js.map +1 -1
- package/esm/utils/fetch/universalFetch.js +3 -2
- package/esm/utils/fetch/universalFetch.js.map +1 -1
- package/esm/utils/fetch/xhr.js.map +1 -1
- package/esm/utils/helpers/objects.js +4 -3
- package/esm/utils/helpers/objects.js.map +1 -1
- package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
- package/esm/utils/number/parseNumbers.js.map +1 -1
- package/lib/builder/mergeLayoutHintConfigurations.js.flow +1 -1
- package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/lib/constants/Settings.js.flow +1 -1
- package/lib/constants/Settings.js.map +1 -1
- package/lib/hooks/useAuthentication.js +3 -3
- package/lib/hooks/useAuthentication.js.flow +1 -1
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useModelCatalog.js.flow +2 -1
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModels.js +2 -2
- package/lib/hooks/useModels.js.flow +1 -1
- package/lib/hooks/useModels.js.map +1 -1
- package/lib/hooks/useModularUI.js +3 -3
- package/lib/hooks/useModularUI.js.flow +4 -1
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js +4 -1
- package/lib/hooks/useModularUIBasic.js.flow +1 -1
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useRouter.js +6 -6
- package/lib/hooks/useRouter.js.flow +7 -1
- package/lib/hooks/useRouter.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js.flow +8 -6
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeModel.js.flow +18 -16
- package/lib/models/attributes/AttributeModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js.flow +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/NumberAttributeModel.js +5 -2
- package/lib/models/attributes/NumberAttributeModel.js.flow +7 -3
- package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
- package/lib/models/attributes/_createAttribute.js.flow +1 -1
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.flow +1 -1
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.flow +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/lib/models/base/ResourceModel.js.flow +1 -1
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js.flow +4 -1
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js.flow +1 -1
- package/lib/models/filters/FilterCollection.js.map +1 -1
- package/lib/models/form/FormModel.js.flow +2 -2
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/links/LinkModel.js +3 -1
- package/lib/models/links/LinkModel.js.flow +4 -2
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/links/normalizeLinkJSON.js.flow +1 -1
- package/lib/models/links/normalizeLinkJSON.js.map +1 -1
- package/lib/models/list/ListModel.js.flow +1 -1
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/parameter/Parameter.js +1 -1
- package/lib/models/parameter/Parameter.js.flow +1 -1
- package/lib/models/parameter/Parameter.js.map +1 -1
- package/lib/models/types.js.flow +6 -6
- package/lib/models/types.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js.flow +6 -6
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/react-client/client.js +2 -2
- package/lib/react-client/client.js.flow +8 -8
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-client/rehydrate.js.flow +2 -2
- package/lib/react-client/rehydrate.js.map +1 -1
- package/lib/react-server/createSSRComplete.js.flow +3 -3
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js +4 -2
- package/lib/react-server/renderSSRComplete.js.flow +2 -2
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/serverUtil.js +19 -10
- package/lib/react-server/serverUtil.js.flow +20 -11
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/react-theme/ThemeProvider.js +1 -1
- package/lib/react-theme/ThemeProvider.js.flow +1 -1
- package/lib/react-theme/ThemeProvider.js.map +1 -1
- package/lib/react-theme/__tests__/ThemeProvider.spec.js.flow +2 -0
- package/lib/react-theme/__tests__/createTheme.spec.js.flow +3 -0
- package/lib/react-theme/createTheme.js +8 -3
- package/lib/react-theme/createTheme.js.flow +7 -5
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/react-theme/utils/contrast.js +3 -1
- package/lib/react-theme/utils/contrast.js.flow +1 -1
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js +3 -1
- package/lib/react-theme/utils/corners.js.flow +1 -1
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js +9 -3
- package/lib/react-theme/utils/spacers.js.flow +3 -3
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/redux/_i18n/{actions.js → I18nActions.js} +1 -1
- package/lib/redux/_i18n/{actions.js.flow → I18nActions.js.flow} +0 -0
- package/lib/redux/_i18n/I18nActions.js.map +1 -0
- package/lib/redux/_i18n/{reducer.js → I18nReducer.js} +1 -1
- package/{src/redux/_i18n/reducer.js → lib/redux/_i18n/I18nReducer.js.flow} +5 -2
- package/lib/redux/_i18n/I18nReducer.js.map +1 -0
- package/lib/redux/_i18n/__tests__/actions.spec.js.flow +1 -1
- package/lib/redux/_i18n/__tests__/reducer.spec.js.flow +1 -1
- package/lib/redux/_i18n/index.js +8 -8
- package/lib/redux/_i18n/index.js.flow +2 -2
- package/lib/redux/_i18n/index.js.map +1 -1
- package/lib/redux/_modularui/{actions.js → ModularUIActions.js} +1 -1
- package/lib/redux/_modularui/{actions.js.flow → ModularUIActions.js.flow} +1 -1
- package/lib/redux/_modularui/ModularUIActions.js.map +1 -0
- package/lib/redux/_modularui/{connector.js → ModularUIConnector.js} +11 -11
- package/{src/redux/_modularui/connector.js → lib/redux/_modularui/ModularUIConnector.js.flow} +8 -4
- package/lib/redux/_modularui/ModularUIConnector.js.map +1 -0
- package/lib/redux/_modularui/{middleware.js → ModularUIMiddleware.js} +4 -4
- package/lib/redux/_modularui/{middleware.js.flow → ModularUIMiddleware.js.flow} +20 -5
- package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -0
- package/lib/redux/_modularui/{reducer.js → ModularUIReducer.js} +4 -6
- package/lib/redux/_modularui/{reducer.js.flow → ModularUIReducer.js.flow} +14 -8
- package/lib/redux/_modularui/ModularUIReducer.js.map +1 -0
- package/lib/redux/_modularui/{selectors.js → ModularUISelectors.js} +1 -1
- package/lib/redux/_modularui/{selectors.js.flow → ModularUISelectors.js.flow} +3 -2
- package/lib/redux/_modularui/ModularUISelectors.js.map +1 -0
- package/lib/redux/_modularui/{modularuiUtils.js → ModularUIUtils.js} +1 -1
- package/lib/redux/_modularui/{modularuiUtils.js.flow → ModularUIUtils.js.flow} +0 -0
- package/lib/redux/_modularui/{modularuiUtils.js.map → ModularUIUtils.js.map} +1 -1
- package/lib/redux/_modularui/__tests__/actions.spec.js.flow +1 -1
- package/lib/redux/_modularui/__tests__/reducer.spec.js.flow +6 -4
- package/lib/redux/_modularui/__tests__/selectors.spec.js.flow +1 -1
- package/lib/redux/_modularui/index.js +22 -22
- package/lib/redux/_modularui/index.js.flow +6 -6
- package/lib/redux/_modularui/index.js.map +1 -1
- package/lib/redux/_modularui/types.js.flow +10 -4
- package/lib/redux/_modularui/types.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js +2 -2
- package/lib/redux/_modularui/withModularUI.js.flow +1 -1
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/{actions.js → RouterActions.js} +1 -1
- package/lib/redux/_router/{actions.js.flow → RouterActions.js.flow} +0 -0
- package/lib/redux/_router/RouterActions.js.map +1 -0
- package/lib/redux/_router/{connectors.js → RouterConnectors.js} +7 -7
- package/lib/redux/_router/{connectors.js.flow → RouterConnectors.js.flow} +1 -1
- package/lib/redux/_router/RouterConnectors.js.map +1 -0
- package/lib/redux/_router/{middleware.js → RouterMiddleware.js} +1 -1
- package/lib/redux/_router/{middleware.js.flow → RouterMiddleware.js.flow} +0 -0
- package/lib/redux/_router/RouterMiddleware.js.map +1 -0
- package/lib/redux/_router/{reducer.js → RouterReducer.js} +1 -1
- package/lib/redux/_router/{reducer.js.flow → RouterReducer.js.flow} +0 -0
- package/lib/redux/_router/RouterReducer.js.map +1 -0
- package/lib/redux/_router/__tests__/actions.spec.js.flow +1 -1
- package/lib/redux/_router/__tests__/middleware.spec.js.flow +2 -2
- package/lib/redux/_router/__tests__/reducer.spec.js.flow +1 -1
- package/lib/redux/_router/index.js +16 -16
- package/lib/redux/_router/index.js.flow +4 -4
- package/lib/redux/_router/index.js.map +1 -1
- package/lib/redux/actions/Application.js +5 -5
- package/lib/redux/actions/Application.js.flow +5 -2
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/Authorization.js +6 -6
- package/lib/redux/actions/Authorization.js.flow +3 -3
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js +2 -2
- package/lib/redux/actions/Error.js.flow +2 -2
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/Form.js +5 -5
- package/lib/redux/actions/Form.js.flow +2 -2
- package/lib/redux/actions/Form.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js +2 -2
- package/lib/redux/actions/FormAttributeSet.js.flow +1 -1
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js +4 -4
- package/lib/redux/actions/FormAttributeSetRepeatable.js.flow +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/lib/redux/actions/FormAutosave.js +2 -2
- package/lib/redux/actions/FormAutosave.js.flow +1 -1
- package/lib/redux/actions/FormAutosave.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js +2 -2
- package/lib/redux/actions/FormAutosubmit.js.flow +1 -1
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/FormValidations.js +2 -2
- package/lib/redux/actions/FormValidations.js.flow +5 -3
- package/lib/redux/actions/FormValidations.js.map +1 -1
- package/lib/redux/actions/Notification.js.flow +1 -1
- package/lib/redux/actions/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.js +1 -1
- package/lib/redux/actions/Preferences.js.flow +3 -3
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/actions/SignIn.js +2 -2
- package/lib/redux/actions/SignIn.js.flow +1 -1
- package/lib/redux/actions/SignIn.js.map +1 -1
- package/lib/redux/actions/SignOut.js +2 -2
- package/lib/redux/actions/SignOut.js.flow +1 -1
- package/lib/redux/actions/SignOut.js.map +1 -1
- package/lib/redux/connectors/Application.js +2 -2
- package/lib/redux/connectors/Application.js.flow +1 -1
- package/lib/redux/connectors/Application.js.map +1 -1
- package/lib/redux/connectors/Breadcrumb.js +2 -2
- package/lib/redux/connectors/Breadcrumb.js.flow +1 -1
- package/lib/redux/connectors/Breadcrumb.js.map +1 -1
- package/lib/redux/connectors/CaseView.js +2 -2
- package/lib/redux/connectors/CaseView.js.flow +1 -1
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js +2 -2
- package/lib/redux/connectors/ConceptDetail.js.flow +1 -1
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js +2 -2
- package/lib/redux/connectors/ContentBrowser.js.flow +1 -1
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js +2 -2
- package/lib/redux/connectors/ContentDetail.js.flow +1 -1
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js +2 -2
- package/lib/redux/connectors/ContentDetailSection.js.flow +1 -1
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js +2 -2
- package/lib/redux/connectors/Form.js.flow +1 -1
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js +2 -2
- package/lib/redux/connectors/ListDetail.js.flow +1 -1
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js +2 -2
- package/lib/redux/connectors/ModelCatalog.js.flow +1 -1
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js +2 -2
- package/lib/redux/connectors/PanelRenderer.js.flow +1 -1
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/Preferences.js.flow +5 -2
- package/lib/redux/connectors/Preferences.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js +4 -4
- package/lib/redux/connectors/QuickSearch.js.flow +2 -2
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/SignIn.js +2 -2
- package/lib/redux/connectors/SignIn.js.flow +1 -1
- package/lib/redux/connectors/SignIn.js.map +1 -1
- package/lib/redux/connectors/SignOut.js.flow +2 -2
- package/lib/redux/connectors/SignOut.js.map +1 -1
- package/lib/redux/connectors/Tab.js +2 -2
- package/lib/redux/connectors/Tab.js.flow +1 -1
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/reducers/ModalsReducer.js.flow +2 -2
- package/lib/redux/reducers/ModalsReducer.js.map +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js.flow +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/lib/redux/reducers/createReducer.js +6 -6
- package/lib/redux/reducers/createReducer.js.flow +3 -3
- package/lib/redux/reducers/createReducer.js.map +1 -1
- package/lib/redux/store/configureStore.js +5 -5
- package/lib/redux/store/configureStore.js.flow +4 -4
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/utils/fetch/universalFetch.js +5 -3
- package/lib/utils/fetch/universalFetch.js.flow +8 -6
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js.flow +21 -21
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/objects.js.flow +5 -3
- package/lib/utils/helpers/objects.js.map +1 -1
- package/lib/utils/helpers/sanitizeHtml.js.flow +1 -1
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/number/parseNumbers.js.flow +8 -2
- package/lib/utils/number/parseNumbers.js.map +1 -1
- package/package.json +8 -8
- package/src/builder/mergeLayoutHintConfigurations.js +1 -1
- package/src/constants/Settings.js +1 -1
- package/src/hooks/useAuthentication.js +1 -1
- package/src/hooks/useModelCatalog.js +2 -1
- package/src/hooks/useModels.js +1 -1
- package/src/hooks/useModularUI.js +4 -1
- package/src/hooks/useModularUIBasic.js +1 -1
- package/src/hooks/useRouter.js +7 -1
- package/src/models/attributes/AttributeCollection.js +8 -6
- package/src/models/attributes/AttributeModel.js +18 -16
- package/src/models/attributes/CompositeAttributeChildCollection.js +1 -1
- package/src/models/attributes/NumberAttributeModel.js +7 -3
- package/src/models/attributes/_createAttribute.js +1 -1
- package/src/models/attributes/layouthint-rules/BaseLayoutHintRule.js +1 -1
- package/src/models/attributes/layouthint-rules/DependentAttribute.js +1 -1
- package/src/models/base/ResourceModel.js +1 -1
- package/src/models/content/ContentTOCModel.js +4 -1
- package/src/models/filters/FilterCollection.js +1 -1
- package/src/models/form/FormModel.js +2 -2
- package/src/models/links/LinkModel.js +4 -2
- package/src/models/links/normalizeLinkJSON.js +1 -1
- package/src/models/list/ListModel.js +1 -1
- package/src/models/parameter/Parameter.js +1 -1
- package/src/models/types.js +6 -6
- package/src/modularui/ModularUIRequest.js +6 -6
- package/src/react-client/client.js +8 -8
- package/src/react-client/rehydrate.js +2 -2
- package/src/react-server/createSSRComplete.js +3 -3
- package/src/react-server/renderSSRComplete.js +2 -2
- package/src/react-server/serverUtil.js +20 -11
- package/src/react-theme/ThemeProvider.js +1 -1
- package/src/react-theme/__tests__/ThemeProvider.spec.js +2 -0
- package/src/react-theme/__tests__/createTheme.spec.js +3 -0
- package/src/react-theme/createTheme.js +7 -5
- package/src/react-theme/utils/contrast.js +1 -1
- package/src/react-theme/utils/corners.js +1 -1
- package/src/react-theme/utils/spacers.js +3 -3
- package/src/redux/_i18n/{actions.js → I18nActions.js} +0 -0
- package/{lib/redux/_i18n/reducer.js.flow → src/redux/_i18n/I18nReducer.js} +5 -2
- package/src/redux/_i18n/__tests__/actions.spec.js +1 -1
- package/src/redux/_i18n/__tests__/reducer.spec.js +1 -1
- package/src/redux/_i18n/index.js +2 -2
- package/src/redux/_modularui/{actions.js → ModularUIActions.js} +1 -1
- package/{lib/redux/_modularui/connector.js.flow → src/redux/_modularui/ModularUIConnector.js} +8 -4
- package/src/redux/_modularui/{middleware.js → ModularUIMiddleware.js} +20 -5
- package/src/redux/_modularui/{reducer.js → ModularUIReducer.js} +14 -8
- package/src/redux/_modularui/{selectors.js → ModularUISelectors.js} +3 -2
- package/src/redux/_modularui/{modularuiUtils.js → ModularUIUtils.js} +0 -0
- package/src/redux/_modularui/__tests__/actions.spec.js +1 -1
- package/src/redux/_modularui/__tests__/reducer.spec.js +6 -4
- package/src/redux/_modularui/__tests__/selectors.spec.js +1 -1
- package/src/redux/_modularui/index.js +6 -6
- package/src/redux/_modularui/types.js +10 -4
- package/src/redux/_modularui/withModularUI.js +1 -1
- package/src/redux/_router/{actions.js → RouterActions.js} +0 -0
- package/src/redux/_router/{connectors.js → RouterConnectors.js} +1 -1
- package/src/redux/_router/{middleware.js → RouterMiddleware.js} +0 -0
- package/src/redux/_router/{reducer.js → RouterReducer.js} +0 -0
- package/src/redux/_router/__tests__/actions.spec.js +1 -1
- package/src/redux/_router/__tests__/middleware.spec.js +2 -2
- package/src/redux/_router/__tests__/reducer.spec.js +1 -1
- package/src/redux/_router/index.js +4 -4
- package/src/redux/actions/Application.js +5 -2
- package/src/redux/actions/Authorization.js +3 -3
- package/src/redux/actions/Error.js +2 -2
- package/src/redux/actions/Form.js +2 -2
- package/src/redux/actions/FormAttributeSet.js +1 -1
- package/src/redux/actions/FormAttributeSetRepeatable.js +1 -1
- package/src/redux/actions/FormAutosave.js +1 -1
- package/src/redux/actions/FormAutosubmit.js +1 -1
- package/src/redux/actions/FormValidations.js +5 -3
- package/src/redux/actions/Notification.js +1 -1
- package/src/redux/actions/Preferences.js +3 -3
- package/src/redux/actions/SignIn.js +1 -1
- package/src/redux/actions/SignOut.js +1 -1
- package/src/redux/connectors/Application.js +1 -1
- package/src/redux/connectors/Breadcrumb.js +1 -1
- package/src/redux/connectors/CaseView.js +1 -1
- package/src/redux/connectors/ConceptDetail.js +1 -1
- package/src/redux/connectors/ContentBrowser.js +1 -1
- package/src/redux/connectors/ContentDetail.js +1 -1
- package/src/redux/connectors/ContentDetailSection.js +1 -1
- package/src/redux/connectors/Form.js +1 -1
- package/src/redux/connectors/ListDetail.js +1 -1
- package/src/redux/connectors/ModelCatalog.js +1 -1
- package/src/redux/connectors/PanelRenderer.js +1 -1
- package/src/redux/connectors/Preferences.js +5 -2
- package/src/redux/connectors/QuickSearch.js +2 -2
- package/src/redux/connectors/SignIn.js +1 -1
- package/src/redux/connectors/SignOut.js +2 -2
- package/src/redux/connectors/Tab.js +1 -1
- package/src/redux/reducers/ModalsReducer.js +2 -2
- package/src/redux/reducers/ProgressIndicatorReducer.js +1 -1
- package/src/redux/reducers/createReducer.js +3 -3
- package/src/redux/store/configureStore.js +4 -4
- package/src/utils/fetch/universalFetch.js +8 -6
- package/src/utils/fetch/xhr.js +21 -21
- package/src/utils/helpers/objects.js +5 -3
- package/src/utils/helpers/sanitizeHtml.js +1 -1
- package/src/utils/number/parseNumbers.js +8 -2
- package/types/models/concepts/ConceptDetailModel.d.ts +3 -3
- package/types/models/concepts/ConceptRelationModel.d.ts +2 -1
- package/types/models/types.d.ts +17 -3
- package/types/redux/_modularui/types.d.ts +3 -1
- package/types/utils/fetch/universalFetch.d.ts +3 -3
- package/types/utils/helpers/objects.d.ts +10 -2
- package/esm/redux/_i18n/actions.js.map +0 -1
- package/esm/redux/_i18n/reducer.js.map +0 -1
- package/esm/redux/_modularui/actions.js.map +0 -1
- package/esm/redux/_modularui/connector.js.map +0 -1
- package/esm/redux/_modularui/middleware.js.map +0 -1
- package/esm/redux/_modularui/reducer.js.map +0 -1
- package/esm/redux/_modularui/selectors.js.map +0 -1
- package/esm/redux/_router/actions.js.map +0 -1
- package/esm/redux/_router/connectors.js.map +0 -1
- package/esm/redux/_router/middleware.js.map +0 -1
- package/esm/redux/_router/reducer.js.map +0 -1
- package/lib/redux/_i18n/actions.js.map +0 -1
- package/lib/redux/_i18n/reducer.js.map +0 -1
- package/lib/redux/_modularui/actions.js.map +0 -1
- package/lib/redux/_modularui/connector.js.map +0 -1
- package/lib/redux/_modularui/middleware.js.map +0 -1
- package/lib/redux/_modularui/reducer.js.map +0 -1
- package/lib/redux/_modularui/selectors.js.map +0 -1
- package/lib/redux/_router/actions.js.map +0 -1
- package/lib/redux/_router/connectors.js.map +0 -1
- package/lib/redux/_router/middleware.js.map +0 -1
- package/lib/redux/_router/reducer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitizeHtml.js","names":["properEntityEncoding","html","escapedGt","replace","escapedLt","properEntities","he","encode","decode","decimal","unescapedGt","removeUnwantedHtml","options","allowedTags","IllegalArgumentException","correctEntityHtml","htmlWithoutAttributes","htmlWithCorrectBR","Array","isArray","join","pattern","regex","RegExp"],"sources":["../../../src/utils/helpers/sanitizeHtml.js"],"sourcesContent":["// @flow\nimport he from \"he\";\n\nimport { IllegalArgumentException } from \"../../exceptions\";\n\ntype removeUnwantedHtmlOptions = {\n allowedTags?: Array<string>,\n};\n\n/**\n * Translates html entities to their correct decimal equivalent\n * When path is only one deep better use optional chaining\n */\nconst properEntityEncoding = (html) => {\n const escapedGt = html.replace(/</g, \"[\");\n const escapedLt = escapedGt.replace(/>/g, \"]\");\n\n const properEntities = he.encode(he.decode(escapedLt), {\n decimal: true,\n });\n\n const unescapedGt = properEntities.replace(/\\[/g, \"<\");\n\n return unescapedGt.replace(/]/g, \">\");\n};\n\n/**\n * removes unwanted html, this might result in incorrect html, as it removes all html that we don't except,\n * like <b style=\"font-weight: 400\">bold</b> will result in bold</b>\n */\nconst removeUnwantedHtml = (\n html: string,\n options: removeUnwantedHtmlOptions = {\n allowedTags: [\"p\", \"br\", \"b\", \"i\", \"u\", \"strike\"],\n }\n): string => {\n if (typeof html !== \"string\") {\n throw new IllegalArgumentException(\"sanitizeHTML method expects a string\");\n }\n\n const correctEntityHtml = properEntityEncoding(html);\n\n // remove attributes from html elements\n const htmlWithoutAttributes = correctEntityHtml.replace(\n /<(\\w+)(.|[\\r\\n])*?>/gi,\n \"<$1>\"\n );\n\n const htmlWithCorrectBR = htmlWithoutAttributes.replace(\n /<br\\s*>/gi,\n \"<br />\"\n );\n\n // remove not allowed tags\n const allowedTags = Array.isArray(options.allowedTags)\n ? options.allowedTags.join(\"|\")\n : \"\";\n const pattern = `<(?!\\\\/?(${allowedTags})(>|\\\\s\\\\/))[^<]+?>`;\n const regex = new RegExp(pattern, \"gi\");\n\n return htmlWithCorrectBR.replace(regex, \"\");\n};\n\nexport { removeUnwantedHtml };\n"],"mappings":";;;;;;;AACA;AAEA;AAMA;AACA;AACA;AACA;AACA,MAAMA,oBAAoB,GAAIC,
|
|
1
|
+
{"version":3,"file":"sanitizeHtml.js","names":["properEntityEncoding","html","escapedGt","replace","escapedLt","properEntities","he","encode","decode","decimal","unescapedGt","removeUnwantedHtml","options","allowedTags","IllegalArgumentException","correctEntityHtml","htmlWithoutAttributes","htmlWithCorrectBR","Array","isArray","join","pattern","regex","RegExp"],"sources":["../../../src/utils/helpers/sanitizeHtml.js"],"sourcesContent":["// @flow\nimport he from \"he\";\n\nimport { IllegalArgumentException } from \"../../exceptions\";\n\ntype removeUnwantedHtmlOptions = {\n allowedTags?: Array<string>,\n};\n\n/**\n * Translates html entities to their correct decimal equivalent\n * When path is only one deep better use optional chaining\n */\nconst properEntityEncoding = (html: string) => {\n const escapedGt = html.replace(/</g, \"[\");\n const escapedLt = escapedGt.replace(/>/g, \"]\");\n\n const properEntities = he.encode(he.decode(escapedLt), {\n decimal: true,\n });\n\n const unescapedGt = properEntities.replace(/\\[/g, \"<\");\n\n return unescapedGt.replace(/]/g, \">\");\n};\n\n/**\n * removes unwanted html, this might result in incorrect html, as it removes all html that we don't except,\n * like <b style=\"font-weight: 400\">bold</b> will result in bold</b>\n */\nconst removeUnwantedHtml = (\n html: string,\n options: removeUnwantedHtmlOptions = {\n allowedTags: [\"p\", \"br\", \"b\", \"i\", \"u\", \"strike\"],\n }\n): string => {\n if (typeof html !== \"string\") {\n throw new IllegalArgumentException(\"sanitizeHTML method expects a string\");\n }\n\n const correctEntityHtml = properEntityEncoding(html);\n\n // remove attributes from html elements\n const htmlWithoutAttributes = correctEntityHtml.replace(\n /<(\\w+)(.|[\\r\\n])*?>/gi,\n \"<$1>\"\n );\n\n const htmlWithCorrectBR = htmlWithoutAttributes.replace(\n /<br\\s*>/gi,\n \"<br />\"\n );\n\n // remove not allowed tags\n const allowedTags = Array.isArray(options.allowedTags)\n ? options.allowedTags.join(\"|\")\n : \"\";\n const pattern = `<(?!\\\\/?(${allowedTags})(>|\\\\s\\\\/))[^<]+?>`;\n const regex = new RegExp(pattern, \"gi\");\n\n return htmlWithCorrectBR.replace(regex, \"\");\n};\n\nexport { removeUnwantedHtml };\n"],"mappings":";;;;;;;AACA;AAEA;AAMA;AACA;AACA;AACA;AACA,MAAMA,oBAAoB,GAAIC,IAAY,IAAK;EAC7C,MAAMC,SAAS,GAAGD,IAAI,CAACE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;EACzC,MAAMC,SAAS,GAAGF,SAAS,CAACC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;EAE9C,MAAME,cAAc,GAAGC,WAAE,CAACC,MAAM,CAACD,WAAE,CAACE,MAAM,CAACJ,SAAS,CAAC,EAAE;IACrDK,OAAO,EAAE;EACX,CAAC,CAAC;EAEF,MAAMC,WAAW,GAAGL,cAAc,CAACF,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;EAEtD,OAAOO,WAAW,CAACP,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;AACvC,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMQ,kBAAkB,GAAG,UACzBV,IAAY,EAID;EAAA,IAHXW,OAAkC,uEAAG;IACnCC,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ;EAClD,CAAC;EAED,IAAI,OAAOZ,IAAI,KAAK,QAAQ,EAAE;IAC5B,MAAM,IAAIa,oCAAwB,CAAC,sCAAsC,CAAC;EAC5E;EAEA,MAAMC,iBAAiB,GAAGf,oBAAoB,CAACC,IAAI,CAAC;;EAEpD;EACA,MAAMe,qBAAqB,GAAGD,iBAAiB,CAACZ,OAAO,CACrD,uBAAuB,EACvB,MAAM,CACP;EAED,MAAMc,iBAAiB,GAAGD,qBAAqB,CAACb,OAAO,CACrD,WAAW,EACX,QAAQ,CACT;;EAED;EACA,MAAMU,WAAW,GAAGK,KAAK,CAACC,OAAO,CAACP,OAAO,CAACC,WAAW,CAAC,GAClDD,OAAO,CAACC,WAAW,CAACO,IAAI,CAAC,GAAG,CAAC,GAC7B,EAAE;EACN,MAAMC,OAAO,GAAI,YAAWR,WAAY,qBAAoB;EAC5D,MAAMS,KAAK,GAAG,IAAIC,MAAM,CAACF,OAAO,EAAE,IAAI,CAAC;EAEvC,OAAOJ,iBAAiB,CAACd,OAAO,CAACmB,KAAK,EAAE,EAAE,CAAC;AAC7C,CAAC;AAAC"}
|
|
@@ -4,7 +4,10 @@ import big from "big.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
6
6
|
*/
|
|
7
|
-
const removeGroupingSeparator = (
|
|
7
|
+
const removeGroupingSeparator = (
|
|
8
|
+
input: string | number,
|
|
9
|
+
groupingSeparator?: ?string
|
|
10
|
+
) => {
|
|
8
11
|
if (typeof input === "number") {
|
|
9
12
|
return input;
|
|
10
13
|
}
|
|
@@ -24,7 +27,10 @@ const removeGroupingSeparator = (input, groupingSeparator) => {
|
|
|
24
27
|
/**
|
|
25
28
|
* @private
|
|
26
29
|
*/
|
|
27
|
-
const updateDecimalSeparator = (
|
|
30
|
+
const updateDecimalSeparator = (
|
|
31
|
+
input: string | number,
|
|
32
|
+
decimalSeparator?: ?string
|
|
33
|
+
) => {
|
|
28
34
|
if (typeof input === "number") {
|
|
29
35
|
return input;
|
|
30
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseNumbers.js","names":["removeGroupingSeparator","input","groupingSeparator","escapedGroupingSeparator","replace","RegExp","updateDecimalSeparator","decimalSeparator","parseToNumber","NaN","inputNoGrouping","inputCorrectDecimalSeparator","Number","parseNumberToString","big","toFixed","error"],"sources":["../../../src/utils/number/parseNumbers.js"],"sourcesContent":["// @flow\nimport big from \"big.js\";\n\n/**\n * @private\n */\nconst removeGroupingSeparator = (input
|
|
1
|
+
{"version":3,"file":"parseNumbers.js","names":["removeGroupingSeparator","input","groupingSeparator","escapedGroupingSeparator","replace","RegExp","updateDecimalSeparator","decimalSeparator","parseToNumber","NaN","inputNoGrouping","inputCorrectDecimalSeparator","Number","parseNumberToString","big","toFixed","error"],"sources":["../../../src/utils/number/parseNumbers.js"],"sourcesContent":["// @flow\nimport big from \"big.js\";\n\n/**\n * @private\n */\nconst removeGroupingSeparator = (\n input: string | number,\n groupingSeparator?: ?string\n) => {\n if (typeof input === \"number\") {\n return input;\n }\n\n if (groupingSeparator == null) {\n return input;\n }\n\n const escapedGroupingSeparator = groupingSeparator.replace(\n /[$()*+.?[\\\\\\]^{|}]/g,\n \"\\\\$&\"\n );\n\n return input.replace(new RegExp(escapedGroupingSeparator, \"g\"), \"\");\n};\n\n/**\n * @private\n */\nconst updateDecimalSeparator = (\n input: string | number,\n decimalSeparator?: ?string\n) => {\n if (typeof input === \"number\") {\n return input;\n }\n\n if (decimalSeparator == null || decimalSeparator === \"\") {\n return input;\n }\n\n return input.replace(decimalSeparator, \".\");\n};\n\n/**\n * Parses input into a number, removes the grouping separator from the input and\n * replaces the decimal separator with a dot to make it a JavaScript parseable number\n */\nconst parseToNumber = (\n input: ?string | ?number,\n groupingSeparator: ?string = \",\",\n decimalSeparator: ?string = \".\"\n): number => {\n if (input == null || input === \"\") {\n return NaN;\n }\n\n const inputNoGrouping = removeGroupingSeparator(input, groupingSeparator);\n\n const inputCorrectDecimalSeparator = updateDecimalSeparator(\n inputNoGrouping,\n decimalSeparator\n );\n\n return Number(inputCorrectDecimalSeparator);\n};\n\n/**\n * parses Numbers To String\n */\nconst parseNumberToString = (\n input: ?string | ?number,\n groupingSeparator: ?string = \",\",\n decimalSeparator: ?string = \".\"\n): string => {\n if (input == null || input === \"\") {\n return \"NaN\";\n }\n\n const inputNoGrouping = removeGroupingSeparator(input, groupingSeparator);\n\n const inputCorrectDecimalSeparator = updateDecimalSeparator(\n inputNoGrouping,\n decimalSeparator\n );\n\n try {\n return big(inputCorrectDecimalSeparator).toFixed();\n } catch (error) {\n return \"NaN\";\n }\n};\n\nexport { parseToNumber, parseNumberToString };\n"],"mappings":";;;;;;;AACA;AAEA;AACA;AACA;AACA,MAAMA,uBAAuB,GAAG,CAC9BC,KAAsB,EACtBC,iBAA2B,KACxB;EACH,IAAI,OAAOD,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOA,KAAK;EACd;EAEA,IAAIC,iBAAiB,IAAI,IAAI,EAAE;IAC7B,OAAOD,KAAK;EACd;EAEA,MAAME,wBAAwB,GAAGD,iBAAiB,CAACE,OAAO,CACxD,qBAAqB,EACrB,MAAM,CACP;EAED,OAAOH,KAAK,CAACG,OAAO,CAAC,IAAIC,MAAM,CAACF,wBAAwB,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC;AACrE,CAAC;;AAED;AACA;AACA;AACA,MAAMG,sBAAsB,GAAG,CAC7BL,KAAsB,EACtBM,gBAA0B,KACvB;EACH,IAAI,OAAON,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOA,KAAK;EACd;EAEA,IAAIM,gBAAgB,IAAI,IAAI,IAAIA,gBAAgB,KAAK,EAAE,EAAE;IACvD,OAAON,KAAK;EACd;EAEA,OAAOA,KAAK,CAACG,OAAO,CAACG,gBAAgB,EAAE,GAAG,CAAC;AAC7C,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,UACpBP,KAAwB,EAGb;EAAA,IAFXC,iBAA0B,uEAAG,GAAG;EAAA,IAChCK,gBAAyB,uEAAG,GAAG;EAE/B,IAAIN,KAAK,IAAI,IAAI,IAAIA,KAAK,KAAK,EAAE,EAAE;IACjC,OAAOQ,GAAG;EACZ;EAEA,MAAMC,eAAe,GAAGV,uBAAuB,CAACC,KAAK,EAAEC,iBAAiB,CAAC;EAEzE,MAAMS,4BAA4B,GAAGL,sBAAsB,CACzDI,eAAe,EACfH,gBAAgB,CACjB;EAED,OAAOK,MAAM,CAACD,4BAA4B,CAAC;AAC7C,CAAC;;AAED;AACA;AACA;AAFA;AAGA,MAAME,mBAAmB,GAAG,UAC1BZ,KAAwB,EAGb;EAAA,IAFXC,iBAA0B,uEAAG,GAAG;EAAA,IAChCK,gBAAyB,uEAAG,GAAG;EAE/B,IAAIN,KAAK,IAAI,IAAI,IAAIA,KAAK,KAAK,EAAE,EAAE;IACjC,OAAO,KAAK;EACd;EAEA,MAAMS,eAAe,GAAGV,uBAAuB,CAACC,KAAK,EAAEC,iBAAiB,CAAC;EAEzE,MAAMS,4BAA4B,GAAGL,sBAAsB,CACzDI,eAAe,EACfH,gBAAgB,CACjB;EAED,IAAI;IACF,OAAO,IAAAO,YAAG,EAACH,4BAA4B,CAAC,CAACI,OAAO,EAAE;EACpD,CAAC,CAAC,OAAOC,KAAK,EAAE;IACd,OAAO,KAAK;EACd;AACF,CAAC;AAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beinformed/ui",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.1-beta.1",
|
|
4
4
|
"description": "Toolbox for be informed javascript layouts",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"bugs": "http://support.beinformed.com",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"styled-components": "^5.0.0"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@babel/runtime-corejs3": "^7.20.
|
|
85
|
+
"@babel/runtime-corejs3": "^7.20.7",
|
|
86
86
|
"big.js": "^6.2.1",
|
|
87
87
|
"date-fns": "^2.29.3",
|
|
88
88
|
"deepmerge": "^4.2.2",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"setimmediate": "^1.0.5"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@babel/cli": "^7.
|
|
103
|
-
"@babel/core": "^7.20.
|
|
102
|
+
"@babel/cli": "^7.20.7",
|
|
103
|
+
"@babel/core": "^7.20.7",
|
|
104
104
|
"@babel/eslint-parser": "^7.19.1",
|
|
105
105
|
"@babel/eslint-plugin": "^7.19.1",
|
|
106
106
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
@@ -118,17 +118,17 @@
|
|
|
118
118
|
"cherry-pick": "^0.5.0",
|
|
119
119
|
"cross-env": "^7.0.3",
|
|
120
120
|
"documentation": "^14.0.1",
|
|
121
|
-
"eslint": "^8.
|
|
122
|
-
"eslint-config-prettier": "^8.
|
|
121
|
+
"eslint": "^8.31.0",
|
|
122
|
+
"eslint-config-prettier": "^8.6.0",
|
|
123
123
|
"eslint-plugin-babel": "^5.3.1",
|
|
124
124
|
"eslint-plugin-ft-flow": "^2.0.3",
|
|
125
125
|
"eslint-plugin-import": "^2.26.0",
|
|
126
|
-
"eslint-plugin-jest": "^27.
|
|
126
|
+
"eslint-plugin-jest": "^27.2.0",
|
|
127
127
|
"eslint-plugin-jsdoc": "^39.6.4",
|
|
128
128
|
"eslint-plugin-react": "^7.31.11",
|
|
129
129
|
"eslint-plugin-react-hooks": "^4.5.0",
|
|
130
130
|
"eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0",
|
|
131
|
-
"flow-bin": "^0.
|
|
131
|
+
"flow-bin": "^0.196.3",
|
|
132
132
|
"flow-copy-source": "^2.0.9",
|
|
133
133
|
"flow-typed": "^3.8.0",
|
|
134
134
|
"glob": "^8.0.3",
|
|
@@ -5,7 +5,7 @@ const path = require("path");
|
|
|
5
5
|
|
|
6
6
|
const { LayoutHintConfiguration } = require("../constants/LayoutHintConfig");
|
|
7
7
|
|
|
8
|
-
const readFiles = (files) => {
|
|
8
|
+
const readFiles = (files: Array<string>) => {
|
|
9
9
|
const filePromises = files.map(
|
|
10
10
|
(file) =>
|
|
11
11
|
new Promise((resolve, reject) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
import { useSelector, useDispatch } from "react-redux";
|
|
3
3
|
|
|
4
|
-
import { getApplication } from "../redux/_modularui/
|
|
4
|
+
import { getApplication } from "../redux/_modularui/ModularUISelectors";
|
|
5
5
|
import { login, logout, resetAuthErrors } from "../redux/actions";
|
|
6
6
|
|
|
7
7
|
import Cache from "../utils/browser/Cache";
|
|
@@ -11,6 +11,7 @@ import ContentModel from "../models/content/ContentModel";
|
|
|
11
11
|
|
|
12
12
|
import { useModularUIBasic } from "./useModularUIBasic";
|
|
13
13
|
import { ContentTypeModel } from "../models";
|
|
14
|
+
import type { Location } from "react-router";
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
*/
|
|
@@ -28,7 +29,7 @@ export const useConceptIndex = (href: string): ?ConceptIndexModel =>
|
|
|
28
29
|
targetModel: ConceptIndexModel,
|
|
29
30
|
});
|
|
30
31
|
|
|
31
|
-
const getHref = (context, dynamic, location) => {
|
|
32
|
+
const getHref = (context: string, dynamic: string, location?: Location) => {
|
|
32
33
|
let href = dynamic;
|
|
33
34
|
if (!href.startsWith(`/${context}/`)) {
|
|
34
35
|
href = `/${context}/${href}`;
|
package/src/hooks/useModels.js
CHANGED
|
@@ -3,7 +3,10 @@ import { useEffect, useRef } from "react";
|
|
|
3
3
|
import { useDispatch, useSelector } from "react-redux";
|
|
4
4
|
|
|
5
5
|
import { HTTP_METHODS } from "../constants";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
loadModularUI,
|
|
8
|
+
removeModelByKey,
|
|
9
|
+
} from "../redux/_modularui/ModularUIActions";
|
|
7
10
|
|
|
8
11
|
import useDeepCompareEffect from "./useDeepCompareEffect";
|
|
9
12
|
|
|
@@ -27,7 +27,7 @@ export const useModularUIBasic = <T: ModularUIModel>(
|
|
|
27
27
|
throw new IllegalArgumentException("Missing href");
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const useModularUIOptions = {};
|
|
30
|
+
const useModularUIOptions = { targetModel: undefined, isReload: false };
|
|
31
31
|
if (options.targetModel) {
|
|
32
32
|
useModularUIOptions.targetModel = options.targetModel;
|
|
33
33
|
}
|
package/src/hooks/useRouter.js
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
import { useDispatch, useSelector } from "react-redux";
|
|
3
3
|
import type { Location, LocationShape } from "react-router";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
push,
|
|
7
|
+
replace,
|
|
8
|
+
go,
|
|
9
|
+
goBack,
|
|
10
|
+
goForward,
|
|
11
|
+
} from "../redux/_router/RouterActions";
|
|
6
12
|
import type {
|
|
7
13
|
GoAction,
|
|
8
14
|
GoBackAction,
|
|
@@ -63,7 +63,7 @@ class AttributeCollection extends ResourceCollection<AttributeType> {
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
*/
|
|
66
|
-
processLayoutHintRules() {
|
|
66
|
+
processLayoutHintRules(): void {
|
|
67
67
|
this.all.forEach((attribute) => {
|
|
68
68
|
attribute.processLayoutHintRules(this);
|
|
69
69
|
});
|
|
@@ -157,14 +157,14 @@ class AttributeCollection extends ResourceCollection<AttributeType> {
|
|
|
157
157
|
/**
|
|
158
158
|
* Replace an attribute instance in the collection with a new attribute instance
|
|
159
159
|
*/
|
|
160
|
-
replace(oldAttribute: AttributeType, newAttribute: AttributeType) {
|
|
160
|
+
replace(oldAttribute: AttributeType, newAttribute: AttributeType): void {
|
|
161
161
|
this.replaceByKey(oldAttribute.key, newAttribute);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
165
|
* Replace an attribute by the key of the attribute
|
|
166
166
|
*/
|
|
167
|
-
replaceByKey(key: string, newAttribute: AttributeType) {
|
|
167
|
+
replaceByKey(key: string, newAttribute: AttributeType): void {
|
|
168
168
|
this.forEach((attribute, index) => {
|
|
169
169
|
if (attribute.key === key) {
|
|
170
170
|
this.collection[index] = newAttribute;
|
|
@@ -176,7 +176,7 @@ class AttributeCollection extends ResourceCollection<AttributeType> {
|
|
|
176
176
|
* Set reference date by replacing an old attribute with a new attribute with a reference Date
|
|
177
177
|
* Date is a string in ISO format yyyy-MM-dd
|
|
178
178
|
*/
|
|
179
|
-
setReferenceDate(date: string) {
|
|
179
|
+
setReferenceDate(date: string): void {
|
|
180
180
|
this.forEach((attribute) => {
|
|
181
181
|
const newAttribute = attribute.clone();
|
|
182
182
|
|
|
@@ -194,7 +194,7 @@ class AttributeCollection extends ResourceCollection<AttributeType> {
|
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
196
|
*/
|
|
197
|
-
addServerError(error: FormErrorAnchor) {
|
|
197
|
+
addServerError(error: FormErrorAnchor): void {
|
|
198
198
|
const elementid = error?.anchor?.elementid;
|
|
199
199
|
|
|
200
200
|
if (elementid) {
|
|
@@ -244,7 +244,9 @@ class AttributeCollection extends ResourceCollection<AttributeType> {
|
|
|
244
244
|
|
|
245
245
|
/**
|
|
246
246
|
*/
|
|
247
|
-
indicateContentConfiguration(
|
|
247
|
+
indicateContentConfiguration(
|
|
248
|
+
contentConfiguration: ContentConfiguration
|
|
249
|
+
): void {
|
|
248
250
|
if (contentConfiguration) {
|
|
249
251
|
this.all.forEach((attribute) => {
|
|
250
252
|
attribute.indicateContentConfiguration(contentConfiguration);
|
|
@@ -144,7 +144,7 @@ export default class AttributeModel
|
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
146
|
*/
|
|
147
|
-
setChildModels(models: Array<ModularUIModel>) {
|
|
147
|
+
setChildModels(models: Array<ModularUIModel>): void {
|
|
148
148
|
const conceptHref = this.conceptLink?.href;
|
|
149
149
|
if (conceptHref) {
|
|
150
150
|
this.concept = models.find((model) =>
|
|
@@ -214,7 +214,9 @@ export default class AttributeModel
|
|
|
214
214
|
|
|
215
215
|
/**
|
|
216
216
|
*/
|
|
217
|
-
indicateContentConfiguration(
|
|
217
|
+
indicateContentConfiguration(
|
|
218
|
+
contentConfiguration: ContentConfiguration
|
|
219
|
+
): void {
|
|
218
220
|
if (contentConfiguration) {
|
|
219
221
|
const hasQuestionConfig = contentConfiguration.questions?.hasConfig();
|
|
220
222
|
|
|
@@ -634,7 +636,7 @@ export default class AttributeModel
|
|
|
634
636
|
/**
|
|
635
637
|
* Used to programmatically overwrite the setting USE_CLIENTSIDE_VALIDATION
|
|
636
638
|
*/
|
|
637
|
-
setUseClientsideValidation(enabled: boolean) {
|
|
639
|
+
setUseClientsideValidation(enabled: boolean): void {
|
|
638
640
|
this._useClientsideValidation = enabled;
|
|
639
641
|
}
|
|
640
642
|
|
|
@@ -701,14 +703,14 @@ export default class AttributeModel
|
|
|
701
703
|
/**
|
|
702
704
|
* Reset static error messages on attribute
|
|
703
705
|
*/
|
|
704
|
-
resetErrors() {
|
|
706
|
+
resetErrors(): void {
|
|
705
707
|
this._errorCollection = new ErrorCollection("attribute");
|
|
706
708
|
}
|
|
707
709
|
|
|
708
710
|
/**
|
|
709
711
|
* Registers an error that was received from a server response
|
|
710
712
|
*/
|
|
711
|
-
addServerError(error: FormErrorAnchor) {
|
|
713
|
+
addServerError(error: FormErrorAnchor): void {
|
|
712
714
|
this._errorCollection.addServerError(
|
|
713
715
|
error.id,
|
|
714
716
|
error.message,
|
|
@@ -719,7 +721,7 @@ export default class AttributeModel
|
|
|
719
721
|
|
|
720
722
|
/**
|
|
721
723
|
*/
|
|
722
|
-
removeServerError(id: string) {
|
|
724
|
+
removeServerError(id: string): void {
|
|
723
725
|
this._errorCollection.removeServerError(id);
|
|
724
726
|
}
|
|
725
727
|
|
|
@@ -738,13 +740,13 @@ export default class AttributeModel
|
|
|
738
740
|
/**
|
|
739
741
|
* Registers a missing error that was received from the server
|
|
740
742
|
*/
|
|
741
|
-
addMissingError() {
|
|
743
|
+
addMissingError(): void {
|
|
742
744
|
this._errorCollection.addServerError("Constraint.Missing");
|
|
743
745
|
}
|
|
744
746
|
|
|
745
747
|
/**
|
|
746
748
|
*/
|
|
747
|
-
removeMissingError() {
|
|
749
|
+
removeMissingError(): void {
|
|
748
750
|
this.removeServerError("Constraint.Missing");
|
|
749
751
|
}
|
|
750
752
|
|
|
@@ -771,7 +773,7 @@ export default class AttributeModel
|
|
|
771
773
|
return {};
|
|
772
774
|
}
|
|
773
775
|
|
|
774
|
-
const params = {};
|
|
776
|
+
const params: { [name: string]: string | number } = {};
|
|
775
777
|
|
|
776
778
|
Object.keys(parameters).forEach((paramKey: string) => {
|
|
777
779
|
const paramValue = parameters[paramKey];
|
|
@@ -793,7 +795,7 @@ export default class AttributeModel
|
|
|
793
795
|
|
|
794
796
|
/**
|
|
795
797
|
*/
|
|
796
|
-
updateValidations(errors: Array<Object>) {
|
|
798
|
+
updateValidations(errors: Array<Object>): void {
|
|
797
799
|
if (
|
|
798
800
|
errors.some((error) => error.id === "Constraint.Mandatory") ||
|
|
799
801
|
this.layouthint.has(MANDATORY)
|
|
@@ -831,7 +833,7 @@ export default class AttributeModel
|
|
|
831
833
|
/**
|
|
832
834
|
* Set last modification to current timestamp
|
|
833
835
|
*/
|
|
834
|
-
updateLastModification() {
|
|
836
|
+
updateLastModification(): void {
|
|
835
837
|
this._lastModification = Date.now();
|
|
836
838
|
}
|
|
837
839
|
|
|
@@ -847,7 +849,7 @@ export default class AttributeModel
|
|
|
847
849
|
*
|
|
848
850
|
* @abstract
|
|
849
851
|
*/
|
|
850
|
-
reset() {
|
|
852
|
+
reset(): void {
|
|
851
853
|
throw new UnsupportedOperationException(
|
|
852
854
|
`Reset method not implemented for ${this.type}`
|
|
853
855
|
);
|
|
@@ -857,7 +859,7 @@ export default class AttributeModel
|
|
|
857
859
|
* Merge old attribute with the attribute from the server.
|
|
858
860
|
* Readonly attributes always need to show the value from the server
|
|
859
861
|
*/
|
|
860
|
-
mergeAttribute(oldAttribute: AttributeType) {
|
|
862
|
+
mergeAttribute(oldAttribute: AttributeType): void {
|
|
861
863
|
this.concept = oldAttribute.concept;
|
|
862
864
|
|
|
863
865
|
if (
|
|
@@ -916,13 +918,13 @@ export default class AttributeModel
|
|
|
916
918
|
/**
|
|
917
919
|
* Explicitly toggle visibility of this attribute
|
|
918
920
|
*/
|
|
919
|
-
show() {
|
|
921
|
+
show(): void {
|
|
920
922
|
this.isHidden = false;
|
|
921
923
|
}
|
|
922
924
|
|
|
923
925
|
/**
|
|
924
926
|
*/
|
|
925
|
-
hide() {
|
|
927
|
+
hide(): void {
|
|
926
928
|
this.isHidden = true;
|
|
927
929
|
}
|
|
928
930
|
|
|
@@ -956,7 +958,7 @@ export default class AttributeModel
|
|
|
956
958
|
|
|
957
959
|
/**
|
|
958
960
|
*/
|
|
959
|
-
processLayoutHintRules(attributes: AttributeCollection) {
|
|
961
|
+
processLayoutHintRules(attributes: AttributeCollection): void {
|
|
960
962
|
if (this._layoutHintRules) {
|
|
961
963
|
this.layoutHintRules.process(this, attributes);
|
|
962
964
|
}
|
|
@@ -171,7 +171,7 @@ class CompositeAttributeChildCollection extends ResourceCollection<AttributeType
|
|
|
171
171
|
);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
const children = {};
|
|
174
|
+
const children: { [string]: any } = {};
|
|
175
175
|
this.collection
|
|
176
176
|
.filter((child) => child.initvalue !== null)
|
|
177
177
|
.forEach((child) => {
|
|
@@ -79,9 +79,13 @@ export default class NumberAttributeModel extends AttributeModel {
|
|
|
79
79
|
* Gets the maximum digits based on the format
|
|
80
80
|
*/
|
|
81
81
|
get maxDigits(): number {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
const format = this.format;
|
|
83
|
+
|
|
84
|
+
if (format != null && format.includes(".")) {
|
|
85
|
+
return format.split(".")[1].length;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return 0;
|
|
85
89
|
}
|
|
86
90
|
|
|
87
91
|
/**
|
|
@@ -49,7 +49,7 @@ const getChildrenKeys = (children: Array<Object>): Array<Object> => {
|
|
|
49
49
|
/**
|
|
50
50
|
* @private
|
|
51
51
|
*/
|
|
52
|
-
const getAttributeModel = (contributions): ?Class<AttributeType> => {
|
|
52
|
+
const getAttributeModel = (contributions: Object): ?Class<AttributeType> => {
|
|
53
53
|
const ATTRIBUTE_MODELS = [
|
|
54
54
|
ChoiceAttributeModel,
|
|
55
55
|
BooleanAttributeModel,
|
|
@@ -65,7 +65,7 @@ class BaseLayoutHintRule implements ILayoutHintRule {
|
|
|
65
65
|
* use this to enhance the applicable attribute or the attribute collection
|
|
66
66
|
* @abstract
|
|
67
67
|
*/
|
|
68
|
-
process(attribute: AttributeModel, attributes: AttributeCollection) {
|
|
68
|
+
process(attribute: AttributeModel, attributes: AttributeCollection): void {
|
|
69
69
|
throw new IllegalStateException(
|
|
70
70
|
`Missing process implementation on layout hint rule`
|
|
71
71
|
);
|
|
@@ -218,7 +218,7 @@ class DependentAttribute extends BaseLayoutHintRule {
|
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
220
|
*/
|
|
221
|
-
process(attribute: AttributeModel, attributes: AttributeCollection) {
|
|
221
|
+
process(attribute: AttributeModel, attributes: AttributeCollection): void {
|
|
222
222
|
const controlAttribute = this.getControlAttribute(attributes);
|
|
223
223
|
if (!controlAttribute) {
|
|
224
224
|
return;
|
|
@@ -187,7 +187,7 @@ class ResourceModel extends BaseModel implements IModelWithChildModels {
|
|
|
187
187
|
* @abstract
|
|
188
188
|
* @example <caption>Put all models of instance List and GroupingPanel into the panels property</caption>
|
|
189
189
|
*/
|
|
190
|
-
setChildModels(models: Array<ModularUIModel>) {
|
|
190
|
+
setChildModels(models: Array<ModularUIModel>): void {
|
|
191
191
|
if (!models) {
|
|
192
192
|
throw new IllegalArgumentException("No models send to setChildModels");
|
|
193
193
|
}
|
|
@@ -16,7 +16,10 @@ import type LinkModel from "../links/LinkModel";
|
|
|
16
16
|
/**
|
|
17
17
|
* Get content items recursively
|
|
18
18
|
*/
|
|
19
|
-
const getItems = (
|
|
19
|
+
const getItems = (
|
|
20
|
+
items: Array<Object>,
|
|
21
|
+
entryDate: ISO_DATE | null
|
|
22
|
+
): Array<ContentLinkModel> =>
|
|
20
23
|
items.map((item) => {
|
|
21
24
|
const link = new ContentLinkModel(
|
|
22
25
|
{
|
|
@@ -144,7 +144,7 @@ export default class FilterCollection extends BaseCollection<FilterType> {
|
|
|
144
144
|
/**
|
|
145
145
|
* Update Filter by input name and value
|
|
146
146
|
*/
|
|
147
|
-
update(attribute: AttributeType, value: string) {
|
|
147
|
+
update(attribute: AttributeType, value: string): void {
|
|
148
148
|
const filterToUpdate = attribute.parentKey
|
|
149
149
|
? this.getFilterByAttributeKey(attribute.parentKey)
|
|
150
150
|
: this.getFilterByAttributeKey(attribute.key);
|
|
@@ -291,7 +291,7 @@ class FormModel extends ResourceModel {
|
|
|
291
291
|
|
|
292
292
|
/**
|
|
293
293
|
*/
|
|
294
|
-
addFormObject(formObjectModel: FormObjectModel) {
|
|
294
|
+
addFormObject(formObjectModel: FormObjectModel): void {
|
|
295
295
|
if (!formObjectModel) {
|
|
296
296
|
throw new IllegalArgumentException("Missing form object to add");
|
|
297
297
|
}
|
|
@@ -318,7 +318,7 @@ class FormModel extends ResourceModel {
|
|
|
318
318
|
|
|
319
319
|
/**
|
|
320
320
|
*/
|
|
321
|
-
removeFormObject(formObjectModel: ?FormObjectModel) {
|
|
321
|
+
removeFormObject(formObjectModel: ?FormObjectModel): void {
|
|
322
322
|
if (!formObjectModel) {
|
|
323
323
|
throw new IllegalArgumentException("Missing form object to remove");
|
|
324
324
|
}
|
|
@@ -67,7 +67,7 @@ class LinkModel extends BaseModel {
|
|
|
67
67
|
*/
|
|
68
68
|
handleInitialFilters(href: Href) {
|
|
69
69
|
if (this.layouthint.has(INITIAL_FILTER)) {
|
|
70
|
-
const filters = {};
|
|
70
|
+
const filters: { [string]: Array<string> } = {};
|
|
71
71
|
this.layouthint
|
|
72
72
|
.filter((hint) => hint.startsWith(INITIAL_FILTER))
|
|
73
73
|
.forEach((hint) => {
|
|
@@ -79,7 +79,9 @@ class LinkModel extends BaseModel {
|
|
|
79
79
|
filters[p.name] = [];
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
if (p.value != null) {
|
|
83
|
+
filters[p.name].push(p.value);
|
|
84
|
+
}
|
|
83
85
|
}
|
|
84
86
|
});
|
|
85
87
|
|
|
@@ -381,7 +381,7 @@ export default class ListModel extends ResourceModel {
|
|
|
381
381
|
/**
|
|
382
382
|
*/
|
|
383
383
|
getSortingLabels(): { [string]: string } {
|
|
384
|
-
const sortingLabels = {};
|
|
384
|
+
const sortingLabels: { [string]: string } = {};
|
|
385
385
|
|
|
386
386
|
if (this.contributions.results) {
|
|
387
387
|
const { results } = this.contributions;
|
|
@@ -55,7 +55,7 @@ class Parameter {
|
|
|
55
55
|
const namePart = parameter.substr(0, parameter.indexOf("="));
|
|
56
56
|
const value = parameter.substr(parameter.indexOf("=") + 1);
|
|
57
57
|
|
|
58
|
-
let prefix
|
|
58
|
+
let prefix;
|
|
59
59
|
let name = namePart;
|
|
60
60
|
if (namePart.includes(PARAMETER_SEPARATOR)) {
|
|
61
61
|
prefix = namePart.substr(0, namePart.indexOf("~"));
|
package/src/models/types.js
CHANGED
|
@@ -116,25 +116,25 @@ export type FormErrorAnchor = {
|
|
|
116
116
|
},
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
-
export type labelsJSON = {
|
|
119
|
+
export type labelsJSON = {
|
|
120
120
|
_id: string,
|
|
121
121
|
label: string,
|
|
122
122
|
value: string,
|
|
123
|
-
|
|
123
|
+
};
|
|
124
124
|
|
|
125
|
-
export type propertyJSON = {
|
|
125
|
+
export type propertyJSON = {
|
|
126
126
|
_id: string,
|
|
127
127
|
type: string,
|
|
128
128
|
mandatory: string,
|
|
129
129
|
label: string,
|
|
130
130
|
value: string,
|
|
131
|
-
|
|
131
|
+
};
|
|
132
132
|
|
|
133
|
-
export type textfragmentJSON = {
|
|
133
|
+
export type textfragmentJSON = {
|
|
134
134
|
label: string,
|
|
135
135
|
text: string,
|
|
136
136
|
type: string,
|
|
137
|
-
|
|
137
|
+
};
|
|
138
138
|
|
|
139
139
|
export interface IConstraintModel {
|
|
140
140
|
+id: string;
|
|
@@ -183,7 +183,7 @@ class ModularUIRequest {
|
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
185
|
*/
|
|
186
|
-
processContributionsService(contributionsData: Object) {
|
|
186
|
+
processContributionsService(contributionsData: Object): void {
|
|
187
187
|
if (!isPlainObject(contributionsData)) {
|
|
188
188
|
throw new IllegalArgumentException(
|
|
189
189
|
"Missing contributions data or contributions is not JSON"
|
|
@@ -206,14 +206,14 @@ class ModularUIRequest {
|
|
|
206
206
|
|
|
207
207
|
/**
|
|
208
208
|
*/
|
|
209
|
-
handleContributionsError(error: Object) {
|
|
209
|
+
handleContributionsError(error: Object): void {
|
|
210
210
|
const errorMessage = error.properties?.message ?? "Error in contribution";
|
|
211
211
|
throw new ModularUIError(errorMessage, error, this.contributionsHref);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
215
|
*/
|
|
216
|
-
handleDataError(error: Object) {
|
|
216
|
+
handleDataError(error: Object): void {
|
|
217
217
|
if (error.properties) {
|
|
218
218
|
const errorMessage = error.properties?.message ?? "Error in data";
|
|
219
219
|
throw new ModularUIError(errorMessage, error, this.href.path.toString());
|
|
@@ -224,7 +224,7 @@ class ModularUIRequest {
|
|
|
224
224
|
|
|
225
225
|
/**
|
|
226
226
|
*/
|
|
227
|
-
handleData(key: string, data: Object) {
|
|
227
|
+
handleData(key: string, data: Object): void {
|
|
228
228
|
this.response.key = key;
|
|
229
229
|
this.response.data = data;
|
|
230
230
|
|
|
@@ -243,7 +243,7 @@ class ModularUIRequest {
|
|
|
243
243
|
|
|
244
244
|
/**
|
|
245
245
|
*/
|
|
246
|
-
processDataService(data: Object) {
|
|
246
|
+
processDataService(data: Object): void {
|
|
247
247
|
if (!isPlainObject(data)) {
|
|
248
248
|
throw new IllegalArgumentException("Missing data or data is not JSON");
|
|
249
249
|
}
|
|
@@ -431,7 +431,7 @@ class ModularUIRequest {
|
|
|
431
431
|
);
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
-
const newDataLinks = {};
|
|
434
|
+
const newDataLinks: { [string]: any } = {};
|
|
435
435
|
for (const dataLinkKey in dataLinks) {
|
|
436
436
|
if (!hiddenLinks.includes(dataLinkKey)) {
|
|
437
437
|
newDataLinks[dataLinkKey] = dataLinks[dataLinkKey];
|