@capillarytech/creatives-library 7.17.127 → 7.17.129

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.17.127",
4
+ "version": "7.17.129",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -47,7 +47,7 @@ import messages from './messages';
47
47
  import { selectCurrentOrgDetails } from "../../v2Containers/Cap/selectors";
48
48
  import './_formBuilder.scss';
49
49
  import {updateCharCount, checkUnicode} from "../../utils/smsCharCountV2";
50
- import { SMS, MOBILE_PUSH, LINE, ENABLE_AI_SUGGESTIONS } from '../../v2Containers/CreativesContainer/constants';
50
+ import { SMS, MOBILE_PUSH, LINE, ENABLE_AI_SUGGESTIONS,AI_CONTENT_BOT_DISABLED } from '../../v2Containers/CreativesContainer/constants';
51
51
  import { validateIfTagClosed } from '../../utils/tagValidations';
52
52
  import globalMessages from '../../v2Containers/Cap/messages';
53
53
  import { convert } from 'html-to-text';
@@ -2340,8 +2340,8 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
2340
2340
  const { formatMessage } = this.props.intl;
2341
2341
 
2342
2342
  const { accessibleFeatures = [] } = this.props.currentOrgDetails || {};
2343
- const hasAiSuggestionsEnabled = accessibleFeatures.includes(
2344
- ENABLE_AI_SUGGESTIONS
2343
+ const isAiContentBotDisabled = accessibleFeatures?.includes(
2344
+ AI_CONTENT_BOT_DISABLED
2345
2345
  );
2346
2346
 
2347
2347
  let errorMessageText = false;
@@ -2380,7 +2380,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
2380
2380
  cols={cols}
2381
2381
  />
2382
2382
  {[SMS, MOBILE_PUSH].includes(this.props.schema?.channel)
2383
- && hasAiSuggestionsEnabled
2383
+ && !isAiContentBotDisabled
2384
2384
  && this.props.isFullMode
2385
2385
  && (
2386
2386
  <CapAskAira.ContentGenerationBot
@@ -17,6 +17,7 @@ import {
17
17
  ENABLE_AI_SUGGESTIONS,
18
18
  ENABLE_NEW_LEFT_NAVIGATION,
19
19
  DEFAULT_MODULE,
20
+ AI_DOCUMENTATION_BOT_ENABLED
20
21
  } from '../../v2Containers/Cap/constants';
21
22
  import CapNavigation from '@capillarytech/cap-ui-library/CapNavigation';
22
23
  import configPath from '../../config/path';
@@ -148,7 +149,7 @@ export class NavigationBar extends React.Component {
148
149
  handleLeftNavBarExpanded,
149
150
  leftNavbarExpandedProp,
150
151
  } = this.props;
151
- const showDocumentationBot = userData?.currentOrgDetails?.accessibleFeatures?.includes(ENABLE_AI_SUGGESTIONS);
152
+ const showDocumentationBot = userData?.currentOrgDetails?.accessibleFeatures?.includes(ENABLE_AI_SUGGESTIONS) || userData?.currentOrgDetails?.accessibleFeatures?.includes(AI_DOCUMENTATION_BOT_ENABLED);
152
153
  const dropdownMenuProps = this.getDropdownMenu();
153
154
  const {
154
155
  currentOrgDetails: {
@@ -39,6 +39,8 @@ export const ORG_REFRESH_SEC = 10;
39
39
  export const ORG_CHANGED = 'ORG_CHANGED';
40
40
 
41
41
  export const ENABLE_AI_SUGGESTIONS = 'ENABLE_AI_SUGGESTIONS';
42
+ export const AI_CONTENT_BOT_DISABLED = 'AI_CONTENT_BOT_DISABLED';
43
+ export const AI_DOCUMENTATION_BOT_ENABLED = 'AI_DOCUMENTATION_BOT_ENABLED';
42
44
  export const ERROR_IN_FETCHING_TAGS = 'Error in fetching tags';
43
45
  export const ENABLE_NEW_LEFT_NAVIGATION = 'ENABLE_NEW_LEFT_NAVIGATION';
44
46
 
@@ -192,9 +192,7 @@ export function* getSupportVideosConfig({ callback }) {
192
192
  }
193
193
 
194
194
  function* watchFetchSchemaForEntity() {
195
- const watcher = yield takeLatest(types.GET_SCHEMA_FOR_ENTITY_REQUEST, fetchSchemaForEntity);
196
- yield take(LOCATION_CHANGE);
197
- yield cancel(watcher);
195
+ yield takeLatest(types.GET_SCHEMA_FOR_ENTITY_REQUEST, fetchSchemaForEntity);
198
196
  }
199
197
 
200
198