@beinformed/ui 1.31.0 → 1.31.3
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 +20 -0
- package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/esm/constants/LayoutHints.js.map +1 -1
- package/esm/constants/Settings.js.map +1 -1
- package/esm/exceptions/FetchException.js.map +1 -1
- package/esm/exceptions/NetworkException.js.map +1 -1
- package/esm/exceptions/UnauthorizedException.js.map +1 -1
- package/esm/hooks/useAllFormsOnModel.js.map +1 -1
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/hooks/useContent.js.map +1 -1
- package/esm/hooks/useDeepCompareEffect.js.map +1 -1
- package/esm/hooks/useForm.js.map +1 -1
- package/esm/hooks/useI18n.js.map +1 -1
- package/esm/hooks/useModal.js.map +1 -1
- package/esm/hooks/useModelCatalog.js.map +1 -1
- package/esm/hooks/useModularUI.js.map +1 -1
- package/esm/hooks/useModularUIBasic.js.map +1 -1
- package/esm/hooks/useModularUIModel.js.map +1 -1
- package/esm/hooks/useModularUIRequest.js.map +1 -1
- package/esm/hooks/useNotification.js.map +1 -1
- package/esm/hooks/usePreference.js +8 -2
- package/esm/hooks/usePreference.js.map +1 -1
- package/esm/i18n/Locale.js.map +1 -1
- package/esm/i18n/Locales.js.map +1 -1
- package/esm/i18n/Message.js.map +1 -1
- package/esm/i18n/withMessage.js.map +1 -1
- package/esm/models/actions/ActionCollection.js.map +1 -1
- package/esm/models/actions/ActionModel.js.map +1 -1
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js.map +1 -1
- package/esm/models/attributes/AttributeContent.js.map +1 -1
- package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
- package/esm/models/attributes/AttributeModel.js.map +1 -1
- package/esm/models/attributes/AttributeSetModel.js.map +1 -1
- package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeModel.js +1 -1
- package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionModel.js +8 -0
- package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
- package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/esm/models/attributes/StringAttributeModel.js.map +1 -1
- package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
- package/esm/models/attributes/_createAttribute.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberGroupingConstraint.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/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/esm/models/base/BaseCollection.js.map +1 -1
- package/esm/models/base/BaseModel.js.map +1 -1
- package/esm/models/base/ResourceModel.js.map +1 -1
- package/esm/models/caseview/CaseViewModel.js.map +1 -1
- package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
- package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
- package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
- package/esm/models/content/ContentIndexModel.js.map +1 -1
- package/esm/models/content/ContentLinkModel.js.map +1 -1
- package/esm/models/content/ContentModel.js.map +1 -1
- package/esm/models/content/ContentTOCModel.js.map +1 -1
- package/esm/models/content/SectionModel.js.map +1 -1
- package/esm/models/content/SubSectionModel.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/esm/models/detail/DetailModel.js.map +1 -1
- package/esm/models/error/ErrorCollection.js.map +1 -1
- package/esm/models/error/ErrorModel.js.map +1 -1
- package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
- package/esm/models/filters/BaseFilterModel.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/form/FormObjectModel.js.map +1 -1
- package/esm/models/grouping/GroupingModel.js.map +1 -1
- package/esm/models/href/Href.js.map +1 -1
- package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/esm/models/links/LinkCollection.js.map +1 -1
- package/esm/models/links/LinkModel.js.map +1 -1
- package/esm/models/links/normalizeLinkJSON.js.map +1 -1
- package/esm/models/list/ListDetailModel.js.map +1 -1
- package/esm/models/list/ListItemCollection.js.map +1 -1
- package/esm/models/list/ListItemModel.js.map +1 -1
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
- package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
- package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/esm/models/paging/PagingModel.js.map +1 -1
- package/esm/models/panels/GroupingPanelModel.js.map +1 -1
- package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/esm/models/resolveModel.js.map +1 -1
- package/esm/models/sorting/SortingModel.js.map +1 -1
- package/esm/models/tab/TabModel.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/esm/models/types.js.map +1 -1
- package/esm/models/user/UserProfileModel.js.map +1 -1
- package/esm/modularui/CaptchaRequest.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/modularui/UploadRequest.js.map +1 -1
- package/esm/react/utils.js.map +1 -1
- package/esm/react-client/client.js +1 -0
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-client/contextPath.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.map +1 -1
- package/esm/react-server/renderSSRMinimal.js.map +1 -1
- package/esm/react-server/requestInformation.js.map +1 -1
- package/esm/react-server/serverUtil.js.map +1 -1
- package/esm/react-theme/createTheme.js.map +1 -1
- package/esm/react-theme/utils/colors.js.map +1 -1
- package/esm/react-theme/utils/contrast.js.map +1 -1
- package/esm/react-theme/utils/corners.js.map +1 -1
- package/esm/react-theme/utils/spacers.js.map +1 -1
- package/esm/react-theme/utils/themeProps.js.map +1 -1
- package/esm/redux/_i18n/I18nActions.js.map +1 -1
- package/esm/redux/_i18n/I18nReducer.js.map +1 -1
- package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
- package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/esm/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/esm/redux/_modularui/ModularUIUtils.js.map +1 -1
- package/esm/redux/_modularui/types.js.map +1 -1
- package/esm/redux/_modularui/withModularUI.js.map +1 -1
- package/esm/redux/_router/RouterActions.js.map +1 -1
- package/esm/redux/_router/RouterConnectors.js.map +1 -1
- package/esm/redux/_router/RouterReducer.js.map +1 -1
- package/esm/redux/actions/Application.js.map +1 -1
- package/esm/redux/actions/Authorization.js.map +1 -1
- package/esm/redux/actions/Error.js.map +1 -1
- package/esm/redux/actions/FormAttributeSet.js.map +1 -1
- package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/esm/redux/actions/FormAutosave.js.map +1 -1
- package/esm/redux/actions/FormAutosubmit.js.map +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.map +1 -1
- package/esm/redux/actions/ProgressIndicator.js.map +1 -1
- package/esm/redux/actions/SignIn.js.map +1 -1
- package/esm/redux/connectors/Application.js.map +1 -1
- package/esm/redux/connectors/Breadcrumb.js.map +1 -1
- package/esm/redux/connectors/CaseView.js.map +1 -1
- package/esm/redux/connectors/ConceptDetail.js.map +1 -1
- package/esm/redux/connectors/ContentBrowser.js.map +1 -1
- package/esm/redux/connectors/ContentDetail.js.map +1 -1
- package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
- package/esm/redux/connectors/Form.js.map +1 -1
- package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
- package/esm/redux/connectors/ListDetail.js.map +1 -1
- package/esm/redux/connectors/Modal.js.map +1 -1
- package/esm/redux/connectors/ModelCatalog.js.map +1 -1
- package/esm/redux/connectors/Notification.js.map +1 -1
- package/esm/redux/connectors/PanelRenderer.js.map +1 -1
- package/esm/redux/connectors/Preferences.js.map +1 -1
- package/esm/redux/connectors/Progress.js.map +1 -1
- package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
- package/esm/redux/connectors/QuickSearch.js.map +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.map +1 -1
- package/esm/redux/reducers/AuthReducer.js.map +1 -1
- package/esm/redux/reducers/ErrorReducer.js.map +1 -1
- package/esm/redux/reducers/ModalsReducer.js.map +1 -1
- package/esm/redux/reducers/NotificationReducer.js.map +1 -1
- package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
- package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/esm/redux/store/beforeRenderHooks.js.map +1 -1
- package/esm/redux/store/configureStore.js.map +1 -1
- package/esm/utils/browser/Cookies.js.map +1 -1
- package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
- package/esm/utils/fetch/universalFetch.js.map +1 -1
- package/esm/utils/fetch/xhr.js.map +1 -1
- package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
- package/esm/utils/helpers/text.js.map +1 -1
- package/esm/utils/number/DecimalFormat.js.map +1 -1
- package/esm/utils/number/formatValue.js.map +1 -1
- package/esm/utils/number/parseNumbers.js.map +1 -1
- package/lib/builder/__tests__/mergeLayoutHintConfigurations.spec.js.flow +4 -4
- package/lib/builder/mergeLayoutHintConfigurations.js.flow +3 -3
- package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/lib/constants/LayoutHints.js.flow +1 -1
- package/lib/constants/LayoutHints.js.map +1 -1
- package/lib/constants/Settings.js.flow +2 -2
- package/lib/constants/Settings.js.map +1 -1
- package/lib/exceptions/FetchException.js.flow +2 -2
- package/lib/exceptions/FetchException.js.map +1 -1
- package/lib/exceptions/NetworkException.js.flow +1 -1
- package/lib/exceptions/NetworkException.js.map +1 -1
- package/lib/exceptions/UnauthorizedException.js.flow +1 -1
- package/lib/exceptions/UnauthorizedException.js.map +1 -1
- package/lib/hooks/__tests__/UseModularUIModel.spec.js.flow +9 -9
- package/lib/hooks/__tests__/useAuthentication.spec.js.flow +2 -2
- package/lib/hooks/__tests__/useForm.spec.js.flow +2 -2
- package/lib/hooks/__tests__/useModelCatalog.spec.js.flow +7 -7
- package/lib/hooks/__tests__/useModularUIBasic.spec.js.flow +2 -2
- package/lib/hooks/__tests__/usePreference.spec.js.flow +1 -1
- package/lib/hooks/useAllFormsOnModel.js.flow +2 -2
- package/lib/hooks/useAllFormsOnModel.js.map +1 -1
- package/lib/hooks/useAuthentication.js.flow +2 -2
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useContent.js.flow +1 -1
- package/lib/hooks/useContent.js.map +1 -1
- package/lib/hooks/useDeepCompareEffect.js.flow +1 -1
- package/lib/hooks/useDeepCompareEffect.js.map +1 -1
- package/lib/hooks/useForm.js.flow +4 -4
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useI18n.js.flow +3 -3
- package/lib/hooks/useI18n.js.map +1 -1
- package/lib/hooks/useModal.js.flow +2 -2
- package/lib/hooks/useModal.js.map +1 -1
- package/lib/hooks/useModelCatalog.js.flow +1 -1
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModularUI.js.flow +1 -1
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js.flow +1 -1
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useModularUIModel.js.flow +1 -1
- package/lib/hooks/useModularUIModel.js.map +1 -1
- package/lib/hooks/useModularUIRequest.js.flow +1 -1
- package/lib/hooks/useModularUIRequest.js.map +1 -1
- package/lib/hooks/useNotification.js.flow +2 -2
- package/lib/hooks/useNotification.js.map +1 -1
- package/lib/hooks/usePreference.js +8 -2
- package/lib/hooks/usePreference.js.flow +17 -7
- package/lib/hooks/usePreference.js.map +1 -1
- package/lib/i18n/Locale.js.flow +4 -4
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js.flow +8 -8
- package/lib/i18n/Locales.js.map +1 -1
- package/lib/i18n/Message.js.flow +2 -2
- package/lib/i18n/Message.js.map +1 -1
- package/lib/i18n/__tests__/Locale.spec.js.flow +3 -3
- package/lib/i18n/__tests__/Locales.spec.js.flow +15 -13
- package/lib/i18n/withMessage.js.flow +4 -4
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/models/actions/ActionCollection.js.flow +4 -4
- package/lib/models/actions/ActionCollection.js.map +1 -1
- package/lib/models/actions/ActionModel.js.flow +4 -4
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/actions/__tests__/ActionCollection.spec.js.flow +3 -3
- package/lib/models/actions/__tests__/ActionModel.spec.js.flow +1 -1
- package/lib/models/application/ApplicationModel.js.flow +3 -3
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js.flow +7 -7
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeContent.js.flow +9 -9
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js.flow +9 -9
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/AttributeModel.js.flow +24 -24
- package/lib/models/attributes/AttributeModel.js.map +1 -1
- package/lib/models/attributes/AttributeSetModel.js.flow +1 -1
- package/lib/models/attributes/AttributeSetModel.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js.flow +4 -4
- package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js.flow +7 -7
- package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.flow +15 -15
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js +8 -0
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.flow +19 -11
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js.flow +10 -10
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeModel.js.flow +7 -7
- package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js.flow +6 -6
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/NumberAttributeModel.js.flow +9 -9
- package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
- package/lib/models/attributes/PasswordAttributeModel.js.flow +8 -8
- package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/lib/models/attributes/StringAttributeModel.js.flow +3 -3
- package/lib/models/attributes/StringAttributeModel.js.map +1 -1
- package/lib/models/attributes/UploadAttributeModel.js.flow +5 -5
- package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
- package/lib/models/attributes/__tests__/AttributeCollection.spec.js.flow +11 -11
- package/lib/models/attributes/__tests__/AttributeContent.spec.js.flow +7 -7
- package/lib/models/attributes/__tests__/AttributeModel.spec.js.flow +5 -5
- package/lib/models/attributes/__tests__/AttributeSetModel.spec.js.flow +2 -2
- package/lib/models/attributes/__tests__/BooleanAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/ChoiceAttributeModel.spec.js.flow +8 -8
- package/lib/models/attributes/__tests__/ChoiceAttributeOptionCollection.spec.js.flow +8 -8
- package/lib/models/attributes/__tests__/ChoiceAttributeOptionModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/DateAttributeModel.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/DatetimeAttributeModel.spec.js.flow +11 -11
- package/lib/models/attributes/__tests__/HelptextAttributeModel.spec.js.flow +3 -3
- package/lib/models/attributes/__tests__/MemoAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/MoneyAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/NumberAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/PasswordAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/StringAttributeModel.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/TimeAttributeModel.spec.js.flow +2 -2
- package/lib/models/attributes/__tests__/TimestampModel.spec.js.flow +2 -2
- package/lib/models/attributes/__tests__/UploadAttributeModel.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/_createAttribute.spec.js.flow +6 -6
- package/lib/models/attributes/__tests__/createAttributeComposite.spec.js.flow +3 -3
- package/lib/models/attributes/__tests__/createAttributeDynamicSchema.spec.js.flow +3 -3
- package/lib/models/attributes/_createAttribute.js.flow +5 -5
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.flow +5 -5
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.flow +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.flow +6 -6
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.flow +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.flow +6 -6
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.flow +2 -2
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.flow +2 -2
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/__tests__/ConstraintModel.spec.js.flow +1 -1
- package/lib/models/attributes/input-constraints/__tests__/DateBoundaryConstraint.spec.js.flow +6 -6
- package/lib/models/attributes/input-constraints/__tests__/DateTimeDateFormatConstraint.spec.js.flow +2 -2
- package/lib/models/attributes/input-constraints/__tests__/DateTimeTimeFormatConstraint.spec.js.flow +2 -2
- package/lib/models/attributes/input-constraints/__tests__/DatetimeFormatConstraint.spec.js.flow +5 -5
- package/lib/models/attributes/input-constraints/__tests__/NumberBoundaryConstraint.spec.js.flow +6 -6
- package/lib/models/attributes/input-constraints/__tests__/NumberFormatConstraint.spec.js.flow +3 -3
- package/lib/models/attributes/input-constraints/__tests__/NumberGroupingConstraint.spec.js.flow +2 -2
- package/lib/models/attributes/input-constraints/__tests__/RegexConstraint.spec.js.flow +1 -1
- package/lib/models/attributes/input-constraints/__tests__/StringLengthConstraint.spec.js.flow +4 -4
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.flow +4 -4
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.flow +15 -15
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.flow +2 -2
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.flow +2 -2
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/__tests__/DependentAttribute.spec.js.flow +22 -22
- package/lib/models/attributes/layouthint-rules/__tests__/LayoutHintRuleCollection.spec.js.flow +1 -1
- package/lib/models/attributes/layouthint-rules/__tests__/RemainingTotalUploadSize.spec.js.flow +4 -4
- package/lib/models/base/BaseCollection.js.flow +6 -6
- package/lib/models/base/BaseCollection.js.map +1 -1
- package/lib/models/base/BaseModel.js.flow +1 -1
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/base/ResourceModel.js.flow +5 -5
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/base/__tests__/ResourceCollection.spec.js.flow +1 -1
- package/lib/models/caseview/CaseViewModel.js.flow +4 -4
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/caseview/__tests__/CaseViewModel.spec.js.flow +3 -3
- package/lib/models/concepts/BusinessScenarioModel.js.flow +9 -9
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js.flow +17 -17
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptIndexModel.js.flow +2 -2
- package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js.flow +6 -4
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/ConceptRelationCollection.js.flow +5 -5
- package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceCollection.js.flow +2 -2
- package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js.flow +2 -2
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/concepts/__tests__/ConceptDetailModel.spec.js.flow +1 -1
- package/lib/models/content/ContentIndexModel.js.flow +3 -3
- package/lib/models/content/ContentIndexModel.js.map +1 -1
- package/lib/models/content/ContentLinkModel.js.flow +11 -9
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/ContentModel.js.flow +2 -2
- package/lib/models/content/ContentModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js.flow +4 -4
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/content/SectionModel.js.flow +4 -4
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/content/SubSectionModel.js.flow +2 -2
- package/lib/models/content/SubSectionModel.js.map +1 -1
- package/lib/models/content/__tests__/ContentModel.spec.js.flow +16 -16
- package/lib/models/contentconfiguration/ContentConfiguration.js.flow +1 -1
- package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.flow +5 -5
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.flow +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.flow +2 -2
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/lib/models/contentconfiguration/__tests__/ContentConfigurationResults.spec.js.flow +12 -12
- package/lib/models/detail/DetailModel.js.flow +5 -5
- package/lib/models/detail/DetailModel.js.map +1 -1
- package/lib/models/error/ErrorCollection.js.flow +4 -4
- package/lib/models/error/ErrorCollection.js.map +1 -1
- package/lib/models/error/ErrorModel.js.flow +1 -1
- package/lib/models/error/ErrorModel.js.map +1 -1
- package/lib/models/error/__tests__/ErrorModel.spec.js.flow +1 -1
- package/lib/models/filters/AssignmentFilterModel.js.flow +3 -3
- package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
- package/lib/models/filters/BaseFilterModel.js.flow +3 -3
- package/lib/models/filters/BaseFilterModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js.flow +5 -5
- package/lib/models/filters/FilterCollection.js.map +1 -1
- package/lib/models/filters/__tests__/AssignmentFilterModel.spec.js.flow +4 -4
- package/lib/models/filters/__tests__/FilterCollection.spec.js.flow +11 -11
- package/lib/models/filters/__tests__/FilterModel.spec.js.flow +1 -1
- package/lib/models/filters/__tests__/RangeFilterModel.spec.js.flow +1 -1
- package/lib/models/form/FormModel.js.flow +39 -39
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js.flow +16 -16
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/form/__tests__/FormModel.instrument.spec.js.flow +7 -7
- package/lib/models/form/__tests__/FormModel.repeating.spec.js.flow +2 -2
- package/lib/models/form/__tests__/FormModel.selfhref.spec.js.flow +1 -1
- package/lib/models/form/__tests__/FormModel.spec.js.flow +6 -6
- package/lib/models/form/__tests__/FormResultData.spec.js.flow +1 -1
- package/lib/models/form/__tests__/FormWithContent.spec.js.flow +3 -3
- package/lib/models/grouping/GroupingModel.js.flow +7 -7
- package/lib/models/grouping/GroupingModel.js.map +1 -1
- package/lib/models/grouping/__tests__/GroupingModel.spec.js.flow +2 -2
- package/lib/models/href/Href.js.flow +6 -6
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/href/__tests__/Href.spec.js.flow +18 -16
- package/lib/models/layouthint/LayoutHintCollection.js.flow +3 -3
- package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/lib/models/links/LinkCollection.js.flow +4 -4
- package/lib/models/links/LinkCollection.js.map +1 -1
- package/lib/models/links/LinkModel.js.flow +3 -3
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/links/__tests__/LinkModel.spec.js.flow +4 -4
- package/lib/models/links/normalizeLinkJSON.js.flow +6 -6
- package/lib/models/links/normalizeLinkJSON.js.map +1 -1
- package/lib/models/list/ListDetailModel.js.flow +7 -7
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListItemCollection.js.flow +2 -2
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/list/ListItemModel.js.flow +2 -2
- package/lib/models/list/ListItemModel.js.map +1 -1
- package/lib/models/list/ListModel.js.flow +6 -6
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/list/__tests__/ListDetailModel.spec.js.flow +4 -4
- package/lib/models/list/__tests__/ListItemCollection.spec.js.flow +1 -1
- package/lib/models/list/__tests__/ListModel.spec.js.flow +3 -3
- package/lib/models/list/__tests__/ListResultDetail.spec.js.flow +3 -3
- package/lib/models/lookup/LookupOptionCollection.js.flow +1 -1
- package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
- package/lib/models/lookup/LookupOptionsModel.js.flow +4 -4
- package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
- package/lib/models/lookup/__tests__/LookupOptionsModel.spec.js.flow +3 -3
- package/lib/models/modelcatalog/ModelCatalogModel.js.flow +2 -2
- package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/lib/models/paging/PagingModel.js.flow +1 -1
- package/lib/models/paging/PagingModel.js.map +1 -1
- package/lib/models/paging/__tests__/PagingModel.spec.js.flow +2 -2
- package/lib/models/panels/GroupingPanelModel.js.flow +5 -5
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/panels/__tests__/GroupingPanelModel.spec.js.flow +8 -8
- package/lib/models/parameter/__tests__/Parameter.spec.js.flow +5 -5
- package/lib/models/process/ProcessStatusSettingsModel.js.flow +1 -1
- package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/lib/models/process/__tests__/ProcessStatusSettingsModel.spec.js.flow +1 -1
- package/lib/models/resolveModel.js.flow +4 -4
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/sorting/SortingModel.js.flow +4 -4
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/sorting/__tests__/SortingModel.spec.js.flow +3 -3
- package/lib/models/tab/TabModel.js.flow +3 -3
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/tab/__tests__/TabModel.spec.js.flow +5 -5
- package/lib/models/taskgroup/TaskGroupModel.js.flow +2 -2
- package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/lib/models/types.js.flow +1 -1
- package/lib/models/types.js.map +1 -1
- package/lib/models/user/UserProfileModel.js.flow +1 -1
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/models/user/__tests__/UserModel.spec.js.flow +2 -2
- package/lib/models/user/__tests__/UserProfileModel.spec.js.flow +2 -2
- package/lib/models/user/__tests__/UserServicesModel.spec.js.flow +1 -1
- package/lib/modularui/CaptchaRequest.js.flow +1 -1
- package/lib/modularui/CaptchaRequest.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js.flow +26 -26
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/UploadRequest.js.flow +6 -6
- package/lib/modularui/UploadRequest.js.map +1 -1
- package/lib/modularui/__tests__/ModularUIError.spec.js.flow +1 -1
- package/lib/modularui/__tests__/ModularUIRequest.spec.js.flow +9 -9
- package/lib/react/utils.js.flow +1 -1
- package/lib/react/utils.js.map +1 -1
- package/lib/react-client/client.js +1 -0
- package/lib/react-client/client.js.flow +11 -10
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-client/contextPath.js.flow +2 -2
- package/lib/react-client/contextPath.js.map +1 -1
- package/lib/react-client/rehydrate.js.flow +1 -1
- package/lib/react-client/rehydrate.js.map +1 -1
- package/lib/react-server/__tests__/serverUtil.spec.js.flow +2 -2
- package/lib/react-server/createSSRComplete.js.flow +3 -3
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js.flow +4 -4
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js.flow +1 -1
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/requestInformation.js.flow +2 -2
- package/lib/react-server/requestInformation.js.map +1 -1
- package/lib/react-server/serverUtil.js.flow +8 -8
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/react-theme/__tests__/createTheme.spec.js.flow +4 -4
- package/lib/react-theme/createTheme.js.flow +1 -1
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/react-theme/utils/__tests__/background.spec.js.flow +2 -2
- package/lib/react-theme/utils/__tests__/contrast.spec.js.flow +1 -1
- package/lib/react-theme/utils/__tests__/corners.spec.js.flow +3 -3
- package/lib/react-theme/utils/__tests__/spacers.spec.js.flow +1 -1
- package/lib/react-theme/utils/__tests__/themeProps.spec.js.flow +9 -9
- package/lib/react-theme/utils/colors.js.flow +3 -3
- package/lib/react-theme/utils/colors.js.map +1 -1
- package/lib/react-theme/utils/contrast.js.flow +6 -6
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js.flow +2 -2
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js.flow +2 -2
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/react-theme/utils/themeProps.js.flow +8 -8
- package/lib/react-theme/utils/themeProps.js.map +1 -1
- package/lib/redux/_i18n/I18nActions.js.flow +1 -1
- package/lib/redux/_i18n/I18nActions.js.map +1 -1
- package/lib/redux/_i18n/I18nReducer.js.flow +2 -2
- package/lib/redux/_i18n/I18nReducer.js.map +1 -1
- package/lib/redux/_i18n/__tests__/reducer.spec.js.flow +2 -2
- package/lib/redux/_modularui/ModularUIActions.js.flow +8 -8
- package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
- package/lib/redux/_modularui/ModularUIConnector.js.flow +4 -4
- package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/lib/redux/_modularui/ModularUIMiddleware.js.flow +6 -6
- package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/lib/redux/_modularui/ModularUIReducer.js.flow +5 -5
- package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/lib/redux/_modularui/ModularUISelectors.js.flow +11 -11
- package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/lib/redux/_modularui/ModularUIUtils.js.flow +1 -1
- package/lib/redux/_modularui/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 +13 -13
- package/lib/redux/_modularui/__tests__/selectors.spec.js.flow +3 -3
- package/lib/redux/_modularui/types.js.flow +4 -4
- package/lib/redux/_modularui/types.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js.flow +3 -3
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/RouterActions.js.flow +3 -3
- package/lib/redux/_router/RouterActions.js.map +1 -1
- package/lib/redux/_router/RouterConnectors.js.flow +5 -5
- package/lib/redux/_router/RouterConnectors.js.map +1 -1
- package/lib/redux/_router/RouterReducer.js.flow +1 -1
- package/lib/redux/_router/RouterReducer.js.map +1 -1
- package/lib/redux/_router/__tests__/reducer.spec.js.flow +2 -2
- package/lib/redux/actions/Application.js.flow +1 -1
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/Authorization.js.flow +1 -1
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js.flow +3 -3
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js.flow +2 -2
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js.flow +3 -3
- package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/lib/redux/actions/FormAutosave.js.flow +1 -1
- package/lib/redux/actions/FormAutosave.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js.flow +1 -1
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/FormValidations.js.flow +3 -3
- package/lib/redux/actions/FormValidations.js.map +1 -1
- package/lib/redux/actions/Notification.js.flow +4 -4
- package/lib/redux/actions/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.js.flow +11 -11
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/actions/ProgressIndicator.js.flow +1 -1
- package/lib/redux/actions/ProgressIndicator.js.map +1 -1
- package/lib/redux/actions/SignIn.js.flow +3 -3
- package/lib/redux/actions/SignIn.js.map +1 -1
- package/lib/redux/actions/__tests__/Authorization.spec.js.flow +2 -2
- package/lib/redux/actions/__tests__/Error-server.spec.js.flow +13 -13
- package/lib/redux/actions/__tests__/Error.spec.js.flow +6 -6
- package/lib/redux/actions/__tests__/Notification.spec.js.flow +1 -1
- package/lib/redux/actions/__tests__/Preferences.spec.js.flow +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.flow +1 -1
- package/lib/redux/connectors/Breadcrumb.js.map +1 -1
- package/lib/redux/connectors/CaseView.js.flow +1 -1
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js.flow +1 -1
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js.flow +1 -1
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js.flow +1 -1
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js.flow +2 -2
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js.flow +5 -5
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/FormAttributeSet.js.flow +6 -6
- package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js.flow +1 -1
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/Modal.js.flow +1 -1
- package/lib/redux/connectors/Modal.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js.flow +1 -1
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/Notification.js.flow +1 -1
- package/lib/redux/connectors/Notification.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js.flow +2 -2
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/Preferences.js.flow +3 -3
- package/lib/redux/connectors/Preferences.js.map +1 -1
- package/lib/redux/connectors/Progress.js.flow +1 -1
- package/lib/redux/connectors/Progress.js.map +1 -1
- package/lib/redux/connectors/ProgressIndicator.js.flow +1 -1
- package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js.flow +2 -2
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- 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 +1 -1
- package/lib/redux/connectors/SignOut.js.map +1 -1
- package/lib/redux/connectors/Tab.js.flow +1 -1
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.js.flow +1 -1
- package/lib/redux/reducers/AuthReducer.js.map +1 -1
- package/lib/redux/reducers/ErrorReducer.js.flow +1 -1
- package/lib/redux/reducers/ErrorReducer.js.map +1 -1
- package/lib/redux/reducers/ModalsReducer.js.flow +1 -1
- package/lib/redux/reducers/ModalsReducer.js.map +1 -1
- package/lib/redux/reducers/NotificationReducer.js.flow +1 -1
- package/lib/redux/reducers/NotificationReducer.js.map +1 -1
- package/lib/redux/reducers/PreferencesReducer.js.flow +1 -1
- package/lib/redux/reducers/PreferencesReducer.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/__tests__/AuthReducer.spec.js.flow +10 -10
- package/lib/redux/reducers/__tests__/ErrorReducer.spec.js.flow +1 -1
- package/lib/redux/reducers/__tests__/ModalsReducer.spec.js.flow +3 -3
- package/lib/redux/reducers/__tests__/NotificationReducer.spec.js.flow +3 -3
- package/lib/redux/reducers/__tests__/PreferencesReducer.spec.js.flow +2 -2
- package/lib/redux/reducers/__tests__/ProgressIndicatorReducer.spec.js.flow +8 -8
- package/lib/redux/store/beforeRenderHooks.js.flow +1 -1
- package/lib/redux/store/beforeRenderHooks.js.map +1 -1
- package/lib/redux/store/configureStore.js.flow +3 -3
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/utils/browser/Cookies.js.flow +1 -1
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/browser/__tests__/Cookies.spec.js.flow +1 -1
- package/lib/utils/datetime/DateTimeUtil.js.flow +15 -15
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/datetime/__tests__/DateTime.spec.js.flow +84 -81
- package/lib/utils/fetch/__tests__/xhr.spec.js.flow +2 -2
- package/lib/utils/fetch/universalFetch.js.flow +1 -1
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js.flow +6 -6
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/__tests__/sanitizeHTML.spec.js.flow +8 -8
- package/lib/utils/helpers/sanitizeHtml.js.flow +3 -3
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/helpers/text.js.flow +1 -1
- package/lib/utils/helpers/text.js.map +1 -1
- package/lib/utils/number/DecimalFormat.js.flow +2 -2
- package/lib/utils/number/DecimalFormat.js.map +1 -1
- package/lib/utils/number/__tests__/formatValue.spec.js.flow +1 -1
- package/lib/utils/number/formatValue.js.flow +2 -2
- package/lib/utils/number/formatValue.js.map +1 -1
- package/lib/utils/number/parseNumbers.js.flow +7 -7
- package/lib/utils/number/parseNumbers.js.map +1 -1
- package/package.json +20 -20
- package/src/builder/__tests__/mergeLayoutHintConfigurations.spec.js +4 -4
- package/src/builder/mergeLayoutHintConfigurations.js +3 -3
- package/src/constants/LayoutHints.js +1 -1
- package/src/constants/Settings.js +2 -2
- package/src/exceptions/FetchException.js +2 -2
- package/src/exceptions/NetworkException.js +1 -1
- package/src/exceptions/UnauthorizedException.js +1 -1
- package/src/hooks/__tests__/UseModularUIModel.spec.js +9 -9
- package/src/hooks/__tests__/useAuthentication.spec.js +2 -2
- package/src/hooks/__tests__/useForm.spec.js +2 -2
- package/src/hooks/__tests__/useModelCatalog.spec.js +7 -7
- package/src/hooks/__tests__/useModularUIBasic.spec.js +2 -2
- package/src/hooks/__tests__/usePreference.spec.js +1 -1
- package/src/hooks/useAllFormsOnModel.js +2 -2
- package/src/hooks/useAuthentication.js +2 -2
- package/src/hooks/useContent.js +1 -1
- package/src/hooks/useDeepCompareEffect.js +1 -1
- package/src/hooks/useForm.js +4 -4
- package/src/hooks/useI18n.js +3 -3
- package/src/hooks/useModal.js +2 -2
- package/src/hooks/useModelCatalog.js +1 -1
- package/src/hooks/useModularUI.js +1 -1
- package/src/hooks/useModularUIBasic.js +1 -1
- package/src/hooks/useModularUIModel.js +1 -1
- package/src/hooks/useModularUIRequest.js +1 -1
- package/src/hooks/useNotification.js +2 -2
- package/src/hooks/usePreference.js +17 -7
- package/src/i18n/Locale.js +4 -4
- package/src/i18n/Locales.js +8 -8
- package/src/i18n/Message.js +2 -2
- package/src/i18n/__tests__/Locale.spec.js +3 -3
- package/src/i18n/__tests__/Locales.spec.js +15 -13
- package/src/i18n/withMessage.js +4 -4
- package/src/models/actions/ActionCollection.js +4 -4
- package/src/models/actions/ActionModel.js +4 -4
- package/src/models/actions/__tests__/ActionCollection.spec.js +3 -3
- package/src/models/actions/__tests__/ActionModel.spec.js +1 -1
- package/src/models/application/ApplicationModel.js +3 -3
- package/src/models/attributes/AttributeCollection.js +7 -7
- package/src/models/attributes/AttributeContent.js +9 -9
- package/src/models/attributes/AttributeDataHelper.js +9 -9
- package/src/models/attributes/AttributeModel.js +24 -24
- package/src/models/attributes/AttributeSetModel.js +1 -1
- package/src/models/attributes/BooleanAttributeModel.js +4 -4
- package/src/models/attributes/ChoiceAttributeModel.js +7 -7
- package/src/models/attributes/ChoiceAttributeOptionCollection.js +15 -15
- package/src/models/attributes/ChoiceAttributeOptionModel.js +19 -11
- package/src/models/attributes/CompositeAttributeChildCollection.js +10 -10
- package/src/models/attributes/CompositeAttributeModel.js +7 -7
- package/src/models/attributes/DatetimeAttributeModel.js +6 -6
- package/src/models/attributes/NumberAttributeModel.js +9 -9
- package/src/models/attributes/PasswordAttributeModel.js +8 -8
- package/src/models/attributes/StringAttributeModel.js +3 -3
- package/src/models/attributes/UploadAttributeModel.js +5 -5
- package/src/models/attributes/__tests__/AttributeCollection.spec.js +11 -11
- package/src/models/attributes/__tests__/AttributeContent.spec.js +7 -7
- package/src/models/attributes/__tests__/AttributeModel.spec.js +5 -5
- package/src/models/attributes/__tests__/AttributeSetModel.spec.js +2 -2
- package/src/models/attributes/__tests__/BooleanAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/ChoiceAttributeModel.spec.js +8 -8
- package/src/models/attributes/__tests__/ChoiceAttributeOptionCollection.spec.js +8 -8
- package/src/models/attributes/__tests__/ChoiceAttributeOptionModel.spec.js +1 -1
- package/src/models/attributes/__tests__/DateAttributeModel.spec.js +4 -4
- package/src/models/attributes/__tests__/DatetimeAttributeModel.spec.js +11 -11
- package/src/models/attributes/__tests__/HelptextAttributeModel.spec.js +3 -3
- package/src/models/attributes/__tests__/MemoAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/MoneyAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/NumberAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/PasswordAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/StringAttributeModel.spec.js +4 -4
- package/src/models/attributes/__tests__/TimeAttributeModel.spec.js +2 -2
- package/src/models/attributes/__tests__/TimestampModel.spec.js +2 -2
- package/src/models/attributes/__tests__/UploadAttributeModel.spec.js +4 -4
- package/src/models/attributes/__tests__/_createAttribute.spec.js +6 -6
- package/src/models/attributes/__tests__/createAttributeComposite.spec.js +3 -3
- package/src/models/attributes/__tests__/createAttributeDynamicSchema.spec.js +3 -3
- package/src/models/attributes/_createAttribute.js +5 -5
- package/src/models/attributes/input-constraints/ConstraintCollection.js +5 -5
- package/src/models/attributes/input-constraints/ConstraintModel.js +1 -1
- package/src/models/attributes/input-constraints/DateBoundaryConstraint.js +6 -6
- package/src/models/attributes/input-constraints/MandatoryConstraint.js +1 -1
- package/src/models/attributes/input-constraints/NumberBoundaryConstraint.js +6 -6
- package/src/models/attributes/input-constraints/NumberFormatConstraint.js +2 -2
- package/src/models/attributes/input-constraints/NumberGroupingConstraint.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/ConstraintModel.spec.js +1 -1
- package/src/models/attributes/input-constraints/__tests__/DateBoundaryConstraint.spec.js +6 -6
- package/src/models/attributes/input-constraints/__tests__/DateTimeDateFormatConstraint.spec.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/DateTimeTimeFormatConstraint.spec.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/DatetimeFormatConstraint.spec.js +5 -5
- package/src/models/attributes/input-constraints/__tests__/NumberBoundaryConstraint.spec.js +6 -6
- package/src/models/attributes/input-constraints/__tests__/NumberFormatConstraint.spec.js +3 -3
- package/src/models/attributes/input-constraints/__tests__/NumberGroupingConstraint.spec.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/RegexConstraint.spec.js +1 -1
- package/src/models/attributes/input-constraints/__tests__/StringLengthConstraint.spec.js +4 -4
- package/src/models/attributes/layouthint-rules/BaseLayoutHintRule.js +4 -4
- package/src/models/attributes/layouthint-rules/DependentAttribute.js +15 -15
- package/src/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +2 -2
- package/src/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +2 -2
- package/src/models/attributes/layouthint-rules/__tests__/DependentAttribute.spec.js +22 -22
- package/src/models/attributes/layouthint-rules/__tests__/LayoutHintRuleCollection.spec.js +1 -1
- package/src/models/attributes/layouthint-rules/__tests__/RemainingTotalUploadSize.spec.js +4 -4
- package/src/models/base/BaseCollection.js +6 -6
- package/src/models/base/BaseModel.js +1 -1
- package/src/models/base/ResourceModel.js +5 -5
- package/src/models/base/__tests__/ResourceCollection.spec.js +1 -1
- package/src/models/caseview/CaseViewModel.js +4 -4
- package/src/models/caseview/__tests__/CaseViewModel.spec.js +3 -3
- package/src/models/concepts/BusinessScenarioModel.js +9 -9
- package/src/models/concepts/ConceptDetailModel.js +17 -17
- package/src/models/concepts/ConceptIndexModel.js +2 -2
- package/src/models/concepts/ConceptLinkModel.js +6 -4
- package/src/models/concepts/ConceptRelationCollection.js +5 -5
- package/src/models/concepts/SourceReferenceCollection.js +2 -2
- package/src/models/concepts/SourceReferenceModel.js +2 -2
- package/src/models/concepts/__tests__/ConceptDetailModel.spec.js +1 -1
- package/src/models/content/ContentIndexModel.js +3 -3
- package/src/models/content/ContentLinkModel.js +11 -9
- package/src/models/content/ContentModel.js +2 -2
- package/src/models/content/ContentTOCModel.js +4 -4
- package/src/models/content/SectionModel.js +4 -4
- package/src/models/content/SubSectionModel.js +2 -2
- package/src/models/content/__tests__/ContentModel.spec.js +16 -16
- package/src/models/contentconfiguration/ContentConfiguration.js +1 -1
- package/src/models/contentconfiguration/ContentConfigurationElements.js +5 -5
- package/src/models/contentconfiguration/ContentConfigurationEndResults.js +1 -1
- package/src/models/contentconfiguration/ContentConfigurationQuestions.js +2 -2
- package/src/models/contentconfiguration/__tests__/ContentConfigurationResults.spec.js +12 -12
- package/src/models/detail/DetailModel.js +5 -5
- package/src/models/error/ErrorCollection.js +4 -4
- package/src/models/error/ErrorModel.js +1 -1
- package/src/models/error/__tests__/ErrorModel.spec.js +1 -1
- package/src/models/filters/AssignmentFilterModel.js +3 -3
- package/src/models/filters/BaseFilterModel.js +3 -3
- package/src/models/filters/FilterCollection.js +5 -5
- package/src/models/filters/__tests__/AssignmentFilterModel.spec.js +4 -4
- package/src/models/filters/__tests__/FilterCollection.spec.js +11 -11
- package/src/models/filters/__tests__/FilterModel.spec.js +1 -1
- package/src/models/filters/__tests__/RangeFilterModel.spec.js +1 -1
- package/src/models/form/FormModel.js +39 -39
- package/src/models/form/FormObjectModel.js +16 -16
- package/src/models/form/__tests__/FormModel.instrument.spec.js +7 -7
- package/src/models/form/__tests__/FormModel.repeating.spec.js +2 -2
- package/src/models/form/__tests__/FormModel.selfhref.spec.js +1 -1
- package/src/models/form/__tests__/FormModel.spec.js +6 -6
- package/src/models/form/__tests__/FormResultData.spec.js +1 -1
- package/src/models/form/__tests__/FormWithContent.spec.js +3 -3
- package/src/models/grouping/GroupingModel.js +7 -7
- package/src/models/grouping/__tests__/GroupingModel.spec.js +2 -2
- package/src/models/href/Href.js +6 -6
- package/src/models/href/__tests__/Href.spec.js +18 -16
- package/src/models/layouthint/LayoutHintCollection.js +3 -3
- package/src/models/links/LinkCollection.js +4 -4
- package/src/models/links/LinkModel.js +3 -3
- package/src/models/links/__tests__/LinkModel.spec.js +4 -4
- package/src/models/links/normalizeLinkJSON.js +6 -6
- package/src/models/list/ListDetailModel.js +7 -7
- package/src/models/list/ListItemCollection.js +2 -2
- package/src/models/list/ListItemModel.js +2 -2
- package/src/models/list/ListModel.js +6 -6
- package/src/models/list/__tests__/ListDetailModel.spec.js +4 -4
- package/src/models/list/__tests__/ListItemCollection.spec.js +1 -1
- package/src/models/list/__tests__/ListModel.spec.js +3 -3
- package/src/models/list/__tests__/ListResultDetail.spec.js +3 -3
- package/src/models/lookup/LookupOptionCollection.js +1 -1
- package/src/models/lookup/LookupOptionsModel.js +4 -4
- package/src/models/lookup/__tests__/LookupOptionsModel.spec.js +3 -3
- package/src/models/modelcatalog/ModelCatalogModel.js +2 -2
- package/src/models/paging/PagingModel.js +1 -1
- package/src/models/paging/__tests__/PagingModel.spec.js +2 -2
- package/src/models/panels/GroupingPanelModel.js +5 -5
- package/src/models/panels/__tests__/GroupingPanelModel.spec.js +8 -8
- package/src/models/parameter/__tests__/Parameter.spec.js +5 -5
- package/src/models/process/ProcessStatusSettingsModel.js +1 -1
- package/src/models/process/__tests__/ProcessStatusSettingsModel.spec.js +1 -1
- package/src/models/resolveModel.js +4 -4
- package/src/models/sorting/SortingModel.js +4 -4
- package/src/models/sorting/__tests__/SortingModel.spec.js +3 -3
- package/src/models/tab/TabModel.js +3 -3
- package/src/models/tab/__tests__/TabModel.spec.js +5 -5
- package/src/models/taskgroup/TaskGroupModel.js +2 -2
- package/src/models/types.js +1 -1
- package/src/models/user/UserProfileModel.js +1 -1
- package/src/models/user/__tests__/UserModel.spec.js +2 -2
- package/src/models/user/__tests__/UserProfileModel.spec.js +2 -2
- package/src/models/user/__tests__/UserServicesModel.spec.js +1 -1
- package/src/modularui/CaptchaRequest.js +1 -1
- package/src/modularui/ModularUIRequest.js +26 -26
- package/src/modularui/UploadRequest.js +6 -6
- package/src/modularui/__tests__/ModularUIError.spec.js +1 -1
- package/src/modularui/__tests__/ModularUIRequest.spec.js +9 -9
- package/src/react/utils.js +1 -1
- package/src/react-client/client.js +11 -10
- package/src/react-client/contextPath.js +2 -2
- package/src/react-client/rehydrate.js +1 -1
- package/src/react-server/__tests__/serverUtil.spec.js +2 -2
- package/src/react-server/createSSRComplete.js +3 -3
- package/src/react-server/renderSSRComplete.js +4 -4
- package/src/react-server/renderSSRMinimal.js +1 -1
- package/src/react-server/requestInformation.js +2 -2
- package/src/react-server/serverUtil.js +8 -8
- package/src/react-theme/__tests__/createTheme.spec.js +4 -4
- package/src/react-theme/createTheme.js +1 -1
- package/src/react-theme/utils/__tests__/background.spec.js +2 -2
- package/src/react-theme/utils/__tests__/contrast.spec.js +1 -1
- package/src/react-theme/utils/__tests__/corners.spec.js +3 -3
- package/src/react-theme/utils/__tests__/spacers.spec.js +1 -1
- package/src/react-theme/utils/__tests__/themeProps.spec.js +9 -9
- package/src/react-theme/utils/colors.js +3 -3
- package/src/react-theme/utils/contrast.js +6 -6
- package/src/react-theme/utils/corners.js +2 -2
- package/src/react-theme/utils/spacers.js +2 -2
- package/src/react-theme/utils/themeProps.js +8 -8
- package/src/redux/_i18n/I18nActions.js +1 -1
- package/src/redux/_i18n/I18nReducer.js +2 -2
- package/src/redux/_i18n/__tests__/reducer.spec.js +2 -2
- package/src/redux/_modularui/ModularUIActions.js +8 -8
- package/src/redux/_modularui/ModularUIConnector.js +4 -4
- package/src/redux/_modularui/ModularUIMiddleware.js +6 -6
- package/src/redux/_modularui/ModularUIReducer.js +5 -5
- package/src/redux/_modularui/ModularUISelectors.js +11 -11
- package/src/redux/_modularui/ModularUIUtils.js +1 -1
- package/src/redux/_modularui/__tests__/actions.spec.js +1 -1
- package/src/redux/_modularui/__tests__/reducer.spec.js +13 -13
- package/src/redux/_modularui/__tests__/selectors.spec.js +3 -3
- package/src/redux/_modularui/types.js +4 -4
- package/src/redux/_modularui/withModularUI.js +3 -3
- package/src/redux/_router/RouterActions.js +3 -3
- package/src/redux/_router/RouterConnectors.js +5 -5
- package/src/redux/_router/RouterReducer.js +1 -1
- package/src/redux/_router/__tests__/reducer.spec.js +2 -2
- package/src/redux/actions/Application.js +1 -1
- package/src/redux/actions/Authorization.js +1 -1
- package/src/redux/actions/Error.js +3 -3
- package/src/redux/actions/FormAttributeSet.js +2 -2
- package/src/redux/actions/FormAttributeSetRepeatable.js +3 -3
- package/src/redux/actions/FormAutosave.js +1 -1
- package/src/redux/actions/FormAutosubmit.js +1 -1
- package/src/redux/actions/FormValidations.js +3 -3
- package/src/redux/actions/Notification.js +4 -4
- package/src/redux/actions/Preferences.js +11 -11
- package/src/redux/actions/ProgressIndicator.js +1 -1
- package/src/redux/actions/SignIn.js +3 -3
- package/src/redux/actions/__tests__/Authorization.spec.js +2 -2
- package/src/redux/actions/__tests__/Error-server.spec.js +13 -13
- package/src/redux/actions/__tests__/Error.spec.js +6 -6
- package/src/redux/actions/__tests__/Notification.spec.js +1 -1
- package/src/redux/actions/__tests__/Preferences.spec.js +2 -2
- 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 +2 -2
- package/src/redux/connectors/Form.js +5 -5
- package/src/redux/connectors/FormAttributeSet.js +6 -6
- package/src/redux/connectors/ListDetail.js +1 -1
- package/src/redux/connectors/Modal.js +1 -1
- package/src/redux/connectors/ModelCatalog.js +1 -1
- package/src/redux/connectors/Notification.js +1 -1
- package/src/redux/connectors/PanelRenderer.js +2 -2
- package/src/redux/connectors/Preferences.js +3 -3
- package/src/redux/connectors/Progress.js +1 -1
- package/src/redux/connectors/ProgressIndicator.js +1 -1
- package/src/redux/connectors/QuickSearch.js +2 -2
- package/src/redux/connectors/SignIn.js +1 -1
- package/src/redux/connectors/SignOut.js +1 -1
- package/src/redux/connectors/Tab.js +1 -1
- package/src/redux/reducers/AuthReducer.js +1 -1
- package/src/redux/reducers/ErrorReducer.js +1 -1
- package/src/redux/reducers/ModalsReducer.js +1 -1
- package/src/redux/reducers/NotificationReducer.js +1 -1
- package/src/redux/reducers/PreferencesReducer.js +1 -1
- package/src/redux/reducers/ProgressIndicatorReducer.js +1 -1
- package/src/redux/reducers/__tests__/AuthReducer.spec.js +10 -10
- package/src/redux/reducers/__tests__/ErrorReducer.spec.js +1 -1
- package/src/redux/reducers/__tests__/ModalsReducer.spec.js +3 -3
- package/src/redux/reducers/__tests__/NotificationReducer.spec.js +3 -3
- package/src/redux/reducers/__tests__/PreferencesReducer.spec.js +2 -2
- package/src/redux/reducers/__tests__/ProgressIndicatorReducer.spec.js +8 -8
- package/src/redux/store/beforeRenderHooks.js +1 -1
- package/src/redux/store/configureStore.js +3 -3
- package/src/utils/browser/Cookies.js +1 -1
- package/src/utils/browser/__tests__/Cookies.spec.js +1 -1
- package/src/utils/datetime/DateTimeUtil.js +15 -15
- package/src/utils/datetime/__tests__/DateTime.spec.js +84 -81
- package/src/utils/fetch/__tests__/xhr.spec.js +2 -2
- package/src/utils/fetch/universalFetch.js +1 -1
- package/src/utils/fetch/xhr.js +6 -6
- package/src/utils/helpers/__tests__/sanitizeHTML.spec.js +8 -8
- package/src/utils/helpers/sanitizeHtml.js +3 -3
- package/src/utils/helpers/text.js +1 -1
- package/src/utils/number/DecimalFormat.js +2 -2
- package/src/utils/number/__tests__/formatValue.spec.js +1 -1
- package/src/utils/number/formatValue.js +2 -2
- package/src/utils/number/parseNumbers.js +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Href.js","names":["_constants","require","_Parameter","_interopRequireDefault","_exceptions","Href","constructor","href","resourcetype","_defineProperty2","default","HTTP_METHODS","GET","setFromHref","setFromString","setFromLocationOrObject","path","parameters","hash","state","pathname","_path","search","addParametersFromString","Array","isArray","_parameters","_context","_map","call","param","addParameter","_name","_value","_prefix","getHashFromString","_hash","_state","getPathFromString","isChangePassword","_context2","_includes","isCamelRoute","_startsWith","checkAbsoluteUrl","checkAbsolute","RegExp","test","isExternal","decodedHref","decodeURI","hrefNoHash","substr","indexOf","split","arguments","length","undefined","forEach","paramFromString","Parameter","fromString","setParameter","name","value","prefix","removeParameter","push","getParameter","_context3","_find","hasParameter","method","_method","_context4","_filter","getQuerystring","_context5","_context6","withPrefix","toQuerystring","join","getQuerystringForModularUI","_context7","_context8","isModUIParameter","querystring","setState","_resourcetype","absolutepath","getBasePath","absolutehref","absolutehrefPrefixedQuerystring","startsWith","thisPath","otherPath","equals","equalsWithParameters","_context9","thisParams","toString","every","IllegalArgumentException","isContent","_context10","CONTENT_PATH","toLocation","_default","exports"],"sources":["../../../src/models/href/Href.js"],"sourcesContent":["// @flow\nimport { getBasePath, HTTP_METHODS, CONTENT_PATH } from \"../../constants\";\n\nimport Parameter from \"../parameter/Parameter\";\nimport { IllegalArgumentException } from \"../../exceptions\";\n\nimport type { LocationShape } from \"react-router\";\n\ntype HrefObject = {\n _path: string,\n _hash: string,\n _parameters: Array<Parameter>,\n _resourcetype: string,\n _method: $Keys<typeof HTTP_METHODS>,\n _state: ?{ [key: string]: any },\n pathname: ?string,\n};\n\nexport type HrefInput = Href | HrefObject | LocationShape | string;\n\n/**\n * Defines a Href with the parameters\n */\nclass Href {\n _path: string = \"\";\n _hash: string = \"\";\n _parameters: Array<Parameter> = [];\n _resourcetype: string = \"\";\n _method: $Keys<typeof HTTP_METHODS> = HTTP_METHODS.GET;\n _state: any = null;\n\n /**\n * Create a Href\n */\n constructor(href?: HrefInput, resourcetype?: string) {\n this.resourcetype = resourcetype ?? \"\";\n\n if (href instanceof Href) {\n this.setFromHref(href);\n } else if (typeof href === \"string\") {\n this.setFromString(href);\n } else if (typeof href === \"object\") {\n this.setFromLocationOrObject(href);\n }\n }\n\n /**\n * Set parameters from Href model input\n */\n setFromHref(href: Href) {\n this.path = href.path;\n this.parameters = href.parameters;\n this.hash = href.hash;\n this.state = href.state;\n }\n\n /**\n */\n setFromLocationOrObject(href: LocationShape | HrefObject) {\n if (typeof href[\"pathname\"] === \"string\") {\n this.path = href.pathname;\n } else if (typeof href._path === \"string\") {\n this.path = href._path;\n }\n\n if (href.search) {\n this.addParametersFromString(href.search);\n } else if (Array.isArray(href._parameters)) {\n // $FlowExpectedError[incompatible-call]\n href._parameters.map((param: Parameter) =>\n this.addParameter(param._name, param._value, param._prefix)\n );\n }\n\n if (href.hash) {\n this.hash = Href.getHashFromString(href.hash);\n } else if (typeof href._hash === \"string\") {\n this.hash = href._hash;\n }\n\n if (href.state) {\n this.state = href.state || null;\n } else if (typeof href._state === \"object\") {\n this.state = href._state;\n }\n }\n\n /**\n * Set parameters from string input\n */\n setFromString(href: string) {\n this.path = Href.getPathFromString(href);\n this.addParametersFromString(href);\n this.hash = Href.getHashFromString(href);\n }\n\n /**\n */\n get isChangePassword(): boolean {\n return this._path.includes(\"/change-password\");\n }\n\n /**\n * check if the path is referencing a camel route\n */\n static isCamelRoute(path: string): boolean {\n return (\n path.startsWith(\"/restServices\") && !path.startsWith(\"/restServices/ui\")\n );\n }\n\n /**\n */\n static checkAbsoluteUrl(href: string): boolean {\n const checkAbsolute = new RegExp(\"^(?:[a-z]+:)?//\", \"i\");\n return checkAbsolute.test(href);\n }\n\n // Check if url is relative (not checking for absolute urls with same domain)\n /**\n */\n get isExternal(): boolean {\n return Href.checkAbsoluteUrl(this.path);\n }\n\n /**\n * Retrieve the relative path part of a href string, e.g. https://www.beinformed.com/BeInformed/tab/view?q=url => /tab/view\n */\n static getPathFromString(href: string): string {\n const decodedHref = decodeURI(href);\n\n const hrefNoHash = decodedHref.includes(\"#\")\n ? decodedHref.substr(0, decodedHref.indexOf(\"#\"))\n : decodedHref;\n\n return hrefNoHash.includes(\"?\") ? hrefNoHash.split(\"?\")[0] : hrefNoHash;\n }\n\n /**\n * Retrieve hash of href string\n */\n static getHashFromString(href: string = \"\"): string {\n return href.includes(\"#\") ? href.substr(href.indexOf(\"#\") + 1) : \"\";\n }\n\n /**\n * Add a parameter for each parameter found in the querystring of an URL string, e.g. https://www.beinformed.com?q=url => q=url\n */\n addParametersFromString(href: string): Href {\n if (href.includes(\"?\")) {\n href\n .split(\"?\")[1]\n .split(\"&\")\n .forEach((param) => {\n const paramFromString = Parameter.fromString(param);\n if (paramFromString) {\n this.setParameter(\n paramFromString.name,\n paramFromString.value,\n paramFromString.prefix\n );\n }\n });\n }\n\n return this;\n }\n\n /**\n * Add a querystring parameter to the parameter collection of this Href, skips parameters that have a value of null\n */\n addParameter(name: string, value: ?string, prefix: ?string): Href {\n if (value !== null) {\n this.removeParameter(name, prefix);\n this._parameters.push(new Parameter(prefix, name, value));\n }\n\n return this;\n }\n\n /**\n * Adds or overwrites a parameter when it exists and value is not null.\n * Removes the parameter when the value is null\n */\n setParameter(name: string, value: ?string, prefix: ?string): Href {\n if (value === null) {\n this.removeParameter(name, prefix);\n } else {\n this.addParameter(name, value, prefix);\n }\n\n return this;\n }\n\n /**\n * Retrieve a parameter by it's name and (optionally) prefix\n */\n getParameter(name: string, prefix: ?string): ?Parameter {\n return this._parameters.find(\n (param) => param.prefix === prefix && param.name === name\n );\n }\n\n /**\n */\n hasParameter(name: string, prefix: ?string): boolean {\n return this.getParameter(name, prefix) !== undefined;\n }\n\n /**\n * Get request method\n */\n get method(): $Keys<typeof HTTP_METHODS> {\n return this._method;\n }\n\n /**\n * Set request method\n */\n set method(method: $Keys<typeof HTTP_METHODS>) {\n this._method = method || HTTP_METHODS.GET;\n }\n\n /**\n * Retrieve all paremters\n */\n get parameters(): Array<Parameter> {\n return this._parameters;\n }\n\n /**\n * Replace parameters of Href\n */\n set parameters(parameters: Array<Parameter>) {\n this._parameters = parameters;\n }\n\n /**\n * Remove a parameter from the parameter collection\n */\n removeParameter(name: string, prefix: ?string): Href {\n this._parameters = this._parameters.filter(\n (param) => param.prefix !== prefix || param.name !== name\n );\n\n return this;\n }\n\n /**\n * Get the parameters as a querystring, e.g. param1=value1¶m2=value2, optionally with prefix\n */\n getQuerystring(withPrefix: boolean = false): string {\n return this.parameters\n .filter((param) => param.value != null)\n .map((param) => param.toQuerystring(withPrefix))\n .join(\"&\");\n }\n\n /**\n * Retrieve a querystring that only contains parameter that can be send to the modular ui, parameters are filtered by prefix\n */\n getQuerystringForModularUI(prefix: string = \"\"): string {\n return this.parameters\n .filter(\n (param) =>\n param.isModUIParameter &&\n (!prefix || !param.prefix || param.prefix === prefix) &&\n param.value != null\n )\n .map((param) => param.toQuerystring(false))\n .join(\"&\");\n }\n\n /**\n * Retrieve all parameters from the parameter collection in a querystring style name1=value1&name2=value2, without the prefix\n */\n get querystring(): string {\n return this.getQuerystring(false);\n }\n\n /**\n * Set the path of the Href, the part before the querystring question mark\n */\n set path(path: string) {\n this._path = path;\n }\n\n /**\n * Retrieve the path\n */\n get path(): string {\n return this._path || \"\";\n }\n\n /**\n * Set hash\n */\n set hash(hash: string) {\n this._hash = hash;\n }\n\n /**\n * Retrieve hash\n */\n get hash(): string {\n return this._hash;\n }\n\n /**\n */\n set state(state: any) {\n this._state = state;\n }\n\n /**\n */\n get state(): any {\n return this._state;\n }\n\n /**\n */\n setState(state: any): Href {\n this.state = state;\n\n return this;\n }\n\n /**\n * Set resourctype\n */\n set resourcetype(resourcetype: string) {\n this._resourcetype = resourcetype;\n }\n\n /**\n * Retrieve resourceType\n */\n get resourcetype(): string {\n return this._resourcetype;\n }\n\n /**\n * Retrieve the path combined with the base path (context-path) of the application, e.g. /BeInformed\n */\n get absolutepath(): string {\n if (this.isExternal) {\n return this.path;\n }\n\n return getBasePath() + this.path;\n }\n\n /**\n * Retrieves the combination of the path and the querystring\n */\n get href(): string {\n return this.querystring.length > 0\n ? [this.path, this.querystring].join(\"?\")\n : this.path;\n }\n\n /**\n * Getting the URL including the base path, querystring is prefixed\n */\n get absolutehref(): string {\n const querystring = this.getQuerystring(false);\n\n return querystring.length > 0\n ? [this.absolutepath, querystring].join(\"?\")\n : this.absolutepath;\n }\n\n /**\n * Getting the URL including the base path, the querystring is prefixed\n */\n get absolutehrefPrefixedQuerystring(): string {\n const querystring = this.getQuerystring(true);\n\n return querystring.length > 0\n ? [this.absolutepath, querystring].join(\"?\")\n : this.absolutepath;\n }\n\n /**\n * Checks if the URL starts within the given href\n */\n startsWith(href: Href | string): boolean {\n const thisPath = `${this.path}/`;\n const otherPath = href instanceof Href ? `${href.path}/` : href;\n\n return thisPath.startsWith(otherPath);\n }\n\n /**\n * Checks if the given Href equals this Href\n */\n equals(href: Href | string): boolean {\n if (href instanceof Href) {\n return this.path === href.path;\n }\n\n return this.path === href;\n }\n\n /**\n */\n equalsWithParameters(href: Href): boolean {\n if (!this.equals(href)) {\n return false;\n }\n\n if (href instanceof Href) {\n if (this.parameters.length !== href.parameters.length) {\n return false;\n }\n\n if (this.parameters.length === 0 && href.parameters.length === 0) {\n return true;\n }\n\n const thisParams = this.parameters.map((param) => param.toString());\n\n return href.parameters.every((param) =>\n thisParams.includes(param.toString())\n );\n }\n\n throw new IllegalArgumentException(`${href} is not an instance of Href`);\n }\n\n /**\n * Indicates if the link is a content link\n */\n get isContent(): boolean {\n return this.absolutepath.startsWith(`${getBasePath()}${CONTENT_PATH}`);\n }\n\n /**\n * Returns a complete url from the Href\n */\n toString(): string {\n return this.href;\n }\n\n /**\n */\n toLocation(): LocationShape {\n return {\n pathname: this.path,\n search: this.querystring.length > 0 ? `?${this.querystring}` : \"\",\n hash: this.hash.length > 0 ? `#${this.hash}` : \"\",\n state: this.state,\n };\n }\n}\n\nexport default Href;\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAgBA;AACA;AACA;AACA,MAAMI,IAAI,CAAC;EAQT;AACF;AACA;EACEC,WAAWA,CAACC,IAAgB,EAAEC,YAAqB,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA,iBAVrC,EAAE;IAAA,IAAAD,gBAAA,CAAAC,OAAA,iBACF,EAAE;IAAA,IAAAD,gBAAA,CAAAC,OAAA,uBACc,EAAE;IAAA,IAAAD,gBAAA,CAAAC,OA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,IAAI,CAAC8B,WAAY,EAAC,GAAG,EAAE;MACjEpE,IAAI,EAAE,IAAI,CAACA,IAAI,CAACsC,MAAM,GAAG,CAAC,GAAI,IAAG,IAAI,CAACtC,IAAK,EAAC,GAAG,EAAE;MACjDC,KAAK,EAAE,IAAI,CAACA;IACd,CAAC;EACH;AACF;AAAC,IAAAwF,QAAA,GAEctG,IAAI;AAAAuG,OAAA,CAAAlG,OAAA,GAAAiG,QAAA"}
|
|
1
|
+
{"version":3,"file":"Href.js","names":["_constants","require","_Parameter","_interopRequireDefault","_exceptions","Href","constructor","href","resourcetype","_defineProperty2","default","HTTP_METHODS","GET","setFromHref","setFromString","setFromLocationOrObject","path","parameters","hash","state","pathname","_path","search","addParametersFromString","Array","isArray","_parameters","_context","_map","call","param","addParameter","_name","_value","_prefix","getHashFromString","_hash","_state","getPathFromString","isChangePassword","_context2","_includes","isCamelRoute","_startsWith","checkAbsoluteUrl","checkAbsolute","RegExp","test","isExternal","decodedHref","decodeURI","hrefNoHash","substr","indexOf","split","arguments","length","undefined","forEach","paramFromString","Parameter","fromString","setParameter","name","value","prefix","removeParameter","push","getParameter","_context3","_find","hasParameter","method","_method","_context4","_filter","getQuerystring","_context5","_context6","withPrefix","toQuerystring","join","getQuerystringForModularUI","_context7","_context8","isModUIParameter","querystring","setState","_resourcetype","absolutepath","getBasePath","absolutehref","absolutehrefPrefixedQuerystring","startsWith","thisPath","otherPath","equals","equalsWithParameters","_context9","thisParams","toString","every","IllegalArgumentException","isContent","_context10","CONTENT_PATH","toLocation","_default","exports"],"sources":["../../../src/models/href/Href.js"],"sourcesContent":["// @flow\nimport { getBasePath, HTTP_METHODS, CONTENT_PATH } from \"../../constants\";\n\nimport Parameter from \"../parameter/Parameter\";\nimport { IllegalArgumentException } from \"../../exceptions\";\n\nimport type { LocationShape } from \"react-router\";\n\ntype HrefObject = {\n _path: string,\n _hash: string,\n _parameters: Array<Parameter>,\n _resourcetype: string,\n _method: $Keys<typeof HTTP_METHODS>,\n _state: ?{ [key: string]: any },\n pathname: ?string,\n};\n\nexport type HrefInput = Href | HrefObject | LocationShape | string;\n\n/**\n * Defines a Href with the parameters\n */\nclass Href {\n _path: string = \"\";\n _hash: string = \"\";\n _parameters: Array<Parameter> = [];\n _resourcetype: string = \"\";\n _method: $Keys<typeof HTTP_METHODS> = HTTP_METHODS.GET;\n _state: any = null;\n\n /**\n * Create a Href\n */\n constructor(href?: HrefInput, resourcetype?: string) {\n this.resourcetype = resourcetype ?? \"\";\n\n if (href instanceof Href) {\n this.setFromHref(href);\n } else if (typeof href === \"string\") {\n this.setFromString(href);\n } else if (typeof href === \"object\") {\n this.setFromLocationOrObject(href);\n }\n }\n\n /**\n * Set parameters from Href model input\n */\n setFromHref(href: Href) {\n this.path = href.path;\n this.parameters = href.parameters;\n this.hash = href.hash;\n this.state = href.state;\n }\n\n /**\n */\n setFromLocationOrObject(href: LocationShape | HrefObject) {\n if (typeof href[\"pathname\"] === \"string\") {\n this.path = href.pathname;\n } else if (typeof href._path === \"string\") {\n this.path = href._path;\n }\n\n if (href.search) {\n this.addParametersFromString(href.search);\n } else if (Array.isArray(href._parameters)) {\n // $FlowExpectedError[incompatible-call]\n href._parameters.map((param: Parameter) =>\n this.addParameter(param._name, param._value, param._prefix),\n );\n }\n\n if (href.hash) {\n this.hash = Href.getHashFromString(href.hash);\n } else if (typeof href._hash === \"string\") {\n this.hash = href._hash;\n }\n\n if (href.state) {\n this.state = href.state || null;\n } else if (typeof href._state === \"object\") {\n this.state = href._state;\n }\n }\n\n /**\n * Set parameters from string input\n */\n setFromString(href: string) {\n this.path = Href.getPathFromString(href);\n this.addParametersFromString(href);\n this.hash = Href.getHashFromString(href);\n }\n\n /**\n */\n get isChangePassword(): boolean {\n return this._path.includes(\"/change-password\");\n }\n\n /**\n * check if the path is referencing a camel route\n */\n static isCamelRoute(path: string): boolean {\n return (\n path.startsWith(\"/restServices\") && !path.startsWith(\"/restServices/ui\")\n );\n }\n\n /**\n */\n static checkAbsoluteUrl(href: string): boolean {\n const checkAbsolute = new RegExp(\"^(?:[a-z]+:)?//\", \"i\");\n return checkAbsolute.test(href);\n }\n\n // Check if url is relative (not checking for absolute urls with same domain)\n /**\n */\n get isExternal(): boolean {\n return Href.checkAbsoluteUrl(this.path);\n }\n\n /**\n * Retrieve the relative path part of a href string, e.g. https://www.beinformed.com/BeInformed/tab/view?q=url => /tab/view\n */\n static getPathFromString(href: string): string {\n const decodedHref = decodeURI(href);\n\n const hrefNoHash = decodedHref.includes(\"#\")\n ? decodedHref.substr(0, decodedHref.indexOf(\"#\"))\n : decodedHref;\n\n return hrefNoHash.includes(\"?\") ? hrefNoHash.split(\"?\")[0] : hrefNoHash;\n }\n\n /**\n * Retrieve hash of href string\n */\n static getHashFromString(href: string = \"\"): string {\n return href.includes(\"#\") ? href.substr(href.indexOf(\"#\") + 1) : \"\";\n }\n\n /**\n * Add a parameter for each parameter found in the querystring of an URL string, e.g. https://www.beinformed.com?q=url => q=url\n */\n addParametersFromString(href: string): Href {\n if (href.includes(\"?\")) {\n href\n .split(\"?\")[1]\n .split(\"&\")\n .forEach((param) => {\n const paramFromString = Parameter.fromString(param);\n if (paramFromString) {\n this.setParameter(\n paramFromString.name,\n paramFromString.value,\n paramFromString.prefix,\n );\n }\n });\n }\n\n return this;\n }\n\n /**\n * Add a querystring parameter to the parameter collection of this Href, skips parameters that have a value of null\n */\n addParameter(name: string, value: ?string, prefix: ?string): Href {\n if (value !== null) {\n this.removeParameter(name, prefix);\n this._parameters.push(new Parameter(prefix, name, value));\n }\n\n return this;\n }\n\n /**\n * Adds or overwrites a parameter when it exists and value is not null.\n * Removes the parameter when the value is null\n */\n setParameter(name: string, value: ?string, prefix: ?string): Href {\n if (value === null) {\n this.removeParameter(name, prefix);\n } else {\n this.addParameter(name, value, prefix);\n }\n\n return this;\n }\n\n /**\n * Retrieve a parameter by it's name and (optionally) prefix\n */\n getParameter(name: string, prefix: ?string): ?Parameter {\n return this._parameters.find(\n (param) => param.prefix === prefix && param.name === name,\n );\n }\n\n /**\n */\n hasParameter(name: string, prefix: ?string): boolean {\n return this.getParameter(name, prefix) !== undefined;\n }\n\n /**\n * Get request method\n */\n get method(): $Keys<typeof HTTP_METHODS> {\n return this._method;\n }\n\n /**\n * Set request method\n */\n set method(method: $Keys<typeof HTTP_METHODS>) {\n this._method = method || HTTP_METHODS.GET;\n }\n\n /**\n * Retrieve all paremters\n */\n get parameters(): Array<Parameter> {\n return this._parameters;\n }\n\n /**\n * Replace parameters of Href\n */\n set parameters(parameters: Array<Parameter>) {\n this._parameters = parameters;\n }\n\n /**\n * Remove a parameter from the parameter collection\n */\n removeParameter(name: string, prefix: ?string): Href {\n this._parameters = this._parameters.filter(\n (param) => param.prefix !== prefix || param.name !== name,\n );\n\n return this;\n }\n\n /**\n * Get the parameters as a querystring, e.g. param1=value1¶m2=value2, optionally with prefix\n */\n getQuerystring(withPrefix: boolean = false): string {\n return this.parameters\n .filter((param) => param.value != null)\n .map((param) => param.toQuerystring(withPrefix))\n .join(\"&\");\n }\n\n /**\n * Retrieve a querystring that only contains parameter that can be send to the modular ui, parameters are filtered by prefix\n */\n getQuerystringForModularUI(prefix: string = \"\"): string {\n return this.parameters\n .filter(\n (param) =>\n param.isModUIParameter &&\n (!prefix || !param.prefix || param.prefix === prefix) &&\n param.value != null,\n )\n .map((param) => param.toQuerystring(false))\n .join(\"&\");\n }\n\n /**\n * Retrieve all parameters from the parameter collection in a querystring style name1=value1&name2=value2, without the prefix\n */\n get querystring(): string {\n return this.getQuerystring(false);\n }\n\n /**\n * Set the path of the Href, the part before the querystring question mark\n */\n set path(path: string) {\n this._path = path;\n }\n\n /**\n * Retrieve the path\n */\n get path(): string {\n return this._path || \"\";\n }\n\n /**\n * Set hash\n */\n set hash(hash: string) {\n this._hash = hash;\n }\n\n /**\n * Retrieve hash\n */\n get hash(): string {\n return this._hash;\n }\n\n /**\n */\n set state(state: any) {\n this._state = state;\n }\n\n /**\n */\n get state(): any {\n return this._state;\n }\n\n /**\n */\n setState(state: any): Href {\n this.state = state;\n\n return this;\n }\n\n /**\n * Set resourctype\n */\n set resourcetype(resourcetype: string) {\n this._resourcetype = resourcetype;\n }\n\n /**\n * Retrieve resourceType\n */\n get resourcetype(): string {\n return this._resourcetype;\n }\n\n /**\n * Retrieve the path combined with the base path (context-path) of the application, e.g. /BeInformed\n */\n get absolutepath(): string {\n if (this.isExternal) {\n return this.path;\n }\n\n return getBasePath() + this.path;\n }\n\n /**\n * Retrieves the combination of the path and the querystring\n */\n get href(): string {\n return this.querystring.length > 0\n ? [this.path, this.querystring].join(\"?\")\n : this.path;\n }\n\n /**\n * Getting the URL including the base path, querystring is prefixed\n */\n get absolutehref(): string {\n const querystring = this.getQuerystring(false);\n\n return querystring.length > 0\n ? [this.absolutepath, querystring].join(\"?\")\n : this.absolutepath;\n }\n\n /**\n * Getting the URL including the base path, the querystring is prefixed\n */\n get absolutehrefPrefixedQuerystring(): string {\n const querystring = this.getQuerystring(true);\n\n return querystring.length > 0\n ? [this.absolutepath, querystring].join(\"?\")\n : this.absolutepath;\n }\n\n /**\n * Checks if the URL starts within the given href\n */\n startsWith(href: Href | string): boolean {\n const thisPath = `${this.path}/`;\n const otherPath = href instanceof Href ? `${href.path}/` : href;\n\n return thisPath.startsWith(otherPath);\n }\n\n /**\n * Checks if the given Href equals this Href\n */\n equals(href: Href | string): boolean {\n if (href instanceof Href) {\n return this.path === href.path;\n }\n\n return this.path === href;\n }\n\n /**\n */\n equalsWithParameters(href: Href): boolean {\n if (!this.equals(href)) {\n return false;\n }\n\n if (href instanceof Href) {\n if (this.parameters.length !== href.parameters.length) {\n return false;\n }\n\n if (this.parameters.length === 0 && href.parameters.length === 0) {\n return true;\n }\n\n const thisParams = this.parameters.map((param) => param.toString());\n\n return href.parameters.every((param) =>\n thisParams.includes(param.toString()),\n );\n }\n\n throw new IllegalArgumentException(`${href} is not an instance of Href`);\n }\n\n /**\n * Indicates if the link is a content link\n */\n get isContent(): boolean {\n return this.absolutepath.startsWith(`${getBasePath()}${CONTENT_PATH}`);\n }\n\n /**\n * Returns a complete url from the Href\n */\n toString(): string {\n return this.href;\n }\n\n /**\n */\n toLocation(): LocationShape {\n return {\n pathname: this.path,\n search: this.querystring.length > 0 ? `?${this.querystring}` : \"\",\n hash: this.hash.length > 0 ? `#${this.hash}` : \"\",\n state: this.state,\n };\n }\n}\n\nexport default Href;\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAgBA;AACA;AACA;AACA,MAAMI,IAAI,CAAC;EAQT;AACF;AACA;EACEC,WAAWA,CAACC,IAAgB,EAAEC,YAAqB,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA,iBAVrC,EAAE;IAAA,IAAAD,gBAAA,CAAAC,OAAA,iBACF,EAAE;IAAA,IAAAD,gBAAA,CAAAC,OAAA,uBACc,EAAE;IAAA,IAAAD,gBAAA,CAAAC,OAAA,yBACV,EAAE;IAAA,IAAAD,gBAAA,CAAAC,OAAA,mBACYC,uBAAY,CAACC,GAAG;IAAA,IAAAH,gBAAA,CAAAC,OAAA,kBACxC,IAAI;IAMhB,IAAI,CAACF,YAAY,GAAGA,YAAY,IAAI,EAAE;IAEtC,IAAID,IAAI,YAAYF,IAAI,EAAE;MACxB,IAAI,CAACQ,WAAW,CAACN,IAAI,CAAC;IACxB,CAAC,MAAM,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;MACnC,IAAI,CAACO,aAAa,CAACP,IAAI,CAAC;IAC1B,CAAC,MAAM,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;MACnC,IAAI,CAACQ,uBAAuB,CAACR,IAAI,CAAC;IACpC;EACF;;EAEA;AACF;AACA;EACEM,WAAWA,CAACN,IAAU,EAAE;IACtB,IAAI,CAACS,IAAI,GAAGT,IAAI,CAACS,IAAI;IACrB,IAAI,CAACC,UAAU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AAtE,IAAA,CAAVsE,UAAU,EAAUrE,KAAK,CAACsE,QAAQ,CAAC,CAAC,CACtC,CAAC;IACH;IAEA,MAAM,IAAIE,oCAAwB,CAAE,GAAE/F,IAAK,6BAA4B,CAAC;EAC1E;;EAEA;AACF;AACA;EACE,IAAIgG,SAASA,CAAA,EAAY;IAAA,IAAAC,UAAA;IACvB,OAAO,IAAA7D,WAAA,CAAAjC,OAAA,EAAA8F,UAAA,OAAI,CAACf,YAAY,EAAA5D,IAAA,CAAA2E,UAAA,EAAa,GAAE,IAAAd,sBAAW,EAAC,CAAE,GAAEe,uBAAa,EAAC,CAAC;EACxE;;EAEA;AACF;AACA;EACEL,QAAQA,CAAA,EAAW;IACjB,OAAO,IAAI,CAAC7F,IAAI;EAClB;;EAEA;AACF;EACEmG,UAAUA,CAAA,EAAkB;IAC1B,OAAO;MACLtF,QAAQ,EAAE,IAAI,CAACJ,IAAI;MACnBM,MAAM,EAAE,IAAI,CAACgE,WAAW,CAAC9B,MAAM,GAAG,CAAC,GAAI,IAAG,IAAI,CAAC8B,WAAY,EAAC,GAAG,EAAE;MACjEpE,IAAI,EAAE,IAAI,CAACA,IAAI,CAACsC,MAAM,GAAG,CAAC,GAAI,IAAG,IAAI,CAACtC,IAAK,EAAC,GAAG,EAAE;MACjDC,KAAK,EAAE,IAAI,CAACA;IACd,CAAC;EACH;AACF;AAAC,IAAAwF,QAAA,GAEctG,IAAI;AAAAuG,OAAA,CAAAlG,OAAA,GAAAiG,QAAA"}
|
|
@@ -35,7 +35,7 @@ describe("href spec", () => {
|
|
|
35
35
|
expect(href.path).toBe("/casetab/caseview");
|
|
36
36
|
expect(href.href).toBe("/casetab/caseview?key=value&key2=value2");
|
|
37
37
|
expect(href.absolutehref).toBe(
|
|
38
|
-
"/BeInformed/casetab/caseview?key=value&key2=value2"
|
|
38
|
+
"/BeInformed/casetab/caseview?key=value&key2=value2",
|
|
39
39
|
);
|
|
40
40
|
expect(href.startsWith(new Href("/casetab"))).toBeTruthy();
|
|
41
41
|
});
|
|
@@ -57,30 +57,30 @@ describe("href spec", () => {
|
|
|
57
57
|
|
|
58
58
|
it("should be able to server hrefs with spaces", () => {
|
|
59
59
|
const href = new Href(
|
|
60
|
-
"/concepts/Content/Knowledge models/All source types.bixml/AllKindOfSources"
|
|
60
|
+
"/concepts/Content/Knowledge models/All source types.bixml/AllKindOfSources",
|
|
61
61
|
);
|
|
62
62
|
|
|
63
63
|
expect(href.path).toBe(
|
|
64
|
-
"/concepts/Content/Knowledge models/All source types.bixml/AllKindOfSources"
|
|
64
|
+
"/concepts/Content/Knowledge models/All source types.bixml/AllKindOfSources",
|
|
65
65
|
);
|
|
66
66
|
|
|
67
67
|
const href2 = new Href(
|
|
68
|
-
"/concepts/Content/Knowledge%20models/All%20source%20types.bixml/AllKindOfSources"
|
|
68
|
+
"/concepts/Content/Knowledge%20models/All%20source%20types.bixml/AllKindOfSources",
|
|
69
69
|
);
|
|
70
70
|
|
|
71
71
|
expect(href2.path).toBe(
|
|
72
|
-
"/concepts/Content/Knowledge models/All source types.bixml/AllKindOfSources"
|
|
72
|
+
"/concepts/Content/Knowledge models/All source types.bixml/AllKindOfSources",
|
|
73
73
|
);
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
it("should be able to create an Href from an Href", () => {
|
|
77
77
|
const href = new Href(
|
|
78
|
-
"/concepts/Content/Knowledge models/All source types.bixml/AllKindOfSources"
|
|
78
|
+
"/concepts/Content/Knowledge models/All source types.bixml/AllKindOfSources",
|
|
79
79
|
);
|
|
80
80
|
const href2 = new Href(href);
|
|
81
81
|
|
|
82
82
|
expect(href2.path).toBe(
|
|
83
|
-
"/concepts/Content/Knowledge models/All source types.bixml/AllKindOfSources"
|
|
83
|
+
"/concepts/Content/Knowledge models/All source types.bixml/AllKindOfSources",
|
|
84
84
|
);
|
|
85
85
|
});
|
|
86
86
|
|
|
@@ -103,24 +103,26 @@ describe("href spec", () => {
|
|
|
103
103
|
expect(Href.getPathFromString("/BeInformed/")).toBe("/BeInformed/");
|
|
104
104
|
|
|
105
105
|
expect(
|
|
106
|
-
Href.getPathFromString("http://BeInformed.u.example.com/BeInformed/")
|
|
106
|
+
Href.getPathFromString("http://BeInformed.u.example.com/BeInformed/"),
|
|
107
107
|
).toBe("http://BeInformed.u.example.com/BeInformed/");
|
|
108
108
|
expect(
|
|
109
|
-
Href.getPathFromString(
|
|
109
|
+
Href.getPathFromString(
|
|
110
|
+
"http://BeInformed.u.example.com/BeInformed/page1",
|
|
111
|
+
),
|
|
110
112
|
).toBe("http://BeInformed.u.example.com/BeInformed/page1");
|
|
111
113
|
expect(
|
|
112
114
|
Href.getPathFromString(
|
|
113
|
-
"http://BeInformed.u.example.com/BeInformed/page2?qs=bla"
|
|
114
|
-
)
|
|
115
|
+
"http://BeInformed.u.example.com/BeInformed/page2?qs=bla",
|
|
116
|
+
),
|
|
115
117
|
).toBe("http://BeInformed.u.example.com/BeInformed/page2");
|
|
116
118
|
expect(
|
|
117
119
|
Href.getPathFromString(
|
|
118
|
-
"http://BeInformed.u.example.com/BeInformed/page2?qs=bla&domain=http://BeInformed.com"
|
|
119
|
-
)
|
|
120
|
+
"http://BeInformed.u.example.com/BeInformed/page2?qs=bla&domain=http://BeInformed.com",
|
|
121
|
+
),
|
|
120
122
|
).toBe("http://BeInformed.u.example.com/BeInformed/page2");
|
|
121
123
|
|
|
122
124
|
expect(
|
|
123
|
-
Href.getPathFromString("//BeInformed.u.example.com/BeInformed/")
|
|
125
|
+
Href.getPathFromString("//BeInformed.u.example.com/BeInformed/"),
|
|
124
126
|
).toBe("//BeInformed.u.example.com/BeInformed/");
|
|
125
127
|
expect(Href.getPathFromString("/?domain=http://BeInformed.com")).toBe("/");
|
|
126
128
|
|
|
@@ -132,10 +134,10 @@ describe("href spec", () => {
|
|
|
132
134
|
const hrefToCamelRoute = new Href("/restServices/MyService?id=123");
|
|
133
135
|
|
|
134
136
|
expect(hrefToCamelRoute.absolutehref).toBe(
|
|
135
|
-
"/BeInformed/restServices/MyService?id=123"
|
|
137
|
+
"/BeInformed/restServices/MyService?id=123",
|
|
136
138
|
);
|
|
137
139
|
expect(hrefToCamelRoute.absolutepath).toBe(
|
|
138
|
-
"/BeInformed/restServices/MyService"
|
|
140
|
+
"/BeInformed/restServices/MyService",
|
|
139
141
|
);
|
|
140
142
|
});
|
|
141
143
|
|
|
@@ -40,7 +40,7 @@ export default class LayoutHintCollection extends BaseCollection<string> {
|
|
|
40
40
|
.some(
|
|
41
41
|
(hint) =>
|
|
42
42
|
this.layouthint.includes(hint) ||
|
|
43
|
-
this.layouthint.some((hint2) => hint2.startsWith(hint))
|
|
43
|
+
this.layouthint.some((hint2) => hint2.startsWith(hint)),
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -68,7 +68,7 @@ export default class LayoutHintCollection extends BaseCollection<string> {
|
|
|
68
68
|
|
|
69
69
|
if (typeof hint === "string") {
|
|
70
70
|
foundHint = this.layouthint.find((hint2) =>
|
|
71
|
-
hint2.startsWith(hint.toString())
|
|
71
|
+
hint2.startsWith(hint.toString()),
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -86,7 +86,7 @@ export default class LayoutHintCollection extends BaseCollection<string> {
|
|
|
86
86
|
|
|
87
87
|
const match = this.getByLayoutHint(
|
|
88
88
|
(hint2) =>
|
|
89
|
-
hint2.startsWith(`${checkHint}=`) || hint2.startsWith(`${checkHint}:`)
|
|
89
|
+
hint2.startsWith(`${checkHint}=`) || hint2.startsWith(`${checkHint}:`),
|
|
90
90
|
);
|
|
91
91
|
|
|
92
92
|
if (!match) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutHintCollection.js","names":["_BaseCollection","_interopRequireDefault","require","_exceptions","LayoutHintCollection","BaseCollection","constructor","layouthint","arguments","length","undefined","Array","isArray","IllegalArgumentException","collection","has","_len","hints","_key","hintArray","_flat","default","call","some","hint","_context","_includes","hint2","_startsWith","hasExact","_len2","_key2","_context2","getByLayoutHint","foundHint","_context3","_find","_context4","toString","getLayoutHintValue","checkHint","_endsWith","substr","match","getLayoutHintValues","value","split","exports"],"sources":["../../../src/models/layouthint/LayoutHintCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\nimport { IllegalArgumentException } from \"../../exceptions\";\n\n/**\n * Collection of layouthint\n */\nexport default class LayoutHintCollection extends BaseCollection<string> {\n /**\n * Constructs the layouthint collection\n */\n constructor(layouthint: Array<string> = []) {\n super();\n\n if (!Array.isArray(layouthint)) {\n throw new IllegalArgumentException(`${layouthint} is not an Array`);\n }\n\n this.collection = layouthint;\n }\n\n /**\n * Retrieve layout hints\n */\n get layouthint(): Array<string> {\n return this.collection;\n }\n\n /**\n * Checks if a specific layouthint exists in the component configuration\n * This method matches all exact matches and hints starting with. For example\n * when calling layouth.has(\"hide\"), this will return true for both \"hide\" and \"hide-when-empty\".<br>\n * If only exact matches are required, use the method {@link LayoutHintCollection#hasExact}.\n */\n has(...hints: Array<string>): boolean {\n const hintArray = hints.length > 0 ? [...hints] : [];\n\n return hintArray\n .flat()\n .some(\n (hint) =>\n this.layouthint.includes(hint) ||\n this.layouthint.some((hint2) => hint2.startsWith(hint))
|
|
1
|
+
{"version":3,"file":"LayoutHintCollection.js","names":["_BaseCollection","_interopRequireDefault","require","_exceptions","LayoutHintCollection","BaseCollection","constructor","layouthint","arguments","length","undefined","Array","isArray","IllegalArgumentException","collection","has","_len","hints","_key","hintArray","_flat","default","call","some","hint","_context","_includes","hint2","_startsWith","hasExact","_len2","_key2","_context2","getByLayoutHint","foundHint","_context3","_find","_context4","toString","getLayoutHintValue","checkHint","_endsWith","substr","match","getLayoutHintValues","value","split","exports"],"sources":["../../../src/models/layouthint/LayoutHintCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\nimport { IllegalArgumentException } from \"../../exceptions\";\n\n/**\n * Collection of layouthint\n */\nexport default class LayoutHintCollection extends BaseCollection<string> {\n /**\n * Constructs the layouthint collection\n */\n constructor(layouthint: Array<string> = []) {\n super();\n\n if (!Array.isArray(layouthint)) {\n throw new IllegalArgumentException(`${layouthint} is not an Array`);\n }\n\n this.collection = layouthint;\n }\n\n /**\n * Retrieve layout hints\n */\n get layouthint(): Array<string> {\n return this.collection;\n }\n\n /**\n * Checks if a specific layouthint exists in the component configuration\n * This method matches all exact matches and hints starting with. For example\n * when calling layouth.has(\"hide\"), this will return true for both \"hide\" and \"hide-when-empty\".<br>\n * If only exact matches are required, use the method {@link LayoutHintCollection#hasExact}.\n */\n has(...hints: Array<string>): boolean {\n const hintArray = hints.length > 0 ? [...hints] : [];\n\n return hintArray\n .flat()\n .some(\n (hint) =>\n this.layouthint.includes(hint) ||\n this.layouthint.some((hint2) => hint2.startsWith(hint)),\n );\n }\n\n /**\n * Checks if a specific layouthint exists in the component configuration,\n * only checks on exact matches.<br>\n * If layouthints that start with the given hint should also match, use {@link LayoutHintCollection#has}.\n * @param hints\n * @returns {boolean}\n */\n hasExact(...hints: Array<string>): boolean {\n const hintArray = hints.length > 0 ? [...hints] : [];\n return hintArray.flat().some((hint) => this.layouthint.includes(hint));\n }\n\n /**\n * Retrieve the first layouthint starting with hint\n */\n getByLayoutHint(hint: Function | string): null | string {\n let foundHint = null;\n\n if (typeof hint === \"function\") {\n foundHint = this.layouthint.find(hint);\n }\n\n if (typeof hint === \"string\") {\n foundHint = this.layouthint.find((hint2) =>\n hint2.startsWith(hint.toString()),\n );\n }\n\n return foundHint || null;\n }\n\n /**\n * Get the value of a specific hint\n * Format: hint=value\n */\n getLayoutHintValue(hint: string): ?string {\n const checkHint = hint.endsWith(\":\")\n ? hint.substr(0, hint.length - 1)\n : hint;\n\n const match = this.getByLayoutHint(\n (hint2) =>\n hint2.startsWith(`${checkHint}=`) || hint2.startsWith(`${checkHint}:`),\n );\n\n if (!match) {\n return null;\n }\n\n return match.substr(checkHint.length + 1);\n }\n\n /**\n * Get an array of multiple values from a specific hint\n * Format: hint=value1;value2;value3\n */\n getLayoutHintValues(hint: string): Array<string> | null {\n if (!this.has(hint)) {\n return null;\n }\n\n const value = this.getLayoutHintValue(hint);\n\n if (!value) {\n return [];\n }\n\n return value.split(\";\");\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACe,MAAME,oBAAoB,SAASC,uBAAc,CAAS;EACvE;AACF;AACA;EACEC,WAAWA,CAAA,EAAiC;IAAA,IAAhCC,UAAyB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IACxC,KAAK,CAAC,CAAC;IAEP,IAAI,CAACG,KAAK,CAACC,OAAO,CAACL,UAAU,CAAC,EAAE;MAC9B,MAAM,IAAIM,oCAAwB,CAAE,GAAEN,UAAW,kBAAiB,CAAC;IACrE;IAEA,IAAI,CAACO,UAAU,GAAGP,UAAU;EAC9B;;EAEA;AACF;AACA;EACE,IAAIA,UAAUA,CAAA,EAAkB;IAC9B,OAAO,IAAI,CAACO,UAAU;EACxB;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEC,GAAGA,CAAA,EAAmC;IAAA,SAAAC,IAAA,GAAAR,SAAA,CAAAC,MAAA,EAA/BQ,KAAK,OAAAN,KAAA,CAAAK,IAAA,GAAAE,IAAA,MAAAA,IAAA,GAAAF,IAAA,EAAAE,IAAA;MAALD,KAAK,CAAAC,IAAA,IAAAV,SAAA,CAAAU,IAAA;IAAA;IACV,MAAMC,SAAS,GAAGF,KAAK,CAACR,MAAM,GAAG,CAAC,GAAG,CAAC,GAAGQ,KAAK,CAAC,GAAG,EAAE;IAEpD,OAAO,IAAAG,KAAA,CAAAC,OAAA,EAAAF,SAAS,EAAAG,IAAA,CAATH,SACC,CAAC,CACNI,IAAI,CACFC,IAAI;MAAA,IAAAC,QAAA;MAAA,OACH,IAAAC,SAAA,CAAAL,OAA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KAAK,CAAC,GAAG,CAAC;EACzB;AACF;AAACC,OAAA,CAAA1B,OAAA,GAAAjB,oBAAA"}
|
|
@@ -19,7 +19,7 @@ export default class LinkCollection extends BaseCollection<LinkModel> {
|
|
|
19
19
|
|
|
20
20
|
// There can be links in data and/or contributions (e.g. concept link is available through contributions)
|
|
21
21
|
this.collection = normalizeLinkJSON(linkData, linkContributions).map(
|
|
22
|
-
({ data, contributions }) => new LinkModel(data, contributions)
|
|
22
|
+
({ data, contributions }) => new LinkModel(data, contributions),
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -57,7 +57,7 @@ export default class LinkCollection extends BaseCollection<LinkModel> {
|
|
|
57
57
|
getLinksByGroup(...args: Array<string>): LinkCollection {
|
|
58
58
|
const findGroups = args.length > 0 ? [...args] : [];
|
|
59
59
|
const groupLinks = this.links.filter((link) =>
|
|
60
|
-
findGroups.includes(link.group)
|
|
60
|
+
findGroups.includes(link.group),
|
|
61
61
|
);
|
|
62
62
|
|
|
63
63
|
const linkCollection = new LinkCollection();
|
|
@@ -74,7 +74,7 @@ export default class LinkCollection extends BaseCollection<LinkModel> {
|
|
|
74
74
|
const linkCollection = new LinkCollection();
|
|
75
75
|
|
|
76
76
|
linkCollection.collection = this.links.filter(
|
|
77
|
-
(link) => link.resourcetype === resourceType
|
|
77
|
+
(link) => link.resourcetype === resourceType,
|
|
78
78
|
);
|
|
79
79
|
|
|
80
80
|
return linkCollection;
|
|
@@ -87,7 +87,7 @@ export default class LinkCollection extends BaseCollection<LinkModel> {
|
|
|
87
87
|
const newCollection = new LinkCollection();
|
|
88
88
|
|
|
89
89
|
newCollection.collection = this.all.filter((link) =>
|
|
90
|
-
link.layouthint.has(hint)
|
|
90
|
+
link.layouthint.has(hint),
|
|
91
91
|
);
|
|
92
92
|
|
|
93
93
|
return newCollection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkCollection.js","names":["_BaseCollection","_interopRequireDefault","require","_normalizeLinkJSON","_LinkModel","LinkCollection","BaseCollection","constructor","_context","linkData","arguments","length","undefined","linkContributions","collection","_map","default","normalizeLinkJSON","call","_ref","data","contributions","LinkModel","links","getLinkByKey","key","_context2","_find","link","getLinkByHref","href","_context3","equals","getLinksByGroup","_context4","_len","args","Array","_key","findGroups","groupLinks","_filter","_includes","group","linkCollection","getLinkByResourceType","resourceType","_context5","resourcetype","getLinksByLayoutHint","hint","_context6","newCollection","all","layouthint","has","hasLinksByLayoutHint","some","toHrefArray","_context7","hasLink","l","update","newLink","_context8","_context9","_context10","oldIndex","_findIndex","_slice","routePath","_context11","path","join","exports"],"sources":["../../../src/models/links/LinkCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\nimport normalizeLinkJSON from \"./normalizeLinkJSON\";\nimport LinkModel from \"./LinkModel\";\n\nimport type Href from \"../href/Href\";\n\n/**\n * Collection of links\n *\n * @see {LinkModel}\n */\nexport default class LinkCollection extends BaseCollection<LinkModel> {\n /**\n * Constructs the link collection\n */\n constructor(linkData: Object = {}, linkContributions: Object = {}) {\n super();\n\n // There can be links in data and/or contributions (e.g. concept link is available through contributions)\n this.collection = normalizeLinkJSON(linkData, linkContributions).map(\n ({ data, contributions }) => new LinkModel(data, contributions)
|
|
1
|
+
{"version":3,"file":"LinkCollection.js","names":["_BaseCollection","_interopRequireDefault","require","_normalizeLinkJSON","_LinkModel","LinkCollection","BaseCollection","constructor","_context","linkData","arguments","length","undefined","linkContributions","collection","_map","default","normalizeLinkJSON","call","_ref","data","contributions","LinkModel","links","getLinkByKey","key","_context2","_find","link","getLinkByHref","href","_context3","equals","getLinksByGroup","_context4","_len","args","Array","_key","findGroups","groupLinks","_filter","_includes","group","linkCollection","getLinkByResourceType","resourceType","_context5","resourcetype","getLinksByLayoutHint","hint","_context6","newCollection","all","layouthint","has","hasLinksByLayoutHint","some","toHrefArray","_context7","hasLink","l","update","newLink","_context8","_context9","_context10","oldIndex","_findIndex","_slice","routePath","_context11","path","join","exports"],"sources":["../../../src/models/links/LinkCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\nimport normalizeLinkJSON from \"./normalizeLinkJSON\";\nimport LinkModel from \"./LinkModel\";\n\nimport type Href from \"../href/Href\";\n\n/**\n * Collection of links\n *\n * @see {LinkModel}\n */\nexport default class LinkCollection extends BaseCollection<LinkModel> {\n /**\n * Constructs the link collection\n */\n constructor(linkData: Object = {}, linkContributions: Object = {}) {\n super();\n\n // There can be links in data and/or contributions (e.g. concept link is available through contributions)\n this.collection = normalizeLinkJSON(linkData, linkContributions).map(\n ({ data, contributions }) => new LinkModel(data, contributions),\n );\n }\n\n /**\n * Getting links\n */\n get links(): Array<LinkModel> {\n return this.collection;\n }\n\n /**\n * Set Link collection\n */\n set links(links: Array<LinkModel>) {\n this.collection = links;\n }\n\n /**\n * Get a link by it's key, handy for getting the self link\n */\n getLinkByKey(key: string): LinkModel | null {\n return this.links.find((link) => link.key === key) || null;\n }\n\n /**\n * Get a link by it's Href\n */\n getLinkByHref(href: Href | string): LinkModel | null {\n return this.links.find((link) => link.href.equals(href)) || null;\n }\n\n /**\n * Getting the links by group key. For instance getting all 'tab' links of the web application.\n */\n getLinksByGroup(...args: Array<string>): LinkCollection {\n const findGroups = args.length > 0 ? [...args] : [];\n const groupLinks = this.links.filter((link) =>\n findGroups.includes(link.group),\n );\n\n const linkCollection = new LinkCollection();\n\n linkCollection.links = groupLinks;\n\n return linkCollection;\n }\n\n /**\n * Retrieve links by resource type\n */\n getLinkByResourceType(resourceType: string): LinkCollection {\n const linkCollection = new LinkCollection();\n\n linkCollection.collection = this.links.filter(\n (link) => link.resourcetype === resourceType,\n );\n\n return linkCollection;\n }\n\n /**\n * Retrieve links including a layout hint\n */\n getLinksByLayoutHint(hint: string): LinkCollection {\n const newCollection = new LinkCollection();\n\n newCollection.collection = this.all.filter((link) =>\n link.layouthint.has(hint),\n );\n\n return newCollection;\n }\n\n /**\n * Indicates if a link with layout hint exists\n */\n hasLinksByLayoutHint(hint: string): boolean {\n return this.all.some((link) => link.layouthint.has(hint));\n }\n\n /**\n * Get all href of links in collection in an array of Href's\n */\n toHrefArray(): Array<Href> {\n return this.links.map((link) => link.href);\n }\n\n /**\n * Check if link exists in collection\n */\n hasLink(link: LinkModel): boolean {\n return this.some((l) => l.href.equals(link.href));\n }\n\n /**\n * Updates the collection with a new link, when the link to update does not exist, it is added to the collection\n */\n update(newLink: LinkModel): LinkCollection {\n const oldIndex = this.links.findIndex((link) => link.key === newLink.key);\n\n if (oldIndex === -1) {\n this.collection = [...this.collection, newLink];\n\n return this;\n }\n\n this.collection = [\n ...this.links.slice(0, oldIndex),\n newLink,\n ...this.links.slice(oldIndex + 1),\n ];\n\n return this;\n }\n\n /**\n * Use as path regex for react router routes\n */\n get routePath(): string {\n if (this.length === 0) {\n return \"__NON_EXISTING_ROUTE__\";\n }\n\n const path = this.collection.map((link) => link.href.path).join(\"|\");\n return this.length > 1 ? `(${path})` : path;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AAIA;AACA;AACA;AACA;AACA;AACe,MAAMG,cAAc,SAASC,uBAAc,CAAY;EACpE;AACF;AACA;EACEC,WAAWA,CAAA,EAAwD;IAAA,IAAAC,QAAA;IAAA,IAAvDC,QAAgB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;IAAA,IAAEG,iBAAyB,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;IAC/D,KAAK,CAAC,CAAC;;IAEP;IACA,IAAI,CAACI,UAAU,GAAG,IAAAC,IAAA,CAAAC,OAAA,EAAAR,QAAA,OAAAS,0BAAiB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AIG,SAASA,CAAA,EAAW;IAAA,IAAAC,UAAA;IACtB,IAAI,IAAI,CAAC5D,MAAM,KAAK,CAAC,EAAE;MACrB,OAAO,wBAAwB;IACjC;IAEA,MAAM6D,IAAI,GAAG,IAAAzD,IAAA,CAAAC,OAAA,EAAAuD,UAAA,OAAI,CAACzD,UAAU,EAAAI,IAAA,CAAAqD,UAAA,EAAM3C,IAAI,IAAKA,IAAI,CAACE,IAAI,CAAC0C,IAAI,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;IACpE,OAAO,IAAI,CAAC9D,MAAM,GAAG,CAAC,GAAI,IAAG6D,IAAK,GAAE,GAAGA,IAAI;EAC7C;AACF;AAACE,OAAA,CAAA1D,OAAA,GAAAX,cAAA"}
|
|
@@ -46,7 +46,7 @@ class LinkModel extends BaseModel {
|
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
label,
|
|
49
|
-
}
|
|
49
|
+
},
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -140,7 +140,7 @@ class LinkModel extends BaseModel {
|
|
|
140
140
|
if (this.data.components) {
|
|
141
141
|
return new LinkCollection(
|
|
142
142
|
{ components: this.data.components },
|
|
143
|
-
{ components: this.contributions.components }
|
|
143
|
+
{ components: this.contributions.components },
|
|
144
144
|
);
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -217,7 +217,7 @@ class LinkModel extends BaseModel {
|
|
|
217
217
|
if (this.hasProcessStatusSettings) {
|
|
218
218
|
return new ProcessStatusSettingsModel(
|
|
219
219
|
this.getData("processStatus", {}),
|
|
220
|
-
this.getContribution("processStatus", {})
|
|
220
|
+
this.getContribution("processStatus", {}),
|
|
221
221
|
);
|
|
222
222
|
}
|
|
223
223
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkModel.js","names":["_objects","require","_ProcessStatusSettingsModel","_interopRequireDefault","_BaseModel","_Href","_LinkCollection","_LayoutHints","_Parameter","LinkModel","BaseModel","constructor","data","contributions","_defineProperty2","default","createHref","_isCacheable","create","name","href","label","Href","resourcetype","handleInitialFilters","layouthint","has","INITIAL_FILTER","_context","filters","_filter","call","hint","_startsWith","forEach","param","substr","length","p","Parameter","fromString","value","push","_keys","key","join","addParameter","group","getContribution","_href","links","components","LinkCollection","isActive","link","_context2","icon","_icon","targetModel","_targetModel","isCacheable","filterName","hasProcessStatusSettings","processStatus","ProcessStatusSettingsModel","getData","_default","exports"],"sources":["../../../src/models/links/LinkModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport ProcessStatusSettingsModel from \"../process/ProcessStatusSettingsModel\";\nimport BaseModel from \"../base/BaseModel\";\nimport Href from \"../href/Href\";\nimport LinkCollection from \"../links/LinkCollection\";\nimport { INITIAL_FILTER } from \"../../constants/LayoutHints\";\n\nimport type { ModularUIModel } from \"../types\";\nimport Parameter from \"../parameter/Parameter\";\n\n/**\n * Defines a Link. For instance below example of a link to the tab 'books'\n * <br/>\n * \"Books\": {\n * \"href\": \"/books\",\n * \"profile\": \"/profiles/tab\"\n * }\n */\nclass LinkModel extends BaseModel {\n _href: Href;\n _isCacheable: boolean;\n _icon: string;\n _targetModel: ?Class<ModularUIModel>;\n\n /**\n * Create a Link\n */\n constructor(data: Object, contributions: Object) {\n super(data, contributions);\n\n this.createHref();\n\n this._isCacheable = false;\n }\n\n /**\n * Create a simple Link Model\n */\n static create(name: string, href: string | Href, label: string): LinkModel {\n return new LinkModel(\n {\n name,\n href,\n },\n {\n label,\n }
|
|
1
|
+
{"version":3,"file":"LinkModel.js","names":["_objects","require","_ProcessStatusSettingsModel","_interopRequireDefault","_BaseModel","_Href","_LinkCollection","_LayoutHints","_Parameter","LinkModel","BaseModel","constructor","data","contributions","_defineProperty2","default","createHref","_isCacheable","create","name","href","label","Href","resourcetype","handleInitialFilters","layouthint","has","INITIAL_FILTER","_context","filters","_filter","call","hint","_startsWith","forEach","param","substr","length","p","Parameter","fromString","value","push","_keys","key","join","addParameter","group","getContribution","_href","links","components","LinkCollection","isActive","link","_context2","icon","_icon","targetModel","_targetModel","isCacheable","filterName","hasProcessStatusSettings","processStatus","ProcessStatusSettingsModel","getData","_default","exports"],"sources":["../../../src/models/links/LinkModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport ProcessStatusSettingsModel from \"../process/ProcessStatusSettingsModel\";\nimport BaseModel from \"../base/BaseModel\";\nimport Href from \"../href/Href\";\nimport LinkCollection from \"../links/LinkCollection\";\nimport { INITIAL_FILTER } from \"../../constants/LayoutHints\";\n\nimport type { ModularUIModel } from \"../types\";\nimport Parameter from \"../parameter/Parameter\";\n\n/**\n * Defines a Link. For instance below example of a link to the tab 'books'\n * <br/>\n * \"Books\": {\n * \"href\": \"/books\",\n * \"profile\": \"/profiles/tab\"\n * }\n */\nclass LinkModel extends BaseModel {\n _href: Href;\n _isCacheable: boolean;\n _icon: string;\n _targetModel: ?Class<ModularUIModel>;\n\n /**\n * Create a Link\n */\n constructor(data: Object, contributions: Object) {\n super(data, contributions);\n\n this.createHref();\n\n this._isCacheable = false;\n }\n\n /**\n * Create a simple Link Model\n */\n static create(name: string, href: string | Href, label: string): LinkModel {\n return new LinkModel(\n {\n name,\n href,\n },\n {\n label,\n },\n );\n }\n\n /**\n */\n createHref() {\n const href = new Href(this.data.href);\n href.resourcetype = this.resourcetype;\n\n this.handleInitialFilters(href);\n\n this.href = href;\n }\n\n /**\n * Handle initial filter hints\n * @param href\n */\n handleInitialFilters(href: Href) {\n if (this.layouthint.has(INITIAL_FILTER)) {\n const filters: { [string]: Array<string> } = {};\n this.layouthint\n .filter((hint) => hint.startsWith(INITIAL_FILTER))\n .forEach((hint) => {\n const param = hint.substr(INITIAL_FILTER.length);\n const p = Parameter.fromString(param);\n\n if (p != null) {\n if (!filters[p.name]) {\n filters[p.name] = [];\n }\n\n if (p.value != null) {\n filters[p.name].push(p.value);\n }\n }\n });\n\n Object.keys(filters).forEach((key) => {\n const value = filters[key].join(\",\");\n href.addParameter(key, value);\n });\n }\n }\n\n /**\n * Getting link group\n */\n get group(): string {\n return this.getContribution(\"group\", this.data.group);\n }\n\n /**\n * Getting the key/name of this link\n */\n get key(): string {\n return this.data.name;\n }\n\n /**\n * Retrieve the href of the link\n */\n get href(): Href {\n return this._href;\n }\n\n /**\n * Set the href of the Link\n */\n set href(href: Href) {\n this._href = href;\n }\n\n /**\n * Getting the label of the link\n */\n get label(): string {\n return this.getContribution(\"label\", this.key);\n }\n\n /**\n * Getting the type of the link\n */\n get resourcetype(): string {\n return this.getContribution(\"resourcetype\", \"\");\n }\n\n /**\n */\n get links(): LinkCollection {\n if (this.data.components) {\n return new LinkCollection(\n { components: this.data.components },\n { components: this.contributions.components },\n );\n }\n\n return new LinkCollection();\n }\n\n /**\n * Check if the href startswith the URI of the given href\n */\n isActive(link: ?LinkModel): boolean {\n if (link) {\n return link.href.startsWith(this.href);\n }\n\n return false;\n }\n\n /**\n * Setter for icon of LinkModel\n */\n set icon(icon: string) {\n this._icon = icon;\n }\n\n /**\n * Retrieve icon of LinkModel\n */\n get icon(): string {\n return this._icon;\n }\n\n /**\n */\n get targetModel(): ?Class<ModularUIModel> {\n return this._targetModel;\n }\n\n /**\n */\n set targetModel(targetModel: Class<ModularUIModel>) {\n this._targetModel = targetModel;\n }\n\n /**\n */\n get isCacheable(): boolean {\n return this._isCacheable;\n }\n\n /**\n */\n set isCacheable(isCacheable: boolean) {\n this._isCacheable = isCacheable;\n }\n\n /**\n */\n get filterName(): string {\n return this.data.filter.name;\n }\n\n /**\n */\n get hasProcessStatusSettings(): boolean {\n return (\n has(this.data, \"processStatus\") &&\n has(this.contributions, \"processStatus\")\n );\n }\n\n /**\n */\n get processStatus(): ProcessStatusSettingsModel | null {\n if (this.hasProcessStatusSettings) {\n return new ProcessStatusSettingsModel(\n this.getData(\"processStatus\", {}),\n this.getContribution(\"processStatus\", {}),\n );\n }\n\n return null;\n }\n}\n\nexport default LinkModel;\n"],"mappings":";;;;;;;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;EACnB;;EAEA;AACF;EACE,IAAIC,WAAWA,CAAA,EAA2B;IACxC,OAAO,IAAI,CAACC,YAAY;EAC1B;;EAEA;AACF;EACE,IAAID,WAAWA,CAACA,WAAkC,EAAE;IAClD,IAAI,CAACC,YAAY,GAAGD,WAAW;EACjC;;EAEA;AACF;EACE,IAAIE,WAAWA,CAAA,EAAY;IACzB,OAAO,IAAI,CAAC3C,YAAY;EAC1B;;EAEA;AACF;EACE,IAAI2C,WAAWA,CAACA,WAAoB,EAAE;IACpC,IAAI,CAAC3C,YAAY,GAAG2C,WAAW;EACjC;;EAEA;AACF;EACE,IAAIC,UAAUA,CAAA,EAAW;IACvB,OAAO,IAAA/B,OAAA,CAAAf,OAAA,MAAI,CAACH,IAAI,EAAQO,IAAI;EAC9B;;EAEA;AACF;EACE,IAAI2C,wBAAwBA,CAAA,EAAY;IACtC,OACE,IAAApC,YAAG,EAAC,IAAI,CAACd,IAAI,EAAE,eAAe,CAAC,IAC/B,IAAAc,YAAG,EAAC,IAAI,CAACb,aAAa,EAAE,eAAe,CAAC;EAE5C;;EAEA;AACF;EACE,IAAIkD,aAAaA,CAAA,EAAsC;IACrD,IAAI,IAAI,CAACD,wBAAwB,EAAE;MACjC,OAAO,IAAIE,mCAA0B,CACnC,IAAI,CAACC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EACjC,IAAI,CAACjB,eAAe,CAAC,eAAe,EAAE,CAAC,CAAC,CAC1C,CAAC;IACH;IAEA,OAAO,IAAI;EACb;AACF;AAAC,IAAAkB,QAAA,GAEczD,SAAS;AAAA0D,OAAA,CAAApD,OAAA,GAAAmD,QAAA"}
|
|
@@ -14,7 +14,7 @@ describe("linkModel", () => {
|
|
|
14
14
|
href: "/books",
|
|
15
15
|
name: "Books",
|
|
16
16
|
},
|
|
17
|
-
{ name: "Books", label: "Books", resourcetype: "CaseTab" }
|
|
17
|
+
{ name: "Books", label: "Books", resourcetype: "CaseTab" },
|
|
18
18
|
);
|
|
19
19
|
|
|
20
20
|
expect(link).toBeInstanceOf(LinkModel);
|
|
@@ -55,7 +55,7 @@ describe("linkModel", () => {
|
|
|
55
55
|
resourcetype: "DataStoreList",
|
|
56
56
|
},
|
|
57
57
|
],
|
|
58
|
-
}
|
|
58
|
+
},
|
|
59
59
|
);
|
|
60
60
|
|
|
61
61
|
expect(link.links.isEmpty).toBeFalsy();
|
|
@@ -75,7 +75,7 @@ describe("linkModel", () => {
|
|
|
75
75
|
label: "Books",
|
|
76
76
|
layouthint: ["initial-filter:state=decide"],
|
|
77
77
|
resourcetype: "DatastoreList",
|
|
78
|
-
}
|
|
78
|
+
},
|
|
79
79
|
);
|
|
80
80
|
|
|
81
81
|
expect(link.href.toString()).toBe("/books/books?state=decide");
|
|
@@ -95,7 +95,7 @@ describe("linkModel", () => {
|
|
|
95
95
|
"initial-filter:state=initial",
|
|
96
96
|
],
|
|
97
97
|
resourcetype: "DatastoreList",
|
|
98
|
-
}
|
|
98
|
+
},
|
|
99
99
|
);
|
|
100
100
|
|
|
101
101
|
expect(link.href.toString()).toBe("/books/books?state=decide%2Cinitial");
|
|
@@ -18,13 +18,13 @@ const flattenDataJSON = (json: Object) => {
|
|
|
18
18
|
Object.keys(json).forEach((linkKey) => {
|
|
19
19
|
if (Array.isArray(json[linkKey])) {
|
|
20
20
|
flattenedJSON.push(
|
|
21
|
-
...json[linkKey].map((link) => createLink(link, linkKey))
|
|
21
|
+
...json[linkKey].map((link) => createLink(link, linkKey)),
|
|
22
22
|
);
|
|
23
23
|
} else if (json[linkKey]) {
|
|
24
24
|
flattenedJSON.push(
|
|
25
25
|
Object.assign(json[linkKey], {
|
|
26
26
|
name: linkKey,
|
|
27
|
-
})
|
|
27
|
+
}),
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
});
|
|
@@ -40,7 +40,7 @@ const flattenContributionsJSON = (json: Object) => {
|
|
|
40
40
|
Object.keys(json).forEach((linkKey) => {
|
|
41
41
|
if (Array.isArray(json[linkKey])) {
|
|
42
42
|
flattenedJSON.push(
|
|
43
|
-
...json[linkKey].map((link) => createLink(link, linkKey))
|
|
43
|
+
...json[linkKey].map((link) => createLink(link, linkKey)),
|
|
44
44
|
);
|
|
45
45
|
} else if (json[linkKey]) {
|
|
46
46
|
const newLink = json[linkKey];
|
|
@@ -65,7 +65,7 @@ const flattenContributionsJSON = (json: Object) => {
|
|
|
65
65
|
*/
|
|
66
66
|
const normalizeLinkJSON = (
|
|
67
67
|
data: Object,
|
|
68
|
-
contributions: Object
|
|
68
|
+
contributions: Object,
|
|
69
69
|
): Array<{
|
|
70
70
|
data: any,
|
|
71
71
|
contributions: any,
|
|
@@ -82,14 +82,14 @@ const normalizeLinkJSON = (
|
|
|
82
82
|
const filteredContributions = flattenedContributions.filter(
|
|
83
83
|
(contribution) =>
|
|
84
84
|
contribution.href &&
|
|
85
|
-
!flattenedData.find((linkData) => linkData.name === contribution.name)
|
|
85
|
+
!flattenedData.find((linkData) => linkData.name === contribution.name),
|
|
86
86
|
);
|
|
87
87
|
|
|
88
88
|
return [
|
|
89
89
|
...flattenedData.map((link) => ({
|
|
90
90
|
data: link,
|
|
91
91
|
contributions: flattenedContributions.find(
|
|
92
|
-
(contr) => contr.name === link.name
|
|
92
|
+
(contr) => contr.name === link.name,
|
|
93
93
|
) || { name: link.name, label: link.name || "" },
|
|
94
94
|
})),
|
|
95
95
|
...filteredContributions.map((link) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeLinkJSON.js","names":["createLink","link","linkKey","newLink","group","flattenDataJSON","json","flattenedJSON","_keys","default","forEach","Array","isArray","_context","push","_map","call","_assign","name","flattenContributionsJSON","_context2","label","normalizeLinkJSON","data","contributions","flattenedData","flattenedContributions","filteredContributions","_filter","contribution","href","_find","linkData","contr","_default","exports"],"sources":["../../../src/models/links/normalizeLinkJSON.js"],"sourcesContent":["// @flow\n/**\n * Flatten JSON structure into a one dimensional array\n * @private\n */\nconst createLink = (link: Object, linkKey: string) => {\n const newLink = link;\n newLink.group = linkKey;\n return newLink;\n};\n\n/**\n * @private\n */\nconst flattenDataJSON = (json: Object) => {\n const flattenedJSON = [];\n\n Object.keys(json).forEach((linkKey) => {\n if (Array.isArray(json[linkKey])) {\n flattenedJSON.push(\n ...json[linkKey].map((link) => createLink(link, linkKey))
|
|
1
|
+
{"version":3,"file":"normalizeLinkJSON.js","names":["createLink","link","linkKey","newLink","group","flattenDataJSON","json","flattenedJSON","_keys","default","forEach","Array","isArray","_context","push","_map","call","_assign","name","flattenContributionsJSON","_context2","label","normalizeLinkJSON","data","contributions","flattenedData","flattenedContributions","filteredContributions","_filter","contribution","href","_find","linkData","contr","_default","exports"],"sources":["../../../src/models/links/normalizeLinkJSON.js"],"sourcesContent":["// @flow\n/**\n * Flatten JSON structure into a one dimensional array\n * @private\n */\nconst createLink = (link: Object, linkKey: string) => {\n const newLink = link;\n newLink.group = linkKey;\n return newLink;\n};\n\n/**\n * @private\n */\nconst flattenDataJSON = (json: Object) => {\n const flattenedJSON = [];\n\n Object.keys(json).forEach((linkKey) => {\n if (Array.isArray(json[linkKey])) {\n flattenedJSON.push(\n ...json[linkKey].map((link) => createLink(link, linkKey)),\n );\n } else if (json[linkKey]) {\n flattenedJSON.push(\n Object.assign(json[linkKey], {\n name: linkKey,\n }),\n );\n }\n });\n\n return flattenedJSON;\n};\n\n/**\n */\nconst flattenContributionsJSON = (json: Object) => {\n const flattenedJSON = [];\n\n Object.keys(json).forEach((linkKey) => {\n if (Array.isArray(json[linkKey])) {\n flattenedJSON.push(\n ...json[linkKey].map((link) => createLink(link, linkKey)),\n );\n } else if (json[linkKey]) {\n const newLink = json[linkKey];\n newLink.name = linkKey;\n if (!newLink.label) {\n newLink.label = linkKey;\n }\n if (!newLink.group) {\n newLink.group = linkKey;\n }\n\n flattenedJSON.push(newLink);\n }\n });\n\n return flattenedJSON;\n};\n\n/**\n * Normalize various link formats from services into a concistent format\n * @private\n */\nconst normalizeLinkJSON = (\n data: Object,\n contributions: Object,\n): Array<{\n data: any,\n contributions: any,\n}> => {\n if (!data && !contributions) {\n return [];\n }\n\n const flattenedData = data ? flattenDataJSON(data) : [];\n const flattenedContributions = contributions\n ? flattenContributionsJSON(contributions)\n : [];\n\n const filteredContributions = flattenedContributions.filter(\n (contribution) =>\n contribution.href &&\n !flattenedData.find((linkData) => linkData.name === contribution.name),\n );\n\n return [\n ...flattenedData.map((link) => ({\n data: link,\n contributions: flattenedContributions.find(\n (contr) => contr.name === link.name,\n ) || { name: link.name, label: link.name || \"\" },\n })),\n ...filteredContributions.map((link) => ({\n data: {\n ...link,\n href: link.href || \"\",\n },\n contributions: { name: link.name, label: link.name || \"\" },\n })),\n ];\n};\n\nexport default normalizeLinkJSON;\n"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;AACA;AACA,MAAMA,UAAU,GAAGA,CAACC,IAAY,EAAEC,OAAe,KAAK;EACpD,MAAMC,OAAO,GAAGF,IAAI;EACpBE,OAAO,CAACC,KAAK,GAAGF,OAAO;EACvB,OAAOC,OAAO;AAChB,CAAC;;AAED;AACA;AACA;AACA,MAAME,eAAe,GAAIC,IAAY,IAAK;EACxC,MAAMC,aAAa,GAAG,EAAE;EAExB,IAAAC,KAAA,CAAAC,OAAA,EAAYH,IAAI,CAAC,CAACI,OAAO,CAAER,OAAO,IAAK;IACrC,IAAIS,KAAK,CAACC,OAAO,CAACN,IAAI,CAACJ,OAAO,CAAC,CAAC,EAAE;MAAA,IAAAW,QAAA;MAChCN,aAAa,CAACO,IAAI,CAChB,GAAG,IAAAC,IAAA,CAAAN,OAAA,EAAAI,QAAA,GAAAP,IAAI,CAACJ,OAAO,CAAC,EAAAc,IAAA,CAAAH,QAAA,EAAMZ,IAAI,IAAKD,UAAU,CAACC,IAAI,EAAEC,OAAO,CAAC,CAC1D,CAAC;IACH,CAAC,MAAM,IAAII,IAAI,CAACJ,OAAO,CAAC,EAAE;MACxBK,aAAa,CAACO,IAAI,CAChB,IAAAG,OAAA,CAAAR,OAAA,EA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Aa,OAAA,CAAA1B,OAAA,GAAAyB,QAAA"}
|
|
@@ -34,7 +34,7 @@ export default class ListDetailModel extends DetailModel {
|
|
|
34
34
|
this._actionCollection = new ActionCollection();
|
|
35
35
|
|
|
36
36
|
this._contentConfiguration = new ContentConfiguration(
|
|
37
|
-
this.contributions ? this.contributions.content : {}
|
|
37
|
+
this.contributions ? this.contributions.content : {},
|
|
38
38
|
);
|
|
39
39
|
|
|
40
40
|
this.setResultSection();
|
|
@@ -184,7 +184,7 @@ export default class ListDetailModel extends DetailModel {
|
|
|
184
184
|
(child) => {
|
|
185
185
|
const childKey = Object.keys(child)[0];
|
|
186
186
|
return childKey in resultsData;
|
|
187
|
-
}
|
|
187
|
+
},
|
|
188
188
|
);
|
|
189
189
|
}
|
|
190
190
|
|
|
@@ -196,7 +196,7 @@ export default class ListDetailModel extends DetailModel {
|
|
|
196
196
|
content: this.data.content?.results,
|
|
197
197
|
...this.data.resultSection,
|
|
198
198
|
},
|
|
199
|
-
resultsContributions
|
|
199
|
+
resultsContributions,
|
|
200
200
|
);
|
|
201
201
|
|
|
202
202
|
if (results instanceof CompositeAttributeModel) {
|
|
@@ -234,7 +234,7 @@ export default class ListDetailModel extends DetailModel {
|
|
|
234
234
|
content: this.data.content?.givenAnswers,
|
|
235
235
|
...this.data.resultSection,
|
|
236
236
|
},
|
|
237
|
-
filteredContributions
|
|
237
|
+
filteredContributions,
|
|
238
238
|
);
|
|
239
239
|
|
|
240
240
|
if (givenAnswers instanceof CompositeAttributeModel) {
|
|
@@ -277,7 +277,7 @@ export default class ListDetailModel extends DetailModel {
|
|
|
277
277
|
*/
|
|
278
278
|
addAttributes(key: string, eventData: Object, eventContributions: Object) {
|
|
279
279
|
this._eventdata.push(
|
|
280
|
-
new AttributeSetModel(key, eventData, eventContributions)
|
|
280
|
+
new AttributeSetModel(key, eventData, eventContributions),
|
|
281
281
|
);
|
|
282
282
|
}
|
|
283
283
|
|
|
@@ -298,7 +298,7 @@ export default class ListDetailModel extends DetailModel {
|
|
|
298
298
|
...eventDataData,
|
|
299
299
|
dynamicschema: this.data.dynamicschema,
|
|
300
300
|
},
|
|
301
|
-
eventDataContribution[key]
|
|
301
|
+
eventDataContribution[key],
|
|
302
302
|
);
|
|
303
303
|
});
|
|
304
304
|
} else {
|
|
@@ -308,7 +308,7 @@ export default class ListDetailModel extends DetailModel {
|
|
|
308
308
|
...this.data.eventdata[key],
|
|
309
309
|
dynamicschema: this.data.dynamicschema,
|
|
310
310
|
},
|
|
311
|
-
eventDataContribution[key]
|
|
311
|
+
eventDataContribution[key],
|
|
312
312
|
);
|
|
313
313
|
}
|
|
314
314
|
}
|