@truedat/bg 7.6.2 → 7.6.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": "7.6.2",
3
+ "version": "7.6.4",
4
4
  "description": "Truedat Web Business Glossary",
5
5
  "sideEffects": false,
6
6
  "module": "src/index.js",
@@ -48,7 +48,7 @@
48
48
  "@testing-library/jest-dom": "^6.6.3",
49
49
  "@testing-library/react": "^16.3.0",
50
50
  "@testing-library/user-event": "^14.6.1",
51
- "@truedat/test": "7.6.2",
51
+ "@truedat/test": "7.6.4",
52
52
  "identity-obj-proxy": "^3.0.0",
53
53
  "jest": "^29.7.0",
54
54
  "redux-saga-test-plan": "^4.0.6"
@@ -81,5 +81,5 @@
81
81
  "semantic-ui-react": "^3.0.0-beta.2",
82
82
  "swr": "^2.3.3"
83
83
  },
84
- "gitHead": "413392c768bdc4e352be8863a70b031483b9ca88"
84
+ "gitHead": "994343683c2e0fb3fab85a021e627b1b86a7831f"
85
85
  }
@@ -26,6 +26,7 @@ import SuggestionsWidget from "@truedat/ai/components/suggestions/SuggestionsWid
26
26
  import { useAvailabilityCheck as useTranslatableCheck } from "@truedat/ai/hooks/useTranslations";
27
27
  import { splitTranslatableFields } from "@truedat/core/services/i18nContent";
28
28
  import { TranslationModal } from "@truedat/ai/components";
29
+ import { useWebContext } from "@truedat/core/webContext";
29
30
 
30
31
  const SelectDynamicFormWithTranslations = lazy(
31
32
  () => import("@truedat/df/components/SelectDynamicFormWithTranslations")
@@ -43,6 +44,7 @@ const ConceptForm = ({
43
44
  template,
44
45
  }) => {
45
46
  const { formatMessage } = useIntl();
47
+ const { disable_td_ai } = useWebContext();
46
48
  const {
47
49
  defaultLang,
48
50
  altLangs,
@@ -74,7 +76,7 @@ const ConceptForm = ({
74
76
  });
75
77
  };
76
78
  const checkCanTranslate = () => {
77
- if (templateId && domainId) {
79
+ if (!disable_td_ai && templateId && domainId) {
78
80
  checkTranslationAvailability({
79
81
  domain_ids: [domainId],
80
82
  resource_type: "business_concept",
@@ -93,7 +95,7 @@ const ConceptForm = ({
93
95
  }, []);
94
96
 
95
97
  useEffect(() => {
96
- if (templateId && domainId) {
98
+ if (!disable_td_ai && templateId && domainId) {
97
99
  checkSuggestionAvailability({
98
100
  template_id: templateId,
99
101
  domain_ids: [domainId],