@truedat/bg 8.4.2 → 8.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/bg",
3
- "version": "8.4.2",
3
+ "version": "8.4.4",
4
4
  "description": "Truedat Web Business Glossary",
5
5
  "sideEffects": false,
6
6
  "module": "src/index.js",
@@ -51,7 +51,7 @@
51
51
  "@testing-library/jest-dom": "^6.6.3",
52
52
  "@testing-library/react": "^16.3.0",
53
53
  "@testing-library/user-event": "^14.6.1",
54
- "@truedat/test": "8.4.2",
54
+ "@truedat/test": "8.4.4",
55
55
  "identity-obj-proxy": "^3.0.0",
56
56
  "jest": "^29.7.0",
57
57
  "redux-saga-test-plan": "^4.0.6"
@@ -84,5 +84,5 @@
84
84
  "semantic-ui-react": "^3.0.0-beta.2",
85
85
  "swr": "^2.3.3"
86
86
  },
87
- "gitHead": "6ce335c57b6311c56828ce132b816322aa79d9ea"
87
+ "gitHead": "0d8d2a2f4526c425fcef656a6004484cbd755774"
88
88
  }
@@ -193,6 +193,7 @@ const ConceptRoutes = ({
193
193
  useFilters={() => useLinksFilters({ linkable: true })}
194
194
  pageSize={20}
195
195
  defaultFilters={{ status: ["pending"] }}
196
+ useDomainSearchFilter
196
197
  >
197
198
  <ConceptLinksApprovals />
198
199
  </SearchContextProvider>
@@ -59,6 +59,7 @@ export const ConceptsPanel = ({ defaultFilters, actions, filtersGroup }) => {
59
59
  translations,
60
60
  pageSize: 20,
61
61
  filtersGroup,
62
+ useDomainSearchFilter: true,
62
63
  };
63
64
 
64
65
  const subscope = _.flow(_.get("template.subscope"), _.head)(defaultFilters);
@@ -1,4 +1,5 @@
1
1
  import {
2
+ clearRedirect,
2
3
  createSubscription,
3
4
  deleteSubscription,
4
5
  updateSubscription
@@ -47,49 +48,48 @@ describe("reducers: conceptRedirect", () => {
47
48
  ).toBe(redirectUrl);
48
49
  });
49
50
 
50
-
51
- it("should be link to concept on updateSubscription.SUCCESS state otherwise", () => {
51
+ it("should keep current state on updateSubscription.SUCCESS", () => {
52
52
  expect(
53
53
  conceptRedirect(fooState, {
54
54
  type: updateSubscription.SUCCESS,
55
55
  payload: { bar: "baz" }
56
56
  })
57
57
  ).toBe(fooState);
58
- expect(
59
- conceptRedirect(fooState, {
60
- type: updateSubscription.SUCCESS,
61
- payload
62
- })
63
- ).toBe(conceptUrl(concept));
64
58
  });
65
59
 
66
- it("should be link to concept on deleteSubscription.SUCCESS state otherwise", () => {
60
+ it("should keep current state on deleteSubscription.SUCCESS", () => {
67
61
  expect(
68
62
  conceptRedirect(fooState, {
69
63
  type: deleteSubscription.SUCCESS,
70
64
  payload: { bar: "baz" }
71
65
  })
72
66
  ).toBe(fooState);
73
- expect(
74
- conceptRedirect(fooState, {
75
- type: deleteSubscription.SUCCESS,
76
- payload
77
- })
78
- ).toBe(conceptUrl(concept));
79
67
  });
80
68
 
81
- it("should be link to concept on createSubscription.SUCCESS state otherwise", () => {
69
+ it("should keep current state on createSubscription.SUCCESS", () => {
82
70
  expect(
83
71
  conceptRedirect(fooState, {
84
72
  type: createSubscription.SUCCESS,
85
73
  payload: { bar: "baz" }
86
74
  })
87
75
  ).toBe(fooState);
76
+ });
77
+
78
+ it("should return initial state on clearRedirect.TRIGGER", () => {
88
79
  expect(
89
80
  conceptRedirect(fooState, {
90
- type: createSubscription.SUCCESS,
91
- payload
81
+ type: clearRedirect.TRIGGER
92
82
  })
93
- ).toBe(conceptUrl(concept));
83
+ ).toBe("");
84
+ });
85
+
86
+ it("should keep current state on conceptAction.SUCCESS when action does not redirect", () => {
87
+ expect(
88
+ conceptRedirect(fooState, {
89
+ type: conceptAction.SUCCESS,
90
+ payload: { data },
91
+ meta: { action: "archive" }
92
+ })
93
+ ).toBe(fooState);
94
94
  });
95
95
  });
@@ -36,18 +36,10 @@ export const conceptRedirect = (
36
36
  const { redirectUrl } = meta;
37
37
  return redirectUrl;
38
38
  }
39
- case updateSubscription.SUCCESS: {
40
- const { concept } = payload;
41
- return _.isNil(concept) ? state : linkTo.CONCEPT_VERSION(concept);
42
- }
43
- case deleteSubscription.SUCCESS: {
44
- const { concept } = payload;
45
- return _.isNil(concept) ? state : linkTo.CONCEPT_VERSION(concept);
46
- }
47
- case createSubscription.SUCCESS: {
48
- const { concept } = payload;
49
- return _.isNil(concept) ? state : linkTo.CONCEPT_VERSION(concept);
50
- }
39
+ case updateSubscription.SUCCESS:
40
+ case deleteSubscription.SUCCESS:
41
+ case createSubscription.SUCCESS:
42
+ return state;
51
43
  default:
52
44
  return state;
53
45
  }
@@ -245,6 +245,7 @@ export const ConceptSelector = (props) => {
245
245
  translations,
246
246
  filtersGroup,
247
247
  enrichSearchPayload,
248
+ useDomainSearchFilter: true,
248
249
  };
249
250
  return (
250
251
  <SearchContextProvider {...searchProps} defaultFilters={defaultFilters}>