diy-template-components 2.0.108 → 2.0.110
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 +10 -32
- package/build/index.es.js.map +1 -1
- package/build/index.js +10 -34
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
function ___$insertStyle(css) {
|
|
2
|
-
if (!css || typeof window === 'undefined') {
|
|
3
|
-
return;
|
|
4
|
-
}
|
|
5
|
-
const style = document.createElement('style');
|
|
6
|
-
style.setAttribute('type', 'text/css');
|
|
7
|
-
style.innerHTML = css;
|
|
8
|
-
document.head.appendChild(style);
|
|
9
|
-
return css;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
1
|
import React, { createContext, useContext, forwardRef, useRef, useEffect, useState, useMemo, useLayoutEffect, Suspense, memo, lazy, Fragment } from 'react';
|
|
13
2
|
import Slider from 'react-slick';
|
|
14
3
|
import axios from 'axios';
|
|
@@ -19,18 +8,13 @@ import ReactDOMServer from 'react-dom/server';
|
|
|
19
8
|
import { createTheming, createUseStyles as createUseStyles$1, useTheme as useTheme$1 } from 'react-jss';
|
|
20
9
|
|
|
21
10
|
function _extends() {
|
|
22
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
23
|
-
for (var
|
|
24
|
-
var
|
|
25
|
-
for (var
|
|
26
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
27
|
-
target[key] = source[key];
|
|
28
|
-
}
|
|
29
|
-
}
|
|
11
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
12
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
13
|
+
var t = arguments[e];
|
|
14
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
30
15
|
}
|
|
31
|
-
return
|
|
32
|
-
};
|
|
33
|
-
return _extends.apply(this, arguments);
|
|
16
|
+
return n;
|
|
17
|
+
}, _extends.apply(null, arguments);
|
|
34
18
|
}
|
|
35
19
|
|
|
36
20
|
const PageContext = /*#__PURE__*/createContext({});
|
|
@@ -867,7 +851,7 @@ const icons = {
|
|
|
867
851
|
GroupProfile: getConfiguredIcon2(groupProfile, false, true)
|
|
868
852
|
};
|
|
869
853
|
|
|
870
|
-
const someMethod1 = (
|
|
854
|
+
const someMethod1 = (/** @type {import('./types').IconData["svgChildrenConfigs"]} */svgChildrenConfigs, color, hoverColor) => {
|
|
871
855
|
/** @type {{ [k:string]:React.CSSProperties; }} */
|
|
872
856
|
const obj = {};
|
|
873
857
|
for (const svgChildConfig of svgChildrenConfigs) {
|
|
@@ -956,7 +940,7 @@ const Icon = ({
|
|
|
956
940
|
}, []);
|
|
957
941
|
/** */
|
|
958
942
|
|
|
959
|
-
const rootRef = useRef(
|
|
943
|
+
const rootRef = useRef(/** @type {HTMLElement} */null);
|
|
960
944
|
// this ref is used to cancel the fetch promise success callback in case name prop changed
|
|
961
945
|
const currentName = useRef(name);
|
|
962
946
|
const [svgState, setSvgState] = useState(defaultSvgState);
|
|
@@ -6755,20 +6739,16 @@ function courses({
|
|
|
6755
6739
|
const [nodeData] = sectionData?.components;
|
|
6756
6740
|
const [utmParams, setUtmParams] = useState('');
|
|
6757
6741
|
const handleApiCall = () => {
|
|
6758
|
-
console.log('base', baseURLs);
|
|
6759
6742
|
if (baseURLs) {
|
|
6760
6743
|
getCourseList(baseURLs, hashToken).then(response => {
|
|
6761
|
-
console.log('response', response);
|
|
6762
6744
|
const placeholders = nodeData?.cardCarousel?.metadata?.placeholders;
|
|
6763
6745
|
const coursesData = response?.data?.coursesData;
|
|
6764
6746
|
if (coursesData && coursesData.length) {
|
|
6765
6747
|
setCardList(response?.data?.coursesData);
|
|
6766
6748
|
setShowShimmer(false);
|
|
6767
6749
|
} else {
|
|
6768
|
-
console.log('edit');
|
|
6769
6750
|
// For Edit Page: If no data found, show placeholders. If placeholder doesn't come from backend, show shimmer.
|
|
6770
6751
|
if (isEdit) {
|
|
6771
|
-
console.log('edit1', placeholders);
|
|
6772
6752
|
if (placeholders && placeholders.length) {
|
|
6773
6753
|
setShowShimmer(false);
|
|
6774
6754
|
setFallbackImages(placeholders);
|
|
@@ -6792,10 +6772,8 @@ function courses({
|
|
|
6792
6772
|
};
|
|
6793
6773
|
useEffect(() => {
|
|
6794
6774
|
const placeholders = nodeData?.cardCarousel?.metadata?.placeholders;
|
|
6795
|
-
console.log('placeholders test', placeholders, isMasterTemplate);
|
|
6796
|
-
debugger;
|
|
6797
6775
|
// For Master template Preview: Show placeholder images. If placeholder doesn't come from backend, show shimmer.
|
|
6798
|
-
if (isMasterTemplate
|
|
6776
|
+
if (isMasterTemplate) {
|
|
6799
6777
|
if (placeholders && placeholders.length) {
|
|
6800
6778
|
setShowShimmer(false);
|
|
6801
6779
|
setFallbackImages(placeholders);
|
|
@@ -10055,7 +10033,7 @@ function EmailDripMarket({
|
|
|
10055
10033
|
}
|
|
10056
10034
|
};
|
|
10057
10035
|
const convertToHtml = sectionData => {
|
|
10058
|
-
const html = ReactDOMServer.renderToStaticMarkup(
|
|
10036
|
+
const html = ReactDOMServer.renderToStaticMarkup(/*#__PURE__*/React.createElement(Section, {
|
|
10059
10037
|
nodeData: sectionData,
|
|
10060
10038
|
renderHTML: true,
|
|
10061
10039
|
isProceed: extraProps.isProceed,
|