@beinformed/ui 1.28.2 → 1.28.4
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 +13 -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/ConfigurationException.js.map +1 -1
- package/esm/exceptions/FetchException.js.map +1 -1
- package/esm/exceptions/IllegalArgumentException.js.map +1 -1
- package/esm/exceptions/IllegalReturnException.js.map +1 -1
- package/esm/exceptions/IllegalStateException.js.map +1 -1
- package/esm/exceptions/JsonParseException.js.map +1 -1
- package/esm/exceptions/MissingPropertyException.js.map +1 -1
- package/esm/exceptions/NetworkException.js.map +1 -1
- package/esm/exceptions/NotAllowedUriException.js.map +1 -1
- package/esm/exceptions/NotFoundException.js.map +1 -1
- package/esm/exceptions/ServerRequestException.js.map +1 -1
- package/esm/exceptions/ThemePropertyException.js.map +1 -1
- package/esm/exceptions/TimeoutException.js.map +1 -1
- package/esm/exceptions/UnauthorizedException.js.map +1 -1
- package/esm/exceptions/UnsupportedOperationException.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/useModels.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/useProgressIndicator.js.map +1 -1
- package/esm/hooks/useRouter.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/CaptchaAttributeModel.js.map +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.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/HelptextAttributeModel.js.map +1 -1
- package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
- package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
- package/esm/models/attributes/MoneyAttributeModel.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/XMLAttributeModel.js.map +1 -1
- package/esm/models/attributes/_createAttribute.js.map +1 -1
- package/esm/models/attributes/input-constraints/BSNConstraint.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/DateTimeDateFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.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/input-constraints/PasswordConfirmConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/XMLConstraint.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/ResourceCollection.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/ConceptRelationModel.js.map +1 -1
- package/esm/models/concepts/ConceptTypeDetailModel.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/ContentTypeModel.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/contentconfiguration/ContentConfigurationResults.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/error/ErrorResponse.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/ConceptIndexFilterModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.js.map +1 -1
- package/esm/models/filters/RangeFilterModel.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/href/ListHref.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/ListHeaderModel.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/PagesizeModel.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/parameter/Parameter.js.map +1 -1
- package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/esm/models/resolveModel.js.map +1 -1
- package/esm/models/search/CaseSearchModel.js.map +1 -1
- package/esm/models/sorting/SortOptionModel.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/TaskGroupCollection.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/esm/models/user/UserModel.js.map +1 -1
- package/esm/models/user/UserProfileModel.js.map +1 -1
- package/esm/models/user/UserServicesModel.js.map +1 -1
- package/esm/modularui/Authenticate.js.map +1 -1
- package/esm/modularui/CaptchaRequest.js.map +1 -1
- package/esm/modularui/ModularUIError.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/modularui/ModularUIResponse.js.map +1 -1
- package/esm/modularui/UploadRequest.js.map +1 -1
- package/esm/react/ErrorBoundary.js.map +1 -1
- package/esm/react/ErrorBoundaryFallback.js.map +1 -1
- package/esm/react/utils.js.map +1 -1
- package/esm/react-client/Init.js.map +1 -1
- package/esm/react-client/client.js +6 -5
- 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/contextPath.js.map +1 -1
- package/esm/react-server/createSSRComplete.js.map +1 -1
- package/esm/react-server/htmlpage.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/serverNoSSR.js.map +1 -1
- package/esm/react-server/serverSSR.js.map +1 -1
- package/esm/react-server/serverUtil.js.map +1 -1
- package/esm/react-theme/ThemeProvider.js.map +1 -1
- package/esm/react-theme/createTheme.js.map +1 -1
- package/esm/react-theme/useTheme.js.map +1 -1
- package/esm/react-theme/utils/background.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/withModularUI.js.map +1 -1
- package/esm/redux/_router/RouterActions.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/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 +2 -2
- 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/actions/SignOut.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/PanelRenderer.js.map +1 -1
- package/esm/redux/connectors/Preferences.js.map +1 -1
- package/esm/redux/connectors/QuickSearch.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/reducers/createReducer.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/Cache.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/serverFetch.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/checkResource.js.map +1 -1
- package/esm/utils/helpers/createUUID.js.map +1 -1
- package/esm/utils/helpers/objects.js.map +1 -1
- package/esm/utils/helpers/repositoryResource.js.map +1 -1
- package/esm/utils/helpers/sanitizeHtml.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/index.js.map +1 -1
- package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/lib/constants/Constants.js.map +1 -1
- package/lib/constants/LayoutHintConfig.js.map +1 -1
- package/lib/constants/LayoutHints.js.map +1 -1
- package/lib/constants/Settings.js.map +1 -1
- package/lib/constants/index.js.map +1 -1
- package/lib/exceptions/ConfigurationException.js.map +1 -1
- package/lib/exceptions/FetchException.js.map +1 -1
- package/lib/exceptions/IllegalArgumentException.js.map +1 -1
- package/lib/exceptions/IllegalReturnException.js.map +1 -1
- package/lib/exceptions/IllegalStateException.js.map +1 -1
- package/lib/exceptions/JsonParseException.js.map +1 -1
- package/lib/exceptions/MissingPropertyException.js.map +1 -1
- package/lib/exceptions/NetworkException.js.map +1 -1
- package/lib/exceptions/NotAllowedUriException.js.map +1 -1
- package/lib/exceptions/NotFoundException.js.map +1 -1
- package/lib/exceptions/ServerRequestException.js.map +1 -1
- package/lib/exceptions/ThemePropertyException.js.map +1 -1
- package/lib/exceptions/TimeoutException.js.map +1 -1
- package/lib/exceptions/UnauthorizedException.js.map +1 -1
- package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
- package/lib/exceptions/index.js.map +1 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useAllFormsOnModel.js.map +1 -1
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useContent.js.map +1 -1
- package/lib/hooks/useDeepCompareEffect.js.map +1 -1
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useI18n.js.map +1 -1
- package/lib/hooks/useModal.js.map +1 -1
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModels.js.map +1 -1
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useModularUIModel.js.map +1 -1
- package/lib/hooks/useModularUIRequest.js.map +1 -1
- package/lib/hooks/useNotification.js.map +1 -1
- package/lib/hooks/usePreference.js.map +1 -1
- package/lib/hooks/useProgressIndicator.js.map +1 -1
- package/lib/hooks/useRouter.js.map +1 -1
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js.map +1 -1
- package/lib/i18n/Message.js.map +1 -1
- package/lib/i18n/index.js.map +1 -1
- package/lib/i18n/languages.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/models/actions/ActionCollection.js.map +1 -1
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/AttributeModel.js.map +1 -1
- package/lib/models/attributes/AttributeSetModel.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
- package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
- package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
- package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
- package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/lib/models/attributes/StringAttributeModel.js.map +1 -1
- package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
- package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/lib/models/base/BaseCollection.js.map +1 -1
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/base/ResourceCollection.js.map +1 -1
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
- package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/content/ContentIndexModel.js.map +1 -1
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/ContentModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/content/ContentTypeModel.js.map +1 -1
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/content/SubSectionModel.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
- package/lib/models/detail/DetailModel.js.map +1 -1
- package/lib/models/error/ErrorCollection.js.map +1 -1
- package/lib/models/error/ErrorModel.js.map +1 -1
- package/lib/models/error/ErrorResponse.js.map +1 -1
- package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
- package/lib/models/filters/BaseFilterModel.js.map +1 -1
- package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js.map +1 -1
- package/lib/models/filters/FilterModel.js.map +1 -1
- package/lib/models/filters/RangeFilterModel.js.map +1 -1
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/grouping/GroupingModel.js.map +1 -1
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/href/ListHref.js.map +1 -1
- package/lib/models/index.js.map +1 -1
- package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/lib/models/links/LinkCollection.js.map +1 -1
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/links/normalizeLinkJSON.js.map +1 -1
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListHeaderModel.js.map +1 -1
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/list/ListItemModel.js.map +1 -1
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
- package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
- package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/lib/models/paging/PagesizeModel.js.map +1 -1
- package/lib/models/paging/PagingModel.js.map +1 -1
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/parameter/Parameter.js.map +1 -1
- package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/search/CaseSearchModel.js.map +1 -1
- package/lib/models/sorting/SortOptionModel.js.map +1 -1
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
- package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/lib/models/user/UserModel.js.map +1 -1
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/models/user/UserServicesModel.js.map +1 -1
- package/lib/modularui/Authenticate.js.map +1 -1
- package/lib/modularui/CaptchaRequest.js.map +1 -1
- package/lib/modularui/ModularUIError.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/ModularUIResponse.js.map +1 -1
- package/lib/modularui/UploadRequest.js.map +1 -1
- package/lib/modularui/index.js.map +1 -1
- package/lib/react/ErrorBoundary.js.map +1 -1
- package/lib/react/ErrorBoundaryFallback.js.map +1 -1
- package/lib/react/index.js.map +1 -1
- package/lib/react/utils.js.map +1 -1
- package/lib/react-client/Init.js.map +1 -1
- package/lib/react-client/client.js +6 -5
- package/lib/react-client/client.js.flow +14 -7
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-client/contextPath.js.map +1 -1
- package/lib/react-client/index.js.map +1 -1
- package/lib/react-client/rehydrate.js.map +1 -1
- package/lib/react-server/__tests__/serverUtil.spec.js.flow +4 -4
- package/lib/react-server/contextPath.js.map +1 -1
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/htmlpage.js.map +1 -1
- package/lib/react-server/index.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/requestInformation.js.map +1 -1
- package/lib/react-server/serverNoSSR.js.map +1 -1
- package/lib/react-server/serverSSR.js.map +1 -1
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/react-theme/ThemeProvider.js.map +1 -1
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/react-theme/index.js.map +1 -1
- package/lib/react-theme/useTheme.js.map +1 -1
- package/lib/react-theme/utils/background.js.map +1 -1
- package/lib/react-theme/utils/colors.js.map +1 -1
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/react-theme/utils/themeProps.js.map +1 -1
- package/lib/redux/_i18n/I18nActions.js.map +1 -1
- package/lib/redux/_i18n/I18nReducer.js.map +1 -1
- package/lib/redux/_i18n/index.js.map +1 -1
- package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
- package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
- package/lib/redux/_modularui/index.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/RouterActions.js.map +1 -1
- package/lib/redux/_router/RouterConnectors.js.map +1 -1
- package/lib/redux/_router/RouterMiddleware.js.map +1 -1
- package/lib/redux/_router/RouterReducer.js.map +1 -1
- package/lib/redux/_router/index.js.map +1 -1
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/Form.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/lib/redux/actions/FormAutosave.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/FormValidations.js.map +1 -1
- package/lib/redux/actions/Modals.js.map +1 -1
- package/lib/redux/actions/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.js +2 -2
- package/lib/redux/actions/Preferences.js.flow +3 -2
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/actions/ProgressIndicator.js.map +1 -1
- package/lib/redux/actions/SignIn.js.map +1 -1
- package/lib/redux/actions/SignOut.js.map +1 -1
- package/lib/redux/actions/index.js.map +1 -1
- package/lib/redux/connectors/Application.js.map +1 -1
- package/lib/redux/connectors/Breadcrumb.js.map +1 -1
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/Modal.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/Notification.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/Preferences.js.map +1 -1
- package/lib/redux/connectors/Progress.js.map +1 -1
- package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/SignIn.js.map +1 -1
- package/lib/redux/connectors/SignOut.js.map +1 -1
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/connectors/index.js.map +1 -1
- package/lib/redux/index.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.js.map +1 -1
- package/lib/redux/reducers/ErrorReducer.js.map +1 -1
- package/lib/redux/reducers/ModalsReducer.js.map +1 -1
- package/lib/redux/reducers/NotificationReducer.js.map +1 -1
- package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/lib/redux/reducers/createReducer.js.map +1 -1
- package/lib/redux/reducers/index.js.map +1 -1
- package/lib/redux/selectors/i18n.js.map +1 -1
- package/lib/redux/selectors/index.js.map +1 -1
- package/lib/redux/store/beforeRenderHooks.js.map +1 -1
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/utils/browser/Cache.js.map +1 -1
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/fetch/serverFetch.js.map +1 -1
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/checkResource.js.map +1 -1
- package/lib/utils/helpers/createHash.js.map +1 -1
- package/lib/utils/helpers/createUUID.js.map +1 -1
- package/lib/utils/helpers/index.js.map +1 -1
- package/lib/utils/helpers/objects.js.map +1 -1
- package/lib/utils/helpers/repositoryResource.js.map +1 -1
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/helpers/text.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/number/DecimalFormat.js.map +1 -1
- package/lib/utils/number/formatValue.js.map +1 -1
- package/lib/utils/number/parseNumbers.js.map +1 -1
- package/package.json +5 -5
- package/src/react-client/client.js +14 -7
- package/src/react-server/__tests__/serverUtil.spec.js +4 -4
- package/src/redux/actions/Preferences.js +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortOptionModel.js","names":["SortOptionModel","constructor","key","label","group","_key","_group","_label","attribute","getAttributeByKey","selected","_selected","value","sortorder","oppositeDirection","oppositeValue","_sortorder","getHref","listHref","listhref","ListHref","hasPage","prefix","hasParameter","page","sort"],"sources":["../../../src/models/sorting/SortOptionModel.js"],"sourcesContent":["// @flow\nimport type { GroupModel } from \"../grouping/GroupingModel\";\n\nimport ListHref from \"../href/ListHref\";\n\n/**\n */\nclass SortOptionModel {\n _key: string;\n _label: string;\n _group: ?GroupModel;\n _sortorder: \"desc\" | \"asc\" = \"desc\";\n _selected: boolean = false;\n\n /**\n */\n constructor(key: string, label?: string, group?: ?GroupModel) {\n this._key = key;\n this._group = group;\n\n if (label) {\n this._label = label;\n } else if (group) {\n const attribute = group.getAttributeByKey(key);\n if (attribute) {\n this._label = attribute.label;\n }\n }\n }\n\n /**\n */\n get selected(): boolean {\n return this._selected;\n }\n\n /**\n */\n set selected(selected: boolean) {\n this._selected = selected;\n }\n\n /**\n */\n get key(): string {\n return this._key;\n }\n\n /**\n */\n get value(): string {\n return `${this.key} ${this.sortorder}`;\n }\n\n /**\n */\n get oppositeDirection(): \"asc\" | \"desc\" {\n return this.sortorder === \"desc\" ? \"asc\" : \"desc\";\n }\n\n /**\n */\n get oppositeValue(): string {\n return `${this.key} ${this.oppositeDirection}`;\n }\n\n /**\n */\n get label(): string {\n return this._label;\n }\n\n /**\n */\n get sortorder(): \"desc\" | \"asc\" {\n return this._sortorder;\n }\n\n /**\n */\n set sortorder(sortorder: \"desc\" | \"asc\") {\n this._sortorder = sortorder;\n }\n\n /**\n */\n get group(): ?GroupModel {\n return this._group;\n }\n\n /**\n */\n getHref(listHref: ListHref): ListHref {\n const listhref = new ListHref(listHref);\n const hasPage = listhref.prefix\n ? listhref.hasParameter(\"page\", listhref.prefix)\n : listhref.hasParameter(\"page\");\n if (hasPage) {\n listhref.page = 1;\n }\n listhref.sort = this.oppositeValue;\n\n return listhref;\n }\n}\n\nexport default SortOptionModel;\n"],"mappings":";;;;;;;;AAGA;AAEA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"SortOptionModel.js","names":["_ListHref","_interopRequireDefault","require","SortOptionModel","constructor","key","label","group","_defineProperty2","default","_key","_group","_label","attribute","getAttributeByKey","selected","_selected","value","sortorder","oppositeDirection","oppositeValue","_sortorder","getHref","listHref","listhref","ListHref","hasPage","prefix","hasParameter","page","sort","_default","exports"],"sources":["../../../src/models/sorting/SortOptionModel.js"],"sourcesContent":["// @flow\nimport type { GroupModel } from \"../grouping/GroupingModel\";\n\nimport ListHref from \"../href/ListHref\";\n\n/**\n */\nclass SortOptionModel {\n _key: string;\n _label: string;\n _group: ?GroupModel;\n _sortorder: \"desc\" | \"asc\" = \"desc\";\n _selected: boolean = false;\n\n /**\n */\n constructor(key: string, label?: string, group?: ?GroupModel) {\n this._key = key;\n this._group = group;\n\n if (label) {\n this._label = label;\n } else if (group) {\n const attribute = group.getAttributeByKey(key);\n if (attribute) {\n this._label = attribute.label;\n }\n }\n }\n\n /**\n */\n get selected(): boolean {\n return this._selected;\n }\n\n /**\n */\n set selected(selected: boolean) {\n this._selected = selected;\n }\n\n /**\n */\n get key(): string {\n return this._key;\n }\n\n /**\n */\n get value(): string {\n return `${this.key} ${this.sortorder}`;\n }\n\n /**\n */\n get oppositeDirection(): \"asc\" | \"desc\" {\n return this.sortorder === \"desc\" ? \"asc\" : \"desc\";\n }\n\n /**\n */\n get oppositeValue(): string {\n return `${this.key} ${this.oppositeDirection}`;\n }\n\n /**\n */\n get label(): string {\n return this._label;\n }\n\n /**\n */\n get sortorder(): \"desc\" | \"asc\" {\n return this._sortorder;\n }\n\n /**\n */\n set sortorder(sortorder: \"desc\" | \"asc\") {\n this._sortorder = sortorder;\n }\n\n /**\n */\n get group(): ?GroupModel {\n return this._group;\n }\n\n /**\n */\n getHref(listHref: ListHref): ListHref {\n const listhref = new ListHref(listHref);\n const hasPage = listhref.prefix\n ? listhref.hasParameter(\"page\", listhref.prefix)\n : listhref.hasParameter(\"page\");\n if (hasPage) {\n listhref.page = 1;\n }\n listhref.sort = this.oppositeValue;\n\n return listhref;\n }\n}\n\nexport default SortOptionModel;\n"],"mappings":";;;;;;;;AAGA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA;AACA;AACA,MAAMC,eAAe,CAAC;EAOpB;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,CAAA,EAAW;IAClB,OAAO,IAAI,CAACM,MAAM;EACpB;;EAEA;AACF;EACE,IAAIM,SAASA,CAAA,EAAmB;IAC9B,OAAO,IAAI,CAACG,UAAU;EACxB;;EAEA;AACF;EACE,IAAIH,SAASA,CAACA,SAAyB,EAAE;IACvC,IAAI,CAACG,UAAU,GAAGH,SAAS;EAC7B;;EAEA;AACF;EACE,IAAIX,KAAKA,CAAA,EAAgB;IACvB,OAAO,IAAI,CAACI,MAAM;EACpB;;EAEA;AACF;EACEW,OAAOA,CAACC,QAAkB,EAAY;IACpC,MAAMC,QAAQ,GAAG,IAAIC,iBAAQ,CAACF,QAAQ,CAAC;IACvC,MAAMG,OAAO,GAAGF,QAAQ,CAACG,MAAM,GAC3BH,QAAQ,CAACI,YAAY,CAAC,MAAM,EAAEJ,QAAQ,CAACG,MAAM,CAAC,GAC9CH,QAAQ,CAACI,YAAY,CAAC,MAAM,CAAC;IACjC,IAAIF,OAAO,EAAE;MACXF,QAAQ,CAACK,IAAI,GAAG,CAAC;IACnB;IACAL,QAAQ,CAACM,IAAI,GAAG,IAAI,CAACV,aAAa;IAElC,OAAOI,QAAQ;EACjB;AACF;AAAC,IAAAO,QAAA,GAEc5B,eAAe;AAAA6B,OAAA,CAAAvB,OAAA,GAAAsB,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortingModel.js","names":["SortingModel","BaseCollection","constructor","contributions","labels","grouping","currentSort","has","sorting","collection","attributes","attributeKey","label","group","getGroupByAttributeKey","SortOptionModel","setSelected","name","value","option","selected","join","param","options","split","forEach","sortItem","key","direction","sortorder","getUpdateQuerystring","optionKey","IllegalArgumentException","oppositeValue","getUpdateQuerystringBySortOption","sortOption","createListHref","listHref","listhref","ListHref","hasPage","prefix","hasParameter","page","sort"],"sources":["../../../src/models/sorting/SortingModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport BaseCollection from \"../base/BaseCollection\";\nimport SortOptionModel from \"../sorting/SortOptionModel\";\nimport ListHref from \"../href/ListHref\";\n\nimport type GroupingModel from \"../grouping/GroupingModel\";\nimport IllegalArgumentException from \"../../exceptions/IllegalArgumentException\";\n\n/**\n */\nclass SortingModel extends BaseCollection<SortOptionModel> {\n /**\n */\n constructor(\n contributions: Object,\n labels: { [key: string]: string },\n grouping: GroupingModel,\n currentSort: string\n ) {\n super();\n\n if (has(contributions?.sorting, \"attributes\")) {\n this.collection = contributions.sorting.attributes.map((attributeKey) => {\n const label = labels[attributeKey];\n const group = grouping && grouping.getGroupByAttributeKey(attributeKey);\n\n return new SortOptionModel(attributeKey, label, group);\n });\n\n this.setSelected(currentSort);\n }\n }\n\n /**\n */\n get name(): string {\n return \"sort\";\n }\n\n /**\n */\n get value(): string {\n return this.filter((option) => option.selected)\n .map((option) => option.value)\n .join(\",\");\n }\n\n /**\n */\n get param(): string {\n return this.value;\n }\n\n /**\n */\n get options(): Array<SortOptionModel> {\n return this.collection;\n }\n\n /**\n */\n setSelected(currentSort: string = \"\") {\n currentSort.split(\",\").forEach((sortItem) => {\n const [key, direction] = sortItem.split(\" \");\n\n this.collection.forEach((option) => {\n if (option.key === key) {\n option.selected = true;\n if (direction === \"asc\") {\n option.sortorder = \"asc\";\n } else if (direction === \"desc\") {\n option.sortorder = \"desc\";\n }\n }\n });\n });\n }\n\n /**\n * Retrieve a sort option from the model that can be used in the querystring to set it in the opposite direction\n * For example a sort option in the model with key books and direction descending will be retrieved as 'Books asc'\n */\n getUpdateQuerystring(optionKey: string): string {\n if (!optionKey) {\n throw new IllegalArgumentException(\n \"Missing option key as input argument\"\n );\n }\n\n return this.filter((option) => option.key === optionKey)\n .map((option) =>\n option.key === optionKey ? option.oppositeValue : option.value\n )\n .join(\",\");\n }\n\n /**\n * @see {@link getUpdateQuerystring}\n */\n getUpdateQuerystringBySortOption(sortOption: SortOptionModel): string {\n if (!(sortOption instanceof SortOptionModel)) {\n throw new IllegalArgumentException(\n \"Missing SortOptionModel as input argument\"\n );\n }\n\n return this.getUpdateQuerystring(sortOption.key);\n }\n\n /**\n */\n createListHref(listHref: ListHref, sortOption: SortOptionModel): ListHref {\n const listhref = new ListHref(listHref);\n const hasPage = listhref.prefix\n ? listhref.hasParameter(\"page\", listhref.prefix)\n : listhref.hasParameter(\"page\");\n if (hasPage) {\n listhref.page = 1;\n }\n listhref.sort = this.getUpdateQuerystringBySortOption(sortOption);\n\n return listhref;\n }\n}\n\nexport default SortingModel;\n"],"mappings":";;;;;;;;;AACA;AAEA;AACA;AACA;AAGA;AAEA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"SortingModel.js","names":["_objects","require","_BaseCollection","_interopRequireDefault","_SortOptionModel","_ListHref","_IllegalArgumentException","SortingModel","BaseCollection","constructor","contributions","labels","grouping","currentSort","has","sorting","_context","collection","_map","default","attributes","call","attributeKey","label","group","getGroupByAttributeKey","SortOptionModel","setSelected","name","value","_context2","_context3","_filter","option","selected","join","param","options","arguments","length","undefined","split","forEach","sortItem","key","direction","sortorder","getUpdateQuerystring","optionKey","_context4","_context5","IllegalArgumentException","oppositeValue","getUpdateQuerystringBySortOption","sortOption","createListHref","listHref","listhref","ListHref","hasPage","prefix","hasParameter","page","sort","_default","exports"],"sources":["../../../src/models/sorting/SortingModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport BaseCollection from \"../base/BaseCollection\";\nimport SortOptionModel from \"../sorting/SortOptionModel\";\nimport ListHref from \"../href/ListHref\";\n\nimport type GroupingModel from \"../grouping/GroupingModel\";\nimport IllegalArgumentException from \"../../exceptions/IllegalArgumentException\";\n\n/**\n */\nclass SortingModel extends BaseCollection<SortOptionModel> {\n /**\n */\n constructor(\n contributions: Object,\n labels: { [key: string]: string },\n grouping: GroupingModel,\n currentSort: string\n ) {\n super();\n\n if (has(contributions?.sorting, \"attributes\")) {\n this.collection = contributions.sorting.attributes.map((attributeKey) => {\n const label = labels[attributeKey];\n const group = grouping && grouping.getGroupByAttributeKey(attributeKey);\n\n return new SortOptionModel(attributeKey, label, group);\n });\n\n this.setSelected(currentSort);\n }\n }\n\n /**\n */\n get name(): string {\n return \"sort\";\n }\n\n /**\n */\n get value(): string {\n return this.filter((option) => option.selected)\n .map((option) => option.value)\n .join(\",\");\n }\n\n /**\n */\n get param(): string {\n return this.value;\n }\n\n /**\n */\n get options(): Array<SortOptionModel> {\n return this.collection;\n }\n\n /**\n */\n setSelected(currentSort: string = \"\") {\n currentSort.split(\",\").forEach((sortItem) => {\n const [key, direction] = sortItem.split(\" \");\n\n this.collection.forEach((option) => {\n if (option.key === key) {\n option.selected = true;\n if (direction === \"asc\") {\n option.sortorder = \"asc\";\n } else if (direction === \"desc\") {\n option.sortorder = \"desc\";\n }\n }\n });\n });\n }\n\n /**\n * Retrieve a sort option from the model that can be used in the querystring to set it in the opposite direction\n * For example a sort option in the model with key books and direction descending will be retrieved as 'Books asc'\n */\n getUpdateQuerystring(optionKey: string): string {\n if (!optionKey) {\n throw new IllegalArgumentException(\n \"Missing option key as input argument\"\n );\n }\n\n return this.filter((option) => option.key === optionKey)\n .map((option) =>\n option.key === optionKey ? option.oppositeValue : option.value\n )\n .join(\",\");\n }\n\n /**\n * @see {@link getUpdateQuerystring}\n */\n getUpdateQuerystringBySortOption(sortOption: SortOptionModel): string {\n if (!(sortOption instanceof SortOptionModel)) {\n throw new IllegalArgumentException(\n \"Missing SortOptionModel as input argument\"\n );\n }\n\n return this.getUpdateQuerystring(sortOption.key);\n }\n\n /**\n */\n createListHref(listHref: ListHref, sortOption: SortOptionModel): ListHref {\n const listhref = new ListHref(listHref);\n const hasPage = listhref.prefix\n ? listhref.hasParameter(\"page\", listhref.prefix)\n : listhref.hasParameter(\"page\");\n if (hasPage) {\n listhref.page = 1;\n }\n listhref.sort = this.getUpdateQuerystringBySortOption(sortOption);\n\n return listhref;\n }\n}\n\nexport default SortingModel;\n"],"mappings":";;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,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EAAA3B,IAAA,CAAA4B,SAAA,EAChDhB,MAAM,IACVA,MAAM,CAACW,GAAG,KAAKI,SAAS,GAAGf,MAAM,CAACmB,aAAa,GAAGnB,MAAM,CAACJ,KAAK,CAC/D,CACAM,IAAI,CAAC,GAAG,CAAC;EACd;;EAEA;AACF;AACA;EACEkB,gCAAgCA,CAACC,UAA2B,EAAU;IACpE,IAAI,EAAEA,UAAU,YAAY5B,wBAAe,CAAC,EAAE;MAC5C,MAAM,IAAIyB,iCAAwB,CAChC,2CAA2C,CAC5C;IACH;IAEA,OAAO,IAAI,CAACJ,oBAAoB,CAACO,UAAU,CAACV,GAAG,CAAC;EAClD;;EAEA;AACF;EACEW,cAAcA,CAACC,QAAkB,EAAEF,UAA2B,EAAY;IACxE,MAAMG,QAAQ,GAAG,IAAIC,iBAAQ,CAACF,QAAQ,CAAC;IACvC,MAAMG,OAAO,GAAGF,QAAQ,CAACG,MAAM,GAC3BH,QAAQ,CAACI,YAAY,CAAC,MAAM,EAAEJ,QAAQ,CAACG,MAAM,CAAC,GAC9CH,QAAQ,CAACI,YAAY,CAAC,MAAM,CAAC;IACjC,IAAIF,OAAO,EAAE;MACXF,QAAQ,CAACK,IAAI,GAAG,CAAC;IACnB;IACAL,QAAQ,CAACM,IAAI,GAAG,IAAI,CAACV,gCAAgC,CAACC,UAAU,CAAC;IAEjE,OAAOG,QAAQ;EACjB;AACF;AAAC,IAAAO,QAAA,GAEczD,YAAY;AAAA0D,OAAA,CAAA9C,OAAA,GAAA6C,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabModel.js","names":["TabModel","ResourceModel","constructor","modularuiResponse","createTaskGroupCollection","_actionCollection","ActionCollection","data","actions","contributions","type","modelName","isApplicableModel","resourcetype","getInitialChildModelLinks","links","getLinksByGroup","all","setChildModels","models","taskGroups","i","length","TaskGroupModel","push","taskGroupCollection","add","searchLink","first","taskgroups","taskgroup","taskgroupContributions","taskgroupContribution","name","create","_taskGroupCollection","TaskGroupCollection","label","getContribution","components","actionCollection","hasComponents","size","hasTaskGroups","hasItems","hasActions"],"sources":["../../../src/models/tab/TabModel.js"],"sourcesContent":["// @flow\nimport TaskGroupCollection from \"../taskgroup/TaskGroupCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\nimport TaskGroupModel from \"../taskgroup/TaskGroupModel\";\nimport ActionCollection from \"../actions/ActionCollection\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type LinkCollection from \"../links/LinkCollection\";\n\n/**\n * Describes a TabModel\n */\nexport default class TabModel extends ResourceModel {\n _actionCollection: ActionCollection;\n _taskGroupCollection: TaskGroupCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this.createTaskGroupCollection();\n\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n }\n\n /**\n */\n get type(): string {\n return \"Tab\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"TabModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n (data.contributions.resourcetype.endsWith(\"Tab\") ||\n data.contributions.resourcetype.endsWith(\"KnowledgeBank\"))\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.links.getLinksByGroup(\"taskgroup\", \"actions\").all;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n const taskGroups = [];\n\n for (let i = 0; i < models.length; i++) {\n if (models[i] instanceof TaskGroupModel) {\n taskGroups.push(models[i]);\n }\n }\n\n this.taskGroupCollection.add(taskGroups);\n }\n\n /**\n */\n get searchLink(): ?LinkModel {\n return this.links.getLinksByGroup(\"search\").first;\n }\n\n /**\n */\n createTaskGroupCollection() {\n this.taskGroupCollection = this.data.taskgroups\n ? this.data.taskgroups\n .map((taskgroup) => {\n const taskgroupContributions = this.contributions.taskgroups.find(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n );\n\n if (taskgroupContributions) {\n return TaskGroupModel.create(\n taskgroup.name,\n taskgroup,\n taskgroupContributions\n );\n }\n\n return null;\n })\n .filter((taskgroup) => taskgroup != null)\n : [];\n }\n\n /**\n * Getting the taskgrouppanels on the tab\n */\n get taskGroupCollection(): TaskGroupCollection {\n return this._taskGroupCollection;\n }\n\n /**\n * Setting the taskgroup panel collection\n */\n set taskGroupCollection(taskgroups: Array<TaskGroupModel>) {\n this._taskGroupCollection = new TaskGroupCollection(taskgroups);\n }\n\n /**\n * Getting the label of the tab\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Getting the component links on the tab\n */\n get components(): LinkCollection {\n return this.links.getLinksByGroup(\"component\", \"search\");\n }\n\n /**\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n\n /**\n * Has component links\n */\n hasComponents(): boolean {\n return this.components.size > 0;\n }\n\n /**\n * Has taskgroups\n */\n hasTaskGroups(): boolean {\n return this.taskGroupCollection && this.taskGroupCollection?.hasItems;\n }\n\n /**\n */\n hasActions(): boolean {\n return this.actionCollection && this.actionCollection.hasItems;\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACe,
|
|
1
|
+
{"version":3,"file":"TabModel.js","names":["_TaskGroupCollection","_interopRequireDefault","require","_ResourceModel","_TaskGroupModel","_ActionCollection","TabModel","ResourceModel","constructor","modularuiResponse","_defineProperty2","default","createTaskGroupCollection","_actionCollection","ActionCollection","data","actions","contributions","type","modelName","isApplicableModel","_context","_context2","resourcetype","_endsWith","call","getInitialChildModelLinks","links","getLinksByGroup","all","setChildModels","models","taskGroups","i","length","TaskGroupModel","push","taskGroupCollection","add","searchLink","first","_context3","_context4","taskgroups","_filter","_map","taskgroup","_context5","taskgroupContributions","_find","taskgroupContribution","name","create","_taskGroupCollection","TaskGroupCollection","label","getContribution","components","actionCollection","hasComponents","size","hasTaskGroups","hasItems","hasActions","exports"],"sources":["../../../src/models/tab/TabModel.js"],"sourcesContent":["// @flow\nimport TaskGroupCollection from \"../taskgroup/TaskGroupCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\nimport TaskGroupModel from \"../taskgroup/TaskGroupModel\";\nimport ActionCollection from \"../actions/ActionCollection\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type LinkCollection from \"../links/LinkCollection\";\n\n/**\n * Describes a TabModel\n */\nexport default class TabModel extends ResourceModel {\n _actionCollection: ActionCollection;\n _taskGroupCollection: TaskGroupCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this.createTaskGroupCollection();\n\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n }\n\n /**\n */\n get type(): string {\n return \"Tab\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"TabModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n (data.contributions.resourcetype.endsWith(\"Tab\") ||\n data.contributions.resourcetype.endsWith(\"KnowledgeBank\"))\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.links.getLinksByGroup(\"taskgroup\", \"actions\").all;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n const taskGroups = [];\n\n for (let i = 0; i < models.length; i++) {\n if (models[i] instanceof TaskGroupModel) {\n taskGroups.push(models[i]);\n }\n }\n\n this.taskGroupCollection.add(taskGroups);\n }\n\n /**\n */\n get searchLink(): ?LinkModel {\n return this.links.getLinksByGroup(\"search\").first;\n }\n\n /**\n */\n createTaskGroupCollection() {\n this.taskGroupCollection = this.data.taskgroups\n ? this.data.taskgroups\n .map((taskgroup) => {\n const taskgroupContributions = this.contributions.taskgroups.find(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n );\n\n if (taskgroupContributions) {\n return TaskGroupModel.create(\n taskgroup.name,\n taskgroup,\n taskgroupContributions\n );\n }\n\n return null;\n })\n .filter((taskgroup) => taskgroup != null)\n : [];\n }\n\n /**\n * Getting the taskgrouppanels on the tab\n */\n get taskGroupCollection(): TaskGroupCollection {\n return this._taskGroupCollection;\n }\n\n /**\n * Setting the taskgroup panel collection\n */\n set taskGroupCollection(taskgroups: Array<TaskGroupModel>) {\n this._taskGroupCollection = new TaskGroupCollection(taskgroups);\n }\n\n /**\n * Getting the label of the tab\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Getting the component links on the tab\n */\n get components(): LinkCollection {\n return this.links.getLinksByGroup(\"component\", \"search\");\n }\n\n /**\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n\n /**\n * Has component links\n */\n hasComponents(): boolean {\n return this.components.size > 0;\n }\n\n /**\n * Has taskgroups\n */\n hasTaskGroups(): boolean {\n return this.taskGroupCollection && this.taskGroupCollection?.hasItems;\n }\n\n /**\n */\n hasActions(): boolean {\n return this.actionCollection && this.actionCollection.hasItems;\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,oBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAOA;AACA;AACA;AACe,MAAMI,QAAQ,SAASC,sBAAa,CAAC;EAIlD;AACF;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAEzB,IAAI,CAACC,yBAAyB,EAAE;IAEhC,IAAI,CAACC,iBAAiB,GAAG,IAAIC,yBAAgB,CAC3C,IAAI,CAACC,IAAI,CAACC,O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AQ,CAAC;EAC1D;;EAEA;AACF;EACE,IAAI8B,gBAAgBA,CAAA,EAAqB;IACvC,OAAO,IAAI,CAAC7C,iBAAiB;EAC/B;;EAEA;AACF;AACA;EACE8C,aAAaA,CAAA,EAAY;IACvB,OAAO,IAAI,CAACF,UAAU,CAACG,IAAI,GAAG,CAAC;EACjC;;EAEA;AACF;AACA;EACEC,aAAaA,CAAA,EAAY;IACvB,OAAO,IAAI,CAACxB,mBAAmB,IAAI,IAAI,CAACA,mBAAmB,EAAEyB,QAAQ;EACvE;;EAEA;AACF;EACEC,UAAUA,CAAA,EAAY;IACpB,OAAO,IAAI,CAACL,gBAAgB,IAAI,IAAI,CAACA,gBAAgB,CAACI,QAAQ;EAChE;AACF;AAACE,OAAA,CAAArD,OAAA,GAAAL,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskGroupCollection.js","names":["TaskGroupCollection","BaseCollection","hasTasks","hasItems","collection","some","taskgroup","actionCollection","length"],"sources":["../../../src/models/taskgroup/TaskGroupCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\n\nimport type TaskGroupModel from \"../taskgroup/TaskGroupModel\";\n\n/**\n * Collection of taskgroup models\n */\nexport default class TaskGroupCollection extends BaseCollection<TaskGroupModel> {\n /**\n * Indicates if the taskgroup collection has has tasks\n */\n hasTasks(): boolean {\n return (\n this.hasItems &&\n this.collection.some((taskgroup) => taskgroup.actionCollection.length > 0)\n );\n }\n}\n"],"mappings":";;;;;;;AACA;AAIA;AACA;AACA;AACe,
|
|
1
|
+
{"version":3,"file":"TaskGroupCollection.js","names":["_BaseCollection","_interopRequireDefault","require","TaskGroupCollection","BaseCollection","hasTasks","hasItems","collection","some","taskgroup","actionCollection","length","exports","default"],"sources":["../../../src/models/taskgroup/TaskGroupCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\n\nimport type TaskGroupModel from \"../taskgroup/TaskGroupModel\";\n\n/**\n * Collection of taskgroup models\n */\nexport default class TaskGroupCollection extends BaseCollection<TaskGroupModel> {\n /**\n * Indicates if the taskgroup collection has has tasks\n */\n hasTasks(): boolean {\n return (\n this.hasItems &&\n this.collection.some((taskgroup) => taskgroup.actionCollection.length > 0)\n );\n }\n}\n"],"mappings":";;;;;;;AACA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACA;AACe,MAAMC,mBAAmB,SAASC,uBAAc,CAAiB;EAC9E;AACF;AACA;EACEC,QAAQA,CAAA,EAAY;IAClB,OACE,IAAI,CAACC,QAAQ,IACb,IAAI,CAACC,UAAU,CAACC,IAAI,CAAEC,SAAS,IAAKA,SAAS,CAACC,gBAAgB,CAACC,MAAM,GAAG,CAAC,CAAC;EAE9E;AACF;AAACC,OAAA,CAAAC,OAAA,GAAAV,mBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskGroupModel.js","names":["TaskGroupModel","ResourceModel","constructor","modularuiResponse","_actionCollection","ActionCollection","data","actions","contributions","selfHref","links","getLinkByKey","selflink","href","_key","substring","lastIndexOf","name","create","key","taskgroup","ModularUIResponse","type","modelName","isApplicableModel","resourcetype","label","actionCollection"],"sources":["../../../src/models/taskgroup/TaskGroupModel.js"],"sourcesContent":["// @flow\nimport ActionCollection from \"../actions/ActionCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\n/**\n * TaskGroupModel\n */\nexport default class TaskGroupModel extends ResourceModel {\n _key: string;\n _actionCollection: ActionCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n\n const selfHref = this.links.getLinkByKey(\"self\")\n ? this.selflink.href.href\n : null;\n\n this._key = selfHref\n ? selfHref.substring(selfHref.lastIndexOf(\"/\") + 1)\n : this.data.name;\n }\n\n /**\n */\n static create(\n key: string,\n data: Object,\n contributions: Object\n ): TaskGroupModel {\n const taskgroup = new ModularUIResponse();\n taskgroup.key = key;\n taskgroup.data = data;\n taskgroup.contributions = contributions;\n\n return new TaskGroupModel(taskgroup);\n }\n\n /**\n */\n get type(): string {\n return \"TaskGroup\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"TaskGroupModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"TaskGroup\"\n );\n }\n\n /**\n * Get the key of the TaskGroup\n */\n get key(): string {\n return this._key;\n }\n\n /**\n * Get the label of the TaskGroup\n */\n get label(): string {\n return this.contributions.label;\n }\n\n /**\n * Retrieve actions of taskgroup\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n}\n"],"mappings":";;;;;;;;AACA;AACA;AAEA;AAEA;AACA;AACA;AACe,
|
|
1
|
+
{"version":3,"file":"TaskGroupModel.js","names":["_ActionCollection","_interopRequireDefault","require","_ResourceModel","_ModularUIResponse","TaskGroupModel","ResourceModel","constructor","modularuiResponse","_defineProperty2","default","_actionCollection","ActionCollection","data","actions","contributions","selfHref","links","getLinkByKey","selflink","href","_key","substring","lastIndexOf","name","create","key","taskgroup","ModularUIResponse","type","modelName","isApplicableModel","resourcetype","label","actionCollection","exports"],"sources":["../../../src/models/taskgroup/TaskGroupModel.js"],"sourcesContent":["// @flow\nimport ActionCollection from \"../actions/ActionCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\n/**\n * TaskGroupModel\n */\nexport default class TaskGroupModel extends ResourceModel {\n _key: string;\n _actionCollection: ActionCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n\n const selfHref = this.links.getLinkByKey(\"self\")\n ? this.selflink.href.href\n : null;\n\n this._key = selfHref\n ? selfHref.substring(selfHref.lastIndexOf(\"/\") + 1)\n : this.data.name;\n }\n\n /**\n */\n static create(\n key: string,\n data: Object,\n contributions: Object\n ): TaskGroupModel {\n const taskgroup = new ModularUIResponse();\n taskgroup.key = key;\n taskgroup.data = data;\n taskgroup.contributions = contributions;\n\n return new TaskGroupModel(taskgroup);\n }\n\n /**\n */\n get type(): string {\n return \"TaskGroup\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"TaskGroupModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"TaskGroup\"\n );\n }\n\n /**\n * Get the key of the TaskGroup\n */\n get key(): string {\n return this._key;\n }\n\n /**\n * Get the label of the TaskGroup\n */\n get label(): string {\n return this.contributions.label;\n }\n\n /**\n * Retrieve actions of taskgroup\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,kBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA;AACA;AACA;AACe,MAAMG,cAAc,SAASC,sBAAa,CAAC;EAIxD;AACF;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAEzB,IAAI,CAACC,iBAAiB,GAAG,IAAIC,yBAAgB,CAC3C,IAAI,CAACC,IAAI,CAACC,OAAO,EACjB,IAAI,CAACC,aAAa,CAACD,OAAO,CAC3B;IAED,MAAME,QAAQ,GAAG,IAAI,CAACC,KAAK,CAACC,YAAY,CAAC,MAAM,CAAC,GAC5C,IAAI,CAACC,QAAQ,CAACC,IAAI,CAACA,IAAI,GACvB,IAAI;IAER,IAAI,CAACC,IAAI,GAAGL,QAAQ,GAChBA,QAAQ,CAACM,SAAS,CAACN,QAAQ,CAACO,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GACjD,IAAI,CAACV,IAAI,CAACW,IAAI;EACpB;;EAEA;AACF;EACE,OAAOC,MAAMA,CACXC,GAAW,EACXb,IAAY,EACZE,aAAqB,EACL;IAChB,MAAMY,SAAS,GAAG,IAAIC,0BAAiB,EAAE;IACzCD,SAAS,CAACD,GAAG,GAAGA,GAAG;IACnBC,SAAS,CAACd,IAAI,GAAGA,IAAI;IACrBc,SAAS,CAACZ,aAAa,GAAGA,aAAa;IAEvC,OAAO,IAAIV,cAAc,CAACsB,SAAS,CAAC;EACtC;;EAEA;AACF;EACE,IAAIE,IAAIA,CAAA,EAAW;IACjB,OAAO,WAAW;EACpB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,gBAAgB;EACzB;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAAClB,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACE,aAAa,CAACiB,YAAY,IAC/BnB,IAAI,CAACE,aAAa,CAACiB,YAAY,KAAK,WAAW;EAEnD;;EAEA;AACF;AACA;EACE,IAAIN,GAAGA,CAAA,EAAW;IAChB,OAAO,IAAI,CAACL,IAAI;EAClB;;EAEA;AACF;AACA;EACE,IAAIY,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAAClB,aAAa,CAACkB,KAAK;EACjC;;EAEA;AACF;AACA;EACE,IAAIC,gBAAgBA,CAAA,EAAqB;IACvC,OAAO,IAAI,CAACvB,iBAAiB;EAC/B;AACF;AAACwB,OAAA,CAAAzB,OAAA,GAAAL,cAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserModel.js","names":["UserModel","ResourceModel","type","modelName","isApplicableModel","data","contributions","resourcetype","username","Username","fullname","Fullname","label"],"sources":["../../../src/models/user/UserModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n * User model\n */\nexport default class UserModel extends ResourceModel {\n /**\n */\n get type(): string {\n return \"User\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"UserModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"userdata\"\n );\n }\n\n /**\n * Retrieve username of user\n */\n get username(): string {\n return this.data.Username || \"Guest\";\n }\n\n /**\n * retrieve the fullname of the user\n */\n get fullname(): string {\n return this.data.Fullname || \"Guest\";\n }\n\n /**\n */\n get label(): string {\n return this.contributions.label;\n }\n}\n"],"mappings":";;;;;;;AACA;AAIA;AACA;AACA;AACe,
|
|
1
|
+
{"version":3,"file":"UserModel.js","names":["_ResourceModel","_interopRequireDefault","require","UserModel","ResourceModel","type","modelName","isApplicableModel","data","contributions","resourcetype","username","Username","fullname","Fullname","label","exports","default"],"sources":["../../../src/models/user/UserModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n * User model\n */\nexport default class UserModel extends ResourceModel {\n /**\n */\n get type(): string {\n return \"User\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"UserModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"userdata\"\n );\n }\n\n /**\n * Retrieve username of user\n */\n get username(): string {\n return this.data.Username || \"Guest\";\n }\n\n /**\n * retrieve the fullname of the user\n */\n get fullname(): string {\n return this.data.Fullname || \"Guest\";\n }\n\n /**\n */\n get label(): string {\n return this.contributions.label;\n }\n}\n"],"mappings":";;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACA;AACe,MAAMC,SAAS,SAASC,sBAAa,CAAC;EACnD;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,MAAM;EACf;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,WAAW;EACpB;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACC,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,UAAU;EAElD;;EAEA;AACF;AACA;EACE,IAAIC,QAAQA,CAAA,EAAW;IACrB,OAAO,IAAI,CAACH,IAAI,CAACI,QAAQ,IAAI,OAAO;EACtC;;EAEA;AACF;AACA;EACE,IAAIC,QAAQA,CAAA,EAAW;IACrB,OAAO,IAAI,CAACL,IAAI,CAACM,QAAQ,IAAI,OAAO;EACtC;;EAEA;AACF;EACE,IAAIC,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAACN,aAAa,CAACM,KAAK;EACjC;AACF;AAACC,OAAA,CAAAC,OAAA,GAAAd,SAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserProfileModel.js","names":["UserProfileModel","UserModel","constructor","modularuiResponse","attributeContributions","contributions","attributes","contribution","key","has","data","_attributeCollection","AttributeCollection","type","attributeCollection","modelName"],"sources":["../../../src/models/user/UserProfileModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport AttributeCollection from \"../attributes/AttributeCollection\";\n\nimport UserModel from \"./UserModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n * User model\n */\nexport default class UserProfileModel extends UserModel {\n _attributeCollection: AttributeCollection;\n\n /**\n * constructor\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n const attributeContributions = this.contributions.attributes\n ? this.contributions.attributes.filter((contribution) => {\n const [key] = Object.keys(contribution);\n return key !== \"sessiondata\" && has(this.data, key);\n })\n : [];\n\n this._attributeCollection = new AttributeCollection(\n this.data,\n attributeContributions\n );\n }\n\n /**\n */\n get type(): string {\n return \"UserProfile\";\n }\n\n /**\n * returns all the attributes from the attribute collection\n */\n get attributeCollection(): AttributeCollection {\n return this._attributeCollection;\n }\n\n /**\n */\n static get modelName(): string {\n return \"UserProfileModel\";\n }\n}\n"],"mappings":";;;;;;;;;;AACA;AAEA;AAEA;AAIA;AACA;AACA;AACe,
|
|
1
|
+
{"version":3,"file":"UserProfileModel.js","names":["_objects","require","_AttributeCollection","_interopRequireDefault","_UserModel","UserProfileModel","UserModel","constructor","modularuiResponse","_context","_defineProperty2","default","attributeContributions","contributions","attributes","_filter","call","contribution","key","_keys","has","data","_attributeCollection","AttributeCollection","type","attributeCollection","modelName","exports"],"sources":["../../../src/models/user/UserProfileModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport AttributeCollection from \"../attributes/AttributeCollection\";\n\nimport UserModel from \"./UserModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n * User model\n */\nexport default class UserProfileModel extends UserModel {\n _attributeCollection: AttributeCollection;\n\n /**\n * constructor\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n const attributeContributions = this.contributions.attributes\n ? this.contributions.attributes.filter((contribution) => {\n const [key] = Object.keys(contribution);\n return key !== \"sessiondata\" && has(this.data, key);\n })\n : [];\n\n this._attributeCollection = new AttributeCollection(\n this.data,\n attributeContributions\n );\n }\n\n /**\n */\n get type(): string {\n return \"UserProfile\";\n }\n\n /**\n * returns all the attributes from the attribute collection\n */\n get attributeCollection(): AttributeCollection {\n return this._attributeCollection;\n }\n\n /**\n */\n static get modelName(): string {\n return \"UserProfileModel\";\n }\n}\n"],"mappings":";;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAD,sBAAA,CAAAF,OAAA;AAIA;AACA;AACA;AACe,MAAMI,gBAAgB,SAASC,kBAAS,CAAC;EAGtD;AACF;AACA;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAAA,IAAAC,QAAA;IAChD,KAAK,CAACD,iBAAiB,CAAC;IAAC,IAAAE,gBAAA,CAAAC,OAAA;IAEzB,MAAMC,sBAAsB,GAAG,IAAI,CAACC,aAAa,CAACC,UAAU,GACxD,IAAAC,OAAA,CAAAJ,OAAA,EAAAF,QAAA,OAAI,CAACI,aAAa,CAACC,UAAU,EAAAE,IAAA,CAAAP,QAAA,EAASQ,YAAY,IAAK;MACrD,MAAM,CAACC,GAAG,CAAC,GAAG,IAAAC,KAAA,CAAAR,OAAA,EAAYM,YAAY,CAAC;MACvC,OAAOC,GAAG,KAAK,aAAa,IAAI,IAAAE,YAAG,EAAC,IAAI,CAACC,IAAI,EAAEH,GAAG,CAAC;IACrD,CAAC,CAAC,GACF,EAAE;IAEN,IAAI,CAACI,oBAAoB,GAAG,IAAIC,4BAAmB,CACjD,IAAI,CAACF,IAAI,EACTT,sBAAsB,CACvB;EACH;;EAEA;AACF;EACE,IAAIY,IAAIA,CAAA,EAAW;IACjB,OAAO,aAAa;EACtB;;EAEA;AACF;AACA;EACE,IAAIC,mBAAmBA,CAAA,EAAwB;IAC7C,OAAO,IAAI,CAACH,oBAAoB;EAClC;;EAEA;AACF;EACE,WAAWI,SAASA,CAAA,EAAW;IAC7B,OAAO,kBAAkB;EAC3B;AACF;AAACC,OAAA,CAAAhB,OAAA,GAAAN,gBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserServicesModel.js","names":["UserServicesModel","ResourceModel","type","modelName","isApplicableModel","data","contributions","resourcetype","getInitialChildModelLinks","userData","userLink","setChildModels","models","user","model","links","getLinkByKey","_user","UserModel","label","getContribution","changePassword","changePasswordLink","href","isLoggedIn","hasUser","UNSECURE_LINK_COUNT","length"],"sources":["../../../src/models/user/UserServicesModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport UserModel from \"../user/UserModel\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\n\n/**\n * UserServicesModel model\n */\nclass UserServicesModel extends ResourceModel {\n _user: ?UserModel;\n\n /**\n */\n get type(): string {\n return \"UserServices\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"UserServicesModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"user_services\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const userData = this.userLink;\n return userData ? [userData] : [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.user = models.find((model) => model.type === \"User\");\n }\n\n /**\n */\n get userLink(): LinkModel | null {\n return this.links.getLinkByKey(\"Userdata\");\n }\n\n /**\n * return the user model for the current user\n */\n get user(): UserModel | null {\n return this._user || null;\n }\n\n /**\n * Set user data\n */\n set user(model: ?ModularUIModel) {\n this._user = model instanceof UserModel ? model : null;\n }\n\n /**\n * Getting the label of the application\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n */\n get changePassword(): Href | null {\n const changePasswordLink = this.links.getLinkByKey(\"ChangePassword\");\n\n if (changePasswordLink) {\n return changePasswordLink.href;\n }\n\n return null;\n }\n\n // when more than three unsecure links are present (always present: self, contributions and api-docs),\n // the userservice is permitted and thus we have an indication the user is probably\n // logged in\n /**\n */\n get isLoggedIn(): boolean {\n const hasUser = this.user instanceof UserModel;\n\n const UNSECURE_LINK_COUNT = 3;\n return this.links.length > UNSECURE_LINK_COUNT || hasUser;\n }\n}\n\nexport default UserServicesModel;\n"],"mappings":";;;;;;;;;AACA;AACA;AAOA;AACA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"UserServicesModel.js","names":["_ResourceModel","_interopRequireDefault","require","_UserModel","UserServicesModel","ResourceModel","constructor","arguments","_defineProperty2","default","type","modelName","isApplicableModel","data","contributions","resourcetype","getInitialChildModelLinks","userData","userLink","setChildModels","models","user","_find","call","model","links","getLinkByKey","_user","UserModel","label","getContribution","changePassword","changePasswordLink","href","isLoggedIn","hasUser","UNSECURE_LINK_COUNT","length","_default","exports"],"sources":["../../../src/models/user/UserServicesModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport UserModel from \"../user/UserModel\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\n\n/**\n * UserServicesModel model\n */\nclass UserServicesModel extends ResourceModel {\n _user: ?UserModel;\n\n /**\n */\n get type(): string {\n return \"UserServices\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"UserServicesModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"user_services\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const userData = this.userLink;\n return userData ? [userData] : [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.user = models.find((model) => model.type === \"User\");\n }\n\n /**\n */\n get userLink(): LinkModel | null {\n return this.links.getLinkByKey(\"Userdata\");\n }\n\n /**\n * return the user model for the current user\n */\n get user(): UserModel | null {\n return this._user || null;\n }\n\n /**\n * Set user data\n */\n set user(model: ?ModularUIModel) {\n this._user = model instanceof UserModel ? model : null;\n }\n\n /**\n * Getting the label of the application\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n */\n get changePassword(): Href | null {\n const changePasswordLink = this.links.getLinkByKey(\"ChangePassword\");\n\n if (changePasswordLink) {\n return changePasswordLink.href;\n }\n\n return null;\n }\n\n // when more than three unsecure links are present (always present: self, contributions and api-docs),\n // the userservice is permitted and thus we have an indication the user is probably\n // logged in\n /**\n */\n get isLoggedIn(): boolean {\n const hasUser = this.user instanceof UserModel;\n\n const UNSECURE_LINK_COUNT = 3;\n return this.links.length > UNSECURE_LINK_COUNT || hasUser;\n }\n}\n\nexport default UserServicesModel;\n"],"mappings":";;;;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAOA;AACA;AACA;AACA,MAAME,iBAAiB,SAASC,sBAAa,CAAC;EAAAC,YAAA;IAAA,SAAAC,SAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA;EAAA;EAG5C;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,cAAc;EACvB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,mBAAmB;EAC5B;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACC,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,eAAe;EAEvD;;EAEA;AACF;EACEC,yBAAyBA,CAAA,EAAqB;IAC5C,MAAMC,QAAQ,GAAG,IAAI,CAACC,QAAQ;IAC9B,OAAOD,QAAQ,GAAG,CAACA,QAAQ,CAAC,GAAG,EAAE;EACnC;;EAEA;AACF;EACEE,cAAcA,CAACC,MAA6B,EAAE;IAC5C,IAAI,CAACC,IAAI,GAAG,IAAAC,KAAA,CAAAb,OAAA,EAAAW,MAAM,EAAAG,IAAA,CAANH,MAAM,EAAOI,KAAK,IAAKA,KAAK,CAACd,IAAI,KAAK,MAAM,CAAC;EAC3D;;EAEA;AACF;EACE,IAAIQ,QAAQA,CAAA,EAAqB;IAC/B,OAAO,IAAI,CAACO,KAAK,CAACC,YAAY,CAAC,UAAU,CAAC;EAC5C;;EAEA;AACF;AACA;EACE,IAAIL,IAAIA,CAAA,EAAqB;IAC3B,OAAO,IAAI,CAACM,KAAK,IAAI,IAAI;EAC3B;;EAEA;AACF;AACA;EACE,IAAIN,IAAIA,CAACG,KAAsB,EAAE;IAC/B,IAAI,CAACG,KAAK,GAAGH,KAAK,YAAYI,kBAAS,GAAGJ,KAAK,GAAG,IAAI;EACxD;;EAEA;AACF;AACA;EACE,IAAIK,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAACC,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC;EAC1C;;EAEA;AACF;EACE,IAAIC,cAAcA,CAAA,EAAgB;IAChC,MAAMC,kBAAkB,GAAG,IAAI,CAACP,KAAK,CAACC,YAAY,CAAC,gBAAgB,CAAC;IAEpE,IAAIM,kBAAkB,EAAE;MACtB,OAAOA,kBAAkB,CAACC,IAAI;IAChC;IAEA,OAAO,IAAI;EACb;;EAEA;EACA;EACA;EACA;AACF;EACE,IAAIC,UAAUA,CAAA,EAAY;IACxB,MAAMC,OAAO,GAAG,IAAI,CAACd,IAAI,YAAYO,kBAAS;IAE9C,MAAMQ,mBAAmB,GAAG,CAAC;IAC7B,OAAO,IAAI,CAACX,KAAK,CAACY,MAAM,GAAGD,mBAAmB,IAAID,OAAO;EAC3D;AACF;AAAC,IAAAG,QAAA,GAEclC,iBAAiB;AAAAmC,OAAA,CAAA9B,OAAA,GAAA6B,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authenticate.js","names":["Authenticate","constructor","_isBasic","authenticationType","type","loginType","INTERNAL_LOGIN_TYPE","JAAS","PAC4J_FORM","PAC4J_BASIC","Error","isBasicAuthentication","requestLogin","universalFetch","url","getBasePath","method","HTTP_METHODS","GET","headers","Accept","initLogin","resolve","catch","error","UnauthorizedException","login","username","password","doFormLogin","doBasicAuthentication","doJaasAuthentication","getFormLoginUrl","loginPath","getFormLoginData","encodedUsername","encodeURIComponent","encodedPassword","loginUsernameField","loginPasswordField","POST","data","Cache","addItem","btoa","then","getLogoutUrl","logoutPath","logout","response","clear"],"sources":["../../src/modularui/Authenticate.js"],"sourcesContent":["// @flow\nimport { HTTP_METHODS } from \"../constants/Constants\";\n\nimport universalFetch from \"../utils/fetch/universalFetch\";\nimport Cache from \"../utils/browser/Cache\";\n\nimport { UnauthorizedException } from \"../exceptions\";\nimport {\n INTERNAL_LOGIN_TYPE,\n loginType,\n loginPath,\n loginPasswordField,\n loginUsernameField,\n logoutPath,\n getBasePath,\n} from \"../constants\";\n\n/**\n */\nclass Authenticate {\n _isBasic: boolean;\n\n /**\n */\n constructor() {\n this._isBasic = false;\n }\n\n /**\n */\n get authenticationType(): $Keys<typeof INTERNAL_LOGIN_TYPE> {\n const type = loginType();\n\n if (!type || type === INTERNAL_LOGIN_TYPE.JAAS) {\n return INTERNAL_LOGIN_TYPE.JAAS;\n }\n\n if (type.includes(\"FormClient\")) {\n return INTERNAL_LOGIN_TYPE.PAC4J_FORM;\n } else if (type.includes(\"BasicClient\")) {\n return INTERNAL_LOGIN_TYPE.PAC4J_BASIC;\n }\n\n throw new Error(`Unsupported login type found: ${type}`);\n }\n\n /**\n */\n get isBasicAuthentication(): boolean {\n return (\n this._isBasic ||\n this.authenticationType === INTERNAL_LOGIN_TYPE.PAC4J_BASIC\n );\n }\n\n /**\n */\n set isBasicAuthentication(isBasicAuthentication: boolean) {\n this._isBasic = isBasicAuthentication;\n }\n\n /**\n */\n requestLogin(): Promise<any> {\n return universalFetch({\n url: `${getBasePath()}/login`,\n method: HTTP_METHODS.GET,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n });\n }\n\n /**\n */\n initLogin(initLogin: boolean): Promise<any> {\n if (this.isBasicAuthentication || !initLogin) {\n return Promise.resolve(true);\n }\n\n return this.requestLogin().catch((error) => {\n // when an unauthorizedexception is received on a request to the login service,\n // this indicates a basic authorization scenario\n // in case of form based authentication other exceptions are thrown\n if (error instanceof UnauthorizedException) {\n this.isBasicAuthentication = true;\n }\n\n return Promise.resolve({});\n });\n }\n\n /**\n */\n login(username: string, password: string): Promise<any> {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return this.doFormLogin(username, password);\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n return this.doBasicAuthentication(username, password);\n default:\n return this.doJaasAuthentication(username, password);\n }\n }\n\n /**\n */\n getFormLoginUrl(): string {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${getBasePath()}${loginPath()}`;\n default:\n return `${getBasePath()}/j_security_check`;\n }\n }\n\n /**\n */\n getFormLoginData(username: string, password: string): string {\n const encodedUsername = encodeURIComponent(username);\n const encodedPassword = encodeURIComponent(password);\n\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${loginUsernameField()}=${encodedUsername}&${loginPasswordField()}=${encodedPassword}`;\n default:\n return `j_username=${encodedUsername}&j_password=${encodedPassword}`;\n }\n }\n\n /**\n */\n doFormLogin(username: string, password: string): Promise<any> {\n return universalFetch({\n url: this.getFormLoginUrl(),\n method: HTTP_METHODS.POST,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n data: this.getFormLoginData(username, password),\n });\n }\n\n /**\n */\n doBasicAuthentication(username: string, password: string): Promise<any> {\n Cache.addItem(\"basic\", btoa(`${username}:${password}`));\n return this.requestLogin();\n }\n\n /**\n */\n doJaasAuthentication(username: string, password: string): Promise<any> {\n return this.initLogin(true).then(() => {\n if (this.isBasicAuthentication) {\n return this.doBasicAuthentication(username, password);\n }\n return this.doFormLogin(username, password);\n });\n }\n\n /**\n */\n getLogoutUrl(): string {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${getBasePath()}${logoutPath()}`;\n default:\n return `${getBasePath()}/Logoff`;\n }\n }\n\n /**\n */\n logout(): Promise<any> {\n return universalFetch({\n url: this.getLogoutUrl(),\n }).then((response) => {\n // clear cache because of cached contributions\n Cache.clear();\n return response;\n });\n }\n}\n\nexport default Authenticate;\n"],"mappings":";;;;;;;;;;AACA;AAEA;AACA;AAEA;AACA;AAUA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"Authenticate.js","names":["_Constants","require","_universalFetch","_interopRequireDefault","_Cache","_exceptions","_constants","Authenticate","constructor","_defineProperty2","default","_isBasic","authenticationType","type","loginType","INTERNAL_LOGIN_TYPE","JAAS","_includes","call","PAC4J_FORM","PAC4J_BASIC","Error","isBasicAuthentication","requestLogin","universalFetch","url","getBasePath","method","HTTP_METHODS","GET","headers","Accept","initLogin","_promise","resolve","catch","error","UnauthorizedException","login","username","password","doFormLogin","doBasicAuthentication","doJaasAuthentication","getFormLoginUrl","loginPath","getFormLoginData","encodedUsername","encodeURIComponent","encodedPassword","loginUsernameField","loginPasswordField","POST","data","Cache","addItem","btoa","then","getLogoutUrl","logoutPath","logout","response","clear","_default","exports"],"sources":["../../src/modularui/Authenticate.js"],"sourcesContent":["// @flow\nimport { HTTP_METHODS } from \"../constants/Constants\";\n\nimport universalFetch from \"../utils/fetch/universalFetch\";\nimport Cache from \"../utils/browser/Cache\";\n\nimport { UnauthorizedException } from \"../exceptions\";\nimport {\n INTERNAL_LOGIN_TYPE,\n loginType,\n loginPath,\n loginPasswordField,\n loginUsernameField,\n logoutPath,\n getBasePath,\n} from \"../constants\";\n\n/**\n */\nclass Authenticate {\n _isBasic: boolean;\n\n /**\n */\n constructor() {\n this._isBasic = false;\n }\n\n /**\n */\n get authenticationType(): $Keys<typeof INTERNAL_LOGIN_TYPE> {\n const type = loginType();\n\n if (!type || type === INTERNAL_LOGIN_TYPE.JAAS) {\n return INTERNAL_LOGIN_TYPE.JAAS;\n }\n\n if (type.includes(\"FormClient\")) {\n return INTERNAL_LOGIN_TYPE.PAC4J_FORM;\n } else if (type.includes(\"BasicClient\")) {\n return INTERNAL_LOGIN_TYPE.PAC4J_BASIC;\n }\n\n throw new Error(`Unsupported login type found: ${type}`);\n }\n\n /**\n */\n get isBasicAuthentication(): boolean {\n return (\n this._isBasic ||\n this.authenticationType === INTERNAL_LOGIN_TYPE.PAC4J_BASIC\n );\n }\n\n /**\n */\n set isBasicAuthentication(isBasicAuthentication: boolean) {\n this._isBasic = isBasicAuthentication;\n }\n\n /**\n */\n requestLogin(): Promise<any> {\n return universalFetch({\n url: `${getBasePath()}/login`,\n method: HTTP_METHODS.GET,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n });\n }\n\n /**\n */\n initLogin(initLogin: boolean): Promise<any> {\n if (this.isBasicAuthentication || !initLogin) {\n return Promise.resolve(true);\n }\n\n return this.requestLogin().catch((error) => {\n // when an unauthorizedexception is received on a request to the login service,\n // this indicates a basic authorization scenario\n // in case of form based authentication other exceptions are thrown\n if (error instanceof UnauthorizedException) {\n this.isBasicAuthentication = true;\n }\n\n return Promise.resolve({});\n });\n }\n\n /**\n */\n login(username: string, password: string): Promise<any> {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return this.doFormLogin(username, password);\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n return this.doBasicAuthentication(username, password);\n default:\n return this.doJaasAuthentication(username, password);\n }\n }\n\n /**\n */\n getFormLoginUrl(): string {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${getBasePath()}${loginPath()}`;\n default:\n return `${getBasePath()}/j_security_check`;\n }\n }\n\n /**\n */\n getFormLoginData(username: string, password: string): string {\n const encodedUsername = encodeURIComponent(username);\n const encodedPassword = encodeURIComponent(password);\n\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${loginUsernameField()}=${encodedUsername}&${loginPasswordField()}=${encodedPassword}`;\n default:\n return `j_username=${encodedUsername}&j_password=${encodedPassword}`;\n }\n }\n\n /**\n */\n doFormLogin(username: string, password: string): Promise<any> {\n return universalFetch({\n url: this.getFormLoginUrl(),\n method: HTTP_METHODS.POST,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n data: this.getFormLoginData(username, password),\n });\n }\n\n /**\n */\n doBasicAuthentication(username: string, password: string): Promise<any> {\n Cache.addItem(\"basic\", btoa(`${username}:${password}`));\n return this.requestLogin();\n }\n\n /**\n */\n doJaasAuthentication(username: string, password: string): Promise<any> {\n return this.initLogin(true).then(() => {\n if (this.isBasicAuthentication) {\n return this.doBasicAuthentication(username, password);\n }\n return this.doFormLogin(username, password);\n });\n }\n\n /**\n */\n getLogoutUrl(): string {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${getBasePath()}${logoutPath()}`;\n default:\n return `${getBasePath()}/Logoff`;\n }\n }\n\n /**\n */\n logout(): Promise<any> {\n return universalFetch({\n url: this.getLogoutUrl(),\n }).then((response) => {\n // clear cache because of cached contributions\n Cache.clear();\n return response;\n });\n }\n}\n\nexport default Authenticate;\n"],"mappings":";;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAUA;AACA;AACA,MAAMM,YAAY,CAAC;EAGjB;AACF;EACEC,WAAWA,CAAA,EAAG;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IACZ,IAAI,CAACC,QAAQ,GAAG,KAAK;EACvB;;EAEA;AACF;EACE,IAAIC,kBAAkBA,CAAA,EAAsC;IAC1D,MAAMC,IAAI,GAAG,IAAAC,oBAAS,GAAE;IAExB,IAAI,CAACD,IAAI,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;EACEkC,MAAMA,CAAA,EAAiB;IACrB,OAAO,IAAApC,uBAAc,EAAC;MACpBC,GAAG,EAAE,IAAI,CAACiC,YAAY;IACxB,CAAC,CAAC,CAACD,IAAI,CAAEI,QAAQ,IAAK;MACpB;MACAP,cAAK,CAACQ,KAAK,EAAE;MACb,OAAOD,QAAQ;IACjB,CAAC,CAAC;EACJ;AACF;AAAC,IAAAE,QAAA,GAEcxD,YAAY;AAAAyD,OAAA,CAAAtD,OAAA,GAAAqD,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaptchaRequest.js","names":["CaptchaRequest","captchaResponse","response","_tokenId","tokenId","_image","image","valid","error","init","xhr","url","getCaptchaPath","then","send","answer","method","HTTP_METHODS","POST","data","catch","refresh"],"sources":["../../src/modularui/CaptchaRequest.js"],"sourcesContent":["// @flow\nimport xhr from \"../utils/fetch/xhr\";\nimport { getCaptchaPath, HTTP_METHODS } from \"../constants\";\n\ntype CaptchaInitialResponse = {\n tokenId: string,\n image: string,\n};\n\ntype CaptchaValidResponse = {\n valid: boolean,\n};\n\ntype CaptchaInvalidResponse = {\n tokenId: string,\n image: string,\n valid: boolean,\n error: { id: string },\n};\n\ntype CaptchaResponse = {\n tokenId: string,\n image: string,\n valid: boolean,\n error: { id: string } | null,\n};\n\n/**\n */\nclass CaptchaRequest {\n _tokenId: string;\n _image: string;\n\n /**\n */\n captchaResponse(\n response:\n | CaptchaInitialResponse\n | CaptchaValidResponse\n | CaptchaInvalidResponse\n ): CaptchaResponse {\n this._tokenId = response.tokenId ?? this._tokenId;\n this._image = response.image ?? this._image;\n\n return {\n tokenId: this._tokenId,\n image: this._image,\n valid: response.valid ?? false,\n error: response.error ?? null,\n };\n }\n\n /**\n * Initiate the captcha request\n */\n init(): Promise<CaptchaResponse> {\n return xhr({\n url: getCaptchaPath(),\n }).then((response) => this.captchaResponse(response));\n }\n\n /**\n * Answer the captcha\n */\n send(answer?: string): Promise<CaptchaResponse> {\n return xhr({\n url: getCaptchaPath(),\n method: HTTP_METHODS.POST,\n data: {\n tokenId: this._tokenId ?? \"\",\n answer: answer ?? \"\",\n },\n })\n .then((response) => this.captchaResponse(response))\n .catch((error) => this.captchaResponse(error.response));\n }\n\n /**\n * Reset the captcha and receive a new token and image\n */\n refresh(): Promise<CaptchaResponse> {\n return this.init();\n }\n}\n\nexport default CaptchaRequest;\n"],"mappings":";;;;;;;;AACA;AACA;AAyBA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"CaptchaRequest.js","names":["_xhr","_interopRequireDefault","require","_constants","CaptchaRequest","constructor","_defineProperty2","default","captchaResponse","response","_tokenId","tokenId","_image","image","valid","error","init","xhr","url","getCaptchaPath","then","send","answer","method","HTTP_METHODS","POST","data","catch","refresh","_default","exports"],"sources":["../../src/modularui/CaptchaRequest.js"],"sourcesContent":["// @flow\nimport xhr from \"../utils/fetch/xhr\";\nimport { getCaptchaPath, HTTP_METHODS } from \"../constants\";\n\ntype CaptchaInitialResponse = {\n tokenId: string,\n image: string,\n};\n\ntype CaptchaValidResponse = {\n valid: boolean,\n};\n\ntype CaptchaInvalidResponse = {\n tokenId: string,\n image: string,\n valid: boolean,\n error: { id: string },\n};\n\ntype CaptchaResponse = {\n tokenId: string,\n image: string,\n valid: boolean,\n error: { id: string } | null,\n};\n\n/**\n */\nclass CaptchaRequest {\n _tokenId: string;\n _image: string;\n\n /**\n */\n captchaResponse(\n response:\n | CaptchaInitialResponse\n | CaptchaValidResponse\n | CaptchaInvalidResponse\n ): CaptchaResponse {\n this._tokenId = response.tokenId ?? this._tokenId;\n this._image = response.image ?? this._image;\n\n return {\n tokenId: this._tokenId,\n image: this._image,\n valid: response.valid ?? false,\n error: response.error ?? null,\n };\n }\n\n /**\n * Initiate the captcha request\n */\n init(): Promise<CaptchaResponse> {\n return xhr({\n url: getCaptchaPath(),\n }).then((response) => this.captchaResponse(response));\n }\n\n /**\n * Answer the captcha\n */\n send(answer?: string): Promise<CaptchaResponse> {\n return xhr({\n url: getCaptchaPath(),\n method: HTTP_METHODS.POST,\n data: {\n tokenId: this._tokenId ?? \"\",\n answer: answer ?? \"\",\n },\n })\n .then((response) => this.captchaResponse(response))\n .catch((error) => this.captchaResponse(error.response));\n }\n\n /**\n * Reset the captcha and receive a new token and image\n */\n refresh(): Promise<CaptchaResponse> {\n return this.init();\n }\n}\n\nexport default CaptchaRequest;\n"],"mappings":";;;;;;;;AACA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAyBA;AACA;AACA,MAAME,cAAc,CAAC;EAAAC,YAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;EAAA;EAInB;AACF;EACEC,eAAeA,CACbC,QAG0B,EACT;IACjB,IAAI,CAACC,QAAQ,GAAGD,QAAQ,CAACE,OAAO,IAAI,IAAI,CAACD,QAAQ;IACjD,IAAI,CAACE,MAAM,GAAGH,QAAQ,CAACI,KAAK,IAAI,IAAI,CAACD,MAAM;IAE3C,OAAO;MACLD,OAAO,EAAE,IAAI,CAACD,QAAQ;MACtBG,KAAK,EAAE,IAAI,CAACD,MAAM;MAClBE,KAAK,EAAEL,QAAQ,CAACK,KAAK,IAAI,KAAK;MAC9BC,KAAK,EAAEN,QAAQ,CAACM,KAAK,IAAI;IAC3B,CAAC;EACH;;EAEA;AACF;AACA;EACEC,IAAIA,CAAA,EAA6B;IAC/B,OAAO,IAAAC,YAAG,EAAC;MACTC,GAAG,EAAE,IAAAC,yBAAc;IACrB,CAAC,CAAC,CAACC,IAAI,CAAEX,QAAQ,IAAK,IAAI,CAACD,eAAe,CAACC,QAAQ,CAAC,CAAC;EACvD;;EAEA;AACF;AACA;EACEY,IAAIA,CAACC,MAAe,EAA4B;IAC9C,OAAO,IAAAL,YAAG,EAAC;MACTC,GAAG,EAAE,IAAAC,yBAAc,GAAE;MACrBI,MAAM,EAAEC,uBAAY,CAACC,IAAI;MACzBC,IAAI,EAAE;QACJf,OAAO,EAAE,IAAI,CAACD,QAAQ,IAAI,EAAE;QAC5BY,MAAM,EAAEA,MAAM,IAAI;MACpB;IACF,CAAC,CAAC,CACCF,IAAI,CAAEX,QAAQ,IAAK,IAAI,CAACD,eAAe,CAACC,QAAQ,CAAC,CAAC,CAClDkB,KAAK,CAAEZ,KAAK,IAAK,IAAI,CAACP,eAAe,CAACO,KAAK,CAACN,QAAQ,CAAC,CAAC;EAC3D;;EAEA;AACF;AACA;EACEmB,OAAOA,CAAA,EAA6B;IAClC,OAAO,IAAI,CAACZ,IAAI,EAAE;EACpB;AACF;AAAC,IAAAa,QAAA,GAEczB,cAAc;AAAA0B,OAAA,CAAAvB,OAAA,GAAAsB,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModularUIError.js","names":["ModularUIError","Error","constructor","message","response","resource","captureStackTrace"],"sources":["../../src/modularui/ModularUIError.js"],"sourcesContent":["// @flow\n/**\n */\nclass ModularUIError extends Error {\n response: Object;\n resource: string;\n\n /**\n */\n constructor(message: string, response: Object, resource: string) {\n super(message);\n\n this.response = response;\n this.resource = resource;\n\n // Without passing ModularUIError to captureStackTrace, the ModularUIError\n // frame would show up in the .stack property. By passing\n // the constructor, we omit that frame, and retain all frames below it.\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, ModularUIError);\n }\n }\n}\n\nexport default ModularUIError;\n"],"mappings":";;;;;;;;AACA;AACA;AACA,MAAMA,cAAc,SAASC,KAAK,CAAC;EAIjC;AACF;EACEC,
|
|
1
|
+
{"version":3,"file":"ModularUIError.js","names":["ModularUIError","Error","constructor","message","response","resource","_defineProperty2","default","captureStackTrace","_default","exports"],"sources":["../../src/modularui/ModularUIError.js"],"sourcesContent":["// @flow\n/**\n */\nclass ModularUIError extends Error {\n response: Object;\n resource: string;\n\n /**\n */\n constructor(message: string, response: Object, resource: string) {\n super(message);\n\n this.response = response;\n this.resource = resource;\n\n // Without passing ModularUIError to captureStackTrace, the ModularUIError\n // frame would show up in the .stack property. By passing\n // the constructor, we omit that frame, and retain all frames below it.\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, ModularUIError);\n }\n }\n}\n\nexport default ModularUIError;\n"],"mappings":";;;;;;;;AACA;AACA;AACA,MAAMA,cAAc,SAASC,KAAK,CAAC;EAIjC;AACF;EACEC,WAAWA,CAACC,OAAe,EAAEC,QAAgB,EAAEC,QAAgB,EAAE;IAC/D,KAAK,CAACF,OAAO,CAAC;IAAC,IAAAG,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAEf,IAAI,CAACH,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,QAAQ,GAAGA,QAAQ;;IAExB;IACA;IACA;IACA,IAAIJ,KAAK,CAACO,iBAAiB,EAAE;MAC3BP,KAAK,CAACO,iBAAiB,CAAC,IAAI,EAAER,cAAc,CAAC;IAC/C;EACF;AACF;AAAC,IAAAS,QAAA,GAEcT,cAAc;AAAAU,OAAA,CAAAH,OAAA,GAAAE,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModularUIRequest.js","names":["ModularUIRequest","constructor","href","options","HTTP_METHODS","GET","IllegalArgumentException","_basePath","getBasePath","_response","ModularUIResponse","Href","locale","parameters","targetModel","method","contributionsHref","_contributionsHref","_locale","response","_href","_method","_options","requestOptions","forceTargetModel","updateModel","childmodels","isValidationRequest","removeOnUnmount","withChildModels","_targetModel","_forceTargetModel","resolveModel","availableModels","Array","isArray","Model","isApplicableModel","IllegalStateException","toString","m","modelName","join","createModel","processContributionsService","contributionsData","isPlainObject","contributionsKey","error","handleContributionsError","key","contributions","errorMessage","properties","message","ModularUIError","handleDataError","path","handleData","data","links","_links","processDataService","fetchContributionsService","universalFetch","url","cache","fetchDataService","params","getQuerystringForModularUI","onProgress","processAsyncLayoutHints","getSetting","processApplicationLinks","processTabLinks","processPanelLinks","resolve","contributionLinks","dataLinks","contributionTabLink","tab","dataTabLinks","dataLink","name","processLinks","components","then","newLinks","replaceApplicationLinks","tabName","tabLink","component","panel","dataLinksPerName","linksPerName","hideWhenEmptyLinks","contributionLink","layouthint","includes","HIDE_WHEN_EMPTY","isHiddenListChecks","push","isHiddenList","all","hiddenLinks","newDataLinks","dataLinkKey","HIDE_WHEN_EMPTY_IGNORE_TASKS","_embedded","actions","noListItems","noActions","isHidden","catch","progressEvent","_progressEvent","getDynamicValidationData","model","prevData","JSON","parse","FormModel","newData","validationData","deepmerge","loadDynamicValidations","currentFormObject","hasDynamicValidations","validationHref","setParameter","updateValidations","fetch","Error","fetchChildModels","fetchFromCache","childModelLinks","getInitialChildModelLinks","childModelRequests","childModelLink","request","isCacheable","allSettled","childModels","resolvedChildModels","forEach","childModel","status","reason","console","value","addChildModels","fetchContent","withChildSections","ContentModel","childSectionLinks","length","fetchContentChildSections","contentModel","newContentModel","clone","childSectionLink","contentHrefWithEntryDate","selfhref","addParameter","TIMEVERSION_FILTER_NAME","entryDate","sectionModels","childSections","post","POST","postForm","form","formdata","update","fetchSync","headers","dataString","dataFetcher","contributionsString"],"sources":["../../src/modularui/ModularUIRequest.js"],"sourcesContent":["// @flow\nimport deepmerge from \"deepmerge\";\n\nimport { HTTP_METHODS, TIMEVERSION_FILTER_NAME } from \"../constants/Constants\";\n\nimport { HIDE_WHEN_EMPTY } from \"../constants/LayoutHints\";\n\nimport { getBasePath, getSetting } from \"../constants/Settings\";\n\nimport Href from \"../models/href/Href\";\n\nimport universalFetch from \"../utils/fetch/universalFetch\";\nimport resolveModel from \"../models/resolveModel\";\nimport FormModel from \"../models/form/FormModel\";\nimport ContentModel from \"../models/content/ContentModel\";\n\nimport ModularUIResponse from \"./ModularUIResponse\";\n\nimport ModularUIError from \"./ModularUIError\";\nimport { IllegalArgumentException, IllegalStateException } from \"../exceptions\";\n\nimport { isPlainObject } from \"../utils/helpers/objects\";\n\nimport type { TargetModel } from \"./types\";\nimport type {\n RequestBaseOptions,\n RequestModularUIOptions,\n} from \"../utils/fetch/types\";\nimport type { ModularUIModel } from \"../models/types\";\n\n/**\n * Helper for fetching data and contributions from the Be Informed modular ui\n * and merge it into a target or resolvable model.\n */\nclass ModularUIRequest {\n _response: ModularUIResponse;\n\n _href: Href;\n _options: RequestModularUIOptions;\n _targetModel: ?TargetModel;\n _forceTargetModel: boolean = false;\n _contributionsHref: string;\n _locale: string;\n _method: $Keys<typeof HTTP_METHODS> = HTTP_METHODS.GET;\n\n _progressEvent: ProgressEventHandler;\n\n _basePath: string = \"/BeInformed\";\n\n /**\n */\n constructor(\n href: Href | string,\n options: $Shape<RequestModularUIOptions> = {}\n ) {\n if (!href) {\n throw new IllegalArgumentException(\n \"You must pass a href to the resource that is requested\"\n );\n }\n\n this._basePath = getBasePath();\n\n this.options = options;\n\n this._response = new ModularUIResponse();\n\n this.href = typeof href === \"string\" ? new Href(href) : href;\n this.locale = options.locale ?? \"en\";\n\n // copy request parameters to response, to be able to use them in the models\n // self links are missing the request parameters\n this._response.parameters = this.href.parameters;\n\n if (options.targetModel) {\n this.targetModel = options.targetModel;\n }\n\n if (options.method) {\n this.method = options.method;\n } else {\n this.method = this.href.method;\n }\n }\n\n /**\n */\n get contributionsHref(): string {\n return this._contributionsHref;\n }\n\n /**\n */\n set contributionsHref(contributionsHref: string) {\n this._contributionsHref = contributionsHref;\n }\n\n /**\n */\n set locale(locale: string) {\n this._locale = locale;\n this._response.locale = locale;\n }\n\n /**\n */\n get locale(): string {\n return this._locale;\n }\n\n /**\n */\n get response(): ModularUIResponse {\n return this._response;\n }\n\n /**\n */\n set href(href: Href) {\n this._href = href;\n }\n\n /**\n */\n get href(): Href {\n return this._href;\n }\n\n /**\n */\n set method(method: $Keys<typeof HTTP_METHODS>) {\n this._method = method;\n }\n\n /**\n */\n get method(): $Keys<typeof HTTP_METHODS> {\n return this._method;\n }\n\n /**\n */\n get options(): RequestModularUIOptions {\n return {\n ...this._options,\n locale: this.locale,\n method: this.method,\n };\n }\n\n /**\n */\n get requestOptions(): RequestBaseOptions {\n /* eslint-disable no-unused-vars */\n const {\n targetModel,\n forceTargetModel,\n updateModel,\n childmodels,\n isValidationRequest,\n removeOnUnmount,\n ...requestOptions\n } = this.options;\n /* eslint-enable no-unused-vars */\n return requestOptions;\n }\n\n /**\n */\n set options(options: RequestModularUIOptions) {\n this._options = options;\n }\n\n /**\n */\n get withChildModels(): boolean {\n return (\n !(\"childmodels\" in this.options) || this.options.childmodels === true\n );\n }\n\n /**\n */\n set targetModel(targetModel: TargetModel) {\n this._targetModel = targetModel;\n }\n\n /**\n */\n get targetModel(): ?TargetModel {\n return this._targetModel;\n }\n\n /**\n */\n set forceTargetModel(forceTargetModel: boolean) {\n this._forceTargetModel = forceTargetModel ?? false;\n }\n\n /**\n */\n get forceTargetModel(): boolean {\n return this._forceTargetModel;\n }\n\n /**\n */\n resolveModel(): Class<ModularUIModel> {\n let availableModels;\n if (this.targetModel) {\n availableModels = Array.isArray(this.targetModel)\n ? [...this.targetModel]\n : [this.targetModel];\n\n if (this.forceTargetModel) {\n return availableModels[0];\n }\n }\n\n const Model: Class<ModularUIModel> | null = resolveModel(\n this.response,\n availableModels\n );\n\n if (Model && Model.isApplicableModel) {\n return Model;\n }\n\n if (availableModels) {\n throw new IllegalStateException(\n `data for ${this.href.toString()} is not applicable for model(s): ${availableModels\n .map((m) => m.modelName)\n .join(\", \")}, received response: ${JSON.stringify(this.response)}`\n );\n }\n\n throw new IllegalStateException(\n `no javascript model is applicable for received request of ${this.href.toString()}, with response: ${JSON.stringify(\n this.response\n )}`\n );\n }\n\n /**\n */\n createModel(): ModularUIModel {\n const Model = this.resolveModel();\n return new Model(this.response);\n }\n\n /**\n */\n processContributionsService(contributionsData: Object): void {\n if (!isPlainObject(contributionsData)) {\n throw new IllegalArgumentException(\n \"Missing contributions data or contributions is not JSON\"\n );\n }\n\n const [contributionsKey] = Object.keys(contributionsData);\n\n if (contributionsData.error && contributionsKey === \"error\") {\n this.handleContributionsError(contributionsData.error);\n }\n\n // The key of the data service is different from the contributions service for forms\n if (!(this.response.key in contributionsData)) {\n this.response.key = contributionsKey;\n }\n\n this.response.contributions = contributionsData[this.response.key];\n }\n\n /**\n */\n handleContributionsError(error: Object): void {\n const errorMessage = error.properties?.message ?? \"Error in contribution\";\n throw new ModularUIError(errorMessage, error, this.contributionsHref);\n }\n\n /**\n */\n handleDataError(error: Object): void {\n if (error.properties) {\n const errorMessage = error.properties?.message ?? \"Error in data\";\n throw new ModularUIError(errorMessage, error, this.href.path.toString());\n }\n\n throw new IllegalArgumentException(error);\n }\n\n /**\n */\n handleData(key: string, data: Object): void {\n this.response.key = key;\n this.response.data = data;\n\n const links = data._links;\n\n if (links && links.contributions) {\n this.contributionsHref = links.contributions.href;\n } else if (Array.isArray(links) && links[0].contributions) {\n this.contributionsHref = links[0].contributions.href;\n } else {\n throw new IllegalArgumentException(\n `Contributions link not found for data with key ${key}`\n );\n }\n }\n\n /**\n */\n processDataService(data: Object): void {\n if (!isPlainObject(data)) {\n throw new IllegalArgumentException(\"Missing data or data is not JSON\");\n }\n\n if (data.error) {\n this.handleDataError(data.error);\n } else {\n const [key] = Object.keys(data);\n this.handleData(key, data[key]);\n }\n }\n\n /**\n */\n fetchContributionsService(): Promise<any> {\n if (!this.contributionsHref) {\n throw new IllegalStateException(\"Missing a contributions href\");\n }\n\n return universalFetch({\n url: `${this._basePath}${this.contributionsHref}`,\n cache: true,\n locale: this.options.locale,\n });\n }\n\n /**\n */\n fetchDataService(): Promise<any> {\n return universalFetch({\n ...this.requestOptions,\n url: `${this._basePath}${this.href.path}`,\n params: this.href.getQuerystringForModularUI(),\n locale: this.options.locale,\n onProgress: this.onProgress,\n });\n }\n\n /**\n * Check if links contain a 'hide-when-empty' layout hint and remove the link from\n * the component when it exists and no results are available\n */\n async processAsyncLayoutHints(): Promise<void> {\n if (getSetting(\"ALLOW_HIDE_WHEN_EMPTY_ON_TABS\")) {\n await this.processApplicationLinks();\n await this.processTabLinks();\n }\n await this.processPanelLinks();\n\n return Promise.resolve();\n }\n\n /**\n * hide application links<br>\n * _links on application data contains an extra level of tab links\n */\n processApplicationLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n const dataLinks = this.response.data._links;\n if (!contributionLinks || !dataLinks) {\n return Promise.resolve();\n }\n\n if (\"tab\" in contributionLinks && \"tab\" in dataLinks) {\n for (const contributionTabLink of contributionLinks.tab) {\n if (\"components\" in contributionTabLink) {\n const dataTabLinks = dataLinks.tab.find(\n (dataLink) => dataLink.name === contributionTabLink.name\n );\n\n if (dataTabLinks && \"components\" in dataTabLinks) {\n return this.processLinks(\n dataTabLinks.components,\n contributionTabLink.components\n ).then((newLinks) =>\n this.replaceApplicationLinks(contributionTabLink.name, newLinks)\n );\n }\n }\n }\n }\n\n return Promise.resolve();\n }\n\n /**\n * Replace hidden link in application link tree\n */\n replaceApplicationLinks(tabName: string, newLinks: Array<Object>): void {\n this.response.data._links.tab = this.response.data._links.tab.map(\n (tabLink) => {\n const key = tabLink.name;\n if (tabName === key) {\n tabLink.components = newLinks;\n }\n return tabLink;\n }\n );\n }\n\n /**\n */\n processTabLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n\n if (!contributionLinks) {\n return Promise.resolve();\n }\n\n if (\"component\" in contributionLinks) {\n return this.processLinks(\n this.response.data._links.component,\n contributionLinks.component\n ).then((newLinks) => {\n this.response.data._links.component = newLinks;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n */\n processPanelLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n\n if (!contributionLinks) {\n return Promise.resolve();\n }\n\n if (\"panel\" in contributionLinks) {\n return this.processLinks(\n this.response.data._links,\n contributionLinks.panel\n ).then((newLinks) => {\n this.response.data._links = newLinks;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n * Retrieve an object of key: link\n */\n dataLinksPerName(dataLinks: any): { [linkName: string]: any } {\n if (Array.isArray(dataLinks)) {\n const links = {};\n for (const dataLink of dataLinks) {\n links[dataLink.name] = dataLink;\n }\n return links;\n }\n return dataLinks;\n }\n\n /**\n * Check if links are empty and hide them when hide-when-empty hint exists\n */\n processLinks(\n dataLinks: any,\n contributionLinks: any\n ): Promise<Object | Array<Object>> {\n const linksPerName = this.dataLinksPerName(dataLinks);\n const hideWhenEmptyLinks = contributionLinks.filter((contributionLink) =>\n contributionLink.layouthint?.includes(HIDE_WHEN_EMPTY)\n );\n\n const isHiddenListChecks = [];\n\n for (const contributionLink of hideWhenEmptyLinks) {\n const dataLink = linksPerName[contributionLink.name];\n if (dataLink?.href) {\n isHiddenListChecks.push(\n this.isHiddenList(contributionLink.name, dataLink.href)\n );\n }\n }\n\n return Promise.all(isHiddenListChecks).then(\n (hiddenLinks: Array<string>) => {\n if (Array.isArray(dataLinks)) {\n return dataLinks.filter(\n (dataLink) => !hiddenLinks.includes(dataLink.name)\n );\n }\n\n const newDataLinks: { [string]: any } = {};\n for (const dataLinkKey in dataLinks) {\n if (!hiddenLinks.includes(dataLinkKey)) {\n newDataLinks[dataLinkKey] = dataLinks[dataLinkKey];\n }\n }\n return newDataLinks;\n }\n );\n }\n\n /**\n */\n isHiddenList(name: string, href: string): Promise<string> {\n const HIDE_WHEN_EMPTY_IGNORE_TASKS = getSetting(\n \"HIDE_WHEN_EMPTY_IGNORE_TASKS\",\n false\n );\n\n return universalFetch({\n ...this.requestOptions,\n url: `${this._basePath}${href}`,\n })\n .then((response: Object) => {\n if (isPlainObject(response)) {\n const [key] = Object.keys(response);\n const { _embedded, actions } = response[key];\n\n const noListItems = _embedded === null;\n const noActions = actions == null || HIDE_WHEN_EMPTY_IGNORE_TASKS;\n\n const isHidden = noListItems && noActions;\n if (isHidden) {\n return name;\n }\n }\n return \"\";\n })\n .catch(() => {\n return \"\";\n });\n }\n\n /**\n */\n set onProgress(progressEvent: ProgressEventHandler) {\n this._progressEvent = progressEvent;\n }\n\n /**\n */\n get onProgress(): ProgressEventHandler {\n return this._progressEvent || null;\n }\n\n /**\n * Combine previous send request data with new validation data to create a complete request object\n * The received model is new FormModel containing ONLY the current question, not the previously entered questions\n * to create a complete request we append the originally send form objects\n */\n getDynamicValidationData(model: ModularUIModel): string {\n const prevData =\n typeof this.options.data === \"string\"\n ? JSON.parse(this.options.data)\n : this.options.data;\n\n if (model instanceof FormModel) {\n const newData = JSON.parse(model.validationData);\n // $FlowFixMe incompatible-call\n return JSON.stringify(deepmerge(prevData || {}, newData));\n }\n\n return JSON.stringify(prevData) ?? \"{}\";\n }\n\n /**\n * First load of dynamic values when a form is loaded\n */\n loadDynamicValidations(model: ModularUIModel): Promise<ModularUIModel> {\n if (\n !this.options.isValidationRequest &&\n getSetting(\"USE_INSTANT_SERVER_VALIDATION\") &&\n model instanceof FormModel &&\n model.currentFormObject &&\n model.currentFormObject.hasDynamicValidations\n ) {\n const validationHref = this.href.setParameter(\"commit\", \"false\");\n return universalFetch({\n ...this.requestOptions,\n url: `${this._basePath}${this.href.path}`,\n params: validationHref.getQuerystringForModularUI(),\n data: this.getDynamicValidationData(model),\n }).then((data) => {\n if (data == null || typeof data !== \"object\") {\n return model;\n }\n\n const [key] = Object.keys(data);\n return model.updateValidations(data[key]);\n });\n }\n\n return Promise.resolve(model);\n }\n\n /**\n */\n fetch(): Promise<ModularUIModel> {\n return this.fetchDataService()\n .then((data) => {\n if (data == null) {\n throw new Error(`No data received for ${this.href.toString()}`);\n }\n\n this.processDataService(data);\n return this.fetchContributionsService();\n })\n .then((contributionsData) => {\n if (contributionsData == null) {\n throw new Error(\n `No contributions data received for ${this.contributionsHref}`\n );\n }\n\n this.processContributionsService(contributionsData);\n return this.processAsyncLayoutHints();\n })\n .then(() => Promise.resolve(this.createModel()))\n .then((model) => this.loadDynamicValidations(model))\n .then((model) => {\n if (this.withChildModels) {\n return this.fetchChildModels(model);\n }\n\n return Promise.resolve(model);\n });\n }\n\n /**\n */\n fetchFromCache(): Promise<ModularUIModel> {\n this.options = {\n ...this.options,\n cache: true,\n };\n\n return this.fetch();\n }\n\n /**\n */\n fetchChildModels(model: ModularUIModel): Promise<ModularUIModel> {\n const childModelLinks = model.getInitialChildModelLinks();\n\n const childModelRequests = childModelLinks.map((childModelLink) => {\n const request = new ModularUIRequest(childModelLink.href, {\n locale: this.locale,\n });\n\n if (childModelLink.targetModel) {\n request.targetModel = childModelLink.targetModel;\n }\n\n if (childModelLink.isCacheable) {\n return request.fetchFromCache();\n }\n\n return request.fetch();\n });\n\n return Promise.allSettled(childModelRequests).then((childModels) => {\n const resolvedChildModels = [];\n\n childModels.forEach((childModel) => {\n if (childModel.status === \"rejected\") {\n const { reason } = childModel;\n if (reason.name !== \"Error.ChangePasswordRequired\") {\n console.error(\n \"Unexpected error when retrieving child model:\",\n reason\n );\n }\n } else {\n resolvedChildModels.push(childModel.value);\n }\n });\n\n model.addChildModels(resolvedChildModels);\n\n return model;\n });\n }\n\n /**\n */\n fetchContent(withChildSections: boolean): Promise<mixed> {\n return this.fetchFromCache().then((model) => {\n if (\n withChildSections &&\n model instanceof ContentModel &&\n model.childSectionLinks.length > 0\n ) {\n return this.fetchContentChildSections(model);\n }\n\n return Promise.resolve(model);\n });\n }\n\n /**\n * Recursively return child sections defined on the content model\n */\n fetchContentChildSections(contentModel: ContentModel): Promise<mixed> {\n const newContentModel = contentModel.clone();\n\n return Promise.all(\n contentModel.childSectionLinks.map((childSectionLink) => {\n const contentHrefWithEntryDate = childSectionLink.selfhref.addParameter(\n TIMEVERSION_FILTER_NAME,\n contentModel.entryDate\n );\n\n const request = new ModularUIRequest(contentHrefWithEntryDate, {\n locale: this.locale,\n });\n\n return request.fetchContent(true);\n })\n ).then((sectionModels) => {\n newContentModel.childSections = sectionModels;\n\n return newContentModel;\n });\n }\n\n /**\n * Make a post request with optionally data to send\n * @param data\n */\n post(data?: string | { [key: string]: string }): Promise<ModularUIModel> {\n this.method = HTTP_METHODS.POST;\n this.options = {\n ...this.options,\n data,\n };\n\n return this.fetch();\n }\n\n /**\n * Make a POST request using the form, an updated form is returned (merge of old and new form)\n * @param form\n * @returns {Promise<FormModel>}\n */\n postForm(form: FormModel): Promise<FormModel> {\n this.method = HTTP_METHODS.POST;\n this.options = {\n ...this.options,\n data: form.formdata,\n };\n\n return this.fetch().then((response) => {\n return form.update(response);\n });\n }\n\n /**\n * Simplified synchronous version of fetch (returns the model, not a Promise)\n * This can be used on the server to retrieve a model. It only loads the request url and it's child models\n */\n fetchSync(): ModularUIModel {\n const options = { headers: { \"Accept-Language\": this.locale } };\n\n const dataString = dataFetcher.fetch(this.href.toString(), options);\n if (dataString == null) {\n throw new Error(`No data received for ${this.href.toString()}`);\n }\n\n this.processDataService(JSON.parse(dataString));\n\n const contributionsString = dataFetcher.fetch(\n this.contributionsHref.toString(),\n options\n );\n if (contributionsString == null) {\n throw new Error(\n `No constributions received for ${this.contributionsHref.toString()}`\n );\n }\n this.processContributionsService(JSON.parse(contributionsString));\n\n const model = this.createModel();\n\n const childModelLinks = model.getInitialChildModelLinks();\n\n const childModels = childModelLinks.map((childModelLink) => {\n return new ModularUIRequest(childModelLink.href, {\n locale: this.locale,\n }).fetchSync();\n });\n model.addChildModels(childModels);\n\n return model;\n }\n}\n\nexport default ModularUIRequest;\n"],"mappings":";;;;;;;;;;;;;;;AACA;AAEA;AAEA;AAEA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AASA;AACA;AACA;AACA;AACA,MAAMA,gBAAgB,CAAC;EAerB;AACF;EACEC,WAAW,CACTC,IAAmB,EAEnB;IAAA,IADAC,OAAwC,uEAAG,CAAC,CAAC;IAAA;IAAA;IAAA;IAAA;IAAA,yDAblB,KAAK;IAAA;IAAA;IAAA,+CAGIC,uBAAY,CAACC,GAAG;IAAA;IAAA,iDAIlC,aAAa;IAQ/B,IAAI,CAACH,IAAI,EAAE;MACT,MAAM,IAAII,oCAAwB,CAChC,wDAAwD,CACzD;IACH;IAEA,IAAI,CAACC,SAAS,GAAG,IAAAC,qBAAW,GAAE;IAE9B,IAAI,CAACL,OAAO,GAAGA,OAAO;IAEtB,IAAI,CAACM,SAAS,G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AAQ,EAAE,EACjCpC,OAAO,CACR;IACD,IAAI+K,mBAAmB,IAAI,IAAI,EAAE;MAC/B,MAAM,IAAI9C,KAAK,CACZ,kCAAiC,IAAI,CAACpH,iBAAiB,CAACuB,QAAQ,EAAG,EAAC,CACtE;IACH;IACA,IAAI,CAACK,2BAA2B,CAAC2E,IAAI,CAACC,KAAK,CAAC0D,mBAAmB,CAAC,CAAC;IAEjE,MAAM7D,KAAK,GAAG,IAAI,CAAC1E,WAAW,EAAE;IAEhC,MAAM4F,eAAe,GAAGlB,KAAK,CAACmB,yBAAyB,EAAE;IAEzD,MAAMM,WAAW,GAAG,kBAAAP,eAAe,OAAfA,eAAe,EAAMG,cAAc,IAAK;MAC1D,OAAO,IAAI1I,gBAAgB,CAAC0I,cAAc,CAACxI,IAAI,EAAE;QAC/CU,MAAM,EAAE,IAAI,CAACA;MACf,CAAC,CAAC,CAACkK,SAAS,EAAE;IAChB,CAAC,CAAC;IACFzD,KAAK,CAACiC,cAAc,CAACR,WAAW,CAAC;IAEjC,OAAOzB,KAAK;EACd;AACF;AAAC,eAEcrH,gBAAgB;AAAA"}
|
|
1
|
+
{"version":3,"file":"ModularUIRequest.js","names":["_deepmerge","_interopRequireDefault","require","_Constants","_LayoutHints","_Settings","_Href","_universalFetch","_resolveModel","_FormModel","_ContentModel","_ModularUIResponse","_ModularUIError","_exceptions","_objects","ModularUIRequest","constructor","href","options","arguments","length","undefined","_defineProperty2","default","HTTP_METHODS","GET","IllegalArgumentException","_basePath","getBasePath","_response","ModularUIResponse","Href","locale","parameters","targetModel","method","contributionsHref","_contributionsHref","_locale","response","_href","_method","_options","requestOptions","forceTargetModel","updateModel","childmodels","isValidationRequest","removeOnUnmount","withChildModels","_targetModel","_forceTargetModel","resolveModel","availableModels","Array","isArray","Model","isApplicableModel","IllegalStateException","toString","_map","call","m","modelName","join","_stringify","createModel","processContributionsService","contributionsData","isPlainObject","contributionsKey","_keys","error","handleContributionsError","key","contributions","errorMessage","properties","message","ModularUIError","handleDataError","path","handleData","data","links","_links","processDataService","fetchContributionsService","universalFetch","url","cache","fetchDataService","params","getQuerystringForModularUI","onProgress","processAsyncLayoutHints","getSetting","processApplicationLinks","processTabLinks","processPanelLinks","_promise","resolve","contributionLinks","dataLinks","contributionTabLink","tab","_context","dataTabLinks","_find","dataLink","name","processLinks","components","then","newLinks","replaceApplicationLinks","tabName","_context2","tabLink","component","panel","dataLinksPerName","linksPerName","hideWhenEmptyLinks","_filter","contributionLink","layouthint","includes","HIDE_WHEN_EMPTY","isHiddenListChecks","push","isHiddenList","all","hiddenLinks","_includes","newDataLinks","dataLinkKey","HIDE_WHEN_EMPTY_IGNORE_TASKS","_embedded","actions","noListItems","noActions","isHidden","catch","progressEvent","_progressEvent","getDynamicValidationData","model","prevData","JSON","parse","FormModel","newData","validationData","deepmerge","loadDynamicValidations","currentFormObject","hasDynamicValidations","validationHref","setParameter","updateValidations","fetch","Error","fetchChildModels","fetchFromCache","childModelLinks","getInitialChildModelLinks","childModelRequests","childModelLink","request","isCacheable","allSettled","childModels","resolvedChildModels","forEach","childModel","status","reason","console","value","addChildModels","fetchContent","withChildSections","ContentModel","childSectionLinks","fetchContentChildSections","contentModel","_context3","newContentModel","clone","childSectionLink","contentHrefWithEntryDate","selfhref","addParameter","TIMEVERSION_FILTER_NAME","entryDate","sectionModels","childSections","post","POST","postForm","form","formdata","update","fetchSync","headers","dataString","dataFetcher","contributionsString","_default","exports"],"sources":["../../src/modularui/ModularUIRequest.js"],"sourcesContent":["// @flow\nimport deepmerge from \"deepmerge\";\n\nimport { HTTP_METHODS, TIMEVERSION_FILTER_NAME } from \"../constants/Constants\";\n\nimport { HIDE_WHEN_EMPTY } from \"../constants/LayoutHints\";\n\nimport { getBasePath, getSetting } from \"../constants/Settings\";\n\nimport Href from \"../models/href/Href\";\n\nimport universalFetch from \"../utils/fetch/universalFetch\";\nimport resolveModel from \"../models/resolveModel\";\nimport FormModel from \"../models/form/FormModel\";\nimport ContentModel from \"../models/content/ContentModel\";\n\nimport ModularUIResponse from \"./ModularUIResponse\";\n\nimport ModularUIError from \"./ModularUIError\";\nimport { IllegalArgumentException, IllegalStateException } from \"../exceptions\";\n\nimport { isPlainObject } from \"../utils/helpers/objects\";\n\nimport type { TargetModel } from \"./types\";\nimport type {\n RequestBaseOptions,\n RequestModularUIOptions,\n} from \"../utils/fetch/types\";\nimport type { ModularUIModel } from \"../models/types\";\n\n/**\n * Helper for fetching data and contributions from the Be Informed modular ui\n * and merge it into a target or resolvable model.\n */\nclass ModularUIRequest {\n _response: ModularUIResponse;\n\n _href: Href;\n _options: RequestModularUIOptions;\n _targetModel: ?TargetModel;\n _forceTargetModel: boolean = false;\n _contributionsHref: string;\n _locale: string;\n _method: $Keys<typeof HTTP_METHODS> = HTTP_METHODS.GET;\n\n _progressEvent: ProgressEventHandler;\n\n _basePath: string = \"/BeInformed\";\n\n /**\n */\n constructor(\n href: Href | string,\n options: $Shape<RequestModularUIOptions> = {}\n ) {\n if (!href) {\n throw new IllegalArgumentException(\n \"You must pass a href to the resource that is requested\"\n );\n }\n\n this._basePath = getBasePath();\n\n this.options = options;\n\n this._response = new ModularUIResponse();\n\n this.href = typeof href === \"string\" ? new Href(href) : href;\n this.locale = options.locale ?? \"en\";\n\n // copy request parameters to response, to be able to use them in the models\n // self links are missing the request parameters\n this._response.parameters = this.href.parameters;\n\n if (options.targetModel) {\n this.targetModel = options.targetModel;\n }\n\n if (options.method) {\n this.method = options.method;\n } else {\n this.method = this.href.method;\n }\n }\n\n /**\n */\n get contributionsHref(): string {\n return this._contributionsHref;\n }\n\n /**\n */\n set contributionsHref(contributionsHref: string) {\n this._contributionsHref = contributionsHref;\n }\n\n /**\n */\n set locale(locale: string) {\n this._locale = locale;\n this._response.locale = locale;\n }\n\n /**\n */\n get locale(): string {\n return this._locale;\n }\n\n /**\n */\n get response(): ModularUIResponse {\n return this._response;\n }\n\n /**\n */\n set href(href: Href) {\n this._href = href;\n }\n\n /**\n */\n get href(): Href {\n return this._href;\n }\n\n /**\n */\n set method(method: $Keys<typeof HTTP_METHODS>) {\n this._method = method;\n }\n\n /**\n */\n get method(): $Keys<typeof HTTP_METHODS> {\n return this._method;\n }\n\n /**\n */\n get options(): RequestModularUIOptions {\n return {\n ...this._options,\n locale: this.locale,\n method: this.method,\n };\n }\n\n /**\n */\n get requestOptions(): RequestBaseOptions {\n /* eslint-disable no-unused-vars */\n const {\n targetModel,\n forceTargetModel,\n updateModel,\n childmodels,\n isValidationRequest,\n removeOnUnmount,\n ...requestOptions\n } = this.options;\n /* eslint-enable no-unused-vars */\n return requestOptions;\n }\n\n /**\n */\n set options(options: RequestModularUIOptions) {\n this._options = options;\n }\n\n /**\n */\n get withChildModels(): boolean {\n return (\n !(\"childmodels\" in this.options) || this.options.childmodels === true\n );\n }\n\n /**\n */\n set targetModel(targetModel: TargetModel) {\n this._targetModel = targetModel;\n }\n\n /**\n */\n get targetModel(): ?TargetModel {\n return this._targetModel;\n }\n\n /**\n */\n set forceTargetModel(forceTargetModel: boolean) {\n this._forceTargetModel = forceTargetModel ?? false;\n }\n\n /**\n */\n get forceTargetModel(): boolean {\n return this._forceTargetModel;\n }\n\n /**\n */\n resolveModel(): Class<ModularUIModel> {\n let availableModels;\n if (this.targetModel) {\n availableModels = Array.isArray(this.targetModel)\n ? [...this.targetModel]\n : [this.targetModel];\n\n if (this.forceTargetModel) {\n return availableModels[0];\n }\n }\n\n const Model: Class<ModularUIModel> | null = resolveModel(\n this.response,\n availableModels\n );\n\n if (Model && Model.isApplicableModel) {\n return Model;\n }\n\n if (availableModels) {\n throw new IllegalStateException(\n `data for ${this.href.toString()} is not applicable for model(s): ${availableModels\n .map((m) => m.modelName)\n .join(\", \")}, received response: ${JSON.stringify(this.response)}`\n );\n }\n\n throw new IllegalStateException(\n `no javascript model is applicable for received request of ${this.href.toString()}, with response: ${JSON.stringify(\n this.response\n )}`\n );\n }\n\n /**\n */\n createModel(): ModularUIModel {\n const Model = this.resolveModel();\n return new Model(this.response);\n }\n\n /**\n */\n processContributionsService(contributionsData: Object): void {\n if (!isPlainObject(contributionsData)) {\n throw new IllegalArgumentException(\n \"Missing contributions data or contributions is not JSON\"\n );\n }\n\n const [contributionsKey] = Object.keys(contributionsData);\n\n if (contributionsData.error && contributionsKey === \"error\") {\n this.handleContributionsError(contributionsData.error);\n }\n\n // The key of the data service is different from the contributions service for forms\n if (!(this.response.key in contributionsData)) {\n this.response.key = contributionsKey;\n }\n\n this.response.contributions = contributionsData[this.response.key];\n }\n\n /**\n */\n handleContributionsError(error: Object): void {\n const errorMessage = error.properties?.message ?? \"Error in contribution\";\n throw new ModularUIError(errorMessage, error, this.contributionsHref);\n }\n\n /**\n */\n handleDataError(error: Object): void {\n if (error.properties) {\n const errorMessage = error.properties?.message ?? \"Error in data\";\n throw new ModularUIError(errorMessage, error, this.href.path.toString());\n }\n\n throw new IllegalArgumentException(error);\n }\n\n /**\n */\n handleData(key: string, data: Object): void {\n this.response.key = key;\n this.response.data = data;\n\n const links = data._links;\n\n if (links && links.contributions) {\n this.contributionsHref = links.contributions.href;\n } else if (Array.isArray(links) && links[0].contributions) {\n this.contributionsHref = links[0].contributions.href;\n } else {\n throw new IllegalArgumentException(\n `Contributions link not found for data with key ${key}`\n );\n }\n }\n\n /**\n */\n processDataService(data: Object): void {\n if (!isPlainObject(data)) {\n throw new IllegalArgumentException(\"Missing data or data is not JSON\");\n }\n\n if (data.error) {\n this.handleDataError(data.error);\n } else {\n const [key] = Object.keys(data);\n this.handleData(key, data[key]);\n }\n }\n\n /**\n */\n fetchContributionsService(): Promise<any> {\n if (!this.contributionsHref) {\n throw new IllegalStateException(\"Missing a contributions href\");\n }\n\n return universalFetch({\n url: `${this._basePath}${this.contributionsHref}`,\n cache: true,\n locale: this.options.locale,\n });\n }\n\n /**\n */\n fetchDataService(): Promise<any> {\n return universalFetch({\n ...this.requestOptions,\n url: `${this._basePath}${this.href.path}`,\n params: this.href.getQuerystringForModularUI(),\n locale: this.options.locale,\n onProgress: this.onProgress,\n });\n }\n\n /**\n * Check if links contain a 'hide-when-empty' layout hint and remove the link from\n * the component when it exists and no results are available\n */\n async processAsyncLayoutHints(): Promise<void> {\n if (getSetting(\"ALLOW_HIDE_WHEN_EMPTY_ON_TABS\")) {\n await this.processApplicationLinks();\n await this.processTabLinks();\n }\n await this.processPanelLinks();\n\n return Promise.resolve();\n }\n\n /**\n * hide application links<br>\n * _links on application data contains an extra level of tab links\n */\n processApplicationLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n const dataLinks = this.response.data._links;\n if (!contributionLinks || !dataLinks) {\n return Promise.resolve();\n }\n\n if (\"tab\" in contributionLinks && \"tab\" in dataLinks) {\n for (const contributionTabLink of contributionLinks.tab) {\n if (\"components\" in contributionTabLink) {\n const dataTabLinks = dataLinks.tab.find(\n (dataLink) => dataLink.name === contributionTabLink.name\n );\n\n if (dataTabLinks && \"components\" in dataTabLinks) {\n return this.processLinks(\n dataTabLinks.components,\n contributionTabLink.components\n ).then((newLinks) =>\n this.replaceApplicationLinks(contributionTabLink.name, newLinks)\n );\n }\n }\n }\n }\n\n return Promise.resolve();\n }\n\n /**\n * Replace hidden link in application link tree\n */\n replaceApplicationLinks(tabName: string, newLinks: Array<Object>): void {\n this.response.data._links.tab = this.response.data._links.tab.map(\n (tabLink) => {\n const key = tabLink.name;\n if (tabName === key) {\n tabLink.components = newLinks;\n }\n return tabLink;\n }\n );\n }\n\n /**\n */\n processTabLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n\n if (!contributionLinks) {\n return Promise.resolve();\n }\n\n if (\"component\" in contributionLinks) {\n return this.processLinks(\n this.response.data._links.component,\n contributionLinks.component\n ).then((newLinks) => {\n this.response.data._links.component = newLinks;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n */\n processPanelLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n\n if (!contributionLinks) {\n return Promise.resolve();\n }\n\n if (\"panel\" in contributionLinks) {\n return this.processLinks(\n this.response.data._links,\n contributionLinks.panel\n ).then((newLinks) => {\n this.response.data._links = newLinks;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n * Retrieve an object of key: link\n */\n dataLinksPerName(dataLinks: any): { [linkName: string]: any } {\n if (Array.isArray(dataLinks)) {\n const links = {};\n for (const dataLink of dataLinks) {\n links[dataLink.name] = dataLink;\n }\n return links;\n }\n return dataLinks;\n }\n\n /**\n * Check if links are empty and hide them when hide-when-empty hint exists\n */\n processLinks(\n dataLinks: any,\n contributionLinks: any\n ): Promise<Object | Array<Object>> {\n const linksPerName = this.dataLinksPerName(dataLinks);\n const hideWhenEmptyLinks = contributionLinks.filter((contributionLink) =>\n contributionLink.layouthint?.includes(HIDE_WHEN_EMPTY)\n );\n\n const isHiddenListChecks = [];\n\n for (const contributionLink of hideWhenEmptyLinks) {\n const dataLink = linksPerName[contributionLink.name];\n if (dataLink?.href) {\n isHiddenListChecks.push(\n this.isHiddenList(contributionLink.name, dataLink.href)\n );\n }\n }\n\n return Promise.all(isHiddenListChecks).then(\n (hiddenLinks: Array<string>) => {\n if (Array.isArray(dataLinks)) {\n return dataLinks.filter(\n (dataLink) => !hiddenLinks.includes(dataLink.name)\n );\n }\n\n const newDataLinks: { [string]: any } = {};\n for (const dataLinkKey in dataLinks) {\n if (!hiddenLinks.includes(dataLinkKey)) {\n newDataLinks[dataLinkKey] = dataLinks[dataLinkKey];\n }\n }\n return newDataLinks;\n }\n );\n }\n\n /**\n */\n isHiddenList(name: string, href: string): Promise<string> {\n const HIDE_WHEN_EMPTY_IGNORE_TASKS = getSetting(\n \"HIDE_WHEN_EMPTY_IGNORE_TASKS\",\n false\n );\n\n return universalFetch({\n ...this.requestOptions,\n url: `${this._basePath}${href}`,\n })\n .then((response: Object) => {\n if (isPlainObject(response)) {\n const [key] = Object.keys(response);\n const { _embedded, actions } = response[key];\n\n const noListItems = _embedded === null;\n const noActions = actions == null || HIDE_WHEN_EMPTY_IGNORE_TASKS;\n\n const isHidden = noListItems && noActions;\n if (isHidden) {\n return name;\n }\n }\n return \"\";\n })\n .catch(() => {\n return \"\";\n });\n }\n\n /**\n */\n set onProgress(progressEvent: ProgressEventHandler) {\n this._progressEvent = progressEvent;\n }\n\n /**\n */\n get onProgress(): ProgressEventHandler {\n return this._progressEvent || null;\n }\n\n /**\n * Combine previous send request data with new validation data to create a complete request object\n * The received model is new FormModel containing ONLY the current question, not the previously entered questions\n * to create a complete request we append the originally send form objects\n */\n getDynamicValidationData(model: ModularUIModel): string {\n const prevData =\n typeof this.options.data === \"string\"\n ? JSON.parse(this.options.data)\n : this.options.data;\n\n if (model instanceof FormModel) {\n const newData = JSON.parse(model.validationData);\n // $FlowFixMe incompatible-call\n return JSON.stringify(deepmerge(prevData || {}, newData));\n }\n\n return JSON.stringify(prevData) ?? \"{}\";\n }\n\n /**\n * First load of dynamic values when a form is loaded\n */\n loadDynamicValidations(model: ModularUIModel): Promise<ModularUIModel> {\n if (\n !this.options.isValidationRequest &&\n getSetting(\"USE_INSTANT_SERVER_VALIDATION\") &&\n model instanceof FormModel &&\n model.currentFormObject &&\n model.currentFormObject.hasDynamicValidations\n ) {\n const validationHref = this.href.setParameter(\"commit\", \"false\");\n return universalFetch({\n ...this.requestOptions,\n url: `${this._basePath}${this.href.path}`,\n params: validationHref.getQuerystringForModularUI(),\n data: this.getDynamicValidationData(model),\n }).then((data) => {\n if (data == null || typeof data !== \"object\") {\n return model;\n }\n\n const [key] = Object.keys(data);\n return model.updateValidations(data[key]);\n });\n }\n\n return Promise.resolve(model);\n }\n\n /**\n */\n fetch(): Promise<ModularUIModel> {\n return this.fetchDataService()\n .then((data) => {\n if (data == null) {\n throw new Error(`No data received for ${this.href.toString()}`);\n }\n\n this.processDataService(data);\n return this.fetchContributionsService();\n })\n .then((contributionsData) => {\n if (contributionsData == null) {\n throw new Error(\n `No contributions data received for ${this.contributionsHref}`\n );\n }\n\n this.processContributionsService(contributionsData);\n return this.processAsyncLayoutHints();\n })\n .then(() => Promise.resolve(this.createModel()))\n .then((model) => this.loadDynamicValidations(model))\n .then((model) => {\n if (this.withChildModels) {\n return this.fetchChildModels(model);\n }\n\n return Promise.resolve(model);\n });\n }\n\n /**\n */\n fetchFromCache(): Promise<ModularUIModel> {\n this.options = {\n ...this.options,\n cache: true,\n };\n\n return this.fetch();\n }\n\n /**\n */\n fetchChildModels(model: ModularUIModel): Promise<ModularUIModel> {\n const childModelLinks = model.getInitialChildModelLinks();\n\n const childModelRequests = childModelLinks.map((childModelLink) => {\n const request = new ModularUIRequest(childModelLink.href, {\n locale: this.locale,\n });\n\n if (childModelLink.targetModel) {\n request.targetModel = childModelLink.targetModel;\n }\n\n if (childModelLink.isCacheable) {\n return request.fetchFromCache();\n }\n\n return request.fetch();\n });\n\n return Promise.allSettled(childModelRequests).then((childModels) => {\n const resolvedChildModels = [];\n\n childModels.forEach((childModel) => {\n if (childModel.status === \"rejected\") {\n const { reason } = childModel;\n if (reason.name !== \"Error.ChangePasswordRequired\") {\n console.error(\n \"Unexpected error when retrieving child model:\",\n reason\n );\n }\n } else {\n resolvedChildModels.push(childModel.value);\n }\n });\n\n model.addChildModels(resolvedChildModels);\n\n return model;\n });\n }\n\n /**\n */\n fetchContent(withChildSections: boolean): Promise<mixed> {\n return this.fetchFromCache().then((model) => {\n if (\n withChildSections &&\n model instanceof ContentModel &&\n model.childSectionLinks.length > 0\n ) {\n return this.fetchContentChildSections(model);\n }\n\n return Promise.resolve(model);\n });\n }\n\n /**\n * Recursively return child sections defined on the content model\n */\n fetchContentChildSections(contentModel: ContentModel): Promise<mixed> {\n const newContentModel = contentModel.clone();\n\n return Promise.all(\n contentModel.childSectionLinks.map((childSectionLink) => {\n const contentHrefWithEntryDate = childSectionLink.selfhref.addParameter(\n TIMEVERSION_FILTER_NAME,\n contentModel.entryDate\n );\n\n const request = new ModularUIRequest(contentHrefWithEntryDate, {\n locale: this.locale,\n });\n\n return request.fetchContent(true);\n })\n ).then((sectionModels) => {\n newContentModel.childSections = sectionModels;\n\n return newContentModel;\n });\n }\n\n /**\n * Make a post request with optionally data to send\n * @param data\n */\n post(data?: string | { [key: string]: string }): Promise<ModularUIModel> {\n this.method = HTTP_METHODS.POST;\n this.options = {\n ...this.options,\n data,\n };\n\n return this.fetch();\n }\n\n /**\n * Make a POST request using the form, an updated form is returned (merge of old and new form)\n * @param form\n * @returns {Promise<FormModel>}\n */\n postForm(form: FormModel): Promise<FormModel> {\n this.method = HTTP_METHODS.POST;\n this.options = {\n ...this.options,\n data: form.formdata,\n };\n\n return this.fetch().then((response) => {\n return form.update(response);\n });\n }\n\n /**\n * Simplified synchronous version of fetch (returns the model, not a Promise)\n * This can be used on the server to retrieve a model. It only loads the request url and it's child models\n */\n fetchSync(): ModularUIModel {\n const options = { headers: { \"Accept-Language\": this.locale } };\n\n const dataString = dataFetcher.fetch(this.href.toString(), options);\n if (dataString == null) {\n throw new Error(`No data received for ${this.href.toString()}`);\n }\n\n this.processDataService(JSON.parse(dataString));\n\n const contributionsString = dataFetcher.fetch(\n this.contributionsHref.toString(),\n options\n );\n if (contributionsString == null) {\n throw new Error(\n `No constributions received for ${this.contributionsHref.toString()}`\n );\n }\n this.processContributionsService(JSON.parse(contributionsString));\n\n const model = this.createModel();\n\n const childModelLinks = model.getInitialChildModelLinks();\n\n const childModels = childModelLinks.map((childModelLink) => {\n return new ModularUIRequest(childModelLink.href, {\n locale: this.locale,\n }).fetchSync();\n });\n model.addChildModels(childModels);\n\n return model;\n }\n}\n\nexport default ModularUIRequest;\n"],"mappings":";;;;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,eAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,aAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,UAAA,G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E;IACH;IACA,IAAI,CAACQ,2BAA2B,CAACkF,IAAI,CAACC,KAAK,CAAC0D,mBAAmB,CAAC,CAAC;IAEjE,MAAM7D,KAAK,GAAG,IAAI,CAACjF,WAAW,EAAE;IAEhC,MAAMmG,eAAe,GAAGlB,KAAK,CAACmB,yBAAyB,EAAE;IAEzD,MAAMM,WAAW,GAAG,IAAAhH,IAAA,CAAArC,OAAA,EAAA8I,eAAe,EAAAxG,IAAA,CAAfwG,eAAe,EAAMG,cAAc,IAAK;MAC1D,OAAO,IAAIzJ,gBAAgB,CAACyJ,cAAc,CAACvJ,IAAI,EAAE;QAC/Ce,MAAM,EAAE,IAAI,CAACA;MACf,CAAC,CAAC,CAAC4K,SAAS,EAAE;IAChB,CAAC,CAAC;IACFzD,KAAK,CAACiC,cAAc,CAACR,WAAW,CAAC;IAEjC,OAAOzB,KAAK;EACd;AACF;AAAC,IAAA8D,QAAA,GAEclM,gBAAgB;AAAAmM,OAAA,CAAA3L,OAAA,GAAA0L,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModularUIResponse.js","names":["ModularUIResponse","create","input","response","has","dataKey","data","contributionsKey","contributions","key","locale","_locale","_key","_data","_contributions","parameters","_parameters","rehydrate","modelData"],"sources":["../../src/modularui/ModularUIResponse.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport type Parameter from \"../models/parameter/Parameter\";\n\n/**\n */\nclass ModularUIResponse {\n _key: string = \"unknown\";\n _data: Object;\n _contributions: Object;\n _locale: string = \"en\";\n _parameters: Array<Parameter> = [];\n\n /**\n */\n static create(input: {\n key: string,\n data: Object,\n contributions: Object,\n }): ModularUIResponse {\n const response = new ModularUIResponse();\n\n if (has(input, \"data\") && has(input, \"contributions\")) {\n const [dataKey] = Object.keys(input.data);\n const [contributionsKey] = Object.keys(input.contributions);\n\n response.key = input.key ?? contributionsKey;\n response.data = input.data?.[dataKey];\n response.contributions = input.contributions?.[contributionsKey];\n }\n\n return response;\n }\n\n /**\n */\n set locale(locale: string) {\n this._locale = locale;\n }\n\n /**\n */\n get locale(): string {\n return this._locale;\n }\n\n /**\n */\n set key(key: string) {\n this._key = key;\n }\n\n /**\n */\n get key(): string {\n return this._key;\n }\n\n /**\n */\n set data(data: Object) {\n this._data = data;\n }\n\n /**\n */\n get data(): Object {\n return this._data;\n }\n\n /**\n */\n set contributions(contributions: Object) {\n this._contributions = contributions;\n }\n\n /**\n */\n get contributions(): Object {\n return this._contributions;\n }\n\n /**\n */\n set parameters(parameters: Array<Parameter>) {\n this._parameters = parameters;\n }\n\n /**\n */\n get parameters(): Array<Parameter> {\n return this._parameters;\n }\n\n /**\n */\n static rehydrate(data: {\n key: string,\n locale: string,\n data: Object,\n contributions: Object,\n }): ModularUIResponse {\n const modelData = new ModularUIResponse();\n\n modelData.locale = data.locale;\n modelData.key = data.key;\n modelData.data = data.data;\n modelData.contributions = data.contributions;\n\n return modelData;\n }\n}\n\nexport default ModularUIResponse;\n"],"mappings":";;;;;;;;;AACA;AAIA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"ModularUIResponse.js","names":["_objects","require","ModularUIResponse","constructor","_defineProperty2","default","create","input","response","has","dataKey","_keys","data","contributionsKey","contributions","key","locale","_locale","_key","_data","_contributions","parameters","_parameters","rehydrate","modelData","_default","exports"],"sources":["../../src/modularui/ModularUIResponse.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport type Parameter from \"../models/parameter/Parameter\";\n\n/**\n */\nclass ModularUIResponse {\n _key: string = \"unknown\";\n _data: Object;\n _contributions: Object;\n _locale: string = \"en\";\n _parameters: Array<Parameter> = [];\n\n /**\n */\n static create(input: {\n key: string,\n data: Object,\n contributions: Object,\n }): ModularUIResponse {\n const response = new ModularUIResponse();\n\n if (has(input, \"data\") && has(input, \"contributions\")) {\n const [dataKey] = Object.keys(input.data);\n const [contributionsKey] = Object.keys(input.contributions);\n\n response.key = input.key ?? contributionsKey;\n response.data = input.data?.[dataKey];\n response.contributions = input.contributions?.[contributionsKey];\n }\n\n return response;\n }\n\n /**\n */\n set locale(locale: string) {\n this._locale = locale;\n }\n\n /**\n */\n get locale(): string {\n return this._locale;\n }\n\n /**\n */\n set key(key: string) {\n this._key = key;\n }\n\n /**\n */\n get key(): string {\n return this._key;\n }\n\n /**\n */\n set data(data: Object) {\n this._data = data;\n }\n\n /**\n */\n get data(): Object {\n return this._data;\n }\n\n /**\n */\n set contributions(contributions: Object) {\n this._contributions = contributions;\n }\n\n /**\n */\n get contributions(): Object {\n return this._contributions;\n }\n\n /**\n */\n set parameters(parameters: Array<Parameter>) {\n this._parameters = parameters;\n }\n\n /**\n */\n get parameters(): Array<Parameter> {\n return this._parameters;\n }\n\n /**\n */\n static rehydrate(data: {\n key: string,\n locale: string,\n data: Object,\n contributions: Object,\n }): ModularUIResponse {\n const modelData = new ModularUIResponse();\n\n modelData.locale = data.locale;\n modelData.key = data.key;\n modelData.data = data.data;\n modelData.contributions = data.contributions;\n\n return modelData;\n }\n}\n\nexport default ModularUIResponse;\n"],"mappings":";;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAIA;AACA;AACA,MAAMC,iBAAiB,CAAC;EAAAC,YAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,gBACP,SAAS;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA,mBAGN,IAAI;IAAA,IAAAD,gBAAA,CAAAC,OAAA,uBACU,EAAE;EAAA;EAElC;AACF;EACE,OAAOC,MAAMA,CAACC,KAIb,EAAqB;IACpB,MAAMC,QAAQ,GAAG,IAAIN,iBAAiB,EAAE;IAExC,IAAI,IAAAO,YAAG,EAACF,KAAK,EAAE,MAAM,CAAC,IAAI,IAAAE,YAAG,EAACF,KAAK,EAAE,eAAe,CAAC,EAAE;MACrD,MAAM,CAACG,OAAO,CAAC,GAAG,IAAAC,KAAA,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