@beinformed/ui 1.30.0 → 1.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/esm/constants/LayoutHints.js.map +1 -1
- package/esm/constants/Settings.js.map +1 -1
- package/esm/exceptions/NetworkException.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/useForm.js +3 -2
- 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/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 +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/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/ConstraintCollection.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/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/RangeConstraint.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 +5 -7
- package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/DependentAttribute.js +2 -0
- 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/SourceReferenceCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
- package/esm/models/content/ContentIndexModel.js.map +1 -1
- package/esm/models/content/ContentLinkModel.js.map +1 -1
- package/esm/models/content/ContentModel.js.map +1 -1
- package/esm/models/content/ContentTOCModel.js.map +1 -1
- package/esm/models/content/SectionModel.js.map +1 -1
- package/esm/models/content/SubSectionModel.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/esm/models/detail/DetailModel.js.map +1 -1
- package/esm/models/error/ErrorCollection.js.map +1 -1
- package/esm/models/error/ErrorModel.js.map +1 -1
- package/esm/models/error/ErrorResponse.js +6 -0
- 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/FilterCollection.js.map +1 -1
- package/esm/models/form/FormModel.js +30 -3
- 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 +4 -4
- package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/esm/models/links/LinkCollection.js.map +1 -1
- package/esm/models/links/LinkModel.js.map +1 -1
- package/esm/models/links/normalizeLinkJSON.js.map +1 -1
- package/esm/models/list/ListDetailModel.js.map +1 -1
- package/esm/models/list/ListItemCollection.js.map +1 -1
- package/esm/models/list/ListItemModel.js.map +1 -1
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
- package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
- package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/esm/models/paging/PagingModel.js.map +1 -1
- package/esm/models/panels/GroupingPanelModel.js.map +1 -1
- package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/esm/models/resolveModel.js.map +1 -1
- package/esm/models/search/CaseSearchModel.js.map +1 -1
- package/esm/models/sorting/SortingModel.js +1 -1
- package/esm/models/sorting/SortingModel.js.map +1 -1
- package/esm/models/tab/TabModel.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/esm/models/user/UserProfileModel.js.map +1 -1
- package/esm/modularui/Authenticate.js.map +1 -1
- package/esm/modularui/CaptchaRequest.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-client/Init.js.map +1 -1
- 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/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/RouterConnectors.js.map +1 -1
- package/esm/redux/_router/RouterMiddleware.js.map +1 -1
- package/esm/redux/actions/Application.js.map +1 -1
- package/esm/redux/actions/Authorization.js.map +1 -1
- package/esm/redux/actions/Error.js.map +1 -1
- package/esm/redux/actions/Form.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/SignIn.js.map +1 -1
- package/esm/redux/actions/SignOut.js.map +1 -1
- package/esm/redux/connectors/Application.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/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/ModalsReducer.js.map +1 -1
- package/esm/redux/reducers/NotificationReducer.js.map +1 -1
- package/esm/redux/reducers/ProgressIndicatorReducer.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/createHash.js.map +1 -1
- package/esm/utils/helpers/createUUID.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 +4 -8
- 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/mergeLayoutHintConfigurations.js.map +1 -1
- package/lib/constants/LayoutHints.js.map +1 -1
- package/lib/constants/Settings.js.map +1 -1
- package/lib/exceptions/NetworkException.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/useForm.js +3 -2
- package/lib/hooks/useForm.js.flow +2 -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/useNotification.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/withMessage.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 +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js.flow +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/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/__tests__/BooleanAttributeModel.spec.js.flow +14 -0
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.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/RangeConstraint.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 +5 -7
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.flow +0 -1
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js +2 -0
- 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/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/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/ContentConfigurationQuestions.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 +6 -0
- 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/FilterCollection.js.map +1 -1
- package/lib/models/form/FormModel.js +30 -3
- package/lib/models/form/FormModel.js.flow +32 -4
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/form/__tests__/FormModel.spec.js.flow +4 -0
- 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/layouthint/LayoutHintCollection.js +4 -4
- package/lib/models/layouthint/LayoutHintCollection.js.flow +4 -4
- 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/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/PagingModel.js.map +1 -1
- package/lib/models/panels/GroupingPanelModel.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/SortingModel.js +1 -1
- package/lib/models/sorting/SortingModel.js.flow +1 -1
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/modularui/Authenticate.js.map +1 -1
- package/lib/modularui/CaptchaRequest.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/react/ErrorBoundary.js.map +1 -1
- package/lib/react/ErrorBoundaryFallback.js.map +1 -1
- package/lib/react-client/Init.js.map +1 -1
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-client/contextPath.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/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/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/_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/withModularUI.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/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/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.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/connectors/Application.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/ModelCatalog.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/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.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/ProgressIndicatorReducer.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/repositoryResource.js.map +1 -1
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/number/DecimalFormat.js +4 -8
- 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 +32 -32
- package/src/hooks/useForm.js +2 -1
- package/src/models/attributes/BooleanAttributeModel.js +1 -1
- package/src/models/attributes/__tests__/BooleanAttributeModel.spec.js +14 -0
- package/src/models/attributes/layouthint-rules/BaseLayoutHintRule.js +0 -1
- package/src/models/form/FormModel.js +32 -4
- package/src/models/form/__tests__/FormModel.spec.js +4 -0
- package/src/models/layouthint/LayoutHintCollection.js +4 -4
- package/src/models/sorting/SortingModel.js +1 -1
- package/types/constants/Constants.d.ts +145 -145
- package/types/constants/LayoutHintConfig.d.ts +226 -226
- package/types/constants/LayoutHints.d.ts +74 -74
- package/types/constants/Settings.d.ts +29 -29
- package/types/constants/index.d.ts +3 -3
- package/types/exceptions/ConfigurationException.d.ts +6 -6
- package/types/exceptions/FetchException.d.ts +31 -31
- package/types/exceptions/IllegalArgumentException.d.ts +6 -6
- package/types/exceptions/IllegalReturnException.d.ts +5 -5
- package/types/exceptions/IllegalStateException.d.ts +6 -6
- package/types/exceptions/JsonParseException.d.ts +6 -6
- package/types/exceptions/MissingPropertyException.d.ts +6 -6
- package/types/exceptions/NetworkException.d.ts +9 -9
- package/types/exceptions/NotAllowedUriException.d.ts +6 -6
- package/types/exceptions/NotFoundException.d.ts +10 -10
- package/types/exceptions/ServerRequestException.d.ts +6 -6
- package/types/exceptions/ThemePropertyException.d.ts +6 -6
- package/types/exceptions/TimeoutException.d.ts +7 -7
- package/types/exceptions/UnauthorizedException.d.ts +11 -11
- package/types/exceptions/UnsupportedOperationException.d.ts +6 -6
- package/types/exceptions/index.d.ts +15 -15
- package/types/hooks/useI18n.d.ts +9 -9
- package/types/i18n/Locale.d.ts +53 -53
- package/types/i18n/Locales.d.ts +55 -55
- package/types/i18n/Message.d.ts +6 -6
- package/types/i18n/index.d.ts +5 -5
- package/types/i18n/languages.d.ts +215 -215
- package/types/i18n/translations/beinformed_error_messages_en.nl.d.ts +97 -97
- package/types/i18n/translations/beinformed_error_messages_nl.nl.d.ts +97 -97
- package/types/i18n/types.d.ts +11 -11
- package/types/i18n/withMessage.d.ts +3 -3
- package/types/index.d.ts +6 -6
- package/types/models/actions/ActionCollection.d.ts +29 -29
- package/types/models/actions/ActionModel.d.ts +84 -84
- package/types/models/application/ApplicationModel.d.ts +41 -41
- package/types/models/attributes/AttributeCollection.d.ts +96 -96
- package/types/models/attributes/AttributeContent.d.ts +64 -64
- package/types/models/attributes/AttributeDataHelper.d.ts +67 -67
- package/types/models/attributes/AttributeModel.d.ts +395 -395
- package/types/models/attributes/AttributeSetModel.d.ts +28 -28
- package/types/models/attributes/BooleanAttributeModel.d.ts +65 -65
- package/types/models/attributes/CaptchaAttributeModel.d.ts +19 -19
- package/types/models/attributes/ChoiceAttributeModel.d.ts +76 -76
- package/types/models/attributes/ChoiceAttributeOptionCollection.d.ts +79 -79
- package/types/models/attributes/ChoiceAttributeOptionModel.d.ts +133 -133
- package/types/models/attributes/CompositeAttributeChildCollection.d.ts +56 -56
- package/types/models/attributes/CompositeAttributeModel.d.ts +44 -44
- package/types/models/attributes/DatetimeAttributeModel.d.ts +117 -117
- package/types/models/attributes/HelptextAttributeModel.d.ts +16 -16
- package/types/models/attributes/LabelAttributeModel.d.ts +12 -12
- package/types/models/attributes/MemoAttributeModel.d.ts +14 -14
- package/types/models/attributes/MoneyAttributeModel.d.ts +14 -14
- package/types/models/attributes/NumberAttributeModel.d.ts +49 -49
- package/types/models/attributes/PasswordAttributeModel.d.ts +62 -62
- package/types/models/attributes/StringAttributeModel.d.ts +62 -62
- package/types/models/attributes/UploadAttributeModel.d.ts +60 -60
- package/types/models/attributes/XMLAttributeModel.d.ts +10 -10
- package/types/models/attributes/_createAttribute.d.ts +6 -6
- package/types/models/attributes/input-constraints/BSNConstraint.d.ts +26 -26
- package/types/models/attributes/input-constraints/ConstraintCollection.d.ts +24 -24
- package/types/models/attributes/input-constraints/ConstraintModel.d.ts +34 -34
- package/types/models/attributes/input-constraints/DateBoundaryConstraint.d.ts +109 -109
- package/types/models/attributes/input-constraints/DateTimeDateFormatConstraint.d.ts +36 -36
- package/types/models/attributes/input-constraints/DateTimeTimeFormatConstraint.d.ts +36 -36
- package/types/models/attributes/input-constraints/DatetimeFormatConstraint.d.ts +92 -92
- package/types/models/attributes/input-constraints/FileExtensionConstraint.d.ts +33 -33
- package/types/models/attributes/input-constraints/FileSizeConstraint.d.ts +42 -42
- package/types/models/attributes/input-constraints/IBANConstraint.d.ts +23 -23
- package/types/models/attributes/input-constraints/MandatoryConstraint.d.ts +23 -23
- package/types/models/attributes/input-constraints/MandatoryRangeConstraint.d.ts +36 -36
- package/types/models/attributes/input-constraints/NumberBoundaryConstraint.d.ts +61 -61
- package/types/models/attributes/input-constraints/NumberFormatConstraint.d.ts +52 -52
- package/types/models/attributes/input-constraints/NumberGroupingConstraint.d.ts +46 -46
- package/types/models/attributes/input-constraints/PasswordConfirmConstraint.d.ts +36 -36
- package/types/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.d.ts +23 -23
- package/types/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.d.ts +32 -32
- package/types/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.d.ts +32 -32
- package/types/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.d.ts +35 -35
- package/types/models/attributes/input-constraints/RangeConstraint.d.ts +97 -97
- package/types/models/attributes/input-constraints/RegexConstraint.d.ts +37 -37
- package/types/models/attributes/input-constraints/StringLengthConstraint.d.ts +46 -46
- package/types/models/attributes/input-constraints/XMLConstraint.d.ts +26 -26
- package/types/models/attributes/layouthint-rules/BaseLayoutHintRule.d.ts +46 -46
- package/types/models/attributes/layouthint-rules/DependentAttribute.d.ts +57 -57
- package/types/models/attributes/layouthint-rules/LayoutHintRuleCollection.d.ts +27 -27
- package/types/models/attributes/layouthint-rules/RemainingTotalUploadSize.d.ts +17 -17
- package/types/models/base/BaseCollection.d.ts +89 -89
- package/types/models/base/BaseModel.d.ts +67 -67
- package/types/models/base/ResourceCollection.d.ts +19 -19
- package/types/models/base/ResourceModel.d.ts +97 -97
- package/types/models/caseview/CaseViewModel.d.ts +45 -45
- package/types/models/concepts/BusinessScenarioModel.d.ts +20 -20
- package/types/models/concepts/ConceptDetailModel.d.ts +69 -69
- package/types/models/concepts/ConceptIndexModel.d.ts +36 -36
- package/types/models/concepts/ConceptLinkModel.d.ts +65 -65
- package/types/models/concepts/ConceptRelationCollection.d.ts +34 -34
- package/types/models/concepts/ConceptRelationModel.d.ts +44 -44
- package/types/models/concepts/ConceptTypeDetailModel.d.ts +39 -39
- package/types/models/concepts/SourceReferenceCollection.d.ts +13 -13
- package/types/models/concepts/SourceReferenceModel.d.ts +30 -30
- package/types/models/content/ContentIndexModel.d.ts +34 -34
- package/types/models/content/ContentLinkModel.d.ts +81 -81
- package/types/models/content/ContentModel.d.ts +74 -74
- package/types/models/content/ContentTOCModel.d.ts +37 -37
- package/types/models/content/ContentTypeModel.d.ts +26 -26
- package/types/models/content/SectionModel.d.ts +75 -75
- package/types/models/content/SubSectionModel.d.ts +64 -64
- package/types/models/contentconfiguration/ContentConfiguration.d.ts +28 -28
- package/types/models/contentconfiguration/ContentConfigurationElements.d.ts +47 -47
- package/types/models/contentconfiguration/ContentConfigurationEndResults.d.ts +16 -16
- package/types/models/contentconfiguration/ContentConfigurationQuestions.d.ts +22 -22
- package/types/models/contentconfiguration/ContentConfigurationResults.d.ts +39 -39
- package/types/models/detail/DetailModel.d.ts +72 -72
- package/types/models/error/ErrorCollection.d.ts +51 -51
- package/types/models/error/ErrorModel.d.ts +41 -41
- package/types/models/error/ErrorResponse.d.ts +148 -148
- package/types/models/filters/AssignmentFilterModel.d.ts +35 -35
- package/types/models/filters/BaseFilterModel.d.ts +85 -85
- package/types/models/filters/ConceptIndexFilterModel.d.ts +6 -6
- package/types/models/filters/FilterCollection.d.ts +48 -48
- package/types/models/filters/FilterModel.d.ts +5 -5
- package/types/models/filters/RangeFilterModel.d.ts +6 -6
- package/types/models/form/FormModel.d.ts +343 -320
- package/types/models/form/FormObjectModel.d.ts +196 -196
- package/types/models/grouping/GroupingModel.d.ts +85 -85
- package/types/models/href/Href.d.ts +196 -196
- package/types/models/href/ListHref.d.ts +64 -64
- package/types/models/index.d.ts +95 -94
- package/types/models/layouthint/LayoutHintCollection.d.ts +43 -43
- package/types/models/links/LinkCollection.d.ts +62 -62
- package/types/models/links/LinkModel.d.ts +92 -92
- package/types/models/links/normalizeLinkJSON.d.ts +9 -9
- package/types/models/list/ListDetailModel.d.ts +69 -69
- package/types/models/list/ListHeaderModel.d.ts +64 -64
- package/types/models/list/ListItemCollection.d.ts +21 -21
- package/types/models/list/ListItemModel.d.ts +34 -34
- package/types/models/list/ListModel.d.ts +135 -135
- package/types/models/lookup/LookupOptionCollection.d.ts +11 -11
- package/types/models/lookup/LookupOptionsModel.d.ts +19 -19
- package/types/models/modelcatalog/ModelCatalogModel.d.ts +18 -18
- package/types/models/paging/PagesizeModel.d.ts +25 -25
- package/types/models/paging/PagingModel.d.ts +49 -49
- package/types/models/panels/GroupingPanelModel.d.ts +39 -39
- package/types/models/parameter/Parameter.d.ts +40 -40
- package/types/models/process/ProcessStatusSettingsModel.d.ts +38 -38
- package/types/models/resolveModel.d.ts +7 -7
- package/types/models/search/CaseSearchModel.d.ts +14 -14
- package/types/models/sorting/SortOptionModel.d.ts +48 -48
- package/types/models/sorting/SortingModel.d.ts +42 -42
- package/types/models/tab/TabModel.d.ts +44 -44
- package/types/models/taskgroup/TaskGroupCollection.d.ts +12 -12
- package/types/models/taskgroup/TaskGroupModel.d.ts +15 -15
- package/types/models/types.d.ts +161 -161
- package/types/models/user/UserModel.d.ts +14 -14
- package/types/models/user/UserProfileModel.d.ts +12 -12
- package/types/models/user/UserServicesModel.d.ts +28 -28
- package/types/modularui/Authenticate.d.ts +49 -49
- package/types/modularui/CaptchaRequest.d.ts +45 -45
- package/types/modularui/ModularUIError.d.ts +10 -10
- package/types/modularui/ModularUIRequest.d.ts +198 -198
- package/types/modularui/ModularUIResponse.d.ts +56 -56
- package/types/modularui/UploadRequest.d.ts +35 -35
- package/types/modularui/index.d.ts +5 -5
- package/types/modularui/types.d.ts +2 -2
- package/types/redux/_i18n/types.d.ts +13 -13
- package/types/redux/_modularui/types.d.ts +61 -61
- package/types/redux/_router/types.d.ts +35 -35
- package/types/redux/selectors/i18n.d.ts +4 -4
- package/types/redux/types.d.ts +105 -105
- package/types/utils/browser/Cache.d.ts +45 -45
- package/types/utils/browser/Cookies.d.ts +9 -9
- package/types/utils/datetime/DateTimeUtil.d.ts +164 -164
- package/types/utils/fetch/serverFetch.d.ts +5 -5
- package/types/utils/fetch/types.d.ts +40 -40
- package/types/utils/fetch/universalFetch.d.ts +7 -7
- package/types/utils/fetch/xhr.d.ts +5 -5
- package/types/utils/helpers/checkResource.d.ts +3 -3
- package/types/utils/helpers/createHash.d.ts +8 -8
- package/types/utils/helpers/createUUID.d.ts +4 -4
- package/types/utils/helpers/index.d.ts +7 -7
- package/types/utils/helpers/objects.d.ts +11 -11
- package/types/utils/helpers/repositoryResource.d.ts +1 -1
- package/types/utils/helpers/sanitizeHtml.d.ts +9 -9
- package/types/utils/helpers/text.d.ts +7 -7
- package/types/utils/index.d.ts +11 -11
- package/types/utils/number/DecimalFormat.d.ts +90 -90
- package/types/utils/number/formatValue.d.ts +4 -4
- package/types/utils/number/parseNumbers.d.ts +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListModel.js","names":["_ModularUIResponse","_interopRequireDefault","require","_ListItemCollection","_ListDetailModel","_ActionCollection","_FilterCollection","_GroupingModel","_ListHeaderModel","_ListHref","_ListItemModel","_PagingModel","_ResourceModel","_SortingModel","_LayoutHints","ListModel","ResourceModel","constructor","arguments","_defineProperty2","default","type","modelName","isApplicableModel","data","_context","resourceType","contributions","resourcetype","_endsWith","call","_includes","getInitialChildModelLinks","layouthint","has","SHOW_ONE_RESULT_AS_DETAIL","listItemCollection","length","_context2","_map","listItem","listDetailLink","selflink","targetModel","ListDetailModel","setChildModels","models","detail","_find","childModel","label","introtext","content","text","message","Array","isArray","texts","_listItemCollection","ListItemCollection","createFromList","_detail","_context3","listitemHref","selfhref","listitem","equals","setSelfHref","grouping","_grouping","setGrouping","GroupingModel","dynamicschema","contexts","hasGrouping","hasGroups","hasResults","hasItems","shouldHide","HIDE_WHEN_EMPTY","actionCollection","isEmpty","filterCollection","hasActiveFilters","getListItemById","id","_context4","decodedId","decodeURIComponent","toString","result","getListItemByHref","href","_context5","paging","_paging","setPaging","PagingModel","sorting","_sorting","setSorting","SortingModel","getSortingLabels","_filterCollection","setFilters","FilterCollection","_filter","listkey","key","filter","isFiltered","_actionCollection","setActionCollection","ActionCollection","actions","hasList","selfLink","links","getLinkByKey","ListHref","_selfhref","headers","_headers","setHeaders","tempHeaders","results","_keys","forEach","attributes","attribute","listHeader","ListHeaderModel","exists","some","tempHeader","CASEVIEW_LINK","push","sortingLabels","attributeKey","getActionsByType","actionType","exports"],"sources":["../../../src/models/list/ListModel.js"],"sourcesContent":["// @flow\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\nimport ListItemCollection from \"../list/ListItemCollection\";\nimport ListDetailModel from \"../list/ListDetailModel\";\nimport ActionCollection from \"../actions/ActionCollection\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport GroupingModel from \"../grouping/GroupingModel\";\nimport ListHeaderModel from \"../list/ListHeaderModel\";\nimport ListHref from \"../href/ListHref\";\nimport ListItemModel from \"../list/ListItemModel\";\nimport PagingModel from \"../paging/PagingModel\";\nimport ResourceModel from \"../base/ResourceModel\";\nimport SortingModel from \"../sorting/SortingModel\";\nimport {\n CASEVIEW_LINK,\n HIDE_WHEN_EMPTY,\n SHOW_ONE_RESULT_AS_DETAIL,\n} from \"../../constants/LayoutHints\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * Defines a list object\n */\nexport default class ListModel extends ResourceModel {\n _detail: ?ListDetailModel = null;\n _headers: Array<ListHeaderModel>;\n _paging: PagingModel;\n _filterCollection: FilterCollection;\n _sorting: SortingModel;\n _actionCollection: ActionCollection;\n _listItemCollection: ListItemCollection;\n _grouping: GroupingModel;\n _selfhref: ListHref;\n\n /**\n */\n get type(): string {\n return \"List\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ListModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n const resourceType = data.contributions?.resourcetype ?? \"\";\n return (\n resourceType.endsWith(\"List\") ||\n resourceType.endsWith(\"ListPanel\") ||\n resourceType.endsWith(\"RelatedDataStorePanel\") ||\n resourceType.endsWith(\"RelatedDatastorePanel\") ||\n [\n \"list-related-cases\",\n \"RecordPanel\",\n \"EventHistoryPanel\",\n \"NotePanel\",\n \"AppointmentPanel\",\n \"DocumentPanel\",\n \"AssignmentPanel\",\n ].includes(resourceType)\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n if (\n this.layouthint.has(SHOW_ONE_RESULT_AS_DETAIL) &&\n this.listItemCollection.length === 1\n ) {\n return this.listItemCollection.map((listItem) => {\n const listDetailLink = listItem.selflink;\n listDetailLink.targetModel = ListDetailModel;\n return listDetailLink;\n });\n }\n\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.detail = models.find((childModel) => childModel.type === \"ListDetail\");\n }\n\n /**\n * Getting the label of the list\n */\n get label(): string {\n return this.contributions.label;\n }\n\n /**\n * Getting the introduction text\n */\n get introtext(): string {\n if (this.data.content) {\n return this.data.content.text.message;\n }\n\n if (this.contributions.text) {\n return this.contributions.text.message ?? this.contributions.text;\n }\n\n if (Array.isArray(this.contributions.texts)) {\n return this.contributions.texts[0].text;\n }\n\n return \"\";\n }\n\n /**\n * Getting the results\n */\n get listItemCollection(): ListItemCollection {\n if (!this._listItemCollection) {\n this._listItemCollection = ListItemCollection.createFromList(this);\n }\n\n return this._listItemCollection;\n }\n\n /**\n * Set results\n */\n set listItemCollection(listItemCollection: ListItemCollection) {\n this._listItemCollection = listItemCollection;\n }\n\n /**\n * Getting the detail\n */\n get detail(): ?ListDetailModel {\n return this._detail;\n }\n\n /**\n * Add detail model to the {ListModel}\n */\n set detail(detail: ?ModularUIModel) {\n if (detail instanceof ListDetailModel) {\n const listitemHref = detail.selfhref;\n\n const listitem = this.listItemCollection.find((listItem) =>\n listItem.selfhref.equals(listitemHref)\n );\n\n if (listitem) {\n detail.listitem = listitem;\n }\n\n this._detail = detail;\n }\n\n this.setSelfHref();\n }\n\n /**\n * Retrieve grouping information\n */\n get grouping(): GroupingModel {\n if (!this._grouping) {\n this._grouping = this.setGrouping();\n }\n\n return this._grouping;\n }\n\n /**\n */\n setGrouping(): GroupingModel {\n return new GroupingModel(\n { ...this.data.grouping, dynamicschema: this.data.dynamicschema },\n this.contributions.contexts\n );\n }\n\n /**\n */\n hasGrouping(): boolean {\n return this.grouping.hasGroups();\n }\n\n /**\n * Check if list has results\n */\n hasResults(): boolean {\n return this.listItemCollection.hasItems;\n }\n\n /**\n */\n get shouldHide(): boolean {\n return (\n this.layouthint.has(HIDE_WHEN_EMPTY) &&\n !this.hasResults() &&\n this.actionCollection.isEmpty &&\n !this.filterCollection.hasActiveFilters()\n );\n }\n\n /**\n * Get list item by ID\n */\n getListItemById(id: string | number): ListItemModel | null {\n const decodedId = decodeURIComponent(id.toString());\n return this.listItemCollection.find(\n (result) => result.id.toString() === decodedId\n );\n }\n\n /**\n * Get list item by Href\n */\n getListItemByHref(href: ListHref): ListItemModel | null {\n return this.listItemCollection.find((result) =>\n result.selfhref.equals(href)\n );\n }\n\n /**\n * Getting paging information\n */\n get paging(): PagingModel {\n if (!this._paging) {\n this._paging = this.setPaging();\n }\n return this._paging;\n }\n\n /**\n */\n setPaging(): PagingModel {\n return new PagingModel(this.data.paging, this.contributions.paging);\n }\n\n /**\n * Getting sorting information\n */\n get sorting(): SortingModel {\n if (!this._sorting) {\n this._sorting = this.setSorting();\n }\n\n return this._sorting;\n }\n\n /**\n */\n setSorting(): SortingModel {\n return new SortingModel(\n this.contributions,\n this.getSortingLabels(),\n this.grouping,\n this.data.sorting\n );\n }\n\n /**\n * Getting the filters\n */\n get filterCollection(): FilterCollection {\n if (!this._filterCollection) {\n this._filterCollection = this.setFilters();\n }\n\n return this._filterCollection;\n }\n\n /**\n * Set filterCollection\n */\n set filterCollection(filterCollection: FilterCollection) {\n this._filterCollection = filterCollection;\n }\n\n /**\n */\n setFilters(): FilterCollection {\n return new FilterCollection(this.data.filter, {\n listkey: this.key,\n filter: this.contributions.filter,\n contexts: this.contributions.contexts,\n dynamicschema: this.data.dynamicschema,\n });\n }\n\n /**\n * Indicates if list results are filtered\n */\n isFiltered(): boolean {\n return this.filterCollection.hasActiveFilters();\n }\n\n /**\n * Getting actions\n */\n get actionCollection(): ActionCollection {\n if (!this._actionCollection) {\n this._actionCollection = this.setActionCollection();\n }\n return this._actionCollection;\n }\n\n /**\n */\n setActionCollection(): ActionCollection {\n return new ActionCollection(this.data.actions, this.contributions.actions);\n }\n\n /**\n * Contains this model list data\n */\n hasList(): boolean {\n return this.key != null;\n }\n\n /**\n * Sets self href from links collection\n */\n setSelfHref(): ListHref {\n const selfLink = this.links ? this.links.getLinkByKey(\"self\") : null;\n\n if (selfLink !== null) {\n return new ListHref(selfLink.href, this);\n }\n\n return new ListHref();\n }\n\n /**\n * Getting the self link of this list\n */\n get selfhref(): ListHref {\n if (!this._selfhref) {\n this._selfhref = this.setSelfHref();\n }\n return this._selfhref;\n }\n\n /**\n * Getting the headers of this list\n */\n get headers(): Array<ListHeaderModel> {\n if (!this._headers) {\n this._headers = this.setHeaders();\n }\n\n return this._headers;\n }\n\n /**\n * Set initial headers of list\n */\n setHeaders(): Array<ListHeaderModel> {\n const tempHeaders = [];\n\n if (this.contributions.results) {\n const { results } = this.contributions;\n\n Object.keys(results).forEach((key) => {\n results[key].attributes.forEach((attribute) => {\n const listHeader = new ListHeaderModel(attribute, this.sorting);\n\n const exists = tempHeaders.some((tempHeader) =>\n tempHeader.equals(listHeader)\n );\n\n if (!exists && !listHeader.layouthint.has(CASEVIEW_LINK)) {\n tempHeaders.push(listHeader);\n }\n });\n });\n }\n\n return tempHeaders;\n }\n\n /**\n */\n getSortingLabels(): { [string]: string } {\n const sortingLabels: { [string]: string } = {};\n\n if (this.contributions.results) {\n const { results } = this.contributions;\n Object.keys(results).forEach((key) => {\n results[key].attributes.forEach((attribute) => {\n const attributeKey = Object.keys(attribute)[0];\n sortingLabels[attributeKey] = attribute[attributeKey].label;\n });\n });\n }\n\n return sortingLabels;\n }\n\n /**\n * Retrieve all actions by type\n */\n getActionsByType(actionType: string): ActionCollection {\n return this.actionCollection.getActionsByType(actionType);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,gBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,iBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,gBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,cAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,YAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,cAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,aAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,YAAA,GAAAZ,OAAA;AASA;AACA;AACA;AACe,MAAMa,SAAS,SAASC,sBAAa,CAAC;EAAAC,YAAA;IAAA,SAAAC,SAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,mBACvB,IAAI;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;EAAA;EAUhC;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,MAAM;EACf;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EA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,SAAA"}
|
|
1
|
+
{"version":3,"file":"ListModel.js","names":["_ModularUIResponse","_interopRequireDefault","require","_ListItemCollection","_ListDetailModel","_ActionCollection","_FilterCollection","_GroupingModel","_ListHeaderModel","_ListHref","_ListItemModel","_PagingModel","_ResourceModel","_SortingModel","_LayoutHints","ListModel","ResourceModel","constructor","arguments","_defineProperty2","default","type","modelName","isApplicableModel","data","_context","resourceType","contributions","resourcetype","_endsWith","call","_includes","getInitialChildModelLinks","layouthint","has","SHOW_ONE_RESULT_AS_DETAIL","listItemCollection","length","_context2","_map","listItem","listDetailLink","selflink","targetModel","ListDetailModel","setChildModels","models","detail","_find","childModel","label","introtext","content","text","message","Array","isArray","texts","_listItemCollection","ListItemCollection","createFromList","_detail","_context3","listitemHref","selfhref","listitem","equals","setSelfHref","grouping","_grouping","setGrouping","GroupingModel","dynamicschema","contexts","hasGrouping","hasGroups","hasResults","hasItems","shouldHide","HIDE_WHEN_EMPTY","actionCollection","isEmpty","filterCollection","hasActiveFilters","getListItemById","id","_context4","decodedId","decodeURIComponent","toString","result","getListItemByHref","href","_context5","paging","_paging","setPaging","PagingModel","sorting","_sorting","setSorting","SortingModel","getSortingLabels","_filterCollection","setFilters","FilterCollection","_filter","listkey","key","filter","isFiltered","_actionCollection","setActionCollection","ActionCollection","actions","hasList","selfLink","links","getLinkByKey","ListHref","_selfhref","headers","_headers","setHeaders","tempHeaders","results","_keys","forEach","attributes","attribute","listHeader","ListHeaderModel","exists","some","tempHeader","CASEVIEW_LINK","push","sortingLabels","attributeKey","getActionsByType","actionType","exports"],"sources":["../../../src/models/list/ListModel.js"],"sourcesContent":["// @flow\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\nimport ListItemCollection from \"../list/ListItemCollection\";\nimport ListDetailModel from \"../list/ListDetailModel\";\nimport ActionCollection from \"../actions/ActionCollection\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport GroupingModel from \"../grouping/GroupingModel\";\nimport ListHeaderModel from \"../list/ListHeaderModel\";\nimport ListHref from \"../href/ListHref\";\nimport ListItemModel from \"../list/ListItemModel\";\nimport PagingModel from \"../paging/PagingModel\";\nimport ResourceModel from \"../base/ResourceModel\";\nimport SortingModel from \"../sorting/SortingModel\";\nimport {\n CASEVIEW_LINK,\n HIDE_WHEN_EMPTY,\n SHOW_ONE_RESULT_AS_DETAIL,\n} from \"../../constants/LayoutHints\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * Defines a list object\n */\nexport default class ListModel extends ResourceModel {\n _detail: ?ListDetailModel = null;\n _headers: Array<ListHeaderModel>;\n _paging: PagingModel;\n _filterCollection: FilterCollection;\n _sorting: SortingModel;\n _actionCollection: ActionCollection;\n _listItemCollection: ListItemCollection;\n _grouping: GroupingModel;\n _selfhref: ListHref;\n\n /**\n */\n get type(): string {\n return \"List\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ListModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n const resourceType = data.contributions?.resourcetype ?? \"\";\n return (\n resourceType.endsWith(\"List\") ||\n resourceType.endsWith(\"ListPanel\") ||\n resourceType.endsWith(\"RelatedDataStorePanel\") ||\n resourceType.endsWith(\"RelatedDatastorePanel\") ||\n [\n \"list-related-cases\",\n \"RecordPanel\",\n \"EventHistoryPanel\",\n \"NotePanel\",\n \"AppointmentPanel\",\n \"DocumentPanel\",\n \"AssignmentPanel\",\n ].includes(resourceType)\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n if (\n this.layouthint.has(SHOW_ONE_RESULT_AS_DETAIL) &&\n this.listItemCollection.length === 1\n ) {\n return this.listItemCollection.map((listItem) => {\n const listDetailLink = listItem.selflink;\n listDetailLink.targetModel = ListDetailModel;\n return listDetailLink;\n });\n }\n\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.detail = models.find((childModel) => childModel.type === \"ListDetail\");\n }\n\n /**\n * Getting the label of the list\n */\n get label(): string {\n return this.contributions.label;\n }\n\n /**\n * Getting the introduction text\n */\n get introtext(): string {\n if (this.data.content) {\n return this.data.content.text.message;\n }\n\n if (this.contributions.text) {\n return this.contributions.text.message ?? this.contributions.text;\n }\n\n if (Array.isArray(this.contributions.texts)) {\n return this.contributions.texts[0].text;\n }\n\n return \"\";\n }\n\n /**\n * Getting the results\n */\n get listItemCollection(): ListItemCollection {\n if (!this._listItemCollection) {\n this._listItemCollection = ListItemCollection.createFromList(this);\n }\n\n return this._listItemCollection;\n }\n\n /**\n * Set results\n */\n set listItemCollection(listItemCollection: ListItemCollection) {\n this._listItemCollection = listItemCollection;\n }\n\n /**\n * Getting the detail\n */\n get detail(): ?ListDetailModel {\n return this._detail;\n }\n\n /**\n * Add detail model to the {ListModel}\n */\n set detail(detail: ?ModularUIModel) {\n if (detail instanceof ListDetailModel) {\n const listitemHref = detail.selfhref;\n\n const listitem = this.listItemCollection.find((listItem) =>\n listItem.selfhref.equals(listitemHref)\n );\n\n if (listitem) {\n detail.listitem = listitem;\n }\n\n this._detail = detail;\n }\n\n this.setSelfHref();\n }\n\n /**\n * Retrieve grouping information\n */\n get grouping(): GroupingModel {\n if (!this._grouping) {\n this._grouping = this.setGrouping();\n }\n\n return this._grouping;\n }\n\n /**\n */\n setGrouping(): GroupingModel {\n return new GroupingModel(\n { ...this.data.grouping, dynamicschema: this.data.dynamicschema },\n this.contributions.contexts\n );\n }\n\n /**\n */\n hasGrouping(): boolean {\n return this.grouping.hasGroups();\n }\n\n /**\n * Check if list has results\n */\n hasResults(): boolean {\n return this.listItemCollection.hasItems;\n }\n\n /**\n */\n get shouldHide(): boolean {\n return (\n this.layouthint.has(HIDE_WHEN_EMPTY) &&\n !this.hasResults() &&\n this.actionCollection.isEmpty &&\n !this.filterCollection.hasActiveFilters()\n );\n }\n\n /**\n * Get list item by ID\n */\n getListItemById(id: string | number): ListItemModel | null {\n const decodedId = decodeURIComponent(id.toString());\n return this.listItemCollection.find(\n (result) => result.id.toString() === decodedId\n );\n }\n\n /**\n * Get list item by Href\n */\n getListItemByHref(href: ListHref): ListItemModel | null {\n return this.listItemCollection.find((result) =>\n result.selfhref.equals(href)\n );\n }\n\n /**\n * Getting paging information\n */\n get paging(): PagingModel {\n if (!this._paging) {\n this._paging = this.setPaging();\n }\n return this._paging;\n }\n\n /**\n */\n setPaging(): PagingModel {\n return new PagingModel(this.data.paging, this.contributions.paging);\n }\n\n /**\n * Getting sorting information\n */\n get sorting(): SortingModel {\n if (!this._sorting) {\n this._sorting = this.setSorting();\n }\n\n return this._sorting;\n }\n\n /**\n */\n setSorting(): SortingModel {\n return new SortingModel(\n this.contributions,\n this.getSortingLabels(),\n this.grouping,\n this.data.sorting\n );\n }\n\n /**\n * Getting the filters\n */\n get filterCollection(): FilterCollection {\n if (!this._filterCollection) {\n this._filterCollection = this.setFilters();\n }\n\n return this._filterCollection;\n }\n\n /**\n * Set filterCollection\n */\n set filterCollection(filterCollection: FilterCollection) {\n this._filterCollection = filterCollection;\n }\n\n /**\n */\n setFilters(): FilterCollection {\n return new FilterCollection(this.data.filter, {\n listkey: this.key,\n filter: this.contributions.filter,\n contexts: this.contributions.contexts,\n dynamicschema: this.data.dynamicschema,\n });\n }\n\n /**\n * Indicates if list results are filtered\n */\n isFiltered(): boolean {\n return this.filterCollection.hasActiveFilters();\n }\n\n /**\n * Getting actions\n */\n get actionCollection(): ActionCollection {\n if (!this._actionCollection) {\n this._actionCollection = this.setActionCollection();\n }\n return this._actionCollection;\n }\n\n /**\n */\n setActionCollection(): ActionCollection {\n return new ActionCollection(this.data.actions, this.contributions.actions);\n }\n\n /**\n * Contains this model list data\n */\n hasList(): boolean {\n return this.key != null;\n }\n\n /**\n * Sets self href from links collection\n */\n setSelfHref(): ListHref {\n const selfLink = this.links ? this.links.getLinkByKey(\"self\") : null;\n\n if (selfLink !== null) {\n return new ListHref(selfLink.href, this);\n }\n\n return new ListHref();\n }\n\n /**\n * Getting the self link of this list\n */\n get selfhref(): ListHref {\n if (!this._selfhref) {\n this._selfhref = this.setSelfHref();\n }\n return this._selfhref;\n }\n\n /**\n * Getting the headers of this list\n */\n get headers(): Array<ListHeaderModel> {\n if (!this._headers) {\n this._headers = this.setHeaders();\n }\n\n return this._headers;\n }\n\n /**\n * Set initial headers of list\n */\n setHeaders(): Array<ListHeaderModel> {\n const tempHeaders = [];\n\n if (this.contributions.results) {\n const { results } = this.contributions;\n\n Object.keys(results).forEach((key) => {\n results[key].attributes.forEach((attribute) => {\n const listHeader = new ListHeaderModel(attribute, this.sorting);\n\n const exists = tempHeaders.some((tempHeader) =>\n tempHeader.equals(listHeader)\n );\n\n if (!exists && !listHeader.layouthint.has(CASEVIEW_LINK)) {\n tempHeaders.push(listHeader);\n }\n });\n });\n }\n\n return tempHeaders;\n }\n\n /**\n */\n getSortingLabels(): { [string]: string } {\n const sortingLabels: { [string]: string } = {};\n\n if (this.contributions.results) {\n const { results } = this.contributions;\n Object.keys(results).forEach((key) => {\n results[key].attributes.forEach((attribute) => {\n const attributeKey = Object.keys(attribute)[0];\n sortingLabels[attributeKey] = attribute[attributeKey].label;\n });\n });\n }\n\n return sortingLabels;\n }\n\n /**\n * Retrieve all actions by type\n */\n getActionsByType(actionType: string): ActionCollection {\n return this.actionCollection.getActionsByType(actionType);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,gBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,iBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,gBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,cAAA,GAAAT,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;IAEA,OAAON,WAAW;EACpB;;EAEA;AACF;EACEtB,gBAAgBA,CAAA,EAAyB;IACvC,MAAMmC,aAAmC,GAAG,CAAC,CAAC;IAE9C,IAAI,IAAI,CAAC9G,aAAa,CAACkG,OAAO,EAAE;MAC9B,MAAM;QAAEA;MAAQ,CAAC,GAAG,IAAI,CAAClG,aAAa;MACtC,IAAAmG,KAAA,CAAA1G,OAAA,EAAYyG,OAAO,CAAC,CAACE,OAAO,CAAEnB,GAAG,IAAK;QACpCiB,OAAO,CAACjB,GAAG,CAAC,CAACoB,UAAU,CAACD,OAAO,CAAEE,SAAS,IAAK;UAC7C,MAAMS,YAAY,GAAG,IAAAZ,KAAA,CAAA1G,OAAA,EAAY6G,SAAS,CAAC,CAAC,CAAC,CAAC;UAC9CQ,aAAa,CAACC,YAAY,CAAC,GAAGT,SAAS,CAACS,YAAY,CAAC,CAACxF,KAAK;QAC7D,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ;IAEA,OAAOuF,aAAa;EACtB;;EAEA;AACF;AACA;EACEE,gBAAgBA,CAACC,UAAkB,EAAoB;IACrD,OAAO,IAAI,CAAC5D,gBAAgB,CAAC2D,gBAAgB,CAACC,UAAU,CAAC;EAC3D;AACF;AAACC,OAAA,CAAAzH,OAAA,GAAAL,SAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LookupOptionCollection.js","names":["_ResourceCollection","_interopRequireDefault","require","_ChoiceAttributeOptionModel","LookupOptionCollection","ResourceCollection","create","data","contributions","collection","options","forEach","option","add","ChoiceAttributeOptionModel","elementsContributions","elements","_default","exports","default"],"sources":["../../../src/models/lookup/LookupOptionCollection.js"],"sourcesContent":["// @flow\nimport ResourceCollection from \"../base/ResourceCollection\";\nimport ChoiceAttributeOptionModel from \"../attributes/ChoiceAttributeOptionModel\";\n\n/**\n */\nclass LookupOptionCollection extends ResourceCollection<ChoiceAttributeOptionModel> {\n /**\n */\n static create(data: Object, contributions: Object): LookupOptionCollection {\n const collection = new LookupOptionCollection();\n\n if (data.options && contributions.options) {\n data.options.forEach((option) => {\n collection.add(\n new ChoiceAttributeOptionModel([], {\n ...option,\n elementsContributions: contributions.options[0].elements,\n })\n );\n });\n }\n\n return collection;\n }\n}\n\nexport default LookupOptionCollection;\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,2BAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA;AACA;AACA,MAAME,sBAAsB,SAASC,2BAAkB,CAA6B;EAClF;AACF;EACE,OAAOC,MAAMA,CAACC,IAAY,EAAEC,aAAqB,EAA0B;IACzE,MAAMC,UAAU,GAAG,IAAIL,sBAAsB,
|
|
1
|
+
{"version":3,"file":"LookupOptionCollection.js","names":["_ResourceCollection","_interopRequireDefault","require","_ChoiceAttributeOptionModel","LookupOptionCollection","ResourceCollection","create","data","contributions","collection","options","forEach","option","add","ChoiceAttributeOptionModel","elementsContributions","elements","_default","exports","default"],"sources":["../../../src/models/lookup/LookupOptionCollection.js"],"sourcesContent":["// @flow\nimport ResourceCollection from \"../base/ResourceCollection\";\nimport ChoiceAttributeOptionModel from \"../attributes/ChoiceAttributeOptionModel\";\n\n/**\n */\nclass LookupOptionCollection extends ResourceCollection<ChoiceAttributeOptionModel> {\n /**\n */\n static create(data: Object, contributions: Object): LookupOptionCollection {\n const collection = new LookupOptionCollection();\n\n if (data.options && contributions.options) {\n data.options.forEach((option) => {\n collection.add(\n new ChoiceAttributeOptionModel([], {\n ...option,\n elementsContributions: contributions.options[0].elements,\n })\n );\n });\n }\n\n return collection;\n }\n}\n\nexport default LookupOptionCollection;\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,2BAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA;AACA;AACA,MAAME,sBAAsB,SAASC,2BAAkB,CAA6B;EAClF;AACF;EACE,OAAOC,MAAMA,CAACC,IAAY,EAAEC,aAAqB,EAA0B;IACzE,MAAMC,UAAU,GAAG,IAAIL,sBAAsB,CAAC,CAAC;IAE/C,IAAIG,IAAI,CAACG,OAAO,IAAIF,aAAa,CAACE,OAAO,EAAE;MACzCH,IAAI,CAACG,OAAO,CAACC,OAAO,CAAEC,MAAM,IAAK;QAC/BH,UAAU,CAACI,GAAG,CACZ,IAAIC,mCAA0B,CAAC,EAAE,EAAE;UACjC,GAAGF,MAAM;UACTG,qBAAqB,EAAEP,aAAa,CAACE,OAAO,CAAC,CAAC,CAAC,CAACM;QAClD,CAAC,CACH,CAAC;MACH,CAAC,CAAC;IACJ;IAEA,OAAOP,UAAU;EACnB;AACF;AAAC,IAAAQ,QAAA,GAEcb,sBAAsB;AAAAc,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LookupOptionsModel.js","names":["_ResourceModel","_interopRequireDefault","require","_LookupOptionCollection","_FilterCollection","LookupOptionsModel","ResourceModel","constructor","modularuiResponse","_defineProperty2","default","_options","LookupOptionCollection","create","data","contributions","_filterCollection","createFilterCollection","_filter","type","modelName","isApplicableModel","resourcetype","options","FilterCollection","name","filter","filterCollection","exports"],"sources":["../../../src/models/lookup/LookupOptionsModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport LookupOptionCollection from \"../lookup/LookupOptionCollection\";\nimport FilterCollection from \"../filters/FilterCollection\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n */\nexport default class LookupOptionsModel extends ResourceModel {\n _options: LookupOptionCollection;\n _filterCollection: ?FilterCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._options = LookupOptionCollection.create(\n this.data,\n this.contributions\n );\n\n this._filterCollection = this.createFilterCollection(\n this.data.filter,\n this.contributions.filter\n );\n }\n\n /**\n */\n get type(): string {\n return \"LookupOptions\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"LookupOptionsModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"lookupOptions\"\n );\n }\n\n /**\n */\n get options(): LookupOptionCollection {\n return this._options;\n }\n\n /**\n */\n createFilterCollection(\n data: Object,\n contributions: Object\n ): FilterCollection {\n if (data && contributions) {\n return new FilterCollection(\n { [data.name]: data },\n { filter: contributions }\n );\n }\n\n return new FilterCollection();\n }\n\n /**\n * Getting the filters\n */\n get filterCollection(): ?FilterCollection {\n return this._filterCollection;\n }\n}\n"],"mappings":";;;;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAIA;AACA;AACe,MAAMG,kBAAkB,SAASC,sBAAa,CAAC;EAI5D;AACF;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAEzB,IAAI,CAACC,QAAQ,GAAGC,+BAAsB,CAACC,MAAM,CAC3C,IAAI,CAACC,IAAI,EACT,IAAI,CAACC,
|
|
1
|
+
{"version":3,"file":"LookupOptionsModel.js","names":["_ResourceModel","_interopRequireDefault","require","_LookupOptionCollection","_FilterCollection","LookupOptionsModel","ResourceModel","constructor","modularuiResponse","_defineProperty2","default","_options","LookupOptionCollection","create","data","contributions","_filterCollection","createFilterCollection","_filter","type","modelName","isApplicableModel","resourcetype","options","FilterCollection","name","filter","filterCollection","exports"],"sources":["../../../src/models/lookup/LookupOptionsModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport LookupOptionCollection from \"../lookup/LookupOptionCollection\";\nimport FilterCollection from \"../filters/FilterCollection\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n */\nexport default class LookupOptionsModel extends ResourceModel {\n _options: LookupOptionCollection;\n _filterCollection: ?FilterCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._options = LookupOptionCollection.create(\n this.data,\n this.contributions\n );\n\n this._filterCollection = this.createFilterCollection(\n this.data.filter,\n this.contributions.filter\n );\n }\n\n /**\n */\n get type(): string {\n return \"LookupOptions\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"LookupOptionsModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"lookupOptions\"\n );\n }\n\n /**\n */\n get options(): LookupOptionCollection {\n return this._options;\n }\n\n /**\n */\n createFilterCollection(\n data: Object,\n contributions: Object\n ): FilterCollection {\n if (data && contributions) {\n return new FilterCollection(\n { [data.name]: data },\n { filter: contributions }\n );\n }\n\n return new FilterCollection();\n }\n\n /**\n * Getting the filters\n */\n get filterCollection(): ?FilterCollection {\n return this._filterCollection;\n }\n}\n"],"mappings":";;;;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAIA;AACA;AACe,MAAMG,kBAAkB,SAASC,sBAAa,CAAC;EAI5D;AACF;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAEzB,IAAI,CAACC,QAAQ,GAAGC,+BAAsB,CAACC,MAAM,CAC3C,IAAI,CAACC,IAAI,EACT,IAAI,CAACC,aACP,CAAC;IAED,IAAI,CAACC,iBAAiB,GAAG,IAAI,CAACC,sBAAsB,KAAAC,OAAA,CAAAR,OAAA,EAClD,IAAI,CAACI,IAAI,OAAAI,OAAA,CAAAR,OAAA,EACT,IAAI,CAACK,aAAa,CACpB,CAAC;EACH;;EAEA;AACF;EACE,IAAII,IAAIA,CAAA,EAAW;IACjB,OAAO,eAAe;EACxB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,oBAAoB;EAC7B;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACP,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACC,aAAa,CAACO,YAAY,IAC/BR,IAAI,CAACC,aAAa,CAACO,YAAY,KAAK,eAAe;EAEvD;;EAEA;AACF;EACE,IAAIC,OAAOA,CAAA,EAA2B;IACpC,OAAO,IAAI,CAACZ,QAAQ;EACtB;;EAEA;AACF;EACEM,sBAAsBA,CACpBH,IAAY,EACZC,aAAqB,EACH;IAClB,IAAID,IAAI,IAAIC,aAAa,EAAE;MACzB,OAAO,IAAIS,yBAAgB,CACzB;QAAE,CAACV,IAAI,CAACW,IAAI,GAAGX;MAAK,CAAC,EACrB;QAAEY,MAAM,EAAEX;MAAc,CAC1B,CAAC;IACH;IAEA,OAAO,IAAIS,yBAAgB,CAAC,CAAC;EAC/B;;EAEA;AACF;AACA;EACE,IAAIG,gBAAgBA,CAAA,EAAsB;IACxC,OAAO,IAAI,CAACX,iBAAiB;EAC/B;AACF;AAACY,OAAA,CAAAlB,OAAA,GAAAL,kBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelCatalogModel.js","names":["_ResourceModel","_interopRequireDefault","require","_exceptions","ModelCatalogModel","ResourceModel","type","modelName","isApplicableModel","data","contributions","resourcetype","label","locale","conceptIndexLink","link","links","getLinkByKey","IllegalStateException","contentIndexLink","exports","default"],"sources":["../../../src/models/modelcatalog/ModelCatalogModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport type LinkModel from \"../links/LinkModel\";\nimport { IllegalStateException } from \"../../exceptions\";\n\n/**\n * The Application model\n */\nexport default class ModelCatalogModel extends ResourceModel {\n /**\n */\n get type(): string {\n return \"ModelCatalog\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ModelCatalogModel\";\n }\n\n /**\n */\n static isApplicableModel(data: Object): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ModelCatalog\"\n );\n }\n\n /**\n */\n get label(): string {\n return this.locale === \"nl\" ? \"Model catalogus\" : \"Model catalog\";\n }\n\n /**\n * Retrieve link to Concept Index model\n */\n get conceptIndexLink(): LinkModel {\n const link = this.links.getLinkByKey(\"concepts\");\n if (!link) {\n throw new IllegalStateException(\n \"Missing concepts index link in model catalog\"\n );\n }\n return link;\n }\n\n /**\n * Retrieve link to Content Index model\n */\n get contentIndexLink(): LinkModel {\n const link = this.links.getLinkByKey(\"content\");\n if (!link) {\n throw new IllegalStateException(\n \"Missing content index link in model catalog\"\n );\n }\n return link;\n }\n}\n"],"mappings":";;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACe,MAAME,iBAAiB,SAASC,sBAAa,CAAC;EAC3D;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,cAAc;EACvB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,mBAAmB;EAC5B;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACC,IAAY,EAAW;IAC9C,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,cAAc;EAEtD;;EAEA;AACF;EACE,IAAIC,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAACC,MAAM,KAAK,IAAI,GAAG,iBAAiB,GAAG,eAAe;EACnE;;EAEA;AACF;AACA;EACE,IAAIC,gBAAgBA,CAAA,EAAc;IAChC,MAAMC,IAAI,GAAG,IAAI,CAACC,KAAK,CAACC,YAAY,CAAC,UAAU,CAAC;IAChD,IAAI,CAACF,IAAI,EAAE;MACT,MAAM,IAAIG,iCAAqB,CAC7B,
|
|
1
|
+
{"version":3,"file":"ModelCatalogModel.js","names":["_ResourceModel","_interopRequireDefault","require","_exceptions","ModelCatalogModel","ResourceModel","type","modelName","isApplicableModel","data","contributions","resourcetype","label","locale","conceptIndexLink","link","links","getLinkByKey","IllegalStateException","contentIndexLink","exports","default"],"sources":["../../../src/models/modelcatalog/ModelCatalogModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport type LinkModel from \"../links/LinkModel\";\nimport { IllegalStateException } from \"../../exceptions\";\n\n/**\n * The Application model\n */\nexport default class ModelCatalogModel extends ResourceModel {\n /**\n */\n get type(): string {\n return \"ModelCatalog\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ModelCatalogModel\";\n }\n\n /**\n */\n static isApplicableModel(data: Object): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ModelCatalog\"\n );\n }\n\n /**\n */\n get label(): string {\n return this.locale === \"nl\" ? \"Model catalogus\" : \"Model catalog\";\n }\n\n /**\n * Retrieve link to Concept Index model\n */\n get conceptIndexLink(): LinkModel {\n const link = this.links.getLinkByKey(\"concepts\");\n if (!link) {\n throw new IllegalStateException(\n \"Missing concepts index link in model catalog\"\n );\n }\n return link;\n }\n\n /**\n * Retrieve link to Content Index model\n */\n get contentIndexLink(): LinkModel {\n const link = this.links.getLinkByKey(\"content\");\n if (!link) {\n throw new IllegalStateException(\n \"Missing content index link in model catalog\"\n );\n }\n return link;\n }\n}\n"],"mappings":";;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACe,MAAME,iBAAiB,SAASC,sBAAa,CAAC;EAC3D;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,cAAc;EACvB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,mBAAmB;EAC5B;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACC,IAAY,EAAW;IAC9C,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,cAAc;EAEtD;;EAEA;AACF;EACE,IAAIC,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAACC,MAAM,KAAK,IAAI,GAAG,iBAAiB,GAAG,eAAe;EACnE;;EAEA;AACF;AACA;EACE,IAAIC,gBAAgBA,CAAA,EAAc;IAChC,MAAMC,IAAI,GAAG,IAAI,CAACC,KAAK,CAACC,YAAY,CAAC,UAAU,CAAC;IAChD,IAAI,CAACF,IAAI,EAAE;MACT,MAAM,IAAIG,iCAAqB,CAC7B,8CACF,CAAC;IACH;IACA,OAAOH,IAAI;EACb;;EAEA;AACF;AACA;EACE,IAAII,gBAAgBA,CAAA,EAAc;IAChC,MAAMJ,IAAI,GAAG,IAAI,CAACC,KAAK,CAACC,YAAY,CAAC,SAAS,CAAC;IAC/C,IAAI,CAACF,IAAI,EAAE;MACT,MAAM,IAAIG,iCAAqB,CAC7B,6CACF,CAAC;IACH;IACA,OAAOH,IAAI;EACb;AACF;AAACK,OAAA,CAAAC,OAAA,GAAAjB,iBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PagingModel.js","names":["_objects","require","_PagesizeModel","_interopRequireDefault","PagingModel","constructor","paging","pagingContributions","_defineProperty2","default","_isEnabled","has","_contributions","_paging","_pagesize","PagesizeModel","pagesize","contributions","isEnabled","name","value","page","maxpages","totalResults","totalresults","exports"],"sources":["../../../src/models/paging/PagingModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport PagesizeModel from \"../paging/PagesizeModel\";\n\n/**\n */\nexport default class PagingModel {\n _contributions: Object;\n _paging: Object;\n _pagesize: PagesizeModel;\n _isEnabled: boolean;\n\n /**\n */\n constructor(paging: Object, pagingContributions: Object) {\n this._isEnabled = has(paging, \"page\");\n\n this._contributions = pagingContributions;\n this._paging = paging;\n\n this._pagesize = new PagesizeModel(\n this.paging.pagesize,\n this.contributions.pagesize\n );\n }\n\n /**\n */\n get contributions(): Object {\n return this._contributions || {};\n }\n\n /**\n */\n get isEnabled(): boolean {\n return this._isEnabled;\n }\n\n /**\n * Getting paging information\n */\n get paging(): Object {\n return this._paging || {};\n }\n\n /**\n * Get the paging parameter name\n */\n get name(): string {\n return \"page\";\n }\n\n /**\n * Getting paging value\n */\n get value(): number {\n return this.page;\n }\n\n /**\n * Get maximum pages\n */\n get maxpages(): number {\n return this.paging.maxpages;\n }\n\n /**\n * Get current page\n */\n get page(): number {\n return this.paging.page;\n }\n\n /**\n * Set current page\n */\n set page(page: number) {\n this.paging.page = page;\n }\n\n /**\n * Get the total number of results\n */\n get totalResults(): number {\n return this.paging.totalresults || -1;\n }\n\n /**\n */\n get pagesize(): PagesizeModel {\n return this._pagesize;\n }\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA;AACA;AACe,MAAMG,WAAW,CAAC;EAM/B;AACF;EACEC,WAAWA,CAACC,MAAc,EAAEC,mBAA2B,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IACvD,IAAI,CAACC,UAAU,GAAG,IAAAC,YAAG,EAACL,MAAM,EAAE,MAAM,CAAC;IAErC,IAAI,CAACM,cAAc,GAAGL,mBAAmB;IACzC,IAAI,CAACM,OAAO,GAAGP,MAAM;IAErB,IAAI,CAACQ,SAAS,GAAG,IAAIC,sBAAa,CAChC,IAAI,CAACT,MAAM,CAACU,QAAQ,EACpB,IAAI,CAACC,aAAa,CAACD,
|
|
1
|
+
{"version":3,"file":"PagingModel.js","names":["_objects","require","_PagesizeModel","_interopRequireDefault","PagingModel","constructor","paging","pagingContributions","_defineProperty2","default","_isEnabled","has","_contributions","_paging","_pagesize","PagesizeModel","pagesize","contributions","isEnabled","name","value","page","maxpages","totalResults","totalresults","exports"],"sources":["../../../src/models/paging/PagingModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport PagesizeModel from \"../paging/PagesizeModel\";\n\n/**\n */\nexport default class PagingModel {\n _contributions: Object;\n _paging: Object;\n _pagesize: PagesizeModel;\n _isEnabled: boolean;\n\n /**\n */\n constructor(paging: Object, pagingContributions: Object) {\n this._isEnabled = has(paging, \"page\");\n\n this._contributions = pagingContributions;\n this._paging = paging;\n\n this._pagesize = new PagesizeModel(\n this.paging.pagesize,\n this.contributions.pagesize\n );\n }\n\n /**\n */\n get contributions(): Object {\n return this._contributions || {};\n }\n\n /**\n */\n get isEnabled(): boolean {\n return this._isEnabled;\n }\n\n /**\n * Getting paging information\n */\n get paging(): Object {\n return this._paging || {};\n }\n\n /**\n * Get the paging parameter name\n */\n get name(): string {\n return \"page\";\n }\n\n /**\n * Getting paging value\n */\n get value(): number {\n return this.page;\n }\n\n /**\n * Get maximum pages\n */\n get maxpages(): number {\n return this.paging.maxpages;\n }\n\n /**\n * Get current page\n */\n get page(): number {\n return this.paging.page;\n }\n\n /**\n * Set current page\n */\n set page(page: number) {\n this.paging.page = page;\n }\n\n /**\n * Get the total number of results\n */\n get totalResults(): number {\n return this.paging.totalresults || -1;\n }\n\n /**\n */\n get pagesize(): PagesizeModel {\n return this._pagesize;\n }\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA;AACA;AACe,MAAMG,WAAW,CAAC;EAM/B;AACF;EACEC,WAAWA,CAACC,MAAc,EAAEC,mBAA2B,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IA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EACvC;;EAEA;AACF;EACE,IAAIR,QAAQA,CAAA,EAAkB;IAC5B,OAAO,IAAI,CAACF,SAAS;EACvB;AACF;AAACW,OAAA,CAAAhB,OAAA,GAAAL,WAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupingPanelModel.js","names":["_ResourceModel","_interopRequireDefault","require","_TaskGroupCollection","_TaskGroupModel","GroupingPanelModel","ResourceModel","constructor","modularuiResponse","_defineProperty2","default","createTaskGroupCollection","type","modelName","isApplicableModel","data","_context","contributions","resourcetype","_includes","call","label","getInitialChildModelLinks","links","getLinksByGroup","all","panelLinks","setChildModels","models","taskGroups","i","length","TaskGroupModel","push","taskGroupCollection","add","hasIntroText","introtext","_content","text","message","Array","isArray","texts","_context2","allTaskgroupsData","getData","allTaskgroupsContributions","getContribution","_map","_filter","taskgroup","some","taskgroupContribution","name","taskgroupContributions","_find","create","taskgroups","_taskGroupCollection","TaskGroupCollection","hasTaskGroups","hasItems","hasTasks","exports"],"sources":["../../../src/models/panels/GroupingPanelModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport TaskGroupCollection from \"../taskgroup/TaskGroupCollection\";\n\nimport TaskGroupModel from \"../taskgroup/TaskGroupModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type { ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type LinkCollection from \"../links/LinkCollection\";\n\n/**\n * Panel that groups other panels\n */\nexport default class GroupingPanelModel extends ResourceModel {\n _taskGroupCollection: TaskGroupCollection;\n\n /**\n * Constructs GroupingPanel\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this.createTaskGroupCollection();\n }\n\n /**\n */\n get type(): string {\n return \"GroupingPanel\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"GroupingPanelModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n [\"GroupingPanel\", \"CaseTabGroupingPanel\", \"TabGroupingPanel\"].includes(\n data.contributions.resourcetype\n )\n );\n }\n\n /**\n * Getting the label of the panel\n */\n get label(): string {\n return this.contributions.label;\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.links.getLinksByGroup(\"taskgroup\").all;\n }\n\n /**\n */\n get panelLinks(): LinkCollection {\n return this.links.getLinksByGroup(\"panel\");\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n const taskGroups = [];\n\n for (let i = 0; i < models.length; i++) {\n if (models[i] instanceof TaskGroupModel) {\n taskGroups.push(models[i]);\n }\n }\n\n this.taskGroupCollection.add(taskGroups);\n }\n\n /**\n * Check if an introtext exists for this caseview\n */\n hasIntroText(): boolean {\n return this.introtext !== \"\";\n }\n\n /**\n * Getting the introduction text configured on the grouping panel\n */\n get introtext(): string {\n if (this.data._content) {\n return this.data._content.text.message;\n }\n\n if (this.contributions.text) {\n return this.contributions.text.message ?? this.contributions.text;\n }\n\n if (Array.isArray(this.contributions.texts)) {\n return this.contributions.texts[0].text;\n }\n\n return \"\";\n }\n\n /**\n */\n createTaskGroupCollection() {\n const allTaskgroupsData = this.getData(\"taskgroups\", []);\n const allTaskgroupsContributions = this.getContribution(\"taskgroups\", []);\n\n this.taskGroupCollection = allTaskgroupsData\n .filter((taskgroup) =>\n allTaskgroupsContributions.some(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n )\n )\n .map((taskgroup) => {\n const taskgroupContributions = allTaskgroupsContributions.find(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n );\n\n return TaskGroupModel.create(\n taskgroup.name,\n taskgroup,\n taskgroupContributions\n );\n });\n }\n\n /**\n * Setting the taskgroup panel collection\n */\n set taskGroupCollection(taskgroups: Array<TaskGroupModel>) {\n this._taskGroupCollection = new TaskGroupCollection(taskgroups);\n }\n\n /**\n * Getting the taskgrouppanels on the tab\n */\n get taskGroupCollection(): TaskGroupCollection {\n return this._taskGroupCollection;\n }\n\n /**\n * Has taskgroups\n */\n hasTaskGroups(): boolean {\n return this.taskGroupCollection && this.taskGroupCollection.hasItems;\n }\n\n /**\n * Has tasks\n */\n hasTasks(): boolean {\n return this.taskGroupCollection.hasTasks();\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AAOA;AACA;AACA;AACe,MAAMG,kBAAkB,SAASC,sBAAa,CAAC;EAG5D;AACF;AACA;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;IAEzB,IAAI,CAACC,yBAAyB,
|
|
1
|
+
{"version":3,"file":"GroupingPanelModel.js","names":["_ResourceModel","_interopRequireDefault","require","_TaskGroupCollection","_TaskGroupModel","GroupingPanelModel","ResourceModel","constructor","modularuiResponse","_defineProperty2","default","createTaskGroupCollection","type","modelName","isApplicableModel","data","_context","contributions","resourcetype","_includes","call","label","getInitialChildModelLinks","links","getLinksByGroup","all","panelLinks","setChildModels","models","taskGroups","i","length","TaskGroupModel","push","taskGroupCollection","add","hasIntroText","introtext","_content","text","message","Array","isArray","texts","_context2","allTaskgroupsData","getData","allTaskgroupsContributions","getContribution","_map","_filter","taskgroup","some","taskgroupContribution","name","taskgroupContributions","_find","create","taskgroups","_taskGroupCollection","TaskGroupCollection","hasTaskGroups","hasItems","hasTasks","exports"],"sources":["../../../src/models/panels/GroupingPanelModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport TaskGroupCollection from \"../taskgroup/TaskGroupCollection\";\n\nimport TaskGroupModel from \"../taskgroup/TaskGroupModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type { ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type LinkCollection from \"../links/LinkCollection\";\n\n/**\n * Panel that groups other panels\n */\nexport default class GroupingPanelModel extends ResourceModel {\n _taskGroupCollection: TaskGroupCollection;\n\n /**\n * Constructs GroupingPanel\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this.createTaskGroupCollection();\n }\n\n /**\n */\n get type(): string {\n return \"GroupingPanel\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"GroupingPanelModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n [\"GroupingPanel\", \"CaseTabGroupingPanel\", \"TabGroupingPanel\"].includes(\n data.contributions.resourcetype\n )\n );\n }\n\n /**\n * Getting the label of the panel\n */\n get label(): string {\n return this.contributions.label;\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.links.getLinksByGroup(\"taskgroup\").all;\n }\n\n /**\n */\n get panelLinks(): LinkCollection {\n return this.links.getLinksByGroup(\"panel\");\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n const taskGroups = [];\n\n for (let i = 0; i < models.length; i++) {\n if (models[i] instanceof TaskGroupModel) {\n taskGroups.push(models[i]);\n }\n }\n\n this.taskGroupCollection.add(taskGroups);\n }\n\n /**\n * Check if an introtext exists for this caseview\n */\n hasIntroText(): boolean {\n return this.introtext !== \"\";\n }\n\n /**\n * Getting the introduction text configured on the grouping panel\n */\n get introtext(): string {\n if (this.data._content) {\n return this.data._content.text.message;\n }\n\n if (this.contributions.text) {\n return this.contributions.text.message ?? this.contributions.text;\n }\n\n if (Array.isArray(this.contributions.texts)) {\n return this.contributions.texts[0].text;\n }\n\n return \"\";\n }\n\n /**\n */\n createTaskGroupCollection() {\n const allTaskgroupsData = this.getData(\"taskgroups\", []);\n const allTaskgroupsContributions = this.getContribution(\"taskgroups\", []);\n\n this.taskGroupCollection = allTaskgroupsData\n .filter((taskgroup) =>\n allTaskgroupsContributions.some(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n )\n )\n .map((taskgroup) => {\n const taskgroupContributions = allTaskgroupsContributions.find(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n );\n\n return TaskGroupModel.create(\n taskgroup.name,\n taskgroup,\n taskgroupContributions\n );\n });\n }\n\n /**\n * Setting the taskgroup panel collection\n */\n set taskGroupCollection(taskgroups: Array<TaskGroupModel>) {\n this._taskGroupCollection = new TaskGroupCollection(taskgroups);\n }\n\n /**\n * Getting the taskgrouppanels on the tab\n */\n get taskGroupCollection(): TaskGroupCollection {\n return this._taskGroupCollection;\n }\n\n /**\n * Has taskgroups\n */\n hasTaskGroups(): boolean {\n return this.taskGroupCollection && this.taskGroupCollection.hasItems;\n }\n\n /**\n * Has tasks\n */\n hasTasks(): boolean {\n return this.taskGroupCollection.hasTasks();\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AAOA;AACA;AACA;AACe,MAAMG,kBAAkB,SAASC,sBAAa,CAAC;EAG5D;AACF;AACA;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;IAEzB,IAAI,CAACC,yBAAyB,CAAC,CAAC;EAClC;;EAEA;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,eAAe;EACxB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,oBAAoB;EAC7B;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACC,IAAuB,EAAW;IAAA,IAAAC,QAAA;IACzD,OACED,IAAI,CAACE,aAAa,CAACC,YAAY,IAC/B,IAAAC,SAAA,CAAAT,OAAA,EAAAM,QAAA,IAAC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I,CAACyB,oBAAoB;EAClC;;EAEA;AACF;AACA;EACEE,aAAaA,CAAA,EAAY;IACvB,OAAO,IAAI,CAAC3B,mBAAmB,IAAI,IAAI,CAACA,mBAAmB,CAAC4B,QAAQ;EACtE;;EAEA;AACF;AACA;EACEC,QAAQA,CAAA,EAAY;IAClB,OAAO,IAAI,CAAC7B,mBAAmB,CAAC6B,QAAQ,CAAC,CAAC;EAC5C;AACF;AAACC,OAAA,CAAAtD,OAAA,GAAAL,kBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessStatusSettingsModel.js","names":["_BaseModel","_interopRequireDefault","require","_Constants","_LinkCollection","_DateTimeUtil","ProcessStatusSettingsModel","BaseModel","concequenceType","getContribution","toLowerCase","transition","isApplicable","getData","isCompleted","isNeeded","needed","state","canComplete","links","LinkCollection","contributions","_links","referenceDate","DateUtil","now","conceptLink","getLinkByKey","href","addParameter","TIMEVERSION_FILTER_NAME","isCacheable","exports","default"],"sources":["../../../src/models/process/ProcessStatusSettingsModel.js"],"sourcesContent":["// @flow\nimport BaseModel from \"../base/BaseModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\nimport LinkCollection from \"../links/LinkCollection\";\nimport { DateUtil } from \"../../utils/datetime/DateTimeUtil\";\n\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n */\nexport default class ProcessStatusSettingsModel extends BaseModel {\n /**\n */\n get concequenceType(): string {\n return this.getContribution(\"consequenceType\", \"\").toLowerCase();\n }\n\n /**\n */\n get transition(): string {\n return this.getContribution(\"transition\", \"\").toLowerCase();\n }\n\n /**\n */\n get isApplicable(): boolean {\n return this.getData(\"applicable\", false);\n }\n\n /**\n */\n get isCompleted(): boolean {\n return this.getData(\"completed\", false);\n }\n\n /**\n */\n get isNeeded(): boolean | null {\n const needed = this.getData(\"needed\", \"unknown\");\n\n if (needed === \"unknown\") {\n return null;\n }\n\n return needed === \"true\";\n }\n\n /**\n */\n get state(): string | null {\n return this.getData(\"state\");\n }\n\n /**\n */\n get canComplete(): boolean | null {\n return this.getData(\"canComplete\");\n }\n\n /**\n */\n get links(): LinkCollection {\n return new LinkCollection(this.contributions._links);\n }\n\n /**\n */\n get referenceDate(): ISO_DATE {\n return DateUtil.now();\n }\n\n /**\n * Retrieve concept link of attribute when available\n */\n get conceptLink(): LinkModel | null {\n const conceptLink = this.links.getLinkByKey(\"concept\");\n if (conceptLink !== null) {\n conceptLink.href = conceptLink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this.referenceDate\n );\n\n conceptLink.isCacheable = true;\n }\n\n return conceptLink;\n }\n}\n"],"mappings":";;;;;;;AACA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAIA;AACA;AACe,MAAMI,0BAA0B,SAASC,kBAAS,CAAC;EAChE;AACF;EACE,IAAIC,eAAeA,CAAA,EAAW;IAC5B,OAAO,IAAI,CAACC,eAAe,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAACC,WAAW,
|
|
1
|
+
{"version":3,"file":"ProcessStatusSettingsModel.js","names":["_BaseModel","_interopRequireDefault","require","_Constants","_LinkCollection","_DateTimeUtil","ProcessStatusSettingsModel","BaseModel","concequenceType","getContribution","toLowerCase","transition","isApplicable","getData","isCompleted","isNeeded","needed","state","canComplete","links","LinkCollection","contributions","_links","referenceDate","DateUtil","now","conceptLink","getLinkByKey","href","addParameter","TIMEVERSION_FILTER_NAME","isCacheable","exports","default"],"sources":["../../../src/models/process/ProcessStatusSettingsModel.js"],"sourcesContent":["// @flow\nimport BaseModel from \"../base/BaseModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\nimport LinkCollection from \"../links/LinkCollection\";\nimport { DateUtil } from \"../../utils/datetime/DateTimeUtil\";\n\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n */\nexport default class ProcessStatusSettingsModel extends BaseModel {\n /**\n */\n get concequenceType(): string {\n return this.getContribution(\"consequenceType\", \"\").toLowerCase();\n }\n\n /**\n */\n get transition(): string {\n return this.getContribution(\"transition\", \"\").toLowerCase();\n }\n\n /**\n */\n get isApplicable(): boolean {\n return this.getData(\"applicable\", false);\n }\n\n /**\n */\n get isCompleted(): boolean {\n return this.getData(\"completed\", false);\n }\n\n /**\n */\n get isNeeded(): boolean | null {\n const needed = this.getData(\"needed\", \"unknown\");\n\n if (needed === \"unknown\") {\n return null;\n }\n\n return needed === \"true\";\n }\n\n /**\n */\n get state(): string | null {\n return this.getData(\"state\");\n }\n\n /**\n */\n get canComplete(): boolean | null {\n return this.getData(\"canComplete\");\n }\n\n /**\n */\n get links(): LinkCollection {\n return new LinkCollection(this.contributions._links);\n }\n\n /**\n */\n get referenceDate(): ISO_DATE {\n return DateUtil.now();\n }\n\n /**\n * Retrieve concept link of attribute when available\n */\n get conceptLink(): LinkModel | null {\n const conceptLink = this.links.getLinkByKey(\"concept\");\n if (conceptLink !== null) {\n conceptLink.href = conceptLink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this.referenceDate\n );\n\n conceptLink.isCacheable = true;\n }\n\n return conceptLink;\n }\n}\n"],"mappings":";;;;;;;AACA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAIA;AACA;AACe,MAAMI,0BAA0B,SAASC,kBAAS,CAAC;EAChE;AACF;EACE,IAAIC,eAAeA,CAAA,EAAW;IAC5B,OAAO,IAAI,CAACC,eAAe,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAACC,WAAW,CAAC,CAAC;EAClE;;EAEA;AACF;EACE,IAAIC,UAAUA,CAAA,EAAW;IACvB,OAAO,IAAI,CAACF,eAAe,CAAC,Y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AOL,WAAW;EACpB;AACF;AAACM,OAAA,CAAAC,OAAA,GAAA3B,0BAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveModel.js","names":["_objects","require","_ApplicationModel","_interopRequireDefault","_CaseSearchModel","_CaseViewModel","_DetailModel","_FormModel","_GroupingPanelModel","_ListModel","_ListDetailModel","_TabModel","_TaskGroupModel","_UserModel","_UserProfileModel","_UserServicesModel","_ModelCatalogModel","_ConceptIndexModel","_BusinessScenarioModel","_ConceptDetailModel","_ConceptTypeDetailModel","_ContentIndexModel","_ContentTOCModel","_ContentModel","_ContentTypeModel","_LookupOptionsModel","_exceptions","RESOURCE_MODELS","ApplicationModel","TabModel","ListDetailModel","ListModel","GroupingPanelModel","CaseSearchModel","CaseViewModel","DetailModel","TaskGroupModel","FormModel","UserModel","UserProfileModel","UserServicesModel","ModelCatalogModel","ConceptIndexModel","BusinessScenarioModel","ConceptDetailModel","ConceptTypeDetailModel","ContentIndexModel","ContentTOCModel","ContentModel","ContentTypeModel","LookupOptionsModel","resolveModel","data","availableModels","arguments","length","undefined","IllegalArgumentException","has","contributions","resourceTypeModel","_find","default","call","resourceModel","isApplicableModel","_default","exports"],"sources":["../../src/models/resolveModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport ApplicationModel from \"./application/ApplicationModel\";\nimport CaseSearchModel from \"./search/CaseSearchModel\";\nimport CaseViewModel from \"./caseview/CaseViewModel\";\nimport DetailModel from \"./detail/DetailModel\";\nimport FormModel from \"./form/FormModel\";\nimport GroupingPanelModel from \"./panels/GroupingPanelModel\";\nimport ListModel from \"./list/ListModel\";\nimport ListDetailModel from \"./list/ListDetailModel\";\nimport TabModel from \"./tab/TabModel\";\nimport TaskGroupModel from \"./taskgroup/TaskGroupModel\";\nimport UserModel from \"./user/UserModel\";\nimport UserProfileModel from \"./user/UserProfileModel\";\nimport UserServicesModel from \"./user/UserServicesModel\";\nimport ModelCatalogModel from \"./modelcatalog/ModelCatalogModel\";\nimport ConceptIndexModel from \"./concepts/ConceptIndexModel\";\nimport BusinessScenarioModel from \"./concepts/BusinessScenarioModel\";\nimport ConceptDetailModel from \"./concepts/ConceptDetailModel\";\nimport ConceptTypeDetailModel from \"./concepts/ConceptTypeDetailModel\";\nimport ContentIndexModel from \"./content/ContentIndexModel\";\nimport ContentTOCModel from \"./content/ContentTOCModel\";\nimport ContentModel from \"./content/ContentModel\";\nimport ContentTypeModel from \"./content/ContentTypeModel\";\nimport LookupOptionsModel from \"./lookup/LookupOptionsModel\";\n\nimport { IllegalArgumentException } from \"../exceptions\";\n\nimport type ModularUIResponse from \"../modularui/ModularUIResponse\";\nimport type { ModularUIModel } from \"./types\";\n\n/**\n * Mapping of models and resourcetypes\n */\nconst RESOURCE_MODELS = [\n ApplicationModel,\n TabModel,\n ListDetailModel,\n ListModel,\n GroupingPanelModel,\n CaseSearchModel,\n CaseViewModel,\n DetailModel,\n TaskGroupModel,\n FormModel,\n UserModel,\n UserProfileModel,\n UserServicesModel,\n ModelCatalogModel,\n ConceptIndexModel,\n BusinessScenarioModel,\n ConceptDetailModel,\n ConceptTypeDetailModel,\n ContentIndexModel,\n ContentTOCModel,\n ContentModel,\n ContentTypeModel,\n LookupOptionsModel,\n];\n\n/**\n * Resolve a model by resource\n */\nconst resolveModel = (\n data: ModularUIResponse,\n availableModels: Array<Class<ModularUIModel>> = RESOURCE_MODELS\n): Class<ModularUIModel> | null => {\n if (!data) {\n throw new IllegalArgumentException(\n \"No data or contribution available, cannot resolve model\"\n );\n }\n\n if (!has(data.contributions, \"resourcetype\")) {\n throw new IllegalArgumentException(\n \"Data has wrong format, missing resourcetype property in contributions, cannot resolve model\"\n );\n }\n\n const resourceTypeModel = availableModels.find((resourceModel) =>\n resourceModel.isApplicableModel(data)\n );\n\n if (resourceTypeModel) {\n return resourceTypeModel;\n }\n\n return null;\n};\n\nexport default resolveModel;\n"],"mappings":";;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA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2BAAkB,EAClBC,wBAAe,EACfC,sBAAa,EACbC,oBAAW,EACXC,uBAAc,EACdC,kBAAS,EACTC,kBAAS,EACTC,yBAAgB,EAChBC,0BAAiB,EACjBC,0BAAiB,EACjBC,0BAAiB,EACjBC,8BAAqB,EACrBC,2BAAkB,EAClBC,+BAAsB,EACtBC,0BAAiB,EACjBC,wBAAe,EACfC,qBAAY,EACZC,yBAAgB,EAChBC,2BAAkB,CACnB;;AAED;AACA;AACA;AACA,MAAMC,YAAY,GAAG,SAAAA,CACnBC,IAAuB,EAEU;EAAA,IADjCC,eAA6C,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG3B,eAAe;EAE/D,IAAI,CAACyB,IAAI,EAAE;IACT,MAAM,IAAIK,oCAAwB,CAChC,
|
|
1
|
+
{"version":3,"file":"resolveModel.js","names":["_objects","require","_ApplicationModel","_interopRequireDefault","_CaseSearchModel","_CaseViewModel","_DetailModel","_FormModel","_GroupingPanelModel","_ListModel","_ListDetailModel","_TabModel","_TaskGroupModel","_UserModel","_UserProfileModel","_UserServicesModel","_ModelCatalogModel","_ConceptIndexModel","_BusinessScenarioModel","_ConceptDetailModel","_ConceptTypeDetailModel","_ContentIndexModel","_ContentTOCModel","_ContentModel","_ContentTypeModel","_LookupOptionsModel","_exceptions","RESOURCE_MODELS","ApplicationModel","TabModel","ListDetailModel","ListModel","GroupingPanelModel","CaseSearchModel","CaseViewModel","DetailModel","TaskGroupModel","FormModel","UserModel","UserProfileModel","UserServicesModel","ModelCatalogModel","ConceptIndexModel","BusinessScenarioModel","ConceptDetailModel","ConceptTypeDetailModel","ContentIndexModel","ContentTOCModel","ContentModel","ContentTypeModel","LookupOptionsModel","resolveModel","data","availableModels","arguments","length","undefined","IllegalArgumentException","has","contributions","resourceTypeModel","_find","default","call","resourceModel","isApplicableModel","_default","exports"],"sources":["../../src/models/resolveModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport ApplicationModel from \"./application/ApplicationModel\";\nimport CaseSearchModel from \"./search/CaseSearchModel\";\nimport CaseViewModel from \"./caseview/CaseViewModel\";\nimport DetailModel from \"./detail/DetailModel\";\nimport FormModel from \"./form/FormModel\";\nimport GroupingPanelModel from \"./panels/GroupingPanelModel\";\nimport ListModel from \"./list/ListModel\";\nimport ListDetailModel from \"./list/ListDetailModel\";\nimport TabModel from \"./tab/TabModel\";\nimport TaskGroupModel from \"./taskgroup/TaskGroupModel\";\nimport UserModel from \"./user/UserModel\";\nimport UserProfileModel from \"./user/UserProfileModel\";\nimport UserServicesModel from \"./user/UserServicesModel\";\nimport ModelCatalogModel from \"./modelcatalog/ModelCatalogModel\";\nimport ConceptIndexModel from \"./concepts/ConceptIndexModel\";\nimport BusinessScenarioModel from \"./concepts/BusinessScenarioModel\";\nimport ConceptDetailModel from \"./concepts/ConceptDetailModel\";\nimport ConceptTypeDetailModel from \"./concepts/ConceptTypeDetailModel\";\nimport ContentIndexModel from \"./content/ContentIndexModel\";\nimport ContentTOCModel from \"./content/ContentTOCModel\";\nimport ContentModel from \"./content/ContentModel\";\nimport ContentTypeModel from \"./content/ContentTypeModel\";\nimport LookupOptionsModel from \"./lookup/LookupOptionsModel\";\n\nimport { IllegalArgumentException } from \"../exceptions\";\n\nimport type ModularUIResponse from \"../modularui/ModularUIResponse\";\nimport type { ModularUIModel } from \"./types\";\n\n/**\n * Mapping of models and resourcetypes\n */\nconst RESOURCE_MODELS = [\n ApplicationModel,\n TabModel,\n ListDetailModel,\n ListModel,\n GroupingPanelModel,\n CaseSearchModel,\n CaseViewModel,\n DetailModel,\n TaskGroupModel,\n FormModel,\n UserModel,\n UserProfileModel,\n UserServicesModel,\n ModelCatalogModel,\n ConceptIndexModel,\n BusinessScenarioModel,\n ConceptDetailModel,\n ConceptTypeDetailModel,\n ContentIndexModel,\n ContentTOCModel,\n ContentModel,\n ContentTypeModel,\n LookupOptionsModel,\n];\n\n/**\n * Resolve a model by resource\n */\nconst resolveModel = (\n data: ModularUIResponse,\n availableModels: Array<Class<ModularUIModel>> = RESOURCE_MODELS\n): Class<ModularUIModel> | null => {\n if (!data) {\n throw new IllegalArgumentException(\n \"No data or contribution available, cannot resolve model\"\n );\n }\n\n if (!has(data.contributions, \"resourcetype\")) {\n throw new IllegalArgumentException(\n \"Data has wrong format, missing resourcetype property in contributions, cannot resolve model\"\n );\n }\n\n const resourceTypeModel = availableModels.find((resourceModel) =>\n resourceModel.isApplicableModel(data)\n );\n\n if (resourceTypeModel) {\n return resourceTypeModel;\n }\n\n return null;\n};\n\nexport default resolveModel;\n"],"mappings":";;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,cAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,YAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,UAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,mBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,UAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,gBAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,SAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,eAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,UAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,iBAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,kBAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,kBAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,kBAAA,GAAAd,sBAAA,CAAAF,OAAA;AACA,IAAAiB,sBAAA,GAAAf,sBAAA,CAAAF,OAAA;AACA,IAAAkB,mBAAA,GAAAhB,sBAAA,CAAAF,OAAA;AACA,IA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ACtC,CAAC;EAED,IAAIQ,iBAAiB,EAAE;IACrB,OAAOA,iBAAiB;EAC1B;EAEA,OAAO,IAAI;AACb,CAAC;AAAC,IAAAM,QAAA,GAEaf,YAAY;AAAAgB,OAAA,CAAAL,OAAA,GAAAI,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSearchModel.js","names":["_ListModel","_interopRequireDefault","require","CaseSearchModel","ListModel","type","modelName","isApplicableModel","data","contributions","resourcetype","getQuickSearchFilters","_context","filterCollection","_filter","default","call","filter","isQuickSearch","hasQuickSearchFilters","length","exports"],"sources":["../../../src/models/search/CaseSearchModel.js"],"sourcesContent":["// @flow\nimport ListModel from \"../list/ListModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type { FilterType } from \"../types\";\n\n/**\n * Case search model\n */\nexport default class CaseSearchModel extends ListModel {\n /**\n */\n get type(): string {\n return \"CaseSearch\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"CaseSearchModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"CaseSearch\"\n );\n }\n\n /**\n * Retrieve quick search filters\n */\n getQuickSearchFilters(): Array<FilterType> {\n return this.filterCollection\n ? this.filterCollection.filter((filter) => filter.isQuickSearch())\n : [];\n }\n\n /**\n */\n hasQuickSearchFilters(): boolean {\n return this.getQuickSearchFilters().length > 0;\n }\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA;AACA;AACA;AACe,MAAMC,eAAe,SAASC,kBAAS,CAAC;EACrD;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,YAAY;EACrB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,iBAAiB;EAC1B;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACC,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,YAAY;EAEpD;;EAEA;AACF;AACA;EACEC,qBAAqBA,CAAA,EAAsB;IAAA,IAAAC,QAAA;IACzC,OAAO,IAAI,CAACC,gBAAgB,GACxB,IAAAC,OAAA,CAAAC,OAAA,EAAAH,QAAA,OAAI,CAACC,gBAAgB,EAAAG,IAAA,CAAAJ,QAAA,EAASK,MAAM,IAAKA,MAAM,CAACC,aAAa,
|
|
1
|
+
{"version":3,"file":"CaseSearchModel.js","names":["_ListModel","_interopRequireDefault","require","CaseSearchModel","ListModel","type","modelName","isApplicableModel","data","contributions","resourcetype","getQuickSearchFilters","_context","filterCollection","_filter","default","call","filter","isQuickSearch","hasQuickSearchFilters","length","exports"],"sources":["../../../src/models/search/CaseSearchModel.js"],"sourcesContent":["// @flow\nimport ListModel from \"../list/ListModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type { FilterType } from \"../types\";\n\n/**\n * Case search model\n */\nexport default class CaseSearchModel extends ListModel {\n /**\n */\n get type(): string {\n return \"CaseSearch\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"CaseSearchModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"CaseSearch\"\n );\n }\n\n /**\n * Retrieve quick search filters\n */\n getQuickSearchFilters(): Array<FilterType> {\n return this.filterCollection\n ? this.filterCollection.filter((filter) => filter.isQuickSearch())\n : [];\n }\n\n /**\n */\n hasQuickSearchFilters(): boolean {\n return this.getQuickSearchFilters().length > 0;\n }\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA;AACA;AACA;AACe,MAAMC,eAAe,SAASC,kBAAS,CAAC;EACrD;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,YAAY;EACrB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,iBAAiB;EAC1B;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACC,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,YAAY;EAEpD;;EAEA;AACF;AACA;EACEC,qBAAqBA,CAAA,EAAsB;IAAA,IAAAC,QAAA;IACzC,OAAO,IAAI,CAACC,gBAAgB,GACxB,IAAAC,OAAA,CAAAC,OAAA,EAAAH,QAAA,OAAI,CAACC,gBAAgB,EAAAG,IAAA,CAAAJ,QAAA,EAASK,MAAM,IAAKA,MAAM,CAACC,aAAa,CAAC,CAAC,CAAC,GAChE,EAAE;EACR;;EAEA;AACF;EACEC,qBAAqBA,CAAA,EAAY;IAC/B,OAAO,IAAI,CAACR,qBAAqB,CAAC,CAAC,CAACS,MAAM,GAAG,CAAC;EAChD;AACF;AAACC,OAAA,CAAAN,OAAA,GAAAZ,eAAA"}
|
|
@@ -87,7 +87,7 @@ class SortingModel extends _BaseCollection.default {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
|
-
* @see {@link getUpdateQuerystring}
|
|
90
|
+
* @see {@link SortingModel#getUpdateQuerystring}
|
|
91
91
|
*/
|
|
92
92
|
getUpdateQuerystringBySortOption(sortOption) {
|
|
93
93
|
if (!(sortOption instanceof _SortOptionModel.default)) {
|
|
@@ -97,7 +97,7 @@ class SortingModel extends BaseCollection<SortOptionModel> {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
* @see {@link getUpdateQuerystring}
|
|
100
|
+
* @see {@link SortingModel#getUpdateQuerystring}
|
|
101
101
|
*/
|
|
102
102
|
getUpdateQuerystringBySortOption(sortOption: SortOptionModel): string {
|
|
103
103
|
if (!(sortOption instanceof SortOptionModel)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortingModel.js","names":["_objects","require","_BaseCollection","_interopRequireDefault","_SortOptionModel","_ListHref","_IllegalArgumentException","SortingModel","BaseCollection","constructor","contributions","labels","grouping","currentSort","has","sorting","_context","collection","_map","default","attributes","call","attributeKey","label","group","getGroupByAttributeKey","SortOptionModel","setSelected","name","value","_context2","_context3","_filter","option","selected","join","param","options","arguments","length","undefined","split","forEach","sortItem","key","direction","sortorder","getUpdateQuerystring","optionKey","_context4","_context5","IllegalArgumentException","oppositeValue","getUpdateQuerystringBySortOption","sortOption","createListHref","listHref","listhref","ListHref","hasPage","prefix","hasParameter","page","sort","_default","exports"],"sources":["../../../src/models/sorting/SortingModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport BaseCollection from \"../base/BaseCollection\";\nimport SortOptionModel from \"../sorting/SortOptionModel\";\nimport ListHref from \"../href/ListHref\";\n\nimport type GroupingModel from \"../grouping/GroupingModel\";\nimport IllegalArgumentException from \"../../exceptions/IllegalArgumentException\";\n\n/**\n */\nclass SortingModel extends BaseCollection<SortOptionModel> {\n /**\n */\n constructor(\n contributions: Object,\n labels: { [key: string]: string },\n grouping: GroupingModel,\n currentSort: string\n ) {\n super();\n\n if (has(contributions?.sorting, \"attributes\")) {\n this.collection = contributions.sorting.attributes.map((attributeKey) => {\n const label = labels[attributeKey];\n const group = grouping && grouping.getGroupByAttributeKey(attributeKey);\n\n return new SortOptionModel(attributeKey, label, group);\n });\n\n this.setSelected(currentSort);\n }\n }\n\n /**\n */\n get name(): string {\n return \"sort\";\n }\n\n /**\n */\n get value(): string {\n return this.filter((option) => option.selected)\n .map((option) => option.value)\n .join(\",\");\n }\n\n /**\n */\n get param(): string {\n return this.value;\n }\n\n /**\n */\n get options(): Array<SortOptionModel> {\n return this.collection;\n }\n\n /**\n */\n setSelected(currentSort: string = \"\") {\n currentSort.split(\",\").forEach((sortItem) => {\n const [key, direction] = sortItem.split(\" \");\n\n this.collection.forEach((option) => {\n if (option.key === key) {\n option.selected = true;\n if (direction === \"asc\") {\n option.sortorder = \"asc\";\n } else if (direction === \"desc\") {\n option.sortorder = \"desc\";\n }\n }\n });\n });\n }\n\n /**\n * Retrieve a sort option from the model that can be used in the querystring to set it in the opposite direction\n * For example a sort option in the model with key books and direction descending will be retrieved as 'Books asc'\n */\n getUpdateQuerystring(optionKey: string): string {\n if (!optionKey) {\n throw new IllegalArgumentException(\n \"Missing option key as input argument\"\n );\n }\n\n return this.filter((option) => option.key === optionKey)\n .map((option) =>\n option.key === optionKey ? option.oppositeValue : option.value\n )\n .join(\",\");\n }\n\n /**\n * @see {@link getUpdateQuerystring}\n */\n getUpdateQuerystringBySortOption(sortOption: SortOptionModel): string {\n if (!(sortOption instanceof SortOptionModel)) {\n throw new IllegalArgumentException(\n \"Missing SortOptionModel as input argument\"\n );\n }\n\n return this.getUpdateQuerystring(sortOption.key);\n }\n\n /**\n */\n createListHref(listHref: ListHref, sortOption: SortOptionModel): ListHref {\n const listhref = new ListHref(listHref);\n const hasPage = listhref.prefix\n ? listhref.hasParameter(\"page\", listhref.prefix)\n : listhref.hasParameter(\"page\");\n if (hasPage) {\n listhref.page = 1;\n }\n listhref.sort = this.getUpdateQuerystringBySortOption(sortOption);\n\n return listhref;\n }\n}\n\nexport default SortingModel;\n"],"mappings":";;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,SAAA,GAAAF,sBAAA,CAAAF,OAAA;AAGA,IAAAK,yBAAA,GAAAH,sBAAA,CAAAF,OAAA;AAEA;AACA;AACA,MAAMM,YAAY,SAASC,uBAAc,CAAkB;EACzD;AACF;EACEC,WAAWA,CACTC,aAAqB,EACrBC,MAAiC,EACjCC,QAAuB,EACvBC,WAAmB,EACnB;IACA,KAAK,
|
|
1
|
+
{"version":3,"file":"SortingModel.js","names":["_objects","require","_BaseCollection","_interopRequireDefault","_SortOptionModel","_ListHref","_IllegalArgumentException","SortingModel","BaseCollection","constructor","contributions","labels","grouping","currentSort","has","sorting","_context","collection","_map","default","attributes","call","attributeKey","label","group","getGroupByAttributeKey","SortOptionModel","setSelected","name","value","_context2","_context3","_filter","option","selected","join","param","options","arguments","length","undefined","split","forEach","sortItem","key","direction","sortorder","getUpdateQuerystring","optionKey","_context4","_context5","IllegalArgumentException","oppositeValue","getUpdateQuerystringBySortOption","sortOption","createListHref","listHref","listhref","ListHref","hasPage","prefix","hasParameter","page","sort","_default","exports"],"sources":["../../../src/models/sorting/SortingModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport BaseCollection from \"../base/BaseCollection\";\nimport SortOptionModel from \"../sorting/SortOptionModel\";\nimport ListHref from \"../href/ListHref\";\n\nimport type GroupingModel from \"../grouping/GroupingModel\";\nimport IllegalArgumentException from \"../../exceptions/IllegalArgumentException\";\n\n/**\n */\nclass SortingModel extends BaseCollection<SortOptionModel> {\n /**\n */\n constructor(\n contributions: Object,\n labels: { [key: string]: string },\n grouping: GroupingModel,\n currentSort: string\n ) {\n super();\n\n if (has(contributions?.sorting, \"attributes\")) {\n this.collection = contributions.sorting.attributes.map((attributeKey) => {\n const label = labels[attributeKey];\n const group = grouping && grouping.getGroupByAttributeKey(attributeKey);\n\n return new SortOptionModel(attributeKey, label, group);\n });\n\n this.setSelected(currentSort);\n }\n }\n\n /**\n */\n get name(): string {\n return \"sort\";\n }\n\n /**\n */\n get value(): string {\n return this.filter((option) => option.selected)\n .map((option) => option.value)\n .join(\",\");\n }\n\n /**\n */\n get param(): string {\n return this.value;\n }\n\n /**\n */\n get options(): Array<SortOptionModel> {\n return this.collection;\n }\n\n /**\n */\n setSelected(currentSort: string = \"\") {\n currentSort.split(\",\").forEach((sortItem) => {\n const [key, direction] = sortItem.split(\" \");\n\n this.collection.forEach((option) => {\n if (option.key === key) {\n option.selected = true;\n if (direction === \"asc\") {\n option.sortorder = \"asc\";\n } else if (direction === \"desc\") {\n option.sortorder = \"desc\";\n }\n }\n });\n });\n }\n\n /**\n * Retrieve a sort option from the model that can be used in the querystring to set it in the opposite direction\n * For example a sort option in the model with key books and direction descending will be retrieved as 'Books asc'\n */\n getUpdateQuerystring(optionKey: string): string {\n if (!optionKey) {\n throw new IllegalArgumentException(\n \"Missing option key as input argument\"\n );\n }\n\n return this.filter((option) => option.key === optionKey)\n .map((option) =>\n option.key === optionKey ? option.oppositeValue : option.value\n )\n .join(\",\");\n }\n\n /**\n * @see {@link SortingModel#getUpdateQuerystring}\n */\n getUpdateQuerystringBySortOption(sortOption: SortOptionModel): string {\n if (!(sortOption instanceof SortOptionModel)) {\n throw new IllegalArgumentException(\n \"Missing SortOptionModel as input argument\"\n );\n }\n\n return this.getUpdateQuerystring(sortOption.key);\n }\n\n /**\n */\n createListHref(listHref: ListHref, sortOption: SortOptionModel): ListHref {\n const listhref = new ListHref(listHref);\n const hasPage = listhref.prefix\n ? listhref.hasParameter(\"page\", listhref.prefix)\n : listhref.hasParameter(\"page\");\n if (hasPage) {\n listhref.page = 1;\n }\n listhref.sort = this.getUpdateQuerystringBySortOption(sortOption);\n\n return listhref;\n }\n}\n\nexport default SortingModel;\n"],"mappings":";;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,SAAA,GAAAF,sBAAA,CAAAF,OAAA;AAGA,IAAAK,yBAAA,GAAAH,sBAAA,CAAAF,OAAA;AAEA;AACA;AACA,MAAMM,YAAY,SAASC,uBAAc,CAAkB;EACzD;AACF;EACEC,WAAWA,CACTC,aAAqB,EACrBC,MAAiC,EACjCC,QAAuB,EACvBC,WAAmB,EACnB;IACA,KAAK,CAAC,CAAC;IAEP,IAAI,IAAAC,YAAG,EAACJ,aAAa,EAAEK,OAAO,EAAE,YAAY,CAAC,EAAE;MAAA,IAAAC,QAA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;EACEW,cAAcA,CAACC,QAAkB,EAAEF,UAA2B,EAAY;IACxE,MAAMG,QAAQ,GAAG,IAAIC,iBAAQ,CAACF,QAAQ,CAAC;IACvC,MAAMG,OAAO,GAAGF,QAAQ,CAACG,MAAM,GAC3BH,QAAQ,CAACI,YAAY,CAAC,MAAM,EAAEJ,QAAQ,CAACG,MAAM,CAAC,GAC9CH,QAAQ,CAACI,YAAY,CAAC,MAAM,CAAC;IACjC,IAAIF,OAAO,EAAE;MACXF,QAAQ,CAACK,IAAI,GAAG,CAAC;IACnB;IACAL,QAAQ,CAACM,IAAI,GAAG,IAAI,CAACV,gCAAgC,CAACC,UAAU,CAAC;IAEjE,OAAOG,QAAQ;EACjB;AACF;AAAC,IAAAO,QAAA,GAEczD,YAAY;AAAA0D,OAAA,CAAA9C,OAAA,GAAA6C,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabModel.js","names":["_TaskGroupCollection","_interopRequireDefault","require","_ResourceModel","_TaskGroupModel","_ActionCollection","TabModel","ResourceModel","constructor","modularuiResponse","_defineProperty2","default","createTaskGroupCollection","_actionCollection","ActionCollection","data","actions","contributions","type","modelName","isApplicableModel","_context","_context2","resourcetype","_endsWith","call","getInitialChildModelLinks","links","getLinksByGroup","all","setChildModels","models","taskGroups","i","length","TaskGroupModel","push","taskGroupCollection","add","searchLink","first","_context3","_context4","taskgroups","_filter","_map","taskgroup","_context5","taskgroupContributions","_find","taskgroupContribution","name","create","_taskGroupCollection","TaskGroupCollection","label","getContribution","components","actionCollection","hasComponents","size","hasTaskGroups","hasItems","hasActions","exports"],"sources":["../../../src/models/tab/TabModel.js"],"sourcesContent":["// @flow\nimport TaskGroupCollection from \"../taskgroup/TaskGroupCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\nimport TaskGroupModel from \"../taskgroup/TaskGroupModel\";\nimport ActionCollection from \"../actions/ActionCollection\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type LinkCollection from \"../links/LinkCollection\";\n\n/**\n * Describes a TabModel\n */\nexport default class TabModel extends ResourceModel {\n _actionCollection: ActionCollection;\n _taskGroupCollection: TaskGroupCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this.createTaskGroupCollection();\n\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n }\n\n /**\n */\n get type(): string {\n return \"Tab\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"TabModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n (data.contributions.resourcetype.endsWith(\"Tab\") ||\n data.contributions.resourcetype.endsWith(\"KnowledgeBank\"))\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.links.getLinksByGroup(\"taskgroup\", \"actions\").all;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n const taskGroups = [];\n\n for (let i = 0; i < models.length; i++) {\n if (models[i] instanceof TaskGroupModel) {\n taskGroups.push(models[i]);\n }\n }\n\n this.taskGroupCollection.add(taskGroups);\n }\n\n /**\n */\n get searchLink(): ?LinkModel {\n return this.links.getLinksByGroup(\"search\").first;\n }\n\n /**\n */\n createTaskGroupCollection() {\n this.taskGroupCollection = this.data.taskgroups\n ? this.data.taskgroups\n .map((taskgroup) => {\n const taskgroupContributions = this.contributions.taskgroups.find(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n );\n\n if (taskgroupContributions) {\n return TaskGroupModel.create(\n taskgroup.name,\n taskgroup,\n taskgroupContributions\n );\n }\n\n return null;\n })\n .filter((taskgroup) => taskgroup != null)\n : [];\n }\n\n /**\n * Getting the taskgrouppanels on the tab\n */\n get taskGroupCollection(): TaskGroupCollection {\n return this._taskGroupCollection;\n }\n\n /**\n * Setting the taskgroup panel collection\n */\n set taskGroupCollection(taskgroups: Array<TaskGroupModel>) {\n this._taskGroupCollection = new TaskGroupCollection(taskgroups);\n }\n\n /**\n * Getting the label of the tab\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Getting the component links on the tab\n */\n get components(): LinkCollection {\n return this.links.getLinksByGroup(\"component\", \"search\");\n }\n\n /**\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n\n /**\n * Has component links\n */\n hasComponents(): boolean {\n return this.components.size > 0;\n }\n\n /**\n * Has taskgroups\n */\n hasTaskGroups(): boolean {\n return this.taskGroupCollection && this.taskGroupCollection?.hasItems;\n }\n\n /**\n */\n hasActions(): boolean {\n return this.actionCollection && this.actionCollection.hasItems;\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,oBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAOA;AACA;AACA;AACe,MAAMI,QAAQ,SAASC,sBAAa,CAAC;EAIlD;AACF;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAEzB,IAAI,CAACC,yBAAyB,
|
|
1
|
+
{"version":3,"file":"TabModel.js","names":["_TaskGroupCollection","_interopRequireDefault","require","_ResourceModel","_TaskGroupModel","_ActionCollection","TabModel","ResourceModel","constructor","modularuiResponse","_defineProperty2","default","createTaskGroupCollection","_actionCollection","ActionCollection","data","actions","contributions","type","modelName","isApplicableModel","_context","_context2","resourcetype","_endsWith","call","getInitialChildModelLinks","links","getLinksByGroup","all","setChildModels","models","taskGroups","i","length","TaskGroupModel","push","taskGroupCollection","add","searchLink","first","_context3","_context4","taskgroups","_filter","_map","taskgroup","_context5","taskgroupContributions","_find","taskgroupContribution","name","create","_taskGroupCollection","TaskGroupCollection","label","getContribution","components","actionCollection","hasComponents","size","hasTaskGroups","hasItems","hasActions","exports"],"sources":["../../../src/models/tab/TabModel.js"],"sourcesContent":["// @flow\nimport TaskGroupCollection from \"../taskgroup/TaskGroupCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\nimport TaskGroupModel from \"../taskgroup/TaskGroupModel\";\nimport ActionCollection from \"../actions/ActionCollection\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type LinkCollection from \"../links/LinkCollection\";\n\n/**\n * Describes a TabModel\n */\nexport default class TabModel extends ResourceModel {\n _actionCollection: ActionCollection;\n _taskGroupCollection: TaskGroupCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this.createTaskGroupCollection();\n\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n }\n\n /**\n */\n get type(): string {\n return \"Tab\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"TabModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n (data.contributions.resourcetype.endsWith(\"Tab\") ||\n data.contributions.resourcetype.endsWith(\"KnowledgeBank\"))\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.links.getLinksByGroup(\"taskgroup\", \"actions\").all;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n const taskGroups = [];\n\n for (let i = 0; i < models.length; i++) {\n if (models[i] instanceof TaskGroupModel) {\n taskGroups.push(models[i]);\n }\n }\n\n this.taskGroupCollection.add(taskGroups);\n }\n\n /**\n */\n get searchLink(): ?LinkModel {\n return this.links.getLinksByGroup(\"search\").first;\n }\n\n /**\n */\n createTaskGroupCollection() {\n this.taskGroupCollection = this.data.taskgroups\n ? this.data.taskgroups\n .map((taskgroup) => {\n const taskgroupContributions = this.contributions.taskgroups.find(\n (taskgroupContribution) =>\n taskgroupContribution.name === taskgroup.name\n );\n\n if (taskgroupContributions) {\n return TaskGroupModel.create(\n taskgroup.name,\n taskgroup,\n taskgroupContributions\n );\n }\n\n return null;\n })\n .filter((taskgroup) => taskgroup != null)\n : [];\n }\n\n /**\n * Getting the taskgrouppanels on the tab\n */\n get taskGroupCollection(): TaskGroupCollection {\n return this._taskGroupCollection;\n }\n\n /**\n * Setting the taskgroup panel collection\n */\n set taskGroupCollection(taskgroups: Array<TaskGroupModel>) {\n this._taskGroupCollection = new TaskGroupCollection(taskgroups);\n }\n\n /**\n * Getting the label of the tab\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Getting the component links on the tab\n */\n get components(): LinkCollection {\n return this.links.getLinksByGroup(\"component\", \"search\");\n }\n\n /**\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n\n /**\n * Has component links\n */\n hasComponents(): boolean {\n return this.components.size > 0;\n }\n\n /**\n * Has taskgroups\n */\n hasTaskGroups(): boolean {\n return this.taskGroupCollection && this.taskGroupCollection?.hasItems;\n }\n\n /**\n */\n hasActions(): boolean {\n return this.actionCollection && this.actionCollection.hasItems;\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,oBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAOA;AACA;AACA;AACe,MAAMI,QAAQ,SAASC,sBAAa,CAAC;EAIlD;AACF;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAEzB,IAAI,CAACC,yBAAyB,CAAC,CAAC;IA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AA,EAAmB;IAC/B,OAAO,IAAI,CAAC9B,KAAK,CAACC,eAAe,CAAC,WAAW,EAAE,QAAQ,CAAC;EAC1D;;EAEA;AACF;EACE,IAAI8B,gBAAgBA,CAAA,EAAqB;IACvC,OAAO,IAAI,CAAC7C,iBAAiB;EAC/B;;EAEA;AACF;AACA;EACE8C,aAAaA,CAAA,EAAY;IACvB,OAAO,IAAI,CAACF,UAAU,CAACG,IAAI,GAAG,CAAC;EACjC;;EAEA;AACF;AACA;EACEC,aAAaA,CAAA,EAAY;IACvB,OAAO,IAAI,CAACxB,mBAAmB,IAAI,IAAI,CAACA,mBAAmB,EAAEyB,QAAQ;EACvE;;EAEA;AACF;EACEC,UAAUA,CAAA,EAAY;IACpB,OAAO,IAAI,CAACL,gBAAgB,IAAI,IAAI,CAACA,gBAAgB,CAACI,QAAQ;EAChE;AACF;AAACE,OAAA,CAAArD,OAAA,GAAAL,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskGroupModel.js","names":["_ActionCollection","_interopRequireDefault","require","_ResourceModel","_ModularUIResponse","TaskGroupModel","ResourceModel","constructor","modularuiResponse","_defineProperty2","default","_actionCollection","ActionCollection","data","actions","contributions","selfHref","links","getLinkByKey","selflink","href","_key","substring","lastIndexOf","name","create","key","taskgroup","ModularUIResponse","type","modelName","isApplicableModel","resourcetype","label","actionCollection","exports"],"sources":["../../../src/models/taskgroup/TaskGroupModel.js"],"sourcesContent":["// @flow\nimport ActionCollection from \"../actions/ActionCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\n/**\n * TaskGroupModel\n */\nexport default class TaskGroupModel extends ResourceModel {\n _key: string;\n _actionCollection: ActionCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n\n const selfHref = this.links.getLinkByKey(\"self\")\n ? this.selflink.href.href\n : null;\n\n this._key = selfHref\n ? selfHref.substring(selfHref.lastIndexOf(\"/\") + 1)\n : this.data.name;\n }\n\n /**\n */\n static create(\n key: string,\n data: Object,\n contributions: Object\n ): TaskGroupModel {\n const taskgroup = new ModularUIResponse();\n taskgroup.key = key;\n taskgroup.data = data;\n taskgroup.contributions = contributions;\n\n return new TaskGroupModel(taskgroup);\n }\n\n /**\n */\n get type(): string {\n return \"TaskGroup\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"TaskGroupModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"TaskGroup\"\n );\n }\n\n /**\n * Get the key of the TaskGroup\n */\n get key(): string {\n return this._key;\n }\n\n /**\n * Get the label of the TaskGroup\n */\n get label(): string {\n return this.contributions.label;\n }\n\n /**\n * Retrieve actions of taskgroup\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,kBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA;AACA;AACA;AACe,MAAMG,cAAc,SAASC,sBAAa,CAAC;EAIxD;AACF;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAEzB,IAAI,CAACC,iBAAiB,GAAG,IAAIC,yBAAgB,CAC3C,IAAI,CAACC,IAAI,CAACC,OAAO,EACjB,IAAI,CAACC,aAAa,CAACD,
|
|
1
|
+
{"version":3,"file":"TaskGroupModel.js","names":["_ActionCollection","_interopRequireDefault","require","_ResourceModel","_ModularUIResponse","TaskGroupModel","ResourceModel","constructor","modularuiResponse","_defineProperty2","default","_actionCollection","ActionCollection","data","actions","contributions","selfHref","links","getLinkByKey","selflink","href","_key","substring","lastIndexOf","name","create","key","taskgroup","ModularUIResponse","type","modelName","isApplicableModel","resourcetype","label","actionCollection","exports"],"sources":["../../../src/models/taskgroup/TaskGroupModel.js"],"sourcesContent":["// @flow\nimport ActionCollection from \"../actions/ActionCollection\";\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\n/**\n * TaskGroupModel\n */\nexport default class TaskGroupModel extends ResourceModel {\n _key: string;\n _actionCollection: ActionCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._actionCollection = new ActionCollection(\n this.data.actions,\n this.contributions.actions\n );\n\n const selfHref = this.links.getLinkByKey(\"self\")\n ? this.selflink.href.href\n : null;\n\n this._key = selfHref\n ? selfHref.substring(selfHref.lastIndexOf(\"/\") + 1)\n : this.data.name;\n }\n\n /**\n */\n static create(\n key: string,\n data: Object,\n contributions: Object\n ): TaskGroupModel {\n const taskgroup = new ModularUIResponse();\n taskgroup.key = key;\n taskgroup.data = data;\n taskgroup.contributions = contributions;\n\n return new TaskGroupModel(taskgroup);\n }\n\n /**\n */\n get type(): string {\n return \"TaskGroup\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"TaskGroupModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"TaskGroup\"\n );\n }\n\n /**\n * Get the key of the TaskGroup\n */\n get key(): string {\n return this._key;\n }\n\n /**\n * Get the label of the TaskGroup\n */\n get label(): string {\n return this.contributions.label;\n }\n\n /**\n * Retrieve actions of taskgroup\n */\n get actionCollection(): ActionCollection {\n return this._actionCollection;\n }\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,kBAAA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K,WAAW;EAEnD;;EAEA;AACF;AACA;EACE,IAAIN,GAAGA,CAAA,EAAW;IAChB,OAAO,IAAI,CAACL,IAAI;EAClB;;EAEA;AACF;AACA;EACE,IAAIY,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAAClB,aAAa,CAACkB,KAAK;EACjC;;EAEA;AACF;AACA;EACE,IAAIC,gBAAgBA,CAAA,EAAqB;IACvC,OAAO,IAAI,CAACvB,iBAAiB;EAC/B;AACF;AAACwB,OAAA,CAAAzB,OAAA,GAAAL,cAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserProfileModel.js","names":["_objects","require","_AttributeCollection","_interopRequireDefault","_UserModel","UserProfileModel","UserModel","constructor","modularuiResponse","_context","_defineProperty2","default","attributeContributions","contributions","attributes","_filter","call","contribution","key","_keys","has","data","_attributeCollection","AttributeCollection","type","attributeCollection","modelName","exports"],"sources":["../../../src/models/user/UserProfileModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport AttributeCollection from \"../attributes/AttributeCollection\";\n\nimport UserModel from \"./UserModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n * User model\n */\nexport default class UserProfileModel extends UserModel {\n _attributeCollection: AttributeCollection;\n\n /**\n * constructor\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n const attributeContributions = this.contributions.attributes\n ? this.contributions.attributes.filter((contribution) => {\n const [key] = Object.keys(contribution);\n return key !== \"sessiondata\" && has(this.data, key);\n })\n : [];\n\n this._attributeCollection = new AttributeCollection(\n this.data,\n attributeContributions\n );\n }\n\n /**\n */\n get type(): string {\n return \"UserProfile\";\n }\n\n /**\n * returns all the attributes from the attribute collection\n */\n get attributeCollection(): AttributeCollection {\n return this._attributeCollection;\n }\n\n /**\n */\n static get modelName(): string {\n return \"UserProfileModel\";\n }\n}\n"],"mappings":";;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAD,sBAAA,CAAAF,OAAA;AAIA;AACA;AACA;AACe,MAAMI,gBAAgB,SAASC,kBAAS,CAAC;EAGtD;AACF;AACA;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAAA,IAAAC,QAAA;IAChD,KAAK,CAACD,iBAAiB,CAAC;IAAC,IAAAE,gBAAA,CAAAC,OAAA;IAEzB,MAAMC,sBAAsB,GAAG,IAAI,CAACC,aAAa,CAACC,UAAU,GACxD,IAAAC,OAAA,CAAAJ,OAAA,EAAAF,QAAA,OAAI,CAACI,aAAa,CAACC,UAAU,EAAAE,IAAA,CAAAP,QAAA,EAASQ,YAAY,IAAK;MACrD,MAAM,CAACC,GAAG,CAAC,GAAG,IAAAC,KAAA,CAAAR,OAAA,EAAYM,YAAY,CAAC;MACvC,OAAOC,GAAG,KAAK,aAAa,IAAI,IAAAE,YAAG,EAAC,IAAI,CAACC,IAAI,EAAEH,GAAG,CAAC;IACrD,CAAC,CAAC,GACF,EAAE;IAEN,IAAI,CAACI,oBAAoB,GAAG,IAAIC,4BAAmB,CACjD,IAAI,CAACF,IAAI,EACTT,
|
|
1
|
+
{"version":3,"file":"UserProfileModel.js","names":["_objects","require","_AttributeCollection","_interopRequireDefault","_UserModel","UserProfileModel","UserModel","constructor","modularuiResponse","_context","_defineProperty2","default","attributeContributions","contributions","attributes","_filter","call","contribution","key","_keys","has","data","_attributeCollection","AttributeCollection","type","attributeCollection","modelName","exports"],"sources":["../../../src/models/user/UserProfileModel.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport AttributeCollection from \"../attributes/AttributeCollection\";\n\nimport UserModel from \"./UserModel\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\n\n/**\n * User model\n */\nexport default class UserProfileModel extends UserModel {\n _attributeCollection: AttributeCollection;\n\n /**\n * constructor\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n const attributeContributions = this.contributions.attributes\n ? this.contributions.attributes.filter((contribution) => {\n const [key] = Object.keys(contribution);\n return key !== \"sessiondata\" && has(this.data, key);\n })\n : [];\n\n this._attributeCollection = new AttributeCollection(\n this.data,\n attributeContributions\n );\n }\n\n /**\n */\n get type(): string {\n return \"UserProfile\";\n }\n\n /**\n * returns all the attributes from the attribute collection\n */\n get attributeCollection(): AttributeCollection {\n return this._attributeCollection;\n }\n\n /**\n */\n static get modelName(): string {\n return \"UserProfileModel\";\n }\n}\n"],"mappings":";;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAD,sBAAA,CAAAF,OAAA;AAIA;AACA;AACA;AACe,MAAMI,gBAAgB,SAASC,kBAAS,CAAC;EAGtD;AACF;AACA;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAAA,IAAAC,QAAA;IAChD,KAAK,CAACD,iBAAiB,CAAC;IAAC,IAAAE,gBAAA,CAAAC,OAAA;IAEzB,MAAMC,sBAAsB,GAAG,IAAI,CAACC,aAAa,CAACC,UAAU,GACxD,IAAAC,OAAA,CAAAJ,OAAA,EAAAF,QAAA,OAAI,CAACI,aAAa,CAACC,UAAU,EAAAE,IAAA,CAAAP,QAAA,EAASQ,YAAY,IAAK;MACrD,MAAM,CAACC,GAAG,CAAC,GAAG,IAAAC,KAAA,CAAAR,OAAA,EAAYM,YAAY,CAAC;MACvC,OAAOC,GAAG,KAAK,aAAa,IAAI,IAAAE,YAAG,EAAC,IAAI,CAACC,IAAI,EAAEH,GAAG,CAAC;IACrD,CAAC,CAAC,GACF,EAAE;IAEN,IAAI,CAACI,oBAAoB,GAAG,IAAIC,4BAAmB,CACjD,IAAI,CAACF,IAAI,EACTT,sBACF,CAAC;EACH;;EAEA;AACF;EACE,IAAIY,IAAIA,CAAA,EAAW;IACjB,OAAO,aAAa;EACtB;;EAEA;AACF;AACA;EACE,IAAIC,mBAAmBA,CAAA,EAAwB;IAC7C,OAAO,IAAI,CAACH,oBAAoB;EAClC;;EAEA;AACF;EACE,WAAWI,SAASA,CAAA,EAAW;IAC7B,OAAO,kBAAkB;EAC3B;AACF;AAACC,OAAA,CAAAhB,OAAA,GAAAN,gBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authenticate.js","names":["_Constants","require","_universalFetch","_interopRequireDefault","_Cache","_exceptions","_constants","Authenticate","constructor","_defineProperty2","default","_isBasic","authenticationType","type","loginType","INTERNAL_LOGIN_TYPE","JAAS","_includes","call","PAC4J_FORM","PAC4J_BASIC","Error","isBasicAuthentication","requestLogin","universalFetch","url","getBasePath","method","HTTP_METHODS","GET","headers","Accept","initLogin","_promise","resolve","catch","error","UnauthorizedException","login","username","password","doFormLogin","doBasicAuthentication","doJaasAuthentication","getFormLoginUrl","loginPath","getFormLoginData","encodedUsername","encodeURIComponent","encodedPassword","loginUsernameField","loginPasswordField","POST","data","Cache","addItem","btoa","then","getLogoutUrl","logoutPath","logout","response","clear","_default","exports"],"sources":["../../src/modularui/Authenticate.js"],"sourcesContent":["// @flow\nimport { HTTP_METHODS } from \"../constants/Constants\";\n\nimport universalFetch from \"../utils/fetch/universalFetch\";\nimport Cache from \"../utils/browser/Cache\";\n\nimport { UnauthorizedException } from \"../exceptions\";\nimport {\n INTERNAL_LOGIN_TYPE,\n loginType,\n loginPath,\n loginPasswordField,\n loginUsernameField,\n logoutPath,\n getBasePath,\n} from \"../constants\";\n\n/**\n */\nclass Authenticate {\n _isBasic: boolean;\n\n /**\n */\n constructor() {\n this._isBasic = false;\n }\n\n /**\n */\n get authenticationType(): $Keys<typeof INTERNAL_LOGIN_TYPE> {\n const type = loginType();\n\n if (!type || type === INTERNAL_LOGIN_TYPE.JAAS) {\n return INTERNAL_LOGIN_TYPE.JAAS;\n }\n\n if (type.includes(\"FormClient\")) {\n return INTERNAL_LOGIN_TYPE.PAC4J_FORM;\n } else if (type.includes(\"BasicClient\")) {\n return INTERNAL_LOGIN_TYPE.PAC4J_BASIC;\n }\n\n throw new Error(`Unsupported login type found: ${type}`);\n }\n\n /**\n */\n get isBasicAuthentication(): boolean {\n return (\n this._isBasic ||\n this.authenticationType === INTERNAL_LOGIN_TYPE.PAC4J_BASIC\n );\n }\n\n /**\n */\n set isBasicAuthentication(isBasicAuthentication: boolean) {\n this._isBasic = isBasicAuthentication;\n }\n\n /**\n */\n requestLogin(): Promise<any> {\n return universalFetch({\n url: `${getBasePath()}/login`,\n method: HTTP_METHODS.GET,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n });\n }\n\n /**\n */\n initLogin(initLogin: boolean): Promise<any> {\n if (this.isBasicAuthentication || !initLogin) {\n return Promise.resolve(true);\n }\n\n return this.requestLogin().catch((error) => {\n // when an unauthorizedexception is received on a request to the login service,\n // this indicates a basic authorization scenario\n // in case of form based authentication other exceptions are thrown\n if (error instanceof UnauthorizedException) {\n this.isBasicAuthentication = true;\n }\n\n return Promise.resolve({});\n });\n }\n\n /**\n */\n login(username: string, password: string): Promise<any> {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return this.doFormLogin(username, password);\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n return this.doBasicAuthentication(username, password);\n default:\n return this.doJaasAuthentication(username, password);\n }\n }\n\n /**\n */\n getFormLoginUrl(): string {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${getBasePath()}${loginPath()}`;\n default:\n return `${getBasePath()}/j_security_check`;\n }\n }\n\n /**\n */\n getFormLoginData(username: string, password: string): string {\n const encodedUsername = encodeURIComponent(username);\n const encodedPassword = encodeURIComponent(password);\n\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${loginUsernameField()}=${encodedUsername}&${loginPasswordField()}=${encodedPassword}`;\n default:\n return `j_username=${encodedUsername}&j_password=${encodedPassword}`;\n }\n }\n\n /**\n */\n doFormLogin(username: string, password: string): Promise<any> {\n return universalFetch({\n url: this.getFormLoginUrl(),\n method: HTTP_METHODS.POST,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n data: this.getFormLoginData(username, password),\n });\n }\n\n /**\n */\n doBasicAuthentication(username: string, password: string): Promise<any> {\n Cache.addItem(\"basic\", btoa(`${username}:${password}`));\n return this.requestLogin();\n }\n\n /**\n */\n doJaasAuthentication(username: string, password: string): Promise<any> {\n return this.initLogin(true).then(() => {\n if (this.isBasicAuthentication) {\n return this.doBasicAuthentication(username, password);\n }\n return this.doFormLogin(username, password);\n });\n }\n\n /**\n */\n getLogoutUrl(): string {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${getBasePath()}${logoutPath()}`;\n default:\n return `${getBasePath()}/Logoff`;\n }\n }\n\n /**\n */\n logout(): Promise<any> {\n return universalFetch({\n url: this.getLogoutUrl(),\n }).then((response) => {\n // clear cache because of cached contributions\n Cache.clear();\n return response;\n });\n }\n}\n\nexport default Authenticate;\n"],"mappings":";;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAUA;AACA;AACA,MAAMM,YAAY,CAAC;EAGjB;AACF;EACEC,WAAWA,CAAA,EAAG;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IACZ,IAAI,CAACC,QAAQ,GAAG,KAAK;EACvB;;EAEA;AACF;EACE,IAAIC,kBAAkBA,CAAA,EAAsC;IAC1D,MAAMC,IAAI,GAAG,IAAAC,oBAAS,
|
|
1
|
+
{"version":3,"file":"Authenticate.js","names":["_Constants","require","_universalFetch","_interopRequireDefault","_Cache","_exceptions","_constants","Authenticate","constructor","_defineProperty2","default","_isBasic","authenticationType","type","loginType","INTERNAL_LOGIN_TYPE","JAAS","_includes","call","PAC4J_FORM","PAC4J_BASIC","Error","isBasicAuthentication","requestLogin","universalFetch","url","getBasePath","method","HTTP_METHODS","GET","headers","Accept","initLogin","_promise","resolve","catch","error","UnauthorizedException","login","username","password","doFormLogin","doBasicAuthentication","doJaasAuthentication","getFormLoginUrl","loginPath","getFormLoginData","encodedUsername","encodeURIComponent","encodedPassword","loginUsernameField","loginPasswordField","POST","data","Cache","addItem","btoa","then","getLogoutUrl","logoutPath","logout","response","clear","_default","exports"],"sources":["../../src/modularui/Authenticate.js"],"sourcesContent":["// @flow\nimport { HTTP_METHODS } from \"../constants/Constants\";\n\nimport universalFetch from \"../utils/fetch/universalFetch\";\nimport Cache from \"../utils/browser/Cache\";\n\nimport { UnauthorizedException } from \"../exceptions\";\nimport {\n INTERNAL_LOGIN_TYPE,\n loginType,\n loginPath,\n loginPasswordField,\n loginUsernameField,\n logoutPath,\n getBasePath,\n} from \"../constants\";\n\n/**\n */\nclass Authenticate {\n _isBasic: boolean;\n\n /**\n */\n constructor() {\n this._isBasic = false;\n }\n\n /**\n */\n get authenticationType(): $Keys<typeof INTERNAL_LOGIN_TYPE> {\n const type = loginType();\n\n if (!type || type === INTERNAL_LOGIN_TYPE.JAAS) {\n return INTERNAL_LOGIN_TYPE.JAAS;\n }\n\n if (type.includes(\"FormClient\")) {\n return INTERNAL_LOGIN_TYPE.PAC4J_FORM;\n } else if (type.includes(\"BasicClient\")) {\n return INTERNAL_LOGIN_TYPE.PAC4J_BASIC;\n }\n\n throw new Error(`Unsupported login type found: ${type}`);\n }\n\n /**\n */\n get isBasicAuthentication(): boolean {\n return (\n this._isBasic ||\n this.authenticationType === INTERNAL_LOGIN_TYPE.PAC4J_BASIC\n );\n }\n\n /**\n */\n set isBasicAuthentication(isBasicAuthentication: boolean) {\n this._isBasic = isBasicAuthentication;\n }\n\n /**\n */\n requestLogin(): Promise<any> {\n return universalFetch({\n url: `${getBasePath()}/login`,\n method: HTTP_METHODS.GET,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n });\n }\n\n /**\n */\n initLogin(initLogin: boolean): Promise<any> {\n if (this.isBasicAuthentication || !initLogin) {\n return Promise.resolve(true);\n }\n\n return this.requestLogin().catch((error) => {\n // when an unauthorizedexception is received on a request to the login service,\n // this indicates a basic authorization scenario\n // in case of form based authentication other exceptions are thrown\n if (error instanceof UnauthorizedException) {\n this.isBasicAuthentication = true;\n }\n\n return Promise.resolve({});\n });\n }\n\n /**\n */\n login(username: string, password: string): Promise<any> {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return this.doFormLogin(username, password);\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n return this.doBasicAuthentication(username, password);\n default:\n return this.doJaasAuthentication(username, password);\n }\n }\n\n /**\n */\n getFormLoginUrl(): string {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${getBasePath()}${loginPath()}`;\n default:\n return `${getBasePath()}/j_security_check`;\n }\n }\n\n /**\n */\n getFormLoginData(username: string, password: string): string {\n const encodedUsername = encodeURIComponent(username);\n const encodedPassword = encodeURIComponent(password);\n\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${loginUsernameField()}=${encodedUsername}&${loginPasswordField()}=${encodedPassword}`;\n default:\n return `j_username=${encodedUsername}&j_password=${encodedPassword}`;\n }\n }\n\n /**\n */\n doFormLogin(username: string, password: string): Promise<any> {\n return universalFetch({\n url: this.getFormLoginUrl(),\n method: HTTP_METHODS.POST,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n data: this.getFormLoginData(username, password),\n });\n }\n\n /**\n */\n doBasicAuthentication(username: string, password: string): Promise<any> {\n Cache.addItem(\"basic\", btoa(`${username}:${password}`));\n return this.requestLogin();\n }\n\n /**\n */\n doJaasAuthentication(username: string, password: string): Promise<any> {\n return this.initLogin(true).then(() => {\n if (this.isBasicAuthentication) {\n return this.doBasicAuthentication(username, password);\n }\n return this.doFormLogin(username, password);\n });\n }\n\n /**\n */\n getLogoutUrl(): string {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${getBasePath()}${logoutPath()}`;\n default:\n return `${getBasePath()}/Logoff`;\n }\n }\n\n /**\n */\n logout(): Promise<any> {\n return universalFetch({\n url: this.getLogoutUrl(),\n }).then((response) => {\n // clear cache because of cached contributions\n Cache.clear();\n return response;\n });\n }\n}\n\nexport default Authenticate;\n"],"mappings":";;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAUA;AACA;AACA,MAAMM,YAAY,CAAC;EAGjB;AACF;EACEC,WAAWA,CAAA,EAAG;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IACZ,IAAI,CAACC,QAAQ,GAAG,KAAK;EACvB;;EAEA;AACF;EACE,IAAIC,kBAAkBA,CAAA,EAAsC;IAC1D,MAAMC,IAAI,GAAG,IAAAC,oBAAS,EAAC,CAAC;IAExB,IAAI,CAACD,IAAI,IAAIA,IAAI,KAAKE,8BAAmB,CAACC,IAAI,EAAE;MAC9C,OAAOD,8BAAmB,C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,MAAMA,CAAA,EAAiB;IACrB,OAAO,IAAApC,uBAAc,EAAC;MACpBC,GAAG,EAAE,IAAI,CAACiC,YAAY,CAAC;IACzB,CAAC,CAAC,CAACD,IAAI,CAAEI,QAAQ,IAAK;MACpB;MACAP,cAAK,CAACQ,KAAK,CAAC,CAAC;MACb,OAAOD,QAAQ;IACjB,CAAC,CAAC;EACJ;AACF;AAAC,IAAAE,QAAA,GAEcxD,YAAY;AAAAyD,OAAA,CAAAtD,OAAA,GAAAqD,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaptchaRequest.js","names":["_xhr","_interopRequireDefault","require","_constants","CaptchaRequest","constructor","_defineProperty2","default","captchaResponse","response","_tokenId","tokenId","_image","image","valid","error","init","xhr","url","getCaptchaPath","then","send","answer","method","HTTP_METHODS","POST","data","catch","refresh","_default","exports"],"sources":["../../src/modularui/CaptchaRequest.js"],"sourcesContent":["// @flow\nimport xhr from \"../utils/fetch/xhr\";\nimport { getCaptchaPath, HTTP_METHODS } from \"../constants\";\n\ntype CaptchaInitialResponse = {\n tokenId: string,\n image: string,\n};\n\ntype CaptchaValidResponse = {\n valid: boolean,\n};\n\ntype CaptchaInvalidResponse = {\n tokenId: string,\n image: string,\n valid: boolean,\n error: { id: string },\n};\n\ntype CaptchaResponse = {\n tokenId: string,\n image: string,\n valid: boolean,\n error: { id: string } | null,\n};\n\n/**\n */\nclass CaptchaRequest {\n _tokenId: string;\n _image: string;\n\n /**\n */\n captchaResponse(\n response:\n | CaptchaInitialResponse\n | CaptchaValidResponse\n | CaptchaInvalidResponse\n ): CaptchaResponse {\n this._tokenId = response.tokenId ?? this._tokenId;\n this._image = response.image ?? this._image;\n\n return {\n tokenId: this._tokenId,\n image: this._image,\n valid: response.valid ?? false,\n error: response.error ?? null,\n };\n }\n\n /**\n * Initiate the captcha request\n */\n init(): Promise<CaptchaResponse> {\n return xhr({\n url: getCaptchaPath(),\n }).then((response) => this.captchaResponse(response));\n }\n\n /**\n * Answer the captcha\n */\n send(answer?: string): Promise<CaptchaResponse> {\n return xhr({\n url: getCaptchaPath(),\n method: HTTP_METHODS.POST,\n data: {\n tokenId: this._tokenId ?? \"\",\n answer: answer ?? \"\",\n },\n })\n .then((response) => this.captchaResponse(response))\n .catch((error) => this.captchaResponse(error.response));\n }\n\n /**\n * Reset the captcha and receive a new token and image\n */\n refresh(): Promise<CaptchaResponse> {\n return this.init();\n }\n}\n\nexport default CaptchaRequest;\n"],"mappings":";;;;;;;;AACA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAyBA;AACA;AACA,MAAME,cAAc,CAAC;EAAAC,YAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;EAAA;EAInB;AACF;EACEC,eAAeA,CACbC,QAG0B,EACT;IACjB,IAAI,CAACC,QAAQ,GAAGD,QAAQ,CAACE,OAAO,IAAI,IAAI,CAACD,QAAQ;IACjD,IAAI,CAACE,MAAM,GAAGH,QAAQ,CAACI,KAAK,IAAI,IAAI,CAACD,MAAM;IAE3C,OAAO;MACLD,OAAO,EAAE,IAAI,CAACD,QAAQ;MACtBG,KAAK,EAAE,IAAI,CAACD,MAAM;MAClBE,KAAK,EAAEL,QAAQ,CAACK,KAAK,IAAI,KAAK;MAC9BC,KAAK,EAAEN,QAAQ,CAACM,KAAK,IAAI;IAC3B,CAAC;EACH;;EAEA;AACF;AACA;EACEC,IAAIA,CAAA,EAA6B;IAC/B,OAAO,IAAAC,YAAG,EAAC;MACTC,GAAG,EAAE,IAAAC,yBAAc;
|
|
1
|
+
{"version":3,"file":"CaptchaRequest.js","names":["_xhr","_interopRequireDefault","require","_constants","CaptchaRequest","constructor","_defineProperty2","default","captchaResponse","response","_tokenId","tokenId","_image","image","valid","error","init","xhr","url","getCaptchaPath","then","send","answer","method","HTTP_METHODS","POST","data","catch","refresh","_default","exports"],"sources":["../../src/modularui/CaptchaRequest.js"],"sourcesContent":["// @flow\nimport xhr from \"../utils/fetch/xhr\";\nimport { getCaptchaPath, HTTP_METHODS } from \"../constants\";\n\ntype CaptchaInitialResponse = {\n tokenId: string,\n image: string,\n};\n\ntype CaptchaValidResponse = {\n valid: boolean,\n};\n\ntype CaptchaInvalidResponse = {\n tokenId: string,\n image: string,\n valid: boolean,\n error: { id: string },\n};\n\ntype CaptchaResponse = {\n tokenId: string,\n image: string,\n valid: boolean,\n error: { id: string } | null,\n};\n\n/**\n */\nclass CaptchaRequest {\n _tokenId: string;\n _image: string;\n\n /**\n */\n captchaResponse(\n response:\n | CaptchaInitialResponse\n | CaptchaValidResponse\n | CaptchaInvalidResponse\n ): CaptchaResponse {\n this._tokenId = response.tokenId ?? this._tokenId;\n this._image = response.image ?? this._image;\n\n return {\n tokenId: this._tokenId,\n image: this._image,\n valid: response.valid ?? false,\n error: response.error ?? null,\n };\n }\n\n /**\n * Initiate the captcha request\n */\n init(): Promise<CaptchaResponse> {\n return xhr({\n url: getCaptchaPath(),\n }).then((response) => this.captchaResponse(response));\n }\n\n /**\n * Answer the captcha\n */\n send(answer?: string): Promise<CaptchaResponse> {\n return xhr({\n url: getCaptchaPath(),\n method: HTTP_METHODS.POST,\n data: {\n tokenId: this._tokenId ?? \"\",\n answer: answer ?? \"\",\n },\n })\n .then((response) => this.captchaResponse(response))\n .catch((error) => this.captchaResponse(error.response));\n }\n\n /**\n * Reset the captcha and receive a new token and image\n */\n refresh(): Promise<CaptchaResponse> {\n return this.init();\n }\n}\n\nexport default CaptchaRequest;\n"],"mappings":";;;;;;;;AACA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAyBA;AACA;AACA,MAAME,cAAc,CAAC;EAAAC,YAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;EAAA;EAInB;AACF;EACEC,eAAeA,CACbC,QAG0B,EACT;IACj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