diy-template-components 0.3.7 → 0.3.9

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
@@ -5848,7 +5848,7 @@ function CourseCard({
5848
5848
  const defaultCardImg = 'https://cp-assets-public.s3.ap-south-1.amazonaws.com/cams/cards-icon/default_course.png';
5849
5849
  const price = formatCurrency(countryCode, card?.price, currencySymbol);
5850
5850
  const finalPrice = formatCurrency(countryCode, card?.finalPrice, currencySymbol);
5851
- const buyNowText = countryCode === 'KR' ? '이 강좌를 수강하세요.' : 'Buy Now';
5851
+ const buyNowText = countryCode === 'KR' ? '이 웨비나 신청하기' : 'Buy Now';
5852
5852
  const offText = countryCode === 'KR' ? '할인' : 'OFF';
5853
5853
  return /*#__PURE__*/React.createElement("div", {
5854
5854
  className: classes.singleCard
@@ -7348,7 +7348,7 @@ const SingleVideoSlide$1 = props => {
7348
7348
  } else {
7349
7349
  let given = moment(props.data.offerPriceEndDate);
7350
7350
  let current = moment().startOf('day');
7351
- return /*#__PURE__*/React.createElement("span", null, Math.floor(moment.duration(given.diff(current)).asDays()), ' ', countryCode === 'KR' ? '' : 'day(s)');
7351
+ return /*#__PURE__*/React.createElement("span", null, Math.floor(moment.duration(given.diff(current)).asDays()), ' ', countryCode === 'KR' ? '' : 'day(s)');
7352
7352
  }
7353
7353
  };
7354
7354
  const checkIfOfferIsValid = () => moment().diff(moment(props.data.offerPriceEndDate)) < 0;
@@ -7415,9 +7415,17 @@ const SingleVideoSlide$1 = props => {
7415
7415
  })));
7416
7416
  }
7417
7417
  };
7418
+ const handleReadMoreText = () => {
7419
+ if (countryCode === 'KR') {
7420
+ return '더 보기';
7421
+ } else {
7422
+ return 'Read More';
7423
+ }
7424
+ };
7418
7425
  const finalPrice = formatCurrency(countryCode, data?.price, currencySymbol);
7419
- const buyNowText = countryCode === 'KR' ? '이 강좌를 수강하세요.' : 'BUY NOW';
7420
- const registerNowText = countryCode === 'KR' ? '지금 신청하기' : 'REGISTER NOW';
7426
+ const buyNowText = countryCode === 'KR' ? '이 웨비나 신청하기' : 'BUY NOW';
7427
+ const registerNowText = countryCode === 'KR' ? '웨비나 신청하기' : 'REGISTER NOW';
7428
+ const momentLocale = countryCode === 'KR' ? 'KO' : 'IN';
7421
7429
  return /*#__PURE__*/React.createElement("div", {
7422
7430
  className: classes.videoCarouselContainer
7423
7431
  }, /*#__PURE__*/React.createElement("div", {
@@ -7449,7 +7457,7 @@ const SingleVideoSlide$1 = props => {
7449
7457
  }, /*#__PURE__*/React.createElement(Icon, {
7450
7458
  name: 'Calendar',
7451
7459
  color: theme.palette.primary.main
7452
- })), /*#__PURE__*/React.createElement("div", null, moment(data.startDate).format('Do MMM YY') + ' ', moment(data.startTime).format('h:mm A'), /*#__PURE__*/React.createElement("span", null, " - "), moment(data.endTime).format('h:mm A'))), /*#__PURE__*/React.createElement("div", {
7460
+ })), /*#__PURE__*/React.createElement("div", null, moment(data.startDate).locale(momentLocale).format('Do MMM YY') + ' ', moment(data.startTime).locale(momentLocale).format('h:mm A'), /*#__PURE__*/React.createElement("span", null, " - "), moment(data.endTime).locale(momentLocale).format('h:mm A'))), /*#__PURE__*/React.createElement("div", {
7453
7461
  className: classes.courseDetailTag
7454
7462
  }, /*#__PURE__*/React.createElement("span", {
7455
7463
  className: classes.iconBackground
@@ -7470,7 +7478,7 @@ const SingleVideoSlide$1 = props => {
7470
7478
  ref: data?.videoTextSubContent?.refSetter,
7471
7479
  className: classes.courseDetailViewFullDetails,
7472
7480
  dangerouslySetInnerHTML: {
7473
- __html: data.description.length > 250 && !isReadMore ? 'Read More' : null
7481
+ __html: data.description.length > 250 && !isReadMore ? handleReadMoreText() : null
7474
7482
  }
7475
7483
  }))), /*#__PURE__*/React.createElement("div", {
7476
7484
  className: classes.courseViewContainer
@@ -7877,7 +7885,7 @@ const SingleVideoSlide = props => {
7877
7885
  } else {
7878
7886
  let given = moment(props.data.endDate);
7879
7887
  let current = moment().startOf('day');
7880
- return /*#__PURE__*/React.createElement("span", null, Math.floor(moment.duration(given.diff(current)).asDays()), ' ', countryCode === 'KR' ? '' : 'day(s)');
7888
+ return /*#__PURE__*/React.createElement("span", null, Math.floor(moment.duration(given.diff(current)).asDays()), ' ', countryCode === 'KR' ? '' : 'day(s)');
7881
7889
  }
7882
7890
  };
7883
7891
  const {
@@ -7946,7 +7954,14 @@ const SingleVideoSlide = props => {
7946
7954
  };
7947
7955
  const effectivePrice = formatCurrency(countryCode, data?.effectivePrice, currencySymbol);
7948
7956
  const finalPrice = formatCurrency(countryCode, data?.price, currencySymbol);
7949
- const buyNowText = countryCode === 'KR' ? '이 강좌를 수강하세요.' : 'BUY NOW';
7957
+ const buyNowText = countryCode === 'KR' ? '이 웨비나 신청하기' : 'BUY NOW';
7958
+ const handleReadMoreText = () => {
7959
+ if (countryCode === 'KR') {
7960
+ return '더 보기';
7961
+ } else {
7962
+ return 'Read More';
7963
+ }
7964
+ };
7950
7965
  return /*#__PURE__*/React.createElement("div", {
7951
7966
  className: classes.videoCarouselContainer
7952
7967
  }, /*#__PURE__*/React.createElement("div", {
@@ -8019,7 +8034,7 @@ const SingleVideoSlide = props => {
8019
8034
  ref: data?.videoTextSubContent?.refSetter,
8020
8035
  className: classes.courseDetailViewFullDetails,
8021
8036
  dangerouslySetInnerHTML: {
8022
- __html: data.description.length > 250 && !isReadMore ? 'Read More' : null
8037
+ __html: data.description.length > 250 && !isReadMore ? handleReadMoreText() : null
8023
8038
  }
8024
8039
  }))), /*#__PURE__*/React.createElement("div", {
8025
8040
  style: {
@@ -8291,7 +8306,8 @@ const FormPage = ({
8291
8306
  const {
8292
8307
  _id,
8293
8308
  baseURLs,
8294
- isMobile
8309
+ isMobile,
8310
+ countryCode
8295
8311
  } = useContext(PageContext);
8296
8312
  const classes = useFormPageStyles({
8297
8313
  isMobile
@@ -8476,7 +8492,7 @@ const FormPage = ({
8476
8492
  data: {
8477
8493
  // link: 'headerData?.loginCtaLink',
8478
8494
  // isLink: 1,
8479
- value: 'SUBMIT'
8495
+ value: countryCode === 'KR' ? '제출하기' : 'SUBMIT'
8480
8496
  // isExternal: 1
8481
8497
  },
8482
8498