diy-template-components 2.0.15 → 2.0.16

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