diy-template-components 2.0.13 → 2.0.15

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 CHANGED
@@ -362,9 +362,10 @@ const buttonStyles = createUseStyles(theme => ({
362
362
  color: ({
363
363
  disabled
364
364
  } = {}) => disabled ? colorMixer(theme?.palette?.background?.default, 0.5).color : theme?.colors?.CtaTextColor,
365
- background: ({
365
+ background: theme?.colors?.ctaColor,
366
+ opacity: ({
366
367
  disabled
367
- } = {}) => disabled ? colorMixer(theme?.palette?.primary.main, 0.5).color : theme?.colors?.ctaColor,
368
+ } = {}) => disabled ? 0.5 : 1,
368
369
  border: 'none',
369
370
  textDecoration: 'none',
370
371
  cursor: ({
@@ -388,9 +389,10 @@ const buttonStyles = createUseStyles(theme => ({
388
389
  color: ({
389
390
  disabled
390
391
  } = {}) => disabled ? colorMixer(theme.palette.primary.main, 0.5).color : theme?.colors?.CtaTextColor,
391
- background: ({
392
+ background: theme?.colors?.ctaColor,
393
+ opacity: ({
392
394
  disabled
393
- } = {}) => disabled ? colorMixer(theme?.palette?.parimar?.default, 0.5).color : theme?.colors?.ctaColor,
395
+ } = {}) => disabled ? 0.5 : 1,
394
396
  border: ({
395
397
  disabled
396
398
  } = {}) => disabled ? `1px solid ${colorMixer(theme.palette.primary.main, 0.5).color}` : `1px solid ${theme?.colors?.ctaColor}`,
@@ -1081,6 +1083,7 @@ function OptionList({
1081
1083
  const downloadAppText = countryCode === 'KR' ? '앱다운로드' : 'Download App';
1082
1084
  const renderDownloadAppButton = () => {
1083
1085
  return /*#__PURE__*/React.createElement(React.Fragment, null, apkURL && /*#__PURE__*/React.createElement("a", {
1086
+ download: true,
1084
1087
  href: headerData?.apkURL,
1085
1088
  target: "_blank",
1086
1089
  className: classes.socialBtnItems,
@@ -1395,7 +1398,7 @@ function MobileHeader({
1395
1398
  const downloadAppText = countryCode === 'KR' ? '앱다운로드' : 'Download App';
1396
1399
  const apkURL = header?.apkURL;
1397
1400
  const isAndroidDelisted = header?.isAndroidDelisted;
1398
- const iosDownloadLink = header?.iosDownloadLink;
1401
+ const iosDownloadLink = header?.iosDownloadLink || header?.iosUrl;
1399
1402
  const androidDownloadLink = header?.androidDownloadLink;
1400
1403
 
1401
1404
  // console.log(header, 'sakshat header mobile');
@@ -1413,8 +1416,8 @@ function MobileHeader({
1413
1416
  rel: null,
1414
1417
  onClick: () => {
1415
1418
  let url = getAppDownloadLink(apkURL, iosDownloadLink);
1416
- window.open(url, "_blank");
1417
- if (url === apkURL && typeof onDownloadAppTriggered == "function") {
1419
+ window.open(url, '_blank');
1420
+ if (!header?.iosUrl && typeof onDownloadAppTriggered == 'function') {
1418
1421
  onDownloadAppTriggered(header?.isAndroidDelisted, header?.apkURL);
1419
1422
  }
1420
1423
  }
@@ -1448,8 +1451,8 @@ function MobileHeader({
1448
1451
  rel: null,
1449
1452
  onClick: () => {
1450
1453
  let url = getAppDownloadLink(apkURL, iosDownloadLink);
1451
- window.open(url, "_blank");
1452
- if (url === apkURL && typeof onDownloadAppTriggered == "function") {
1454
+ window.open(url, '_blank');
1455
+ if (!header?.iosUrl && typeof onDownloadAppTriggered == 'function') {
1453
1456
  onDownloadAppTriggered(header?.isAndroidDelisted, header?.apkURL);
1454
1457
  }
1455
1458
  }
@@ -1590,6 +1593,7 @@ const useSectionStyles$9 = createUseStyles(theme => ({
1590
1593
 
1591
1594
  // '& img': { maxHeight: '55px' }
1592
1595
  },
1596
+
1593
1597
  upperContainerItem1Img: {
1594
1598
  maxHeight: '55px',
1595
1599
  paddingBottom: '84px',
@@ -2016,6 +2020,7 @@ const mobilePadding = {
2016
2020
  // 24px
2017
2021
  medium: baseFactor * 6 // 48px
2018
2022
  };
2023
+
2019
2024
  const padding = {
2020
2025
  minute: baseFactor * 2,
2021
2026
  // 16px
@@ -2481,6 +2486,7 @@ const useSectionStyles$8 = createUseStyles(theme => ({
2481
2486
  // }
2482
2487
  // }
2483
2488
  },
2489
+
2484
2490
  sectionContainer: {
2485
2491
  margin: '0 auto',
2486
2492
  maxWidth: ({
@@ -3050,6 +3056,7 @@ const useSectionStyles$7 = createUseStyles(theme => ({
3050
3056
  // padding: '0'
3051
3057
  }
3052
3058
  },
3059
+
3053
3060
  '&:nth-child(2n+1)': {
3054
3061
  marginRight: '0',
3055
3062
  '& $contentText': {
@@ -3059,6 +3066,7 @@ const useSectionStyles$7 = createUseStyles(theme => ({
3059
3066
  }
3060
3067
  }
3061
3068
  },
3069
+
3062
3070
  contentNumber: {
3063
3071
  width: '100%',
3064
3072
  padding: '24px',
@@ -3451,6 +3459,7 @@ const useSectionStyles$5 = createUseStyles(theme => {
3451
3459
  // }
3452
3460
  // }
3453
3461
  },
3462
+
3454
3463
  sectionContainer: {
3455
3464
  margin: '0 auto',
3456
3465
  maxWidth: ({
@@ -3464,6 +3473,7 @@ const useSectionStyles$5 = createUseStyles(theme => {
3464
3473
 
3465
3474
  // padding: `${theme?.spacing?.padding?.regular}px ${theme?.spacing?.padding?.medium}px 0px ${theme?.spacing?.padding?.medium}px`
3466
3475
  },
3476
+
3467
3477
  imageContainerDiv: {
3468
3478
  width: '50%',
3469
3479
  position: 'relative'
@@ -3535,6 +3545,7 @@ const useSectionStyles$5 = createUseStyles(theme => {
3535
3545
  width: '100%'
3536
3546
  // padding: `${theme?.spacing?.padding?.medium}px ${theme?.spacing?.padding?.regular}px`
3537
3547
  },
3548
+
3538
3549
  imageContainer: {
3539
3550
  height: 'unset !important',
3540
3551
  '& img': {
@@ -4541,6 +4552,7 @@ const useVideoTestimonialStyles = createUseStyles(theme => {
4541
4552
  fontFamily: theme?.typography?.fontFamily
4542
4553
  // boxSizing: 'border-box'
4543
4554
  },
4555
+
4544
4556
  '& h2,& h3,& p': {
4545
4557
  marginTop: '0'
4546
4558
  }
@@ -4565,6 +4577,7 @@ const useVideoTestimonialStyles = createUseStyles(theme => {
4565
4577
  wordBreak: 'break-word'
4566
4578
  // marginBottom: '8px'
4567
4579
  },
4580
+
4568
4581
  videoTestimonialTitle: {
4569
4582
  fontSize: theme.typography.fontSize.h2,
4570
4583
  // lineHeight: '71px',
@@ -5005,6 +5018,7 @@ const useSectionStyles$3 = createUseStyles(theme => ({
5005
5018
  // }
5006
5019
  // }
5007
5020
  },
5021
+
5008
5022
  sectionContainer: {
5009
5023
  margin: '0 auto',
5010
5024
  maxWidth: ({
@@ -5362,6 +5376,7 @@ const usePhotoGalleryStyles = createUseStyles(theme => {
5362
5376
  // }
5363
5377
  // }
5364
5378
  },
5379
+
5365
5380
  sectionContainer: {
5366
5381
  margin: '0 auto',
5367
5382
  maxWidth: ({
@@ -5392,6 +5407,7 @@ const usePhotoGalleryStyles = createUseStyles(theme => {
5392
5407
  position: 'relative',
5393
5408
  paddingBottom: '59.83%' // keeping aspect ratio 585x350
5394
5409
  },
5410
+
5395
5411
  contentRow: {
5396
5412
  display: 'grid',
5397
5413
  gridTemplateColumns: ({
@@ -5938,6 +5954,7 @@ const useCourseStyles = createUseStyles(theme => {
5938
5954
  // }
5939
5955
  // }
5940
5956
  },
5957
+
5941
5958
  sectionContainer: {
5942
5959
  margin: '0 auto',
5943
5960
  maxWidth: ({
@@ -5970,12 +5987,13 @@ const useCourseStyles = createUseStyles(theme => {
5970
5987
  // textAlign: 'center',
5971
5988
  // wordBreak: 'break-word'
5972
5989
  },
5990
+
5973
5991
  slickContainer: {
5974
5992
  marginRight: '-20px'
5975
5993
  },
5976
5994
  singleCardContainer: {
5977
5995
  display: 'grid',
5978
- gridTemplateColumns: `repeat(3, minmax(0, 1fr))`
5996
+ gridTemplateColumns: `repeat(3, 320px)`
5979
5997
  },
5980
5998
  singleCard: {
5981
5999
  height: 'calc(100% - 12px)',
@@ -6017,6 +6035,7 @@ const useCourseStyles = createUseStyles(theme => {
6017
6035
  justifyContent: 'space-between'
6018
6036
  //alignItems: 'center',
6019
6037
  },
6038
+
6020
6039
  courseCardTags: {
6021
6040
  display: 'flex',
6022
6041
  justifyContent: 'flex-start',
@@ -6047,6 +6066,7 @@ const useCourseStyles = createUseStyles(theme => {
6047
6066
  // whiteSpace: 'nowrap',
6048
6067
  // textOverflow: 'ellipsis'
6049
6068
  },
6069
+
6050
6070
  courseCardDiscount: {
6051
6071
  display: 'flex',
6052
6072
  justifyContent: 'flex-start',
@@ -6153,6 +6173,7 @@ const useCourseStyles = createUseStyles(theme => {
6153
6173
  // whiteSpace: 'nowrap',
6154
6174
  // textOverflow: 'ellipsis'
6155
6175
  },
6176
+
6156
6177
  singleCard: {
6157
6178
  margin: '6px 2px'
6158
6179
  // width: 'calc(100% - 12px)'
@@ -6528,6 +6549,7 @@ const useTeamStyles = createUseStyles(theme => {
6528
6549
  margin: '20px 0 0'
6529
6550
  // overflowWrap: 'break-word'
6530
6551
  },
6552
+
6531
6553
  teamDetailsHeading: {
6532
6554
  fontSize: theme.typography.fontSize.h6,
6533
6555
  fontWeight: theme.typography.fontWeight.bold,
@@ -6571,6 +6593,7 @@ const useTeamStyles = createUseStyles(theme => {
6571
6593
  // margin: '15px 0 0',
6572
6594
  // paddingBottom: '0'
6573
6595
  },
6596
+
6574
6597
  teamDetailsHeading: {
6575
6598
  fontSize: '16px',
6576
6599
  lineHeight: '24px',
@@ -6703,6 +6726,7 @@ const useSectionStyles$1 = createUseStyles(theme => ({
6703
6726
  // }
6704
6727
  // }
6705
6728
  },
6729
+
6706
6730
  formContainer: {
6707
6731
  margin: '0 auto',
6708
6732
  maxWidth: ({
@@ -6739,12 +6763,14 @@ const useSectionStyles$1 = createUseStyles(theme => ({
6739
6763
  display: 'flex'
6740
6764
  // alignItems: 'flex-start',
6741
6765
  },
6766
+
6742
6767
  leftContainerForm: {
6743
6768
  width: '65%',
6744
6769
  display: 'flex',
6745
6770
  flexDirection: 'column'
6746
6771
  // justifyContent: 'space-between'
6747
6772
  },
6773
+
6748
6774
  subtitle: {
6749
6775
  // margin: '0 0 40px 0',
6750
6776
  fontSize: theme.typography.fontSize.h5,
@@ -6812,6 +6838,7 @@ const useSectionStyles$1 = createUseStyles(theme => ({
6812
6838
  width: '100%'
6813
6839
  // padding: '0 16ox'
6814
6840
  },
6841
+
6815
6842
  rightContainer: {
6816
6843
  width: '100%',
6817
6844
  padding: '0'
@@ -7119,6 +7146,7 @@ const useSectionStyles = createUseStyles(theme => ({
7119
7146
  // }
7120
7147
  // }
7121
7148
  },
7149
+
7122
7150
  contactContainer: {
7123
7151
  width: '100%',
7124
7152
  margin: '0 auto',
@@ -7157,6 +7185,7 @@ const useSectionStyles = createUseStyles(theme => ({
7157
7185
  // justifyContent: 'space-between',
7158
7186
  // flex: 1
7159
7187
  },
7188
+
7160
7189
  subtitle: {
7161
7190
  // margin: '0 0 auto 0',
7162
7191
  fontSize: theme.typography.fontSize.h6,
@@ -7313,6 +7342,7 @@ function Contact({
7313
7342
  extraProps
7314
7343
  } = useContext(PageContext);
7315
7344
  let [btnDisabled, setBtnDisabled] = useState(false);
7345
+ const [isSubmitted, setIsSubmitted] = useState(false);
7316
7346
  const [nodeData] = sectionData.components;
7317
7347
  const classes = useSectionStyles({
7318
7348
  containerWidth,
@@ -7345,14 +7375,15 @@ function Contact({
7345
7375
  if (!(isPreview || isEdit)) postApiCall(baseURLs, data);
7346
7376
  setBtnDisabled(true);
7347
7377
  setInputVal(formInitialValue);
7378
+ setIsSubmitted(true);
7348
7379
  };
7349
7380
  useEffect(() => {
7350
- if (validData?.nameValid && validData?.emailValid && validData?.phoneValid && validData?.messageValid) {
7381
+ if (validData?.nameValid && validData?.emailValid && validData?.phoneValid && validData?.messageValid && inputVal?.email && inputVal?.name && inputVal?.phone && inputVal?.message) {
7351
7382
  setBtnDisabled(false);
7352
7383
  } else {
7353
7384
  setBtnDisabled(true);
7354
7385
  }
7355
- }, [validData]);
7386
+ }, [validData, inputVal]);
7356
7387
  const checkValidity = (regexField, fieldname, fieldValidity) => {
7357
7388
  if (validations?.[regexField]?.length) {
7358
7389
  let regex = new RegExp(validations[regexField]);
@@ -7495,7 +7526,7 @@ function Contact({
7495
7526
  className: classes.btnContainer
7496
7527
  }, /*#__PURE__*/React.createElement(Button, {
7497
7528
  ref: nodeData?.cta?.refSetter,
7498
- data: btnDisabled && validData?.messageValid && validData?.emailValid && validData?.nameValid && validData?.phoneValid ? {
7529
+ data: isSubmitted ? {
7499
7530
  value: 'Submitted'
7500
7531
  } : {
7501
7532
  value: nodeData.cta.metadata.value
@@ -7596,6 +7627,7 @@ const useWebinarPromotionPage = createUseStyles(theme => {
7596
7627
  marginTop: '5%'
7597
7628
  // padding: '0px 5% 0px 5%'
7598
7629
  },
7630
+
7599
7631
  iframe: {
7600
7632
  position: 'absolute',
7601
7633
  width: '100%',
@@ -7943,6 +7975,7 @@ const SingleVideoSlide$1 = props => {
7943
7975
  value: data.isPaid ? buyNowText : registerNowText
7944
7976
  // isExternal: 1
7945
7977
  },
7978
+
7946
7979
  onClick: webinarCtaClick,
7947
7980
  type: 'primary',
7948
7981
  size: 'medium',
@@ -8011,6 +8044,7 @@ const useCoursePromotionPage = createUseStyles(theme => {
8011
8044
  // }
8012
8045
  // }
8013
8046
  },
8047
+
8014
8048
  sectionContainer: {
8015
8049
  margin: '0 auto',
8016
8050
  maxWidth: ({
@@ -8128,6 +8162,7 @@ const useCoursePromotionPage = createUseStyles(theme => {
8128
8162
  // paddingBottom: '10px',
8129
8163
  // paddingTop: '10px'
8130
8164
  },
8165
+
8131
8166
  bannerContainer: {
8132
8167
  width: '100%',
8133
8168
  background: theme?.colors?.bannerColor,
@@ -8142,6 +8177,7 @@ const useCoursePromotionPage = createUseStyles(theme => {
8142
8177
  clipPath: 'polygon(0 0, 100% 0, 100% calc(100% - 10px), 0 calc(100% - 10px), 15px calc(50% - 10px/2))'
8143
8178
  // marginBottom: '16px'
8144
8179
  },
8180
+
8145
8181
  bannerContainerText: {
8146
8182
  transform: 'rotate(180deg)'
8147
8183
  },
@@ -8254,6 +8290,7 @@ const useCoursePromotionPage = createUseStyles(theme => {
8254
8290
  height: 'max-content'
8255
8291
  // paddingRight: '10px'
8256
8292
  },
8293
+
8257
8294
  videoDetails: {
8258
8295
  width: '100%'
8259
8296
  },
@@ -8512,6 +8549,7 @@ const SingleVideoSlide = props => {
8512
8549
  value: buyNowText
8513
8550
  // isExternal: 1
8514
8551
  },
8552
+
8515
8553
  onClick: courseBuyNow,
8516
8554
  type: 'primary',
8517
8555
  size: 'medium',
@@ -8616,6 +8654,7 @@ const useFormPageStyles = createUseStyles(theme => ({
8616
8654
  // border: '1px solid #D8E0F0',
8617
8655
  // borderRadius: '16px'
8618
8656
  },
8657
+
8619
8658
  inputFieldLabel: {
8620
8659
  color: theme?.colors?.lightblack,
8621
8660
  fontSize: theme.typography.fontSize.body,
@@ -8928,6 +8967,7 @@ const FormPage = ({
8928
8967
  value: countryCode === 'KR' ? '제출하기' : 'SUBMIT'
8929
8968
  // isExternal: 1
8930
8969
  },
8970
+
8931
8971
  type: 'primary',
8932
8972
  size: 'medium',
8933
8973
  target: null,
@@ -9110,6 +9150,7 @@ const useEmailStyles = createUseStyles(theme => ({
9110
9150
  height: '48px'
9111
9151
  /* margin: 18px 0px; */
9112
9152
  },
9153
+
9113
9154
  'p-young-guru-title': {
9114
9155
  fontFamily: theme?.typography?.fontFamily,
9115
9156
  fontStyle: 'normal',
@@ -9137,6 +9178,7 @@ const useEmailStyles = createUseStyles(theme => ({
9137
9178
  textAlign: 'center'
9138
9179
  /* padding:35px 0 40px */
9139
9180
  },
9181
+
9140
9182
  'two-columns .column': {
9141
9183
  width: '100%',
9142
9184
  maxWidth: '275px',