@capillarytech/creatives-library 7.17.162 → 7.17.164-alpha.0
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
|
@@ -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 = [];
|
|
@@ -2904,9 +2908,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2904
2908
|
!isAiContentBotDisabled && (
|
|
2905
2909
|
<CapAskAira.ContentGenerationBot
|
|
2906
2910
|
text={value || ""}
|
|
2907
|
-
setText={(
|
|
2908
|
-
this.updateFormData(newText, val);
|
|
2909
|
-
}}
|
|
2911
|
+
setText={this.handleSetText.bind(this, val)}
|
|
2910
2912
|
iconPlacement="float-br"
|
|
2911
2913
|
rootStyle={{
|
|
2912
2914
|
bottom: "0.2rem",
|
|
@@ -140,6 +140,19 @@ export class NavigationBar extends React.Component {
|
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
+
productSelection = () => {
|
|
144
|
+
const { location, intl: { formatMessage } } = this.props;
|
|
145
|
+
const { pathname } = location;
|
|
146
|
+
const parentModule = pathname.substring(pathname.lastIndexOf('/') + 1);
|
|
147
|
+
switch (parentModule) {
|
|
148
|
+
case LOYALTY:
|
|
149
|
+
return formatMessage(messages.loyaltyProgram);
|
|
150
|
+
default:
|
|
151
|
+
return formatMessage(messages.selectedProductDefault)
|
|
152
|
+
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
143
156
|
render() {
|
|
144
157
|
const {
|
|
145
158
|
topbarMenuData,
|
|
@@ -178,7 +191,7 @@ export class NavigationBar extends React.Component {
|
|
|
178
191
|
topbarIcons={topbarIcons}
|
|
179
192
|
sidebarMenuData={[]}
|
|
180
193
|
sidebarMenuItemsPosition={null}
|
|
181
|
-
defaultSelectedProduct={
|
|
194
|
+
defaultSelectedProduct={this.productSelection()}
|
|
182
195
|
skipStateForStorage
|
|
183
196
|
selectOrganization={intl.formatMessage(messages.selectOrganization)}
|
|
184
197
|
isLatestLeftNavigationEnabled={isLatestLeftNavigationEnabled}
|
|
@@ -199,6 +212,7 @@ export class NavigationBar extends React.Component {
|
|
|
199
212
|
</CapWrapper>
|
|
200
213
|
</div>
|
|
201
214
|
</CapNavigation>
|
|
215
|
+
|
|
202
216
|
);
|
|
203
217
|
}
|
|
204
218
|
}
|
|
@@ -20,12 +20,11 @@ export const getLoyaltyTopbarMenuDataValue = () => [
|
|
|
20
20
|
link: 'loyalty/ui/',
|
|
21
21
|
key: 'programs',
|
|
22
22
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// },
|
|
23
|
+
{
|
|
24
|
+
label: <FormattedMessage {...globalMessages.promotions} />,
|
|
25
|
+
link: 'loyalty/ui/promotions/',
|
|
26
|
+
key: 'promotions',
|
|
27
|
+
},
|
|
29
28
|
{
|
|
30
29
|
label: <FormattedMessage {...globalMessages.creatives} />,
|
|
31
30
|
link: '/creatives/ui/v2/loyalty',
|