@capillarytech/creatives-library 7.12.45 → 7.12.46

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.12.45",
4
+ "version": "7.12.46",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -59,4 +59,4 @@ export const GET_ORG_LEVEL_CAMPAIGN_SETTINGS_SUCCESS =
59
59
  export const GET_ORG_LEVEL_CAMPAIGN_SETTINGS_FAILURE =
60
60
  'app/v2Containers/Templates/GET_ORG_LEVEL_CAMPAIGN_SETTINGS_FAILURE';
61
61
 
62
- export const MAX_WHATSAPP_TEMPLATES = 250;
62
+ export const MAX_WHATSAPP_TEMPLATES = 500;
@@ -2630,7 +2630,7 @@ exports[`Test Templates container Test max templates exceeded 1`] = `
2630
2630
  id="creatives.containersV2.Templates.whatsappMaxTemplates"
2631
2631
  values={
2632
2632
  Object {
2633
- "maxCount": 250,
2633
+ "maxCount": 500,
2634
2634
  }
2635
2635
  }
2636
2636
  />
@@ -2680,6 +2680,386 @@ exports[`Test Templates container Test max templates exceeded 1`] = `
2680
2680
  type="label9"
2681
2681
  >
2682
2682
  $'asdasd
2683
+ Click {{unsubscribe}} to unsubscribe'
2684
+ </CapLabel>
2685
+ </React.Fragment>
2686
+ </React.Fragment>,
2687
+ "extra": Array [
2688
+ <CapIcon
2689
+ className="view-whatsapp"
2690
+ onClick={[Function]}
2691
+ style={
2692
+ Object {
2693
+ "marginRight": "16px",
2694
+ }
2695
+ }
2696
+ type="eye"
2697
+ />,
2698
+ ],
2699
+ "hoverOption": <CapButton
2700
+ className="edit-whatsapp"
2701
+ isAddBtn={false}
2702
+ onClick={[Function]}
2703
+ type="primary"
2704
+ >
2705
+ Overview
2706
+ </CapButton>,
2707
+ "key": "WHATSAPP-card-saad",
2708
+ "title": <CapRow
2709
+ className="whatsapp-card-title"
2710
+ >
2711
+ <CapLabel
2712
+ type="label1"
2713
+ >
2714
+ saad
2715
+ </CapLabel>
2716
+ <WhatsappStatusContainer
2717
+ template={
2718
+ Object {
2719
+ "_id": "620b88327ecc279198099117",
2720
+ "createdAt": "2022-02-15T11:02:11.190Z",
2721
+ "createdBy": "15000449",
2722
+ "isActive": true,
2723
+ "name": "saad",
2724
+ "orgId": 50146,
2725
+ "totalCount": 510,
2726
+ "type": "WHATSAPP",
2727
+ "updatedAt": "2022-02-15T11:02:11.190Z",
2728
+ "updatedBy": "15000449",
2729
+ "versions": Object {
2730
+ "$init": true,
2731
+ "base": Object {
2732
+ "content": Object {
2733
+ "whatsapp": Object {
2734
+ "accessToken": "4676323eb5d1f975b0987070c03a8efc",
2735
+ "accountId": "AC41030cebba9e2f1ce37c78235da0ee18",
2736
+ "accountName": "WhatsppTest",
2737
+ "category": "ACCOUNT_UPDATE",
2738
+ "languages": Array [
2739
+ Object {
2740
+ "content": "$'asdasd
2741
+ Click {{1}} to unsubscribe'",
2742
+ "language": "en",
2743
+ },
2744
+ ],
2745
+ "mediaType": "text",
2746
+ "rejection_reason": null,
2747
+ "status": "approved",
2748
+ "templateId": "HTc5068cbaa813f931ed887f19922ca19d",
2749
+ },
2750
+ },
2751
+ },
2752
+ "history": Array [],
2753
+ },
2754
+ }
2755
+ }
2756
+ />
2757
+ </CapRow>,
2758
+ },
2759
+ ]
2760
+ }
2761
+ fbType="list"
2762
+ key="WHATSAPP-card-list"
2763
+ style={
2764
+ Object {
2765
+ "marginLeft": "16px",
2766
+ }
2767
+ }
2768
+ type="WHATSAPP"
2769
+ />
2770
+ </div>
2771
+ <div
2772
+ style={
2773
+ Object {
2774
+ "height": "calc(100vh - 325px)",
2775
+ "overflow": "auto",
2776
+ }
2777
+ }
2778
+ />
2779
+ </div>
2780
+ </CapSpin>
2781
+ </div>
2782
+ </Pagination>
2783
+ </CapRow>
2784
+ <CapRow />
2785
+ <CapRow>
2786
+ <CapSlideBox
2787
+ closeIconSize="m"
2788
+ content={
2789
+ <CardGrid
2790
+ className=""
2791
+ colNumber={2}
2792
+ gutterSize={16}
2793
+ isLoading={false}
2794
+ listItem={Array []}
2795
+ onHoverItem={[Function]}
2796
+ onItemClick={[Function]}
2797
+ />
2798
+ }
2799
+ handleClose={[Function]}
2800
+ header={
2801
+ <h3>
2802
+ Select layout
2803
+ </h3>
2804
+ }
2805
+ loadingText="Loading EDM Templates"
2806
+ position="right"
2807
+ show={false}
2808
+ size="size-r"
2809
+ width={60}
2810
+ />
2811
+ <Wrapper
2812
+ centered={true}
2813
+ className="delete-template-confirm"
2814
+ closeText="Cancel"
2815
+ okText="Yes, delete"
2816
+ onCancel={[Function]}
2817
+ onOk={[Function]}
2818
+ title="Confirm delete template"
2819
+ visible={false}
2820
+ >
2821
+ Are you sure you wish to delete this template?
2822
+ </Wrapper>
2823
+ </CapRow>
2824
+ </div>
2825
+ </Fragment>
2826
+ `;
2827
+
2828
+ exports[`Test Templates container Test max templates not exceeded 1`] = `
2829
+ <Fragment>
2830
+ <div
2831
+ className="creatives-templates-list full-mode"
2832
+ >
2833
+ <input
2834
+ accept=".zip, .html, .htm"
2835
+ id="filename"
2836
+ onChange={[Function]}
2837
+ style={
2838
+ Object {
2839
+ "display": "none",
2840
+ }
2841
+ }
2842
+ type="file"
2843
+ />
2844
+ <CapRow>
2845
+ <Pagination
2846
+ onPageChange={[Function]}
2847
+ paginationContainer="pagination-container"
2848
+ paginationSelector="pagination-container"
2849
+ >
2850
+ <div>
2851
+ <div
2852
+ className="action-container"
2853
+ >
2854
+ <_class
2855
+ className="search-text"
2856
+ disabled={false}
2857
+ labelPosition="top"
2858
+ onChange={[Function]}
2859
+ onClear={[Function]}
2860
+ onScroll={[Function]}
2861
+ placeholder="Search"
2862
+ style={
2863
+ Object {
2864
+ "width": "210px",
2865
+ }
2866
+ }
2867
+ value=""
2868
+ />
2869
+ <div
2870
+ className="whatsapp-filters"
2871
+ >
2872
+ <CapSelectFilter
2873
+ data={
2874
+ Array [
2875
+ Object {
2876
+ "key": "awaitingApproval",
2877
+ "label": <FormattedMessage
2878
+ defaultMessage="Awaiting approval"
2879
+ id="creatives.containersV2.Whatsapp.awaitingApproval"
2880
+ values={Object {}}
2881
+ />,
2882
+ "value": "awaitingApproval",
2883
+ },
2884
+ Object {
2885
+ "key": "approved",
2886
+ "label": <FormattedMessage
2887
+ defaultMessage="Approved"
2888
+ id="creatives.containersV2.Whatsapp.approved"
2889
+ values={Object {}}
2890
+ />,
2891
+ "value": "approved",
2892
+ },
2893
+ Object {
2894
+ "key": "rejected",
2895
+ "label": <FormattedMessage
2896
+ defaultMessage="Rejected"
2897
+ id="creatives.containersV2.Whatsapp.rejected"
2898
+ values={Object {}}
2899
+ />,
2900
+ "value": "rejected",
2901
+ },
2902
+ ]
2903
+ }
2904
+ dropdownMaxHeight="320px"
2905
+ dropdownWidth="228px"
2906
+ onSelect={[Function]}
2907
+ placeholder="Status"
2908
+ placement="bottomLeft"
2909
+ selectedValue=""
2910
+ showBadge={true}
2911
+ width="90px"
2912
+ />
2913
+ <CapSelectFilter
2914
+ data={
2915
+ Array [
2916
+ Object {
2917
+ "key": "alertUpdate",
2918
+ "label": <FormattedMessage
2919
+ defaultMessage="Alert update"
2920
+ id="creatives.containersV2.Whatsapp.alertUpdate"
2921
+ values={Object {}}
2922
+ />,
2923
+ "tagColor": "#f2e7fe",
2924
+ "tagTextColor": "#a451ff",
2925
+ "tooltipLabel": <FormattedMessage
2926
+ defaultMessage="Send important updates or news to customers."
2927
+ id="creatives.containersV2.Whatsapp.alertUpdateTooltip"
2928
+ values={Object {}}
2929
+ />,
2930
+ "value": "ALERT_UPDATE",
2931
+ },
2932
+ Object {
2933
+ "key": "accountUpdate",
2934
+ "label": <FormattedMessage
2935
+ defaultMessage="Account update"
2936
+ id="creatives.containersV2.Whatsapp.accountUpdate"
2937
+ values={Object {}}
2938
+ />,
2939
+ "tagColor": "#ffe5d2",
2940
+ "tagTextColor": "#f87d23",
2941
+ "tooltipLabel": <FormattedMessage
2942
+ defaultMessage="Let customers know about updates or changes to their accounts."
2943
+ id="creatives.containersV2.Whatsapp.accountUpdateTooltip"
2944
+ values={Object {}}
2945
+ />,
2946
+ "value": "ACCOUNT_UPDATE",
2947
+ },
2948
+ Object {
2949
+ "key": "appointmentUpdate",
2950
+ "label": <FormattedMessage
2951
+ defaultMessage="Appointment update"
2952
+ id="creatives.containersV2.Whatsapp.appointmentUpdate"
2953
+ values={Object {}}
2954
+ />,
2955
+ "tagColor": "#ecf7ec",
2956
+ "tagTextColor": "#6bb56b",
2957
+ "tooltipLabel": <FormattedMessage
2958
+ defaultMessage="Send confirmations, reminders, or other updates to customers about their appointments."
2959
+ id="creatives.containersV2.Whatsapp.appointmentUpdateTooltip"
2960
+ values={Object {}}
2961
+ />,
2962
+ "value": "APPOINTMENT_UPDATE",
2963
+ },
2964
+ Object {
2965
+ "key": "paymentUpdate",
2966
+ "label": <FormattedMessage
2967
+ defaultMessage="Payment update"
2968
+ id="creatives.containersV2.Whatsapp.paymentUpdate"
2969
+ values={Object {}}
2970
+ />,
2971
+ "tagColor": "#ffe5d2",
2972
+ "tagTextColor": "#f87d23",
2973
+ "tooltipLabel": <FormattedMessage
2974
+ defaultMessage="Send a message to customers about their payment."
2975
+ id="creatives.containersV2.Whatsapp.paymentUpdateTooltip"
2976
+ values={Object {}}
2977
+ />,
2978
+ "value": "PAYMENT_UPDATE",
2979
+ },
2980
+ Object {
2981
+ "key": "reservationUpdate",
2982
+ "label": <FormattedMessage
2983
+ defaultMessage="Reservation update"
2984
+ id="creatives.containersV2.Whatsapp.reservationUpdate"
2985
+ values={Object {}}
2986
+ />,
2987
+ "tagColor": "#ffe5d2",
2988
+ "tagTextColor": "#f87d23",
2989
+ "tooltipLabel": <FormattedMessage
2990
+ defaultMessage="Send confirmations, reminders, or other updates to customers about their reservations."
2991
+ id="creatives.containersV2.Whatsapp.reservationUpdateTooltip"
2992
+ values={Object {}}
2993
+ />,
2994
+ "value": "RESERVATION_UPDATE",
2995
+ },
2996
+ ]
2997
+ }
2998
+ dropdownMaxHeight="320px"
2999
+ dropdownWidth="228px"
3000
+ onSelect={[Function]}
3001
+ overlayStyle={
3002
+ Object {
3003
+ "overflowY": "hidden",
3004
+ }
3005
+ }
3006
+ placeholder="Category"
3007
+ placement="bottomLeft"
3008
+ selectedValue=""
3009
+ showBadge={true}
3010
+ width="105px"
3011
+ />
3012
+ </div>
3013
+ <Component />
3014
+ <Component />
3015
+ <div
3016
+ style={
3017
+ Object {
3018
+ "alignItems": "center",
3019
+ "display": "flex",
3020
+ "justifyContent": "space-between",
3021
+ }
3022
+ }
3023
+ >
3024
+ <CapButton
3025
+ className="create-new-whatsapp margin-l-8 margin-b-12"
3026
+ disabled={false}
3027
+ isAddBtn={false}
3028
+ onClick={[Function]}
3029
+ type="primary"
3030
+ >
3031
+ Create new
3032
+ </CapButton>
3033
+ </div>
3034
+ </div>
3035
+ <CapRow
3036
+ align="middle"
3037
+ className="selected-whatsapp-filters"
3038
+ type="flex"
3039
+ />
3040
+ <CapSpin
3041
+ spinning={false}
3042
+ style={
3043
+ Object {
3044
+ "width": "100%",
3045
+ }
3046
+ }
3047
+ tip="Getting all templates..."
3048
+ >
3049
+ <div>
3050
+ <div
3051
+ className="pagination-container"
3052
+ >
3053
+ <CapCustomCardList
3054
+ cardList={
3055
+ Array [
3056
+ Object {
3057
+ "content": <React.Fragment>
3058
+ <React.Fragment>
3059
+ <CapLabel
3060
+ type="label9"
3061
+ >
3062
+ $'asdasd
2683
3063
  Click {{unsubscribe}} to unsubscribe'
2684
3064
  </CapLabel>
2685
3065
  </React.Fragment>
@@ -115,12 +115,18 @@ describe('Test Templates container', () => {
115
115
  expect(renderedComponent).toMatchSnapshot();
116
116
  });
117
117
 
118
- it('Test max templates exceeded', () => {
118
+ it('Test max templates not exceeded', () => {
119
119
  renderFunction(true);
120
120
  renderedComponent.setProps({TemplatesList: [{ ...TemplatesProp.templates[0], totalCount: 260 }]});
121
121
  expect(renderedComponent).toMatchSnapshot();
122
122
  });
123
123
 
124
+ it('Test max templates exceeded', () => {
125
+ renderFunction(true);
126
+ renderedComponent.setProps({TemplatesList: [{ ...TemplatesProp.templates[0], totalCount: 510 }]});
127
+ expect(renderedComponent).toMatchSnapshot();
128
+ });
129
+
124
130
  it('Test max templates warning', () => {
125
131
  renderFunction(true);
126
132
  renderedComponent.setProps({TemplatesList: [{ ...TemplatesProp.templates[0], totalCount: 248 }]});