@capillarytech/creatives-library 7.17.114 → 7.17.115
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
|
@@ -84,11 +84,14 @@
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
.contet-width-collapse {
|
|
87
|
-
margin-left:
|
|
87
|
+
margin-left: 17.438rem;
|
|
88
|
+
.component-wrapper {
|
|
89
|
+
max-width: 70.063rem;
|
|
90
|
+
}
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
.content-width-expanded {
|
|
91
|
-
margin-left:
|
|
94
|
+
margin-left: 8.375rem;
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
.breadcrumbs{
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export const CapLeftNavigationCss = {
|
|
2
|
-
'
|
|
3
|
-
|
|
2
|
+
'padding-right': '1.28rem',
|
|
3
|
+
"width": '71.25rem',
|
|
4
|
+
'margin-left': '14.9rem',
|
|
4
5
|
};
|
|
5
6
|
|
|
6
7
|
export const CapLeftNavigatioOpenCss = {
|
|
7
|
-
'
|
|
8
|
-
|
|
8
|
+
'padding-left': '0',
|
|
9
|
+
"width": '70.063rem',
|
|
10
|
+
'margin-left': '18.5rem',
|
|
9
11
|
};
|
|
@@ -62,12 +62,6 @@ const MainWrapper = styled.div`
|
|
|
62
62
|
top: ${(props) => (props.isLatestLeftNavigationEnabled ? '1.72rem' : '5.29rem')};
|
|
63
63
|
`;
|
|
64
64
|
|
|
65
|
-
const ContentWrapper = styled.div`
|
|
66
|
-
&& {
|
|
67
|
-
margin-left: ${(props) => (props.isLatestLeftNavigationEnabled ? (props.leftNavbarExpanded ? '17rem' : '4.475rem') : 0)};
|
|
68
|
-
}
|
|
69
|
-
`;
|
|
70
|
-
|
|
71
65
|
export class Cap extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
72
66
|
|
|
73
67
|
constructor(props) {
|
|
@@ -525,13 +519,9 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
525
519
|
/>) : ''}
|
|
526
520
|
<MainWrapper isLatestLeftNavigationEnabled={isLatestLeftNavigationEnabled} className="main">
|
|
527
521
|
|
|
528
|
-
<
|
|
529
|
-
className={`main-content ${this.state.leftNavbarExpanded ? "contet-width-collapse" : "content-width-expanded"}`}
|
|
530
|
-
isLatestLeftNavigationEnabled={isLatestLeftNavigationEnabled}
|
|
531
|
-
leftNavbarExpanded={this.state.leftNavbarExpanded}
|
|
532
|
-
>
|
|
522
|
+
<div className={`main-content ${this.state.leftNavbarExpanded ? "contet-width-collapse" : "content-width-expanded"}`}>
|
|
533
523
|
{React.Children.toArray(this.props.children)}
|
|
534
|
-
</
|
|
524
|
+
</div>
|
|
535
525
|
</MainWrapper>
|
|
536
526
|
</div>
|
|
537
527
|
{(toastMessages && toastMessages.length > 0) &&
|
|
@@ -239,6 +239,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
239
239
|
this.onAccountSelect = this.onAccountSelect.bind(this);
|
|
240
240
|
this.prepareMobilePushPreviewData = this.prepareMobilePushPreviewData.bind(this);
|
|
241
241
|
this.menuOnClickEvent = this.menuOnClickEvent.bind(this);
|
|
242
|
+
this.delayTimer = 0;
|
|
242
243
|
}
|
|
243
244
|
|
|
244
245
|
componentWillMount() {
|
|
@@ -1766,6 +1767,11 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1766
1767
|
}
|
|
1767
1768
|
}
|
|
1768
1769
|
|
|
1770
|
+
delay(callback, ms) {
|
|
1771
|
+
clearTimeout(this.delayTimer);
|
|
1772
|
+
this.delayTimer = setTimeout(callback, ms);
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1769
1775
|
searchTemplate(data, channel) {
|
|
1770
1776
|
if (channel.toLowerCase() === ZALO_LOWERCASE) {
|
|
1771
1777
|
if (data) {
|
|
@@ -1795,7 +1801,9 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1795
1801
|
if (this.state.channel.toLowerCase() === MOBILE_PUSH_LOWERCASE) {
|
|
1796
1802
|
params.accountId = this.props.Templates.selectedWeChatAccount.id;
|
|
1797
1803
|
}
|
|
1798
|
-
this.
|
|
1804
|
+
this.delay(() => {
|
|
1805
|
+
this.getAllTemplates({params, resetPage: true});
|
|
1806
|
+
}, 500);
|
|
1799
1807
|
});
|
|
1800
1808
|
}
|
|
1801
1809
|
}
|