@capillarytech/creatives-library 8.0.340-beta.0 → 8.0.340-beta.0.1

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": "8.0.340-beta.0",
4
+ "version": "8.0.340-beta.0.1",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -172,7 +172,7 @@
172
172
  }
173
173
 
174
174
  html {
175
- font-size: 16px !important;
175
+ font-size: 14px !important;
176
176
  }
177
177
 
178
178
  .cap-collapsible-new-nav, .l1-enabled-popover-container {
@@ -120,7 +120,9 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
120
120
  };
121
121
 
122
122
  onExpand = (expandedKeys, info) => {
123
- this.handleOnExpand(info.node.props.eventKey);
123
+ const node = info && info.node;
124
+ const eventKey = node && (node.eventKey ?? node.key ?? node.props?.eventKey);
125
+ this.handleOnExpand(eventKey);
124
126
  };
125
127
 
126
128
  getSearchedExpandedKeys(tags, value = '', parentPath = '') {
@@ -202,9 +204,14 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
202
204
 
203
205
  handleOnSelect = (selectedKeys, info) => {
204
206
  if (selectedKeys.length > 0) {
205
- if (info && info.selectedNodes && info.selectedNodes.length > 0 && info.selectedNodes[0].props.isLeaf) {
206
- const selectedNode = info.selectedNodes[0];
207
- const selectedTagValue = selectedNode?.props?.tagKey || selectedKeys[0];
207
+ const selectedNode = info && info.selectedNodes && info.selectedNodes[0];
208
+ if (!selectedNode) {
209
+ return;
210
+ }
211
+ const isLeaf = selectedNode.isLeaf ?? selectedNode.props?.isLeaf;
212
+ if (isLeaf) {
213
+ const tagKey = selectedNode.tagKey ?? selectedNode.props?.tagKey;
214
+ const selectedTagValue = tagKey || selectedKeys[0];
208
215
  this.setState({
209
216
  tagValue: selectedTagValue,
210
217
  selectedNodeKey: selectedKeys[0],
@@ -216,7 +223,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
216
223
  this.props.onSelect([selectedTagValue], info);
217
224
  this.setState({visible: false});
218
225
  }
219
- } else if (info && info.selectedNodes && info.selectedNodes.length > 0 && !info.selectedNodes[0].props.isLeaf) {
226
+ } else {
220
227
  this.handleOnExpand(selectedKeys[0]);
221
228
  }
222
229
  }
@@ -419,7 +426,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
419
426
  <CapSelect
420
427
  getPopupContainer={(triggerNode) => triggerNode.parentNode}
421
428
  style={{
422
- width: '250px', marginBottom: '16px', minWidth: 'initial', display: 'inherit',
429
+ width: '250px', marginBottom: '16px', minWidth: 'initial', display: 'flex',
423
430
  }}
424
431
  onChange={this.handleOnChange}
425
432
  value={selectedContext}
@@ -479,6 +486,11 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
479
486
  content={contentSection}
480
487
  trigger="click"
481
488
  placement={this.props.popoverPlacement || (channel === EMAIL.toUpperCase() ? "leftTop" : "rightTop")}
489
+ styles={{
490
+ container: {
491
+ backgroundColor: 'white'
492
+ }
493
+ }}
482
494
  >
483
495
  <CapTooltip
484
496
  title={
@@ -44,7 +44,7 @@ const CustomValuesEditor = ({
44
44
  </CapLabel>
45
45
  )}
46
46
  <CapRow className="editor-header">
47
- <CapRow className="json-toggle">
47
+ <CapRow className="json-toggle" align='middle' justify='start'>
48
48
  <span className="toggle-label">
49
49
  <FormattedMessage {...messages.showJSON} />
50
50
  </span>
@@ -57,7 +57,7 @@ const CustomValuesEditor = ({
57
57
  </CapRow>
58
58
  {showJSON ? (
59
59
  <CapRow className="json-editor">
60
- <CapRow className="json-editor-container">
60
+ <CapRow className="json-editor-container" align='center' justify='start'>
61
61
  <CapRow className="line-numbers">
62
62
  {JSON.stringify(customValues, null, 2).split('\n').map((_, index) => (
63
63
  <CapRow key={`line-${index + 1}`} className="line-number">
@@ -79,7 +79,7 @@ const CustomValuesEditor = ({
79
79
  <>
80
80
  {extractedTags?.length > 0 && (
81
81
  <CapRow className="values-table">
82
- <CapRow className="table-header">
82
+ <CapRow className="table-header" align='middle' justify='space-between'>
83
83
  <CapLabel type="label31" className="header-cell">
84
84
  <FormattedMessage {...messages.personalizationTags} />
85
85
  </CapLabel>
@@ -88,10 +88,9 @@ const CustomValuesEditor = ({
88
88
  </CapLabel>
89
89
  </CapRow>
90
90
  {requiredTags.map((tag) => (
91
- <CapRow key={tag.fullPath} className="value-row">
92
- <CapRow className="tag-name">
93
- {tag.fullPath}
94
- <span className="required-tag-indicator">*</span>
91
+ <CapRow key={tag.fullPath} className="value-row" align='middle' justify='start'>
92
+ <CapRow className="tag-name" align='top' justify='start'>
93
+ {`${tag.fullPath}*`}
95
94
  </CapRow>
96
95
  <CapRow className="tag-input">
97
96
  <CapInput
@@ -125,7 +124,7 @@ const CustomValuesEditor = ({
125
124
  )}
126
125
  </>
127
126
  )}
128
- <CapRow className="editor-actions">
127
+ <CapRow type='flex' align='middle' justify='space-between' className="editor-actions">
129
128
  <CapButton
130
129
  className="discard-button"
131
130
  type="link"
@@ -45,7 +45,7 @@ const PreviewHeader = ({
45
45
  </CapLabel>
46
46
  </CapRow>
47
47
  {showDeviceToggle && (
48
- <CapRow className="device-toggle">
48
+ <CapRow type="flex" align="middle" className="device-toggle">
49
49
  {isAndroidIosToggle ? (
50
50
  // Android/iOS toggle for SMS, WhatsApp, RCS, InApp, and MobilePush
51
51
  <>
@@ -106,11 +106,13 @@ const SmsPreviewContent = ({
106
106
  {/* Content Overlay */}
107
107
  <CapRow className={`sms-content-overlay sms-content-overlay-${device} sms-preview sms-${device}`}>
108
108
  {/* Navigation Bar */}
109
- <CapRow useLegacy className={`sms-navigation-bar ${!showHeader ? 'sms-navigation-bar-no-header' : ''}`}>
110
- <CapIcon type="chevron-left" className="sms-back-arrow" />
111
- <CapLabel type="label15" className="sms-sender-id">
112
- {senderId || formatMessage(messages.senderId)}
113
- </CapLabel>
109
+ <CapRow className={`sms-navigation-bar ${!showHeader ? 'sms-navigation-bar-no-header' : ''}`}>
110
+ <CapRow type='flex' align='middle' justify='center'>
111
+ <CapIcon type="chevron-left" className="sms-back-arrow" />
112
+ <CapLabel type="label15" className="sms-sender-id">
113
+ {senderId || formatMessage(messages.senderId)}
114
+ </CapLabel>
115
+ </CapRow>
114
116
  <CapIcon type="more" className="sms-menu-icon" />
115
117
  </CapRow>
116
118
 
@@ -556,11 +556,11 @@
556
556
  }
557
557
 
558
558
  // SMS Preview Content Styles (Phase 7)
559
- .sms-device-container {
559
+ .sms-device-container.ant-row {
560
560
  position: relative;
561
561
  display: flex;
562
562
  justify-content: center;
563
- align-items: flex-start;
563
+ align-items: center !important;
564
564
  width: 100%;
565
565
  margin: 0 auto;
566
566
 
@@ -619,8 +619,9 @@
619
619
  // Navigation Bar
620
620
  .sms-navigation-bar {
621
621
  display: flex;
622
+ position: relative;
622
623
  align-items: center;
623
- justify-content: space-between;
624
+ justify-content: center;
624
625
  padding: $CAP_SPACE_12 $CAP_SPACE_16;
625
626
  height: $CAP_SPACE_48;
626
627
  background: $CAP_G09;
@@ -644,6 +645,8 @@
644
645
  }
645
646
 
646
647
  .sms-menu-icon {
648
+ position: absolute;
649
+ right: $CAP_SPACE_20;
647
650
  font-size: $FONT_SIZE_L;
648
651
  color: #595959;
649
652
  cursor: pointer;
@@ -690,6 +693,7 @@
690
693
  font-size: $FONT_SIZE_M;
691
694
  line-height: 1.4;
692
695
  word-wrap: break-word;
696
+ max-width: 14.286rem;
693
697
 
694
698
  .message-pop {
695
699
  .rcs-image {
@@ -364,6 +364,7 @@
364
364
  user-select: none;
365
365
  min-width: $CAP_SPACE_40;
366
366
  flex-shrink: 0;
367
+ flex-direction: column;
367
368
 
368
369
  .line-number {
369
370
  text-align: right;
@@ -521,6 +522,7 @@
521
522
  padding: $CAP_SPACE_12 $CAP_SPACE_16;
522
523
  color: #333;
523
524
  word-break: break-all;
525
+ max-width: 10rem;
524
526
  }
525
527
 
526
528
  .tag-input {
@@ -528,6 +530,11 @@
528
530
  padding: $CAP_SPACE_08 $CAP_SPACE_16;
529
531
  display: flex;
530
532
  align-items: center;
533
+
534
+ input {
535
+ height: $CAP_SPACE_32;
536
+ font-size: $FONT_SIZE_M
537
+ }
531
538
  }
532
539
  }
533
540
  }
@@ -580,6 +587,10 @@
580
587
  color: #666;
581
588
  }
582
589
 
590
+ .ant-collapse-borderless {
591
+ background-color: transparent;
592
+ }
593
+
583
594
  .ant-collapse-header {
584
595
  padding-left: 0;
585
596
  }
@@ -588,14 +599,24 @@
588
599
  padding-left: 0 !important;
589
600
  }
590
601
 
602
+ .accordion-content-wrapper {
603
+ padding-left: $CAP_SPACE_08;
604
+ }
605
+
591
606
  .send-test-content {
592
607
  flex-direction: column;
593
608
  align-items: stretch;
594
609
  gap: 0;
595
610
  }
596
611
 
612
+ .cap-tree-select-v2-select-slot {
613
+ height: $CAP_SPACE_40;
614
+ max-height: 21.429rem;
615
+ }
616
+
597
617
  .test-customers-tree-select {
598
618
  width: 100%;
619
+ height: 100% !important;
599
620
  min-width: 18rem;
600
621
  /* Consistent dropdown width in campaigns and creatives */
601
622
  min-height: $CAP_SPACE_40;
@@ -606,6 +627,10 @@
606
627
  min-height: $CAP_SPACE_40;
607
628
  height: auto !important;
608
629
  }
630
+
631
+ .ant-select-content {
632
+ height: 100%;
633
+ }
609
634
  }
610
635
 
611
636
  .send-test-content .ant-btn {
@@ -707,7 +732,8 @@
707
732
  padding: $CAP_SPACE_06 $CAP_SPACE_08;
708
733
  border-radius: $CAP_SPACE_08;
709
734
 
710
- .anticon {
735
+ .anticon,
736
+ .cap-icon-v2 {
711
737
  padding: $CAP_SPACE_04;
712
738
  border-radius: $CAP_SPACE_04;
713
739
  cursor: pointer;
@@ -2959,7 +2959,7 @@ const CommonTestAndPreview = (props) => {
2959
2959
 
2960
2960
  // Header content for the slidebox
2961
2961
  const slideboxHeader = (
2962
- <CapRow className="test-preview-header">
2962
+ <CapRow type="flex" align="middle" className="test-preview-header">
2963
2963
  <CapIcon type="arrow-left" onClick={handleClose} className="back-icon" />
2964
2964
  <CapHeader title={<FormattedMessage {...messages.testAndPreviewHeader} />} />
2965
2965
  </CapRow>
@@ -2981,7 +2981,7 @@ const CommonTestAndPreview = (props) => {
2981
2981
  className={`common-test-preview-lookup-spin ${isCustomerDataLoading ? 'common-test-preview-customer-loading' : ''}`}
2982
2982
  >
2983
2983
  <CapRow className="test-preview-container">
2984
- <CapRow className="test-and-preview-panels">
2984
+ <CapRow type="flex" align="stretch" className="test-and-preview-panels">
2985
2985
  {/* Left Panel */}
2986
2986
  <CapRow useLegacy className="left-panel">
2987
2987
  {channel === CHANNELS.ZALO ? null : renderLeftPanelContent()}
@@ -79,7 +79,7 @@ const CustomValuesEditor = ({
79
79
  <>
80
80
  {extractedTags?.length > 0 && (
81
81
  <CapRow className="values-table">
82
- <CapRow className="table-header">
82
+ <CapRow type="flex" className="table-header">
83
83
  <CapLabel type="label31" className="header-cell">
84
84
  <FormattedMessage {...messages.personalizationTags} />
85
85
  </CapLabel>
@@ -332,9 +332,9 @@
332
332
  }
333
333
  }
334
334
 
335
- .note-message-container {
336
- display: flex;
337
- align-items: center;
335
+ .note-message-container.cap-row-vertical {
336
+ flex-direction: row !important;
337
+ flex-wrap: nowrap;
338
338
  }
339
339
 
340
340
  .save-section {
@@ -1,13 +1,20 @@
1
- .creatives-sms-footer{
2
- display: inline-flex;
1
+ @import '~@capillarytech/cap-ui-library/styles/_variables';
2
+
3
+ .cap-row-v2.ant-row-legacy.creatives-sms-footer {
4
+ display: flex !important;
3
5
  }
4
6
  .tag-container{
5
7
  .add-label{
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: flex-end;
11
+
6
12
  button{
7
13
  float: right;
8
14
  top: 8px;
9
15
  z-index: 100;
10
16
  padding: unset !important;;
17
+ color: map-get($CAP_SECONDARY, base);
11
18
  }
12
19
  }
13
20
  }