-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changeset description mustache tags (#2093)
* changed task controls in review, inspect and active contexts to replace mustache tagged properties in osm changeset comments, added HOC for property hooks and parameter for edit service for external editors to populate replaced comment
- Loading branch information
1 parent
4278483
commit bf1a97b
Showing
5 changed files
with
80 additions
and
16 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/components/HOCs/WithTaskFeatureProperties/WithTaskFeatureProperties.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react' | ||
import useMRProperties from '../../../hooks/UseMRProperties/UseMRProperties' | ||
import AsMappableTask from '../../../interactions/Task/AsMappableTask' | ||
|
||
/** | ||
* WithTaskFeatureProperties provides task feature properties derived | ||
* from the useMRProperties hook and the AsMappableTask interaction. | ||
* Both property sets are combined and passed as props to wrapped components. | ||
*/ | ||
|
||
|
||
const WithTaskFeatureProperties = (Component) => { | ||
return function(props) { | ||
const allFeatureProperties = AsMappableTask(props.task).allFeatureProperties() | ||
const mrProperties = useMRProperties(props.workspaceContext) | ||
const allProperties = Object.assign({}, mrProperties, allFeatureProperties) | ||
|
||
return (<Component {...props} taskFeatureProperties={allProperties}/>) | ||
} | ||
} | ||
|
||
export default WithTaskFeatureProperties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters