@truedat/core 4.40.7 → 4.40.10

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.40.10] 2022-03-21
4
+
5
+ ### Changed
6
+
7
+ - [TD-4447] Default message for filters now strips any prefix
8
+
3
9
  ## [4.40.0] 2022-03-07
4
10
 
5
11
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/core",
3
- "version": "4.40.7",
3
+ "version": "4.40.10",
4
4
  "description": "Truedat Web Core",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -32,7 +32,7 @@
32
32
  "@babel/plugin-transform-modules-commonjs": "^7.15.0",
33
33
  "@babel/preset-env": "^7.15.0",
34
34
  "@babel/preset-react": "^7.14.5",
35
- "@truedat/test": "4.40.5",
35
+ "@truedat/test": "4.40.10",
36
36
  "babel-jest": "^27.0.6",
37
37
  "babel-plugin-dynamic-import-node": "^2.3.3",
38
38
  "babel-plugin-lodash": "^3.3.4",
@@ -106,5 +106,5 @@
106
106
  "react-dom": ">= 16.8.6 < 17",
107
107
  "semantic-ui-react": ">= 0.88.2 < 2.1"
108
108
  },
109
- "gitHead": "57ce60d30f6238ab63207ae402dfc0bc0e5c934a"
109
+ "gitHead": "2a753ab01d2f856c32336cebc938b83f4bc97ea6"
110
110
  }
@@ -5,12 +5,14 @@ import { Dropdown } from "semantic-ui-react";
5
5
  import { FormattedMessage, useIntl } from "react-intl";
6
6
  import { i18nOrder } from "../services/sort";
7
7
 
8
+ const removePrefix = _.replace(/^.*\./, "");
9
+
8
10
  export const AvailableFilters = ({
9
11
  addFilter,
10
12
  disabled,
11
13
  filters,
12
14
  loading,
13
- resetFilters
15
+ resetFilters,
14
16
  }) => {
15
17
  const { formatMessage } = useIntl();
16
18
  return (
@@ -38,12 +40,12 @@ export const AvailableFilters = ({
38
40
  {_.flow(
39
41
  _.defaultTo([]),
40
42
  _.sortBy(i18nOrder(formatMessage, "filters")),
41
- _.map(filter => (
43
+ _.map((filter) => (
42
44
  <Dropdown.Item
43
45
  key={filter}
44
46
  text={formatMessage({
45
47
  id: `filters.${filter}`,
46
- defaultMessage: filter
48
+ defaultMessage: removePrefix(filter),
47
49
  })}
48
50
  onClick={() => addFilter({ filter })}
49
51
  />
@@ -59,7 +61,7 @@ AvailableFilters.propTypes = {
59
61
  disabled: PropTypes.bool,
60
62
  filters: PropTypes.array,
61
63
  resetFilters: PropTypes.func,
62
- loading: PropTypes.bool
64
+ loading: PropTypes.bool,
63
65
  };
64
66
 
65
67
  export default AvailableFilters;
@@ -4,9 +4,10 @@ import PropTypes from "prop-types";
4
4
  import { FormattedMessage } from "react-intl";
5
5
  import { Label, Icon, Dropdown, Dimmer, Loader } from "semantic-ui-react";
6
6
  import { accentInsensitivePathOrder } from "../services/sort";
7
-
8
7
  import FilterItem from "./FilterItem";
9
8
 
9
+ const removePrefix = _.replace(/^.*\./, "");
10
+
10
11
  export const FilterDropdown = ({
11
12
  activeValues,
12
13
  closeFilter,
@@ -25,7 +26,10 @@ export const FilterDropdown = ({
25
26
  upward={false}
26
27
  trigger={
27
28
  <Label key={filter}>
28
- <FormattedMessage id={`filters.${filter}`} defaultMessage={filter} />
29
+ <FormattedMessage
30
+ id={`filters.${filter}`}
31
+ defaultMessage={removePrefix(filter)}
32
+ />
29
33
  <Icon
30
34
  name="delete"
31
35
  onClick={(e) => {
package/src/routes.js CHANGED
@@ -86,15 +86,20 @@ export const PROFILE_EXECUTION =
86
86
  "/profileGroups/:group_id/profileExecutions/:id";
87
87
  export const PROFILE_GROUP = "/profileGroups/:id";
88
88
  export const QUALITY_DASHBOARD = "/quality_dashboard";
89
+ export const REMEDIATION_PLAN = "/rule_results/:rule_result_id/remediation";
90
+ export const REMEDIATION_EDIT =
91
+ "/rules/:id/implementations/:implementation_id/ruleResults/:rule_result_id/remediation/edit";
92
+ export const REMEDIATION_NEW =
93
+ "/rules/:id/implementations/:implementation_id/ruleResults/:rule_result_id/remediation/new";
89
94
  export const ROLE = "/roles/:id";
90
95
  export const ROLES = "/roles";
91
96
  export const ROLES_NEW = "/roles/new";
92
- export const RULE = "/rules/:id";
97
+ export const RULE = "/rules/:id(\\d+)";
93
98
  export const RULES = "/rules";
94
99
  export const RULE_EDIT = "/rules/:id/edit";
95
100
  export const RULE_EVENTS = "/rules/:id/events";
96
101
  export const RULE_IMPLEMENTATION =
97
- "/rules/:id/implementations/:implementation_id";
102
+ "/rules/:id/implementations/:implementation_id(\\d+)";
98
103
  export const RULE_IMPLEMENTATIONS = "/rules/:id/implementations";
99
104
  export const RULE_IMPLEMENTATION_EVENTS =
100
105
  "/rules/:id/implementations/:implementation_id/events";
@@ -238,6 +243,9 @@ const routes = {
238
243
  PROFILE_EXECUTION,
239
244
  PROFILE_GROUP,
240
245
  QUALITY_DASHBOARD,
246
+ REMEDIATION_PLAN,
247
+ REMEDIATION_EDIT,
248
+ REMEDIATION_NEW,
241
249
  ROLE,
242
250
  ROLES_NEW,
243
251
  ROLES,