@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":"BaseCollection.js","names":["BaseCollection","constructor","initCollection","collection","_collection","add","items","all","Array","isArray","removeByIndex","itemIndex","
|
|
1
|
+
{"version":3,"file":"BaseCollection.js","names":["_full","require","BaseCollection","constructor","initCollection","arguments","length","undefined","_defineProperty2","default","collection","_collection","add","items","all","Array","isArray","removeByIndex","itemIndex","_context","_context2","_slice","call","hasItems","isEmpty","size","first","last","get","index","find","callbackfn","thisArg","_context3","_find","filter","_context4","_filter","some","every","map","_context5","_map","forEach","sort","compareFn","_context6","_sort","sorted","_context7","clone","klona","_default","exports"],"sources":["../../../src/models/base/BaseCollection.js"],"sourcesContent":["// @flow\nimport { klona } from \"klona/full\";\n\n/**\n * Base class for collections of models\n */\nclass BaseCollection<T> {\n _collection: Array<T>;\n\n /**\n * Construct base collection\n */\n constructor(initCollection: Array<T> = []) {\n this.collection = initCollection;\n }\n\n /**\n * Retrieve current collection\n */\n get collection(): Array<T> {\n return this._collection;\n }\n\n /**\n * Replace current collection with a new collection\n */\n set collection(collection: Array<T>) {\n this._collection = collection;\n }\n\n /**\n * Add an other collection, array of items or single item to this collection;\n */\n add(items: BaseCollection<T> | Array<T> | T): BaseCollection<T> {\n if (items instanceof BaseCollection) {\n this.collection = [...this.collection, ...items.all];\n } else if (Array.isArray(items)) {\n // $FlowExpectedError[incompatible-type]\n this.collection = [...this.collection, ...items];\n } else {\n this.collection = [...this.collection, items];\n }\n\n return this;\n }\n\n /**\n * Remove an item from the collection by it's index.\n */\n removeByIndex(itemIndex: number) {\n if (itemIndex > -1) {\n this.collection = [\n ...this.collection.slice(0, itemIndex),\n ...this.collection.slice(itemIndex + 1),\n ];\n }\n }\n\n /**\n * Indicates if the collection has items\n */\n get hasItems(): boolean {\n return this.length > 0;\n }\n\n /**\n * Indicates if collection is empty\n */\n get isEmpty(): boolean {\n return !this.hasItems;\n }\n\n /**\n * Retrieve all items in collection\n */\n get all(): Array<T> {\n return this.collection;\n }\n\n /**\n * Get the size of this collection\n */\n get size(): number {\n return this.length;\n }\n\n /**\n * Get the size of this collection\n */\n get length(): number {\n return this.collection.length;\n }\n\n /**\n * Return first link in collection\n */\n get first(): T | null {\n return this.collection[0] ?? null;\n }\n\n /**\n */\n get last(): T | null {\n return this.collection[this.collection.length - 1] ?? null;\n }\n\n /**\n */\n get(index: number): T | null {\n return this.collection[index] ?? null;\n }\n\n /**\n * Find item\n */\n find(\n callbackfn: (value: T, index: number, array: Array<T>) => any,\n thisArg?: any\n ): T | null {\n return this.collection.find(callbackfn, thisArg) ?? null;\n }\n\n /**\n * Filter items\n */\n filter(\n callbackfn: (value: T, index: number, array: Array<T>) => any,\n thisArg?: any\n ): Array<T> {\n return this.collection.filter(callbackfn, thisArg);\n }\n\n /**\n * Check if at least one item occurs\n */\n some(\n callbackfn: (value: T, index: number, array: Array<T>) => any,\n thisArg?: any\n ): boolean {\n return this.collection.some(callbackfn, thisArg);\n }\n\n /**\n */\n every(\n callbackfn: (value: T, index: number, array: Array<T>) => any,\n thisArg?: any\n ): boolean {\n return this.collection.every(callbackfn, thisArg);\n }\n\n /**\n */\n map<U>(\n callbackfn: (value: T, index: number, array: Array<T>) => U,\n thisArg?: T\n ): Array<U> {\n return this.collection.map<U, ?T>(callbackfn, thisArg);\n }\n\n /**\n */\n forEach(\n callbackfn: (value: T, index: number, array: Array<T>) => any,\n thisArg?: any\n ) {\n this.collection.forEach(callbackfn, thisArg);\n }\n\n /**\n */\n sort(compareFn?: (a: T, b: T) => number): Array<T> {\n return this.collection.sort(compareFn);\n }\n\n /**\n * Retrieve an alphabetically sorted array of items\n */\n get sorted(): Array<T> {\n return this.collection.sort();\n }\n\n /**\n * Returns a clone of the model\n */\n clone(): this {\n return klona(this);\n }\n}\n\nexport default BaseCollection;\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA,MAAMC,cAAc,CAAI;EAGtB;AACF;AACA;EACEC,WAAWA,CAAA,EAAgC;IAAA,IAA/BC,cAAwB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IAAA,IAAAG,gBAAA,CAAAC,OAAA;IACvC,IAAI,CAACC,UAAU,GAAGN,cAAc;EAClC;;EAEA;AACF;AACA;EACE,IAAIM,UAAUA,CAAA,EAAa;IACzB,OAAO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D;;EAEA;AACF;EACEO,KAAKA,CACHR,UAA6D,EAC7DC,OAAa,EACJ;IACT,OAAO,IAAI,CAACtB,UAAU,CAAC6B,KAAK,CAACR,UAAU,EAAEC,OAAO,CAAC;EACnD;;EAEA;AACF;EACEQ,GAAGA,CACDT,UAA2D,EAC3DC,OAAW,EACD;IAAA,IAAAS,SAAA;IACV,OAAO,IAAAC,IAAA,CAAAjC,OAAA,EAAAgC,SAAA,OAAI,CAAC/B,UAAU,EAAAY,IAAA,CAAAmB,SAAA,EAAYV,UAAU,EAAEC,OAAO,CAAC;EACxD;;EAEA;AACF;EACEW,OAAOA,CACLZ,UAA6D,EAC7DC,OAAa,EACb;IACA,IAAI,CAACtB,UAAU,CAACiC,OAAO,CAACZ,UAAU,EAAEC,OAAO,CAAC;EAC9C;;EAEA;AACF;EACEY,IAAIA,CAACC,SAAkC,EAAY;IAAA,IAAAC,SAAA;IACjD,OAAO,IAAAC,KAAA,CAAAtC,OAAA,EAAAqC,SAAA,OAAI,CAACpC,UAAU,EAAAY,IAAA,CAAAwB,SAAA,EAAMD,SAAS,CAAC;EACxC;;EAEA;AACF;AACA;EACE,IAAIG,MAAMA,CAAA,EAAa;IAAA,IAAAC,SAAA;IACrB,OAAO,IAAAF,KAAA,CAAAtC,OAAA,EAAAwC,SAAA,OAAI,CAACvC,UAAU,EAAAY,IAAA,CAAA2B,SAAA,CAAO;EAC/B;;EAEA;AACF;AACA;EACEC,KAAKA,CAAA,EAAS;IACZ,OAAO,IAAAC,WAAK,EAAC,IAAI,CAAC;EACpB;AACF;AAAC,IAAAC,QAAA,GAEclD,cAAc;AAAAmD,OAAA,CAAA5C,OAAA,GAAA2C,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseModel.js","names":["BaseModel","constructor","data","contributions","_data","_contributions","_layouthint","LayoutHintCollection","getContribution","getData","propName","defaultValue","layouthint","hasData","
|
|
1
|
+
{"version":3,"file":"BaseModel.js","names":["_full","require","_LayoutHintCollection","_interopRequireDefault","BaseModel","constructor","data","contributions","_defineProperty2","default","_data","_contributions","_layouthint","LayoutHintCollection","getContribution","getData","propName","defaultValue","arguments","length","undefined","layouthint","hasData","_keys","connectKey","key","_connectKey","dehydrate","rehydrate","clone","klona","_default","exports"],"sources":["../../../src/models/base/BaseModel.js"],"sourcesContent":["// @flow\nimport { klona } from \"klona/full\";\n\nimport LayoutHintCollection from \"../layouthint/LayoutHintCollection\";\n\nexport type BaseDehydrateData = {\n +data: Object,\n +contributions: Object,\n connectKey: string,\n ...\n};\n\n/**\n * Base model, this is the foundation of a model,\n * it contains data that is needed for all models like, data, contributions and layout hint\n *\n * Extend this for non modular ui resources, for modular ui resource start with the resourceModel\n */\nclass BaseModel {\n _data: Object;\n _contributions: Object;\n _layouthint: LayoutHintCollection;\n _connectKey: string;\n\n /**\n * constructor\n */\n constructor(data: Object, contributions: Object) {\n this._data = data;\n this._contributions = contributions;\n this._layouthint = new LayoutHintCollection(\n this.getContribution(\"layouthint\", [])\n );\n }\n\n /**\n * Retrieve data\n */\n get data(): Object {\n return this._data || {};\n }\n\n /**\n * Retrieve property from the data object of the model, mostly used internal\n */\n getData(propName: string, defaultValue: any = null): any {\n return this.data[propName] ?? defaultValue;\n }\n\n /**\n * Retrieve contributions\n */\n get contributions(): Object {\n return this._contributions || {};\n }\n\n /**\n * Retrieve property from the contributions of the model, mostly used internal\n */\n getContribution(propName: string, defaultValue: any = null): any {\n return this.contributions[propName] ?? defaultValue;\n }\n\n /**\n * Getting the layouthint\n */\n get layouthint(): LayoutHintCollection {\n return this._layouthint;\n }\n\n /**\n * Set the layouthint\n */\n set layouthint(layouthint: Array<string>) {\n this._layouthint = new LayoutHintCollection(layouthint);\n }\n\n /**\n * Indicates if the model has data\n */\n get hasData(): boolean {\n return Object.keys(this.data).length > 0;\n }\n\n /**\n * Set the unique key for this model\n */\n set connectKey(key: string) {\n this._connectKey = key;\n }\n\n /**\n * Get the unique key of this model\n */\n get connectKey(): string {\n return this._connectKey;\n }\n\n /**\n * Dehydrate internal data, returns the information that is needed to recreate the model\n */\n dehydrate(): BaseDehydrateData {\n return {\n data: this._data,\n contributions: this._contributions,\n connectKey: this._connectKey,\n };\n }\n\n /**\n * Recreate the model with the given data\n */\n rehydrate(data: BaseDehydrateData) {\n this._connectKey = data.connectKey;\n }\n\n /**\n * Returns a clone of the model\n */\n clone(): any {\n return klona(this);\n }\n}\n\nexport default BaseModel;\n"],"mappings":";;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AASA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,SAAS,CAAC;EAMd;AACF;AACA;EACEC,WAAWA,CAACC,IAAY,EAAEC,aAAqB,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAC/C,IAAI,CAACC,KAAK,GAAGJ,IAAI;IACjB,IAAI,CAACK,cAAc,GAAGJ,aAAa;IACnC,IAAI,CAACK,WAAW,GAAG,IAAIC,6BAAoB,CACzC,IAAI,CAACC,eAAe,CAAC,YAAY,EAAE,EAAE,CAAC,CACvC;EACH;;EAEA;AACF;AACA;EACE,IAAIR,IAAIA,CAAA,EAAW;IACjB,OAAO,IAAI,CAACI,KAAK,IAAI,CAAC,CAAC;EACzB;;EAEA;AACF;AACA;EACEK,OAAOA,CAACC,QAAgB,EAAiC;IAAA,IAA/BC,YAAiB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;IAChD,OAAO,IAAI,CAACZ,IAAI,CAACU,QAAQ,CAAC,IAAIC,YAAY;EAC5C;;EAEA;AACF;AACA;EACE,IAAIV,aAAaA,CAAA,EAAW;IAC1B,OAAO,IAAI,CAACI,cAAc,IAAI,CAAC,CAAC;E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@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceCollection.js","names":["ResourceCollection","BaseCollection","getInitialChildModelLinks","initialChildModelLinks","collection","forEach","item","push","setChildModels","models"],"sources":["../../../src/models/base/ResourceCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"./BaseCollection\";\n\nimport type { ModularUIModel, IModelWithChildModels } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * The ResourceCollection makes it possible to add child models to a collection of models\n * These child models are fetched using the ModularUI util\n */\nclass ResourceCollection<T: IModelWithChildModels> extends BaseCollection<T> {\n /**\n * Retrieve all child model links and flatten it into an array with single entries, removing all undefined items\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const initialChildModelLinks = [];\n\n this.collection.forEach((item: T) => {\n // $FlowFixMe[method-unbinding]\n if (typeof item?.getInitialChildModelLinks === \"function\") {\n initialChildModelLinks.push(...item.getInitialChildModelLinks());\n }\n });\n\n return initialChildModelLinks;\n }\n\n /**\n * Pass through models for setchildmodels to items of this collection\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.collection.forEach((item) => {\n // $FlowFixMe[prop-missing]\n if (typeof item[\"setChildModels\"] === \"function\") {\n item.setChildModels(models);\n }\n });\n }\n}\n\nexport default ResourceCollection;\n"],"mappings":";;;;;;;AACA;AAKA;AACA;AACA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"ResourceCollection.js","names":["_BaseCollection","_interopRequireDefault","require","ResourceCollection","BaseCollection","getInitialChildModelLinks","initialChildModelLinks","collection","forEach","item","push","setChildModels","models","_default","exports","default"],"sources":["../../../src/models/base/ResourceCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"./BaseCollection\";\n\nimport type { ModularUIModel, IModelWithChildModels } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * The ResourceCollection makes it possible to add child models to a collection of models\n * These child models are fetched using the ModularUI util\n */\nclass ResourceCollection<T: IModelWithChildModels> extends BaseCollection<T> {\n /**\n * Retrieve all child model links and flatten it into an array with single entries, removing all undefined items\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const initialChildModelLinks = [];\n\n this.collection.forEach((item: T) => {\n // $FlowFixMe[method-unbinding]\n if (typeof item?.getInitialChildModelLinks === \"function\") {\n initialChildModelLinks.push(...item.getInitialChildModelLinks());\n }\n });\n\n return initialChildModelLinks;\n }\n\n /**\n * Pass through models for setchildmodels to items of this collection\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.collection.forEach((item) => {\n // $FlowFixMe[prop-missing]\n if (typeof item[\"setChildModels\"] === \"function\") {\n item.setChildModels(models);\n }\n });\n }\n}\n\nexport default ResourceCollection;\n"],"mappings":";;;;;;;AACA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,SAAmCC,uBAAc,CAAI;EAC3E;AACF;AACA;EACEC,yBAAyBA,CAAA,EAAqB;IAC5C,MAAMC,sBAAsB,GAAG,EAAE;IAEjC,IAAI,CAACC,UAAU,CAACC,OAAO,CAAEC,IAAO,IAAK;MACnC;MACA,IAAI,OAAOA,IAAI,EAAEJ,yBAAyB,KAAK,UAAU,EAAE;QACzDC,sBAAsB,CAACI,IAAI,CAAC,GAAGD,IAAI,CAACJ,yBAAyB,EAAE,CAAC;MAClE;IACF,CAAC,CAAC;IAEF,OAAOC,sBAAsB;EAC/B;;EAEA;AACF;AACA;EACEK,cAAcA,CAACC,MAA6B,EAAE;IAC5C,IAAI,CAACL,UAAU,CAACC,OAAO,CAAEC,IAAI,IAAK;MAChC;MACA,IAAI,OAAOA,IAAI,CAAC,gBAAgB,CAAC,KAAK,UAAU,EAAE;QAChDA,IAAI,CAACE,cAAc,CAACC,MAAM,CAAC;MAC7B;IACF,CAAC,CAAC;EACJ;AACF;AAAC,IAAAC,QAAA,GAEcV,kBAAkB;AAAAW,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceModel.js","names":["ResourceModel","BaseModel","constructor","modularuiResponse","ModularUIResponse","data","contributions","_key","key","_locale","locale","_childModels","_lastServerUpdate","Date","now","modelName","IllegalStateException","isApplicableModel","IllegalArgumentException","Error","lastServerUpdate","type","resourcetype","getContribution","label","links","_links","LinkCollection","Array","isArray","self","selflink","getLinkByKey","selfhref","href","getInitialChildModelLinks","childModels","addChildModels","models","flattenModels","setChildModels","dehydrate","childModel"],"sources":["../../../src/models/base/ResourceModel.js"],"sourcesContent":["// @flow\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\nimport BaseModel from \"./BaseModel\";\nimport LinkCollection from \"../links/LinkCollection\";\n\nimport {\n IllegalArgumentException,\n IllegalStateException,\n} from \"../../exceptions\";\n\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\nimport type { ModularUIModel, IModelWithChildModels } from \"../types\";\n\n/**\n * Base model, this the foundation for models that represent modular ui services, e.g. application, tab, caseview, etc\n */\nclass ResourceModel extends BaseModel implements IModelWithChildModels {\n _key: string;\n _locale: string;\n _childModels: Array<ModularUIModel>;\n _links: LinkCollection;\n _lastServerUpdate: number;\n\n /**\n * constructor\n */\n constructor(modularuiResponse: ModularUIResponse = new ModularUIResponse()) {\n super(modularuiResponse.data, modularuiResponse.contributions);\n\n this._key = modularuiResponse.key;\n this._locale = modularuiResponse.locale;\n\n this._childModels = [];\n\n this._lastServerUpdate = Date.now();\n }\n\n /**\n * Property to render name of a model, is original name after transpilation\n */\n static get modelName(): string {\n throw new IllegalStateException(`No modelName set on the resource model`);\n }\n\n /**\n * Returns true when the model is supported based on configuration found in contributions\n *\n * @abstract\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n if (!(data instanceof ModularUIResponse)) {\n throw new IllegalArgumentException(\n \"Given argument for isApplicableModel is not a ModularUIResponse\"\n );\n }\n\n throw new Error(\"No isApplicableModel condition set on resourcemodel\");\n }\n\n /**\n */\n get lastServerUpdate(): number {\n return this._lastServerUpdate;\n }\n\n /**\n */\n set lastServerUpdate(lastServerUpdate: number) {\n this._lastServerUpdate = lastServerUpdate;\n }\n\n /**\n */\n get locale(): string {\n return this._locale;\n }\n\n /**\n * Retrieve key\n */\n get key(): string {\n return this._key;\n }\n\n /**\n * Get type of model\n *\n * @abstract\n */\n get type(): string {\n throw new IllegalStateException(\n `No type set on the resource model with key ${this.key}`\n );\n }\n\n /**\n * Retrieve type of resource\n */\n get resourcetype(): string {\n return this.getContribution(\"resourcetype\", \"unknown\");\n }\n\n /**\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Getting the links of the resource\n */\n get links(): LinkCollection {\n if (!this._links) {\n this._links = new LinkCollection(\n Array.isArray(this.data._links)\n ? this.data._links[0]\n : this.data._links,\n {\n self: {\n resourcetype: this.resourcetype,\n },\n ...this.contributions._links,\n }\n );\n }\n return this._links;\n }\n\n /**\n */\n set links(links: LinkCollection) {\n this._links = links;\n }\n\n /**\n * Get self link of model\n */\n get selflink(): LinkModel {\n const selflink = this.links.getLinkByKey(\"self\");\n\n if (selflink === null) {\n throw new IllegalStateException(\n `Could not find self link for ${\n this.key === null ? \"unknown\" : this.key\n }`\n );\n }\n\n return selflink;\n }\n\n /**\n * Return default self link of resource\n */\n get selfhref(): Href {\n return this.selflink.href;\n }\n\n /**\n * Add links to expand on initialization of this model\n *\n * @abstract\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return [];\n }\n\n /**\n * Retrieve links of expanded child models\n */\n get childModels(): Array<ModularUIModel> {\n return this._childModels;\n }\n\n /**\n * Add child models to this model\n */\n addChildModels(models: Array<ModularUIModel>): this {\n const flattenModels = [].concat(...models);\n\n this._childModels = flattenModels;\n\n this.setChildModels(flattenModels);\n\n return this;\n }\n\n /**\n * Template to set expanded child models\n * Use this hook to separate the retrieved child models into the correct models.\n *\n * @abstract\n * @example <caption>Put all models of instance List and GroupingPanel into the panels property</caption>\n */\n setChildModels(models: Array<ModularUIModel>): void {\n if (!models) {\n throw new IllegalArgumentException(\"No models send to setChildModels\");\n }\n }\n\n /**\n */\n dehydrate(): Object {\n return {\n ...super.dehydrate(),\n key: this._key,\n locale: this._locale,\n // $FlowFixMe[missing-type-arg]\n childModels: this._childModels.map<ModularUIModel>(\n (childModel: ModularUIModel) => childModel.dehydrate()\n ),\n };\n }\n}\n\nexport default ResourceModel;\n"],"mappings":";;;;;;;;;;AACA;AAEA;AACA;AAEA;AASA;AACA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"ResourceModel.js","names":["_ModularUIResponse","_interopRequireDefault","require","_BaseModel","_LinkCollection","_exceptions","ResourceModel","BaseModel","constructor","modularuiResponse","arguments","length","undefined","ModularUIResponse","data","contributions","_defineProperty2","default","_key","key","_locale","locale","_childModels","_lastServerUpdate","Date","now","modelName","IllegalStateException","isApplicableModel","IllegalArgumentException","Error","lastServerUpdate","type","resourcetype","getContribution","label","links","_links","LinkCollection","Array","isArray","self","selflink","getLinkByKey","selfhref","href","getInitialChildModelLinks","childModels","addChildModels","models","_context","flattenModels","_concat","call","setChildModels","dehydrate","_context2","_map","childModel","_default","exports"],"sources":["../../../src/models/base/ResourceModel.js"],"sourcesContent":["// @flow\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\nimport BaseModel from \"./BaseModel\";\nimport LinkCollection from \"../links/LinkCollection\";\n\nimport {\n IllegalArgumentException,\n IllegalStateException,\n} from \"../../exceptions\";\n\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\nimport type { ModularUIModel, IModelWithChildModels } from \"../types\";\n\n/**\n * Base model, this the foundation for models that represent modular ui services, e.g. application, tab, caseview, etc\n */\nclass ResourceModel extends BaseModel implements IModelWithChildModels {\n _key: string;\n _locale: string;\n _childModels: Array<ModularUIModel>;\n _links: LinkCollection;\n _lastServerUpdate: number;\n\n /**\n * constructor\n */\n constructor(modularuiResponse: ModularUIResponse = new ModularUIResponse()) {\n super(modularuiResponse.data, modularuiResponse.contributions);\n\n this._key = modularuiResponse.key;\n this._locale = modularuiResponse.locale;\n\n this._childModels = [];\n\n this._lastServerUpdate = Date.now();\n }\n\n /**\n * Property to render name of a model, is original name after transpilation\n */\n static get modelName(): string {\n throw new IllegalStateException(`No modelName set on the resource model`);\n }\n\n /**\n * Returns true when the model is supported based on configuration found in contributions\n *\n * @abstract\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n if (!(data instanceof ModularUIResponse)) {\n throw new IllegalArgumentException(\n \"Given argument for isApplicableModel is not a ModularUIResponse\"\n );\n }\n\n throw new Error(\"No isApplicableModel condition set on resourcemodel\");\n }\n\n /**\n */\n get lastServerUpdate(): number {\n return this._lastServerUpdate;\n }\n\n /**\n */\n set lastServerUpdate(lastServerUpdate: number) {\n this._lastServerUpdate = lastServerUpdate;\n }\n\n /**\n */\n get locale(): string {\n return this._locale;\n }\n\n /**\n * Retrieve key\n */\n get key(): string {\n return this._key;\n }\n\n /**\n * Get type of model\n *\n * @abstract\n */\n get type(): string {\n throw new IllegalStateException(\n `No type set on the resource model with key ${this.key}`\n );\n }\n\n /**\n * Retrieve type of resource\n */\n get resourcetype(): string {\n return this.getContribution(\"resourcetype\", \"unknown\");\n }\n\n /**\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Getting the links of the resource\n */\n get links(): LinkCollection {\n if (!this._links) {\n this._links = new LinkCollection(\n Array.isArray(this.data._links)\n ? this.data._links[0]\n : this.data._links,\n {\n self: {\n resourcetype: this.resourcetype,\n },\n ...this.contributions._links,\n }\n );\n }\n return this._links;\n }\n\n /**\n */\n set links(links: LinkCollection) {\n this._links = links;\n }\n\n /**\n * Get self link of model\n */\n get selflink(): LinkModel {\n const selflink = this.links.getLinkByKey(\"self\");\n\n if (selflink === null) {\n throw new IllegalStateException(\n `Could not find self link for ${\n this.key === null ? \"unknown\" : this.key\n }`\n );\n }\n\n return selflink;\n }\n\n /**\n * Return default self link of resource\n */\n get selfhref(): Href {\n return this.selflink.href;\n }\n\n /**\n * Add links to expand on initialization of this model\n *\n * @abstract\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return [];\n }\n\n /**\n * Retrieve links of expanded child models\n */\n get childModels(): Array<ModularUIModel> {\n return this._childModels;\n }\n\n /**\n * Add child models to this model\n */\n addChildModels(models: Array<ModularUIModel>): this {\n const flattenModels = [].concat(...models);\n\n this._childModels = flattenModels;\n\n this.setChildModels(flattenModels);\n\n return this;\n }\n\n /**\n * Template to set expanded child models\n * Use this hook to separate the retrieved child models into the correct models.\n *\n * @abstract\n * @example <caption>Put all models of instance List and GroupingPanel into the panels property</caption>\n */\n setChildModels(models: Array<ModularUIModel>): void {\n if (!models) {\n throw new IllegalArgumentException(\"No models send to setChildModels\");\n }\n }\n\n /**\n */\n dehydrate(): Object {\n return {\n ...super.dehydrate(),\n key: this._key,\n locale: this._locale,\n // $FlowFixMe[missing-type-arg]\n childModels: this._childModels.map<ModularUIModel>(\n (childModel: ModularUIModel) => childModel.dehydrate()\n ),\n };\n }\n}\n\nexport default ResourceModel;\n"],"mappings":";;;;;;;;;;AACA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AASA;AACA;AACA;AACA,MAAMI,aAAa,SAASC,kBAAS,CAAkC;EAOrE;AACF;AACA;EACEC,WAAWA,CAAA,EAAiE;IAAA,IAAhEC,iBAAoC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAIG,0BAAiB,EAAE;IACxE,KAAK,CAACJ,iBAAiB,CAACK,IAAI,EAAEL,iBAAiB,CAACM,aAAa,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IA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A;EACE0B,cAAcA,CAACC,MAA6B,EAAQ;IAAA,IAAAC,QAAA;IAClD,MAAMC,aAAa,GAAG,IAAAC,OAAA,CAAAnC,OAAA,EAAAiC,QAAA,KAAE,EAAAG,IAAA,CAAAH,QAAA,EAAQ,GAAGD,MAAM,CAAC;IAE1C,IAAI,CAAC3B,YAAY,GAAG6B,aAAa;IAEjC,IAAI,CAACG,cAAc,CAACH,aAAa,CAAC;IAElC,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEG,cAAcA,CAACL,MAA6B,EAAQ;IAClD,IAAI,CAACA,MAAM,EAAE;MACX,MAAM,IAAIpB,oCAAwB,CAAC,kCAAkC,CAAC;IACxE;EACF;;EAEA;AACF;EACE0B,SAASA,CAAA,EAAW;IAAA,IAAAC,SAAA;IAClB,OAAO;MACL,GAAG,KAAK,CAACD,SAAS,EAAE;MACpBpC,GAAG,EAAE,IAAI,CAACD,IAAI;MACdG,MAAM,EAAE,IAAI,CAACD,OAAO;MACpB;MACA2B,WAAW,EAAE,IAAAU,IAAA,CAAAxC,OAAA,EAAAuC,SAAA,OAAI,CAAClC,YAAY,EAAA+B,IAAA,CAAAG,SAAA,EAC3BE,UAA0B,IAAKA,UAAU,CAACH,SAAS,EAAE;IAE1D,CAAC;EACH;AACF;AAAC,IAAAI,QAAA,GAEcrD,aAAa;AAAAsD,OAAA,CAAA3C,OAAA,GAAA0C,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseViewModel.js","names":["CaseViewModel","DetailModel","constructor","caseviewData","createTaskGroupCollection","type","modelName","isApplicableModel","data","contributions","resourcetype","getInitialChildModelLinks","links","getLinksByGroup","all","panelLinks","setChildModels","models","taskGroupModels","i","length","TaskGroupModel","push","taskGroupCollection","add","casename","attributeCollection","getAttributeByLayoutHint","TITLE","label","value","viewLabel","getContribution","hasIntroText","introtext","_content","text","message","Array","isArray","texts","selfhref","selfLink","getLinkByKey","IllegalStateException","Href","href","allTaskgroupData","getData","allTaskgroupContributions","taskgroup","some","taskgroupContribution","name","taskgroupContributions","create","taskgroups","_taskGroupCollection","TaskGroupCollection","hasTaskGroups","hasItems"],"sources":["../../../src/models/caseview/CaseViewModel.js"],"sourcesContent":["// @flow\nimport DetailModel from \"../detail/DetailModel\";\nimport Href from \"../href/Href\";\nimport TaskGroupCollection from \"../taskgroup/TaskGroupCollection\";\nimport TaskGroupModel from \"../taskgroup/TaskGroupModel\";\n\nimport { TITLE } from \"../../constants/LayoutHints\";\n\nimport IllegalStateException from \"../../exceptions/IllegalStateException\";\n\nimport type { ModularUIModel, AttributeType } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkCollection from \"../links/LinkCollection\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * Model containing the details of one case.\n */\nexport default class CaseViewModel extends DetailModel {\n _taskGroupCollection: TaskGroupCollection;\n\n /**\n */\n constructor(caseviewData: ModularUIResponse) {\n super(caseviewData);\n\n this.createTaskGroupCollection();\n }\n\n /**\n */\n get type(): string {\n return \"CaseView\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"CaseViewModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"CaseView\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.links.getLinksByGroup(\"taskgroup\").all;\n }\n\n /**\n * Getting panel links\n */\n get panelLinks(): LinkCollection {\n return this.links.getLinksByGroup(\"panel\");\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n super.setChildModels(models);\n\n const taskGroupModels = [];\n for (let i = 0; i < models.length; i++) {\n if (models[i] instanceof TaskGroupModel) {\n taskGroupModels.push(models[i]);\n }\n }\n\n this.taskGroupCollection.add(taskGroupModels);\n }\n\n /**\n * Getting the case name\n */\n get casename(): ?AttributeType {\n return this.attributeCollection.getAttributeByLayoutHint(TITLE);\n }\n\n /**\n * Retrieve the case label, this can be configured with a case property with the layout hint 'title'\n */\n get label(): string {\n return this.casename ? this.casename.value : \"\";\n }\n\n /**\n * Retrieve the label that was configured on the caseview\n */\n get viewLabel(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Check if an introtext exists for this caseview\n */\n hasIntroText(): boolean {\n return this.introtext !== \"\";\n }\n\n /**\n * Getting the introduction text configured on the case view\n */\n get introtext(): string {\n if (this.data._content) {\n return this.data._content.text.message;\n }\n\n if (this.contributions.text) {\n return this.contributions.text.message ?? this.contributions.text;\n }\n\n if (Array.isArray(this.contributions.texts)) {\n return this.contributions.texts[0].text;\n }\n\n return \"\";\n }\n\n /**\n * Getting the self href\n */\n get selfhref(): Href {\n const selfLink = this.links.getLinkByKey(\"self\");\n\n if (selfLink === null) {\n throw new IllegalStateException(\"No self href available\");\n }\n\n return new Href(selfLink.href);\n }\n\n /**\n */\n createTaskGroupCollection() {\n const allTaskgroupData = this.getData(\"taskgroups\", []);\n const allTaskgroupContributions = this.getContribution(\"taskgroups\", []);\n\n this.taskGroupCollection = allTaskgroupData\n .filter((taskgroup) =>\n allTaskgroupContributions.some(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n )\n )\n .map((taskgroup) => {\n const taskgroupContributions = allTaskgroupContributions.find(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n );\n\n return TaskGroupModel.create(\n taskgroup.name,\n taskgroup,\n taskgroupContributions\n );\n });\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 taskgrouppanels on the tab\n */\n get taskGroupCollection(): TaskGroupCollection {\n return this._taskGroupCollection;\n }\n\n /**\n * Has taskgroups\n */\n hasTaskGroups(): boolean {\n return this.taskGroupCollection && this.taskGroupCollection.hasItems;\n }\n}\n"],"mappings":";;;;;;;;;;;AACA;AACA;AACA;AACA;AAEA;AAEA;AAOA;AACA;AACA;AACe,
|
|
1
|
+
{"version":3,"file":"CaseViewModel.js","names":["_DetailModel","_interopRequireDefault","require","_Href","_TaskGroupCollection","_TaskGroupModel","_LayoutHints","_IllegalStateException","CaseViewModel","DetailModel","constructor","caseviewData","_defineProperty2","default","createTaskGroupCollection","type","modelName","isApplicableModel","data","contributions","resourcetype","getInitialChildModelLinks","links","getLinksByGroup","all","panelLinks","setChildModels","models","taskGroupModels","i","length","TaskGroupModel","push","taskGroupCollection","add","casename","attributeCollection","getAttributeByLayoutHint","TITLE","label","value","viewLabel","getContribution","hasIntroText","introtext","_content","text","message","Array","isArray","texts","selfhref","selfLink","getLinkByKey","IllegalStateException","Href","href","_context","allTaskgroupData","getData","allTaskgroupContributions","_map","_filter","call","taskgroup","some","taskgroupContribution","name","taskgroupContributions","_find","create","taskgroups","_taskGroupCollection","TaskGroupCollection","hasTaskGroups","hasItems","exports"],"sources":["../../../src/models/caseview/CaseViewModel.js"],"sourcesContent":["// @flow\nimport DetailModel from \"../detail/DetailModel\";\nimport Href from \"../href/Href\";\nimport TaskGroupCollection from \"../taskgroup/TaskGroupCollection\";\nimport TaskGroupModel from \"../taskgroup/TaskGroupModel\";\n\nimport { TITLE } from \"../../constants/LayoutHints\";\n\nimport IllegalStateException from \"../../exceptions/IllegalStateException\";\n\nimport type { ModularUIModel, AttributeType } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkCollection from \"../links/LinkCollection\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * Model containing the details of one case.\n */\nexport default class CaseViewModel extends DetailModel {\n _taskGroupCollection: TaskGroupCollection;\n\n /**\n */\n constructor(caseviewData: ModularUIResponse) {\n super(caseviewData);\n\n this.createTaskGroupCollection();\n }\n\n /**\n */\n get type(): string {\n return \"CaseView\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"CaseViewModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"CaseView\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.links.getLinksByGroup(\"taskgroup\").all;\n }\n\n /**\n * Getting panel links\n */\n get panelLinks(): LinkCollection {\n return this.links.getLinksByGroup(\"panel\");\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n super.setChildModels(models);\n\n const taskGroupModels = [];\n for (let i = 0; i < models.length; i++) {\n if (models[i] instanceof TaskGroupModel) {\n taskGroupModels.push(models[i]);\n }\n }\n\n this.taskGroupCollection.add(taskGroupModels);\n }\n\n /**\n * Getting the case name\n */\n get casename(): ?AttributeType {\n return this.attributeCollection.getAttributeByLayoutHint(TITLE);\n }\n\n /**\n * Retrieve the case label, this can be configured with a case property with the layout hint 'title'\n */\n get label(): string {\n return this.casename ? this.casename.value : \"\";\n }\n\n /**\n * Retrieve the label that was configured on the caseview\n */\n get viewLabel(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Check if an introtext exists for this caseview\n */\n hasIntroText(): boolean {\n return this.introtext !== \"\";\n }\n\n /**\n * Getting the introduction text configured on the case view\n */\n get introtext(): string {\n if (this.data._content) {\n return this.data._content.text.message;\n }\n\n if (this.contributions.text) {\n return this.contributions.text.message ?? this.contributions.text;\n }\n\n if (Array.isArray(this.contributions.texts)) {\n return this.contributions.texts[0].text;\n }\n\n return \"\";\n }\n\n /**\n * Getting the self href\n */\n get selfhref(): Href {\n const selfLink = this.links.getLinkByKey(\"self\");\n\n if (selfLink === null) {\n throw new IllegalStateException(\"No self href available\");\n }\n\n return new Href(selfLink.href);\n }\n\n /**\n */\n createTaskGroupCollection() {\n const allTaskgroupData = this.getData(\"taskgroups\", []);\n const allTaskgroupContributions = this.getContribution(\"taskgroups\", []);\n\n this.taskGroupCollection = allTaskgroupData\n .filter((taskgroup) =>\n allTaskgroupContributions.some(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n )\n )\n .map((taskgroup) => {\n const taskgroupContributions = allTaskgroupContributions.find(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n );\n\n return TaskGroupModel.create(\n taskgroup.name,\n taskgroup,\n taskgroupContributions\n );\n });\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 taskgrouppanels on the tab\n */\n get taskGroupCollection(): TaskGroupCollection {\n return this._taskGroupCollection;\n }\n\n /**\n * Has taskgroups\n */\n hasTaskGroups(): boolean {\n return this.taskGroupCollection && this.taskGroupCollection.hasItems;\n }\n}\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,oBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,eAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,sBAAA,GAAAN,sBAAA,CAAAC,OAAA;AAOA;AACA;AACA;AACe,MAAMM,aAAa,SAASC,oBAAW,CAAC;EAGrD;AACF;EACEC,WAAWA,CAACC,YAA+B,EAAE;IAC3C,KAAK,CAACA,YAAY,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;IAEpB,IAAI,CAACC,yBAAyB,EAAE;EAClC;;EAEA;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,UAAU;EACnB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,eAAe;EACxB;;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;EACEC,yBAAyBA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AAG,IAAAC,KAAA,CAAAxD,OAAA,EAAA+C,yBAAyB,EAAAG,IAAA,CAAzBH,yBAAyB,EACrDM,qBAAqB,IACpBA,qBAAqB,CAACC,IAAI,KAAKH,SAAS,CAACG,IAAI,CAChD;MAED,OAAOpC,uBAAc,CAACuC,MAAM,CAC1BN,SAAS,CAACG,IAAI,EACdH,SAAS,EACTI,sBAAsB,CACvB;IACH,CAAC,CAAC;EACN;;EAEA;AACF;AACA;EACE,IAAInC,mBAAmBA,CAACsC,UAAiC,EAAE;IACzD,IAAI,CAACC,oBAAoB,GAAG,IAAIC,4BAAmB,CAACF,UAAU,CAAC;EACjE;;EAEA;AACF;AACA;EACE,IAAItC,mBAAmBA,CAAA,EAAwB;IAC7C,OAAO,IAAI,CAACuC,oBAAoB;EAClC;;EAEA;AACF;AACA;EACEE,aAAaA,CAAA,EAAY;IACvB,OAAO,IAAI,CAACzC,mBAAmB,IAAI,IAAI,CAACA,mBAAmB,CAAC0C,QAAQ;EACtE;AACF;AAACC,OAAA,CAAA/D,OAAA,GAAAL,aAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BusinessScenarioModel.js","names":["BusinessScenarioModel","ConceptDetailModel","type","modelName","isApplicableModel","data","isOfConceptType","_links","concepttype","href","conceptTypeHref","settingName","pathToKmt","conceptTypeSettings","STEP","getSetting","PERSONA","SCENARIO","Array","isArray","some","conceptTypeSetting","getInitialChildModelLinks","childModelLinks","scenarioStepLinks","relationsCollection","all","relation","direction","concept","concepttypeHref","path","asLinkModel","length","push","setChildModels","models","conceptTypeModel","model","ConceptTypeDetailModel","conceptType","scenarioSteps","i","selfhref","_scenarioSteps","actors","forEach","scenarioStep","relationsToActor","newRelationToActor","actor","key"],"sources":["../../../src/models/concepts/BusinessScenarioModel.js"],"sourcesContent":["// @flow\nimport ConceptDetailModel from \"./ConceptDetailModel\";\nimport ConceptTypeDetailModel from \"./ConceptTypeDetailModel\";\nimport { getSetting } from \"../../constants/Settings\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type { ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type ConceptLinkModel from \"./ConceptLinkModel\";\n\n/**\n */\nclass BusinessScenarioModel extends ConceptDetailModel {\n _scenarioSteps: Array<ConceptDetailModel>;\n\n /**\n */\n get type(): string {\n return \"BusinessScenario\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"BusinessScenario\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return BusinessScenarioModel.isOfConceptType(\n data?.data?._links?.concepttype?.href,\n \"SCENARIO\"\n );\n }\n\n /**\n */\n static isOfConceptType(\n conceptTypeHref: ?string,\n settingName: \"STEP\" | \"PERSONA\" | \"SCENARIO\"\n ): boolean {\n if (!conceptTypeHref) {\n return false;\n }\n\n const pathToKmt = \"/Library/KMTs/Business scenarios.bixml\";\n\n const conceptTypeSettings = {\n STEP: getSetting(\"BUSINESS_SCENARIO_STEP_CONCEPT_TYPE\", [\n `${pathToKmt}/ScenarioStep`,\n ]),\n PERSONA: getSetting(\"BUSINESS_SCENARIO_PERSONA_CONCEPT_TYPE\", [\n `${pathToKmt}/Persona`,\n ]),\n SCENARIO: getSetting(\"BUSINESS_SCENARIO_CONCEPT_TYPE\", [\n `${pathToKmt}/BusinessScenario`,\n ]),\n };\n\n return (\n Array.isArray(conceptTypeSettings[settingName]) &&\n conceptTypeSettings[settingName].some((conceptTypeSetting) =>\n conceptTypeHref.endsWith(conceptTypeSetting)\n )\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const childModelLinks = super.getInitialChildModelLinks();\n\n const scenarioStepLinks = this.relationsCollection.all\n .filter(\n (relation) =>\n relation.direction === \"outgoing\" &&\n BusinessScenarioModel.isOfConceptType(\n relation.concept.concepttypeHref?.path,\n \"STEP\"\n )\n )\n .map((relation) => relation.concept.asLinkModel());\n\n if (scenarioStepLinks.length > 0) {\n childModelLinks.push(...scenarioStepLinks);\n }\n\n return childModelLinks;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n // $FlowExpectedError[incompatible-type]\n const conceptTypeModel: ?ConceptTypeDetailModel = models.find(\n (model) => model instanceof ConceptTypeDetailModel\n );\n\n if (conceptTypeModel) {\n this.conceptType = conceptTypeModel;\n }\n\n this.relationsCollection.setChildModels(models);\n\n const scenarioSteps = [];\n for (let i = 0; i < models.length; i++) {\n const model = models[i];\n\n if (\n model instanceof ConceptDetailModel &&\n BusinessScenarioModel.isOfConceptType(\n model.conceptType?.selfhref.path,\n \"STEP\"\n )\n ) {\n scenarioSteps.push(model);\n }\n }\n\n this.scenarioSteps = scenarioSteps;\n }\n\n /**\n */\n set scenarioSteps(models: Array<ConceptDetailModel>) {\n this._scenarioSteps = models;\n }\n\n /**\n */\n get scenarioSteps(): Array<ConceptDetailModel> {\n return this._scenarioSteps;\n }\n\n /**\n */\n get actors(): Array<ConceptLinkModel> {\n const actors = [];\n\n this.scenarioSteps.forEach((scenarioStep) => {\n const relationsToActor = scenarioStep.relationsCollection.find(\n (relation) =>\n relation.direction === \"outgoing\" &&\n BusinessScenarioModel.isOfConceptType(\n relation.concept.concepttypeHref?.path,\n \"PERSONA\"\n )\n );\n\n const newRelationToActor =\n relationsToActor &&\n !actors.some((actor) => actor.key === relationsToActor.concept.key);\n\n if (relationsToActor && newRelationToActor) {\n actors.push(relationsToActor.concept);\n }\n });\n\n return actors;\n }\n}\n\nexport default BusinessScenarioModel;\n"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;AAOA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"BusinessScenarioModel.js","names":["_ConceptDetailModel","_interopRequireDefault","require","_ConceptTypeDetailModel","_Settings","BusinessScenarioModel","ConceptDetailModel","constructor","arguments","_defineProperty2","default","type","modelName","isApplicableModel","data","isOfConceptType","_links","concepttype","href","conceptTypeHref","settingName","pathToKmt","conceptTypeSettings","STEP","getSetting","PERSONA","SCENARIO","Array","isArray","some","conceptTypeSetting","_endsWith","call","getInitialChildModelLinks","_context","_context2","childModelLinks","scenarioStepLinks","_map","_filter","relationsCollection","all","relation","direction","concept","concepttypeHref","path","asLinkModel","length","push","setChildModels","models","conceptTypeModel","_find","model","ConceptTypeDetailModel","conceptType","scenarioSteps","i","selfhref","_scenarioSteps","actors","forEach","scenarioStep","_context3","relationsToActor","newRelationToActor","actor","key","_default","exports"],"sources":["../../../src/models/concepts/BusinessScenarioModel.js"],"sourcesContent":["// @flow\nimport ConceptDetailModel from \"./ConceptDetailModel\";\nimport ConceptTypeDetailModel from \"./ConceptTypeDetailModel\";\nimport { getSetting } from \"../../constants/Settings\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type { ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type ConceptLinkModel from \"./ConceptLinkModel\";\n\n/**\n */\nclass BusinessScenarioModel extends ConceptDetailModel {\n _scenarioSteps: Array<ConceptDetailModel>;\n\n /**\n */\n get type(): string {\n return \"BusinessScenario\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"BusinessScenario\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return BusinessScenarioModel.isOfConceptType(\n data?.data?._links?.concepttype?.href,\n \"SCENARIO\"\n );\n }\n\n /**\n */\n static isOfConceptType(\n conceptTypeHref: ?string,\n settingName: \"STEP\" | \"PERSONA\" | \"SCENARIO\"\n ): boolean {\n if (!conceptTypeHref) {\n return false;\n }\n\n const pathToKmt = \"/Library/KMTs/Business scenarios.bixml\";\n\n const conceptTypeSettings = {\n STEP: getSetting(\"BUSINESS_SCENARIO_STEP_CONCEPT_TYPE\", [\n `${pathToKmt}/ScenarioStep`,\n ]),\n PERSONA: getSetting(\"BUSINESS_SCENARIO_PERSONA_CONCEPT_TYPE\", [\n `${pathToKmt}/Persona`,\n ]),\n SCENARIO: getSetting(\"BUSINESS_SCENARIO_CONCEPT_TYPE\", [\n `${pathToKmt}/BusinessScenario`,\n ]),\n };\n\n return (\n Array.isArray(conceptTypeSettings[settingName]) &&\n conceptTypeSettings[settingName].some((conceptTypeSetting) =>\n conceptTypeHref.endsWith(conceptTypeSetting)\n )\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const childModelLinks = super.getInitialChildModelLinks();\n\n const scenarioStepLinks = this.relationsCollection.all\n .filter(\n (relation) =>\n relation.direction === \"outgoing\" &&\n BusinessScenarioModel.isOfConceptType(\n relation.concept.concepttypeHref?.path,\n \"STEP\"\n )\n )\n .map((relation) => relation.concept.asLinkModel());\n\n if (scenarioStepLinks.length > 0) {\n childModelLinks.push(...scenarioStepLinks);\n }\n\n return childModelLinks;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n // $FlowExpectedError[incompatible-type]\n const conceptTypeModel: ?ConceptTypeDetailModel = models.find(\n (model) => model instanceof ConceptTypeDetailModel\n );\n\n if (conceptTypeModel) {\n this.conceptType = conceptTypeModel;\n }\n\n this.relationsCollection.setChildModels(models);\n\n const scenarioSteps = [];\n for (let i = 0; i < models.length; i++) {\n const model = models[i];\n\n if (\n model instanceof ConceptDetailModel &&\n BusinessScenarioModel.isOfConceptType(\n model.conceptType?.selfhref.path,\n \"STEP\"\n )\n ) {\n scenarioSteps.push(model);\n }\n }\n\n this.scenarioSteps = scenarioSteps;\n }\n\n /**\n */\n set scenarioSteps(models: Array<ConceptDetailModel>) {\n this._scenarioSteps = models;\n }\n\n /**\n */\n get scenarioSteps(): Array<ConceptDetailModel> {\n return this._scenarioSteps;\n }\n\n /**\n */\n get actors(): Array<ConceptLinkModel> {\n const actors = [];\n\n this.scenarioSteps.forEach((scenarioStep) => {\n const relationsToActor = scenarioStep.relationsCollection.find(\n (relation) =>\n relation.direction === \"outgoing\" &&\n BusinessScenarioModel.isOfConceptType(\n relation.concept.concepttypeHref?.path,\n \"PERSONA\"\n )\n );\n\n const newRelationToActor =\n relationsToActor &&\n !actors.some((actor) => actor.key === relationsToActor.concept.key);\n\n if (relationsToActor && newRelationToActor) {\n actors.push(relationsToActor.concept);\n }\n });\n\n return actors;\n }\n}\n\nexport default BusinessScenarioModel;\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAOA;AACA;AACA,MAAMG,qBAAqB,SAASC,2BAAkB,CAAC;EAAAC,YAAA;IAAA,SAAAC,SAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA;EAAA;EAGrD;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,kBAAkB;EAC3B;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,kBAAkB;EAC3B;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACC,IAAuB,EAAW;IACzD,OAAOT,qBAAqB,CAACU,eAAe,CAC1CD,IAAI,EAAEA,IAAI,EAAEE,MAAM,EAAEC,WAAW,EAAEC,IAAI,EACrC,UAAU,CACX;EACH;;EAEA;AACF;EACE,OAAOH,eAAeA,CACpBI,eAAwB,EACxBC,WAA4C,EACnC;IACT,IAAI,CAACD,eAAe,EAAE;MACpB,OAAO,KAAK;IACd;IAEA,MAAME,SAAS,GAAG,wCAAwC;IAE1D,MAAMC,mBAAmB,GAAG;MAC1BC,IAAI,EAAE,IAAAC,oBAAU,EAAC,qCAAqC,EAAE,CACrD,GAAEH,SAAU,eAAc,CAC5B,CAAC;MACFI,OAAO,EAAE,IAAAD,oBAAU,EAAC,wCAAwC,EAAE,CAC3D,GAAEH,SAAU,UAAS,CACvB,CAAC;MACFK,QAAQ,EAAE,IAAAF,oBAAU,EAAC,gCAAgC,EAAE,CACpD,GAAEH,SAAU,mBAAkB,CAChC;IACH,CAAC;IAED,OACEM,KAAK,CAACC,OAAO,CAACN,mBAAmB,CAACF,WAAW,CAAC,CAAC,IAC/CE,mBAAmB,CAACF,WAA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vC;IACF,CAAC,CAAC;IAEF,OAAOiB,MAAM;EACf;AACF;AAAC,IAAAQ,QAAA,GAEchE,qBAAqB;AAAAiE,OAAA,CAAA5D,OAAA,GAAA2D,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConceptDetailModel.js","names":["ConceptDetailModel","ResourceModel","constructor","modularuiResponse","_relations","ConceptRelationCollection","data","relations","entryDate","type","modelName","isApplicableModel","contributions","resourcetype","getInitialChildModelLinks","conceptTypeLink","links","getLinkByKey","relationsCollectionLinks","relationsCollection","isCacheable","setChildModels","models","conceptTypeModel","model","ConceptTypeDetailModel","conceptType","key","getData","selfhref","href","selflink","setParameter","TIMEVERSION_FILTER_NAME","removeParameter","_conceptType","label","conceptLabel","taxonomyType","formula","labels","labelTypes","labelType","setting","_id","getLabelElementByIds","ids","conceptProperties","propertyTypes","propertyType","properties","property","getConceptPropertiesByIds","textfragments","textFragments","textFragment","textFragmentConfig","textFragmentTypes","textFragmentType","notConfiguredTextFragments","some","textfragment","getTextFragmentByKeys","keys","getSourceReferenceCollection","availableLocales","_sourceReferences","SourceReferenceCollection","getSourceReferencesForCurrentLanguage","LANGUAGE_POSTFIX_LENGTH","sourceReferences","availableLanguagesInSourceReferences","sourceReference","substring","length","currentLanguagePostfix","locale","availableLanguages","split","value"],"sources":["../../../src/models/concepts/ConceptDetailModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport ConceptRelationCollection from \"./ConceptRelationCollection\";\nimport SourceReferenceCollection from \"./SourceReferenceCollection\";\nimport ConceptTypeDetailModel from \"./ConceptTypeDetailModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type {\n ModularUIModel,\n labelsJSON,\n textfragmentJSON,\n propertyJSON,\n} from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type Href from \"../href/Href\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * Model for concept details, available through modelcatalog\n */\nexport default class ConceptDetailModel extends ResourceModel {\n _relations: ConceptRelationCollection;\n _conceptType: ?ConceptTypeDetailModel;\n _sourceReferences: SourceReferenceCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._relations = new ConceptRelationCollection(\n this.data.relations,\n this.entryDate\n );\n }\n\n /**\n */\n get type(): string {\n return \"ConceptDetail\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ConceptDetailModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ConceptDetail\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const conceptTypeLink = this.links.getLinkByKey(\"concepttype\");\n const relationsCollectionLinks =\n this.relationsCollection.getInitialChildModelLinks();\n\n if (conceptTypeLink) {\n conceptTypeLink.isCacheable = true;\n return [conceptTypeLink, ...relationsCollectionLinks];\n }\n\n return relationsCollectionLinks;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n // $FlowExpectedError[incompatible-type]\n const conceptTypeModel: ?ConceptTypeDetailModel = models.find(\n (model) => model instanceof ConceptTypeDetailModel\n );\n\n if (conceptTypeModel) {\n this.conceptType = conceptTypeModel;\n }\n\n this.relationsCollection.setChildModels(models);\n }\n\n /**\n * Retrieve concept detail identifier as key for this model\n */\n get key(): string {\n return this.getData(\"_id\", \"concept\");\n }\n\n /**\n * Getting the self link of this Concept\n */\n get selfhref(): Href {\n const { href } = this.selflink;\n\n if (this.entryDate) {\n href.setParameter(TIMEVERSION_FILTER_NAME, this.entryDate);\n } else {\n href.removeParameter(TIMEVERSION_FILTER_NAME);\n }\n\n return href;\n }\n\n /**\n * Get conceptType of concept\n */\n get conceptType(): ?ConceptTypeDetailModel {\n return this._conceptType;\n }\n\n /**\n */\n set conceptType(conceptType: ?ConceptTypeDetailModel) {\n this._conceptType = conceptType;\n }\n\n /**\n * Get concept label\n */\n get label(): string {\n return this.data.conceptLabel;\n }\n\n /**\n * Get taxonomy type\n */\n get taxonomyType(): string {\n return this.getData(\"taxonomyType\", \"default\");\n }\n\n /**\n * Get concept relations collection\n */\n get relationsCollection(): ConceptRelationCollection {\n return this._relations;\n }\n\n /**\n * Get concept formula\n */\n get formula(): string {\n return this.data.formula;\n }\n\n /**\n * Get additional labels of concept\n */\n get labels(): Array<labelsJSON> {\n return this.conceptType && this.conceptType.labelTypes\n ? this.conceptType.labelTypes.map((labelType) => {\n const setting = this.data.labels\n ? this.data.labels.find((label) => label.type === labelType._id)\n : {};\n\n return {\n ...labelType,\n ...setting,\n };\n })\n : [];\n }\n\n /**\n * Get label elements by id\n */\n getLabelElementByIds(ids: Array<string>): Array<labelsJSON> {\n return this.labels.filter((label: labelsJSON) => ids.includes(label._id));\n }\n\n /**\n * Get concept properties\n */\n get conceptProperties(): Array<propertyJSON> {\n return this.conceptType && this.conceptType.propertyTypes\n ? this.conceptType.propertyTypes.map((propertyType) => {\n const setting = this.data.properties\n ? this.data.properties.find(\n (property) => property.type === propertyType._id\n )\n : {};\n\n return {\n ...propertyType,\n ...setting,\n };\n })\n : [];\n }\n\n /**\n * Get concept properties by id\n */\n getConceptPropertiesByIds(ids: Array<string>): Array<propertyJSON> {\n return this.conceptProperties.filter((property) =>\n ids.includes(property._id)\n );\n }\n\n /**\n * Get Text fragments\n */\n get textfragments(): Array<textfragmentJSON> {\n const textFragments = this.data.textFragments\n ? this.data.textFragments.map((textFragment) => {\n const textFragmentConfig =\n this.conceptType &&\n this.conceptType.textFragmentTypes.find(\n (textFragmentType) => textFragment.type === textFragmentType._id\n );\n\n return {\n ...textFragmentConfig,\n ...textFragment,\n };\n })\n : [];\n\n const notConfiguredTextFragments =\n this.conceptType && this.conceptType.textFragmentTypes\n ? this.conceptType.textFragmentTypes.filter((textFragmentType) => {\n if (!this.data.textFragments) {\n return true;\n }\n\n return !this.data.textFragments.some(\n (textfragment) => textfragment.type === textFragmentType._id\n );\n })\n : [];\n\n return [...textFragments, ...notConfiguredTextFragments];\n }\n\n /**\n * Get text fragments by id\n */\n getTextFragmentByKeys(keys: Array<string>): Array<textfragmentJSON> {\n return this.textfragments.filter((textfragment) =>\n keys.includes(textfragment.type)\n );\n }\n\n /**\n * Get source reference collection\n */\n getSourceReferenceCollection(\n availableLocales: Array<string> = []\n ): SourceReferenceCollection {\n if (!this._sourceReferences) {\n this._sourceReferences = new SourceReferenceCollection(\n this.getSourceReferencesForCurrentLanguage(availableLocales),\n this.entryDate\n );\n }\n\n return this._sourceReferences;\n }\n\n /*\n * Retrieve all sourceReferenceTypes that are valid for the current language\n * Used by sourceRef collection\n */\n /**\n */\n getSourceReferencesForCurrentLanguage(\n availableLocales: Array<string>\n ): Array<Object> {\n const LANGUAGE_POSTFIX_LENGTH = 3;\n if (this.data.sourceReferences) {\n const availableLanguagesInSourceReferences =\n this.data.sourceReferences.map((sourceReference) =>\n sourceReference.type.substring(\n sourceReference.type.length - LANGUAGE_POSTFIX_LENGTH\n )\n );\n\n const currentLanguagePostfix = `_${this.locale}`;\n\n if (\n availableLanguagesInSourceReferences.includes(currentLanguagePostfix)\n ) {\n // return all sourceReferences that end with language that is selected\n return this.data.sourceReferences.filter((sourceReference) =>\n sourceReference.type.endsWith(currentLanguagePostfix)\n );\n }\n\n const availableLanguages = availableLocales.map(\n (locale) => `_${locale.split(\"-\")[0]}`\n );\n\n // return all sourceReferences that do not end with language postfix\n return this.data.sourceReferences.filter(\n (sourceReference) =>\n !availableLanguages.includes(\n sourceReference.type.substring(\n sourceReference.type.length - LANGUAGE_POSTFIX_LENGTH\n )\n )\n );\n }\n return [];\n }\n\n /**\n * Retrieve entrydate of content toc\n */\n get entryDate(): string | null {\n return this.data.filter?.[TIMEVERSION_FILTER_NAME]?.value ?? null;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AACA;AACA;AACA;AACA;AAEA;AAYA;AACA;AACA;AACe,MAAMA,kBAAkB,SAASC,sBAAa,CAAC;EAK5D;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AACjE,IAAI,CAACgE,gBAAgB,mBAAME,eAAe,IAC7CA,eAAe,CAAC/D,IAAI,CAACgE,SAAS,CAC5BD,eAAe,CAAC/D,IAAI,CAACiE,MAAM,GAAGL,uBAAuB,CACtD,CACF;MAEH,MAAMM,sBAAsB,GAAI,IAAG,IAAI,CAACC,MAAO,EAAC;MAEhD,IACE,uBAAAL,oCAAoC,OAApCA,oCAAoC,EAAUI,sBAAsB,CAAC,EACrE;QAAA;QACA;QACA,OAAO,sCAAI,CAACrE,IAAI,CAACgE,gBAAgB,mBAASE,eAAe;UAAA;UAAA,OACvD,oCAAAA,eAAe,CAAC/D,IAAI,mBAAUkE,sBAAsB,CAAC;QAAA,EACtD;MACH;MAEA,MAAME,kBAAkB,GAAG,kBAAAZ,gBAAgB,OAAhBA,gBAAgB,EACxCW,MAAM,IAAM,IAAGA,MAAM,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,EAAC,CACvC;;MAED;MACA,OAAO,sCAAI,CAACxE,IAAI,CAACgE,gBAAgB,mBAC9BE,eAAe,IACd,CAAC,uBAAAK,kBAAkB,OAAlBA,kBAAkB,EACjBL,eAAe,CAAC/D,IAAI,CAACgE,SAAS,CAC5BD,eAAe,CAAC/D,IAAI,CAACiE,MAAM,GAAGL,uBAAuB,CACtD,CACF,CACJ;IACH;IACA,OAAO,EAAE;EACX;;EAEA;AACF;AACA;EACE,IAAI7D,SAAS,GAAkB;IAC7B,OAAO,yBAAI,CAACF,IAAI,IAAU2B,kCAAuB,CAAC,EAAE8C,KAAK,IAAI,IAAI;EACnE;AACF;AAAC"}
|
|
1
|
+
{"version":3,"file":"ConceptDetailModel.js","names":["_ResourceModel","_interopRequireDefault","require","_ConceptRelationCollection","_SourceReferenceCollection","_ConceptTypeDetailModel","_Constants","ConceptDetailModel","ResourceModel","constructor","modularuiResponse","_defineProperty2","default","_relations","ConceptRelationCollection","data","relations","entryDate","type","modelName","isApplicableModel","contributions","resourcetype","getInitialChildModelLinks","conceptTypeLink","links","getLinkByKey","relationsCollectionLinks","relationsCollection","isCacheable","setChildModels","models","conceptTypeModel","_find","call","model","ConceptTypeDetailModel","conceptType","key","getData","selfhref","href","selflink","setParameter","TIMEVERSION_FILTER_NAME","removeParameter","_conceptType","label","conceptLabel","taxonomyType","formula","labels","_context","labelTypes","_map","labelType","_context2","setting","_id","getLabelElementByIds","ids","_context3","_filter","_includes","conceptProperties","_context4","propertyTypes","propertyType","_context5","properties","property","getConceptPropertiesByIds","_context6","textfragments","_context7","_context9","textFragments","textFragment","_context8","textFragmentConfig","textFragmentTypes","textFragmentType","notConfiguredTextFragments","some","textfragment","getTextFragmentByKeys","keys","_context10","getSourceReferenceCollection","availableLocales","arguments","length","undefined","_sourceReferences","SourceReferenceCollection","getSourceReferencesForCurrentLanguage","LANGUAGE_POSTFIX_LENGTH","sourceReferences","_context11","_context14","availableLanguagesInSourceReferences","sourceReference","substring","currentLanguagePostfix","locale","_context12","_context13","_endsWith","availableLanguages","split","value","exports"],"sources":["../../../src/models/concepts/ConceptDetailModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport ConceptRelationCollection from \"./ConceptRelationCollection\";\nimport SourceReferenceCollection from \"./SourceReferenceCollection\";\nimport ConceptTypeDetailModel from \"./ConceptTypeDetailModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type {\n ModularUIModel,\n labelsJSON,\n textfragmentJSON,\n propertyJSON,\n} from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type Href from \"../href/Href\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * Model for concept details, available through modelcatalog\n */\nexport default class ConceptDetailModel extends ResourceModel {\n _relations: ConceptRelationCollection;\n _conceptType: ?ConceptTypeDetailModel;\n _sourceReferences: SourceReferenceCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._relations = new ConceptRelationCollection(\n this.data.relations,\n this.entryDate\n );\n }\n\n /**\n */\n get type(): string {\n return \"ConceptDetail\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ConceptDetailModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ConceptDetail\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const conceptTypeLink = this.links.getLinkByKey(\"concepttype\");\n const relationsCollectionLinks =\n this.relationsCollection.getInitialChildModelLinks();\n\n if (conceptTypeLink) {\n conceptTypeLink.isCacheable = true;\n return [conceptTypeLink, ...relationsCollectionLinks];\n }\n\n return relationsCollectionLinks;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n // $FlowExpectedError[incompatible-type]\n const conceptTypeModel: ?ConceptTypeDetailModel = models.find(\n (model) => model instanceof ConceptTypeDetailModel\n );\n\n if (conceptTypeModel) {\n this.conceptType = conceptTypeModel;\n }\n\n this.relationsCollection.setChildModels(models);\n }\n\n /**\n * Retrieve concept detail identifier as key for this model\n */\n get key(): string {\n return this.getData(\"_id\", \"concept\");\n }\n\n /**\n * Getting the self link of this Concept\n */\n get selfhref(): Href {\n const { href } = this.selflink;\n\n if (this.entryDate) {\n href.setParameter(TIMEVERSION_FILTER_NAME, this.entryDate);\n } else {\n href.removeParameter(TIMEVERSION_FILTER_NAME);\n }\n\n return href;\n }\n\n /**\n * Get conceptType of concept\n */\n get conceptType(): ?ConceptTypeDetailModel {\n return this._conceptType;\n }\n\n /**\n */\n set conceptType(conceptType: ?ConceptTypeDetailModel) {\n this._conceptType = conceptType;\n }\n\n /**\n * Get concept label\n */\n get label(): string {\n return this.data.conceptLabel;\n }\n\n /**\n * Get taxonomy type\n */\n get taxonomyType(): string {\n return this.getData(\"taxonomyType\", \"default\");\n }\n\n /**\n * Get concept relations collection\n */\n get relationsCollection(): ConceptRelationCollection {\n return this._relations;\n }\n\n /**\n * Get concept formula\n */\n get formula(): string {\n return this.data.formula;\n }\n\n /**\n * Get additional labels of concept\n */\n get labels(): Array<labelsJSON> {\n return this.conceptType && this.conceptType.labelTypes\n ? this.conceptType.labelTypes.map((labelType) => {\n const setting = this.data.labels\n ? this.data.labels.find((label) => label.type === labelType._id)\n : {};\n\n return {\n ...labelType,\n ...setting,\n };\n })\n : [];\n }\n\n /**\n * Get label elements by id\n */\n getLabelElementByIds(ids: Array<string>): Array<labelsJSON> {\n return this.labels.filter((label: labelsJSON) => ids.includes(label._id));\n }\n\n /**\n * Get concept properties\n */\n get conceptProperties(): Array<propertyJSON> {\n return this.conceptType && this.conceptType.propertyTypes\n ? this.conceptType.propertyTypes.map((propertyType) => {\n const setting = this.data.properties\n ? this.data.properties.find(\n (property) => property.type === propertyType._id\n )\n : {};\n\n return {\n ...propertyType,\n ...setting,\n };\n })\n : [];\n }\n\n /**\n * Get concept properties by id\n */\n getConceptPropertiesByIds(ids: Array<string>): Array<propertyJSON> {\n return this.conceptProperties.filter((property) =>\n ids.includes(property._id)\n );\n }\n\n /**\n * Get Text fragments\n */\n get textfragments(): Array<textfragmentJSON> {\n const textFragments = this.data.textFragments\n ? this.data.textFragments.map((textFragment) => {\n const textFragmentConfig =\n this.conceptType &&\n this.conceptType.textFragmentTypes.find(\n (textFragmentType) => textFragment.type === textFragmentType._id\n );\n\n return {\n ...textFragmentConfig,\n ...textFragment,\n };\n })\n : [];\n\n const notConfiguredTextFragments =\n this.conceptType && this.conceptType.textFragmentTypes\n ? this.conceptType.textFragmentTypes.filter((textFragmentType) => {\n if (!this.data.textFragments) {\n return true;\n }\n\n return !this.data.textFragments.some(\n (textfragment) => textfragment.type === textFragmentType._id\n );\n })\n : [];\n\n return [...textFragments, ...notConfiguredTextFragments];\n }\n\n /**\n * Get text fragments by id\n */\n getTextFragmentByKeys(keys: Array<string>): Array<textfragmentJSON> {\n return this.textfragments.filter((textfragment) =>\n keys.includes(textfragment.type)\n );\n }\n\n /**\n * Get source reference collection\n */\n getSourceReferenceCollection(\n availableLocales: Array<string> = []\n ): SourceReferenceCollection {\n if (!this._sourceReferences) {\n this._sourceReferences = new SourceReferenceCollection(\n this.getSourceReferencesForCurrentLanguage(availableLocales),\n this.entryDate\n );\n }\n\n return this._sourceReferences;\n }\n\n /*\n * Retrieve all sourceReferenceTypes that are valid for the current language\n * Used by sourceRef collection\n */\n /**\n */\n getSourceReferencesForCurrentLanguage(\n availableLocales: Array<string>\n ): Array<Object> {\n const LANGUAGE_POSTFIX_LENGTH = 3;\n if (this.data.sourceReferences) {\n const availableLanguagesInSourceReferences =\n this.data.sourceReferences.map((sourceReference) =>\n sourceReference.type.substring(\n sourceReference.type.length - LANGUAGE_POSTFIX_LENGTH\n )\n );\n\n const currentLanguagePostfix = `_${this.locale}`;\n\n if (\n availableLanguagesInSourceReferences.includes(currentLanguagePostfix)\n ) {\n // return all sourceReferences that end with language that is selected\n return this.data.sourceReferences.filter((sourceReference) =>\n sourceReference.type.endsWith(currentLanguagePostfix)\n );\n }\n\n const availableLanguages = availableLocales.map(\n (locale) => `_${locale.split(\"-\")[0]}`\n );\n\n // return all sourceReferences that do not end with language postfix\n return this.data.sourceReferences.filter(\n (sourceReference) =>\n !availableLanguages.includes(\n sourceReference.type.substring(\n sourceReference.type.length - LANGUAGE_POSTFIX_LENGTH\n )\n )\n );\n }\n return [];\n }\n\n /**\n * Retrieve entrydate of content toc\n */\n get entryDate(): string | null {\n return this.data.filter?.[TIMEVERSION_FILTER_NAME]?.value ?? null;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,0BAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,uBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,UAAA,GAAAJ,OAAA;AAYA;AACA;AACA;AACe,MAAMK,kBAAkB,SAASC,sBAAa,CAAC;EAK5D;AAC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F,SAAS,CAC5BD,eAAe,CAACnF,IAAI,CAACyE,MAAM,GAAGK,uBAAuB,CACtD,CACF,CACJ;IACH;IACA,OAAO,EAAE;EACX;;EAEA;AACF;AACA;EACE,IAAI/E,SAASA,CAAA,EAAkB;IAC7B,OAAO,IAAA6C,OAAA,CAAAlD,OAAA,MAAI,CAACG,IAAI,IAAU6B,kCAAuB,CAAC,EAAEkE,KAAK,IAAI,IAAI;EACnE;AACF;AAACC,OAAA,CAAAnG,OAAA,GAAAL,kBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConceptIndexModel.js","names":["ConceptIndexModel","ResourceModel","constructor","modularuiResponse","_filterCollection","FilterCollection","data","filter","contributions","dynamicschema","_concepts","ResourceCollection","collection","_embedded","results","concept","ConceptLinkModel","entryDate","type","resourcetype","modelName","isApplicableModel","resourceType","getInitialChildModelLinks","items","setChildModels","models","selfhref","href","selflink","filterCollection","hasItems","forEach","params","param","value","setParameter","name","removeParameter","label","getContribution","indexfilter","getFilterByAttributeKey","timeversionFilter","TIMEVERSION_FILTER_NAME","attribute","searchtermfilter","itemCollection"],"sources":["../../../src/models/concepts/ConceptIndexModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport ResourceCollection from \"../base/ResourceCollection\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ConceptLinkModel from \"./ConceptLinkModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type { FilterType, ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\n\n/**\n * Get Index of concepts, to filter model catalog\n */\nexport default class ConceptIndexModel extends ResourceModel {\n _filterCollection: FilterCollection;\n _concepts: ResourceCollection<ConceptLinkModel>;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._filterCollection = new FilterCollection(this.data.filter, {\n filter: this.contributions.filter,\n dynamicschema: this.data.dynamicschema,\n });\n\n this._concepts = new ResourceCollection();\n this._concepts.collection = this.data._embedded\n ? this.data._embedded.results.map(\n (concept) => new ConceptLinkModel(concept.concept, this.entryDate)\n )\n : [];\n }\n\n /**\n */\n get type(): string {\n if (this.resourcetype === \"RelatedConcepts\") {\n return \"RelatedConcepts\";\n }\n\n return \"ConceptIndex\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ConceptIndexModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n const resourceType = data.contributions?.resourcetype;\n return (\n resourceType === \"ConceptSearch\" || resourceType === \"relatedConcepts\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.items.getInitialChildModelLinks();\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.items.setChildModels(models);\n }\n\n /**\n * Getting the self link of this list\n */\n get selfhref(): Href {\n const { href } = this.selflink;\n\n if (this.filterCollection.hasItems) {\n this.filterCollection.forEach((filter) => {\n filter.params.forEach((param) => {\n if (param.value) {\n href.setParameter(param.name, param.value);\n } else {\n href.removeParameter(param.name);\n }\n });\n });\n }\n\n return href;\n }\n\n /**\n */\n get label(): string {\n return this.getContribution(\"label\");\n }\n\n /**\n * Retrieve filters of conceptindex model\n */\n get filterCollection(): FilterCollection {\n return this._filterCollection;\n }\n\n /**\n * Get index filter\n */\n get indexfilter(): FilterType | null {\n return this.filterCollection.getFilterByAttributeKey(\"index\");\n }\n\n /**\n * Retrieve entrydate of content toc\n */\n get entryDate(): string | null {\n const timeversionFilter = this.filterCollection.getFilterByAttributeKey(\n TIMEVERSION_FILTER_NAME\n );\n if (timeversionFilter && timeversionFilter.attribute) {\n return timeversionFilter.attribute.value;\n }\n\n return null;\n }\n\n /**\n * get searchterm filter\n */\n get searchtermfilter(): FilterType | null {\n return this.filterCollection.getFilterByAttributeKey(\"label\");\n }\n\n /**\n * Get concept links found by index filter\n */\n get items(): ResourceCollection<ConceptLinkModel> {\n return this._concepts;\n }\n\n /**\n * Replace the items collection\n */\n set items(itemCollection: ResourceCollection<ConceptLinkModel>) {\n this._concepts = itemCollection;\n }\n}\n"],"mappings":";;;;;;;;;;AACA;AACA;AACA;AACA;AAEA;AAOA;AACA;AACA;AACe,
|
|
1
|
+
{"version":3,"file":"ConceptIndexModel.js","names":["_ResourceModel","_interopRequireDefault","require","_ResourceCollection","_FilterCollection","_ConceptLinkModel","_Constants","ConceptIndexModel","ResourceModel","constructor","modularuiResponse","_context","_defineProperty2","default","_filterCollection","FilterCollection","_filter","data","filter","contributions","dynamicschema","_concepts","ResourceCollection","collection","_embedded","_map","results","call","concept","ConceptLinkModel","entryDate","type","resourcetype","modelName","isApplicableModel","resourceType","getInitialChildModelLinks","items","setChildModels","models","selfhref","href","selflink","filterCollection","hasItems","forEach","params","param","value","setParameter","name","removeParameter","label","getContribution","indexfilter","getFilterByAttributeKey","timeversionFilter","TIMEVERSION_FILTER_NAME","attribute","searchtermfilter","itemCollection","exports"],"sources":["../../../src/models/concepts/ConceptIndexModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport ResourceCollection from \"../base/ResourceCollection\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ConceptLinkModel from \"./ConceptLinkModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type { FilterType, ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\n\n/**\n * Get Index of concepts, to filter model catalog\n */\nexport default class ConceptIndexModel extends ResourceModel {\n _filterCollection: FilterCollection;\n _concepts: ResourceCollection<ConceptLinkModel>;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._filterCollection = new FilterCollection(this.data.filter, {\n filter: this.contributions.filter,\n dynamicschema: this.data.dynamicschema,\n });\n\n this._concepts = new ResourceCollection();\n this._concepts.collection = this.data._embedded\n ? this.data._embedded.results.map(\n (concept) => new ConceptLinkModel(concept.concept, this.entryDate)\n )\n : [];\n }\n\n /**\n */\n get type(): string {\n if (this.resourcetype === \"RelatedConcepts\") {\n return \"RelatedConcepts\";\n }\n\n return \"ConceptIndex\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ConceptIndexModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n const resourceType = data.contributions?.resourcetype;\n return (\n resourceType === \"ConceptSearch\" || resourceType === \"relatedConcepts\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.items.getInitialChildModelLinks();\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.items.setChildModels(models);\n }\n\n /**\n * Getting the self link of this list\n */\n get selfhref(): Href {\n const { href } = this.selflink;\n\n if (this.filterCollection.hasItems) {\n this.filterCollection.forEach((filter) => {\n filter.params.forEach((param) => {\n if (param.value) {\n href.setParameter(param.name, param.value);\n } else {\n href.removeParameter(param.name);\n }\n });\n });\n }\n\n return href;\n }\n\n /**\n */\n get label(): string {\n return this.getContribution(\"label\");\n }\n\n /**\n * Retrieve filters of conceptindex model\n */\n get filterCollection(): FilterCollection {\n return this._filterCollection;\n }\n\n /**\n * Get index filter\n */\n get indexfilter(): FilterType | null {\n return this.filterCollection.getFilterByAttributeKey(\"index\");\n }\n\n /**\n * Retrieve entrydate of content toc\n */\n get entryDate(): string | null {\n const timeversionFilter = this.filterCollection.getFilterByAttributeKey(\n TIMEVERSION_FILTER_NAME\n );\n if (timeversionFilter && timeversionFilter.attribute) {\n return timeversionFilter.attribute.value;\n }\n\n return null;\n }\n\n /**\n * get searchterm filter\n */\n get searchtermfilter(): FilterType | null {\n return this.filterCollection.getFilterByAttributeKey(\"label\");\n }\n\n /**\n * Get concept links found by index filter\n */\n get items(): ResourceCollection<ConceptLinkModel> {\n return this._concepts;\n }\n\n /**\n * Replace the items collection\n */\n set items(itemCollection: ResourceCollection<ConceptLinkModel>) {\n this._concepts = itemCollection;\n }\n}\n"],"mappings":";;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,UAAA,GAAAJ,OAAA;AAOA;AACA;AACA;AACe,MAAMK,iBAAiB,SAASC,sBAAa,CAAC;EAI3D;AACF;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAAA,IAAAC,QAAA;IAChD,KAAK,CAACD,iBAAiB,CAAC;IAAC,IAAAE,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAEzB,IAAI,CAACC,iBAAiB,GAAG,IAAIC,yBAAgB,KAAAC,OAAA,CAAAH,OAAA,EAAC,IAAI,CAACI,IAAI,GAAS;MAC9DC,MAAM,MAAAF,OAAA,CAAAH,OAAA,EAAE,IAAI,CAACM,aAAa,CAAO;MACjCC,aAAa,EAAE,IAAI,CAACH,IAAI,CAACG;IAC3B,CAAC,CAAC;IAEF,IAAI,CAACC,SAAS,GAAG,IAAIC,2BAAkB,EAAE;IACzC,IAAI,CAACD,SAAS,CAACE,UAAU,GAAG,IAAI,CAACN,IAAI,CAACO,SAAS,GAC3C,IAAAC,IAAA,CAAAZ,OAAA,EAAAF,QAAA,OAAI,CAACM,IAAI,CAACO,SAAS,CAACE,OAAO,EAAAC,IAAA,CAAAhB,QAAA,EACxBiB,OAAO,IAAK,IAAIC,yBAAgB,CAACD,OAAO,CAACA,OAAO,EAAE,IAAI,CAACE,SAAS,CAAC,CACnE,GACD,EAAE;EACR;;EAEA;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,IAAI,IAAI,CAACC,YAAY,KAAK,iBAAiB,EAAE;MAC3C,OAAO,iBA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ACF;AACA;EACE,IAAIwC,WAAWA,CAAA,EAAsB;IACnC,OAAO,IAAI,CAACX,gBAAgB,CAACY,uBAAuB,CAAC,OAAO,CAAC;EAC/D;;EAEA;AACF;AACA;EACE,IAAIzB,SAASA,CAAA,EAAkB;IAC7B,MAAM0B,iBAAiB,GAAG,IAAI,CAACb,gBAAgB,CAACY,uBAAuB,CACrEE,kCAAuB,CACxB;IACD,IAAID,iBAAiB,IAAIA,iBAAiB,CAACE,SAAS,EAAE;MACpD,OAAOF,iBAAiB,CAACE,SAAS,CAACV,KAAK;IAC1C;IAEA,OAAO,IAAI;EACb;;EAEA;AACF;AACA;EACE,IAAIW,gBAAgBA,CAAA,EAAsB;IACxC,OAAO,IAAI,CAAChB,gBAAgB,CAACY,uBAAuB,CAAC,OAAO,CAAC;EAC/D;;EAEA;AACF;AACA;EACE,IAAIlB,KAAKA,CAAA,EAAyC;IAChD,OAAO,IAAI,CAAChB,SAAS;EACvB;;EAEA;AACF;AACA;EACE,IAAIgB,KAAKA,CAACuB,cAAoD,EAAE;IAC9D,IAAI,CAACvC,SAAS,GAAGuC,cAAc;EACjC;AACF;AAACC,OAAA,CAAAhD,OAAA,GAAAN,iBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConceptLinkModel.js","names":["ConceptLinkModel","BaseModel","constructor","data","entryDate","_entryDate","getInitialChildModelLinks","conceptTypeLink","isCacheable","setChildModels","models","href","conceptTypeModel","model","selfhref","equalsWithParameters","type","conceptType","_conceptType","ConceptTypeDetailModel","key","_id","label","getData","links","_links","LinkCollection","Array","isArray","selflink","getLinkByKey","Error","addParameter","TIMEVERSION_FILTER_NAME","concepttypeHref","taxonomyType","asLinkModel","link","LinkModel","create"],"sources":["../../../src/models/concepts/ConceptLinkModel.js"],"sourcesContent":["// @flow\nimport BaseModel from \"../base/BaseModel\";\nimport LinkModel from \"../links/LinkModel\";\nimport LinkCollection from \"../links/LinkCollection\";\nimport ConceptTypeDetailModel from \"./ConceptTypeDetailModel\";\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { IModelWithChildModels, ModularUIModel } from \"../types\";\nimport type Href from \"../href/Href\";\n/**\n * Link to a concept\n */\nexport default class ConceptLinkModel\n extends BaseModel\n implements IModelWithChildModels\n{\n _links: ?LinkCollection;\n _entryDate: ?ISO_DATE;\n _conceptType: ?ConceptTypeDetailModel;\n\n /**\n * Construct ConceptLinkModel\n */\n constructor(data: Object, entryDate: ?ISO_DATE = null) {\n super(data, {});\n\n this._entryDate = entryDate;\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n if (this.conceptTypeLink) {\n this.conceptTypeLink.isCacheable = true;\n return [this.conceptTypeLink];\n }\n\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n if (this.conceptTypeLink) {\n const href = this.conceptTypeLink.href;\n const conceptTypeModel = models.find((model) =>\n model.selfhref.equalsWithParameters(href)\n );\n\n if (conceptTypeModel?.type === \"ConceptTypeDetail\") {\n this.conceptType = conceptTypeModel;\n }\n }\n }\n\n /**\n * Retrieve concept type\n */\n get conceptType(): ?ConceptTypeDetailModel {\n return this._conceptType;\n }\n\n /**\n * Set concept type\n */\n set conceptType(conceptType: ?ModularUIModel) {\n this._conceptType =\n conceptType instanceof ConceptTypeDetailModel ? conceptType : null;\n }\n\n /**\n * Retrieve key\n */\n get key(): string {\n return this.data._id;\n }\n\n /**\n * Retrieve label\n */\n get label(): string {\n const label = this.getData(\"label\");\n\n if (label) {\n return label;\n }\n\n return this.getData(\"conceptLabel\", \"\");\n }\n\n /**\n * Getting the links of the resource\n */\n get links(): LinkCollection {\n if (!this._links) {\n this._links = new LinkCollection(\n Array.isArray(this.data._links) ? this.data._links[0] : this.data._links\n );\n }\n\n return this._links;\n }\n\n /**\n * Get self link of model\n */\n get selflink(): LinkModel {\n const selflink = this.links.getLinkByKey(\"self\");\n\n if (selflink === null) {\n throw new Error(\n `Could not find self link for ${\n this.key === null ? \"unknown\" : this.key\n }`\n );\n }\n\n return selflink;\n }\n\n /**\n * Self href of concept\n */\n get selfhref(): Href {\n if (this._entryDate !== null) {\n return this.selflink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this._entryDate\n );\n }\n\n return this.selflink.href;\n }\n\n /**\n */\n get conceptTypeLink(): LinkModel | null {\n return this.links.getLinkByKey(\"concepttype\");\n }\n\n /**\n * Concept type href of concept\n */\n get concepttypeHref(): Href | null {\n return this.conceptTypeLink?.href ?? null;\n }\n\n /**\n */\n get taxonomyType(): string {\n return \"default\";\n }\n\n /**\n */\n asLinkModel(): LinkModel {\n const link = LinkModel.create(this.key, this.selfhref.href, this.label);\n link.href = this.selfhref;\n\n return link;\n }\n}\n"],"mappings":";;;;;;;;;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACe,
|
|
1
|
+
{"version":3,"file":"ConceptLinkModel.js","names":["_BaseModel","_interopRequireDefault","require","_LinkModel","_LinkCollection","_ConceptTypeDetailModel","_Constants","ConceptLinkModel","BaseModel","constructor","data","entryDate","arguments","length","undefined","_defineProperty2","default","_entryDate","getInitialChildModelLinks","conceptTypeLink","isCacheable","setChildModels","models","href","conceptTypeModel","_find","call","model","selfhref","equalsWithParameters","type","conceptType","_conceptType","ConceptTypeDetailModel","key","_id","label","getData","links","_links","LinkCollection","Array","isArray","selflink","getLinkByKey","Error","addParameter","TIMEVERSION_FILTER_NAME","concepttypeHref","taxonomyType","asLinkModel","link","LinkModel","create","exports"],"sources":["../../../src/models/concepts/ConceptLinkModel.js"],"sourcesContent":["// @flow\nimport BaseModel from \"../base/BaseModel\";\nimport LinkModel from \"../links/LinkModel\";\nimport LinkCollection from \"../links/LinkCollection\";\nimport ConceptTypeDetailModel from \"./ConceptTypeDetailModel\";\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { IModelWithChildModels, ModularUIModel } from \"../types\";\nimport type Href from \"../href/Href\";\n/**\n * Link to a concept\n */\nexport default class ConceptLinkModel\n extends BaseModel\n implements IModelWithChildModels\n{\n _links: ?LinkCollection;\n _entryDate: ?ISO_DATE;\n _conceptType: ?ConceptTypeDetailModel;\n\n /**\n * Construct ConceptLinkModel\n */\n constructor(data: Object, entryDate: ?ISO_DATE = null) {\n super(data, {});\n\n this._entryDate = entryDate;\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n if (this.conceptTypeLink) {\n this.conceptTypeLink.isCacheable = true;\n return [this.conceptTypeLink];\n }\n\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n if (this.conceptTypeLink) {\n const href = this.conceptTypeLink.href;\n const conceptTypeModel = models.find((model) =>\n model.selfhref.equalsWithParameters(href)\n );\n\n if (conceptTypeModel?.type === \"ConceptTypeDetail\") {\n this.conceptType = conceptTypeModel;\n }\n }\n }\n\n /**\n * Retrieve concept type\n */\n get conceptType(): ?ConceptTypeDetailModel {\n return this._conceptType;\n }\n\n /**\n * Set concept type\n */\n set conceptType(conceptType: ?ModularUIModel) {\n this._conceptType =\n conceptType instanceof ConceptTypeDetailModel ? conceptType : null;\n }\n\n /**\n * Retrieve key\n */\n get key(): string {\n return this.data._id;\n }\n\n /**\n * Retrieve label\n */\n get label(): string {\n const label = this.getData(\"label\");\n\n if (label) {\n return label;\n }\n\n return this.getData(\"conceptLabel\", \"\");\n }\n\n /**\n * Getting the links of the resource\n */\n get links(): LinkCollection {\n if (!this._links) {\n this._links = new LinkCollection(\n Array.isArray(this.data._links) ? this.data._links[0] : this.data._links\n );\n }\n\n return this._links;\n }\n\n /**\n * Get self link of model\n */\n get selflink(): LinkModel {\n const selflink = this.links.getLinkByKey(\"self\");\n\n if (selflink === null) {\n throw new Error(\n `Could not find self link for ${\n this.key === null ? \"unknown\" : this.key\n }`\n );\n }\n\n return selflink;\n }\n\n /**\n * Self href of concept\n */\n get selfhref(): Href {\n if (this._entryDate !== null) {\n return this.selflink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this._entryDate\n );\n }\n\n return this.selflink.href;\n }\n\n /**\n */\n get conceptTypeLink(): LinkModel | null {\n return this.links.getLinkByKey(\"concepttype\");\n }\n\n /**\n * Concept type href of concept\n */\n get concepttypeHref(): Href | null {\n return this.conceptTypeLink?.href ?? null;\n }\n\n /**\n */\n get taxonomyType(): string {\n return \"default\";\n }\n\n /**\n */\n asLinkModel(): LinkModel {\n const link = LinkModel.create(this.key, this.selfhref.href, this.label);\n link.href = this.selfhref;\n\n return link;\n }\n}\n"],"mappings":";;;;;;;;;AACA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,uBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAIA;AACA;AACA;AACe,MAAMK,gBAAgB,SAC3BC,kBAAS,CAEnB;EAKE;AACF;AACA;EACEC,WAAWA,CAACC,IAAY,EAA+B;IAAA,IAA7BC,SAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;IACnD,KAAK,CAACF,IAAI,EAAE,CAAC,CAAC,CAAC;IAAC,IAAAK,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAEhB,IAAI,CAACC,UAAU,GAAGN,SAAS;EAC7B;;EAEA;AACF;EACEO,yBAAyBA,CAAA,EAAqB;IAC5C,IAAI,IAAI,CAACC,eAAe,EAAE;MACxB,IAAI,CAACA,eAAe,CAACC,WAAW,GAAG,IAAI;MACvC,OAAO,CAAC,IAAI,CAACD,eAAe,CAAC;IAC/B;IAEA,OAAO,EAAE;EACX;;EAEA;AACF;EACEE,cAAcA,CAACC,MAA6B,EAAE;IAC5C,IAAI,IAAI,CAACH,eAAe,EAAE;MAC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Collection.js","names":["ConceptRelationCollection","ResourceCollection","constructor","relations","entryDate","_entryDate","collection","Array","isArray","relation","ConceptRelationModel","types","pos","arr","item","key","label","byType","type","
|
|
1
|
+
{"version":3,"file":"ConceptRelationCollection.js","names":["_ResourceCollection","_interopRequireDefault","require","_ConceptRelationModel","ConceptRelationCollection","ResourceCollection","constructor","relations","arguments","length","undefined","entryDate","_defineProperty2","default","_entryDate","collection","Array","isArray","_map","call","relation","ConceptRelationModel","types","_context","_context2","_filter","pos","arr","_findIndex","item","key","label","byType","type","_context3","hasIncoming","incoming","hasOutgoing","outgoing","_context4","direction","_context5","exports"],"sources":["../../../src/models/concepts/ConceptRelationCollection.js"],"sourcesContent":["// @flow\nimport ResourceCollection from \"../base/ResourceCollection\";\nimport ConceptRelationModel from \"./ConceptRelationModel\";\n\n/**\n * concept relation collection\n */\nexport default class ConceptRelationCollection extends ResourceCollection<ConceptRelationModel> {\n _entryDate: ?ISO_DATE;\n\n /**\n */\n constructor(relations: Array<Object> = [], entryDate: ?ISO_DATE = null) {\n super();\n\n this._entryDate = entryDate;\n\n this.collection = Array.isArray(relations)\n ? relations.map((relation) =>\n relation instanceof ConceptRelationModel\n ? relation\n : new ConceptRelationModel(relation, entryDate)\n )\n : [new ConceptRelationModel(relations, entryDate)];\n }\n\n /**\n * Get unique list of relation types\n */\n get types(): Array<{ key: string, label: string }> {\n return this.collection\n .filter(\n (relation, pos, arr) =>\n arr.findIndex((item) => item.key === relation.key) === pos\n )\n .map((relation) => ({\n key: relation.key,\n label: relation.label,\n }));\n }\n\n /**\n * Get relation by its type\n */\n byType(type: string): ConceptRelationCollection {\n return new ConceptRelationCollection(\n this.filter((relation) => relation.key === type),\n this._entryDate\n );\n }\n\n /**\n */\n hasIncoming(): boolean {\n return this.incoming.length > 0;\n }\n\n /**\n */\n hasOutgoing(): boolean {\n return this.outgoing.length > 0;\n }\n\n /**\n */\n get incoming(): ConceptRelationCollection {\n return new ConceptRelationCollection(\n this.filter((relation) => relation.direction === \"incoming\"),\n this._entryDate\n );\n }\n\n /**\n */\n get outgoing(): ConceptRelationCollection {\n return new ConceptRelationCollection(\n this.filter((relation) => relation.direction === \"outgoing\"),\n this._entryDate\n );\n }\n}\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA;AACA;AACA;AACe,MAAME,yBAAyB,SAASC,2BAAkB,CAAuB;EAG9F;AACF;EACEC,WAAWA,CAAA,EAA6D;IAAA,IAA5DC,SAAwB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IAAA,IAAEG,SAAoB,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;IACpE,KAAK,EAAE;IAAC,IAAAI,gBAAA,CAAAC,OAAA;IAER,IAAI,CAACC,UAAU,GAAGH,SAAS;IAE3B,IAAI,CAACI,UAAU,GAAGC,KAAK,CAACC,OAAO,CAACV,SAAS,CAAC,GACtC,IAAAW,IAAA,CAAAL,OAAA,EAAAN,SAAS,EAAAY,IAAA,CAATZ,SAAS,EAAMa,QAAQ,IACrBA,QAAQ,YAAYC,6BAAoB,GACpCD,QAAQ,GACR,IAAIC,6BAAoB,CAACD,QAAQ,EAAET,SAAS,CAAC,CAClD,GACD,CAAC,IAAIU,6BAAoB,CAACd,SAAS,EAAEI,SAAS,CAAC,CAAC;EACtD;;EAEA;AACF;AACA;EACE,IAAIW,KAAKA,CAAA,EAA0C;IAAA,IAAAC,QAAA,EAAAC,SAAA;IACjD,OAAO,IAAAN,IAAA,CAAAL,OAAA,EAAAU,QAAA,OAAAE,OAAA,CAAAZ,OAAA,EAAAW,SAAA,OAAI,CAACT,UAAU,EAAAI,IAAA,CAAAK,SAAA,EAElB,CAACJ,QAAQ,EAAEM,GAAG,EAAEC,GAAG,KACjB,I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,SAAA,EAASrB,QAAQ,IAAKA,QAAQ,CAACoB,SAAS,KAAK,UAAU,CAAC,EAC5D,IAAI,CAAC1B,UAAU,CAChB;EACH;AACF;AAAC4B,OAAA,CAAA7B,OAAA,GAAAT,yBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConceptRelationModel.js","names":["ConceptRelationModel","constructor","relation","entryDate","_relation","concept","_concept","ConceptLinkModel","getInitialChildModelLinks","setChildModels","models","key","relationType","textfragments","textFragments","label","relationLabel","direction","relationDirection"],"sources":["../../../src/models/concepts/ConceptRelationModel.js"],"sourcesContent":["// @flow\nimport ConceptLinkModel from \"./ConceptLinkModel\";\nimport LinkModel from \"../links/LinkModel\";\n\nimport type {\n IModelWithChildModels,\n ModularUIModel,\n textfragmentJSON,\n} from \"../types\";\n\n/**\n * Concept relation model\n */\nexport default class ConceptRelationModel implements IModelWithChildModels {\n _relation: Object;\n _concept: ConceptLinkModel;\n\n /**\n */\n constructor(relation: Object, entryDate: ?ISO_DATE = null) {\n this._relation = relation;\n\n if (relation && relation.concept) {\n this._concept = new ConceptLinkModel(relation.concept, entryDate);\n }\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.concept.getInitialChildModelLinks();\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.concept.setChildModels(models);\n }\n\n /**\n * Get key of relation\n */\n get key(): string {\n return this._relation.relationType;\n }\n\n /**\n * Get Text fragments\n */\n get textfragments(): Array<textfragmentJSON> {\n return this._relation.textFragments;\n }\n\n /**\n * Get Label of relation\n */\n get label(): string {\n return this._relation.relationLabel;\n }\n\n /**\n * Get direction of relation\n */\n get direction(): string {\n return this._relation.relationDirection;\n }\n\n /**\n * Get other concept\n */\n get concept(): ConceptLinkModel {\n return this._concept;\n }\n\n /**\n * Set concept information\n */\n set concept(concept: ConceptLinkModel) {\n this._concept = concept;\n }\n}\n"],"mappings":";;;;;;;;AACA;AACA;AAQA;AACA;AACA;AACe,
|
|
1
|
+
{"version":3,"file":"ConceptRelationModel.js","names":["_ConceptLinkModel","_interopRequireDefault","require","_LinkModel","ConceptRelationModel","constructor","relation","entryDate","arguments","length","undefined","_defineProperty2","default","_relation","concept","_concept","ConceptLinkModel","getInitialChildModelLinks","setChildModels","models","key","relationType","textfragments","textFragments","label","relationLabel","direction","relationDirection","exports"],"sources":["../../../src/models/concepts/ConceptRelationModel.js"],"sourcesContent":["// @flow\nimport ConceptLinkModel from \"./ConceptLinkModel\";\nimport LinkModel from \"../links/LinkModel\";\n\nimport type {\n IModelWithChildModels,\n ModularUIModel,\n textfragmentJSON,\n} from \"../types\";\n\n/**\n * Concept relation model\n */\nexport default class ConceptRelationModel implements IModelWithChildModels {\n _relation: Object;\n _concept: ConceptLinkModel;\n\n /**\n */\n constructor(relation: Object, entryDate: ?ISO_DATE = null) {\n this._relation = relation;\n\n if (relation && relation.concept) {\n this._concept = new ConceptLinkModel(relation.concept, entryDate);\n }\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.concept.getInitialChildModelLinks();\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.concept.setChildModels(models);\n }\n\n /**\n * Get key of relation\n */\n get key(): string {\n return this._relation.relationType;\n }\n\n /**\n * Get Text fragments\n */\n get textfragments(): Array<textfragmentJSON> {\n return this._relation.textFragments;\n }\n\n /**\n * Get Label of relation\n */\n get label(): string {\n return this._relation.relationLabel;\n }\n\n /**\n * Get direction of relation\n */\n get direction(): string {\n return this._relation.relationDirection;\n }\n\n /**\n * Get other concept\n */\n get concept(): ConceptLinkModel {\n return this._concept;\n }\n\n /**\n * Set concept information\n */\n set concept(concept: ConceptLinkModel) {\n this._concept = concept;\n }\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAQA;AACA;AACA;AACe,MAAME,oBAAoB,CAAkC;E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AA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConceptTypeDetailModel.js","names":["ConceptTypeDetailModel","ResourceModel","type","modelName","isApplicableModel","data","contributions","resourcetype","key","_id","label","getData","icon","textColor","backgroundColor","borderColor","labelTypes","propertyTypes","textFragmentTypes","sectionReferenceTypes"],"sources":["../../../src/models/concepts/ConceptTypeDetailModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport type ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\n/**\n * Model for concept details, available through modelcatalog\n */\nclass ConceptTypeDetailModel extends ResourceModel {\n /**\n */\n get type(): string {\n return \"ConceptTypeDetail\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ConceptTypeDetailModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ConceptTypeDetail\"\n );\n }\n\n /**\n */\n get key(): string {\n return this.data._id;\n }\n\n /**\n * Get concept type label\n */\n get label(): string {\n return this.getData(\"label\", \"\");\n }\n\n /**\n * Get concept type icon\n */\n get icon(): string {\n return this.getData(\"icon\", \"\");\n }\n\n /**\n * Get concept type text color\n */\n get textColor(): string {\n return this.getData(\"textColor\", \"#000\");\n }\n\n /**\n * Get concept type background color\n */\n get backgroundColor(): string {\n return this.getData(\"backgroundColor\", \"#fff\");\n }\n\n /**\n * Get concept line color\n */\n get borderColor(): string {\n return this.getData(\"lineColor\", \"#000\");\n }\n\n /**\n * Get label types\n */\n get labelTypes(): ?Array<Object> {\n return this.data.labelTypes;\n }\n\n /**\n * Get propertyTypes\n */\n get propertyTypes(): Array<Object> {\n return this.getData(\"propertyTypes\", []);\n }\n\n /**\n * Get textFragmentTypes\n */\n get textFragmentTypes(): Array<Object> {\n return this.getData(\"textFragmentTypes\", []);\n }\n\n /**\n * Get sectionReferenceTypes\n */\n get sectionReferenceTypes(): Array<Object> {\n return this.getData(\"sectionReferenceTypes\", []);\n }\n}\n\nexport default ConceptTypeDetailModel;\n"],"mappings":";;;;;;;AACA;AAIA;AACA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"ConceptTypeDetailModel.js","names":["_ResourceModel","_interopRequireDefault","require","ConceptTypeDetailModel","ResourceModel","type","modelName","isApplicableModel","data","contributions","resourcetype","key","_id","label","getData","icon","textColor","backgroundColor","borderColor","labelTypes","propertyTypes","textFragmentTypes","sectionReferenceTypes","_default","exports","default"],"sources":["../../../src/models/concepts/ConceptTypeDetailModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport type ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\n/**\n * Model for concept details, available through modelcatalog\n */\nclass ConceptTypeDetailModel extends ResourceModel {\n /**\n */\n get type(): string {\n return \"ConceptTypeDetail\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ConceptTypeDetailModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ConceptTypeDetail\"\n );\n }\n\n /**\n */\n get key(): string {\n return this.data._id;\n }\n\n /**\n * Get concept type label\n */\n get label(): string {\n return this.getData(\"label\", \"\");\n }\n\n /**\n * Get concept type icon\n */\n get icon(): string {\n return this.getData(\"icon\", \"\");\n }\n\n /**\n * Get concept type text color\n */\n get textColor(): string {\n return this.getData(\"textColor\", \"#000\");\n }\n\n /**\n * Get concept type background color\n */\n get backgroundColor(): string {\n return this.getData(\"backgroundColor\", \"#fff\");\n }\n\n /**\n * Get concept line color\n */\n get borderColor(): string {\n return this.getData(\"lineColor\", \"#000\");\n }\n\n /**\n * Get label types\n */\n get labelTypes(): ?Array<Object> {\n return this.data.labelTypes;\n }\n\n /**\n * Get propertyTypes\n */\n get propertyTypes(): Array<Object> {\n return this.getData(\"propertyTypes\", []);\n }\n\n /**\n * Get textFragmentTypes\n */\n get textFragmentTypes(): Array<Object> {\n return this.getData(\"textFragmentTypes\", []);\n }\n\n /**\n * Get sectionReferenceTypes\n */\n get sectionReferenceTypes(): Array<Object> {\n return this.getData(\"sectionReferenceTypes\", []);\n }\n}\n\nexport default ConceptTypeDetailModel;\n"],"mappings":";;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACA;AACA,MAAMC,sBAAsB,SAASC,sBAAa,CAAC;EACjD;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,mBAAmB;EAC5B;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,wBAAwB;EACjC;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACC,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,mBAAmB;EAE3D;;EAEA;AACF;EACE,IAAIC,GAAGA,CAAA,EAAW;IAChB,OAAO,IAAI,CAACH,IAAI,CAACI,GAAG;EACtB;;EAEA;AACF;AACA;EACE,IAAIC,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAACC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;EAClC;;EAEA;AACF;AACA;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,IAAI,CAACD,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;EACjC;;EAEA;AACF;AACA;EACE,IAAIE,SAASA,CAAA,EAAW;IACtB,OAAO,IAAI,CAACF,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC;EAC1C;;EAEA;AACF;AACA;EACE,IAAIG,eAAeA,CAAA,EAAW;IAC5B,OAAO,IAAI,CAACH,OAAO,CAAC,iBAAiB,EAAE,MAAM,CAAC;EAChD;;EAEA;AACF;AACA;EACE,IAAII,WAAWA,CAAA,EAAW;IACxB,OAAO,IAAI,CAACJ,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC;EAC1C;;EAEA;AACF;AACA;EACE,IAAIK,UAAUA,CAAA,EAAmB;IAC/B,OAAO,IAAI,CAACX,IAAI,CAACW,UAAU;EAC7B;;EAEA;AACF;AACA;EACE,IAAIC,aAAaA,CAAA,EAAkB;IACjC,OAAO,IAAI,CAACN,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;EAC1C;;EAEA;AACF;AACA;EACE,IAAIO,iBAAiBA,CAAA,EAAkB;IACrC,OAAO,IAAI,CAACP,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC;EAC9C;;EAEA;AACF;AACA;EACE,IAAIQ,qBAAqBA,CAAA,EAAkB;IACzC,OAAO,IAAI,CAACR,OAAO,CAAC,uBAAuB,EAAE,EAAE,CAAC;EAClD;AACF;AAAC,IAAAS,QAAA,GAEcpB,sBAAsB;AAAAqB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceReferenceCollection.js","names":["SourceReferenceCollection","BaseCollection","constructor","sourceReferences","entryDate","collection","sourceReference","SourceReferenceModel","byTypes","types","sourceRef","type"],"sources":["../../../src/models/concepts/SourceReferenceCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\nimport SourceReferenceModel from \"./SourceReferenceModel\";\n\n/**\n * Source reference collection\n */\nexport default class SourceReferenceCollection extends BaseCollection<SourceReferenceModel> {\n /**\n */\n constructor(\n sourceReferences: Array<Object> = [],\n entryDate: ?ISO_DATE = null\n ) {\n super();\n\n this.collection = sourceReferences\n ? sourceReferences.map(\n (sourceReference) =>\n new SourceReferenceModel(sourceReference, entryDate)\n )\n : [];\n }\n\n /**\n */\n byTypes(types: string): Array<SourceReferenceModel> {\n return this.filter((sourceRef) => types.includes(sourceRef.type));\n }\n}\n"],"mappings":";;;;;;;;;;AACA;AACA;AAEA;AACA;AACA;AACe,
|
|
1
|
+
{"version":3,"file":"SourceReferenceCollection.js","names":["_BaseCollection","_interopRequireDefault","require","_SourceReferenceModel","SourceReferenceCollection","BaseCollection","constructor","sourceReferences","arguments","length","undefined","entryDate","collection","_map","default","call","sourceReference","SourceReferenceModel","byTypes","types","_context","_filter","sourceRef","_includes","type","exports"],"sources":["../../../src/models/concepts/SourceReferenceCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\nimport SourceReferenceModel from \"./SourceReferenceModel\";\n\n/**\n * Source reference collection\n */\nexport default class SourceReferenceCollection extends BaseCollection<SourceReferenceModel> {\n /**\n */\n constructor(\n sourceReferences: Array<Object> = [],\n entryDate: ?ISO_DATE = null\n ) {\n super();\n\n this.collection = sourceReferences\n ? sourceReferences.map(\n (sourceReference) =>\n new SourceReferenceModel(sourceReference, entryDate)\n )\n : [];\n }\n\n /**\n */\n byTypes(types: string): Array<SourceReferenceModel> {\n return this.filter((sourceRef) => types.includes(sourceRef.type));\n }\n}\n"],"mappings":";;;;;;;;;;AACA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA;AACA;AACA;AACe,MAAME,yBAAyB,SAASC,uBAAc,CAAuB;EAC1F;AACF;EACEC,WAAWA,CAAA,EAGT;IAAA,IAFAC,gBAA+B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IAAA,IACpCG,SAAoB,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;IAE3B,KAAK,EAAE;IAEP,IAAI,CAACI,UAAU,GAAGL,gBAAgB,GAC9B,IAAAM,IAAA,CAAAC,OAAA,EAAAP,gBAAgB,EAAAQ,IAAA,CAAhBR,gBAAgB,EACbS,eAAe,IACd,IAAIC,6BAAoB,CAACD,eAAe,EAAEL,SAAS,CAAC,CACvD,GACD,EAAE;EACR;;EAEA;AACF;EACEO,OAAOA,CAACC,KAAa,EAA+B;IAAA,IAAAC,QAAA;IAClD,OAAO,IAAAC,OAAA,CAAAP,OAAA,EAAAM,QAAA,OAAI,EAAAL,IAAA,CAAAK,QAAA,EAASE,SAAS,IAAK,IAAAC,SAAA,CAAAT,OAAA,EAAAK,KAAK,EAAAJ,IAAA,CAALI,KAAK,EAAUG,SAAS,CAACE,IAAI,CAAC,CAAC;EACnE;AACF;AAACC,OAAA,CAAAX,OAAA,GAAAV,yBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceReferenceModel.js","names":["SourceReferenceModel","constructor","sourceReference","entryDate","_sourceReference","_entryDate","link","section","_links","self","href","replace","content","ContentLinkModel","selfhref","Href","type","label","sourceLabel","referenceHash","createHashFromHref"],"sources":["../../../src/models/concepts/SourceReferenceModel.js"],"sourcesContent":["// @flow\nimport { createHashFromHref } from \"../../utils/helpers/createHash\";\n\nimport ContentLinkModel from \"../content/ContentLinkModel\";\nimport Href from \"../href/Href\";\n\n/**\n */\nclass SourceReferenceModel {\n _sourceReference: Object;\n _entryDate: ?ISO_DATE;\n\n /**\n */\n constructor(sourceReference: Object, entryDate: ?ISO_DATE = null) {\n this._sourceReference = sourceReference;\n this._entryDate = entryDate;\n }\n\n /**\n */\n get link(): ContentLinkModel {\n const section = this._sourceReference._links.self.href.replace(\n `${this._sourceReference._links.content.href}/`,\n \"\"\n );\n\n return new ContentLinkModel(\n {\n ...this._sourceReference,\n section,\n },\n this._entryDate\n );\n }\n\n /**\n */\n get selfhref(): Href {\n return new Href(this._sourceReference._links.self.href);\n }\n\n /**\n */\n get type(): string {\n return this._sourceReference.type;\n }\n\n /**\n */\n get label(): string {\n return this._sourceReference.label;\n }\n\n /**\n */\n get sourceLabel(): string {\n return this._sourceReference.sourceLabel;\n }\n\n /**\n */\n get referenceHash(): number {\n return createHashFromHref(this.selfhref);\n }\n}\n\nexport default SourceReferenceModel;\n"],"mappings":";;;;;;;;AACA;AAEA;AACA;AAEA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"SourceReferenceModel.js","names":["_createHash","require","_ContentLinkModel","_interopRequireDefault","_Href","SourceReferenceModel","constructor","sourceReference","entryDate","arguments","length","undefined","_defineProperty2","default","_sourceReference","_entryDate","link","section","_links","self","href","replace","content","ContentLinkModel","selfhref","Href","type","label","sourceLabel","referenceHash","createHashFromHref","_default","exports"],"sources":["../../../src/models/concepts/SourceReferenceModel.js"],"sourcesContent":["// @flow\nimport { createHashFromHref } from \"../../utils/helpers/createHash\";\n\nimport ContentLinkModel from \"../content/ContentLinkModel\";\nimport Href from \"../href/Href\";\n\n/**\n */\nclass SourceReferenceModel {\n _sourceReference: Object;\n _entryDate: ?ISO_DATE;\n\n /**\n */\n constructor(sourceReference: Object, entryDate: ?ISO_DATE = null) {\n this._sourceReference = sourceReference;\n this._entryDate = entryDate;\n }\n\n /**\n */\n get link(): ContentLinkModel {\n const section = this._sourceReference._links.self.href.replace(\n `${this._sourceReference._links.content.href}/`,\n \"\"\n );\n\n return new ContentLinkModel(\n {\n ...this._sourceReference,\n section,\n },\n this._entryDate\n );\n }\n\n /**\n */\n get selfhref(): Href {\n return new Href(this._sourceReference._links.self.href);\n }\n\n /**\n */\n get type(): string {\n return this._sourceReference.type;\n }\n\n /**\n */\n get label(): string {\n return this._sourceReference.label;\n }\n\n /**\n */\n get sourceLabel(): string {\n return this._sourceReference.sourceLabel;\n }\n\n /**\n */\n get referenceHash(): number {\n return createHashFromHref(this.selfhref);\n }\n}\n\nexport default SourceReferenceModel;\n"],"mappings":";;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA;AACA;AACA,MAAMI,oBAAoB,CAAC;EAIzB;AACF;EACEC,WAAWA,CAACC,eAAuB,EAA+B;IAAA,IAA7BC,SAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;I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