@capillarytech/creatives-library 8.0.325 → 8.0.326
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 +1 -1
- package/utils/tests/tagValidations.test.js +0 -34
- package/v2Components/CapTagList/index.js +22 -14
- package/v2Components/CapTagList/style.scss +0 -48
- package/v2Components/CapTagListWithInput/index.js +0 -4
- package/v2Components/CapWhatsappCTA/index.js +0 -2
- package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +1 -2
- package/v2Components/FormBuilder/index.js +0 -7
- package/v2Components/HtmlEditor/HTMLEditor.js +1 -6
- package/v2Components/HtmlEditor/__tests__/HTMLEditor.apiErrors.test.js +0 -1
- package/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +2 -927
- package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +0 -3
- package/v2Containers/BeeEditor/index.js +0 -3
- package/v2Containers/CreativesContainer/SlideBoxContent.js +1 -28
- package/v2Containers/CreativesContainer/index.js +6 -10
- package/v2Containers/Email/index.js +0 -1
- package/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +1 -7
- package/v2Containers/EmailWrapper/components/EmailWrapperView.js +0 -3
- package/v2Containers/EmailWrapper/components/__tests__/EmailHTMLEditor.test.js +2 -20
- package/v2Containers/EmailWrapper/components/__tests__/EmailWrapperView.test.js +1 -16
- package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +0 -3
- package/v2Containers/EmailWrapper/index.js +0 -4
- package/v2Containers/EmailWrapper/tests/useEmailWrapper.edgeCases.test.js +0 -1
- package/v2Containers/EmailWrapper/tests/useEmailWrapper.test.js +0 -9
- package/v2Containers/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +0 -19
- package/v2Containers/InAppWrapper/hooks/useInAppWrapper.js +0 -3
- package/v2Containers/InAppWrapper/index.js +0 -3
- package/v2Containers/MobilePush/Create/index.js +0 -2
- package/v2Containers/MobilePush/Edit/index.js +0 -2
- package/v2Containers/MobilepushWrapper/index.js +1 -3
- package/v2Containers/Rcs/index.js +1 -9
- package/v2Containers/Sms/Create/index.js +0 -2
- package/v2Containers/Sms/Edit/index.js +0 -2
- package/v2Containers/SmsTrai/Edit/index.js +0 -2
- package/v2Containers/SmsWrapper/index.js +0 -2
- package/v2Containers/TagList/index.js +2 -41
- package/v2Containers/TagList/messages.js +0 -4
- package/v2Containers/TagList/tests/TagList.test.js +20 -122
- package/v2Containers/TagList/tests/mockdata.js +0 -17
- package/v2Containers/Viber/index.js +0 -5
- package/v2Containers/WebPush/Create/hooks/useTagManagement.js +2 -0
- package/v2Containers/WebPush/Create/index.js +1 -9
- package/v2Containers/Whatsapp/index.js +0 -5
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +0 -20
- package/v2Containers/Zalo/index.js +0 -2
- package/v2Components/CapTagListWithInput/__tests__/CapTagListWithInput.test.js +0 -63
|
@@ -258593,7 +258593,6 @@ Click {{3}} to unsubscribe'",
|
|
|
258593
258593
|
onContextChange={[Function]}
|
|
258594
258594
|
onTagSelect={[Function]}
|
|
258595
258595
|
tags={Array []}
|
|
258596
|
-
waitEventContextTags={Object {}}
|
|
258597
258596
|
/>
|
|
258598
258597
|
}
|
|
258599
258598
|
title={
|
|
@@ -258646,7 +258645,6 @@ Click {{3}} to unsubscribe'",
|
|
|
258646
258645
|
onContextChange={[Function]}
|
|
258647
258646
|
onTagSelect={[Function]}
|
|
258648
258647
|
tags={Array []}
|
|
258649
|
-
waitEventContextTags={Object {}}
|
|
258650
258648
|
>
|
|
258651
258649
|
<div
|
|
258652
258650
|
className="tag-mock"
|
|
@@ -258664,7 +258662,6 @@ Click {{3}} to unsubscribe'",
|
|
|
258664
258662
|
onContextChange={[Function]}
|
|
258665
258663
|
onTagSelect={[Function]}
|
|
258666
258664
|
tags={Array []}
|
|
258667
|
-
waitEventContextTags={Object {}}
|
|
258668
258665
|
>
|
|
258669
258666
|
TagList
|
|
258670
258667
|
</div>
|
|
@@ -260214,7 +260211,6 @@ T&C'
|
|
|
260214
260211
|
key=".2"
|
|
260215
260212
|
tags={Array []}
|
|
260216
260213
|
updateHandler={[Function]}
|
|
260217
|
-
waitEventContextTags={Object {}}
|
|
260218
260214
|
>
|
|
260219
260215
|
<CapWhatsappCTA
|
|
260220
260216
|
ctaData={
|
|
@@ -262490,7 +262486,6 @@ new message content.",
|
|
|
262490
262486
|
isEditFlow={true}
|
|
262491
262487
|
tags={Array []}
|
|
262492
262488
|
updateHandler={[Function]}
|
|
262493
|
-
waitEventContextTags={Object {}}
|
|
262494
262489
|
>
|
|
262495
262490
|
<CapRow
|
|
262496
262491
|
align="middle"
|
|
@@ -311144,7 +311139,6 @@ Click {{3}} to unsubscribe'",
|
|
|
311144
311139
|
onContextChange={[Function]}
|
|
311145
311140
|
onTagSelect={[Function]}
|
|
311146
311141
|
tags={Array []}
|
|
311147
|
-
waitEventContextTags={Object {}}
|
|
311148
311142
|
/>
|
|
311149
311143
|
}
|
|
311150
311144
|
title={
|
|
@@ -311197,7 +311191,6 @@ Click {{3}} to unsubscribe'",
|
|
|
311197
311191
|
onContextChange={[Function]}
|
|
311198
311192
|
onTagSelect={[Function]}
|
|
311199
311193
|
tags={Array []}
|
|
311200
|
-
waitEventContextTags={Object {}}
|
|
311201
311194
|
>
|
|
311202
311195
|
<div
|
|
311203
311196
|
className="tag-mock"
|
|
@@ -311215,7 +311208,6 @@ Click {{3}} to unsubscribe'",
|
|
|
311215
311208
|
onContextChange={[Function]}
|
|
311216
311209
|
onTagSelect={[Function]}
|
|
311217
311210
|
tags={Array []}
|
|
311218
|
-
waitEventContextTags={Object {}}
|
|
311219
311211
|
>
|
|
311220
311212
|
TagList
|
|
311221
311213
|
</div>
|
|
@@ -312765,7 +312757,6 @@ T&C'
|
|
|
312765
312757
|
key=".2"
|
|
312766
312758
|
tags={Array []}
|
|
312767
312759
|
updateHandler={[Function]}
|
|
312768
|
-
waitEventContextTags={Object {}}
|
|
312769
312760
|
>
|
|
312770
312761
|
<CapWhatsappCTA
|
|
312771
312762
|
ctaData={
|
|
@@ -315041,7 +315032,6 @@ new message content.",
|
|
|
315041
315032
|
isEditFlow={true}
|
|
315042
315033
|
tags={Array []}
|
|
315043
315034
|
updateHandler={[Function]}
|
|
315044
|
-
waitEventContextTags={Object {}}
|
|
315045
315035
|
>
|
|
315046
315036
|
<CapRow
|
|
315047
315037
|
align="middle"
|
|
@@ -337823,7 +337813,6 @@ Click {{unsubscribe}} to unsubscribe",
|
|
|
337823
337813
|
onContextChange={[Function]}
|
|
337824
337814
|
onTagSelect={[Function]}
|
|
337825
337815
|
tags={Array []}
|
|
337826
|
-
waitEventContextTags={Object {}}
|
|
337827
337816
|
/>
|
|
337828
337817
|
}
|
|
337829
337818
|
title={
|
|
@@ -337876,7 +337865,6 @@ Click {{unsubscribe}} to unsubscribe",
|
|
|
337876
337865
|
onContextChange={[Function]}
|
|
337877
337866
|
onTagSelect={[Function]}
|
|
337878
337867
|
tags={Array []}
|
|
337879
|
-
waitEventContextTags={Object {}}
|
|
337880
337868
|
>
|
|
337881
337869
|
<div
|
|
337882
337870
|
className="tag-mock"
|
|
@@ -337894,7 +337882,6 @@ Click {{unsubscribe}} to unsubscribe",
|
|
|
337894
337882
|
onContextChange={[Function]}
|
|
337895
337883
|
onTagSelect={[Function]}
|
|
337896
337884
|
tags={Array []}
|
|
337897
|
-
waitEventContextTags={Object {}}
|
|
337898
337885
|
>
|
|
337899
337886
|
TagList
|
|
337900
337887
|
</div>
|
|
@@ -339307,7 +339294,6 @@ Click {{unsubscribe}} to unsubscribe",
|
|
|
339307
339294
|
key=".2"
|
|
339308
339295
|
tags={Array []}
|
|
339309
339296
|
updateHandler={[Function]}
|
|
339310
|
-
waitEventContextTags={Object {}}
|
|
339311
339297
|
>
|
|
339312
339298
|
<CapWhatsappCTA
|
|
339313
339299
|
ctaData={
|
|
@@ -341583,7 +341569,6 @@ new message content.",
|
|
|
341583
341569
|
isEditFlow={true}
|
|
341584
341570
|
tags={Array []}
|
|
341585
341571
|
updateHandler={[Function]}
|
|
341586
|
-
waitEventContextTags={Object {}}
|
|
341587
341572
|
>
|
|
341588
341573
|
<CapRow
|
|
341589
341574
|
align="middle"
|
|
@@ -363186,7 +363171,6 @@ new message content.",
|
|
|
363186
363171
|
onContextChange={[Function]}
|
|
363187
363172
|
onTagSelect={[Function]}
|
|
363188
363173
|
tags={Array []}
|
|
363189
|
-
waitEventContextTags={Object {}}
|
|
363190
363174
|
/>
|
|
363191
363175
|
}
|
|
363192
363176
|
title={
|
|
@@ -363239,7 +363223,6 @@ new message content.",
|
|
|
363239
363223
|
onContextChange={[Function]}
|
|
363240
363224
|
onTagSelect={[Function]}
|
|
363241
363225
|
tags={Array []}
|
|
363242
|
-
waitEventContextTags={Object {}}
|
|
363243
363226
|
>
|
|
363244
363227
|
<div
|
|
363245
363228
|
className="tag-mock"
|
|
@@ -363257,7 +363240,6 @@ new message content.",
|
|
|
363257
363240
|
onContextChange={[Function]}
|
|
363258
363241
|
onTagSelect={[Function]}
|
|
363259
363242
|
tags={Array []}
|
|
363260
|
-
waitEventContextTags={Object {}}
|
|
363261
363243
|
>
|
|
363262
363244
|
TagList
|
|
363263
363245
|
</div>
|
|
@@ -364669,7 +364651,6 @@ new message content.",
|
|
|
364669
364651
|
key=".2"
|
|
364670
364652
|
tags={Array []}
|
|
364671
364653
|
updateHandler={[Function]}
|
|
364672
|
-
waitEventContextTags={Object {}}
|
|
364673
364654
|
>
|
|
364674
364655
|
<CapWhatsappCTA
|
|
364675
364656
|
ctaData={
|
|
@@ -366936,7 +366917,6 @@ new message content.",
|
|
|
366936
366917
|
isEditFlow={true}
|
|
366937
366918
|
tags={Array []}
|
|
366938
366919
|
updateHandler={[Function]}
|
|
366939
|
-
waitEventContextTags={Object {}}
|
|
366940
366920
|
>
|
|
366941
366921
|
<CapRow
|
|
366942
366922
|
align="middle"
|
|
@@ -76,7 +76,6 @@ export const Zalo = (props) => {
|
|
|
76
76
|
selectedOfferDetails,
|
|
77
77
|
hostName: zaloHostName = '',
|
|
78
78
|
eventContextTags,
|
|
79
|
-
waitEventContextTags,
|
|
80
79
|
metaDataStatus = "",
|
|
81
80
|
// TestAndPreviewSlidebox props
|
|
82
81
|
showTestAndPreviewSlidebox: propsShowTestAndPreviewSlidebox,
|
|
@@ -520,7 +519,6 @@ export const Zalo = (props) => {
|
|
|
520
519
|
injectedTags={injectedTags || {}}
|
|
521
520
|
selectedOfferDetails={selectedOfferDetails}
|
|
522
521
|
eventContextTags={eventContextTags}
|
|
523
|
-
waitEventContextTags={waitEventContextTags}
|
|
524
522
|
/>
|
|
525
523
|
}
|
|
526
524
|
/>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, screen } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom';
|
|
4
|
-
import { IntlProvider } from 'react-intl';
|
|
5
|
-
import CapTagListWithInput from '../index';
|
|
6
|
-
|
|
7
|
-
const capturedTagListProps = { current: null };
|
|
8
|
-
|
|
9
|
-
jest.mock('../../../v2Containers/TagList', () => {
|
|
10
|
-
const React = require('react');
|
|
11
|
-
const Mock = (props) => {
|
|
12
|
-
capturedTagListProps.current = props;
|
|
13
|
-
return <div data-testid="mock-tag-list">TagList</div>;
|
|
14
|
-
};
|
|
15
|
-
return Mock;
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
jest.mock('@capillarytech/cap-ui-library/CapRow', () => ({ children }) => <div>{children}</div>);
|
|
19
|
-
jest.mock('@capillarytech/cap-ui-library/CapColumn', () => ({ children }) => <div>{children}</div>);
|
|
20
|
-
jest.mock('@capillarytech/cap-ui-library/CapHeading', () => () => null);
|
|
21
|
-
jest.mock('@capillarytech/cap-ui-library/CapInput', () => () => <input data-testid="cap-input" />);
|
|
22
|
-
|
|
23
|
-
const waitMap = {
|
|
24
|
-
b1: { eventName: 'Order Placed', blockName: 'Wait', tags: [] },
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
describe('CapTagListWithInput', () => {
|
|
28
|
-
beforeEach(() => {
|
|
29
|
-
capturedTagListProps.current = null;
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it('forwards waitEventContextTags to TagList', () => {
|
|
33
|
-
render(
|
|
34
|
-
<IntlProvider locale="en" messages={{}}>
|
|
35
|
-
<CapTagListWithInput
|
|
36
|
-
inputId="test-url"
|
|
37
|
-
inputOnChange={jest.fn()}
|
|
38
|
-
waitEventContextTags={waitMap}
|
|
39
|
-
onTagSelect={jest.fn()}
|
|
40
|
-
onContextChange={jest.fn()}
|
|
41
|
-
/>
|
|
42
|
-
</IntlProvider>
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
expect(screen.getByTestId('mock-tag-list')).toBeInTheDocument();
|
|
46
|
-
expect(capturedTagListProps.current.waitEventContextTags).toEqual(waitMap);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('uses default empty object for waitEventContextTags when omitted', () => {
|
|
50
|
-
render(
|
|
51
|
-
<IntlProvider locale="en" messages={{}}>
|
|
52
|
-
<CapTagListWithInput
|
|
53
|
-
inputId="test-url"
|
|
54
|
-
inputOnChange={jest.fn()}
|
|
55
|
-
onTagSelect={jest.fn()}
|
|
56
|
-
onContextChange={jest.fn()}
|
|
57
|
-
/>
|
|
58
|
-
</IntlProvider>
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
expect(capturedTagListProps.current.waitEventContextTags).toEqual({});
|
|
62
|
-
});
|
|
63
|
-
});
|