diy-template-components 2.0.109 → 2.0.111
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/build/index.es.js +14 -39
- package/build/index.es.js.map +1 -1
- package/build/index.js +14 -41
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function ___$insertStyle(css) {
|
|
6
|
-
if (!css || typeof window === 'undefined') {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
const style = document.createElement('style');
|
|
10
|
-
style.setAttribute('type', 'text/css');
|
|
11
|
-
style.innerHTML = css;
|
|
12
|
-
document.head.appendChild(style);
|
|
13
|
-
return css;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
17
4
|
|
|
18
5
|
var React = require('react');
|
|
@@ -35,18 +22,13 @@ var koreanLocale__default = /*#__PURE__*/_interopDefaultLegacy(koreanLocale);
|
|
|
35
22
|
var ReactDOMServer__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOMServer);
|
|
36
23
|
|
|
37
24
|
function _extends() {
|
|
38
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
39
|
-
for (var
|
|
40
|
-
var
|
|
41
|
-
for (var
|
|
42
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
43
|
-
target[key] = source[key];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
25
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
26
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
27
|
+
var t = arguments[e];
|
|
28
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
46
29
|
}
|
|
47
|
-
return
|
|
48
|
-
};
|
|
49
|
-
return _extends.apply(this, arguments);
|
|
30
|
+
return n;
|
|
31
|
+
}, _extends.apply(null, arguments);
|
|
50
32
|
}
|
|
51
33
|
|
|
52
34
|
const PageContext = /*#__PURE__*/React.createContext({});
|
|
@@ -883,7 +865,7 @@ const icons = {
|
|
|
883
865
|
GroupProfile: getConfiguredIcon2(groupProfile, false, true)
|
|
884
866
|
};
|
|
885
867
|
|
|
886
|
-
const someMethod1 = (
|
|
868
|
+
const someMethod1 = (/** @type {import('./types').IconData["svgChildrenConfigs"]} */svgChildrenConfigs, color, hoverColor) => {
|
|
887
869
|
/** @type {{ [k:string]:React.CSSProperties; }} */
|
|
888
870
|
const obj = {};
|
|
889
871
|
for (const svgChildConfig of svgChildrenConfigs) {
|
|
@@ -972,7 +954,7 @@ const Icon = ({
|
|
|
972
954
|
}, []);
|
|
973
955
|
/** */
|
|
974
956
|
|
|
975
|
-
const rootRef = React.useRef(
|
|
957
|
+
const rootRef = React.useRef(/** @type {HTMLElement} */null);
|
|
976
958
|
// this ref is used to cancel the fetch promise success callback in case name prop changed
|
|
977
959
|
const currentName = React.useRef(name);
|
|
978
960
|
const [svgState, setSvgState] = React.useState(defaultSvgState);
|
|
@@ -6613,7 +6595,6 @@ const useCourseStyles = createUseStyles(theme => {
|
|
|
6613
6595
|
});
|
|
6614
6596
|
|
|
6615
6597
|
async function getCourseList(baseURLs, hashToken) {
|
|
6616
|
-
console.log('hash', baseURLs, hashToken);
|
|
6617
6598
|
if (!hashToken) {
|
|
6618
6599
|
throw 'Missing hash token';
|
|
6619
6600
|
}
|
|
@@ -6628,7 +6609,6 @@ async function getCourseList(baseURLs, hashToken) {
|
|
|
6628
6609
|
requiredFilters: '[10]'
|
|
6629
6610
|
}
|
|
6630
6611
|
});
|
|
6631
|
-
console.log('res', res);
|
|
6632
6612
|
if (res) {
|
|
6633
6613
|
return res.data;
|
|
6634
6614
|
}
|
|
@@ -6773,20 +6753,16 @@ function courses({
|
|
|
6773
6753
|
const [nodeData] = sectionData?.components;
|
|
6774
6754
|
const [utmParams, setUtmParams] = React.useState('');
|
|
6775
6755
|
const handleApiCall = () => {
|
|
6776
|
-
console.log('base', baseURLs);
|
|
6777
6756
|
if (baseURLs) {
|
|
6778
6757
|
getCourseList(baseURLs, hashToken).then(response => {
|
|
6779
|
-
console.log('response', response);
|
|
6780
6758
|
const placeholders = nodeData?.cardCarousel?.metadata?.placeholders;
|
|
6781
6759
|
const coursesData = response?.data?.coursesData;
|
|
6782
6760
|
if (coursesData && coursesData.length) {
|
|
6783
6761
|
setCardList(response?.data?.coursesData);
|
|
6784
6762
|
setShowShimmer(false);
|
|
6785
6763
|
} else {
|
|
6786
|
-
console.log('edit');
|
|
6787
6764
|
// For Edit Page: If no data found, show placeholders. If placeholder doesn't come from backend, show shimmer.
|
|
6788
6765
|
if (isEdit) {
|
|
6789
|
-
console.log('edit1', placeholders);
|
|
6790
6766
|
if (placeholders && placeholders.length) {
|
|
6791
6767
|
setShowShimmer(false);
|
|
6792
6768
|
setFallbackImages(placeholders);
|
|
@@ -6796,7 +6772,6 @@ function courses({
|
|
|
6796
6772
|
else setErrored(true);
|
|
6797
6773
|
}
|
|
6798
6774
|
}).catch(err => {
|
|
6799
|
-
console.log('err', err);
|
|
6800
6775
|
const errMsg = err?.response?.data?.data?.message;
|
|
6801
6776
|
if (errMsg === 'NOT_FOUND') {
|
|
6802
6777
|
if (nodeData?.cardCarousel?.metadata?.placeholders?.length && isEdit) {
|
|
@@ -6811,10 +6786,8 @@ function courses({
|
|
|
6811
6786
|
};
|
|
6812
6787
|
React.useEffect(() => {
|
|
6813
6788
|
const placeholders = nodeData?.cardCarousel?.metadata?.placeholders;
|
|
6814
|
-
console.log('placeholders test', placeholders, isMasterTemplate);
|
|
6815
|
-
debugger;
|
|
6816
6789
|
// For Master template Preview: Show placeholder images. If placeholder doesn't come from backend, show shimmer.
|
|
6817
|
-
if (isMasterTemplate
|
|
6790
|
+
if (isMasterTemplate) {
|
|
6818
6791
|
if (placeholders && placeholders.length) {
|
|
6819
6792
|
setShowShimmer(false);
|
|
6820
6793
|
setFallbackImages(placeholders);
|
|
@@ -9555,15 +9528,15 @@ const useTilesStyles = createUseStyles(theme => {
|
|
|
9555
9528
|
lineHeight: '46px',
|
|
9556
9529
|
color: '#7D8592',
|
|
9557
9530
|
marginBottom: theme.spacing.margin.tiny,
|
|
9558
|
-
textAlign: 'center'
|
|
9531
|
+
textAlign: 'center',
|
|
9532
|
+
'@media screen and (max-width: 767px)': {
|
|
9533
|
+
lineHeight: '16px'
|
|
9534
|
+
}
|
|
9559
9535
|
},
|
|
9560
9536
|
'@media screen and (max-width: 767px)': {
|
|
9561
9537
|
tileDiv: {
|
|
9562
9538
|
width: '100%'
|
|
9563
9539
|
},
|
|
9564
|
-
headerTitle: {
|
|
9565
|
-
lineHeight: '0px'
|
|
9566
|
-
},
|
|
9567
9540
|
row: {
|
|
9568
9541
|
marginTop: '24px',
|
|
9569
9542
|
display: 'grid',
|
|
@@ -10074,7 +10047,7 @@ function EmailDripMarket({
|
|
|
10074
10047
|
}
|
|
10075
10048
|
};
|
|
10076
10049
|
const convertToHtml = sectionData => {
|
|
10077
|
-
const html = ReactDOMServer__default["default"].renderToStaticMarkup(
|
|
10050
|
+
const html = ReactDOMServer__default["default"].renderToStaticMarkup(/*#__PURE__*/React__default["default"].createElement(Section, {
|
|
10078
10051
|
nodeData: sectionData,
|
|
10079
10052
|
renderHTML: true,
|
|
10080
10053
|
isProceed: extraProps.isProceed,
|