@capillarytech/creatives-library 7.17.161 → 7.17.163

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.161",
4
+ "version": "7.17.163",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -77,6 +77,13 @@
77
77
  }
78
78
  }
79
79
 
80
+ .cap-ask-aira-bot-icon {
81
+ svg {
82
+ width: 1.6rem;
83
+ height: 1.6rem;
84
+ }
85
+ }
86
+
80
87
  .form-builder-dragger {
81
88
  .ant-upload-drag {
82
89
  background-color: white;
@@ -2824,6 +2824,10 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
2824
2824
  return false;
2825
2825
  }
2826
2826
 
2827
+ handleSetText = (val, newText) => {
2828
+ this.updateFormData(newText, val);
2829
+ };
2830
+
2827
2831
  renderMultiColSection(section, childIndex) {
2828
2832
  const fields = [];
2829
2833
  let contentSections = [];
@@ -2900,19 +2904,16 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
2900
2904
  disabled={val.disabled}
2901
2905
  size={val.size || "default"}
2902
2906
  />
2903
- {[EMAIL].includes(this.props.schema?.channel) &&
2904
- !isAiContentBotDisabled &&(
2907
+ {this.props.schema?.channel === EMAIL &&
2908
+ !isAiContentBotDisabled && (
2905
2909
  <CapAskAira.ContentGenerationBot
2906
2910
  text={value || ""}
2907
- setText={(x) => {
2908
- this.updateFormData(x, val);
2909
- }}
2911
+ setText={this.handleSetText.bind(this, val)}
2910
2912
  iconPlacement="float-br"
2911
2913
  rootStyle={{
2912
2914
  bottom: "0.2rem",
2913
2915
  right: "0.2rem",
2914
- left: "auto",
2915
-
2916
+ left: "auto",
2916
2917
  }}
2917
2918
  />
2918
2919
  )}