@beinformed/ui 1.57.2 → 1.57.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/esm/constants/Settings.js +14 -6
- package/esm/constants/Settings.js.map +1 -1
- package/esm/hooks/useAuthentication.js +3 -3
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/hooks/useModelCatalog.js.map +1 -1
- package/esm/hooks/useModularUIBasic.js +1 -1
- package/esm/hooks/useModularUIBasic.js.map +1 -1
- package/esm/hooks/useModularUIModel.js.map +1 -1
- package/esm/models/actions/ActionCollection.js +2 -3
- package/esm/models/actions/ActionCollection.js.map +1 -1
- package/esm/models/actions/ActionModel.js +13 -23
- package/esm/models/actions/ActionModel.js.map +1 -1
- package/esm/models/application/ApplicationModel.js +1 -1
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js +6 -3
- package/esm/models/attributes/AttributeCollection.js.map +1 -1
- package/esm/models/attributes/AttributeModel.js +3 -3
- package/esm/models/attributes/AttributeModel.js.map +1 -1
- package/esm/models/attributes/AttributeSetModel.js +7 -4
- package/esm/models/attributes/AttributeSetModel.js.map +1 -1
- package/esm/models/attributes/BooleanAttributeModel.js +6 -3
- package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeModel.js +6 -3
- package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js +18 -14
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionModel.js +17 -10
- package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeChildCollection.js +7 -7
- package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeModel.js +3 -3
- package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/esm/models/attributes/DatetimeAttributeModel.js +2 -2
- package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/esm/models/attributes/StringAttributeModel.js +2 -2
- package/esm/models/attributes/StringAttributeModel.js.map +1 -1
- package/esm/models/attributes/_createAttribute.js +2 -2
- package/esm/models/attributes/_createAttribute.js.map +1 -1
- package/esm/models/base/BaseModel.js +27 -1
- package/esm/models/base/BaseModel.js.map +1 -1
- package/esm/models/base/ResourceModel.js +3 -23
- package/esm/models/base/ResourceModel.js.map +1 -1
- package/esm/models/caseview/CaseViewModel.js +1 -1
- package/esm/models/caseview/CaseViewModel.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js +2 -2
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/concepts/ConceptIndexModel.js +2 -2
- package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
- package/esm/models/concepts/ConceptLinkModel.js +4 -10
- package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
- package/esm/models/concepts/ConceptRelationCollection.js +11 -4
- package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/esm/models/concepts/ConceptRelationModel.js +8 -1
- package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
- package/esm/models/concepts/SourceReferenceCollection.js +2 -4
- package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceModel.js +9 -10
- package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
- package/esm/models/content/ContentIndexModel.js +2 -2
- package/esm/models/content/ContentIndexModel.js.map +1 -1
- package/esm/models/content/ContentLinkModel.js +4 -11
- package/esm/models/content/ContentLinkModel.js.map +1 -1
- package/esm/models/content/ContentModel.js +2 -2
- package/esm/models/content/ContentModel.js.map +1 -1
- package/esm/models/content/ContentTOCModel.js +7 -7
- package/esm/models/content/ContentTOCModel.js.map +1 -1
- package/esm/models/content/SectionModel.js +6 -12
- package/esm/models/content/SectionModel.js.map +1 -1
- package/esm/models/detail/DetailModel.js +9 -3
- package/esm/models/detail/DetailModel.js.map +1 -1
- package/esm/models/error/ErrorResponse.js +8 -10
- package/esm/models/error/ErrorResponse.js.map +1 -1
- package/esm/models/filters/AssignmentFilterModel.js +2 -2
- package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
- package/esm/models/filters/BaseFilterModel.js +3 -3
- package/esm/models/filters/BaseFilterModel.js.map +1 -1
- package/esm/models/filters/ConceptIndexFilterModel.js +2 -3
- package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.js +8 -7
- package/esm/models/filters/FilterCollection.js.map +1 -1
- package/esm/models/filters/StringFilterModel.js +2 -2
- package/esm/models/filters/StringFilterModel.js.map +1 -1
- package/esm/models/form/FormModel.js +4 -4
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/form/FormObjectModel.js +7 -4
- package/esm/models/form/FormObjectModel.js.map +1 -1
- package/esm/models/grouping/GroupingModel.js +10 -7
- package/esm/models/grouping/GroupingModel.js.map +1 -1
- package/esm/models/href/Href.js +9 -8
- package/esm/models/href/Href.js.map +1 -1
- package/esm/models/links/LinkCollection.js +2 -3
- package/esm/models/links/LinkCollection.js.map +1 -1
- package/esm/models/links/LinkModel.js +7 -7
- package/esm/models/links/LinkModel.js.map +1 -1
- package/esm/models/list/ListDetailModel.js +1 -1
- package/esm/models/list/ListDetailModel.js.map +1 -1
- package/esm/models/list/ListItemCollection.js +1 -1
- package/esm/models/list/ListItemCollection.js.map +1 -1
- package/esm/models/list/ListItemModel.js +3 -3
- package/esm/models/list/ListItemModel.js.map +1 -1
- package/esm/models/list/ListModel.js +3 -3
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/lookup/LookupOptionCollection.js +5 -2
- package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
- package/esm/models/lookup/LookupOptionsModel.js +2 -2
- package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
- package/esm/models/panels/GroupingPanelModel.js +1 -1
- package/esm/models/panels/GroupingPanelModel.js.map +1 -1
- package/esm/models/tab/TabModel.js +2 -2
- package/esm/models/tab/TabModel.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupModel.js +4 -5
- package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/esm/models/types.js.map +1 -1
- package/esm/models/user/UserProfileModel.js +4 -1
- package/esm/models/user/UserProfileModel.js.map +1 -1
- package/esm/modularui/CaptchaRequest.js +3 -3
- package/esm/modularui/CaptchaRequest.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js +8 -5
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/modularui/ModularUIResponse.js +12 -3
- package/esm/modularui/ModularUIResponse.js.map +1 -1
- package/esm/modularui/UploadRequest.js +3 -3
- package/esm/modularui/UploadRequest.js.map +1 -1
- package/esm/react-client/client.js +3 -3
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-server/renderSSRComplete.js +2 -2
- package/esm/react-server/renderSSRComplete.js.map +1 -1
- package/esm/react-server/renderSSRMinimal.js +2 -2
- package/esm/react-server/renderSSRMinimal.js.map +1 -1
- package/esm/redux/_modularui/ModularUIActions.js +8 -2
- package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
- package/esm/redux/_modularui/ModularUIUtils.js +8 -11
- package/esm/redux/_modularui/ModularUIUtils.js.map +1 -1
- package/esm/utils/browser/Cookies.js +3 -3
- package/esm/utils/browser/Cookies.js.map +1 -1
- package/esm/utils/helpers/createHref.js +23 -3
- package/esm/utils/helpers/createHref.js.map +1 -1
- package/esm/utils/helpers/repositoryResource.js +2 -2
- package/esm/utils/helpers/repositoryResource.js.map +1 -1
- package/lib/constants/Settings.js +18 -8
- package/lib/constants/Settings.js.flow +16 -6
- package/lib/constants/Settings.js.map +1 -1
- package/lib/hooks/useAuthentication.js +2 -2
- package/lib/hooks/useAuthentication.js.flow +3 -3
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useModelCatalog.js.flow +7 -6
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js +1 -1
- package/lib/hooks/useModularUIBasic.js.flow +1 -1
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useModularUIModel.js.flow +16 -11
- package/lib/hooks/useModularUIModel.js.map +1 -1
- package/lib/models/actions/ActionCollection.js +2 -2
- package/lib/models/actions/ActionCollection.js.flow +3 -8
- package/lib/models/actions/ActionCollection.js.map +1 -1
- package/lib/models/actions/ActionModel.js +12 -22
- package/lib/models/actions/ActionModel.js.flow +7 -24
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/application/ApplicationModel.js +1 -1
- package/lib/models/application/ApplicationModel.js.flow +1 -2
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js +6 -3
- package/lib/models/attributes/AttributeCollection.js.flow +12 -4
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeModel.js +3 -3
- package/lib/models/attributes/AttributeModel.js.flow +8 -2
- package/lib/models/attributes/AttributeModel.js.map +1 -1
- package/lib/models/attributes/AttributeSetModel.js +7 -3
- package/lib/models/attributes/AttributeSetModel.js.flow +11 -3
- package/lib/models/attributes/AttributeSetModel.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js +6 -3
- package/lib/models/attributes/BooleanAttributeModel.js.flow +8 -4
- package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js +6 -3
- package/lib/models/attributes/ChoiceAttributeModel.js.flow +13 -4
- package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js +18 -13
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.flow +30 -28
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js +17 -10
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.flow +30 -11
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js +7 -7
- package/lib/models/attributes/CompositeAttributeChildCollection.js.flow +8 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeModel.js +3 -3
- package/lib/models/attributes/CompositeAttributeModel.js.flow +8 -3
- package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js +2 -2
- package/lib/models/attributes/DatetimeAttributeModel.js.flow +7 -2
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/StringAttributeModel.js +2 -2
- package/lib/models/attributes/StringAttributeModel.js.flow +7 -3
- package/lib/models/attributes/StringAttributeModel.js.map +1 -1
- package/lib/models/attributes/__tests__/ChoiceAttributeOptionModel.spec.js.flow +1 -1
- package/lib/models/attributes/_createAttribute.js +2 -2
- package/lib/models/attributes/_createAttribute.js.flow +3 -2
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/base/BaseModel.js +27 -1
- package/lib/models/base/BaseModel.js.flow +31 -1
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/base/ResourceModel.js +3 -22
- package/lib/models/base/ResourceModel.js.flow +6 -23
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/base/__tests__/BaseModel.spec.js.flow +4 -0
- package/lib/models/caseview/CaseViewModel.js +1 -1
- package/lib/models/caseview/CaseViewModel.js.flow +1 -2
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js +2 -2
- package/lib/models/concepts/ConceptDetailModel.js.flow +2 -2
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptIndexModel.js +2 -2
- package/lib/models/concepts/ConceptIndexModel.js.flow +9 -6
- package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js +4 -10
- package/lib/models/concepts/ConceptLinkModel.js.flow +15 -12
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/ConceptRelationCollection.js +11 -4
- package/lib/models/concepts/ConceptRelationCollection.js.flow +17 -3
- package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/lib/models/concepts/ConceptRelationModel.js +8 -1
- package/lib/models/concepts/ConceptRelationModel.js.flow +18 -2
- package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
- package/lib/models/concepts/SourceReferenceCollection.js +2 -3
- package/lib/models/concepts/SourceReferenceCollection.js.flow +3 -8
- package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js +8 -8
- package/lib/models/concepts/SourceReferenceModel.js.flow +10 -11
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/content/ContentIndexModel.js +2 -2
- package/lib/models/content/ContentIndexModel.js.flow +10 -5
- package/lib/models/content/ContentIndexModel.js.map +1 -1
- package/lib/models/content/ContentLinkModel.js +4 -10
- package/lib/models/content/ContentLinkModel.js.flow +10 -13
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/ContentModel.js +2 -2
- package/lib/models/content/ContentModel.js.flow +6 -1
- package/lib/models/content/ContentModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js +7 -7
- package/lib/models/content/ContentTOCModel.js.flow +19 -11
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/content/SectionModel.js +6 -11
- package/lib/models/content/SectionModel.js.flow +9 -21
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/detail/DetailModel.js +9 -3
- package/lib/models/detail/DetailModel.js.flow +3 -4
- package/lib/models/detail/DetailModel.js.map +1 -1
- package/lib/models/error/ErrorResponse.js +7 -9
- package/lib/models/error/ErrorResponse.js.flow +9 -20
- package/lib/models/error/ErrorResponse.js.map +1 -1
- package/lib/models/filters/AssignmentFilterModel.js +2 -2
- package/lib/models/filters/AssignmentFilterModel.js.flow +7 -3
- package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
- package/lib/models/filters/BaseFilterModel.js +3 -3
- package/lib/models/filters/BaseFilterModel.js.flow +16 -7
- package/lib/models/filters/BaseFilterModel.js.map +1 -1
- package/lib/models/filters/ConceptIndexFilterModel.js +2 -2
- package/lib/models/filters/ConceptIndexFilterModel.js.flow +8 -2
- package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js +8 -7
- package/lib/models/filters/FilterCollection.js.flow +13 -7
- package/lib/models/filters/FilterCollection.js.map +1 -1
- package/lib/models/filters/StringFilterModel.js +2 -2
- package/lib/models/filters/StringFilterModel.js.flow +7 -3
- package/lib/models/filters/StringFilterModel.js.map +1 -1
- package/lib/models/form/FormModel.js +4 -4
- package/lib/models/form/FormModel.js.flow +8 -2
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js +7 -4
- package/lib/models/form/FormObjectModel.js.flow +17 -4
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/grouping/GroupingModel.js +10 -7
- package/lib/models/grouping/GroupingModel.js.flow +21 -5
- package/lib/models/grouping/GroupingModel.js.map +1 -1
- package/lib/models/href/Href.js +8 -7
- package/lib/models/href/Href.js.flow +17 -10
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/href/__tests__/Href.spec.js.flow +5 -8
- package/lib/models/links/LinkCollection.js +2 -3
- package/lib/models/links/LinkCollection.js.flow +3 -3
- package/lib/models/links/LinkCollection.js.map +1 -1
- package/lib/models/links/LinkModel.js +7 -7
- package/lib/models/links/LinkModel.js.flow +8 -15
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/list/ListDetailModel.js +1 -1
- package/lib/models/list/ListDetailModel.js.flow +6 -1
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListItemCollection.js +1 -1
- package/lib/models/list/ListItemCollection.js.flow +1 -2
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/list/ListItemModel.js +3 -3
- package/lib/models/list/ListItemModel.js.flow +4 -4
- package/lib/models/list/ListItemModel.js.map +1 -1
- package/lib/models/list/ListModel.js +3 -3
- package/lib/models/list/ListModel.js.flow +12 -8
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/lookup/LookupOptionCollection.js +5 -1
- package/lib/models/lookup/LookupOptionCollection.js.flow +17 -6
- package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
- package/lib/models/lookup/LookupOptionsModel.js +2 -2
- package/lib/models/lookup/LookupOptionsModel.js.flow +2 -0
- package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
- package/lib/models/panels/GroupingPanelModel.js +1 -1
- package/lib/models/panels/GroupingPanelModel.js.flow +1 -2
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/tab/TabModel.js +2 -2
- package/lib/models/tab/TabModel.js.flow +2 -4
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/taskgroup/TaskGroupModel.js +4 -4
- package/lib/models/taskgroup/TaskGroupModel.js.flow +5 -6
- package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/lib/models/types.js.flow +5 -0
- package/lib/models/types.js.map +1 -1
- package/lib/models/user/UserProfileModel.js +4 -1
- package/lib/models/user/UserProfileModel.js.flow +1 -0
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/modularui/CaptchaRequest.js +2 -2
- package/lib/modularui/CaptchaRequest.js.flow +7 -3
- package/lib/modularui/CaptchaRequest.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js +7 -4
- package/lib/modularui/ModularUIRequest.js.flow +8 -5
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/ModularUIResponse.js +11 -2
- package/lib/modularui/ModularUIResponse.js.flow +13 -3
- package/lib/modularui/ModularUIResponse.js.map +1 -1
- package/lib/modularui/UploadRequest.js +2 -2
- package/lib/modularui/UploadRequest.js.flow +7 -3
- package/lib/modularui/UploadRequest.js.map +1 -1
- package/lib/react-client/client.js +2 -2
- package/lib/react-client/client.js.flow +7 -3
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js +1 -1
- package/lib/react-server/renderSSRComplete.js.flow +2 -2
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js +1 -1
- package/lib/react-server/renderSSRMinimal.js.flow +2 -2
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/redux/_modularui/ModularUIActions.js +8 -2
- package/lib/redux/_modularui/ModularUIActions.js.flow +8 -7
- package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
- package/lib/redux/_modularui/ModularUIUtils.js +8 -11
- package/lib/redux/_modularui/ModularUIUtils.js.flow +13 -14
- package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
- package/lib/utils/browser/Cookies.js +2 -2
- package/lib/utils/browser/Cookies.js.flow +3 -3
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/helpers/__tests__/createHref.spec.js.flow +13 -8
- package/lib/utils/helpers/createHref.js +23 -3
- package/lib/utils/helpers/createHref.js.flow +37 -8
- package/lib/utils/helpers/createHref.js.map +1 -1
- package/lib/utils/helpers/repositoryResource.js +1 -1
- package/lib/utils/helpers/repositoryResource.js.flow +2 -2
- package/lib/utils/helpers/repositoryResource.js.map +1 -1
- package/package.json +4 -4
- package/src/constants/Settings.js +16 -6
- package/src/hooks/useAuthentication.js +3 -3
- package/src/hooks/useModelCatalog.js +7 -6
- package/src/hooks/useModularUIBasic.js +1 -1
- package/src/hooks/useModularUIModel.js +16 -11
- package/src/models/actions/ActionCollection.js +3 -8
- package/src/models/actions/ActionModel.js +7 -24
- package/src/models/application/ApplicationModel.js +1 -2
- package/src/models/attributes/AttributeCollection.js +12 -4
- package/src/models/attributes/AttributeModel.js +8 -2
- package/src/models/attributes/AttributeSetModel.js +11 -3
- package/src/models/attributes/BooleanAttributeModel.js +8 -4
- package/src/models/attributes/ChoiceAttributeModel.js +13 -4
- package/src/models/attributes/ChoiceAttributeOptionCollection.js +30 -28
- package/src/models/attributes/ChoiceAttributeOptionModel.js +30 -11
- package/src/models/attributes/CompositeAttributeChildCollection.js +8 -1
- package/src/models/attributes/CompositeAttributeModel.js +8 -3
- package/src/models/attributes/DatetimeAttributeModel.js +7 -2
- package/src/models/attributes/StringAttributeModel.js +7 -3
- package/src/models/attributes/__tests__/ChoiceAttributeOptionModel.spec.js +1 -1
- package/src/models/attributes/_createAttribute.js +3 -2
- package/src/models/base/BaseModel.js +31 -1
- package/src/models/base/ResourceModel.js +6 -23
- package/src/models/base/__tests__/BaseModel.spec.js +4 -0
- package/src/models/caseview/CaseViewModel.js +1 -2
- package/src/models/concepts/ConceptDetailModel.js +2 -2
- package/src/models/concepts/ConceptIndexModel.js +9 -6
- package/src/models/concepts/ConceptLinkModel.js +15 -12
- package/src/models/concepts/ConceptRelationCollection.js +17 -3
- package/src/models/concepts/ConceptRelationModel.js +18 -2
- package/src/models/concepts/SourceReferenceCollection.js +3 -8
- package/src/models/concepts/SourceReferenceModel.js +10 -11
- package/src/models/content/ContentIndexModel.js +10 -5
- package/src/models/content/ContentLinkModel.js +10 -13
- package/src/models/content/ContentModel.js +6 -1
- package/src/models/content/ContentTOCModel.js +19 -11
- package/src/models/content/SectionModel.js +9 -21
- package/src/models/detail/DetailModel.js +3 -4
- package/src/models/error/ErrorResponse.js +9 -20
- package/src/models/filters/AssignmentFilterModel.js +7 -3
- package/src/models/filters/BaseFilterModel.js +16 -7
- package/src/models/filters/ConceptIndexFilterModel.js +8 -2
- package/src/models/filters/FilterCollection.js +13 -7
- package/src/models/filters/StringFilterModel.js +7 -3
- package/src/models/form/FormModel.js +8 -2
- package/src/models/form/FormObjectModel.js +17 -4
- package/src/models/grouping/GroupingModel.js +21 -5
- package/src/models/href/Href.js +17 -10
- package/src/models/href/__tests__/Href.spec.js +5 -8
- package/src/models/links/LinkCollection.js +3 -3
- package/src/models/links/LinkModel.js +8 -15
- package/src/models/list/ListDetailModel.js +6 -1
- package/src/models/list/ListItemCollection.js +1 -2
- package/src/models/list/ListItemModel.js +4 -4
- package/src/models/list/ListModel.js +12 -8
- package/src/models/lookup/LookupOptionCollection.js +17 -6
- package/src/models/lookup/LookupOptionsModel.js +2 -0
- package/src/models/panels/GroupingPanelModel.js +1 -2
- package/src/models/tab/TabModel.js +2 -4
- package/src/models/taskgroup/TaskGroupModel.js +5 -6
- package/src/models/types.js +5 -0
- package/src/models/user/UserProfileModel.js +1 -0
- package/src/modularui/CaptchaRequest.js +7 -3
- package/src/modularui/ModularUIRequest.js +8 -5
- package/src/modularui/ModularUIResponse.js +13 -3
- package/src/modularui/UploadRequest.js +7 -3
- package/src/react-client/client.js +7 -3
- package/src/react-server/renderSSRComplete.js +2 -2
- package/src/react-server/renderSSRMinimal.js +2 -2
- package/src/redux/_modularui/ModularUIActions.js +8 -7
- package/src/redux/_modularui/ModularUIUtils.js +13 -14
- package/src/utils/browser/Cookies.js +3 -3
- package/src/utils/helpers/__tests__/createHref.spec.js +13 -8
- package/src/utils/helpers/createHref.js +37 -8
- package/src/utils/helpers/repositoryResource.js +2 -2
|
@@ -11,6 +11,7 @@ var _findIndex = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-
|
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
12
12
|
var _ResourceCollection = _interopRequireDefault(require("../base/ResourceCollection"));
|
|
13
13
|
var _ConceptRelationModel = _interopRequireDefault(require("./ConceptRelationModel"));
|
|
14
|
+
var _constants = require("../../constants");
|
|
14
15
|
/**
|
|
15
16
|
* concept relation collection
|
|
16
17
|
*/
|
|
@@ -20,10 +21,16 @@ class ConceptRelationCollection extends _ResourceCollection.default {
|
|
|
20
21
|
constructor() {
|
|
21
22
|
let relations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
22
23
|
let entryDate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
24
|
+
let modelOptions = arguments.length > 2 ? arguments[2] : undefined;
|
|
23
25
|
super();
|
|
24
26
|
(0, _defineProperty2.default)(this, "_entryDate", void 0);
|
|
27
|
+
(0, _defineProperty2.default)(this, "_modelOptions", void 0);
|
|
25
28
|
this._entryDate = entryDate;
|
|
26
|
-
this.
|
|
29
|
+
this._modelOptions = modelOptions || {
|
|
30
|
+
origin: "",
|
|
31
|
+
contextPath: (0, _constants.getBasePathModularUI)()
|
|
32
|
+
};
|
|
33
|
+
this.collection = Array.isArray(relations) ? (0, _map.default)(relations).call(relations, relation => relation instanceof _ConceptRelationModel.default ? relation : new _ConceptRelationModel.default(relation, entryDate, modelOptions)) : [new _ConceptRelationModel.default(relations, entryDate, modelOptions)];
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
/**
|
|
@@ -42,7 +49,7 @@ class ConceptRelationCollection extends _ResourceCollection.default {
|
|
|
42
49
|
*/
|
|
43
50
|
byType(type) {
|
|
44
51
|
var _context3;
|
|
45
|
-
return new ConceptRelationCollection((0, _filter.default)(_context3 = this).call(_context3, relation => relation.key === type), this._entryDate);
|
|
52
|
+
return new ConceptRelationCollection((0, _filter.default)(_context3 = this).call(_context3, relation => relation.key === type), this._entryDate, this._modelOptions);
|
|
46
53
|
}
|
|
47
54
|
|
|
48
55
|
/**
|
|
@@ -61,14 +68,14 @@ class ConceptRelationCollection extends _ResourceCollection.default {
|
|
|
61
68
|
*/
|
|
62
69
|
get incoming() {
|
|
63
70
|
var _context4;
|
|
64
|
-
return new ConceptRelationCollection((0, _filter.default)(_context4 = this).call(_context4, relation => relation.direction === "incoming"), this._entryDate);
|
|
71
|
+
return new ConceptRelationCollection((0, _filter.default)(_context4 = this).call(_context4, relation => relation.direction === "incoming"), this._entryDate, this._modelOptions);
|
|
65
72
|
}
|
|
66
73
|
|
|
67
74
|
/**
|
|
68
75
|
*/
|
|
69
76
|
get outgoing() {
|
|
70
77
|
var _context5;
|
|
71
|
-
return new ConceptRelationCollection((0, _filter.default)(_context5 = this).call(_context5, relation => relation.direction === "outgoing"), this._entryDate);
|
|
78
|
+
return new ConceptRelationCollection((0, _filter.default)(_context5 = this).call(_context5, relation => relation.direction === "outgoing"), this._entryDate, this._modelOptions);
|
|
72
79
|
}
|
|
73
80
|
}
|
|
74
81
|
exports.default = ConceptRelationCollection;
|
|
@@ -1,27 +1,38 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
import ResourceCollection from "../base/ResourceCollection";
|
|
3
3
|
import ConceptRelationModel from "./ConceptRelationModel";
|
|
4
|
+
import type { ModelOptions } from "../types";
|
|
5
|
+
import { getBasePathModularUI } from "../../constants";
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* concept relation collection
|
|
7
9
|
*/
|
|
8
10
|
export default class ConceptRelationCollection extends ResourceCollection<ConceptRelationModel> {
|
|
9
11
|
_entryDate: ?ISO_DATE;
|
|
12
|
+
_modelOptions: ModelOptions;
|
|
10
13
|
|
|
11
14
|
/**
|
|
12
15
|
*/
|
|
13
|
-
constructor(
|
|
16
|
+
constructor(
|
|
17
|
+
relations: Array<Object> = [],
|
|
18
|
+
entryDate: ?ISO_DATE = null,
|
|
19
|
+
modelOptions?: ModelOptions,
|
|
20
|
+
) {
|
|
14
21
|
super();
|
|
15
22
|
|
|
16
23
|
this._entryDate = entryDate;
|
|
24
|
+
this._modelOptions = modelOptions || {
|
|
25
|
+
origin: "",
|
|
26
|
+
contextPath: getBasePathModularUI(),
|
|
27
|
+
};
|
|
17
28
|
|
|
18
29
|
this.collection = Array.isArray(relations)
|
|
19
30
|
? relations.map((relation) =>
|
|
20
31
|
relation instanceof ConceptRelationModel
|
|
21
32
|
? relation
|
|
22
|
-
: new ConceptRelationModel(relation, entryDate),
|
|
33
|
+
: new ConceptRelationModel(relation, entryDate, modelOptions),
|
|
23
34
|
)
|
|
24
|
-
: [new ConceptRelationModel(relations, entryDate)];
|
|
35
|
+
: [new ConceptRelationModel(relations, entryDate, modelOptions)];
|
|
25
36
|
}
|
|
26
37
|
|
|
27
38
|
/**
|
|
@@ -46,6 +57,7 @@ export default class ConceptRelationCollection extends ResourceCollection<Concep
|
|
|
46
57
|
return new ConceptRelationCollection(
|
|
47
58
|
this.filter((relation) => relation.key === type),
|
|
48
59
|
this._entryDate,
|
|
60
|
+
this._modelOptions,
|
|
49
61
|
);
|
|
50
62
|
}
|
|
51
63
|
|
|
@@ -67,6 +79,7 @@ export default class ConceptRelationCollection extends ResourceCollection<Concep
|
|
|
67
79
|
return new ConceptRelationCollection(
|
|
68
80
|
this.filter((relation) => relation.direction === "incoming"),
|
|
69
81
|
this._entryDate,
|
|
82
|
+
this._modelOptions,
|
|
70
83
|
);
|
|
71
84
|
}
|
|
72
85
|
|
|
@@ -76,6 +89,7 @@ export default class ConceptRelationCollection extends ResourceCollection<Concep
|
|
|
76
89
|
return new ConceptRelationCollection(
|
|
77
90
|
this.filter((relation) => relation.direction === "outgoing"),
|
|
78
91
|
this._entryDate,
|
|
92
|
+
this._modelOptions,
|
|
79
93
|
);
|
|
80
94
|
}
|
|
81
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConceptRelationCollection.js","names":["_ResourceCollection","_interopRequireDefault","require","_ConceptRelationModel","ConceptRelationCollection","ResourceCollection","constructor","relations","arguments","length","undefined","entryDate","_defineProperty2","default","_entryDate","collection","Array","isArray","_map","call","relation","ConceptRelationModel","types","_context","_context2","_filter","pos","arr","_findIndex","item","key","label","byType","type","_context3","hasIncoming","incoming","hasOutgoing","outgoing","_context4","direction","_context5","exports"],"sources":["../../../src/models/concepts/ConceptRelationCollection.js"],"sourcesContent":["// @flow\nimport ResourceCollection from \"../base/ResourceCollection\";\nimport ConceptRelationModel from \"./ConceptRelationModel\";\n\n/**\n * concept relation collection\n */\nexport default class ConceptRelationCollection extends ResourceCollection<ConceptRelationModel> {\n _entryDate: ?ISO_DATE;\n\n /**\n */\n constructor(relations: Array<Object> = []
|
|
1
|
+
{"version":3,"file":"ConceptRelationCollection.js","names":["_ResourceCollection","_interopRequireDefault","require","_ConceptRelationModel","_constants","ConceptRelationCollection","ResourceCollection","constructor","relations","arguments","length","undefined","entryDate","modelOptions","_defineProperty2","default","_entryDate","_modelOptions","origin","contextPath","getBasePathModularUI","collection","Array","isArray","_map","call","relation","ConceptRelationModel","types","_context","_context2","_filter","pos","arr","_findIndex","item","key","label","byType","type","_context3","hasIncoming","incoming","hasOutgoing","outgoing","_context4","direction","_context5","exports"],"sources":["../../../src/models/concepts/ConceptRelationCollection.js"],"sourcesContent":["// @flow\nimport ResourceCollection from \"../base/ResourceCollection\";\nimport ConceptRelationModel from \"./ConceptRelationModel\";\nimport type { ModelOptions } from \"../types\";\nimport { getBasePathModularUI } from \"../../constants\";\n\n/**\n * concept relation collection\n */\nexport default class ConceptRelationCollection extends ResourceCollection<ConceptRelationModel> {\n _entryDate: ?ISO_DATE;\n _modelOptions: ModelOptions;\n\n /**\n */\n constructor(\n relations: Array<Object> = [],\n entryDate: ?ISO_DATE = null,\n modelOptions?: ModelOptions,\n ) {\n super();\n\n this._entryDate = entryDate;\n this._modelOptions = modelOptions || {\n origin: \"\",\n contextPath: getBasePathModularUI(),\n };\n\n this.collection = Array.isArray(relations)\n ? relations.map((relation) =>\n relation instanceof ConceptRelationModel\n ? relation\n : new ConceptRelationModel(relation, entryDate, modelOptions),\n )\n : [new ConceptRelationModel(relations, entryDate, modelOptions)];\n }\n\n /**\n * Get unique list of relation types\n */\n get types(): Array<{ key: string, label: string }> {\n return this.collection\n .filter(\n (relation, pos, arr) =>\n arr.findIndex((item) => item.key === relation.key) === pos,\n )\n .map((relation) => ({\n key: relation.key,\n label: relation.label,\n }));\n }\n\n /**\n * Get relation by its type\n */\n byType(type: string): ConceptRelationCollection {\n return new ConceptRelationCollection(\n this.filter((relation) => relation.key === type),\n this._entryDate,\n this._modelOptions,\n );\n }\n\n /**\n */\n hasIncoming(): boolean {\n return this.incoming.length > 0;\n }\n\n /**\n */\n hasOutgoing(): boolean {\n return this.outgoing.length > 0;\n }\n\n /**\n */\n get incoming(): ConceptRelationCollection {\n return new ConceptRelationCollection(\n this.filter((relation) => relation.direction === \"incoming\"),\n this._entryDate,\n this._modelOptions,\n );\n }\n\n /**\n */\n get outgoing(): ConceptRelationCollection {\n return new ConceptRelationCollection(\n this.filter((relation) => relation.direction === \"outgoing\"),\n this._entryDate,\n this._modelOptions,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACe,MAAMG,yBAAyB,SAASC,2BAAkB,CAAuB;EAI9F;AACF;EACEC,WAAWA,CAAA,EAIT;IAAA,IAHAC,SAAwB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IAAA,IAC7BG,SAAoB,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;IAAA,IAC3BI,YAA2B,GAAAJ,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;IAE3B,KAAK,CAAC,CAAC;IAAC,IAAAG,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAER,IAAI,CAACC,UAAU,GAAGJ,SAAS;IAC3B,IAAI,CAACK,aAAa,GAAGJ,YAAY,IAAI;MACnCK,MAAM,EAAE,EAAE;MACVC,WAAW,EAAE,IAAAC,+BAAoB,EAAC;IACpC,CAAC;IAED,IAAI,CAACC,UAAU,GAAGC,KAAK,CAACC,OAAO,CAACf,SAAS,CAAC,GACtC,IAAAgB,IAAA,CAAAT,OAAA,EAAAP,SAAS,EAAAiB,IAAA,CAATjB,SAAS,EAAMkB,QAAQ,IACr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,CAACC,QAAQ,CAAClC,MAAM,GAAG,CAAC;EACjC;;EAEA;AACF;EACE,IAAIgC,QAAQA,CAAA,EAA8B;IAAA,IAAAG,SAAA;IACxC,OAAO,IAAIxC,yBAAyB,CAClC,IAAA0B,OAAA,CAAAhB,OAAA,EAAA8B,SAAA,OAAI,EAAApB,IAAA,CAAAoB,SAAA,EAASnB,QAAQ,IAAKA,QAAQ,CAACoB,SAAS,KAAK,UAAU,CAAC,EAC5D,IAAI,CAAC9B,UAAU,EACf,IAAI,CAACC,aACP,CAAC;EACH;;EAEA;AACF;EACE,IAAI2B,QAAQA,CAAA,EAA8B;IAAA,IAAAG,SAAA;IACxC,OAAO,IAAI1C,yBAAyB,CAClC,IAAA0B,OAAA,CAAAhB,OAAA,EAAAgC,SAAA,OAAI,EAAAtB,IAAA,CAAAsB,SAAA,EAASrB,QAAQ,IAAKA,QAAQ,CAACoB,SAAS,KAAK,UAAU,CAAC,EAC5D,IAAI,CAAC9B,UAAU,EACf,IAAI,CAACC,aACP,CAAC;EACH;AACF;AAAC+B,OAAA,CAAAjC,OAAA,GAAAV,yBAAA","ignoreList":[]}
|
|
@@ -8,6 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
9
9
|
var _ConceptLinkModel = _interopRequireDefault(require("./ConceptLinkModel"));
|
|
10
10
|
var _LinkModel = _interopRequireDefault(require("../links/LinkModel"));
|
|
11
|
+
var _constants = require("../../constants");
|
|
11
12
|
/**
|
|
12
13
|
* Concept relation model
|
|
13
14
|
*/
|
|
@@ -16,11 +17,17 @@ class ConceptRelationModel {
|
|
|
16
17
|
*/
|
|
17
18
|
constructor(relation) {
|
|
18
19
|
let entryDate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
20
|
+
let modelOptions = arguments.length > 2 ? arguments[2] : undefined;
|
|
19
21
|
(0, _defineProperty2.default)(this, "_relation", void 0);
|
|
22
|
+
(0, _defineProperty2.default)(this, "_modelOptions", void 0);
|
|
20
23
|
(0, _defineProperty2.default)(this, "_concept", void 0);
|
|
21
24
|
this._relation = relation;
|
|
25
|
+
this._modelOptions = modelOptions || {
|
|
26
|
+
origin: "",
|
|
27
|
+
contextPath: (0, _constants.getBasePathModularUI)()
|
|
28
|
+
};
|
|
22
29
|
if (relation && relation.concept) {
|
|
23
|
-
this._concept = new _ConceptLinkModel.default(relation.concept, entryDate);
|
|
30
|
+
this._concept = new _ConceptLinkModel.default(relation.concept, entryDate, this._modelOptions);
|
|
24
31
|
}
|
|
25
32
|
}
|
|
26
33
|
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
import ConceptLinkModel from "./ConceptLinkModel";
|
|
3
3
|
import LinkModel from "../links/LinkModel";
|
|
4
4
|
|
|
5
|
+
import { getBasePathModularUI } from "../../constants";
|
|
6
|
+
|
|
5
7
|
import type {
|
|
6
8
|
IModelWithChildModels,
|
|
7
9
|
ModularUIModel,
|
|
8
10
|
textfragmentJSON,
|
|
9
11
|
propertyJSON,
|
|
12
|
+
ModelOptions,
|
|
10
13
|
} from "../types";
|
|
11
14
|
|
|
12
15
|
/**
|
|
@@ -14,15 +17,28 @@ import type {
|
|
|
14
17
|
*/
|
|
15
18
|
export default class ConceptRelationModel implements IModelWithChildModels {
|
|
16
19
|
_relation: Object;
|
|
20
|
+
_modelOptions: ModelOptions;
|
|
17
21
|
_concept: ConceptLinkModel;
|
|
18
22
|
|
|
19
23
|
/**
|
|
20
24
|
*/
|
|
21
|
-
constructor(
|
|
25
|
+
constructor(
|
|
26
|
+
relation: Object,
|
|
27
|
+
entryDate: ?ISO_DATE = null,
|
|
28
|
+
modelOptions?: ModelOptions,
|
|
29
|
+
) {
|
|
22
30
|
this._relation = relation;
|
|
31
|
+
this._modelOptions = modelOptions || {
|
|
32
|
+
origin: "",
|
|
33
|
+
contextPath: getBasePathModularUI(),
|
|
34
|
+
};
|
|
23
35
|
|
|
24
36
|
if (relation && relation.concept) {
|
|
25
|
-
this._concept = new ConceptLinkModel(
|
|
37
|
+
this._concept = new ConceptLinkModel(
|
|
38
|
+
relation.concept,
|
|
39
|
+
entryDate,
|
|
40
|
+
this._modelOptions,
|
|
41
|
+
);
|
|
26
42
|
}
|
|
27
43
|
}
|
|
28
44
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConceptRelationModel.js","names":["_ConceptLinkModel","_interopRequireDefault","require","_LinkModel","ConceptRelationModel","constructor","relation","entryDate","arguments","length","undefined","_defineProperty2","default","_relation","concept","_concept","ConceptLinkModel","getInitialChildModelLinks","setChildModels","models","type","relationType","key","label","relationLabel","direction","relationDirection","relationTypeType","condition","relationCondition","textfragments","textFragments","properties","exports"],"sources":["../../../src/models/concepts/ConceptRelationModel.js"],"sourcesContent":["// @flow\nimport ConceptLinkModel from \"./ConceptLinkModel\";\nimport LinkModel from \"../links/LinkModel\";\n\nimport type {\n IModelWithChildModels,\n ModularUIModel,\n textfragmentJSON,\n propertyJSON,\n} from \"../types\";\n\n/**\n * Concept relation model\n */\nexport default class ConceptRelationModel implements IModelWithChildModels {\n _relation: Object;\n _concept: ConceptLinkModel;\n\n /**\n */\n constructor(relation: Object
|
|
1
|
+
{"version":3,"file":"ConceptRelationModel.js","names":["_ConceptLinkModel","_interopRequireDefault","require","_LinkModel","_constants","ConceptRelationModel","constructor","relation","entryDate","arguments","length","undefined","modelOptions","_defineProperty2","default","_relation","_modelOptions","origin","contextPath","getBasePathModularUI","concept","_concept","ConceptLinkModel","getInitialChildModelLinks","setChildModels","models","type","relationType","key","label","relationLabel","direction","relationDirection","relationTypeType","condition","relationCondition","textfragments","textFragments","properties","exports"],"sources":["../../../src/models/concepts/ConceptRelationModel.js"],"sourcesContent":["// @flow\nimport ConceptLinkModel from \"./ConceptLinkModel\";\nimport LinkModel from \"../links/LinkModel\";\n\nimport { getBasePathModularUI } from \"../../constants\";\n\nimport type {\n IModelWithChildModels,\n ModularUIModel,\n textfragmentJSON,\n propertyJSON,\n ModelOptions,\n} from \"../types\";\n\n/**\n * Concept relation model\n */\nexport default class ConceptRelationModel implements IModelWithChildModels {\n _relation: Object;\n _modelOptions: ModelOptions;\n _concept: ConceptLinkModel;\n\n /**\n */\n constructor(\n relation: Object,\n entryDate: ?ISO_DATE = null,\n modelOptions?: ModelOptions,\n ) {\n this._relation = relation;\n this._modelOptions = modelOptions || {\n origin: \"\",\n contextPath: getBasePathModularUI(),\n };\n\n if (relation && relation.concept) {\n this._concept = new ConceptLinkModel(\n relation.concept,\n entryDate,\n this._modelOptions,\n );\n }\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.concept.getInitialChildModelLinks();\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.concept.setChildModels(models);\n }\n\n /**\n */\n get type(): string {\n return this._relation.relationType;\n }\n\n /**\n * Get key of relation\n */\n get key(): string {\n return this.type;\n }\n\n /**\n * Get Label of relation\n */\n get label(): string {\n return this._relation.relationLabel;\n }\n\n /**\n * Get direction of relation\n */\n get direction(): string {\n return this._relation.relationDirection;\n }\n\n /**\n * Get type of relation type,\n */\n get relationTypeType():\n | \"None\"\n | \"Sub-Class\"\n | \"Composition\"\n | \"Association\"\n | \"Unknown\" {\n return this._relation.relationTypeType ?? \"Unknown\";\n }\n\n /**\n */\n get condition(): string {\n return this._relation.relationCondition;\n }\n\n /**\n * Get other concept\n */\n get concept(): ConceptLinkModel {\n return this._concept;\n }\n\n /**\n * Set concept information\n */\n set concept(concept: ConceptLinkModel) {\n this._concept = concept;\n }\n\n /**\n * Get Text fragments\n */\n get textfragments(): Array<textfragmentJSON> {\n return this._relation.textFragments;\n }\n\n /**\n * Get Properties\n */\n get properties(): Array<propertyJSON> {\n return this._relation.properties;\n }\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,UA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SAASA,CAAA,EAAW;IACtB,OAAO,IAAI,CAAChB,SAAS,CAACiB,iBAAiB;EACzC;;EAEA;AACF;AACA;EACE,IAAIC,gBAAgBA,CAAA,EAKN;IACZ,OAAO,IAAI,CAAClB,SAAS,CAACkB,gBAAgB,IAAI,SAAS;EACrD;;EAEA;AACF;EACE,IAAIC,SAASA,CAAA,EAAW;IACtB,OAAO,IAAI,CAACnB,SAAS,CAACoB,iBAAiB;EACzC;;EAEA;AACF;AACA;EACE,IAAIf,OAAOA,CAAA,EAAqB;IAC9B,OAAO,IAAI,CAACC,QAAQ;EACtB;;EAEA;AACF;AACA;EACE,IAAID,OAAOA,CAACA,OAAyB,EAAE;IACrC,IAAI,CAACC,QAAQ,GAAGD,OAAO;EACzB;;EAEA;AACF;AACA;EACE,IAAIgB,aAAaA,CAAA,EAA4B;IAC3C,OAAO,IAAI,CAACrB,SAAS,CAACsB,aAAa;EACrC;;EAEA;AACF;AACA;EACE,IAAIC,UAAUA,CAAA,EAAwB;IACpC,OAAO,IAAI,CAACvB,SAAS,CAACuB,UAAU;EAClC;AACF;AAACC,OAAA,CAAAzB,OAAA,GAAAT,oBAAA","ignoreList":[]}
|
|
@@ -19,10 +19,9 @@ class SourceReferenceCollection extends _BaseCollection.default {
|
|
|
19
19
|
constructor() {
|
|
20
20
|
let sourceReferences = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
21
21
|
let entryDate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
22
|
-
let
|
|
23
|
-
let contextPath = arguments.length > 3 ? arguments[3] : undefined;
|
|
22
|
+
let modelOptions = arguments.length > 2 ? arguments[2] : undefined;
|
|
24
23
|
super();
|
|
25
|
-
this.collection = sourceReferences ? (0, _map.default)(sourceReferences).call(sourceReferences, sourceReference => new _SourceReferenceModel.default(sourceReference, entryDate,
|
|
24
|
+
this.collection = sourceReferences ? (0, _map.default)(sourceReferences).call(sourceReferences, sourceReference => new _SourceReferenceModel.default(sourceReference, entryDate, modelOptions)) : [];
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
import BaseCollection from "../base/BaseCollection";
|
|
3
3
|
import SourceReferenceModel from "./SourceReferenceModel";
|
|
4
|
+
import type { ModelOptions } from "../types";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Source reference collection
|
|
@@ -11,20 +12,14 @@ export default class SourceReferenceCollection extends BaseCollection<SourceRefe
|
|
|
11
12
|
constructor(
|
|
12
13
|
sourceReferences: Array<Object> = [],
|
|
13
14
|
entryDate: ?ISO_DATE = null,
|
|
14
|
-
|
|
15
|
-
contextPath?: string,
|
|
15
|
+
modelOptions?: ModelOptions,
|
|
16
16
|
) {
|
|
17
17
|
super();
|
|
18
18
|
|
|
19
19
|
this.collection = sourceReferences
|
|
20
20
|
? sourceReferences.map(
|
|
21
21
|
(sourceReference) =>
|
|
22
|
-
new SourceReferenceModel(
|
|
23
|
-
sourceReference,
|
|
24
|
-
entryDate,
|
|
25
|
-
origin,
|
|
26
|
-
contextPath,
|
|
27
|
-
),
|
|
22
|
+
new SourceReferenceModel(sourceReference, entryDate, modelOptions),
|
|
28
23
|
)
|
|
29
24
|
: [];
|
|
30
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceReferenceCollection.js","names":["_BaseCollection","_interopRequireDefault","require","_SourceReferenceModel","SourceReferenceCollection","BaseCollection","constructor","sourceReferences","arguments","length","undefined","entryDate","
|
|
1
|
+
{"version":3,"file":"SourceReferenceCollection.js","names":["_BaseCollection","_interopRequireDefault","require","_SourceReferenceModel","SourceReferenceCollection","BaseCollection","constructor","sourceReferences","arguments","length","undefined","entryDate","modelOptions","collection","_map","default","call","sourceReference","SourceReferenceModel","byTypes","types","_context","_filter","sourceRef","_includes","type","exports"],"sources":["../../../src/models/concepts/SourceReferenceCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\nimport SourceReferenceModel from \"./SourceReferenceModel\";\nimport type { ModelOptions } from \"../types\";\n\n/**\n * Source reference collection\n */\nexport default class SourceReferenceCollection extends BaseCollection<SourceReferenceModel> {\n /**\n */\n constructor(\n sourceReferences: Array<Object> = [],\n entryDate: ?ISO_DATE = null,\n modelOptions?: ModelOptions,\n ) {\n super();\n\n this.collection = sourceReferences\n ? sourceReferences.map(\n (sourceReference) =>\n new SourceReferenceModel(sourceReference, entryDate, modelOptions),\n )\n : [];\n }\n\n /**\n */\n byTypes(types: string): Array<SourceReferenceModel> {\n return this.filter((sourceRef) => types.includes(sourceRef.type));\n }\n}\n"],"mappings":";;;;;;;;;;AACA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAGA;AACA;AACA;AACe,MAAME,yBAAyB,SAASC,uBAAc,CAAuB;EAC1F;AACF;EACEC,WAAWA,CAAA,EAIT;IAAA,IAHAC,gBAA+B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IAAA,IACpCG,SAAoB,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;IAAA,IAC3BI,YAA2B,GAAAJ,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;IAE3B,KAAK,CAAC,CAAC;IAEP,IAAI,CAACG,UAAU,GAAGN,gBAAgB,GAC9B,IAAAO,IAAA,CAAAC,OAAA,EAAAR,gBAAgB,EAAAS,IAAA,CAAhBT,gBAAgB,EACbU,eAAe,IACd,IAAIC,6BAAoB,CAACD,eAAe,EAAEN,SAAS,EAAEC,YAAY,CACrE,CAAC,GACD,EAAE;EACR;;EAEA;AACF;EACEO,OAAOA,CAACC,KAAa,EAA+B;IAAA,IAAAC,QAAA;IAClD,OAAO,IAAAC,OAAA,CAAAP,OAAA,EAAAM,QAAA,OAAI,EAAAL,IAAA,CAAAK,QAAA,EAASE,SAAS,IAAK,IAAAC,SAAA,CAAAT,OAAA,EAAAK,KAAK,EAAAJ,IAAA,CAALI,KAAK,EAAUG,SAAS,CAACE,IAAI,CAAC,CAAC;EACnE;AACF;AAACC,OAAA,CAAAX,OAAA,GAAAX,yBAAA","ignoreList":[]}
|
|
@@ -17,16 +17,16 @@ class SourceReferenceModel {
|
|
|
17
17
|
*/
|
|
18
18
|
constructor(sourceReference) {
|
|
19
19
|
let entryDate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
20
|
-
let
|
|
21
|
-
let contextPath = arguments.length > 3 ? arguments[3] : undefined;
|
|
20
|
+
let modelOptions = arguments.length > 2 ? arguments[2] : undefined;
|
|
22
21
|
(0, _defineProperty2.default)(this, "_sourceReference", void 0);
|
|
23
22
|
(0, _defineProperty2.default)(this, "_entryDate", void 0);
|
|
24
|
-
(0, _defineProperty2.default)(this, "
|
|
25
|
-
(0, _defineProperty2.default)(this, "_contextPath", (0, _constants.getBasePath)());
|
|
23
|
+
(0, _defineProperty2.default)(this, "_modelOptions", void 0);
|
|
26
24
|
this._sourceReference = sourceReference;
|
|
27
25
|
this._entryDate = entryDate;
|
|
28
|
-
this.
|
|
29
|
-
|
|
26
|
+
this._modelOptions = modelOptions || {
|
|
27
|
+
origin: "",
|
|
28
|
+
contextPath: (0, _constants.getBasePathModularUI)()
|
|
29
|
+
};
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -36,13 +36,13 @@ class SourceReferenceModel {
|
|
|
36
36
|
return new _ContentLinkModel.default({
|
|
37
37
|
...this._sourceReference,
|
|
38
38
|
section
|
|
39
|
-
}, this._entryDate, this.
|
|
39
|
+
}, this._entryDate, this._modelOptions);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
*/
|
|
44
44
|
get selfhref() {
|
|
45
|
-
return new _Href.default(this._sourceReference._links.self.href, "SourceReference", this.
|
|
45
|
+
return new _Href.default(this._sourceReference._links.self.href, "SourceReference", this._modelOptions);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -3,28 +3,29 @@ import { createHashFromHref } from "../../utils/helpers/createHash";
|
|
|
3
3
|
|
|
4
4
|
import ContentLinkModel from "../content/ContentLinkModel";
|
|
5
5
|
import Href from "../href/Href";
|
|
6
|
-
import {
|
|
6
|
+
import { getBasePathModularUI } from "../../constants";
|
|
7
|
+
import type { ModelOptions } from "../types";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
*/
|
|
10
11
|
class SourceReferenceModel {
|
|
11
12
|
_sourceReference: Object;
|
|
12
13
|
_entryDate: ?ISO_DATE;
|
|
13
|
-
|
|
14
|
-
_contextPath: string = getBasePath();
|
|
14
|
+
_modelOptions: ModelOptions;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
*/
|
|
18
18
|
constructor(
|
|
19
19
|
sourceReference: Object,
|
|
20
20
|
entryDate: ?ISO_DATE = null,
|
|
21
|
-
|
|
22
|
-
contextPath?: string,
|
|
21
|
+
modelOptions?: ModelOptions,
|
|
23
22
|
) {
|
|
24
23
|
this._sourceReference = sourceReference;
|
|
25
24
|
this._entryDate = entryDate;
|
|
26
|
-
this.
|
|
27
|
-
|
|
25
|
+
this._modelOptions = modelOptions || {
|
|
26
|
+
origin: "",
|
|
27
|
+
contextPath: getBasePathModularUI(),
|
|
28
|
+
};
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
/**
|
|
@@ -41,8 +42,7 @@ class SourceReferenceModel {
|
|
|
41
42
|
section,
|
|
42
43
|
},
|
|
43
44
|
this._entryDate,
|
|
44
|
-
this.
|
|
45
|
-
this._contextPath,
|
|
45
|
+
this._modelOptions,
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -52,8 +52,7 @@ class SourceReferenceModel {
|
|
|
52
52
|
return new Href(
|
|
53
53
|
this._sourceReference._links.self.href,
|
|
54
54
|
"SourceReference",
|
|
55
|
-
this.
|
|
56
|
-
this._contextPath,
|
|
55
|
+
this._modelOptions,
|
|
57
56
|
);
|
|
58
57
|
}
|
|
59
58
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceReferenceModel.js","names":["_createHash","require","_ContentLinkModel","_interopRequireDefault","_Href","_constants","SourceReferenceModel","constructor","sourceReference","entryDate","arguments","length","undefined","
|
|
1
|
+
{"version":3,"file":"SourceReferenceModel.js","names":["_createHash","require","_ContentLinkModel","_interopRequireDefault","_Href","_constants","SourceReferenceModel","constructor","sourceReference","entryDate","arguments","length","undefined","modelOptions","_defineProperty2","default","_sourceReference","_entryDate","_modelOptions","origin","contextPath","getBasePathModularUI","link","section","_links","self","href","replace","content","ContentLinkModel","selfhref","Href","type","label","sourceLabel","referenceHash","createHashFromHref","_default","exports"],"sources":["../../../src/models/concepts/SourceReferenceModel.js"],"sourcesContent":["// @flow\nimport { createHashFromHref } from \"../../utils/helpers/createHash\";\n\nimport ContentLinkModel from \"../content/ContentLinkModel\";\nimport Href from \"../href/Href\";\nimport { getBasePathModularUI } from \"../../constants\";\nimport type { ModelOptions } from \"../types\";\n\n/**\n */\nclass SourceReferenceModel {\n _sourceReference: Object;\n _entryDate: ?ISO_DATE;\n _modelOptions: ModelOptions;\n\n /**\n */\n constructor(\n sourceReference: Object,\n entryDate: ?ISO_DATE = null,\n modelOptions?: ModelOptions,\n ) {\n this._sourceReference = sourceReference;\n this._entryDate = entryDate;\n this._modelOptions = modelOptions || {\n origin: \"\",\n contextPath: getBasePathModularUI(),\n };\n }\n\n /**\n */\n get link(): ContentLinkModel {\n const section = this._sourceReference._links.self.href.replace(\n `${this._sourceReference._links.content.href}/`,\n \"\",\n );\n\n return new ContentLinkModel(\n {\n ...this._sourceReference,\n section,\n },\n this._entryDate,\n this._modelOptions,\n );\n }\n\n /**\n */\n get selfhref(): Href {\n return new Href(\n this._sourceReference._links.self.href,\n \"SourceReference\",\n this._modelOptions,\n );\n }\n\n /**\n */\n get type(): string {\n return this._sourceReference.type;\n }\n\n /**\n */\n get label(): string {\n return this._sourceReference.label;\n }\n\n /**\n */\n get sourceLabel(): string {\n return this._sourceReference.sourceLabel;\n }\n\n /**\n */\n get referenceHash(): number {\n return createHashFromHref(this.selfhref);\n }\n}\n\nexport default SourceReferenceModel;\n"],"mappings":";;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAGA;AACA;AACA,MAAMK,oBAAoB,CAAC;EAKzB;AACF;EACEC,WAAWA,CACTC,eAAuB,EAGvB;IAAA,IAFAC,SAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;IAAA,IAC3BG,YAA2B,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;IAAA,IAAAE,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAE3B,IAAI,CAACC,gBAAgB,GAAGR,eAAe;IACvC,IAAI,CAACS,UAAU,GAAGR,SAAS;IAC3B,IAAI,CAACS,aAAa,GAAGL,YAAY,IAAI;MACnCM,MAAM,EAAE,EAAE;MACVC,WAAW,EAAE,IAAAC,+BAAoB,EAAC;IACpC,CAAC;EACH;;EAEA;AACF;EACE,IAAIC,IAAIA,CAAA,EAAqB;IAC3B,MAAMC,OAAO,GAAG,IAAI,CAACP,gBAAgB,CAACQ,MAAM,CAACC,IAAI,CAACC,IAAI,CAACC,OAAO,CAC5D,GAAG,IAAI,CAACX,gBAAgB,CAACQ,MAAM,CAACI,OAAO,CAACF,IAAI,GAAG,EAC/C,EACF,CAAC;IAED,OAAO,IAAIG,yBAAgB,CACzB;MACE,GAAG,IAAI,CAACb,gBAAgB;MACxBO;IACF,CAAC,EACD,IAAI,CAACN,UAAU,EACf,IAAI,CAACC,aACP,CAAC;EACH;;EAEA;AACF;EACE,IAAIY,QAAQA,CAAA,EAAS;IACnB,OAAO,IAAIC,aAAI,CACb,IAAI,CAACf,gBAAgB,CAACQ,MAAM,CAACC,IAAI,CAACC,IAAI,EACtC,iBAAiB,EACjB,IAAI,CAACR,aACP,CAAC;EACH;;EAEA;AACF;EACE,IAAIc,IAAIA,CAAA,EAAW;IACjB,OAAO,IAAI,CAAChB,gBAAgB,CAACgB,IAAI;EACnC;;EAEA;AACF;EACE,IAAIC,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAACjB,gBAAgB,CAACiB,KAAK;EACpC;;EAEA;AACF;EACE,IAAIC,WAAWA,CAAA,EAAW;IACxB,OAAO,IAAI,CAAClB,gBAAgB,CAACkB,WAAW;EAC1C;;EAEA;AACF;EACE,IAAIC,aAAaA,CAAA,EAAW;IAC1B,OAAO,IAAAC,8BAAkB,EAAC,IAAI,CAACN,QAAQ,CAAC;EAC1C;AACF;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAvB,OAAA,GAEcT,oBAAoB","ignoreList":[]}
|
|
@@ -28,9 +28,9 @@ class ContentIndexModel extends _ResourceModel.default {
|
|
|
28
28
|
this._filterCollection = new _FilterCollection.default((0, _filter.default)(this.data), {
|
|
29
29
|
filter: (0, _filter.default)(this.contributions),
|
|
30
30
|
dynamicschema: this.data.dynamicschema
|
|
31
|
-
});
|
|
31
|
+
}, this.modelOptions);
|
|
32
32
|
this._content = new _ResourceCollection.default();
|
|
33
|
-
this._content.collection = this.data._embedded ? (0, _map.default)(_context = this.data._embedded.results).call(_context, content => new _ContentLinkModel.default(content.content)) : [];
|
|
33
|
+
this._content.collection = this.data._embedded ? (0, _map.default)(_context = this.data._embedded.results).call(_context, content => new _ContentLinkModel.default(content.content, null, this.modelOptions)) : [];
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -23,15 +23,20 @@ export default class ContentIndexModel extends ResourceModel {
|
|
|
23
23
|
constructor(modularuiResponse: ModularUIResponse) {
|
|
24
24
|
super(modularuiResponse);
|
|
25
25
|
|
|
26
|
-
this._filterCollection = new FilterCollection(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
this._filterCollection = new FilterCollection(
|
|
27
|
+
this.data.filter,
|
|
28
|
+
{
|
|
29
|
+
filter: this.contributions.filter,
|
|
30
|
+
dynamicschema: this.data.dynamicschema,
|
|
31
|
+
},
|
|
32
|
+
this.modelOptions,
|
|
33
|
+
);
|
|
30
34
|
|
|
31
35
|
this._content = new ResourceCollection();
|
|
32
36
|
this._content.collection = this.data._embedded
|
|
33
37
|
? this.data._embedded.results.map(
|
|
34
|
-
(content) =>
|
|
38
|
+
(content) =>
|
|
39
|
+
new ContentLinkModel(content.content, null, this.modelOptions),
|
|
35
40
|
)
|
|
36
41
|
: [];
|
|
37
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentIndexModel.js","names":["_ResourceModel","_interopRequireDefault","require","_ResourceCollection","_FilterCollection","_ContentLinkModel","_Href","_ChoiceAttributeModel","ContentIndexModel","ResourceModel","constructor","modularuiResponse","_context","_defineProperty2","default","_filterCollection","FilterCollection","_filter","data","filter","contributions","dynamicschema","_content","ResourceCollection","collection","_embedded","_map","results","call","content","ContentLinkModel","type","modelName","isApplicableModel","resourcetype","getInitialChildModelLinks","items","setChildModels","models","errors","selfhref","href","selflink","filterCollection","forEach","params","param","value","setParameter","name","removeParameter","label","getContribution","indexfilter","getFilterByAttributeKey","hasIndexFilter","filterAttribute","attribute","ChoiceAttributeModel","options","length","hasFiltersSet","some","isActive","hasNoFiltersSet","getFirstCharHref","firstChar","_context2","option","code","Href","addParameter","exports"],"sources":["../../../src/models/content/ContentIndexModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport ResourceCollection from \"../base/ResourceCollection\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ContentLinkModel from \"./ContentLinkModel\";\nimport Href from \"../href/Href\";\nimport ChoiceAttributeModel from \"../attributes/ChoiceAttributeModel\";\n\nimport type { FilterType, ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type ErrorResponse from \"../error/ErrorResponse\";\n\n/**\n * Get Index of concepts, to filter model catalog\n */\nexport default class ContentIndexModel extends ResourceModel {\n _filterCollection: FilterCollection;\n _content: ResourceCollection<ContentLinkModel>;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._filterCollection = new FilterCollection(this.data.filter
|
|
1
|
+
{"version":3,"file":"ContentIndexModel.js","names":["_ResourceModel","_interopRequireDefault","require","_ResourceCollection","_FilterCollection","_ContentLinkModel","_Href","_ChoiceAttributeModel","ContentIndexModel","ResourceModel","constructor","modularuiResponse","_context","_defineProperty2","default","_filterCollection","FilterCollection","_filter","data","filter","contributions","dynamicschema","modelOptions","_content","ResourceCollection","collection","_embedded","_map","results","call","content","ContentLinkModel","type","modelName","isApplicableModel","resourcetype","getInitialChildModelLinks","items","setChildModels","models","errors","selfhref","href","selflink","filterCollection","forEach","params","param","value","setParameter","name","removeParameter","label","getContribution","indexfilter","getFilterByAttributeKey","hasIndexFilter","filterAttribute","attribute","ChoiceAttributeModel","options","length","hasFiltersSet","some","isActive","hasNoFiltersSet","getFirstCharHref","firstChar","_context2","option","code","Href","addParameter","exports"],"sources":["../../../src/models/content/ContentIndexModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport ResourceCollection from \"../base/ResourceCollection\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ContentLinkModel from \"./ContentLinkModel\";\nimport Href from \"../href/Href\";\nimport ChoiceAttributeModel from \"../attributes/ChoiceAttributeModel\";\n\nimport type { FilterType, ModularUIModel } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type ErrorResponse from \"../error/ErrorResponse\";\n\n/**\n * Get Index of concepts, to filter model catalog\n */\nexport default class ContentIndexModel extends ResourceModel {\n _filterCollection: FilterCollection;\n _content: ResourceCollection<ContentLinkModel>;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._filterCollection = new FilterCollection(\n this.data.filter,\n {\n filter: this.contributions.filter,\n dynamicschema: this.data.dynamicschema,\n },\n this.modelOptions,\n );\n\n this._content = new ResourceCollection();\n this._content.collection = this.data._embedded\n ? this.data._embedded.results.map(\n (content) =>\n new ContentLinkModel(content.content, null, this.modelOptions),\n )\n : [];\n }\n\n /**\n */\n get type(): string {\n return \"ContentIndex\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ContentIndexModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ContentSearch\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.items.getInitialChildModelLinks();\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>, errors: Array<ErrorResponse>) {\n this.items.setChildModels(models, errors);\n }\n\n /**\n * Getting the self link of this list\n */\n get selfhref(): Href {\n const href = this.selflink.href;\n\n this.filterCollection.forEach((filter) => {\n filter.params.forEach((param) => {\n if (param.value) {\n href.setParameter(param.name, param.value);\n } else {\n href.removeParameter(param.name);\n }\n });\n });\n\n return href;\n }\n\n /**\n */\n get label(): string {\n return this.getContribution(\"label\");\n }\n\n /**\n * Retrieve filters of conceptindex model\n */\n get filterCollection(): FilterCollection {\n return this._filterCollection;\n }\n\n /**\n * Get index filter\n */\n get indexfilter(): FilterType | null {\n return this._filterCollection.getFilterByAttributeKey(\"index\");\n }\n\n /**\n * Retrieve content collection\n */\n get items(): ResourceCollection<ContentLinkModel> {\n return this._content;\n }\n\n /**\n */\n hasIndexFilter(): boolean {\n const filterAttribute = this.indexfilter?.attribute;\n\n return (\n filterAttribute instanceof ChoiceAttributeModel &&\n filterAttribute.options.length > 0\n );\n }\n\n /**\n */\n hasFiltersSet(): boolean {\n return this.filterCollection.some((filter) => filter.isActive());\n }\n\n /**\n */\n hasNoFiltersSet(): boolean {\n return !this.hasFiltersSet();\n }\n\n /**\n */\n getFirstCharHref(): Href {\n const filterAttribute = this.indexfilter?.attribute;\n\n let firstChar = \"#\";\n if (filterAttribute instanceof ChoiceAttributeModel) {\n firstChar = filterAttribute.options.filter(\n (option) => option.code !== \"0\",\n )[0].code;\n }\n\n return new Href(this.selfhref).addParameter(\"index\", firstChar);\n }\n}\n"],"mappings":";;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,qBAAA,GAAAN,sBAAA,CAAAC,OAAA;AAOA;AACA;AACA;AACe,MAAMM,iBAAiB,SAASC,sBAAa,CAAC;EAI3D;AACF;EACEC,WAAWA,CAACC,iBAAoC,EAAE;IAAA,IAAAC,QAAA;IAChD,KAAK,CAACD,iBAAiB,CAAC;IAAC,IAAAE,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAEzB,IAAI,CAACC,iBAAiB,GAAG,IAAIC,yBAAgB,KAAAC,OAAA,CAAAH,OAAA,EAC3C,IAAI,CAACI,IAAI,GACT;MACEC,MAAM,MAAAF,OAAA,CAAAH,OAAA,EAAE,IAAI,CAACM,aAAa,CAAO;MACjCC,aAAa,EAAE,IAAI,CAACH,IAAI,CAACG;IAC3B,CAAC,EACD,IAAI,CAACC,YACP,C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AAAsD,SAAA,GAAAX,eAAe,CAACG,OAAO,EAAA/B,IAAA,CAAAuC,SAAA,EAChCC,MAAM,IAAKA,MAAM,CAACC,IAAI,KAAK,GAC9B,CAAC,CAAC,CAAC,CAAC,CAACA,IAAI;IACX;IAEA,OAAO,IAAIC,aAAI,CAAC,IAAI,CAAC9B,QAAQ,CAAC,CAAC+B,YAAY,CAAC,OAAO,EAAEL,SAAS,CAAC;EACjE;AACF;AAACM,OAAA,CAAA3D,OAAA,GAAAN,iBAAA","ignoreList":[]}
|
|
@@ -13,7 +13,6 @@ var _LinkModel = _interopRequireDefault(require("../links/LinkModel"));
|
|
|
13
13
|
var _ContentTypeModel = _interopRequireDefault(require("./ContentTypeModel"));
|
|
14
14
|
var _Constants = require("../../constants/Constants");
|
|
15
15
|
var _LinkCollection = _interopRequireDefault(require("../links/LinkCollection"));
|
|
16
|
-
var _constants = require("../../constants");
|
|
17
16
|
/**
|
|
18
17
|
* Link to a concept
|
|
19
18
|
*/
|
|
@@ -22,18 +21,13 @@ class ContentLinkModel extends _BaseModel.default {
|
|
|
22
21
|
*/
|
|
23
22
|
constructor(data) {
|
|
24
23
|
let entryDate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
super(data, {});
|
|
24
|
+
let modelOptions = arguments.length > 2 ? arguments[2] : undefined;
|
|
25
|
+
super(data, {}, modelOptions);
|
|
28
26
|
(0, _defineProperty2.default)(this, "_links", void 0);
|
|
29
27
|
(0, _defineProperty2.default)(this, "_entryDate", void 0);
|
|
30
28
|
(0, _defineProperty2.default)(this, "_contentType", null);
|
|
31
29
|
(0, _defineProperty2.default)(this, "_items", void 0);
|
|
32
|
-
(0, _defineProperty2.default)(this, "_origin", "");
|
|
33
|
-
(0, _defineProperty2.default)(this, "_contextPath", (0, _constants.getBasePath)());
|
|
34
30
|
this._entryDate = entryDate;
|
|
35
|
-
this._origin = origin || "";
|
|
36
|
-
this._contextPath = contextPath || (0, _constants.getBasePath)();
|
|
37
31
|
}
|
|
38
32
|
|
|
39
33
|
/**
|
|
@@ -105,7 +99,7 @@ class ContentLinkModel extends _BaseModel.default {
|
|
|
105
99
|
*/
|
|
106
100
|
createEncodedHref() {
|
|
107
101
|
const startURI = "/content/";
|
|
108
|
-
const selfHref = new _Href.default(this.data._links.self.href,
|
|
102
|
+
const selfHref = new _Href.default(this.data._links.self.href, "", this.modelOptions);
|
|
109
103
|
const href = selfHref.path;
|
|
110
104
|
const section = this.data.section;
|
|
111
105
|
const sourceId = section ? href.substring(startURI.length, href.lastIndexOf("/")) : href.substring(startURI.length);
|
|
@@ -134,7 +128,7 @@ class ContentLinkModel extends _BaseModel.default {
|
|
|
134
128
|
*/
|
|
135
129
|
get links() {
|
|
136
130
|
if (!this._links) {
|
|
137
|
-
this._links = new _LinkCollection.default(Array.isArray(this.data._links) ? this.data._links[0] : this.data._links, null, this.
|
|
131
|
+
this._links = new _LinkCollection.default(Array.isArray(this.data._links) ? this.data._links[0] : this.data._links, null, this.modelOptions);
|
|
138
132
|
}
|
|
139
133
|
return this._links;
|
|
140
134
|
}
|
|
@@ -7,8 +7,11 @@ import { TIMEVERSION_FILTER_NAME } from "../../constants/Constants";
|
|
|
7
7
|
|
|
8
8
|
import LinkCollection from "../links/LinkCollection";
|
|
9
9
|
|
|
10
|
-
import type {
|
|
11
|
-
|
|
10
|
+
import type {
|
|
11
|
+
ModularUIModel,
|
|
12
|
+
IModelWithChildModels,
|
|
13
|
+
ModelOptions,
|
|
14
|
+
} from "../types";
|
|
12
15
|
|
|
13
16
|
/**
|
|
14
17
|
* Link to a concept
|
|
@@ -21,22 +24,17 @@ export default class ContentLinkModel
|
|
|
21
24
|
_entryDate: ?ISO_DATE;
|
|
22
25
|
_contentType: ContentTypeModel | null = null;
|
|
23
26
|
_items: Array<ContentLinkModel>;
|
|
24
|
-
_origin: string = "";
|
|
25
|
-
_contextPath: string = getBasePath();
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
29
|
*/
|
|
29
30
|
constructor(
|
|
30
31
|
data: Object,
|
|
31
32
|
entryDate: ?ISO_DATE = null,
|
|
32
|
-
|
|
33
|
-
contextPath?: string,
|
|
33
|
+
modelOptions?: ModelOptions,
|
|
34
34
|
) {
|
|
35
|
-
super(data, {});
|
|
35
|
+
super(data, {}, modelOptions);
|
|
36
36
|
|
|
37
37
|
this._entryDate = entryDate;
|
|
38
|
-
this._origin = origin || "";
|
|
39
|
-
this._contextPath = contextPath || getBasePath();
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
/**
|
|
@@ -115,8 +113,8 @@ export default class ContentLinkModel
|
|
|
115
113
|
const startURI = "/content/";
|
|
116
114
|
const selfHref = new Href(
|
|
117
115
|
this.data._links.self.href,
|
|
118
|
-
|
|
119
|
-
this.
|
|
116
|
+
"",
|
|
117
|
+
this.modelOptions,
|
|
120
118
|
);
|
|
121
119
|
const href = selfHref.path;
|
|
122
120
|
|
|
@@ -158,8 +156,7 @@ export default class ContentLinkModel
|
|
|
158
156
|
? this.data._links[0]
|
|
159
157
|
: this.data._links,
|
|
160
158
|
null,
|
|
161
|
-
this.
|
|
162
|
-
this._contextPath,
|
|
159
|
+
this.modelOptions,
|
|
163
160
|
);
|
|
164
161
|
}
|
|
165
162
|
|