@beinformed/ui 1.28.3 → 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 +7 -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.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/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.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTOCModel.js","names":["has","ResourceModel","FilterCollection","ContentLinkModel","ContentTypeModel","Href","TIMEVERSION_FILTER_NAME","getItems","items","entryDate","item","link","section","_id","ContentTOCModel","type","modelName","isApplicableModel","data","contributions","resourcetype","getInitialChildModelLinks","contentTypeLink","links","getLinkByKey","setChildModels","models","contentType","model","label","getData","selfhref","href","selflink","filterCollection","forEach","filter","params","param","value","setParameter","name","removeParameter","selfContentLink","categories","category","_contentType","_filterCollection","key","timeversionFilter","getFilterByAttributeKey","attribute"],"sources":["../../../src/models/content/ContentTOCModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport ResourceModel from \"../base/ResourceModel\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ContentLinkModel from \"./ContentLinkModel\";\nimport ContentTypeModel from \"./ContentTypeModel\";\nimport Href from \"../href/Href\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * Get content items recursively\n */\nconst getItems = (\n items: Array<Object>,\n entryDate: ISO_DATE | null\n): Array<ContentLinkModel> =>\n items.map((item) => {\n const link = new ContentLinkModel(\n {\n ...item,\n section: item._id,\n },\n entryDate\n );\n\n if (item.items) {\n link.items = getItems(item.items, entryDate);\n }\n\n return link;\n });\n\n/**\n * Content detail model\n */\nexport default class ContentTOCModel extends ResourceModel {\n _contentType: ContentTypeModel | null = null;\n _filterCollection: FilterCollection;\n\n /**\n */\n get type(): string {\n return \"ContentTOC\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ContentTOCModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ContentTOC\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const contentTypeLink = this.links.getLinkByKey(\"contenttype\");\n\n if (contentTypeLink) {\n return [contentTypeLink];\n }\n\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.contentType = models.find((model) => model.type === \"ContentType\");\n }\n\n /**\n * Get content label\n */\n get label(): string {\n return this.getData(\"label\", \"\");\n }\n\n /**\n * Getting the self link of this list\n */\n get selfhref(): Href {\n const href = new Href(this.selflink.href);\n\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 return href;\n }\n\n /**\n */\n get selfContentLink(): ContentLinkModel {\n return new ContentLinkModel(this.data, this.entryDate);\n }\n\n /**\n * Get sub items of toc\n */\n get items(): Array<ContentLinkModel> {\n return this.data.items ? getItems(this.data.items, this.entryDate) : [];\n }\n\n /**\n * get categories of content\n */\n get categories(): Array<ContentLinkModel> {\n if (this.data.categories) {\n return this.data.categories.map(\n (category) => new ContentLinkModel(category)\n );\n }\n\n return [];\n }\n\n /**\n * Retrieve content type model\n */\n get contentType(): ContentTypeModel | null {\n return this._contentType;\n }\n\n /**\n */\n set contentType(contentType: ?ModularUIModel) {\n this._contentType =\n contentType instanceof ContentTypeModel ? contentType : null;\n }\n\n /**\n * Retrieve available filters on concept toc\n */\n get filterCollection(): FilterCollection {\n if (!this._filterCollection) {\n this._filterCollection = new FilterCollection(this.data.filter, {\n filter: this.contributions.filter.filter((filter) => {\n const [key] = Object.keys(filter);\n return has(this.data?.filter, key);\n }),\n });\n }\n\n return this._filterCollection;\n }\n\n /**\n * Retrieve entrydate of content toc\n */\n get entryDate(): ISO_DATE | null {\n const timeversionFilter = this.filterCollection.getFilterByAttributeKey(\n TIMEVERSION_FILTER_NAME\n );\n\n return timeversionFilter?.attribute?.value ?? null;\n }\n}\n"],"mappings":";;;;;AACA,SAASA,GAAG,QAAQ,6BAA6B;AAEjD,OAAOC,aAAa,MAAM,uBAAuB;AACjD,OAAOC,gBAAgB,MAAM,6BAA6B;AAC1D,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,IAAI,MAAM,cAAc;AAE/B,SAASC,uBAAuB,QAAQ,2BAA2B;AAMnE;AACA;AACA;AACA,MAAMC,QAAQ,
|
|
1
|
+
{"version":3,"file":"ContentTOCModel.js","names":["has","ResourceModel","FilterCollection","ContentLinkModel","ContentTypeModel","Href","TIMEVERSION_FILTER_NAME","getItems","items","entryDate","_mapInstanceProperty","call","item","link","section","_id","ContentTOCModel","constructor","arguments","_defineProperty","type","modelName","isApplicableModel","data","contributions","resourcetype","getInitialChildModelLinks","contentTypeLink","links","getLinkByKey","setChildModels","models","contentType","_findInstanceProperty","model","label","getData","selfhref","href","selflink","filterCollection","forEach","filter","params","param","value","setParameter","name","removeParameter","selfContentLink","categories","_context","category","_contentType","_filterCollection","_context2","_filterInstanceProperty","key","_Object$keys","timeversionFilter","getFilterByAttributeKey","attribute"],"sources":["../../../src/models/content/ContentTOCModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport ResourceModel from \"../base/ResourceModel\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ContentLinkModel from \"./ContentLinkModel\";\nimport ContentTypeModel from \"./ContentTypeModel\";\nimport Href from \"../href/Href\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * Get content items recursively\n */\nconst getItems = (\n items: Array<Object>,\n entryDate: ISO_DATE | null\n): Array<ContentLinkModel> =>\n items.map((item) => {\n const link = new ContentLinkModel(\n {\n ...item,\n section: item._id,\n },\n entryDate\n );\n\n if (item.items) {\n link.items = getItems(item.items, entryDate);\n }\n\n return link;\n });\n\n/**\n * Content detail model\n */\nexport default class ContentTOCModel extends ResourceModel {\n _contentType: ContentTypeModel | null = null;\n _filterCollection: FilterCollection;\n\n /**\n */\n get type(): string {\n return \"ContentTOC\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ContentTOCModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ContentTOC\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const contentTypeLink = this.links.getLinkByKey(\"contenttype\");\n\n if (contentTypeLink) {\n return [contentTypeLink];\n }\n\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.contentType = models.find((model) => model.type === \"ContentType\");\n }\n\n /**\n * Get content label\n */\n get label(): string {\n return this.getData(\"label\", \"\");\n }\n\n /**\n * Getting the self link of this list\n */\n get selfhref(): Href {\n const href = new Href(this.selflink.href);\n\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 return href;\n }\n\n /**\n */\n get selfContentLink(): ContentLinkModel {\n return new ContentLinkModel(this.data, this.entryDate);\n }\n\n /**\n * Get sub items of toc\n */\n get items(): Array<ContentLinkModel> {\n return this.data.items ? getItems(this.data.items, this.entryDate) : [];\n }\n\n /**\n * get categories of content\n */\n get categories(): Array<ContentLinkModel> {\n if (this.data.categories) {\n return this.data.categories.map(\n (category) => new ContentLinkModel(category)\n );\n }\n\n return [];\n }\n\n /**\n * Retrieve content type model\n */\n get contentType(): ContentTypeModel | null {\n return this._contentType;\n }\n\n /**\n */\n set contentType(contentType: ?ModularUIModel) {\n this._contentType =\n contentType instanceof ContentTypeModel ? contentType : null;\n }\n\n /**\n * Retrieve available filters on concept toc\n */\n get filterCollection(): FilterCollection {\n if (!this._filterCollection) {\n this._filterCollection = new FilterCollection(this.data.filter, {\n filter: this.contributions.filter.filter((filter) => {\n const [key] = Object.keys(filter);\n return has(this.data?.filter, key);\n }),\n });\n }\n\n return this._filterCollection;\n }\n\n /**\n * Retrieve entrydate of content toc\n */\n get entryDate(): ISO_DATE | null {\n const timeversionFilter = this.filterCollection.getFilterByAttributeKey(\n TIMEVERSION_FILTER_NAME\n );\n\n return timeversionFilter?.attribute?.value ?? null;\n }\n}\n"],"mappings":";;;;;AACA,SAASA,GAAG,QAAQ,6BAA6B;AAEjD,OAAOC,aAAa,MAAM,uBAAuB;AACjD,OAAOC,gBAAgB,MAAM,6BAA6B;AAC1D,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,IAAI,MAAM,cAAc;AAE/B,SAASC,uBA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AAIjD,gBAAgB,CAACiD,QAAQ,CAAC,CAC7C;IACH;IAEA,OAAO,EAAE;EACX;;EAEA;AACF;AACA;EACE,IAAIpB,WAAWA,CAAA,EAA4B;IACzC,OAAO,IAAI,CAACqB,YAAY;EAC1B;;EAEA;AACF;EACE,IAAIrB,WAAWA,CAACA,WAA4B,EAAE;IAC5C,IAAI,CAACqB,YAAY,GACfrB,WAAW,YAAY5B,gBAAgB,GAAG4B,WAAW,GAAG,IAAI;EAChE;;EAEA;AACF;AACA;EACE,IAAIQ,gBAAgBA,CAAA,EAAqB;IACvC,IAAI,CAAC,IAAI,CAACc,iBAAiB,EAAE;MAAA,IAAAC,SAAA;MAC3B,IAAI,CAACD,iBAAiB,GAAG,IAAIpD,gBAAgB,CAAAsD,uBAAA,CAAC,IAAI,CAACjC,IAAI,GAAS;QAC9DmB,MAAM,EAAEc,uBAAA,CAAAD,SAAA,GAAAC,uBAAA,KAAI,CAAChC,aAAa,GAAAb,IAAA,CAAA4C,SAAA,EAAgBb,MAAM,IAAK;UACnD,MAAM,CAACe,GAAG,CAAC,GAAGC,YAAA,CAAYhB,MAAM,CAAC;UACjC,OAAO1C,GAAG,CAAC,IAAI,CAACuB,IAAI,EAAEmB,MAAM,EAAEe,GAAG,CAAC;QACpC,CAAC;MACH,CAAC,CAAC;IACJ;IAEA,OAAO,IAAI,CAACH,iBAAiB;EAC/B;;EAEA;AACF;AACA;EACE,IAAI7C,SAASA,CAAA,EAAoB;IAC/B,MAAMkD,iBAAiB,GAAG,IAAI,CAACnB,gBAAgB,CAACoB,uBAAuB,CACrEtD,uBAAuB,CACxB;IAED,OAAOqD,iBAAiB,EAAEE,SAAS,EAAEhB,KAAK,IAAI,IAAI;EACpD;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTypeModel.js","names":["ResourceModel","ContentTypeModel","type","modelName","isApplicableModel","data","contributions","resourcetype","label","getData","icon","iconLarge","iconSmall","iconMedium","description"],"sources":["../../../src/models/content/ContentTypeModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n * Model for concept details, available through modelcatalog\n */\nexport default class ContentTypeModel extends ResourceModel {\n /**\n */\n get type(): string {\n return \"ContentType\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ContentTypeModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ContentTypeDetail\"\n );\n }\n\n /**\n * Get concept type label\n */\n get label(): string {\n return this.getData(\"label\", \"\");\n }\n\n /**\n * Get content type icon\n */\n get icon(): ?string {\n return this.iconLarge;\n }\n\n /**\n * Get content type small icon\n */\n get iconSmall(): ?string {\n return this.data.iconSmall;\n }\n\n /**\n * Get content type medium icon\n */\n get iconMedium(): ?string {\n return this.data.iconMedium;\n }\n\n /**\n * Get content type large icon\n */\n get iconLarge(): ?string {\n return this.data.iconLarge;\n }\n\n /**\n * Get concept type text color\n */\n get description(): ?string {\n return this.data.description;\n }\n}\n"],"mappings":"AACA,OAAOA,aAAa,MAAM,uBAAuB;AAGjD;AACA;AACA;AACA,eAAe,MAAMC,gBAAgB,SAASD,aAAa,CAAC;EAC1D;AACF;EACE,IAAIE,
|
|
1
|
+
{"version":3,"file":"ContentTypeModel.js","names":["ResourceModel","ContentTypeModel","type","modelName","isApplicableModel","data","contributions","resourcetype","label","getData","icon","iconLarge","iconSmall","iconMedium","description"],"sources":["../../../src/models/content/ContentTypeModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n * Model for concept details, available through modelcatalog\n */\nexport default class ContentTypeModel extends ResourceModel {\n /**\n */\n get type(): string {\n return \"ContentType\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ContentTypeModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ContentTypeDetail\"\n );\n }\n\n /**\n * Get concept type label\n */\n get label(): string {\n return this.getData(\"label\", \"\");\n }\n\n /**\n * Get content type icon\n */\n get icon(): ?string {\n return this.iconLarge;\n }\n\n /**\n * Get content type small icon\n */\n get iconSmall(): ?string {\n return this.data.iconSmall;\n }\n\n /**\n * Get content type medium icon\n */\n get iconMedium(): ?string {\n return this.data.iconMedium;\n }\n\n /**\n * Get content type large icon\n */\n get iconLarge(): ?string {\n return this.data.iconLarge;\n }\n\n /**\n * Get concept type text color\n */\n get description(): ?string {\n return this.data.description;\n }\n}\n"],"mappings":"AACA,OAAOA,aAAa,MAAM,uBAAuB;AAGjD;AACA;AACA;AACA,eAAe,MAAMC,gBAAgB,SAASD,aAAa,CAAC;EAC1D;AACF;EACE,IAAIE,IAAIA,CAAA,EAAW;IACjB,OAAO,aAAa;EACtB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,kBAAkB;EAC3B;;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;AACA;EACE,IAAIC,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAACC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;EAClC;;EAEA;AACF;AACA;EACE,IAAIC,IAAIA,CAAA,EAAY;IAClB,OAAO,IAAI,CAACC,SAAS;EACvB;;EAEA;AACF;AACA;EACE,IAAIC,SAASA,CAAA,EAAY;IACvB,OAAO,IAAI,CAACP,IAAI,CAACO,SAAS;EAC5B;;EAEA;AACF;AACA;EACE,IAAIC,UAAUA,CAAA,EAAY;IACxB,OAAO,IAAI,CAACR,IAAI,CAACQ,UAAU;EAC7B;;EAEA;AACF;AACA;EACE,IAAIF,SAASA,CAAA,EAAY;IACvB,OAAO,IAAI,CAACN,IAAI,CAACM,SAAS;EAC5B;;EAEA;AACF;AACA;EACE,IAAIG,WAAWA,CAAA,EAAY;IACzB,OAAO,IAAI,CAACT,IAAI,CAACS,WAAW;EAC9B;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionModel.js","names":["BaseModel","ContentLinkModel","SubSectionModel","createHashFromHref","LinkModel","retrieveText","SectionModel","constructor","data","entryDate","_entryDate","referred","selflink","_selflink","_links","self","selfhref","href","type","sourceLabel","id","_id","key","label","getData","number","body","childSectionLinks","childSections","childSection","section","selfContentLink","_childSections","sections","subSections","subSection","referenceHash","getReferredSections","push","referredChilds"],"sources":["../../../src/models/content/SectionModel.js"],"sourcesContent":["// @flow\nimport BaseModel from \"../base/BaseModel\";\nimport ContentLinkModel from \"./ContentLinkModel\";\nimport SubSectionModel from \"./SubSectionModel\";\n\nimport { createHashFromHref } from \"../../utils/helpers/createHash\";\nimport LinkModel from \"../links/LinkModel\";\n\nimport type Href from \"../href/Href\";\nimport { retrieveText } from \"../../utils\";\n\n/**\n */\nclass SectionModel extends BaseModel {\n _entryDate: ISO_DATE | null;\n _selflink: ?LinkModel;\n _childSections: Array<SectionModel>;\n\n constructor(data: Object, entryDate: ISO_DATE | null) {\n super(data, {});\n\n this._entryDate = entryDate;\n }\n\n /**\n */\n get referred(): boolean {\n return this.data.referred;\n }\n\n /**\n */\n get selflink(): LinkModel {\n if (!this._selflink) {\n this._selflink = new LinkModel(this.data._links?.self);\n }\n return this._selflink;\n }\n\n /**\n */\n get selfhref(): Href {\n return this.selflink.href;\n }\n\n /**\n */\n get entryDate(): ISO_DATE | null {\n return this._entryDate;\n }\n\n /**\n */\n get type(): string {\n return this.data.type;\n }\n\n /**\n */\n get sourceLabel(): string {\n return this.data.sourceLabel;\n }\n\n /**\n */\n get id(): string {\n return this.data.id || this.data._id;\n }\n\n /**\n */\n get key(): string {\n return this.id;\n }\n\n /**\n * Get content label\n */\n get label(): string {\n return this.getData(\"label\", \"\");\n }\n\n /**\n * Retrieve number of section\n */\n get number(): string | null {\n return this.data.number ?? null;\n }\n\n /**\n * Get content body\n */\n get body(): ?string {\n return retrieveText(this.data.body);\n }\n\n /**\n * Retrieve child section links\n */\n get childSectionLinks(): Array<ContentLinkModel> {\n return this.data.childSections\n ? this.data.childSections.map(\n (childSection) =>\n new ContentLinkModel(\n {\n section: childSection.id || childSection._id,\n _id: childSection.id || childSection._id,\n label: childSection.label,\n sourceLabel: childSection.sourceLabel,\n _links: childSection._links,\n },\n this.entryDate\n )\n )\n : [];\n }\n\n /**\n */\n get selfContentLink(): ContentLinkModel {\n return new ContentLinkModel(\n {\n section: this.id,\n _id: this.id,\n label: this.data.label,\n sourceLabel: this.data.sourceLabel,\n _links: this.data._links,\n },\n this.entryDate\n );\n }\n\n /**\n * Get tree of child sections\n */\n get childSections(): Array<SectionModel> {\n if (!this._childSections && this.data.childSections) {\n this._childSections = this.data.childSections\n .filter((childSection) => \"body\" in childSection)\n .map((childSection) => new SectionModel(childSection, this.entryDate));\n }\n return this._childSections || [];\n }\n\n /**\n * set resolved child sections\n */\n set childSections(sections: Array<SectionModel>) {\n this._childSections = sections || [];\n }\n\n /**\n * Get sub sections\n */\n get subSections(): Array<SubSectionModel> {\n return this.data.subSections\n ? this.data.subSections.map(\n (subSection) => new SubSectionModel(subSection)\n )\n : [];\n }\n\n /**\n */\n get referenceHash(): number {\n return createHashFromHref(this.selfhref);\n }\n\n /**\n */\n getReferredSections(): Array<SubSectionModel | SectionModel> {\n const sections = [];\n\n for (const subSection of this.subSections) {\n if (subSection.referred) {\n sections.push(subSection);\n }\n\n const referredChilds = subSection.getReferredSections();\n sections.push(...referredChilds);\n }\n\n for (const childSection of this.childSections) {\n if (childSection.referred) {\n sections.push(childSection);\n }\n\n const referredChilds = childSection.getReferredSections();\n sections.push(...referredChilds);\n }\n\n return sections;\n }\n}\n\nexport default SectionModel;\n"],"mappings":";;;AACA,OAAOA,SAAS,MAAM,mBAAmB;AACzC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,eAAe,MAAM,mBAAmB;AAE/C,SAASC,kBAAkB,QAAQ,gCAAgC;AACnE,OAAOC,SAAS,MAAM,oBAAoB;AAG1C,SAASC,YAAY,QAAQ,aAAa;;AAE1C;AACA;AACA,MAAMC,YAAY,SAASN,SAAS,CAAC;EAKnCO,
|
|
1
|
+
{"version":3,"file":"SectionModel.js","names":["BaseModel","ContentLinkModel","SubSectionModel","createHashFromHref","LinkModel","retrieveText","SectionModel","constructor","data","entryDate","_defineProperty","_entryDate","referred","selflink","_selflink","_links","self","selfhref","href","type","sourceLabel","id","_id","key","label","getData","number","body","childSectionLinks","_context","childSections","_mapInstanceProperty","call","childSection","section","selfContentLink","_childSections","_context2","_context3","_filterInstanceProperty","sections","subSections","_context4","subSection","referenceHash","getReferredSections","push","referredChilds"],"sources":["../../../src/models/content/SectionModel.js"],"sourcesContent":["// @flow\nimport BaseModel from \"../base/BaseModel\";\nimport ContentLinkModel from \"./ContentLinkModel\";\nimport SubSectionModel from \"./SubSectionModel\";\n\nimport { createHashFromHref } from \"../../utils/helpers/createHash\";\nimport LinkModel from \"../links/LinkModel\";\n\nimport type Href from \"../href/Href\";\nimport { retrieveText } from \"../../utils\";\n\n/**\n */\nclass SectionModel extends BaseModel {\n _entryDate: ISO_DATE | null;\n _selflink: ?LinkModel;\n _childSections: Array<SectionModel>;\n\n constructor(data: Object, entryDate: ISO_DATE | null) {\n super(data, {});\n\n this._entryDate = entryDate;\n }\n\n /**\n */\n get referred(): boolean {\n return this.data.referred;\n }\n\n /**\n */\n get selflink(): LinkModel {\n if (!this._selflink) {\n this._selflink = new LinkModel(this.data._links?.self);\n }\n return this._selflink;\n }\n\n /**\n */\n get selfhref(): Href {\n return this.selflink.href;\n }\n\n /**\n */\n get entryDate(): ISO_DATE | null {\n return this._entryDate;\n }\n\n /**\n */\n get type(): string {\n return this.data.type;\n }\n\n /**\n */\n get sourceLabel(): string {\n return this.data.sourceLabel;\n }\n\n /**\n */\n get id(): string {\n return this.data.id || this.data._id;\n }\n\n /**\n */\n get key(): string {\n return this.id;\n }\n\n /**\n * Get content label\n */\n get label(): string {\n return this.getData(\"label\", \"\");\n }\n\n /**\n * Retrieve number of section\n */\n get number(): string | null {\n return this.data.number ?? null;\n }\n\n /**\n * Get content body\n */\n get body(): ?string {\n return retrieveText(this.data.body);\n }\n\n /**\n * Retrieve child section links\n */\n get childSectionLinks(): Array<ContentLinkModel> {\n return this.data.childSections\n ? this.data.childSections.map(\n (childSection) =>\n new ContentLinkModel(\n {\n section: childSection.id || childSection._id,\n _id: childSection.id || childSection._id,\n label: childSection.label,\n sourceLabel: childSection.sourceLabel,\n _links: childSection._links,\n },\n this.entryDate\n )\n )\n : [];\n }\n\n /**\n */\n get selfContentLink(): ContentLinkModel {\n return new ContentLinkModel(\n {\n section: this.id,\n _id: this.id,\n label: this.data.label,\n sourceLabel: this.data.sourceLabel,\n _links: this.data._links,\n },\n this.entryDate\n );\n }\n\n /**\n * Get tree of child sections\n */\n get childSections(): Array<SectionModel> {\n if (!this._childSections && this.data.childSections) {\n this._childSections = this.data.childSections\n .filter((childSection) => \"body\" in childSection)\n .map((childSection) => new SectionModel(childSection, this.entryDate));\n }\n return this._childSections || [];\n }\n\n /**\n * set resolved child sections\n */\n set childSections(sections: Array<SectionModel>) {\n this._childSections = sections || [];\n }\n\n /**\n * Get sub sections\n */\n get subSections(): Array<SubSectionModel> {\n return this.data.subSections\n ? this.data.subSections.map(\n (subSection) => new SubSectionModel(subSection)\n )\n : [];\n }\n\n /**\n */\n get referenceHash(): number {\n return createHashFromHref(this.selfhref);\n }\n\n /**\n */\n getReferredSections(): Array<SubSectionModel | SectionModel> {\n const sections = [];\n\n for (const subSection of this.subSections) {\n if (subSection.referred) {\n sections.push(subSection);\n }\n\n const referredChilds = subSection.getReferredSections();\n sections.push(...referredChilds);\n }\n\n for (const childSection of this.childSections) {\n if (childSection.referred) {\n sections.push(childSection);\n }\n\n const referredChilds = childSection.getReferredSections();\n sections.push(...referredChilds);\n }\n\n return sections;\n }\n}\n\nexport default SectionModel;\n"],"mappings":";;;AACA,OAAOA,SAAS,MAAM,mBAAmB;AACzC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,eAAe,MAAM,mBAAmB;AAE/C,SAASC,kBAAkB,QAAQ,gCAAgC;AACnE,OAAOC,SAAS,MAAM,oBAAoB;AAG1C,SAASC,YAAY,QAAQ,aAAa;;AAE1C;AACA;AACA,MAAMC,YAAY,SAASN,SAAS,CAAC;EAKnCO,WAAWA,CAACC,IAAY,EAAEC,SAA0B,EAAE;IACpD,KAAK,CAACD,IAAI,EAAE,CAAC,CAAC,CAAC;IAACE,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAEhB,IAAI,CAACC,UAAU,GAAGF,SAAS;EAC7B;;EAEA;AACF;EACE,IAAIG,QAAQA,CAAA,EAAY;IACtB,OAAO,IAAI,CAACJ,IAAI,CAACI,QAAQ;EAC3B;;EAEA;AACF;EACE,IAAIC,QAAQA,CAAA,EAAc;IACxB,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE;MACnB,IAAI,CAACA,SAAS,GAAG,IAAIV,SAAS,CAAC,IAAI,CAACI,IAAI,CAACO,MAAM,EAAEC,IAAI,CAAC;IACxD;IACA,OAAO,IAAI,CAACF,SAAS;EACvB;;EAEA;AACF;EACE,IAAIG,QAAQA,CAAA,EAAS;IACnB,OAAO,IAAI,CAACJ,QAAQ,CAACK,IAAI;EAC3B;;EAEA;AACF;EACE,IAAIT,SAASA,CAAA,EAAoB;IAC/B,OAAO,IAAI,CAACE,UAAU;EACxB;;EAEA;AACF;EACE,IAAIQ,IAAIA,CAAA,EAAW;IACjB,OAAO,IAAI,CAACX,IAAI,CAACW,IAAI;EACvB;;EAEA;AACF;EACE,IAAIC,WAAWA,CAAA,EAAW;IACxB,OAAO,IAAI,CAACZ,IAAI,CAACY,WAAW;EAC9B;;EAEA;AACF;EACE,I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AmBA,CAAA,EAA0C;IAC3D,MAAML,QAAQ,GAAG,EAAE;IAEnB,KAAK,MAAMG,UAAU,IAAI,IAAI,CAACF,WAAW,EAAE;MACzC,IAAIE,UAAU,CAAC/B,QAAQ,EAAE;QACvB4B,QAAQ,CAACM,IAAI,CAACH,UAAU,CAAC;MAC3B;MAEA,MAAMI,cAAc,GAAGJ,UAAU,CAACE,mBAAmB,EAAE;MACvDL,QAAQ,CAACM,IAAI,CAAC,GAAGC,cAAc,CAAC;IAClC;IAEA,KAAK,MAAMd,YAAY,IAAI,IAAI,CAACH,aAAa,EAAE;MAC7C,IAAIG,YAAY,CAACrB,QAAQ,EAAE;QACzB4B,QAAQ,CAACM,IAAI,CAACb,YAAY,CAAC;MAC7B;MAEA,MAAMc,cAAc,GAAGd,YAAY,CAACY,mBAAmB,EAAE;MACzDL,QAAQ,CAACM,IAAI,CAAC,GAAGC,cAAc,CAAC;IAClC;IAEA,OAAOP,QAAQ;EACjB;AACF;AAEA,eAAelC,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubSectionModel.js","names":["createHashFromHref","BaseModel","LinkCollection","Href","LinkModel","retrieveText","SubSectionModel","constructor","data","referred","id","_id","key","body","getData","number","label","subSections","subSection","links","_links","contributions","selflink","getLinkByKey","selfhref","href","relatedConceptsHrefs","hrefs","relatedConceptsHref","push","forEach","relatedConceptsLink","referenceHash","getReferredSections","sections","referredChilds"],"sources":["../../../src/models/content/SubSectionModel.js"],"sourcesContent":["// @flow\nimport { createHashFromHref } from \"../../utils/helpers/createHash\";\n\nimport BaseModel from \"../base/BaseModel\";\nimport LinkCollection from \"../links/LinkCollection\";\nimport Href from \"../href/Href\";\nimport LinkModel from \"../links/LinkModel\";\nimport { retrieveText } from \"../../utils\";\n\n/**\n * Link to a concept\n */\nexport default class SubSectionModel extends BaseModel {\n _links: LinkCollection;\n\n /**\n */\n constructor(data: Object) {\n super(data, {});\n }\n\n /**\n */\n get referred(): boolean {\n return this.data.referred;\n }\n\n /**\n */\n get id(): string {\n return this.data.id || this.data._id;\n }\n\n /**\n * Retrieve key of subsection\n */\n get key(): ?string {\n return this.id;\n }\n\n /**\n * Retrieve html body\n */\n get body(): string {\n const body = this.getData(\"body\", \"\");\n return retrieveText(body);\n }\n\n /**\n * Retrieve number of section\n */\n get number(): string | null {\n return this.data.number ?? null;\n }\n\n /**\n * Retrieve label of section\n */\n get label(): ?string {\n return this.data.label;\n }\n\n /**\n * Get sub sections\n */\n get subSections(): Array<SubSectionModel> {\n return this.data.subSections\n ? this.data.subSections.map(\n (subSection) => new SubSectionModel(subSection)\n )\n : [];\n }\n\n /**\n * Retrieve links of section\n */\n get links(): LinkCollection {\n if (!this._links) {\n this._links = new LinkCollection(\n this.data._links,\n this.contributions._links\n );\n }\n\n return this._links;\n }\n\n /**\n * Get self link of model\n */\n get selflink(): LinkModel | null {\n return this.links.getLinkByKey(\"self\");\n }\n\n /**\n * Return default self link of resource\n */\n get selfhref(): Href | null {\n return this.selflink ? this.selflink.href : null;\n }\n\n /**\n */\n get relatedConceptsHrefs(): Array<Href> {\n const hrefs = [];\n if (this.relatedConceptsHref) {\n hrefs.push(this.relatedConceptsHref);\n }\n\n this.subSections.forEach((subSection) => {\n hrefs.push(...subSection.relatedConceptsHrefs);\n });\n\n return hrefs;\n }\n\n /**\n * Get related concepts link\n */\n get relatedConceptsHref(): Href | null {\n const relatedConceptsLink = this.links.getLinkByKey(\"relatedConcepts\");\n\n if (relatedConceptsLink) {\n return relatedConceptsLink.href;\n }\n\n return null;\n }\n\n /**\n */\n get referenceHash(): number {\n const selfhref = this.selfhref || new Href();\n\n return createHashFromHref(selfhref);\n }\n\n /**\n */\n getReferredSections(): Array<SubSectionModel> {\n const sections = [];\n\n for (const subSection of this.subSections) {\n if (subSection.referred) {\n sections.push(subSection);\n }\n\n const referredChilds = subSection.getReferredSections();\n sections.push(...referredChilds);\n }\n\n return sections;\n }\n}\n"],"mappings":";;AACA,SAASA,kBAAkB,QAAQ,gCAAgC;AAEnE,OAAOC,SAAS,MAAM,mBAAmB;AACzC,OAAOC,cAAc,MAAM,yBAAyB;AACpD,OAAOC,IAAI,MAAM,cAAc;AAC/B,OAAOC,SAAS,MAAM,oBAAoB;AAC1C,SAASC,YAAY,QAAQ,aAAa;;AAE1C;AACA;AACA;AACA,eAAe,MAAMC,eAAe,SAASL,SAAS,CAAC;EAGrD;AACF;EACEM,
|
|
1
|
+
{"version":3,"file":"SubSectionModel.js","names":["createHashFromHref","BaseModel","LinkCollection","Href","LinkModel","retrieveText","SubSectionModel","constructor","data","_defineProperty","referred","id","_id","key","body","getData","number","label","subSections","_context","_mapInstanceProperty","call","subSection","links","_links","contributions","selflink","getLinkByKey","selfhref","href","relatedConceptsHrefs","hrefs","relatedConceptsHref","push","forEach","relatedConceptsLink","referenceHash","getReferredSections","sections","referredChilds"],"sources":["../../../src/models/content/SubSectionModel.js"],"sourcesContent":["// @flow\nimport { createHashFromHref } from \"../../utils/helpers/createHash\";\n\nimport BaseModel from \"../base/BaseModel\";\nimport LinkCollection from \"../links/LinkCollection\";\nimport Href from \"../href/Href\";\nimport LinkModel from \"../links/LinkModel\";\nimport { retrieveText } from \"../../utils\";\n\n/**\n * Link to a concept\n */\nexport default class SubSectionModel extends BaseModel {\n _links: LinkCollection;\n\n /**\n */\n constructor(data: Object) {\n super(data, {});\n }\n\n /**\n */\n get referred(): boolean {\n return this.data.referred;\n }\n\n /**\n */\n get id(): string {\n return this.data.id || this.data._id;\n }\n\n /**\n * Retrieve key of subsection\n */\n get key(): ?string {\n return this.id;\n }\n\n /**\n * Retrieve html body\n */\n get body(): string {\n const body = this.getData(\"body\", \"\");\n return retrieveText(body);\n }\n\n /**\n * Retrieve number of section\n */\n get number(): string | null {\n return this.data.number ?? null;\n }\n\n /**\n * Retrieve label of section\n */\n get label(): ?string {\n return this.data.label;\n }\n\n /**\n * Get sub sections\n */\n get subSections(): Array<SubSectionModel> {\n return this.data.subSections\n ? this.data.subSections.map(\n (subSection) => new SubSectionModel(subSection)\n )\n : [];\n }\n\n /**\n * Retrieve links of section\n */\n get links(): LinkCollection {\n if (!this._links) {\n this._links = new LinkCollection(\n this.data._links,\n this.contributions._links\n );\n }\n\n return this._links;\n }\n\n /**\n * Get self link of model\n */\n get selflink(): LinkModel | null {\n return this.links.getLinkByKey(\"self\");\n }\n\n /**\n * Return default self link of resource\n */\n get selfhref(): Href | null {\n return this.selflink ? this.selflink.href : null;\n }\n\n /**\n */\n get relatedConceptsHrefs(): Array<Href> {\n const hrefs = [];\n if (this.relatedConceptsHref) {\n hrefs.push(this.relatedConceptsHref);\n }\n\n this.subSections.forEach((subSection) => {\n hrefs.push(...subSection.relatedConceptsHrefs);\n });\n\n return hrefs;\n }\n\n /**\n * Get related concepts link\n */\n get relatedConceptsHref(): Href | null {\n const relatedConceptsLink = this.links.getLinkByKey(\"relatedConcepts\");\n\n if (relatedConceptsLink) {\n return relatedConceptsLink.href;\n }\n\n return null;\n }\n\n /**\n */\n get referenceHash(): number {\n const selfhref = this.selfhref || new Href();\n\n return createHashFromHref(selfhref);\n }\n\n /**\n */\n getReferredSections(): Array<SubSectionModel> {\n const sections = [];\n\n for (const subSection of this.subSections) {\n if (subSection.referred) {\n sections.push(subSection);\n }\n\n const referredChilds = subSection.getReferredSections();\n sections.push(...referredChilds);\n }\n\n return sections;\n }\n}\n"],"mappings":";;AACA,SAASA,kBAAkB,QAAQ,gCAAgC;AAEnE,OAAOC,SAAS,MAAM,mBAAmB;AACzC,OAAOC,cAAc,MAAM,yBAAyB;AACpD,OAAOC,IAAI,MAAM,cAAc;AAC/B,OAAOC,SAAS,MAAM,oBAAoB;AAC1C,SAASC,YAAY,QAAQ,aAAa;;AAE1C;AACA;AACA;AACA,eAAe,MAAMC,eAAe,SAASL,SAAS,CAAC;EAGrD;AACF;EACEM,WAAWA,CAACC,IAAY,EAAE;IACxB,KAAK,CAACA,IAAI,EAAE,CAAC,CAAC,CAAC;IAACC,eAAA;EAClB;;EAEA;AACF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AE;MACvDC,QAAQ,CAACL,IAAI,CAAC,GAAGM,cAAc,CAAC;IAClC;IAEA,OAAOD,QAAQ;EACjB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentConfiguration.js","names":["ContentConfigurationQuestions","ContentConfigurationResults","ContentConfigurationEndResults","ContentConfiguration","constructor","contentConfiguration","_config","questions","isConfiguredIntermediateResultAttribute","attributeKey","intermediateResults","attributes","isConfiguredEndResultAttribute","endResults","config","some","item","results"],"sources":["../../../src/models/contentconfiguration/ContentConfiguration.js"],"sourcesContent":["// @flow\nimport ContentConfigurationQuestions from \"./ContentConfigurationQuestions\";\nimport ContentConfigurationResults from \"./ContentConfigurationResults\";\nimport ContentConfigurationEndResults from \"./ContentConfigurationEndResults\";\n\n/**\n * Content definition for questions, results, given answers etc.\n * Mostly maps to the Instrument questions configuration of Be Informed\n */\nexport default class ContentConfiguration {\n _config: Object;\n\n /**\n */\n constructor(contentConfiguration: Object) {\n this._config = contentConfiguration || null;\n }\n\n /**\n */\n get questions(): null | ContentConfigurationQuestions {\n if (this._config === null || !this._config.questions) {\n return null;\n }\n\n return new ContentConfigurationQuestions(this._config.questions);\n }\n\n /**\n */\n isConfiguredIntermediateResultAttribute(attributeKey: string): boolean {\n if (this.intermediateResults === null) {\n return false;\n }\n\n return this.intermediateResults.attributes.includes(attributeKey);\n }\n\n /**\n */\n get intermediateResults(): null | ContentConfigurationResults {\n if (this._config === null || !this._config.intermediateResults) {\n return null;\n }\n\n return new ContentConfigurationResults(this._config.intermediateResults);\n }\n\n /**\n */\n isConfiguredEndResultAttribute(attributeKey: string): boolean {\n if (this.endResults === null) {\n return false;\n }\n\n return this.endResults.config.some((item) =>\n item.attributes.includes(attributeKey)\n );\n }\n\n /**\n */\n get endResults(): null | ContentConfigurationEndResults {\n if (this._config === null || !this._config.results) {\n return null;\n }\n\n return new ContentConfigurationEndResults(this._config.results);\n }\n}\n"],"mappings":";;AACA,OAAOA,6BAA6B,MAAM,iCAAiC;AAC3E,OAAOC,2BAA2B,MAAM,+BAA+B;AACvE,OAAOC,8BAA8B,MAAM,kCAAkC;;AAE7E;AACA;AACA;AACA;AACA,eAAe,MAAMC,oBAAoB,CAAC;EAGxC;AACF;EACEC,
|
|
1
|
+
{"version":3,"file":"ContentConfiguration.js","names":["ContentConfigurationQuestions","ContentConfigurationResults","ContentConfigurationEndResults","ContentConfiguration","constructor","contentConfiguration","_defineProperty","_config","questions","isConfiguredIntermediateResultAttribute","attributeKey","_context","intermediateResults","_includesInstanceProperty","attributes","call","isConfiguredEndResultAttribute","endResults","config","some","item","_context2","results"],"sources":["../../../src/models/contentconfiguration/ContentConfiguration.js"],"sourcesContent":["// @flow\nimport ContentConfigurationQuestions from \"./ContentConfigurationQuestions\";\nimport ContentConfigurationResults from \"./ContentConfigurationResults\";\nimport ContentConfigurationEndResults from \"./ContentConfigurationEndResults\";\n\n/**\n * Content definition for questions, results, given answers etc.\n * Mostly maps to the Instrument questions configuration of Be Informed\n */\nexport default class ContentConfiguration {\n _config: Object;\n\n /**\n */\n constructor(contentConfiguration: Object) {\n this._config = contentConfiguration || null;\n }\n\n /**\n */\n get questions(): null | ContentConfigurationQuestions {\n if (this._config === null || !this._config.questions) {\n return null;\n }\n\n return new ContentConfigurationQuestions(this._config.questions);\n }\n\n /**\n */\n isConfiguredIntermediateResultAttribute(attributeKey: string): boolean {\n if (this.intermediateResults === null) {\n return false;\n }\n\n return this.intermediateResults.attributes.includes(attributeKey);\n }\n\n /**\n */\n get intermediateResults(): null | ContentConfigurationResults {\n if (this._config === null || !this._config.intermediateResults) {\n return null;\n }\n\n return new ContentConfigurationResults(this._config.intermediateResults);\n }\n\n /**\n */\n isConfiguredEndResultAttribute(attributeKey: string): boolean {\n if (this.endResults === null) {\n return false;\n }\n\n return this.endResults.config.some((item) =>\n item.attributes.includes(attributeKey)\n );\n }\n\n /**\n */\n get endResults(): null | ContentConfigurationEndResults {\n if (this._config === null || !this._config.results) {\n return null;\n }\n\n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AAI,CAAEC,IAAI;MAAA,IAAAC,SAAA;MAAA,OACtCR,yBAAA,CAAAQ,SAAA,GAAAD,IAAI,CAACN,UAAU,EAAAC,IAAA,CAAAM,SAAA,EAAUX,YAAY,CAAC;IAAA,EACvC;EACH;;EAEA;AACF;EACE,IAAIO,UAAUA,CAAA,EAA0C;IACtD,IAAI,IAAI,CAACV,OAAO,KAAK,IAAI,IAAI,CAAC,IAAI,CAACA,OAAO,CAACe,OAAO,EAAE;MAClD,OAAO,IAAI;IACb;IAEA,OAAO,IAAIpB,8BAA8B,CAAC,IAAI,CAACK,OAAO,CAACe,OAAO,CAAC;EACjE;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentConfigurationElements.js","names":["LayoutHintCollection","ContentConfigurationElements","constructor","elementConfiguration","_hasConfiguration","_elementConfiguration","includeLayoutHints","hints","contentIncludeLayoutHint","elementConfig","key","config","layouthint","some","hint","excludeLayoutHints","contentExcludeLayoutHint","type","label","types","labelTypes","propertyTypes","sectionReferenceTypes","textFragmentTypes","icon","hasConfig","hasContent","configElement","hasLayoutHint","has","byTypes","length","labelConfig","getAllSectionReferenceTypes","sectionReferences","item","forEach","push","getContentElementConfigBySectionReferenceType"],"sources":["../../../src/models/contentconfiguration/ContentConfigurationElements.js"],"sourcesContent":["// @flow\nimport LayoutHintCollection from \"../layouthint/LayoutHintCollection\";\n\n/**\n * Get element configuration of instrument questions\n */\nclass ContentConfigurationElements {\n _hasConfiguration: boolean;\n _elementConfiguration: Array<Object>;\n\n /**\n */\n constructor(elementConfiguration: ?Array<Object>) {\n this._hasConfiguration = elementConfiguration != null;\n this._elementConfiguration =\n elementConfiguration == null ? [] : elementConfiguration;\n }\n\n /**\n */\n includeLayoutHints(hints: Array<string>): ContentConfigurationElements {\n const contentIncludeLayoutHint = this._elementConfiguration.filter(\n (elementConfig) => {\n const [key] = Object.keys(elementConfig);\n const config = elementConfig[key];\n\n if (!config || !config.layouthint) {\n return false;\n }\n\n return config.layouthint.some((hint) => hints.includes(hint));\n }\n );\n\n return new ContentConfigurationElements(contentIncludeLayoutHint);\n }\n\n /**\n */\n excludeLayoutHints(hints: Array<string>): ContentConfigurationElements {\n const contentExcludeLayoutHint = this._elementConfiguration.filter(\n (elementConfig) => {\n const [key] = Object.keys(elementConfig);\n const config = elementConfig[key];\n\n if (!config) {\n return false;\n } else if (!config.layouthint) {\n return true;\n }\n\n return !config.layouthint.some((hint) => hints.includes(hint));\n }\n );\n\n return new ContentConfigurationElements(contentExcludeLayoutHint);\n }\n\n /**\n */\n get config(): Array<Object> {\n return this._elementConfiguration.map((elementConfig) => {\n const [key] = Object.keys(elementConfig);\n const config = elementConfig[key];\n\n if (!config) {\n return {};\n }\n\n return {\n type: key,\n label: config.label,\n types:\n config.labelTypes ||\n config.propertyTypes ||\n config.sectionReferenceTypes ||\n config.textFragmentTypes,\n layouthint: new LayoutHintCollection(config.layouthint),\n icon: config.icon || \"\",\n };\n });\n }\n\n /**\n */\n hasConfig(): boolean {\n return this._hasConfiguration;\n }\n\n /**\n */\n hasContent(): boolean {\n return this.config.some(\n (configElement) => configElement.type === \"contentElement\"\n );\n }\n\n /**\n * Retrieve if the configuration has an element that has a specific layouthint,\n * makes it easy to indicate that the content needs to be presented in a certain way.\n */\n hasLayoutHint(hint: string): boolean {\n return this.config.some((configElement) =>\n configElement.layouthint.has(hint)\n );\n }\n\n /**\n * Returns config elements by given types\n */\n byTypes(types: Array<string> = []): Array<Object> {\n if (!types || types.length === 0) {\n return this.config;\n }\n\n return this.config.filter((config) => types.includes(config.type));\n }\n\n /**\n * Get label config elements\n */\n get labelConfig(): Array<Object> {\n return this.config.filter((config) => config.type === \"labelElement\");\n }\n\n /**\n * Get all section reference types\n */\n getAllSectionReferenceTypes(): Array<any> {\n const sectionReferences = [];\n\n this.config\n .filter((item) => item.type === \"contentElement\")\n .forEach((item) => {\n sectionReferences.push(...item.types);\n });\n\n return sectionReferences;\n }\n\n /**\n * Retrieve all content element configuration by content type\n */\n getContentElementConfigBySectionReferenceType(type: string): Array<Object> {\n return this.config.filter(\n (config) =>\n config.type === \"contentElement\" && config.types.includes(type)\n );\n }\n}\n\nexport default ContentConfigurationElements;\n"],"mappings":";;;;;AACA,OAAOA,oBAAoB,MAAM,oCAAoC;;AAErE;AACA;AACA;AACA,MAAMC,4BAA4B,CAAC;EAIjC;AACF;EACEC,
|
|
1
|
+
{"version":3,"file":"ContentConfigurationElements.js","names":["LayoutHintCollection","ContentConfigurationElements","constructor","elementConfiguration","_defineProperty","_hasConfiguration","_elementConfiguration","includeLayoutHints","hints","_context","contentIncludeLayoutHint","_filterInstanceProperty","call","elementConfig","key","_Object$keys","config","layouthint","some","hint","_includesInstanceProperty","excludeLayoutHints","_context2","contentExcludeLayoutHint","_context3","_mapInstanceProperty","type","label","types","labelTypes","propertyTypes","sectionReferenceTypes","textFragmentTypes","icon","hasConfig","hasContent","configElement","hasLayoutHint","has","byTypes","_context4","arguments","length","undefined","labelConfig","_context5","getAllSectionReferenceTypes","_context6","sectionReferences","item","forEach","push","getContentElementConfigBySectionReferenceType","_context7","_context8"],"sources":["../../../src/models/contentconfiguration/ContentConfigurationElements.js"],"sourcesContent":["// @flow\nimport LayoutHintCollection from \"../layouthint/LayoutHintCollection\";\n\n/**\n * Get element configuration of instrument questions\n */\nclass ContentConfigurationElements {\n _hasConfiguration: boolean;\n _elementConfiguration: Array<Object>;\n\n /**\n */\n constructor(elementConfiguration: ?Array<Object>) {\n this._hasConfiguration = elementConfiguration != null;\n this._elementConfiguration =\n elementConfiguration == null ? [] : elementConfiguration;\n }\n\n /**\n */\n includeLayoutHints(hints: Array<string>): ContentConfigurationElements {\n const contentIncludeLayoutHint = this._elementConfiguration.filter(\n (elementConfig) => {\n const [key] = Object.keys(elementConfig);\n const config = elementConfig[key];\n\n if (!config || !config.layouthint) {\n return false;\n }\n\n return config.layouthint.some((hint) => hints.includes(hint));\n }\n );\n\n return new ContentConfigurationElements(contentIncludeLayoutHint);\n }\n\n /**\n */\n excludeLayoutHints(hints: Array<string>): ContentConfigurationElements {\n const contentExcludeLayoutHint = this._elementConfiguration.filter(\n (elementConfig) => {\n const [key] = Object.keys(elementConfig);\n const config = elementConfig[key];\n\n if (!config) {\n return false;\n } else if (!config.layouthint) {\n return true;\n }\n\n return !config.layouthint.some((hint) => hints.includes(hint));\n }\n );\n\n return new ContentConfigurationElements(contentExcludeLayoutHint);\n }\n\n /**\n */\n get config(): Array<Object> {\n return this._elementConfiguration.map((elementConfig) => {\n const [key] = Object.keys(elementConfig);\n const config = elementConfig[key];\n\n if (!config) {\n return {};\n }\n\n return {\n type: key,\n label: config.label,\n types:\n config.labelTypes ||\n config.propertyTypes ||\n config.sectionReferenceTypes ||\n config.textFragmentTypes,\n layouthint: new LayoutHintCollection(config.layouthint),\n icon: config.icon || \"\",\n };\n });\n }\n\n /**\n */\n hasConfig(): boolean {\n return this._hasConfiguration;\n }\n\n /**\n */\n hasContent(): boolean {\n return this.config.some(\n (configElement) => configElement.type === \"contentElement\"\n );\n }\n\n /**\n * Retrieve if the configuration has an element that has a specific layouthint,\n * makes it easy to indicate that the content needs to be presented in a certain way.\n */\n hasLayoutHint(hint: string): boolean {\n return this.config.some((configElement) =>\n configElement.layouthint.has(hint)\n );\n }\n\n /**\n * Returns config elements by given types\n */\n byTypes(types: Array<string> = []): Array<Object> {\n if (!types || types.length === 0) {\n return this.config;\n }\n\n return this.config.filter((config) => types.includes(config.type));\n }\n\n /**\n * Get label config elements\n */\n get labelConfig(): Array<Object> {\n return this.config.filter((config) => config.type === \"labelElement\");\n }\n\n /**\n * Get all section reference types\n */\n getAllSectionReferenceTypes(): Array<any> {\n const sectionReferences = [];\n\n this.config\n .filter((item) => item.type === \"contentElement\")\n .forEach((item) => {\n sectionReferences.push(...item.types);\n });\n\n return sectionReferences;\n }\n\n /**\n * Retrieve all content element configuration by content type\n */\n getContentElementConfigBySectionReferenceType(type: string): Array<Object> {\n return this.config.filter(\n (config) =>\n config.type === \"contentElement\" && config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,CAAC;IACvC,CAAC,CAAC;IAEJ,OAAOoB,iBAAiB;EAC1B;;EAEA;AACF;AACA;EACEI,6CAA6CA,CAAC1B,IAAY,EAAiB;IAAA,IAAA2B,SAAA;IACzE,OAAO1C,uBAAA,CAAA0C,SAAA,OAAI,CAACrC,MAAM,EAAAJ,IAAA,CAAAyC,SAAA,EACfrC,MAAM;MAAA,IAAAsC,SAAA;MAAA,OACLtC,MAAM,CAACU,IAAI,KAAK,gBAAgB,IAAIN,yBAAA,CAAAkC,SAAA,GAAAtC,MAAM,CAACY,KAAK,EAAAhB,IAAA,CAAA0C,SAAA,EAAU5B,IAAI,CAAC;IAAA,EAClE;EACH;AACF;AAEA,eAAezB,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentConfigurationEndResults.js","names":["ContentConfigurationResults","ContentConfigurationEndResults","constructor","configuration","_configuration","config","configElement","key","getContentConfigurationElementsForAttribute","attributeKey","item","attributes"],"sources":["../../../src/models/contentconfiguration/ContentConfigurationEndResults.js"],"sourcesContent":["// @flow\nimport ContentConfigurationResults from \"./ContentConfigurationResults\";\n\n/**\n */\nclass ContentConfigurationEndResults {\n _configuration: Array<Object>;\n\n /**\n */\n constructor(configuration: Array<Object>) {\n this._configuration = configuration || [];\n }\n\n /**\n */\n get config(): Array<ContentConfigurationResults> {\n return this._configuration\n .filter((configElement) => {\n const [key] = Object.keys(configElement);\n\n return (\n key === \"decisionResult\" ||\n key === \"classificationResult\" ||\n key === \"calculatorResult\"\n );\n })\n .map((configElement) => {\n const [key] = Object.keys(configElement);\n return new ContentConfigurationResults(configElement[key]);\n });\n }\n\n /**\n */\n getContentConfigurationElementsForAttribute(\n attributeKey: string\n ): ContentConfigurationResults | null {\n return (\n this.config.find((item) => item.attributes.includes(attributeKey)) || null\n );\n }\n}\n\nexport default ContentConfigurationEndResults;\n"],"mappings":";;;;;;AACA,OAAOA,2BAA2B,MAAM,+BAA+B;;AAEvE;AACA;AACA,MAAMC,8BAA8B,CAAC;EAGnC;AACF;EACEC,
|
|
1
|
+
{"version":3,"file":"ContentConfigurationEndResults.js","names":["ContentConfigurationResults","ContentConfigurationEndResults","constructor","configuration","_defineProperty","_configuration","config","_context","_context2","_mapInstanceProperty","_filterInstanceProperty","call","configElement","key","_Object$keys","getContentConfigurationElementsForAttribute","attributeKey","_context3","_findInstanceProperty","item","_context4","_includesInstanceProperty","attributes"],"sources":["../../../src/models/contentconfiguration/ContentConfigurationEndResults.js"],"sourcesContent":["// @flow\nimport ContentConfigurationResults from \"./ContentConfigurationResults\";\n\n/**\n */\nclass ContentConfigurationEndResults {\n _configuration: Array<Object>;\n\n /**\n */\n constructor(configuration: Array<Object>) {\n this._configuration = configuration || [];\n }\n\n /**\n */\n get config(): Array<ContentConfigurationResults> {\n return this._configuration\n .filter((configElement) => {\n const [key] = Object.keys(configElement);\n\n return (\n key === \"decisionResult\" ||\n key === \"classificationResult\" ||\n key === \"calculatorResult\"\n );\n })\n .map((configElement) => {\n const [key] = Object.keys(configElement);\n return new ContentConfigurationResults(configElement[key]);\n });\n }\n\n /**\n */\n getContentConfigurationElementsForAttribute(\n attributeKey: string\n ): ContentConfigurationResults | null {\n return (\n this.config.find((item) => item.attributes.includes(attributeKey)) || null\n );\n }\n}\n\nexport default ContentConfigurationEndResults;\n"],"mappings":";;;;;;AACA,OAAOA,2BAA2B,MAAM,+BAA+B;;AAEvE;AACA;AACA,MAAMC,8BAA8B,CAAC;EAGnC;AACF;EACEC,WAAWA,CAACC,aAA4B,EAAE;IAAAC,eAAA;IACxC,IAAI,CAACC,cAAc,GAAGF,aAAa,IAAI,EAAE;EAC3C;;EAEA;AACF;EACE,IAAIG,MAAMA,CAAA,EAAuC;IAAA,IAAAC,QAAA,EAAAC,SAAA;IAC/C,OAAOC,oBAAA,CAAAF,QAAA,GAAAG,uBAAA,CAAAF,SAAA,OAAI,CAACH,cAAc,EAAAM,IAAA,CAAAH,SAAA,EACfI,aAAa,IAAK;MACzB,MAAM,CAACC,GAAG,CAAC,GAAGC,YAAA,CAAYF,aAAa,CAAC;MAExC,OACEC,GAAG,KAAK,gBAAgB,IACxBA,GAAG,KAAK,sBAAsB,IAC9BA,GAAG,KAAK,kBAAkB;IAE9B,CAAC,CAAC,EAAAF,IAAA,CAAAJ,QAAA,EACIK,aAAa,IAAK;MACtB,MAAM,CAACC,GAAG,CAAC,GAAGC,YAAA,CAAYF,aAAa,CAAC;MACxC,OAAO,IAAIZ,2BAA2B,CAACY,aAAa,CAACC,GAAG,CAAC,CAAC;IAC5D,CAAC,CAAC;EACN;;EAEA;AACF;EACEE,2CAA2CA,CACzCC,YAAoB,EACgB;IAAA,IAAAC,SAAA;IACpC,OACEC,qBAAA,CAAAD,SAAA,OAAI,CAACX,MAAM,EAAAK,IAAA,CAAAM,SAAA,EAAOE,IAAI;MAAA,IAAAC,SAAA;MAAA,OAAKC,yBAAA,CAAAD,SAAA,GAAAD,IAAI,CAACG,UAAU,EAAAX,IAAA,CAAAS,SAAA,EAAUJ,YAAY,CAAC;IAAA,EAAC,IAAI,IAAI;EAE9E;AACF;AAEA,eAAef,8BAA8B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentConfigurationQuestions.js","names":["ContentConfigurationElements","ContentConfigurationQuestions","constructor","configuration","_configuration","hasConfig","question","options","answers","questionElements","optionElements","givenAnswerElements"],"sources":["../../../src/models/contentconfiguration/ContentConfigurationQuestions.js"],"sourcesContent":["// @flow\nimport ContentConfigurationElements from \"./ContentConfigurationElements\";\n\n/**\n */\nclass ContentConfigurationQuestions {\n _configuration: Object;\n\n /**\n */\n constructor(configuration: Object) {\n this._configuration = configuration || null;\n }\n\n /**\n */\n hasConfig(): boolean {\n return (\n this.question.hasConfig() ||\n this.options.hasConfig() ||\n this.answers.hasConfig()\n );\n }\n\n /**\n */\n get question(): ContentConfigurationElements {\n if (this._configuration === null) {\n return new ContentConfigurationElements([]);\n }\n\n return new ContentConfigurationElements(\n this._configuration.questionElements\n );\n }\n\n /**\n */\n get options(): ContentConfigurationElements {\n if (this._configuration === null) {\n return new ContentConfigurationElements([]);\n }\n\n return new ContentConfigurationElements(this._configuration.optionElements);\n }\n\n /**\n */\n get answers(): ContentConfigurationElements {\n if (this._configuration === null) {\n return new ContentConfigurationElements([]);\n }\n\n return new ContentConfigurationElements(\n this._configuration.givenAnswerElements\n );\n }\n}\n\nexport default ContentConfigurationQuestions;\n"],"mappings":";AACA,OAAOA,4BAA4B,MAAM,gCAAgC;;AAEzE;AACA;AACA,MAAMC,6BAA6B,CAAC;EAGlC;AACF;EACEC,
|
|
1
|
+
{"version":3,"file":"ContentConfigurationQuestions.js","names":["ContentConfigurationElements","ContentConfigurationQuestions","constructor","configuration","_defineProperty","_configuration","hasConfig","question","options","answers","questionElements","optionElements","givenAnswerElements"],"sources":["../../../src/models/contentconfiguration/ContentConfigurationQuestions.js"],"sourcesContent":["// @flow\nimport ContentConfigurationElements from \"./ContentConfigurationElements\";\n\n/**\n */\nclass ContentConfigurationQuestions {\n _configuration: Object;\n\n /**\n */\n constructor(configuration: Object) {\n this._configuration = configuration || null;\n }\n\n /**\n */\n hasConfig(): boolean {\n return (\n this.question.hasConfig() ||\n this.options.hasConfig() ||\n this.answers.hasConfig()\n );\n }\n\n /**\n */\n get question(): ContentConfigurationElements {\n if (this._configuration === null) {\n return new ContentConfigurationElements([]);\n }\n\n return new ContentConfigurationElements(\n this._configuration.questionElements\n );\n }\n\n /**\n */\n get options(): ContentConfigurationElements {\n if (this._configuration === null) {\n return new ContentConfigurationElements([]);\n }\n\n return new ContentConfigurationElements(this._configuration.optionElements);\n }\n\n /**\n */\n get answers(): ContentConfigurationElements {\n if (this._configuration === null) {\n return new ContentConfigurationElements([]);\n }\n\n return new ContentConfigurationElements(\n this._configuration.givenAnswerElements\n );\n }\n}\n\nexport default ContentConfigurationQuestions;\n"],"mappings":";AACA,OAAOA,4BAA4B,MAAM,gCAAgC;;AAEzE;AACA;AACA,MAAMC,6BAA6B,CAAC;EAGlC;AACF;EACEC,WAAWA,CAACC,aAAqB,EAAE;IAAAC,eAAA;IACjC,IAAI,CAACC,cAAc,GAAGF,aAAa,IAAI,IAAI;EAC7C;;EAEA;AACF;EACEG,SAASA,CAAA,EAAY;IACnB,OACE,IAAI,CAACC,QAAQ,CAACD,SAAS,EAAE,IACzB,IAAI,CAACE,OAAO,CAACF,SAAS,EAAE,IACxB,IAAI,CAACG,OAAO,CAACH,SAAS,EAAE;EAE5B;;EAEA;AACF;EACE,IAAIC,QAAQA,CAAA,EAAiC;IAC3C,IAAI,IAAI,CAACF,cAAc,KAAK,IAAI,EAAE;MAChC,OAAO,IAAIL,4BAA4B,CAAC,EAAE,CAAC;IAC7C;IAEA,OAAO,IAAIA,4BAA4B,CACrC,IAAI,CAACK,cAAc,CAACK,gBAAgB,CACrC;EACH;;EAEA;AACF;EACE,IAAIF,OAAOA,CAAA,EAAiC;IAC1C,IAAI,IAAI,CAACH,cAAc,KAAK,IAAI,EAAE;MAChC,OAAO,IAAIL,4BAA4B,CAAC,EAAE,CAAC;IAC7C;IAEA,OAAO,IAAIA,4BAA4B,CAAC,IAAI,CAACK,cAAc,CAACM,cAAc,CAAC;EAC7E;;EAEA;AACF;EACE,IAAIF,OAAOA,CAAA,EAAiC;IAC1C,IAAI,IAAI,CAACJ,cAAc,KAAK,IAAI,EAAE;MAChC,OAAO,IAAIL,4BAA4B,CAAC,EAAE,CAAC;IAC7C;IAEA,OAAO,IAAIA,4BAA4B,CACrC,IAAI,CAACK,cAAc,CAACO,mBAAmB,CACxC;EACH;AACF;AAEA,eAAeX,6BAA6B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentConfigurationResults.js","names":["ContentConfigurationElements","LayoutHintCollection","isPlainObject","ContentConfigurationResults","constructor","configuration","_configuration","_layouthint","layouthint","label","description","message","attributes","all","hint","substring","length","getFormConfigElement","elementKey","configElement","calculatedResultElements","positiveResultElements","negativeResultElements","resultElements"],"sources":["../../../src/models/contentconfiguration/ContentConfigurationResults.js"],"sourcesContent":["// @flow\nimport ContentConfigurationElements from \"./ContentConfigurationElements\";\nimport LayoutHintCollection from \"../layouthint/LayoutHintCollection\";\nimport { isPlainObject } from \"../../utils\";\n\n/**\n */\nclass ContentConfigurationResults {\n _configuration: Object;\n _layouthint: LayoutHintCollection;\n\n /**\n */\n constructor(configuration: Object) {\n this._configuration = configuration || null;\n\n this._layouthint = new LayoutHintCollection(configuration?.layouthint);\n }\n\n /**\n */\n get label(): string | null {\n if (this._configuration === null) {\n return null;\n }\n\n return this._configuration.label;\n }\n\n /**\n */\n get description(): string | null {\n if (this._configuration === null) {\n return null;\n }\n\n const description = this._configuration.description;\n if (isPlainObject(description) && \"message\" in description) {\n return description.message;\n }\n\n return description;\n }\n\n /**\n */\n get attributes(): Array<string> {\n if (this._configuration === null) {\n return [];\n }\n\n // An issue with mapped attributes is giving us the wrong attribute keys in the attributes property\n // as a temporary fix a layouthint with the correct mapped attribute key can be set in the configuration of the end results\n return [\n ...this._configuration.attributes,\n ...this.layouthint.all\n .filter((hint) => hint.includes(\"attribute:\"))\n .map((hint) => hint.substring(\"attribute:\".length)),\n ];\n }\n\n /**\n */\n getFormConfigElement(elementKey: string): ContentConfigurationElements {\n if (this._configuration === null) {\n return new ContentConfigurationElements([]);\n }\n\n const configElement = this._configuration[elementKey];\n\n return new ContentConfigurationElements(configElement);\n }\n\n /**\n */\n get calculatedResultElements(): ContentConfigurationElements {\n return this.getFormConfigElement(\"calculatedResultElements\");\n }\n\n /**\n */\n get positiveResultElements(): ContentConfigurationElements {\n return this.getFormConfigElement(\"positiveResultElements\");\n }\n\n /**\n */\n get negativeResultElements(): ContentConfigurationElements {\n return this.getFormConfigElement(\"negativeResultElements\");\n }\n\n /**\n */\n get resultElements(): ContentConfigurationElements {\n return this.getFormConfigElement(\"resultElements\");\n }\n\n /**\n */\n get layouthint(): LayoutHintCollection {\n return this._layouthint;\n }\n}\n\nexport default ContentConfigurationResults;\n"],"mappings":";;;;AACA,OAAOA,4BAA4B,MAAM,gCAAgC;AACzE,OAAOC,oBAAoB,MAAM,oCAAoC;AACrE,SAASC,aAAa,QAAQ,aAAa;;AAE3C;AACA;AACA,MAAMC,2BAA2B,CAAC;EAIhC;AACF;EACEC,
|
|
1
|
+
{"version":3,"file":"ContentConfigurationResults.js","names":["ContentConfigurationElements","LayoutHintCollection","isPlainObject","ContentConfigurationResults","constructor","configuration","_defineProperty","_configuration","_layouthint","layouthint","label","description","message","attributes","_context","_context2","_mapInstanceProperty","_filterInstanceProperty","all","call","hint","_includesInstanceProperty","substring","length","getFormConfigElement","elementKey","configElement","calculatedResultElements","positiveResultElements","negativeResultElements","resultElements"],"sources":["../../../src/models/contentconfiguration/ContentConfigurationResults.js"],"sourcesContent":["// @flow\nimport ContentConfigurationElements from \"./ContentConfigurationElements\";\nimport LayoutHintCollection from \"../layouthint/LayoutHintCollection\";\nimport { isPlainObject } from \"../../utils\";\n\n/**\n */\nclass ContentConfigurationResults {\n _configuration: Object;\n _layouthint: LayoutHintCollection;\n\n /**\n */\n constructor(configuration: Object) {\n this._configuration = configuration || null;\n\n this._layouthint = new LayoutHintCollection(configuration?.layouthint);\n }\n\n /**\n */\n get label(): string | null {\n if (this._configuration === null) {\n return null;\n }\n\n return this._configuration.label;\n }\n\n /**\n */\n get description(): string | null {\n if (this._configuration === null) {\n return null;\n }\n\n const description = this._configuration.description;\n if (isPlainObject(description) && \"message\" in description) {\n return description.message;\n }\n\n return description;\n }\n\n /**\n */\n get attributes(): Array<string> {\n if (this._configuration === null) {\n return [];\n }\n\n // An issue with mapped attributes is giving us the wrong attribute keys in the attributes property\n // as a temporary fix a layouthint with the correct mapped attribute key can be set in the configuration of the end results\n return [\n ...this._configuration.attributes,\n ...this.layouthint.all\n .filter((hint) => hint.includes(\"attribute:\"))\n .map((hint) => hint.substring(\"attribute:\".length)),\n ];\n }\n\n /**\n */\n getFormConfigElement(elementKey: string): ContentConfigurationElements {\n if (this._configuration === null) {\n return new ContentConfigurationElements([]);\n }\n\n const configElement = this._configuration[elementKey];\n\n return new ContentConfigurationElements(configElement);\n }\n\n /**\n */\n get calculatedResultElements(): ContentConfigurationElements {\n return this.getFormConfigElement(\"calculatedResultElements\");\n }\n\n /**\n */\n get positiveResultElements(): ContentConfigurationElements {\n return this.getFormConfigElement(\"positiveResultElements\");\n }\n\n /**\n */\n get negativeResultElements(): ContentConfigurationElements {\n return this.getFormConfigElement(\"negativeResultElements\");\n }\n\n /**\n */\n get resultElements(): ContentConfigurationElements {\n return this.getFormConfigElement(\"resultElements\");\n }\n\n /**\n */\n get layouthint(): LayoutHintCollection {\n return this._layouthint;\n }\n}\n\nexport default ContentConfigurationResults;\n"],"mappings":";;;;AACA,OAAOA,4BAA4B,MAAM,gCAAgC;AACzE,OAAOC,oBAAoB,MAAM,oCAAoC;AACrE,SAASC,aAAa,QAAQ,aAAa;;AAE3C;AACA;AACA,MAAMC,2BAA2B,CAAC;EAIhC;AACF;EACEC,WAAWA,CAACC,aAAqB,EAAE;IAAAC,eAAA;IAAAA,eAAA;IACjC,IAAI,CAACC,cAAc,GAAGF,aAAa,IAAI,IAAI;IAE3C,IAAI,CAACG,WAAW,GAAG,IAAIP,oBAAoB,CAACI,aAAa,EAAEI,UAAU,CAAC;EACxE;;EAEA;AACF;EACE,IAAIC,KAAKA,CAAA,EAAkB;IACzB,IAAI,IAAI,CAACH,cAAc,KAAK,IAAI,EAAE;MAChC,OAAO,IAAI;IACb;IAEA,OAAO,IAAI,CAACA,cAAc,CAACG,KAAK;EAClC;;EAEA;AACF;EACE,IAAIC,WAAWA,CAAA,EAAkB;IAC/B,IAAI,IAAI,CAACJ,cAAc,KAAK,IAAI,EAAE;MAChC,OAAO,IAAI;IACb;IAEA,MAAMI,WAAW,GAAG,IAAI,CAACJ,cAAc,CAACI,WAAW;IACnD,IAAIT,aAAa,CAACS,WAAW,CAAC,IAAI,SAAS,IAAIA,WAAW,EAAE;MAC1D,OAAOA,WAAW,CAACC,OAAO;IAC5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CAAC,gBAAgB,CAAC;EACpD;;EAEA;AACF;EACE,IAAIf,UAAUA,CAAA,EAAyB;IACrC,OAAO,IAAI,CAACD,WAAW;EACzB;AACF;AAEA,eAAeL,2BAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailModel.js","names":["has","ActionCollection","AttributeCollection","ResourceModel","TITLE","DetailModel","constructor","modularuiResponse","createAttributeCollection","createMetadataCollection","createActionCollection","type","modelName","isApplicableModel","data","resourceType","contributions","resourcetype","getInitialChildModelLinks","_attributeCollection","setChildModels","models","id","getData","key","label","getContribution","attributeContributions","attributes","contribution","attributeCollection","collection","all","attribute","layouthint","isHidden","getAttributeByKey","metadataContributions","metadata","metadataKey","metadataCollection","_metadataCollection","_actionCollection","actions","actionCollection","isCase","titleAttribute","getAttributeByLayoutHint","update","model","clonedModel","clone","equals","toString"],"sources":["../../../src/models/detail/DetailModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport ActionCollection from \"../actions/ActionCollection\";\nimport AttributeCollection from \"../attributes/AttributeCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport { TITLE } from \"../../constants/LayoutHints\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type { ModularUIModel, AttributeType } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * Base class for details<br/>\n * For instance the details of case 1<br/>\n * For instance the details of record 12<br/>\n */\nexport default class DetailModel extends ResourceModel {\n _attributeCollection: AttributeCollection;\n _metadataCollection: AttributeCollection;\n _actionCollection: ActionCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this.createAttributeCollection();\n this.createMetadataCollection();\n this.createActionCollection();\n }\n\n /**\n */\n get type(): string {\n return \"Detail\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"DetailModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n const resourceType = data.contributions?.resourcetype;\n return (\n resourceType &&\n (resourceType.endsWith(\"DetailPanel\") ||\n [\"Detail\", \"CasePropertiesPanel\", \"CasePropertiesPanelDetail\"].includes(\n resourceType\n ))\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this._attributeCollection.getInitialChildModelLinks();\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this._attributeCollection.setChildModels(models);\n }\n\n /**\n * Getting the unique identifier of the details\n */\n get id(): string {\n return this.getData(\"_id\", this.key);\n }\n\n /**\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Attribute collection\n */\n createAttributeCollection() {\n const attributeContributions = this.contributions.attributes\n ? this.contributions.attributes.filter((contribution) => {\n const [key] = Object.keys(contribution);\n return has(this.data, key);\n })\n : [];\n\n this.attributeCollection = new AttributeCollection(\n this.data,\n attributeContributions,\n true\n );\n }\n\n /**\n */\n get attributeCollection(): AttributeCollection {\n return this._attributeCollection;\n }\n\n /**\n */\n set attributeCollection(collection: AttributeCollection) {\n this._attributeCollection = collection;\n }\n\n /**\n * Retrieve list of visible attributes\n */\n get attributes(): Array<AttributeType> {\n return this.attributeCollection.all.filter(\n (attribute) => !attribute.layouthint.has(TITLE) && !attribute.isHidden\n );\n }\n\n /**\n * Retrieve an attribute by it's key\n */\n getAttributeByKey(key: string): AttributeType | null {\n return this._attributeCollection.getAttributeByKey(key);\n }\n\n /**\n * Metadata collection\n */\n createMetadataCollection() {\n const metadataContributions = this.contributions.metadata\n ? Object.keys(this.contributions.metadata).map((metadataKey) => ({\n [metadataKey]: this.contributions.metadata[metadataKey],\n }))\n : [];\n\n this.metadataCollection = new AttributeCollection(\n this.data,\n metadataContributions,\n true\n );\n }\n\n /**\n */\n get metadataCollection(): AttributeCollection {\n return this._metadataCollection;\n }\n\n /**\n */\n set metadataCollection(collection: AttributeCollection) {\n this._metadataCollection = collection;\n }\n\n /**\n * Action collection\n */\n createActionCollection() {\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n }\n\n /**\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n\n /**\n */\n set actionCollection(actionCollection: ActionCollection) {\n this._actionCollection = actionCollection;\n }\n\n /**\n * Determines if this is a case\n */\n get isCase(): boolean {\n return this.contributions.resourcetype === \"CaseView\";\n }\n\n /**\n * Getting the attribute that has as layout hint 'title'\n */\n get titleAttribute(): ?AttributeType {\n return this._attributeCollection.getAttributeByLayoutHint(TITLE);\n }\n\n /**\n * Update current detail with a new detail model and return a cloned version of the model\n */\n update(model: ModularUIModel): DetailModel {\n if (model instanceof DetailModel) {\n const clonedModel = this.clone();\n\n clonedModel.attributeCollection = model._attributeCollection;\n clonedModel.metadataCollection = model._metadataCollection;\n clonedModel.actionCollection = model._actionCollection;\n\n return clonedModel;\n }\n\n return this;\n }\n\n /**\n */\n equals(model: DetailModel): boolean {\n return this.id.toString() === model.id.toString();\n }\n}\n"],"mappings":";;;;;;AACA,SAASA,GAAG,QAAQ,6BAA6B;AAEjD,OAAOC,gBAAgB,MAAM,6BAA6B;AAC1D,OAAOC,mBAAmB,MAAM,mCAAmC;AACnE,OAAOC,aAAa,MAAM,uBAAuB;AAEjD,SAASC,KAAK,QAAQ,6BAA6B;AAMnD;AACA;AACA;AACA;AACA;AACA,eAAe,MAAMC,WAAW,SAASF,aAAa,CAAC;EAKrD;AACF;EACEG,WAAW,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC;IAAA;IAAA;IAEzB,IAAI,CAACC,yBAAyB,EAAE;IAChC,IAAI,CAACC,wBAAwB,EAAE;IAC/B,IAAI,CAACC,sBAAsB,EAAE;EAC/B;;EAEA;AACF;EACE,IAAIC,IAAI,GAAW;IACjB,OAAO,QAAQ;EACjB;;EAEA;AACF;EACE,WAAWC,SAAS,GAAW;IAC7B,OAAO,aAAa;EACtB;;EAEA;AACF;EACE,OAAOC,iBAAiB,CAACC,IAAuB,EAAW;IAAA;IACzD,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CAACF,iBAAiB,GAAGE,gBAAgB;EAC3C;;EAEA;AACF;AACA;EACE,IAAIC,MAAM,GAAY;IACpB,OAAO,IAAI,CAAC7B,aAAa,CAACC,YAAY,KAAK,UAAU;EACvD;;EAEA;AACF;AACA;EACE,IAAI6B,cAAc,GAAmB;IACnC,OAAO,IAAI,CAAC3B,oBAAoB,CAAC4B,wBAAwB,CAAC3C,KAAK,CAAC;EAClE;;EAEA;AACF;AACA;EACE4C,MAAM,CAACC,KAAqB,EAAe;IACzC,IAAIA,KAAK,YAAY5C,WAAW,EAAE;MAChC,MAAM6C,WAAW,GAAG,IAAI,CAACC,KAAK,EAAE;MAEhCD,WAAW,CAACpB,mBAAmB,GAAGmB,KAAK,CAAC9B,oBAAoB;MAC5D+B,WAAW,CAACV,kBAAkB,GAAGS,KAAK,CAACR,mBAAmB;MAC1DS,WAAW,CAACN,gBAAgB,GAAGK,KAAK,CAACP,iBAAiB;MAEtD,OAAOQ,WAAW;IACpB;IAEA,OAAO,IAAI;EACb;;EAEA;AACF;EACEE,MAAM,CAACH,KAAkB,EAAW;IAClC,OAAO,IAAI,CAAC3B,EAAE,CAAC+B,QAAQ,EAAE,KAAKJ,KAAK,CAAC3B,EAAE,CAAC+B,QAAQ,EAAE;EACnD;AACF"}
|
|
1
|
+
{"version":3,"file":"DetailModel.js","names":["has","ActionCollection","AttributeCollection","ResourceModel","TITLE","DetailModel","constructor","modularuiResponse","_defineProperty","createAttributeCollection","createMetadataCollection","createActionCollection","type","modelName","isApplicableModel","data","_context","resourceType","contributions","resourcetype","_endsWithInstanceProperty","call","_includesInstanceProperty","getInitialChildModelLinks","_attributeCollection","setChildModels","models","id","getData","key","label","getContribution","_context2","attributeContributions","attributes","_filterInstanceProperty","contribution","_Object$keys","attributeCollection","collection","_context3","all","attribute","layouthint","isHidden","getAttributeByKey","_context4","metadataContributions","metadata","_mapInstanceProperty","metadataKey","metadataCollection","_metadataCollection","_actionCollection","actions","actionCollection","isCase","titleAttribute","getAttributeByLayoutHint","update","model","clonedModel","clone","equals","toString"],"sources":["../../../src/models/detail/DetailModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport ActionCollection from \"../actions/ActionCollection\";\nimport AttributeCollection from \"../attributes/AttributeCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport { TITLE } from \"../../constants/LayoutHints\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type { ModularUIModel, AttributeType } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * Base class for details<br/>\n * For instance the details of case 1<br/>\n * For instance the details of record 12<br/>\n */\nexport default class DetailModel extends ResourceModel {\n _attributeCollection: AttributeCollection;\n _metadataCollection: AttributeCollection;\n _actionCollection: ActionCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this.createAttributeCollection();\n this.createMetadataCollection();\n this.createActionCollection();\n }\n\n /**\n */\n get type(): string {\n return \"Detail\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"DetailModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n const resourceType = data.contributions?.resourcetype;\n return (\n resourceType &&\n (resourceType.endsWith(\"DetailPanel\") ||\n [\"Detail\", \"CasePropertiesPanel\", \"CasePropertiesPanelDetail\"].includes(\n resourceType\n ))\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this._attributeCollection.getInitialChildModelLinks();\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this._attributeCollection.setChildModels(models);\n }\n\n /**\n * Getting the unique identifier of the details\n */\n get id(): string {\n return this.getData(\"_id\", this.key);\n }\n\n /**\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Attribute collection\n */\n createAttributeCollection() {\n const attributeContributions = this.contributions.attributes\n ? this.contributions.attributes.filter((contribution) => {\n const [key] = Object.keys(contribution);\n return has(this.data, key);\n })\n : [];\n\n this.attributeCollection = new AttributeCollection(\n this.data,\n attributeContributions,\n true\n );\n }\n\n /**\n */\n get attributeCollection(): AttributeCollection {\n return this._attributeCollection;\n }\n\n /**\n */\n set attributeCollection(collection: AttributeCollection) {\n this._attributeCollection = collection;\n }\n\n /**\n * Retrieve list of visible attributes\n */\n get attributes(): Array<AttributeType> {\n return this.attributeCollection.all.filter(\n (attribute) => !attribute.layouthint.has(TITLE) && !attribute.isHidden\n );\n }\n\n /**\n * Retrieve an attribute by it's key\n */\n getAttributeByKey(key: string): AttributeType | null {\n return this._attributeCollection.getAttributeByKey(key);\n }\n\n /**\n * Metadata collection\n */\n createMetadataCollection() {\n const metadataContributions = this.contributions.metadata\n ? Object.keys(this.contributions.metadata).map((metadataKey) => ({\n [metadataKey]: this.contributions.metadata[metadataKey],\n }))\n : [];\n\n this.metadataCollection = new AttributeCollection(\n this.data,\n metadataContributions,\n true\n );\n }\n\n /**\n */\n get metadataCollection(): AttributeCollection {\n return this._metadataCollection;\n }\n\n /**\n */\n set metadataCollection(collection: AttributeCollection) {\n this._metadataCollection = collection;\n }\n\n /**\n * Action collection\n */\n createActionCollection() {\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n }\n\n /**\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n\n /**\n */\n set actionCollection(actionCollection: ActionCollection) {\n this._actionCollection = actionCollection;\n }\n\n /**\n * Determines if this is a case\n */\n get isCase(): boolean {\n return this.contributions.resourcetype === \"CaseView\";\n }\n\n /**\n * Getting the attribute that has as layout hint 'title'\n */\n get titleAttribute(): ?AttributeType {\n return this._attributeCollection.getAttributeByLayoutHint(TITLE);\n }\n\n /**\n * Update current detail with a new detail model and return a cloned version of the model\n */\n update(model: ModularUIModel): DetailModel {\n if (model instanceof DetailModel) {\n const clonedModel = this.clone();\n\n clonedModel.attributeCollection = model._attributeCollection;\n clonedModel.metadataCollection = model._metadataCollection;\n clonedModel.actionCollection = model._actionCollection;\n\n return clonedModel;\n }\n\n return this;\n }\n\n /**\n */\n equals(model: DetailModel): boolean {\n return this.id.toString() === model.id.toString();\n }\n}\n"],"mappings":";;;;;;AACA,SAASA,GAAG,QAAQ,6BAA6B;AAEjD,OAAOC,gBAAgB,MAAM,6BAA6B;AAC1D,OAAOC,mBAAmB,MAAM,mCAAmC;AACnE,OAAOC,aAAa,MAAM,uBAAuB;AAEjD,SAASC,KAAK,QAAQ,6BAA6B;AAMnD;AACA;AACA;AACA;AACA;AACA,eAAe,MAAMC,WAAW,SAASF,aAAa,CAAC;EAKrD;AACF;EACEG,WAAWA,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAACC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAEzB,IAAI,CAACC,yBAAyB,EAAE;IAChC,IAAI,CAACC,wBAAwB,EAAE;IAC/B,IAAI,CAACC,sBAAsB,EAAE;EAC/B;;EAEA;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,QAAQ;EACjB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,aAAa;EACtB;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACC,IAAuB,EAAW;IAAA,IAAAC,QAAA;IACzD,MAAMC,YAAY,GAAGF,IAAI,CAACG,aAAa,EAAEC,YAAY;IACrD,OACEF,YAAY,KACXG,yBAAA,CAAAH,YAAY,EAAAI,IAAA,CAAZJ,YAAY,EAAU,aAAa,CAAC,IACnCK,yBAAA,CAAAN,QAAA,IAAC,QAAQ,EAAE,qBAAqB,EAAE,2BAA2B,CAAC,EAAAK,IAAA,CAAAL,QAAA,EAC5DC,YAAY,CACb,CAAC;EAER;;EAEA;AACF;EACEM,yBAAyBA,CAAA,EAAqB;IAC5C,OAAO,IAAI,CAACC,oBAAoB,CAACD,yBAAyB,EAAE;EAC9D;;EAEA;AACF;EACEE,cAAcA,CAACC,MAA6B,EAAE;IAC5C,IAAI,CAACF,oBAAoB,CAACC,cAA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,CAACtC,aAAa,CAACC,YAAY,KAAK,UAAU;EACvD;;EAEA;AACF;AACA;EACE,IAAIsC,cAAcA,CAAA,EAAmB;IACnC,OAAO,IAAI,CAACjC,oBAAoB,CAACkC,wBAAwB,CAACtD,KAAK,CAAC;EAClE;;EAEA;AACF;AACA;EACEuD,MAAMA,CAACC,KAAqB,EAAe;IACzC,IAAIA,KAAK,YAAYvD,WAAW,EAAE;MAChC,MAAMwD,WAAW,GAAG,IAAI,CAACC,KAAK,EAAE;MAEhCD,WAAW,CAACvB,mBAAmB,GAAGsB,KAAK,CAACpC,oBAAoB;MAC5DqC,WAAW,CAACV,kBAAkB,GAAGS,KAAK,CAACR,mBAAmB;MAC1DS,WAAW,CAACN,gBAAgB,GAAGK,KAAK,CAACP,iBAAiB;MAEtD,OAAOQ,WAAW;IACpB;IAEA,OAAO,IAAI;EACb;;EAEA;AACF;EACEE,MAAMA,CAACH,KAAkB,EAAW;IAClC,OAAO,IAAI,CAACjC,EAAE,CAACqC,QAAQ,EAAE,KAAKJ,KAAK,CAACjC,EAAE,CAACqC,QAAQ,EAAE;EACnD;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorCollection.js","names":["BaseCollection","ErrorModel","LayoutHintCollection","ErrorCollection","constructor","type","errorCollection","_type","collection","serverErrors","error","isClientConstraint","findById","id","item","addError","defaultMessage","parameters","layouthint","itemIdx","removeByIndex","add","removeError","addServerError","undefined","removeServerError","removeServerErrors","forEach","addErrors","errors","addConstraints","constraints","constraint","hasMandatoryError","some","isMandatoryConstraint"],"sources":["../../../src/models/error/ErrorCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\nimport ErrorModel from \"./ErrorModel\";\n\nimport type { MessageParameters } from \"../../i18n/types\";\nimport type { IConstraintModel } from \"../types\";\nimport LayoutHintCollection from \"../layouthint/LayoutHintCollection\";\n\n/**\n * Form Objects\n */\nexport default class ErrorCollection extends BaseCollection<ErrorModel> {\n _type: string;\n\n /**\n * constructor\n */\n constructor(type: string, errorCollection?: ErrorCollection) {\n super();\n\n this._type = type;\n this.collection = [];\n\n if (errorCollection) {\n this.collection = [...errorCollection.collection];\n }\n }\n\n /**\n */\n get serverErrors(): Array<ErrorModel> {\n return this.collection.filter((error) => !error.isClientConstraint);\n }\n\n /**\n */\n findById(id: string): number {\n return this.collection.findIndex((item) => item.id === id);\n }\n\n /**\n * Add an error to the collection\n */\n addError(\n id: string,\n defaultMessage?: string,\n parameters?: MessageParameters,\n layouthint?: LayoutHintCollection\n ) {\n const itemIdx = this.findById(id);\n\n if (itemIdx > -1) {\n this.removeByIndex(itemIdx);\n }\n\n this.add(new ErrorModel(id, defaultMessage, parameters, false, layouthint));\n }\n\n /**\n */\n removeError(id: string) {\n const itemIdx = this.findById(id);\n this.removeByIndex(itemIdx);\n }\n\n /**\n * Add a server error to the collection\n */\n addServerError(\n id: string,\n defaultMessage?: string,\n parameters?: MessageParameters,\n layouthint?: LayoutHintCollection\n ) {\n if (parameters) {\n this.addError(id, defaultMessage, parameters, layouthint);\n } else {\n this.addError(id, defaultMessage, undefined, layouthint);\n }\n }\n\n /**\n */\n removeServerError(id: string) {\n this.removeError(id);\n }\n\n /**\n */\n removeServerErrors() {\n this.serverErrors.forEach((error) => {\n this.removeError(error.id);\n });\n }\n\n /**\n */\n addErrors(errors: Array<ErrorModel>) {\n this.collection = [...this.collection, ...errors];\n }\n\n /**\n * Add constraints to error collection\n */\n addConstraints(constraints: Array<IConstraintModel>) {\n this.collection = [\n ...this.collection,\n ...constraints.map(\n (constraint) =>\n new ErrorModel(\n constraint.id,\n constraint.defaultMessage,\n constraint.parameters,\n true\n )\n ),\n ];\n }\n\n /**\n * Indicates if a mandatory constraint is available and if it is in error.\n * Rationale: When a mandatory constraint is in error other constraint probably don't mather because there is no value to check\n */\n hasMandatoryError(): boolean {\n return this.collection.some((error) => error.isMandatoryConstraint);\n }\n}\n"],"mappings":";;;;AACA,OAAOA,cAAc,MAAM,wBAAwB;AACnD,OAAOC,UAAU,MAAM,cAAc;AAIrC,OAAOC,oBAAoB,MAAM,oCAAoC;;AAErE;AACA;AACA;AACA,eAAe,MAAMC,eAAe,SAASH,cAAc,CAAa;EAGtE;AACF;AACA;EACEI,
|
|
1
|
+
{"version":3,"file":"ErrorCollection.js","names":["BaseCollection","ErrorModel","LayoutHintCollection","ErrorCollection","constructor","type","errorCollection","_defineProperty","_type","collection","serverErrors","_context","_filterInstanceProperty","call","error","isClientConstraint","findById","id","_context2","_findIndexInstanceProperty","item","addError","defaultMessage","parameters","layouthint","itemIdx","removeByIndex","add","removeError","addServerError","undefined","removeServerError","removeServerErrors","forEach","addErrors","errors","addConstraints","constraints","_mapInstanceProperty","constraint","hasMandatoryError","some","isMandatoryConstraint"],"sources":["../../../src/models/error/ErrorCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\nimport ErrorModel from \"./ErrorModel\";\n\nimport type { MessageParameters } from \"../../i18n/types\";\nimport type { IConstraintModel } from \"../types\";\nimport LayoutHintCollection from \"../layouthint/LayoutHintCollection\";\n\n/**\n * Form Objects\n */\nexport default class ErrorCollection extends BaseCollection<ErrorModel> {\n _type: string;\n\n /**\n * constructor\n */\n constructor(type: string, errorCollection?: ErrorCollection) {\n super();\n\n this._type = type;\n this.collection = [];\n\n if (errorCollection) {\n this.collection = [...errorCollection.collection];\n }\n }\n\n /**\n */\n get serverErrors(): Array<ErrorModel> {\n return this.collection.filter((error) => !error.isClientConstraint);\n }\n\n /**\n */\n findById(id: string): number {\n return this.collection.findIndex((item) => item.id === id);\n }\n\n /**\n * Add an error to the collection\n */\n addError(\n id: string,\n defaultMessage?: string,\n parameters?: MessageParameters,\n layouthint?: LayoutHintCollection\n ) {\n const itemIdx = this.findById(id);\n\n if (itemIdx > -1) {\n this.removeByIndex(itemIdx);\n }\n\n this.add(new ErrorModel(id, defaultMessage, parameters, false, layouthint));\n }\n\n /**\n */\n removeError(id: string) {\n const itemIdx = this.findById(id);\n this.removeByIndex(itemIdx);\n }\n\n /**\n * Add a server error to the collection\n */\n addServerError(\n id: string,\n defaultMessage?: string,\n parameters?: MessageParameters,\n layouthint?: LayoutHintCollection\n ) {\n if (parameters) {\n this.addError(id, defaultMessage, parameters, layouthint);\n } else {\n this.addError(id, defaultMessage, undefined, layouthint);\n }\n }\n\n /**\n */\n removeServerError(id: string) {\n this.removeError(id);\n }\n\n /**\n */\n removeServerErrors() {\n this.serverErrors.forEach((error) => {\n this.removeError(error.id);\n });\n }\n\n /**\n */\n addErrors(errors: Array<ErrorModel>) {\n this.collection = [...this.collection, ...errors];\n }\n\n /**\n * Add constraints to error collection\n */\n addConstraints(constraints: Array<IConstraintModel>) {\n this.collection = [\n ...this.collection,\n ...constraints.map(\n (constraint) =>\n new ErrorModel(\n constraint.id,\n constraint.defaultMessage,\n constraint.parameters,\n true\n )\n ),\n ];\n }\n\n /**\n * Indicates if a mandatory constraint is available and if it is in error.\n * Rationale: When a mandatory constraint is in error other constraint probably don't mather because there is no value to check\n */\n hasMandatoryError(): boolean {\n return this.collection.some((error) => error.isMandatoryConstraint);\n }\n}\n"],"mappings":";;;;AACA,OAAOA,cAAc,MAAM,wBAAwB;AACnD,OAAOC,UAAU,MAAM,cAAc;AAIrC,OAAOC,oBAAoB,MAAM,oCAAoC;;AAErE;AACA;AACA;AACA,eAAe,MAAMC,eAAe,SAASH,cAAc,CAAa;EAGtE;AACF;AACA;EACEI,WAAWA,CAACC,IAAY,EAAEC,eAAiC,EAAE;IAC3D,KAAK,EAAE;IAACC,eAAA;IAER,IAAI,CAACC,KAAK,GAAGH,IAAI;IACjB,IAAI,CAACI,UAAU,GAAG,EAAE;IAEpB,IAAIH,eAAe,EAAE;MACnB,IAAI,CAACG,UAAU,GAAG,CAAC,GAAGH,eAAe,CAACG,UAAU,CAAC;IACnD;EACF;;EAEA;AACF;EACE,IAAIC,YAAYA,CAAA,EAAsB;IAAA,IAAAC,QAAA;IACpC,OAAOC,uBAAA,CAAA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AW,CAACX,EAAE,CAAC;EACtB;;EAEA;AACF;EACEe,kBAAkBA,CAAA,EAAG;IACnB,IAAI,CAACtB,YAAY,CAACuB,OAAO,CAAEnB,KAAK,IAAK;MACnC,IAAI,CAACc,WAAW,CAACd,KAAK,CAACG,EAAE,CAAC;IAC5B,CAAC,CAAC;EACJ;;EAEA;AACF;EACEiB,SAASA,CAACC,MAAyB,EAAE;IACnC,IAAI,CAAC1B,UAAU,GAAG,CAAC,GAAG,IAAI,CAACA,UAAU,EAAE,GAAG0B,MAAM,CAAC;EACnD;;EAEA;AACF;AACA;EACEC,cAAcA,CAACC,WAAoC,EAAE;IACnD,IAAI,CAAC5B,UAAU,GAAG,CAChB,GAAG,IAAI,CAACA,UAAU,EAClB,GAAG6B,oBAAA,CAAAD,WAAW,EAAAxB,IAAA,CAAXwB,WAAW,EACXE,UAAU,IACT,IAAItC,UAAU,CACZsC,UAAU,CAACtB,EAAE,EACbsB,UAAU,CAACjB,cAAc,EACzBiB,UAAU,CAAChB,UAAU,EACrB,IAAI,CACL,CACJ,CACF;EACH;;EAEA;AACF;AACA;AACA;EACEiB,iBAAiBA,CAAA,EAAY;IAC3B,OAAO,IAAI,CAAC/B,UAAU,CAACgC,IAAI,CAAE3B,KAAK,IAAKA,KAAK,CAAC4B,qBAAqB,CAAC;EACrE;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorModel.js","names":["LayoutHintCollection","ErrorModel","constructor","id","defaultMessage","parameters","isClientConstraint","layouthint","_id","_parameters","_defaultMessage","_isClientConstraint","_layouthint","Array","isArray","isMandatoryConstraint","getMessage"],"sources":["../../../src/models/error/ErrorModel.js"],"sourcesContent":["// @flow\nimport type { MessageObject, MessageParameters } from \"../../i18n/types\";\nimport LayoutHintCollection from \"../layouthint/LayoutHintCollection\";\n\n/**\n * Wrapper around an error message / object\n */\nclass ErrorModel {\n _id: string;\n _defaultMessage: ?string;\n _parameters: ?MessageParameters;\n _isClientConstraint: boolean;\n _layouthint: LayoutHintCollection;\n\n /**\n * Contruct\n */\n constructor(\n id: string,\n defaultMessage: ?string,\n parameters: ?MessageParameters,\n isClientConstraint: boolean = false,\n layouthint: LayoutHintCollection = new LayoutHintCollection()\n ) {\n this._id = id;\n this._parameters = parameters;\n this._defaultMessage = defaultMessage;\n this._isClientConstraint = isClientConstraint;\n this._layouthint = Array.isArray(layouthint)\n ? new LayoutHintCollection(layouthint)\n : layouthint;\n }\n\n /**\n * Get id of error\n */\n get id(): string {\n return this._id;\n }\n\n /**\n */\n get defaultMessage(): ?string {\n return this._defaultMessage;\n }\n\n /**\n */\n get parameters(): ?MessageParameters {\n return this._parameters;\n }\n\n /**\n */\n get isClientConstraint(): boolean {\n return this._isClientConstraint || false;\n }\n\n /**\n */\n get layouthint(): LayoutHintCollection {\n return this._layouthint;\n }\n\n /**\n */\n get isMandatoryConstraint(): boolean {\n return this.id === \"Constraint.Mandatory\";\n }\n\n /**\n * Returns a message object from the error\n */\n getMessage(): MessageObject {\n return {\n id: this.id,\n defaultMessage: this.defaultMessage ?? \"\",\n parameters: this.parameters ?? {},\n };\n }\n}\n\nexport default ErrorModel;\n"],"mappings":";AAEA,OAAOA,oBAAoB,MAAM,oCAAoC;;AAErE;AACA;AACA;AACA,MAAMC,UAAU,CAAC;EAOf;AACF;AACA;EACEC,
|
|
1
|
+
{"version":3,"file":"ErrorModel.js","names":["LayoutHintCollection","ErrorModel","constructor","id","defaultMessage","parameters","isClientConstraint","arguments","length","undefined","layouthint","_defineProperty","_id","_parameters","_defaultMessage","_isClientConstraint","_layouthint","Array","isArray","isMandatoryConstraint","getMessage"],"sources":["../../../src/models/error/ErrorModel.js"],"sourcesContent":["// @flow\nimport type { MessageObject, MessageParameters } from \"../../i18n/types\";\nimport LayoutHintCollection from \"../layouthint/LayoutHintCollection\";\n\n/**\n * Wrapper around an error message / object\n */\nclass ErrorModel {\n _id: string;\n _defaultMessage: ?string;\n _parameters: ?MessageParameters;\n _isClientConstraint: boolean;\n _layouthint: LayoutHintCollection;\n\n /**\n * Contruct\n */\n constructor(\n id: string,\n defaultMessage: ?string,\n parameters: ?MessageParameters,\n isClientConstraint: boolean = false,\n layouthint: LayoutHintCollection = new LayoutHintCollection()\n ) {\n this._id = id;\n this._parameters = parameters;\n this._defaultMessage = defaultMessage;\n this._isClientConstraint = isClientConstraint;\n this._layouthint = Array.isArray(layouthint)\n ? new LayoutHintCollection(layouthint)\n : layouthint;\n }\n\n /**\n * Get id of error\n */\n get id(): string {\n return this._id;\n }\n\n /**\n */\n get defaultMessage(): ?string {\n return this._defaultMessage;\n }\n\n /**\n */\n get parameters(): ?MessageParameters {\n return this._parameters;\n }\n\n /**\n */\n get isClientConstraint(): boolean {\n return this._isClientConstraint || false;\n }\n\n /**\n */\n get layouthint(): LayoutHintCollection {\n return this._layouthint;\n }\n\n /**\n */\n get isMandatoryConstraint(): boolean {\n return this.id === \"Constraint.Mandatory\";\n }\n\n /**\n * Returns a message object from the error\n */\n getMessage(): MessageObject {\n return {\n id: this.id,\n defaultMessage: this.defaultMessage ?? \"\",\n parameters: this.parameters ?? {},\n };\n }\n}\n\nexport default ErrorModel;\n"],"mappings":";AAEA,OAAOA,oBAAoB,MAAM,oCAAoC;;AAErE;AACA;AACA;AACA,MAAMC,UAAU,CAAC;EAOf;AACF;AACA;EACEC,WAAWA,CACTC,EAAU,EACVC,cAAuB,EACvBC,UAA8B,EAG9B;IAAA,IAFAC,kBAA2B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;IAAA,IACnCG,UAAgC,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAIP,oBAAoB,EAAE;IAAAW,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAE7D,IAAI,CAACC,GAAG,GAAGT,EAAE;IACb,IAAI,CAACU,WAAW,GAAGR,UAAU;IAC7B,IAAI,CAACS,eAAe,GAAGV,cAAc;IACrC,IAAI,CAACW,mBAAmB,GAAGT,kBAAkB;IAC7C,IAAI,CAACU,WAAW,GAAGC,KAAK,CAACC,OAAO,CAACR,UAAU,CAAC,GACxC,IAAIV,oBAAoB,CAACU,UAAU,CAAC,GACpCA,UAAU;EAChB;;EAEA;AACF;AACA;EACE,IAAIP,EAAEA,CAAA,EAAW;IACf,OAAO,IAAI,CAACS,GAAG;EACjB;;EAEA;AACF;EACE,IAAIR,cAAcA,CAAA,EAAY;IAC5B,OAAO,IAAI,CAACU,eAAe;EAC7B;;EAEA;AACF;EACE,IAAIT,UAAUA,CAAA,EAAuB;IACnC,OAAO,IAAI,CAACQ,WAAW;EACzB;;EAEA;AACF;EACE,IAAIP,kBAAkBA,CAAA,EAAY;IAChC,OAAO,IAAI,CAACS,mBAAmB,IAAI,KAAK;EAC1C;;EAEA;AACF;EACE,IAAIL,UAAUA,CAAA,EAAyB;IACrC,OAAO,IAAI,CAACM,WAAW;EACzB;;EAEA;AACF;EACE,IAAIG,qBAAqBA,CAAA,EAAY;IACnC,OAAO,IAAI,CAAChB,EAAE,KAAK,sBAAsB;EAC3C;;EAEA;AACF;AACA;EACEiB,UAAUA,CAAA,EAAkB;IAC1B,OAAO;MACLjB,EAAE,EAAE,IAAI,CAACA,EAAE;MACXC,cAAc,EAAE,IAAI,CAACA,cAAc,IAAI,EAAE;MACzCC,UAAU,EAAE,IAAI,CAACA,UAAU,IAAI,CAAC;IAClC,CAAC;EACH;AACF;AAEA,eAAeJ,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorResponse.js","names":["Href","LayoutHintCollection","ErrorResponse","constructor","data","connectKey","_error","_connectKey","key","error","status","NO_RESPONSE_CODE","DECIMAL_RADIX","parseInt","id","isResourceNotFound","name","message","responseMessage","response","title","titleMessage","undefined","titleId","titleProperties","properties","redirect","redirectText","text","redirectTextID","redirectTextProperties","redirectMessage","redirectHref","href","layouthint","parameters","RESOURCE_NOT_FOUND_RESPONSE_CODE","isResourceNotFoundAfterReload","isReload","isUnauthorized","UNAUTHORIZED_RESPONSE_CODE","hasUnauthorizedStatus","hasUnauthorizedErrorId","hasLoginAction","action","isChangePassword","isConcurrentUser","isConcurrentError","isBlocked","isInvalidCredentials","isInvalidUsername","isTimeoutError","isRemoteServiceException","changePasswordHref","isBasicAuthentication","loginFailed","shouldThrowOnServer"],"sources":["../../../src/models/error/ErrorResponse.js"],"sourcesContent":["// @flow\nimport Href from \"../href/Href\";\n\nimport type { MessageParameters } from \"../../i18n/types\";\nimport LayoutHintCollection from \"../layouthint/LayoutHintCollection\";\n\n/**\n */\nexport type TitleObject = {\n +id: string,\n +properties?: Object,\n +message?: string,\n};\n/**\n */\nexport type RedirectTextObject = {\n +id: string,\n +properties?: Object,\n +message?: string,\n};\n\n/**\n */\nexport type RedirectObject = {\n +href: Href,\n +text?: RedirectTextObject,\n};\n\n/**\n * Error response model\n */\nexport default class ErrorResponse {\n _error: Object;\n _connectKey: ?string;\n\n /**\n * Construct ErrorResponse\n */\n constructor(data: Object, connectKey?: string) {\n this._error = data;\n this._connectKey = connectKey;\n }\n\n /**\n */\n set connectKey(key: string) {\n this._connectKey = key;\n }\n\n /**\n */\n get connectKey(): ?string {\n return this._connectKey;\n }\n\n /**\n * Return error information\n */\n get error(): Object {\n return this._error ?? {};\n }\n\n /**\n * Get request status code\n */\n get status(): number {\n const NO_RESPONSE_CODE = 0;\n const DECIMAL_RADIX = 10;\n return this.error.status\n ? parseInt(this.error.status, DECIMAL_RADIX)\n : NO_RESPONSE_CODE;\n }\n\n /**\n * Return error type information\n */\n get id(): string {\n if (this.isResourceNotFound && this.error.id !== \"Error.NotAuthorized\") {\n return \"Error.ResourceNotFound\";\n }\n\n return this.error.id || this.error.name || \"Error.GeneralError\";\n }\n\n /**\n */\n get message(): string {\n return this.error.message || this.id;\n }\n\n /**\n * Return response error message\n */\n get responseMessage(): string {\n return this.response.message || null;\n }\n\n /**\n * Return response error title\n */\n get title(): TitleObject {\n return this.response.title || null;\n }\n\n /**\n * Return response error title message\n */\n get titleMessage(): string {\n return this.response.title?.message || undefined;\n }\n\n /**\n * Return response error title Id\n */\n get titleId(): string {\n return this.response.title?.id || undefined;\n }\n\n /**\n * Return response error title properties\n */\n get titleProperties(): Object {\n return this.response.title?.properties || null;\n }\n\n /**\n * Return response error redirect\n */\n get redirect(): RedirectObject {\n return this.response.redirect || null;\n }\n /**\n * Return response error redirect text\n */\n get redirectText(): RedirectTextObject {\n return this.response?.redirect?.text || null;\n }\n\n /**\n * Return response error redirect text id\n */\n get redirectTextID(): string {\n return this.response.redirect?.text?.id || undefined;\n }\n\n /**\n * Return response error redirect text properties\n */\n get redirectTextProperties(): Object {\n return this.response.redirect?.text?.properties || null;\n }\n\n /**\n * Return response error redirect text message\n */\n get redirectMessage(): string {\n return this.response.redirect?.text?.message || undefined;\n }\n\n /**\n * Return response error redirect href\n */\n get redirectHref(): Href {\n if (this.response.redirect?.href) {\n return new Href(this.response.redirect?.href);\n }\n return new Href();\n }\n\n /**\n * Return error response layouthint\n */\n get layouthint(): LayoutHintCollection {\n return new LayoutHintCollection(this.response?.layouthint);\n }\n\n /**\n */\n get response(): Object {\n return this.error?.response?.error || {};\n }\n\n /**\n */\n get properties(): Object {\n const { properties } = this.error;\n if (properties != null && typeof properties == \"object\") {\n return properties;\n }\n\n return {};\n }\n\n /**\n * Return error parameters\n */\n get parameters(): ?MessageParameters {\n return this.error.parameters || null;\n }\n\n /**\n */\n get isResourceNotFound(): boolean {\n const RESOURCE_NOT_FOUND_RESPONSE_CODE = 404;\n\n return this.status === RESOURCE_NOT_FOUND_RESPONSE_CODE;\n }\n\n /**\n */\n get isResourceNotFoundAfterReload(): boolean {\n return this.isResourceNotFound && this.error.isReload;\n }\n\n /**\n * Check if the error message is an authorization error\n */\n get isUnauthorized(): boolean {\n const UNAUTHORIZED_RESPONSE_CODE = 401;\n\n const hasUnauthorizedStatus = this.status === UNAUTHORIZED_RESPONSE_CODE;\n const hasUnauthorizedErrorId =\n this.id === \"Error.NotAuthorized\" ||\n this.id === \"Error.Authentication.Required\" ||\n this.id === \"Error.Authentication.InvalidCredentials\";\n\n const hasLoginAction = this.error.action\n ? this.error.action.name === \"login\"\n : false;\n\n return hasUnauthorizedStatus || hasUnauthorizedErrorId || hasLoginAction;\n }\n\n /**\n */\n get isChangePassword(): boolean {\n return this.id === \"Error.ChangePasswordRequired\";\n }\n\n /**\n */\n get isConcurrentUser(): boolean {\n return this.id === \"Error.Authentication.ConcurrentUser\";\n }\n\n /**\n */\n get isConcurrentError(): boolean {\n return (\n this.id === \"Error.Case.ConcurrentModification\" ||\n this.id === \"Error.DataStore.ConcurrentModification\" ||\n this.id === \"Error.DataStore.RecordAlreadyExists\" ||\n this.id === \"Error.DataStore.RowCannotBeLocked\"\n );\n }\n\n /**\n */\n get isBlocked(): boolean {\n return this.id === \"Error.Authentication.BlockedUser\";\n }\n\n /**\n */\n get isInvalidCredentials(): boolean {\n return this.id === \"Error.Authentication.InvalidCredentials\";\n }\n\n /**\n */\n get isInvalidUsername(): boolean {\n return this.id === \"Error.Authentication.InvalidUsername\";\n }\n\n /**\n */\n get isTimeoutError(): boolean {\n return this.id === \"Error.CodemapLookup.InvalidToken\";\n }\n\n /**\n * A RemoteServiceException occurs when an exception occurs connecting to an external system,\n * for example when using the service list panels\n */\n get isRemoteServiceException(): boolean {\n return this.id === \"Error.RemoteServiceException\";\n }\n\n /**\n * Get response url\n */\n get changePasswordHref(): ?Href {\n return this.properties.redirect ? new Href(this.properties.redirect) : null;\n }\n\n /**\n * When no action information is present in the unauthorized response, for now we assume it is Basic Authentication\n */\n get isBasicAuthentication(): boolean {\n const UNAUTHORIZED_RESPONSE_CODE = 401;\n return (\n this.isUnauthorized &&\n this.status === UNAUTHORIZED_RESPONSE_CODE &&\n this.response.error === \"No responseText\"\n );\n }\n\n /**\n * Retrieve a failed login attempt\n */\n get loginFailed(): boolean {\n return (\n this.id === \"Error.Authentication.Required\" ||\n this.id === \"Error.Authentication.InvalidCredentials\"\n );\n }\n\n /**\n */\n get shouldThrowOnServer(): boolean {\n return !this.isChangePassword && !this.isBlocked && !this.isConcurrentUser;\n }\n}\n"],"mappings":";AACA,OAAOA,IAAI,MAAM,cAAc;AAG/B,OAAOC,oBAAoB,MAAM,oCAAoC;;AAErE;AACA;;AAqBA;AACA;AACA;AACA,eAAe,MAAMC,aAAa,CAAC;EAIjC;AACF;AACA;EACEC,WAAW,CAACC,IAAY,EAAEC,UAAmB,EAAE;IAAA;IAAA;IAC7C,IAAI,CAACC,MAAM,GAAGF,IAAI;IAClB,IAAI,CAACG,WAAW,GAAGF,UAAU;EAC/B;;EAEA;AACF;EACE,IAAIA,UAAU,CAACG,GAAW,EAAE;IAC1B,IAAI,CAACD,WAAW,GAAGC,GAAG;EACxB;;EAEA;AACF;EACE,IAAIH,UAAU,GAAY;IACxB,OAAO,IAAI,CAACE,WAAW;EACzB;;EAEA;AACF;AACA;EACE,IAAIE,KAAK,GAAW;IAClB,OAAO,IAAI,CAACH,MAAM,IAAI,CAAC,CAAC;EAC1B;;EAEA;AACF;AACA;EACE,IAAII,MAAM,GAAW;IACnB,MAAMC,gBAAgB,GAAG,CAAC;IAC1B,MAAMC,aAAa,GAAG,EAAE;IACxB,OAAO,IAAI,CAACH,KAAK,CAACC,MAAM,GACpBG,QAAQ,CAAC,IAAI,CAACJ,KAAK,CAACC,MAAM,EAAEE,aAAa,CAAC,GAC1CD,gBAAgB;EACtB;;EAEA;AACF;AACA;EACE,IAAIG,EAAE,GAAW;IACf,IAAI,IAAI,CAACC,kBAAkB,IAAI,IAAI,CAACN,KAAK,CAACK,EAAE,KAAK,qBAAqB,EAAE;MACtE,OAAO,wBAAwB;IACjC;IAEA,OAAO,IAAI,CAACL,KAAK,CAACK,EAAE,IAAI,IAAI,CAACL,KAAK,CAACO,IAAI,IAAI,oBAAoB;EACjE;;EAEA;AACF;EACE,IAAIC,OAAO,GAAW;IACpB,O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9B,OAAO,IAAI,CAAC5B,UAAU,CAACC,QAAQ,GAAG,IAAI1B,IAAI,CAAC,IAAI,CAACyB,UAAU,CAACC,QAAQ,CAAC,GAAG,IAAI;EAC7E;;EAEA;AACF;AACA;EACE,IAAI4B,qBAAqB,GAAY;IACnC,MAAMd,0BAA0B,GAAG,GAAG;IACtC,OACE,IAAI,CAACD,cAAc,IACnB,IAAI,CAAC7B,MAAM,KAAK8B,0BAA0B,IAC1C,IAAI,CAACrB,QAAQ,CAACV,KAAK,KAAK,iBAAiB;EAE7C;;EAEA;AACF;AACA;EACE,IAAI8C,WAAW,GAAY;IACzB,OACE,IAAI,CAACzC,EAAE,KAAK,+BAA+B,IAC3C,IAAI,CAACA,EAAE,KAAK,yCAAyC;EAEzD;;EAEA;AACF;EACE,IAAI0C,mBAAmB,GAAY;IACjC,OAAO,CAAC,IAAI,CAACX,gBAAgB,IAAI,CAAC,IAAI,CAACG,SAAS,IAAI,CAAC,IAAI,CAACF,gBAAgB;EAC5E;AACF"}
|
|
1
|
+
{"version":3,"file":"ErrorResponse.js","names":["Href","LayoutHintCollection","ErrorResponse","constructor","data","connectKey","_defineProperty","_error","_connectKey","key","error","status","NO_RESPONSE_CODE","DECIMAL_RADIX","parseInt","id","isResourceNotFound","name","message","responseMessage","response","title","titleMessage","undefined","titleId","titleProperties","properties","redirect","redirectText","text","redirectTextID","redirectTextProperties","redirectMessage","redirectHref","href","layouthint","parameters","RESOURCE_NOT_FOUND_RESPONSE_CODE","isResourceNotFoundAfterReload","isReload","isUnauthorized","UNAUTHORIZED_RESPONSE_CODE","hasUnauthorizedStatus","hasUnauthorizedErrorId","hasLoginAction","action","isChangePassword","isConcurrentUser","isConcurrentError","isBlocked","isInvalidCredentials","isInvalidUsername","isTimeoutError","isRemoteServiceException","changePasswordHref","isBasicAuthentication","loginFailed","shouldThrowOnServer"],"sources":["../../../src/models/error/ErrorResponse.js"],"sourcesContent":["// @flow\nimport Href from \"../href/Href\";\n\nimport type { MessageParameters } from \"../../i18n/types\";\nimport LayoutHintCollection from \"../layouthint/LayoutHintCollection\";\n\n/**\n */\nexport type TitleObject = {\n +id: string,\n +properties?: Object,\n +message?: string,\n};\n/**\n */\nexport type RedirectTextObject = {\n +id: string,\n +properties?: Object,\n +message?: string,\n};\n\n/**\n */\nexport type RedirectObject = {\n +href: Href,\n +text?: RedirectTextObject,\n};\n\n/**\n * Error response model\n */\nexport default class ErrorResponse {\n _error: Object;\n _connectKey: ?string;\n\n /**\n * Construct ErrorResponse\n */\n constructor(data: Object, connectKey?: string) {\n this._error = data;\n this._connectKey = connectKey;\n }\n\n /**\n */\n set connectKey(key: string) {\n this._connectKey = key;\n }\n\n /**\n */\n get connectKey(): ?string {\n return this._connectKey;\n }\n\n /**\n * Return error information\n */\n get error(): Object {\n return this._error ?? {};\n }\n\n /**\n * Get request status code\n */\n get status(): number {\n const NO_RESPONSE_CODE = 0;\n const DECIMAL_RADIX = 10;\n return this.error.status\n ? parseInt(this.error.status, DECIMAL_RADIX)\n : NO_RESPONSE_CODE;\n }\n\n /**\n * Return error type information\n */\n get id(): string {\n if (this.isResourceNotFound && this.error.id !== \"Error.NotAuthorized\") {\n return \"Error.ResourceNotFound\";\n }\n\n return this.error.id || this.error.name || \"Error.GeneralError\";\n }\n\n /**\n */\n get message(): string {\n return this.error.message || this.id;\n }\n\n /**\n * Return response error message\n */\n get responseMessage(): string {\n return this.response.message || null;\n }\n\n /**\n * Return response error title\n */\n get title(): TitleObject {\n return this.response.title || null;\n }\n\n /**\n * Return response error title message\n */\n get titleMessage(): string {\n return this.response.title?.message || undefined;\n }\n\n /**\n * Return response error title Id\n */\n get titleId(): string {\n return this.response.title?.id || undefined;\n }\n\n /**\n * Return response error title properties\n */\n get titleProperties(): Object {\n return this.response.title?.properties || null;\n }\n\n /**\n * Return response error redirect\n */\n get redirect(): RedirectObject {\n return this.response.redirect || null;\n }\n /**\n * Return response error redirect text\n */\n get redirectText(): RedirectTextObject {\n return this.response?.redirect?.text || null;\n }\n\n /**\n * Return response error redirect text id\n */\n get redirectTextID(): string {\n return this.response.redirect?.text?.id || undefined;\n }\n\n /**\n * Return response error redirect text properties\n */\n get redirectTextProperties(): Object {\n return this.response.redirect?.text?.properties || null;\n }\n\n /**\n * Return response error redirect text message\n */\n get redirectMessage(): string {\n return this.response.redirect?.text?.message || undefined;\n }\n\n /**\n * Return response error redirect href\n */\n get redirectHref(): Href {\n if (this.response.redirect?.href) {\n return new Href(this.response.redirect?.href);\n }\n return new Href();\n }\n\n /**\n * Return error response layouthint\n */\n get layouthint(): LayoutHintCollection {\n return new LayoutHintCollection(this.response?.layouthint);\n }\n\n /**\n */\n get response(): Object {\n return this.error?.response?.error || {};\n }\n\n /**\n */\n get properties(): Object {\n const { properties } = this.error;\n if (properties != null && typeof properties == \"object\") {\n return properties;\n }\n\n return {};\n }\n\n /**\n * Return error parameters\n */\n get parameters(): ?MessageParameters {\n return this.error.parameters || null;\n }\n\n /**\n */\n get isResourceNotFound(): boolean {\n const RESOURCE_NOT_FOUND_RESPONSE_CODE = 404;\n\n return this.status === RESOURCE_NOT_FOUND_RESPONSE_CODE;\n }\n\n /**\n */\n get isResourceNotFoundAfterReload(): boolean {\n return this.isResourceNotFound && this.error.isReload;\n }\n\n /**\n * Check if the error message is an authorization error\n */\n get isUnauthorized(): boolean {\n const UNAUTHORIZED_RESPONSE_CODE = 401;\n\n const hasUnauthorizedStatus = this.status === UNAUTHORIZED_RESPONSE_CODE;\n const hasUnauthorizedErrorId =\n this.id === \"Error.NotAuthorized\" ||\n this.id === \"Error.Authentication.Required\" ||\n this.id === \"Error.Authentication.InvalidCredentials\";\n\n const hasLoginAction = this.error.action\n ? this.error.action.name === \"login\"\n : false;\n\n return hasUnauthorizedStatus || hasUnauthorizedErrorId || hasLoginAction;\n }\n\n /**\n */\n get isChangePassword(): boolean {\n return this.id === \"Error.ChangePasswordRequired\";\n }\n\n /**\n */\n get isConcurrentUser(): boolean {\n return this.id === \"Error.Authentication.ConcurrentUser\";\n }\n\n /**\n */\n get isConcurrentError(): boolean {\n return (\n this.id === \"Error.Case.ConcurrentModification\" ||\n this.id === \"Error.DataStore.ConcurrentModification\" ||\n this.id === \"Error.DataStore.RecordAlreadyExists\" ||\n this.id === \"Error.DataStore.RowCannotBeLocked\"\n );\n }\n\n /**\n */\n get isBlocked(): boolean {\n return this.id === \"Error.Authentication.BlockedUser\";\n }\n\n /**\n */\n get isInvalidCredentials(): boolean {\n return this.id === \"Error.Authentication.InvalidCredentials\";\n }\n\n /**\n */\n get isInvalidUsername(): boolean {\n return this.id === \"Error.Authentication.InvalidUsername\";\n }\n\n /**\n */\n get isTimeoutError(): boolean {\n return this.id === \"Error.CodemapLookup.InvalidToken\";\n }\n\n /**\n * A RemoteServiceException occurs when an exception occurs connecting to an external system,\n * for example when using the service list panels\n */\n get isRemoteServiceException(): boolean {\n return this.id === \"Error.RemoteServiceException\";\n }\n\n /**\n * Get response url\n */\n get changePasswordHref(): ?Href {\n return this.properties.redirect ? new Href(this.properties.redirect) : null;\n }\n\n /**\n * When no action information is present in the unauthorized response, for now we assume it is Basic Authentication\n */\n get isBasicAuthentication(): boolean {\n const UNAUTHORIZED_RESPONSE_CODE = 401;\n return (\n this.isUnauthorized &&\n this.status === UNAUTHORIZED_RESPONSE_CODE &&\n this.response.error === \"No responseText\"\n );\n }\n\n /**\n * Retrieve a failed login attempt\n */\n get loginFailed(): boolean {\n return (\n this.id === \"Error.Authentication.Required\" ||\n this.id === \"Error.Authentication.InvalidCredentials\"\n );\n }\n\n /**\n */\n get shouldThrowOnServer(): boolean {\n return !this.isChangePassword && !this.isBlocked && !this.isConcurrentUser;\n }\n}\n"],"mappings":";AACA,OAAOA,IAAI,MAAM,cAAc;AAG/B,OAAOC,oBAAoB,MAAM,oCAAoC;;AAErE;AACA;;AAqBA;AACA;AACA;AACA,eAAe,MAAMC,aAAa,CAAC;EAIjC;AACF;AACA;EACEC,WAAWA,CAACC,IAAY,EAAEC,UAAmB,EAAE;IAAAC,eAAA;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C,GAAG,IAAI;EAC7E;;EAEA;AACF;AACA;EACE,IAAI4B,qBAAqBA,CAAA,EAAY;IACnC,MAAMd,0BAA0B,GAAG,GAAG;IACtC,OACE,IAAI,CAACD,cAAc,IACnB,IAAI,CAAC7B,MAAM,KAAK8B,0BAA0B,IAC1C,IAAI,CAACrB,QAAQ,CAACV,KAAK,KAAK,iBAAiB;EAE7C;;EAEA;AACF;AACA;EACE,IAAI8C,WAAWA,CAAA,EAAY;IACzB,OACE,IAAI,CAACzC,EAAE,KAAK,+BAA+B,IAC3C,IAAI,CAACA,EAAE,KAAK,yCAAyC;EAEzD;;EAEA;AACF;EACE,IAAI0C,mBAAmBA,CAAA,EAAY;IACjC,OAAO,CAAC,IAAI,CAACX,gBAAgB,IAAI,CAAC,IAAI,CAACG,SAAS,IAAI,CAAC,IAAI,CAACF,gBAAgB;EAC5E;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignmentFilterModel.js","names":["BaseFilterModel","IllegalStateException","AssignmentFilterModel","constructor","data","contributions","_assignmenttype","createAssignmentTypeModel","_user","createUserModel","key","name","listkey","_listKey","contextid","getContribution","assignmentTypeData","dynamicschema","assignmentTypeContributions","enumerated","optionMode","_links","createAttribute","param","userData","userContributions","assignmenttype","user","params","value","reset","update","attribute","isActive","initvalue","isValid"],"sources":["../../../src/models/filters/AssignmentFilterModel.js"],"sourcesContent":["// @flow\nimport BaseFilterModel from \"../filters/BaseFilterModel\";\n\nimport type { AttributeType } from \"../types\";\nimport { IllegalStateException } from \"../../exceptions\";\n/**\n * Assignment filter consists of two filters: assignment type and user filter\n */\nexport default class AssignmentFilterModel extends BaseFilterModel {\n _listKey: string;\n _assignmenttype: ?AttributeType;\n _user: ?AttributeType;\n\n /**\n * Construct an assignment filter\n */\n constructor(data: Object, contributions: Object) {\n super(data, contributions);\n\n this._assignmenttype = this.createAssignmentTypeModel();\n this._user = this.createUserModel();\n }\n\n /**\n */\n get key(): ?string {\n return this.data.name;\n }\n\n /**\n * Getting key of the list these filters apply to\n */\n get listkey(): string {\n return this._listKey;\n }\n\n /**\n * Set key of list this filter belongs to\n */\n set listkey(key: string) {\n this._listKey = key;\n }\n\n /**\n */\n get contextid(): string {\n return this.getContribution(\"contextid\", \"\");\n }\n /**\n * Creates an assignmenttype model when assignmenttype json is present\n */\n createAssignmentTypeModel(): ?AttributeType {\n const key = `${this.contextid}ASSIGNMENTTYPE`;\n const assignmentTypeData = this.data[key];\n\n if (typeof assignmentTypeData === \"undefined\") {\n throw new IllegalStateException(\n `Missing assignment type data for ${key}`\n );\n }\n\n if (this.data.dynamicschema && this.data.dynamicschema[key]) {\n assignmentTypeData.dynamicschema = {\n [key]: this.data.dynamicschema[key],\n };\n }\n\n const assignmentTypeContributions = {\n ...this.contributions[key],\n enumerated: true,\n optionMode: assignmentTypeData._links ? \"lookup\" : \"static\",\n };\n\n return this.createAttribute(\n \"choice\",\n assignmentTypeData.name || assignmentTypeData.param,\n assignmentTypeData,\n assignmentTypeContributions\n );\n }\n\n /**\n * Creates an assignmenttype model when userkey json is present\n */\n createUserModel(): ?AttributeType {\n const key = `${this.contextid}USERKEY`;\n const userData = this.data[key];\n\n if (this.data.dynamicschema && this.data.dynamicschema[key]) {\n userData.dynamicschema = {\n [key]: this.data.dynamicschema[key],\n };\n }\n\n const userContributions = {\n ...this.contributions[key],\n optionMode: userData._links ? \"lookup\" : \"static\",\n };\n\n return this.createAttribute(\n \"choice\",\n userData.name || userData.param,\n userData,\n userContributions\n );\n }\n\n /**\n * The assignment filter consists of two part. This method return the assignment type attribute\n */\n get assignmenttype(): ?AttributeType {\n return this._assignmenttype;\n }\n\n /**\n * The assignment filter consists of two part. This method return the user identifier attribute\n */\n get user(): ?AttributeType {\n return this._user;\n }\n\n /**\n * Getting the parameters of this filter\n */\n get params(): Array<{ name: string, value: ?string }> {\n if (this.assignmenttype && this.user) {\n return [\n {\n name: this.assignmenttype.name,\n value: this.assignmenttype.value,\n },\n {\n name: this.user.name,\n value: this.user.value,\n },\n ];\n }\n\n return [];\n }\n\n /**\n * Reset the values within the filter\n */\n reset(): AssignmentFilterModel {\n if (this.assignmenttype) {\n this.assignmenttype.reset();\n }\n if (this.user) {\n this.user.reset();\n }\n\n return this;\n }\n\n /**\n * Update this filter\n */\n update(attribute: AttributeType, value: string) {\n if (this.user != null && this.user.key === attribute.key) {\n this.user.update(value);\n } else if (\n this.assignmenttype != null &&\n this.assignmenttype.key === attribute.key\n ) {\n this.assignmenttype.update(value);\n }\n }\n\n /**\n * Inidiates if filter is active\n */\n isActive(): boolean {\n return (\n (this.assignmenttype != null && this.assignmenttype.initvalue !== null) ||\n (this.user != null && this.user.initvalue !== null)\n );\n }\n\n /**\n * Inidiates if filter is valid\n */\n get isValid(): boolean {\n return (\n this.assignmenttype != null &&\n this.assignmenttype.isValid &&\n this.user != null &&\n this.user.isValid\n );\n }\n}\n"],"mappings":";AACA,OAAOA,eAAe,MAAM,4BAA4B;AAGxD,SAASC,qBAAqB,QAAQ,kBAAkB;AACxD;AACA;AACA;AACA,eAAe,MAAMC,qBAAqB,SAASF,eAAe,CAAC;EAKjE;AACF;AACA;EACEG,
|
|
1
|
+
{"version":3,"file":"AssignmentFilterModel.js","names":["BaseFilterModel","IllegalStateException","AssignmentFilterModel","constructor","data","contributions","_defineProperty","_assignmenttype","createAssignmentTypeModel","_user","createUserModel","key","name","listkey","_listKey","contextid","getContribution","assignmentTypeData","dynamicschema","assignmentTypeContributions","enumerated","optionMode","_links","createAttribute","param","userData","userContributions","assignmenttype","user","params","value","reset","update","attribute","isActive","initvalue","isValid"],"sources":["../../../src/models/filters/AssignmentFilterModel.js"],"sourcesContent":["// @flow\nimport BaseFilterModel from \"../filters/BaseFilterModel\";\n\nimport type { AttributeType } from \"../types\";\nimport { IllegalStateException } from \"../../exceptions\";\n/**\n * Assignment filter consists of two filters: assignment type and user filter\n */\nexport default class AssignmentFilterModel extends BaseFilterModel {\n _listKey: string;\n _assignmenttype: ?AttributeType;\n _user: ?AttributeType;\n\n /**\n * Construct an assignment filter\n */\n constructor(data: Object, contributions: Object) {\n super(data, contributions);\n\n this._assignmenttype = this.createAssignmentTypeModel();\n this._user = this.createUserModel();\n }\n\n /**\n */\n get key(): ?string {\n return this.data.name;\n }\n\n /**\n * Getting key of the list these filters apply to\n */\n get listkey(): string {\n return this._listKey;\n }\n\n /**\n * Set key of list this filter belongs to\n */\n set listkey(key: string) {\n this._listKey = key;\n }\n\n /**\n */\n get contextid(): string {\n return this.getContribution(\"contextid\", \"\");\n }\n /**\n * Creates an assignmenttype model when assignmenttype json is present\n */\n createAssignmentTypeModel(): ?AttributeType {\n const key = `${this.contextid}ASSIGNMENTTYPE`;\n const assignmentTypeData = this.data[key];\n\n if (typeof assignmentTypeData === \"undefined\") {\n throw new IllegalStateException(\n `Missing assignment type data for ${key}`\n );\n }\n\n if (this.data.dynamicschema && this.data.dynamicschema[key]) {\n assignmentTypeData.dynamicschema = {\n [key]: this.data.dynamicschema[key],\n };\n }\n\n const assignmentTypeContributions = {\n ...this.contributions[key],\n enumerated: true,\n optionMode: assignmentTypeData._links ? \"lookup\" : \"static\",\n };\n\n return this.createAttribute(\n \"choice\",\n assignmentTypeData.name || assignmentTypeData.param,\n assignmentTypeData,\n assignmentTypeContributions\n );\n }\n\n /**\n * Creates an assignmenttype model when userkey json is present\n */\n createUserModel(): ?AttributeType {\n const key = `${this.contextid}USERKEY`;\n const userData = this.data[key];\n\n if (this.data.dynamicschema && this.data.dynamicschema[key]) {\n userData.dynamicschema = {\n [key]: this.data.dynamicschema[key],\n };\n }\n\n const userContributions = {\n ...this.contributions[key],\n optionMode: userData._links ? \"lookup\" : \"static\",\n };\n\n return this.createAttribute(\n \"choice\",\n userData.name || userData.param,\n userData,\n userContributions\n );\n }\n\n /**\n * The assignment filter consists of two part. This method return the assignment type attribute\n */\n get assignmenttype(): ?AttributeType {\n return this._assignmenttype;\n }\n\n /**\n * The assignment filter consists of two part. This method return the user identifier attribute\n */\n get user(): ?AttributeType {\n return this._user;\n }\n\n /**\n * Getting the parameters of this filter\n */\n get params(): Array<{ name: string, value: ?string }> {\n if (this.assignmenttype && this.user) {\n return [\n {\n name: this.assignmenttype.name,\n value: this.assignmenttype.value,\n },\n {\n name: this.user.name,\n value: this.user.value,\n },\n ];\n }\n\n return [];\n }\n\n /**\n * Reset the values within the filter\n */\n reset(): AssignmentFilterModel {\n if (this.assignmenttype) {\n this.assignmenttype.reset();\n }\n if (this.user) {\n this.user.reset();\n }\n\n return this;\n }\n\n /**\n * Update this filter\n */\n update(attribute: AttributeType, value: string) {\n if (this.user != null && this.user.key === attribute.key) {\n this.user.update(value);\n } else if (\n this.assignmenttype != null &&\n this.assignmenttype.key === attribute.key\n ) {\n this.assignmenttype.update(value);\n }\n }\n\n /**\n * Inidiates if filter is active\n */\n isActive(): boolean {\n return (\n (this.assignmenttype != null && this.assignmenttype.initvalue !== null) ||\n (this.user != null && this.user.initvalue !== null)\n );\n }\n\n /**\n * Inidiates if filter is valid\n */\n get isValid(): boolean {\n return (\n this.assignmenttype != null &&\n this.assignmenttype.isValid &&\n this.user != null &&\n this.user.isValid\n );\n }\n}\n"],"mappings":";AACA,OAAOA,eAAe,MAAM,4BAA4B;AAGxD,SAASC,qBAAqB,QAAQ,kBAAkB;AACxD;AACA;AACA;AACA,eAAe,MAAMC,qBAAqB,SAASF,eAAe,CAAC;EAKjE;AACF;AACA;EACEG,WAAWA,CAACC,IAAY,EAAEC,aAAqB,EAAE;IAC/C,KAAK,CAACD,IAAI,EAAEC,aAAa,CAAC;IAACC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAE3B,IAAI,CAACC,eAAe,GAAG,IAAI,CAACC,yBAAyB,EAAE;IACvD,IAAI,CAACC,KAAK,GAAG,IAAI,CAACC,eAAe,EAAE;EACrC;;EAEA;AACF;EACE,IAAIC,GAAGA,CAAA,EAAY;IACjB,OAAO,IAAI,CAACP,IAAI,CAACQ,IAAI;EACvB;;EAEA;AACF;AACA;EACE,IAAIC,OAA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