| @@ -1,4 +1,4 @@ | ||
| 1 | 1 | /******/ (() => { // webpackBootstrap |
| 2 | 2 | /******/ var __webpack_modules__ = ({ |
| 3 | 3 | |
| 4 | 4 | /***/ "./assets/src/apps/js/frontend/material.js" |
| @@ -125,12 +125,12 @@ | ||
| 125 | 125 | __webpack_require__.r(__webpack_exports__); |
| 126 | 126 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 127 | 127 | /* harmony export */ commentForm: () => (/* binding */ commentForm) |
| 128 | 128 | /* harmony export */ }); |
| 129 | -/** | |
| 130 | - * Toogle form Comment for Lesson. | |
| 131 | - * | |
| 132 | - * @author Nhamdv. | |
| 129 | +/** | |
| 130 | + * Toogle form Comment for Lesson. | |
| 131 | + * | |
| 132 | + * @author Nhamdv. | |
| 133 | 133 | */ |
| 134 | 134 | |
| 135 | 135 | const commentForm = () => { |
| 136 | 136 | const btn = document.querySelector('.lp-lesson-comment-btn'); |
| @@ -180,12 +180,12 @@ | ||
| 180 | 180 | !*** ./assets/src/apps/js/frontend/single-curriculum/components/compatible.js ***! |
| 181 | 181 | \********************************************************************************/ |
| 182 | 182 | () { |
| 183 | 183 | |
| 184 | -/** | |
| 185 | - * Compatible with Page Builder. | |
| 186 | - * | |
| 187 | - * @author nhamdv | |
| 184 | +/** | |
| 185 | + * Compatible with Page Builder. | |
| 186 | + * | |
| 187 | + * @author nhamdv | |
| 188 | 188 | */ |
| 189 | 189 | |
| 190 | 190 | LP.Hook.addAction('lp-compatible-builder', () => { |
| 191 | 191 | LP.Hook.removeAction('lp-compatible-builder'); |
| @@ -195,12 +195,12 @@ | ||
| 195 | 195 | window.dispatchEvent(new Event('resize')); |
| 196 | 196 | }); |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | - /*if ( typeof vc_js !== 'undefined' && typeof VcWaypoint !== 'undefined' ) { | |
| 200 | - [ ...document.querySelectorAll( '#popup-content' ) ][ 0 ].addEventListener( 'scroll', () => { | |
| 201 | - VcWaypoint.refreshAll(); | |
| 202 | - } ); | |
| 199 | + /*if ( typeof vc_js !== 'undefined' && typeof VcWaypoint !== 'undefined' ) { | |
| 200 | + [ ...document.querySelectorAll( '#popup-content' ) ][ 0 ].addEventListener( 'scroll', () => { | |
| 201 | + VcWaypoint.refreshAll(); | |
| 202 | + } ); | |
| 203 | 203 | }*/ |
| 204 | 204 | }); |
| 205 | 205 | LP.Hook.addAction('lp-quiz-compatible-builder', () => { |
| 206 | 206 | LP.Hook.removeAction('lp-quiz-compatible-builder'); |
| @@ -458,38 +458,35 @@ | ||
| 458 | 458 | } |
| 459 | 459 | // End editor by tungnx |
| 460 | 460 | |
| 461 | 461 | // Code for old curriculum |
| 462 | - /*const $curriculum = $( '#learn-press-course-curriculum' ); | |
| 463 | - $curriculum.find( '.section-desc' ).each( ( i, el ) => { | |
| 464 | - const a = $( '<span class="show-desc"></span>' ).on( 'click', () => { | |
| 465 | - b.toggleClass( 'c' ); | |
| 466 | - } ); | |
| 467 | - const b = $( el ).siblings( '.section-title' ).append( a ); | |
| 462 | + /*const $curriculum = $( '#learn-press-course-curriculum' ); | |
| 463 | + $curriculum.find( '.section-desc' ).each( ( i, el ) => { | |
| 464 | + const a = $( '<span class="show-desc"></span>' ).on( 'click', () => { | |
| 465 | + b.toggleClass( 'c' ); | |
| 466 | + } ); | |
| 467 | + const b = $( el ).siblings( '.section-title' ).append( a ); | |
| 468 | 468 | } );*/ |
| 469 | 469 | |
| 470 | 470 | // Code for old curriculum |
| 471 | - /*$( '.section' ).each( function() { | |
| 472 | - const $section = $( this ), | |
| 473 | - $toggle = $section.find( '.section-left' ); | |
| 474 | - | |
| 475 | - $toggle.on( 'click', function() { | |
| 476 | - const isClose = $section.toggleClass( 'closed' ).hasClass( 'closed' ); | |
| 477 | - const sections = LP.Cookies.get( 'closed-section-' + lpGlobalSettings.post_id ) || []; | |
| 478 | - const sectionId = parseInt( $section.data( 'section-id' ) ); | |
| 479 | - const at = sections.findIndex( ( id ) => { | |
| 480 | - return id == sectionId; | |
| 481 | - } ); | |
| 482 | - | |
| 483 | - if ( isClose ) { | |
| 484 | - sections.push( parseInt( $section.data( 'section-id' ) ) ); | |
| 485 | - } else { | |
| 486 | - sections.splice( at, 1 ); | |
| 487 | - } | |
| 488 | - | |
| 489 | - LP.Cookies.remove( 'closed-section-(.*)' ); | |
| 490 | - LP.Cookies.set( 'closed-section-' + lpGlobalSettings.post_id, [ ...new Set( sections ) ] ); | |
| 491 | - } ); | |
| 471 | + /*$( '.section' ).each( function() { | |
| 472 | + const $section = $( this ), | |
| 473 | + $toggle = $section.find( '.section-left' ); | |
| 474 | + $toggle.on( 'click', function() { | |
| 475 | + const isClose = $section.toggleClass( 'closed' ).hasClass( 'closed' ); | |
| 476 | + const sections = LP.Cookies.get( 'closed-section-' + lpGlobalSettings.post_id ) || []; | |
| 477 | + const sectionId = parseInt( $section.data( 'section-id' ) ); | |
| 478 | + const at = sections.findIndex( ( id ) => { | |
| 479 | + return id == sectionId; | |
| 480 | + } ); | |
| 481 | + if ( isClose ) { | |
| 482 | + sections.push( parseInt( $section.data( 'section-id' ) ) ); | |
| 483 | + } else { | |
| 484 | + sections.splice( at, 1 ); | |
| 485 | + } | |
| 486 | + LP.Cookies.remove( 'closed-section-(.*)' ); | |
| 487 | + LP.Cookies.set( 'closed-section-' + lpGlobalSettings.post_id, [ ...new Set( sections ) ] ); | |
| 488 | + } ); | |
| 492 | 489 | } );*/ |
| 493 | 490 | |
| 494 | 491 | document.addEventListener('click', e => { |
| 495 | 492 | if (e.target.id === 'sidebar-toggle') { |
| @@ -644,8 +641,9 @@ | ||
| 644 | 641 | __webpack_require__.r(__webpack_exports__); |
| 645 | 642 | /* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 646 | 643 | /* harmony export */ debounce: () => (/* binding */ debounce), |
| 647 | 644 | /* harmony export */ eventHandlers: () => (/* binding */ eventHandlers), |
| 645 | +/* harmony export */ fullScreenView: () => (/* binding */ fullScreenView), | |
| 648 | 646 | /* harmony export */ getDataOfForm: () => (/* binding */ getDataOfForm), |
| 649 | 647 | /* harmony export */ getFieldKeysOfForm: () => (/* binding */ getFieldKeysOfForm), |
| 650 | 648 | /* harmony export */ listenElementCreated: () => (/* binding */ listenElementCreated), |
| 651 | 649 | /* harmony export */ listenElementViewed: () => (/* binding */ listenElementViewed), |
| @@ -657,18 +655,19 @@ | ||
| 657 | 655 | /* harmony export */ lpOnElementReady: () => (/* binding */ lpOnElementReady), |
| 658 | 656 | /* harmony export */ lpSetLoadingEl: () => (/* binding */ lpSetLoadingEl), |
| 659 | 657 | /* harmony export */ lpShowHideEl: () => (/* binding */ lpShowHideEl), |
| 660 | 658 | /* harmony export */ mergeDataWithDatForm: () => (/* binding */ mergeDataWithDatForm), |
| 661 | -/* harmony export */ toggleCollapse: () => (/* binding */ toggleCollapse) | |
| 659 | +/* harmony export */ toggleCollapse: () => (/* binding */ toggleCollapse), | |
| 660 | +/* harmony export */ toggleEnable: () => (/* binding */ toggleEnable) | |
| 662 | 661 | /* harmony export */ }); |
| 663 | -/** | |
| 664 | - * Utils functions | |
| 665 | - * | |
| 666 | - * @param url | |
| 667 | - * @param data | |
| 668 | - * @param functions | |
| 669 | - * @since 4.2.5.1 | |
| 670 | - * @version 1.0.6 | |
| 662 | +/** | |
| 663 | + * Utils functions | |
| 664 | + * | |
| 665 | + * @param url | |
| 666 | + * @param data | |
| 667 | + * @param functions | |
| 668 | + * @since 4.2.5.1 | |
| 669 | + * @version 1.0.7 | |
| 671 | 670 | */ |
| 672 | 671 | const lpClassName = { |
| 673 | 672 | hidden: 'lp-hidden', |
| 674 | 673 | loading: 'loading', |
| @@ -673,9 +672,12 @@ | ||
| 673 | 672 | hidden: 'lp-hidden', |
| 674 | 673 | loading: 'loading', |
| 675 | 674 | elCollapse: 'lp-collapse', |
| 676 | 675 | elSectionToggle: '.lp-section-toggle', |
| 677 | - elTriggerToggle: '.lp-trigger-toggle' | |
| 676 | + elTriggerToggle: '.lp-trigger-toggle', | |
| 677 | + elBtnFullScreen: '.lp-btn-full-screen-view', | |
| 678 | + elFullScreen: 'lp-full-screen-view', | |
| 679 | + elBtnFullScreenClose: 'lp-full-screen-view__close' | |
| 678 | 680 | }; |
| 679 | 681 | const lpFetchAPI = (url, data = {}, functions = {}) => { |
| 680 | 682 | if ('function' === typeof functions.before) { |
| 681 | 683 | functions.before(); |
| @@ -697,12 +699,12 @@ | ||
| 697 | 699 | } |
| 698 | 700 | }); |
| 699 | 701 | }; |
| 700 | 702 | |
| 701 | -/** | |
| 702 | - * Get current URL without params. | |
| 703 | - * | |
| 704 | - * @since 4.2.5.1 | |
| 703 | +/** | |
| 704 | + * Get current URL without params. | |
| 705 | + * | |
| 706 | + * @since 4.2.5.1 | |
| 705 | 707 | */ |
| 706 | 708 | const lpGetCurrentURLNoParam = () => { |
| 707 | 709 | let currentUrl = window.location.href; |
| 708 | 710 | const hasParams = currentUrl.includes('?'); |
| @@ -718,14 +720,14 @@ | ||
| 718 | 720 | }); |
| 719 | 721 | return url; |
| 720 | 722 | }; |
| 721 | 723 | |
| 722 | -/** | |
| 723 | - * Listen element viewed. | |
| 724 | - * | |
| 725 | - * @param el | |
| 726 | - * @param callback | |
| 727 | - * @since 4.2.5.8 | |
| 724 | +/** | |
| 725 | + * Listen element viewed. | |
| 726 | + * | |
| 727 | + * @param el | |
| 728 | + * @param callback | |
| 729 | + * @since 4.2.5.8 | |
| 728 | 730 | */ |
| 729 | 731 | const listenElementViewed = (el, callback) => { |
| 730 | 732 | const observerSeeItem = new IntersectionObserver(function (entries) { |
| 731 | 733 | for (const entry of entries) { |
| @@ -736,13 +738,13 @@ | ||
| 736 | 738 | }); |
| 737 | 739 | observerSeeItem.observe(el); |
| 738 | 740 | }; |
| 739 | 741 | |
| 740 | -/** | |
| 741 | - * Listen element created. | |
| 742 | - * | |
| 743 | - * @param callback | |
| 744 | - * @since 4.2.5.8 | |
| 742 | +/** | |
| 743 | + * Listen element created. | |
| 744 | + * | |
| 745 | + * @param callback | |
| 746 | + * @since 4.2.5.8 | |
| 745 | 747 | */ |
| 746 | 748 | const listenElementCreated = callback => { |
| 747 | 749 | const observerCreateItem = new MutationObserver(function (mutations) { |
| 748 | 750 | mutations.forEach(function (mutation) { |
| @@ -761,14 +763,14 @@ | ||
| 761 | 763 | }); |
| 762 | 764 | // End. |
| 763 | 765 | }; |
| 764 | 766 | |
| 765 | -/** | |
| 766 | - * Listen element created. | |
| 767 | - * | |
| 768 | - * @param selector | |
| 769 | - * @param callback | |
| 770 | - * @since 4.2.7.1 | |
| 767 | +/** | |
| 768 | + * Listen element created. | |
| 769 | + * | |
| 770 | + * @param selector | |
| 771 | + * @param callback | |
| 772 | + * @since 4.2.7.1 | |
| 771 | 773 | */ |
| 772 | 774 | const lpOnElementReady = (selector, callback) => { |
| 773 | 775 | const element = document.querySelector(selector); |
| 774 | 776 | if (element) { |
| @@ -909,17 +911,17 @@ | ||
| 909 | 911 | }; |
| 910 | 912 | return dataHandle; |
| 911 | 913 | }; |
| 912 | 914 | |
| 913 | -/** | |
| 914 | - * Event trigger | |
| 915 | - * For each list of event handlers, listen event on document. | |
| 916 | - * | |
| 917 | - * eventName: 'click', 'change', ... | |
| 918 | - * eventHandlers = [ { selector: '.lp-button', callBack: function(){}, class: object } ] | |
| 919 | - * | |
| 920 | - * @param eventName | |
| 921 | - * @param eventHandlers | |
| 915 | +/** | |
| 916 | + * Event trigger | |
| 917 | + * For each list of event handlers, listen event on document. | |
| 918 | + * | |
| 919 | + * eventName: 'click', 'change', ... | |
| 920 | + * eventHandlers = [ { selector: '.lp-button', callBack: function(){}, class: object } ] | |
| 921 | + * | |
| 922 | + * @param eventName | |
| 923 | + * @param eventHandlers | |
| 922 | 924 | */ |
| 923 | 925 | const eventHandlers = (eventName, eventHandlers) => { |
| 924 | 926 | document.addEventListener(eventName, e => { |
| 925 | 927 | const target = e.target; |
| @@ -960,32 +962,32 @@ | ||
| 960 | 962 | }); |
| 961 | 963 | }); |
| 962 | 964 | }; |
| 963 | 965 | |
| 964 | -/** | |
| 965 | - * Debounce - delays function execution until after `wait` ms of inactivity. | |
| 966 | - * | |
| 967 | - * Each call resets the timer. Only the last call in a burst executes. | |
| 968 | - * | |
| 969 | - * USE CASES: | |
| 970 | - * - Search inputs, form validation, window resize | |
| 971 | - * - Multiple elements need independent timers | |
| 972 | - * - When you need to call with different arguments | |
| 973 | - * | |
| 974 | - * EXAMPLES: | |
| 975 | - * const debouncedSearch = debounce( (query) => fetchResults(query), 300 ); | |
| 976 | - * searchInput.addEventListener('input', (e) => debouncedSearch(e.target.value)); | |
| 977 | - * | |
| 978 | - * const debouncedResize = debounce( recalculateLayout, 250 ); | |
| 979 | - * window.addEventListener('resize', debouncedResize); | |
| 980 | - * | |
| 981 | - * ⚠️ Create ONCE outside event handlers, not inside. | |
| 982 | - * | |
| 983 | - * @param {Function} func - Function to debounce (can be anonymous) | |
| 984 | - * @param {number} wait - Milliseconds to wait (default: 500) | |
| 985 | - * @return {Function} Debounced wrapper function | |
| 986 | - * @since 4.3.7 | |
| 987 | - * @version 1.0.0 | |
| 966 | +/** | |
| 967 | + * Debounce - delays function execution until after `wait` ms of inactivity. | |
| 968 | + * | |
| 969 | + * Each call resets the timer. Only the last call in a burst executes. | |
| 970 | + * | |
| 971 | + * USE CASES: | |
| 972 | + * - Search inputs, form validation, window resize | |
| 973 | + * - Multiple elements need independent timers | |
| 974 | + * - When you need to call with different arguments | |
| 975 | + * | |
| 976 | + * EXAMPLES: | |
| 977 | + * const debouncedSearch = debounce( (query) => fetchResults(query), 300 ); | |
| 978 | + * searchInput.addEventListener('input', (e) => debouncedSearch(e.target.value)); | |
| 979 | + * | |
| 980 | + * const debouncedResize = debounce( recalculateLayout, 250 ); | |
| 981 | + * window.addEventListener('resize', debouncedResize); | |
| 982 | + * | |
| 983 | + * ⚠️ Create ONCE outside event handlers, not inside. | |
| 984 | + * | |
| 985 | + * @param {Function} func - Function to debounce (can be anonymous) | |
| 986 | + * @param {number} wait - Milliseconds to wait (default: 500) | |
| 987 | + * @return {Function} Debounced wrapper function | |
| 988 | + * @since 4.3.7 | |
| 989 | + * @version 1.0.0 | |
| 988 | 990 | */ |
| 989 | 991 | const debounce = (func, wait = 500) => { |
| 990 | 992 | let timer; |
| 991 | 993 | return args => { |
| @@ -993,8 +995,141 @@ | ||
| 993 | 995 | timer = setTimeout(() => func(args), wait); |
| 994 | 996 | }; |
| 995 | 997 | }; |
| 996 | 998 | |
| 999 | +/** | |
| 1000 | + * Initialize lp-toggle-enable components. | |
| 1001 | + * | |
| 1002 | + * Finds all `.lp-toggle-enable` elements and wires up toggle behavior. | |
| 1003 | + * Reads initial state from `data-enabled` attribute ("true"/"false"). | |
| 1004 | + * Calls `data-on-toggle` callback (if provided via options) on state change. | |
| 1005 | + * | |
| 1006 | + * HTML structure: | |
| 1007 | + * <label class="lp-toggle-enable" data-enabled="true"> | |
| 1008 | + * <input type="checkbox" class="lp-toggle-enable__input" /> | |
| 1009 | + * <span class="lp-toggle-enable__track"></span> | |
| 1010 | + * </label> | |
| 1011 | + * | |
| 1012 | + * @param {string} selector CSS selector for toggle elements (default: '.lp-toggle-enable') | |
| 1013 | + * @param {Function} onToggle Optional callback( el, isEnabled ) called on state change | |
| 1014 | + * @since 4.4.5 | |
| 1015 | + * @version 1.0.0 | |
| 1016 | + */ | |
| 1017 | +window.lpToggleEnableInit = 0; | |
| 1018 | +const toggleEnable = (onToggle = null) => { | |
| 1019 | + if (window.lpToggleEnableInit) { | |
| 1020 | + return; | |
| 1021 | + } | |
| 1022 | + window.lpToggleEnableInit = 1; | |
| 1023 | + const selector = '.lp-toggle-enable'; | |
| 1024 | + const updateUI = (toggle, isEnabled) => { | |
| 1025 | + toggle.classList.toggle('is-enabled', isEnabled); | |
| 1026 | + const input = toggle.querySelector('.lp-toggle-enable__input'); | |
| 1027 | + if (input) { | |
| 1028 | + input.checked = isEnabled; | |
| 1029 | + input.value = isEnabled ? '1' : '0'; | |
| 1030 | + } | |
| 1031 | + }; | |
| 1032 | + | |
| 1033 | + // Delegate click handling via eventHandlers. | |
| 1034 | + eventHandlers('click', [{ | |
| 1035 | + selector, | |
| 1036 | + callBack: args => { | |
| 1037 | + const { | |
| 1038 | + e, | |
| 1039 | + target | |
| 1040 | + } = args; | |
| 1041 | + const toggle = target.closest(selector); | |
| 1042 | + if (!toggle || toggle.classList.contains('is-disabled')) { | |
| 1043 | + return; | |
| 1044 | + } | |
| 1045 | + e.preventDefault(); | |
| 1046 | + const isEnabled = !toggle.classList.contains('is-enabled'); | |
| 1047 | + updateUI(toggle, isEnabled); | |
| 1048 | + if ('function' === typeof onToggle) { | |
| 1049 | + onToggle(toggle, isEnabled); | |
| 1050 | + } | |
| 1051 | + } | |
| 1052 | + }]); | |
| 1053 | +}; | |
| 1054 | + | |
| 1055 | +/** | |
| 1056 | + * Initialize custom fullscreen view buttons. | |
| 1057 | + * | |
| 1058 | + * Delegates clicks on `.lp-btn-full-screen-view` buttons to | |
| 1059 | + * `lpToggleFullscreenView`. Reads the `data-target` attribute to find the | |
| 1060 | + * target element. Falls back to the button's parent element when | |
| 1061 | + * `data-target` is not provided. | |
| 1062 | + * | |
| 1063 | + * @since 4.4.5 | |
| 1064 | + * @version 1.0.0 | |
| 1065 | + */ | |
| 1066 | +window.lpFullScreenViewInit = 0; | |
| 1067 | +const fullScreenView = () => { | |
| 1068 | + if (window.lpFullScreenViewInit) { | |
| 1069 | + return; | |
| 1070 | + } | |
| 1071 | + window.lpFullScreenViewInit = 1; | |
| 1072 | + let lastScrollY = 0; | |
| 1073 | + const lpToggleFullscreenView = (elTarget, elBtnFullScreen = null) => { | |
| 1074 | + const isFullscreen = elTarget.classList.contains(lpClassName.elFullScreen); | |
| 1075 | + if (isFullscreen) { | |
| 1076 | + elTarget.classList.remove(lpClassName.elFullScreen); | |
| 1077 | + document.documentElement.classList.remove('lp-full-screen-active'); | |
| 1078 | + window.scrollTo(0, lastScrollY); | |
| 1079 | + } else { | |
| 1080 | + lastScrollY = window.scrollY; | |
| 1081 | + elTarget.classList.add(lpClassName.elFullScreen); | |
| 1082 | + document.documentElement.classList.add('lp-full-screen-active'); | |
| 1083 | + } | |
| 1084 | + if (!isFullscreen) { | |
| 1085 | + if (!elTarget.querySelector(`.${lpClassName.elBtnFullScreenClose}`)) { | |
| 1086 | + const closeButton = document.createElement('button'); | |
| 1087 | + closeButton.type = 'button'; | |
| 1088 | + closeButton.className = lpClassName.elBtnFullScreenClose; | |
| 1089 | + closeButton.setAttribute('aria-label', 'Close'); | |
| 1090 | + closeButton.innerHTML = lpData.i18n.closeButtonFullScreen || 'Close ×'; | |
| 1091 | + closeButton.addEventListener('click', e => { | |
| 1092 | + e.preventDefault(); | |
| 1093 | + lpToggleFullscreenView(elTarget); | |
| 1094 | + }); | |
| 1095 | + elTarget.appendChild(closeButton); | |
| 1096 | + } | |
| 1097 | + } else { | |
| 1098 | + const closeButton = elTarget.querySelector(`.${lpClassName.elBtnFullScreenClose}`); | |
| 1099 | + if (closeButton) { | |
| 1100 | + closeButton.remove(); | |
| 1101 | + } | |
| 1102 | + } | |
| 1103 | + }; | |
| 1104 | + eventHandlers('click', [{ | |
| 1105 | + selector: lpClassName.elBtnFullScreen, | |
| 1106 | + callBack: args => { | |
| 1107 | + const { | |
| 1108 | + e, | |
| 1109 | + target | |
| 1110 | + } = args; | |
| 1111 | + const elBtnFullScreen = target.closest(lpClassName.elBtnFullScreen); | |
| 1112 | + if (!elBtnFullScreen) { | |
| 1113 | + console.log('No full screen button found'); | |
| 1114 | + return; | |
| 1115 | + } | |
| 1116 | + e.preventDefault(); | |
| 1117 | + let elTarget = null; | |
| 1118 | + const targetSelector = elBtnFullScreen.dataset.targetFullscreen; | |
| 1119 | + console.log(targetSelector); | |
| 1120 | + if (targetSelector) { | |
| 1121 | + elTarget = document.querySelector(targetSelector); | |
| 1122 | + } | |
| 1123 | + if (!elTarget) { | |
| 1124 | + console.log('No target element found'); | |
| 1125 | + return; | |
| 1126 | + } | |
| 1127 | + lpToggleFullscreenView(elTarget, elBtnFullScreen); | |
| 1128 | + } | |
| 1129 | + }]); | |
| 1130 | +}; | |
| 1131 | + | |
| 997 | 1132 | /***/ }, |
| 998 | 1133 | |
| 999 | 1134 | /***/ "react" |
| 1000 | 1135 | /*!************************!*\ |
| @@ -1031,19 +1166,19 @@ | ||
| 1031 | 1166 | |
| 1032 | 1167 | /******/ }); |
| 1033 | 1168 | /************************************************************************/ |
| 1034 | 1169 | /******/ // The module cache |
| 1035 | -/******/ var __webpack_module_cache__ = {}; | |
| 1170 | +/******/ const __webpack_module_cache__ = {}; | |
| 1036 | 1171 | /******/ |
| 1037 | 1172 | /******/ // The require function |
| 1038 | 1173 | /******/ function __webpack_require__(moduleId) { |
| 1039 | 1174 | /******/ // Check if module is in cache |
| 1040 | -/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 1175 | +/******/ const cachedModule = __webpack_module_cache__[moduleId]; | |
| 1041 | 1176 | /******/ if (cachedModule !== undefined) { |
| 1042 | 1177 | /******/ return cachedModule.exports; |
| 1043 | 1178 | /******/ } |
| 1044 | 1179 | /******/ // Create a new module (and put it into the cache) |
| 1045 | -/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 1180 | +/******/ const module = __webpack_module_cache__[moduleId] = { | |
| 1046 | 1181 | /******/ // no module.id needed |
| 1047 | 1182 | /******/ // no module.loaded needed |
| 1048 | 1183 | /******/ exports: {} |
| 1049 | 1184 | /******/ }; |
| @@ -1050,9 +1185,9 @@ | ||
| 1050 | 1185 | /******/ |
| 1051 | 1186 | /******/ // Execute the module function |
| 1052 | 1187 | /******/ if (!(moduleId in __webpack_modules__)) { |
| 1053 | 1188 | /******/ delete __webpack_module_cache__[moduleId]; |
| 1054 | -/******/ var e = new Error("Cannot find module '" + moduleId + "'"); | |
| 1189 | +/******/ const e = new Error("Cannot find module '" + moduleId + "'"); | |
| 1055 | 1190 | /******/ e.code = 'MODULE_NOT_FOUND'; |
| 1056 | 1191 | /******/ throw e; |
| 1057 | 1192 | /******/ } |
| 1058 | 1193 | /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| @@ -1065,9 +1200,9 @@ | ||
| 1065 | 1200 | /******/ /* webpack/runtime/compat get default export */ |
| 1066 | 1201 | /******/ (() => { |
| 1067 | 1202 | /******/ // getDefaultExport function for compatibility with non-harmony modules |
| 1068 | 1203 | /******/ __webpack_require__.n = (module) => { |
| 1069 | -/******/ var getter = module && module.__esModule ? | |
| 1204 | +/******/ const getter = module && module.__esModule ? | |
| 1070 | 1205 | /******/ () => (module['default']) : |
| 1071 | 1206 | /******/ () => (module); |
| 1072 | 1207 | /******/ __webpack_require__.d(getter, { a: getter }); |
| 1073 | 1208 | /******/ return getter; |
| @@ -1075,14 +1210,29 @@ | ||
| 1075 | 1210 | /******/ })(); |
| 1076 | 1211 | /******/ |
| 1077 | 1212 | /******/ /* webpack/runtime/define property getters */ |
| 1078 | 1213 | /******/ (() => { |
| 1079 | -/******/ // define getter functions for harmony exports | |
| 1214 | +/******/ // define getter/value functions for harmony exports | |
| 1080 | 1215 | /******/ __webpack_require__.d = (exports, definition) => { |
| 1081 | -/******/ for(var key in definition) { | |
| 1082 | -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 1083 | -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 1216 | +/******/ if(Array.isArray(definition)) { | |
| 1217 | +/******/ var i = 0; | |
| 1218 | +/******/ while(i < definition.length) { | |
| 1219 | +/******/ var key = definition[i++]; | |
| 1220 | +/******/ var binding = definition[i++]; | |
| 1221 | +/******/ if(!__webpack_require__.o(exports, key)) { | |
| 1222 | +/******/ if(binding === 0) { | |
| 1223 | +/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] }); | |
| 1224 | +/******/ } else { | |
| 1225 | +/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding }); | |
| 1226 | +/******/ } | |
| 1227 | +/******/ } else if(binding === 0) { i++; } | |
| 1084 | 1228 | /******/ } |
| 1229 | +/******/ } else { | |
| 1230 | +/******/ for(var key in definition) { | |
| 1231 | +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 1232 | +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 1233 | +/******/ } | |
| 1234 | +/******/ } | |
| 1085 | 1235 | /******/ } |
| 1086 | 1236 | /******/ }; |
| 1087 | 1237 | /******/ })(); |
| 1088 | 1238 | /******/ |
| @@ -1087,9 +1237,9 @@ | ||
| 1087 | 1237 | /******/ })(); |
| 1088 | 1238 | /******/ |
| 1089 | 1239 | /******/ /* webpack/runtime/hasOwnProperty shorthand */ |
| 1090 | 1240 | /******/ (() => { |
| 1091 | -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | |
| 1241 | +/******/ __webpack_require__.o = (obj, prop) => (Object.hasOwn(obj, prop)) | |
| 1092 | 1242 | /******/ })(); |
| 1093 | 1243 | /******/ |
| 1094 | 1244 | /******/ /* webpack/runtime/make namespace object */ |
| 1095 | 1245 | /******/ (() => { |
| @@ -1094,9 +1244,9 @@ | ||
| 1094 | 1244 | /******/ /* webpack/runtime/make namespace object */ |
| 1095 | 1245 | /******/ (() => { |
| 1096 | 1246 | /******/ // define __esModule on exports |
| 1097 | 1247 | /******/ __webpack_require__.r = (exports) => { |
| 1098 | -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 1248 | +/******/ if(Symbol.toStringTag) { | |
| 1099 | 1249 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| 1100 | 1250 | /******/ } |
| 1101 | 1251 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 1102 | 1252 | /******/ }; |
| @@ -1102,9 +1252,9 @@ | ||
| 1102 | 1252 | /******/ }; |
| 1103 | 1253 | /******/ })(); |
| 1104 | 1254 | /******/ |
| 1105 | 1255 | /************************************************************************/ |
| 1106 | -var __webpack_exports__ = {}; | |
| 1256 | +let __webpack_exports__ = {}; | |
| 1107 | 1257 | // This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |
| 1108 | 1258 | (() => { |
| 1109 | 1259 | "use strict"; |
| 1110 | 1260 | /*!**********************************************************!*\ |
| @@ -1123,13 +1273,13 @@ | ||
| 1123 | 1273 | |
| 1124 | 1274 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_single_curriculum_index__WEBPACK_IMPORTED_MODULE_0__["default"]); |
| 1125 | 1275 | |
| 1126 | 1276 | // Comment code use for old curriculum |
| 1127 | -/*export const init = () => { | |
| 1128 | - wp.element.render( | |
| 1129 | - <SingleCurriculums />, | |
| 1130 | - document.getElementById( 'learn-press-course-curriculum' ) | |
| 1131 | - ); | |
| 1277 | +/*export const init = () => { | |
| 1278 | + wp.element.render( | |
| 1279 | + <SingleCurriculums />, | |
| 1280 | + document.getElementById( 'learn-press-course-curriculum' ) | |
| 1281 | + ); | |
| 1132 | 1282 | };*/ |
| 1133 | 1283 | |
| 1134 | 1284 | document.addEventListener('DOMContentLoaded', function (event) { |
| 1135 | 1285 | //LP.Hook.doAction( 'course-ready' ); |
| @@ -1139,14 +1289,14 @@ | ||
| 1139 | 1289 | //init(); |
| 1140 | 1290 | }); |
| 1141 | 1291 | |
| 1142 | 1292 | // Comment code use for old curriculum |
| 1143 | -/*const detectedElCurriculum = setInterval( function() { | |
| 1144 | - const elementCurriculum = document.querySelector( '.learnpress-course-curriculum' ); | |
| 1145 | - if ( elementCurriculum ) { | |
| 1146 | - courseCurriculumSkeleton(); | |
| 1147 | - clearInterval( detectedElCurriculum ); | |
| 1148 | - } | |
| 1293 | +/*const detectedElCurriculum = setInterval( function() { | |
| 1294 | + const elementCurriculum = document.querySelector( '.learnpress-course-curriculum' ); | |
| 1295 | + if ( elementCurriculum ) { | |
| 1296 | + courseCurriculumSkeleton(); | |
| 1297 | + clearInterval( detectedElCurriculum ); | |
| 1298 | + } | |
| 1149 | 1299 | }, 1 );*/ |
| 1150 | 1300 | })(); |
| 1151 | 1301 | |
| 1152 | 1302 | /******/ })() |