PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.0
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.0
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / assets / js / dist / blocks / course-lesson.min.js

course-lesson.min.js in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.0, at assets/js/dist/blocks/course-lesson.min.js

1 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (()=>{"use strict";const e=window.React,t=window.wp.i18n,n=window.wp.blockEditor,s=window.wp.components,l=(window.wp.element,l=>{const o=(0,n.useBlockProps)(),{attributes:r,setAttributes:a,context:i}=l,{lpCourseData:c}=i,u=c?.lesson||'<div class="course-count-lesson"><div class="course-count-item lp_lesson">5 Lessons</div></div>';return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.InspectorControls,null,(0,e.createElement)(s.PanelBody,{title:(0,t.__)("Settings","learnpress")},(0,e.createElement)(s.ToggleControl,{label:(0,t.__)("Show Label","learnpress"),checked:r.showLabel,onChange:e=>{a({showLabel:e})}}),(0,e.createElement)(s.ToggleControl,{label:(0,t.__)("Show Icon","learnpress"),checked:r.showIcon,onChange:e=>{a({showIcon:e})}}))),(0,e.createElement)("div",{...o},(0,e.createElement)("div",{className:"info-meta-item"},(0,e.createElement)("span",{className:"info-meta-left"},r.showIcon&&(0,e.createElement)("span",{dangerouslySetInnerHTML:{__html:'<i class="lp-icon-file-o"></i>'}}),r.showLabel?"Lesson:":""),(0,e.createElement)("span",{className:"info-meta-right",dangerouslySetInnerHTML:{__html:u}}))))}),o=e=>null,r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"learnpress/course-lesson","title":"Course Lesson Count","category":"learnpress-course-elements","description":"Show number lesson of course.","textdomain":"learnpress","keywords":["lesson","count","learnpress"],"icon":"media-text","ancestor":["learnpress/single-course","learnpress/course-item-template"],"usesContext":["lpCourseData"],"attributes":{"showIcon":{"type":"boolean","default":true},"showLabel":{"type":"boolean","default":true}},"supports":{"multiple":true,"align":["wide","full"],"html":false,"typography":{"fontSize":true,"lineHeight":false,"fontWeight":true,"__experimentalFontFamily":false,"__experimentalTextDecoration":false,"__experimentalFontStyle":false,"__experimentalFontWeight":true,"__experimentalLetterSpacing":false,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"background":false,"text":true,"link":false,"gradients":false,"__experimentalDefaultControls":{"text":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}}}'),a=window.wp.blocks,i=window.wp.data;let c=null;var u,p,m;u=["learnpress/learnpress//single-lp_course"],p=r,m=e=>{(0,a.registerBlockType)(e.name,{...e,edit:l,save:o})},(0,i.subscribe)(()=>{const e={...p},t=(0,i.select)("core/editor")||null;if(!t||"function"!=typeof t.getCurrentPostId||!t.getCurrentPostId())return;const n=t.getCurrentPostId();null!==n&&c!==n&&(c=n,(0,a.getBlockType)(e.name)&&((0,a.unregisterBlockType)(e.name),u.includes(n)?(e.ancestor=null,m(e)):(e.ancestor||(e.ancestor=[]),m(e))))}),(0,a.registerBlockType)(r.name,{...r,edit:l,save:o})})();