@capillarytech/creatives-library 8.0.209 → 8.0.210
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/config/app.js +2 -1
- package/package.json +1 -1
- package/services/api.js +2 -0
- package/v2Components/HtmlEditor/components/InAppPreviewPane/__tests__/ContentOverlay.test.js +25 -11
- package/v2Containers/CreativesContainer/SlideBoxContent.js +2 -0
- package/v2Containers/Rcs/index.js +2 -0
- package/v2Containers/Whatsapp/index.js +1 -0
package/config/app.js
CHANGED
|
@@ -20,7 +20,8 @@ const config = {
|
|
|
20
20
|
accountConfig: (strs, accountId) => `${window.location.origin}/org/config/AccountAdd?q=a&channelId=2&accountId=${accountId}&edit=1`,
|
|
21
21
|
},
|
|
22
22
|
development: {
|
|
23
|
-
api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/creatives',
|
|
23
|
+
// api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/creatives',
|
|
24
|
+
api_endpoint: 'http://localhost:2022/arya/api/v1/creatives',
|
|
24
25
|
campaigns_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/campaigns',
|
|
25
26
|
campaigns_api_org_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/org/campaign',
|
|
26
27
|
auth_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/auth',
|
package/package.json
CHANGED
package/services/api.js
CHANGED
|
@@ -264,6 +264,7 @@ export const getUserData = () => {
|
|
|
264
264
|
|
|
265
265
|
export const createTemplate = ({template}) => {
|
|
266
266
|
const url = `${API_ENDPOINT}/templates/SMS`;
|
|
267
|
+
console.log("creating template",template);
|
|
267
268
|
return request(url, getAPICallObject('POST', template));
|
|
268
269
|
};
|
|
269
270
|
|
|
@@ -346,6 +347,7 @@ export const getAllTemplates = async ({channel, queryParams = {}}) => {
|
|
|
346
347
|
|
|
347
348
|
export const deleteTemplate = ({channel, id}) => {
|
|
348
349
|
const url = `${API_ENDPOINT}/templates/${id}/${channel}`;
|
|
350
|
+
console.log("deleting template", url);
|
|
349
351
|
return request(url, getAPICallObject('DELETE'));
|
|
350
352
|
//return API.deleteResource(url);
|
|
351
353
|
};
|
package/v2Components/HtmlEditor/components/InAppPreviewPane/__tests__/ContentOverlay.test.js
CHANGED
|
@@ -155,21 +155,35 @@ describe('ContentOverlay', () => {
|
|
|
155
155
|
it('applies overlay positioning styles', () => {
|
|
156
156
|
render(<ContentOverlay />);
|
|
157
157
|
const overlay = document.querySelector('.content-overlay');
|
|
158
|
-
|
|
159
|
-
expect(
|
|
160
|
-
expect(
|
|
158
|
+
// Check that the overlay element exists and has the correct CSS class
|
|
159
|
+
expect(overlay).toBeInTheDocument();
|
|
160
|
+
expect(overlay).toHaveClass('content-overlay');
|
|
161
|
+
expect(overlay).toHaveClass('content-overlay--popup'); // default layout type is MODAL which maps to 'popup' class
|
|
162
|
+
|
|
163
|
+
// Check that inline styles from getOverlayStyles() are applied
|
|
164
|
+
const inlineStyles = overlay.style;
|
|
165
|
+
expect(inlineStyles.top).toBe('50%');
|
|
166
|
+
expect(inlineStyles.left).toBe('50%');
|
|
167
|
+
expect(inlineStyles.transform).toBe('translate(-50%, -50%)');
|
|
161
168
|
});
|
|
162
169
|
|
|
163
|
-
it('
|
|
170
|
+
it('does not apply inline iframe styles (SCSS-managed)', () => {
|
|
164
171
|
render(<ContentOverlay content="<p>Test</p>" />);
|
|
165
172
|
const iframe = document.querySelector('iframe');
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
//
|
|
170
|
-
|
|
171
|
-
expect(iframe.style.
|
|
172
|
-
expect(iframe.style
|
|
173
|
+
|
|
174
|
+
// Verify iframe styling is managed by SCSS, not inline styles
|
|
175
|
+
// The iframe should have no inline style attribute since all styling
|
|
176
|
+
// (width: 100%, height: 100%, border: none, display: block, backgroundColor)
|
|
177
|
+
// is handled via the .content-overlay iframe CSS rule in _inAppPreviewPane.scss
|
|
178
|
+
expect(iframe.style.cssText).toBe('');
|
|
179
|
+
expect(iframe.hasAttribute('style')).toBe(false);
|
|
180
|
+
|
|
181
|
+
// Ensure no inline style properties are set
|
|
182
|
+
expect(iframe.style.width).toBe('');
|
|
183
|
+
expect(iframe.style.height).toBe('');
|
|
184
|
+
expect(iframe.style.border).toBe('');
|
|
185
|
+
expect(iframe.style.display).toBe('');
|
|
186
|
+
expect(iframe.style.backgroundColor).toBe('');
|
|
173
187
|
});
|
|
174
188
|
});
|
|
175
189
|
|
|
@@ -1755,7 +1755,9 @@ const splitTemplateVarString = (str) => {
|
|
|
1755
1755
|
|
|
1756
1756
|
const uploadRcsImage = useCallback((file, type, fileParams, index) => {
|
|
1757
1757
|
setImageError(null);
|
|
1758
|
+
const isRcsThumbnail = index === 1;
|
|
1758
1759
|
actions.uploadRcsAsset(file, type, {
|
|
1760
|
+
isRcsThumbnail,
|
|
1759
1761
|
...fileParams,
|
|
1760
1762
|
dimensionType: selectedDimension,
|
|
1761
1763
|
orientation: RCS_IMAGE_DIMENSIONS[selectedDimension].orientation,
|
|
@@ -1711,6 +1711,7 @@ const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.a
|
|
|
1711
1711
|
};
|
|
1712
1712
|
|
|
1713
1713
|
const saveToMessage = () => {
|
|
1714
|
+
console.log("saveToMessage----> createPayload", createPayload());
|
|
1714
1715
|
getFormData({
|
|
1715
1716
|
value: createPayload(),
|
|
1716
1717
|
_id: params?.id,
|