index.js 30.9 KB
!function(){"use strict";var e=window.wp.element;const{__:__}=wp.i18n,{assign:t}=lodash,{addFilter:n}=wp.hooks,{PanelBody:o,TextControl:r}=wp.components,{Fragment:a}=wp.element,{createHigherOrderComponent:l}=wp.compose,{InspectorControls:s}=wp.editor;n("editor.BlockEdit","uncanny-toolkit-pro/course-expiry",l((t=>n=>"uncanny-toolkit-pro/course-expiry"==n.name&&n.isSelected?(0,e.createElement)(a,null,(0,e.createElement)(t,n),(0,e.createElement)(s,null,(0,e.createElement)(o,{title:__("Course Expiry Settings","uncanny-pro-toolkit")},(0,e.createElement)(r,{label:__("Course ID","uncanny-pro-toolkit"),value:n.attributes.courseId,type:"number",onChange:e=>{n.setAttributes({courseId:e})}})))):(0,e.createElement)(t,n)),"addTookitCourseExpirySettings"));const i=e=>{let t=!1;return u(window.ultpGutenbergModules)&&(t=ultpGutenbergModules.includes(e)),t},u=e=>null!=e,c=((0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M21.9,0c0,0.2,0,0.4,0.1,0.6c0,0.4,0,0.9,0,1.3c0,0.5,0,1-0.1,1.4c-0.1,1.1-0.3,2.2-0.7,3.3c-0.3,0.9-0.7,1.8-1.3,2.5  c-0.5,0.7-1.1,1.4-1.8,1.9c-0.7,0.5-1.5,1-2.4,1.3c-1.1,0.4-2.2,0.5-3.3,0.6c3,1.1,4.5,4.3,3.4,7.3c-0.8,2.2-2.9,3.7-5.2,3.8h-0.3   C10,24,9.5,23.9,9,23.8c-1.2-0.3-2.3-1.1-3.1-2.1c-1.2-1.7-1.4-3.9-0.5-5.8c-1,1.1-1.9,2.3-2.5,3.7c-0.4,0.8-0.7,1.7-0.9,2.6    c-0.1-0.6,0-1.2,0-1.8c0.1-1.1,0.2-2.2,0.5-3.3c0.2-0.9,0.6-1.8,1-2.6c0.5-0.8,1-1.5,1.7-2.2c0.7-0.7,1.6-1.2,2.5-1.5   c1-0.4,2.1-0.6,3.2-0.7c0.6,0,1.1,0,1.7-0.1c1-0.1,2-0.4,3-0.8c0.9-0.4,1.7-0.9,2.4-1.6c0.7-0.6,1.3-1.3,1.8-2.1    c0.5-0.9,1-1.8,1.3-2.7C21.5,1.9,21.8,0.9,21.9,0z M10.2,13.8c-0.8,0.1-1.5,0.4-2.1,0.9c-0.7,0.6-1.2,1.4-1.5,2.2   c-0.3,1-0.3,2.1,0.1,3.1c0.3,0.8,0.8,1.6,1.5,2.1c0.6,0.4,1.3,0.7,2,0.8c0.7,0.1,1.5-0.1,2.1-0.4c0.6-0.3,1.1-0.7,1.5-1.2   c0.4-0.6,0.8-1.2,0.9-1.9c0.2-0.9,0.1-1.9-0.2-2.8c-0.3-0.8-0.9-1.6-1.7-2.1C12,14,11.1,13.8,10.2,13.8z"}),(0,e.createElement)("path",{d:"M10,15.5c0.3-0.1,0.5-0.1,0.8-0.1c-0.5,0.5-0.5,1.2-0.1,1.8c0.5,0.6,1.3,0.6,1.9,0.2c0.2-0.2,0.4-0.4,0.4-0.7  c0.5,0.7,0.7,1.7,0.5,2.5c-0.2,0.8-0.8,1.5-1.5,1.8c-1.4,0.8-3.2,0.2-4-1.2c0-0.1-0.1-0.2-0.1-0.3c-0.3-0.8-0.3-1.8,0.2-2.6 C8.5,16.2,9.2,15.6,10,15.5z"})),(0,e.createElement)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 19.98 24"},(0,e.createElement)("path",{fill:"#2b2b2b",d:"M21.9,0c0,.21,0,.42.05.63,0,.44.05.87,0,1.3s0,1-.09,1.45a14.91,14.91,0,0,1-.69,3.3A10.38,10.38,0,0,1,20,9.22a8.34,8.34,0,0,1-1.83,1.92,8.89,8.89,0,0,1-2.4,1.26,11.69,11.69,0,0,1-3.27.57,5.68,5.68,0,0,1-1.78,11h-.26A5.9,5.9,0,0,1,9,23.8a5.68,5.68,0,0,1-3.62-7.93,12.6,12.6,0,0,0-2.49,3.67,13.65,13.65,0,0,0-.87,2.57,13.52,13.52,0,0,1,0-1.8A14.81,14.81,0,0,1,2.54,17a11.15,11.15,0,0,1,1-2.56,8.72,8.72,0,0,1,1.71-2.15,8.42,8.42,0,0,1,2.48-1.55A11.13,11.13,0,0,1,11,10c.56,0,1.12,0,1.68-.1a9.89,9.89,0,0,0,3-.76,9,9,0,0,0,2.42-1.57,10.43,10.43,0,0,0,1.79-2.13A13.71,13.71,0,0,0,21.2,2.74,14.31,14.31,0,0,0,21.9,0ZM10.17,13.83A4.2,4.2,0,0,0,8,14.69a4.52,4.52,0,0,0-1.52,2.22A4.82,4.82,0,0,0,6.59,20a4.49,4.49,0,0,0,1.54,2.08,4,4,0,0,0,4.18.39,4.39,4.39,0,0,0,1.45-1.19,4.57,4.57,0,0,0,.91-1.91,4.82,4.82,0,0,0-.25-2.81,4.46,4.46,0,0,0-1.69-2.07A4.06,4.06,0,0,0,10.17,13.83Z",transform:"translate(-2.01)"}),(0,e.createElement)("path",{fill:"#f9ba0f",d:"M10.17,13.83a4.06,4.06,0,0,1,2.56.64,4.46,4.46,0,0,1,1.69,2.07,4.82,4.82,0,0,1,.25,2.81,4.57,4.57,0,0,1-.91,1.91,4.39,4.39,0,0,1-1.45,1.19,4,4,0,0,1-4.18-.39A4.56,4.56,0,0,1,6.59,20a4.82,4.82,0,0,1-.07-3.07A4.52,4.52,0,0,1,8,14.69,4.13,4.13,0,0,1,10.17,13.83Zm.61,1.58h0A3,3,0,0,0,8,16.88a2.94,2.94,0,0,0,3.7,4.18,1.51,1.51,0,0,0,.26-.12,2.93,2.93,0,0,0,1-4.32h0a1.29,1.29,0,0,0-.32-1.16,1.33,1.33,0,0,0-1.88-.07Z",transform:"translate(-2.01)"}),(0,e.createElement)("path",{fill:"#fef4d8",d:"M10.78,15.41a1.33,1.33,0,0,1,1.88,0l0,0A1.29,1.29,0,0,1,13,16.61a3.42,3.42,0,0,0-.7-.67A2.91,2.91,0,0,0,10.78,15.41Z",transform:"translate(-2.01)"}),(0,e.createElement)("path",{fill:"#000000",d:"M10,15.47a2.68,2.68,0,0,1,.8-.06,1.3,1.3,0,0,0-.08,1.76,1.32,1.32,0,0,0,1.86.17,1.27,1.27,0,0,0,.44-.72,2.92,2.92,0,0,1-1,4.32,3,3,0,0,1-4-1.23l-.12-.26A2.94,2.94,0,0,1,8,16.88,3,3,0,0,1,10,15.47Z",transform:"translate(-2.01)"}),(0,e.createElement)("path",{fill:"#d6d6d6",d:"M10.78,15.41h0a3,3,0,0,1,1.53.54,3.42,3.42,0,0,1,.7.67h0a1.32,1.32,0,1,1-2.58-.56A1.35,1.35,0,0,1,10.78,15.41Z",transform:"translate(-2.01)"}))),p=t=>{let{children:n}=t;return(0,e.createElement)("div",{className:"uo-ult-toolkit-content"},n)},{__:d}=wp.i18n,{registerBlockType:y}=wp.blocks;i("CourseAccessExpiry")&&y("uncanny-toolkit-pro/course-expiry",{title:d("Days Until Course Expiry","uncanny-pro-toolkit"),description:d("Displays the number of days until the learner's access expires.","uncanny-pro-toolkit"),icon:c,category:"uncanny-learndash-toolkit",keywords:[d("Uncanny Owl","uncanny-pro-toolkit")],supports:{html:!1},attributes:{preText:{type:"string",default:d("Course Access Expires in","uncanny-pro-toolkit")},courseId:{type:"string",default:null}},edit(t){let{className:n,attributes:o,setAttributes:r}=t;return(0,e.createElement)("div",{className:n},(0,e.createElement)(p,null,d("Days Until Course Expiry","uncanny-pro-toolkit")))},save(e){let{className:t,attributes:n}=e;return null}});const{__:g}=wp.i18n,{assign:m}=lodash,{addFilter:b}=wp.hooks,{PanelBody:h,TextControl:k}=wp.components,{Fragment:C}=wp.element,{createHigherOrderComponent:E}=wp.compose,{InspectorControls:w}=wp.editor;b("editor.BlockEdit","uncanny-toolkit-pro/uo-time",E((t=>n=>"uncanny-toolkit-pro/uo-time"==n.name&&n.isSelected?(0,e.createElement)(C,null,(0,e.createElement)(t,n),(0,e.createElement)(w,null,(0,e.createElement)(h,{title:g("Course Time Settings","uncanny-pro-toolkit")},(0,e.createElement)(k,{label:g("User ID","uncanny-pro-toolkit"),value:n.attributes.userId,type:"string",onChange:e=>{n.setAttributes({userId:e})}}),(0,e.createElement)(k,{label:g("Course ID","uncanny-pro-toolkit"),value:n.attributes.courseId,type:"string",onChange:e=>{n.setAttributes({courseId:e})}})))):(0,e.createElement)(t,n)),"addToolkitUoTimeSettings"));const{__:v}=wp.i18n,{registerBlockType:f}=wp.blocks;i("CourseTimer")&&f("uncanny-toolkit-pro/uo-time",{title:v("Course Cumulative Time","uncanny-pro-toolkit"),description:v("Displays total time spent inside a LearnDash course, including time spent after completing the course. Optionally, enter a specific user ID and/or course ID.","uncanny-pro-toolkit"),icon:c,category:"uncanny-learndash-toolkit",keywords:[v("Uncanny Owl","uncanny-pro-toolkit")],supports:{html:!1},attributes:{userId:{type:"string",default:""},courseId:{type:"string",default:""}},edit(t){let{className:n,attributes:o,setAttributes:r}=t;return(0,e.createElement)("div",{className:n},(0,e.createElement)(p,null,v("Course Cumulative Time","uncanny-pro-toolkit")))},save(e){let{className:t,attributes:n}=e;return null}});const{__:A}=wp.i18n,{assign:T}=lodash,{addFilter:x}=wp.hooks,{PanelBody:I,TextControl:D}=wp.components,{Fragment:_}=wp.element,{createHigherOrderComponent:S}=wp.compose,{InspectorControls:B}=wp.editor;x("editor.BlockEdit","uncanny-toolkit-pro/uo-time-completed",S((t=>n=>"uncanny-toolkit-pro/uo-time-completed"==n.name&&n.isSelected?(0,e.createElement)(_,null,(0,e.createElement)(t,n),(0,e.createElement)(B,null,(0,e.createElement)(I,{title:A("Course Time Settings","uncanny-pro-toolkit")},(0,e.createElement)(D,{label:A("User ID","uncanny-pro-toolkit"),value:n.attributes.userId,type:"string",onChange:e=>{n.setAttributes({userId:e})}}),(0,e.createElement)(D,{label:A("Course ID","uncanny-pro-toolkit"),value:n.attributes.courseId,type:"string",onChange:e=>{n.setAttributes({courseId:e})}})))):(0,e.createElement)(t,n)),"addToolkitUoTimeCompletedSettings"));const{__:N}=wp.i18n,{registerBlockType:L}=wp.blocks;i("CourseTimer")&&L("uncanny-toolkit-pro/uo-time-completed",{title:N("Course Time at Completion","uncanny-pro-toolkit"),description:N("Displays total time spent inside a LearnDash course, not including time spent after completing the course. Optionally, enter a specific user ID and/or course ID.","uncanny-pro-toolkit"),icon:c,category:"uncanny-learndash-toolkit",keywords:[N("Uncanny Owl","uncanny-pro-toolkit")],supports:{html:!1},attributes:{userId:{type:"string",default:""},courseId:{type:"string",default:""}},edit(t){let{className:n,attributes:o,setAttributes:r}=t;return(0,e.createElement)("div",{className:n},(0,e.createElement)(p,null,N("Course Time at Completion","uncanny-pro-toolkit")))},save(e){let{className:t,attributes:n}=e;return null}});const{__:O}=wp.i18n,{assign:M}=lodash,{addFilter:G}=wp.hooks,{PanelBody:F,TextControl:H,ToggleControl:U,SelectControl:P}=wp.components,{Fragment:z}=wp.element,{createHigherOrderComponent:V}=wp.compose,{InspectorControls:R}=wp.editor;G("editor.BlockEdit","uncanny-toolkit-pro/course-grid",V((t=>n=>"uncanny-toolkit-pro/course-grid"==n.name&&n.isSelected?(0,e.createElement)(z,null,(0,e.createElement)(t,n),(0,e.createElement)(R,null,(0,e.createElement)(F,{title:O("Grid Content")},(0,e.createElement)(H,{label:O("Category"),value:n.attributes.category,type:"text",onChange:e=>{n.setAttributes({category:e})}}),(0,e.createElement)(H,{label:O("LearnDash Category"),value:n.attributes.ldCategory,type:"text",onChange:e=>{n.setAttributes({ldCategory:e})}}),(0,e.createElement)(H,{label:O("Tag"),value:n.attributes.tag,type:"text",onChange:e=>{n.setAttributes({tag:e})}}),(0,e.createElement)(H,{label:O("Course Tag"),value:n.attributes.course_tag,type:"text",onChange:e=>{n.setAttributes({course_tag:e})}}),(0,e.createElement)(H,{label:O("Enrolled Only"),value:n.attributes.enrolledOnly,type:"text",onChange:e=>{n.setAttributes({enrolledOnly:e})}}),(0,e.createElement)(H,{label:O("Not Enrolled Only"),value:n.attributes.notEnrolled,type:"text",onChange:e=>{n.setAttributes({notEnrolled:e})}}),(0,e.createElement)(H,{label:O("Limit"),value:n.attributes.limit,type:"text",onChange:e=>{n.setAttributes({limit:e})}})),(0,e.createElement)(F,{title:O("Grid Style")},(0,e.createElement)(H,{label:O("Columns"),value:n.attributes.cols,type:"text",onChange:e=>{n.setAttributes({cols:e})}}),(0,e.createElement)(H,{label:O("Hide View More"),value:n.attributes.hideViewMore,type:"text",onChange:e=>{n.setAttributes({hideViewMore:e})}}),(0,e.createElement)(H,{label:O("Hide Credits"),value:n.attributes.hideCredits,type:"text",onChange:e=>{n.setAttributes({hideCredits:e})}}),(0,e.createElement)(U,{label:"Hide title",help:n.attributes.hideTitle?"Title hidden.":"Title visible.",checked:n.attributes.hideTitle,onChange:e=>{n.setAttributes({hideTitle:e})}}),(0,e.createElement)(H,{label:O("Hide Description"),value:n.attributes.hideDescription,type:"text",onChange:e=>{n.setAttributes({hideDescription:e})}}),(0,e.createElement)(H,{label:O("Hide Progress"),value:n.attributes.hideProgress,type:"text",onChange:e=>{n.setAttributes({hideProgress:e})}}),(0,e.createElement)(H,{label:O("More"),value:n.attributes.more,type:"text",onChange:e=>{n.setAttributes({more:e})}}),(0,e.createElement)(H,{label:O("Show Images"),value:n.attributes.showImage,type:"text",onChange:e=>{n.setAttributes({showImage:e})}}),(0,e.createElement)(H,{label:O("Price"),value:n.attributes.price,type:"text",onChange:e=>{n.setAttributes({price:e})}}),(0,e.createElement)(H,{label:O("Currency"),value:n.attributes.currency,type:"text",onChange:e=>{n.setAttributes({currency:e})}}),(0,e.createElement)(H,{label:O("Link To Course"),value:n.attributes.linkToCourse,type:"text",onChange:e=>{n.setAttributes({linkToCourse:e})}}),(0,e.createElement)(H,{label:O("Order By"),value:n.attributes.orderby,type:"text",onChange:e=>{n.setAttributes({orderby:e})}}),(0,e.createElement)(H,{label:O("Order"),value:n.attributes.order,type:"text",onChange:e=>{n.setAttributes({order:e})}}),(0,e.createElement)(H,{label:O("Default Sorting"),value:n.attributes.defaultSorting,type:"text",onChange:e=>{n.setAttributes({defaultSorting:e})}}),(0,e.createElement)(H,{label:O("Ignore Default Sorting"),value:n.attributes.ignoreDefaultSorting,type:"text",onChange:e=>{n.setAttributes({ignoreDefaultSorting:e})}}),(0,e.createElement)(H,{label:O("Border Hover"),value:n.attributes.borderHover,type:"text",onChange:e=>{n.setAttributes({borderHover:e})}}),(0,e.createElement)(H,{label:O("View More Color"),value:n.attributes.viewMoreColor,type:"text",onChange:e=>{n.setAttributes({viewMoreColor:e})}}),(0,e.createElement)(H,{label:O("View More Hover"),value:n.attributes.viewMoreHover,type:"text",onChange:e=>{n.setAttributes({viewMoreHover:e})}}),(0,e.createElement)(H,{label:O("View More Text Color"),value:n.attributes.viewMoreTextColor,type:"text",onChange:e=>{n.setAttributes({viewMoreTextColor:e})}}),(0,e.createElement)(H,{label:O("View More Text"),value:n.attributes.viewMoreText,type:"text",onChange:e=>{n.setAttributes({viewMoreText:e})}}),(0,e.createElement)(H,{label:O("View Less Text"),value:n.attributes.viewLessText,type:"text",onChange:e=>{n.setAttributes({viewLessText:e})}}),(0,e.createElement)(H,{label:O("Category Selector"),value:n.attributes.categoryselector,type:"text",onChange:e=>{n.setAttributes({categoryselector:e})}}),(0,e.createElement)(H,{label:O("Course Category Selector"),value:n.attributes.courseCategoryselector,type:"text",onChange:e=>{n.setAttributes({courseCategoryselector:e})}}),(0,e.createElement)(H,{label:O("Start Course Button"),value:n.attributes.startCourseButton,type:"text",onChange:e=>{n.setAttributes({startCourseButton:e})}}),(0,e.createElement)(H,{label:O("Resume Course Button"),value:n.attributes.resumeCourseButton,type:"text",onChange:e=>{n.setAttributes({resumeCourseButton:e})}})))):(0,e.createElement)(t,n)),"addToolkitCourseGridSettings"));const{__:Z}=wp.i18n,{registerBlockType:W}=wp.blocks;i("ShowAllCourses")&&W("uncanny-toolkit-pro/course-grid",{title:Z("Enhanced Course Grid","uncanny-pro-toolkit"),description:Z("Displays a highly customizable grid of LearnDash courses.","uncanny-pro-toolkit"),icon:c,category:"uncanny-learndash-toolkit",keywords:[Z("Uncanny Owl","uncanny-pro-toolkit")],supports:{html:!1},attributes:{category:{type:"string",default:"all"},ldCategory:{type:"string",default:"all"},tag:{type:"string",default:"all"},course_tag:{type:"string",default:"all"},enrolledOnly:{type:"string",default:"no"},notEnrolled:{type:"string",default:"no"},limit:{type:"string",default:"4"},cols:{type:"string",default:"4"},hideViewMore:{type:"string",default:"no"},hideCredits:{type:"string",default:"no"},hideTitle:{type:"boolean",default:!1},hideDescription:{type:"string",default:"no"},hideProgress:{type:"string",default:"no"},more:{type:"string",default:""},showImage:{type:"string",default:"yes"},price:{type:"string",default:"yes"},currency:{type:"string",default:"$"},linkToCourse:{type:"string",default:"yes"},orderby:{type:"string",default:"title"},order:{type:"string",default:"ASC"},defaultSorting:{type:"string",default:"course-progress,enrolled,not-enrolled,coming-soon,completed"},ignoreDefaultSorting:{type:"string",default:"no"},borderHover:{type:"string",default:""},viewMoreColor:{type:"string",default:""},viewMoreHover:{type:"string",default:""},viewMoreTextColor:{type:"string",default:""},viewMoreText:{type:"string",default:'View More <i class="fa fa fa-arrow-circle-right"></i>'},viewLessText:{type:"string",default:'View Less <i class="fa fa fa-arrow-circle-right"></i>'},categoryselector:{type:"string",default:"hide"},courseCategoryselector:{type:"string",default:"hide"},resumeCourseButton:{type:"string",default:"hide"},startCourseButton:{type:"string",default:"hide"}},edit(t){let{className:n,attributes:o,setAttributes:r}=t;return(0,e.createElement)("div",{className:n},(0,e.createElement)(p,null,Z("Enhanced Course Grid","uncanny-pro-toolkit")))},save(e){let{className:t,attributes:n}=e;return null}});const{__:Y}=wp.i18n,{assign:j}=lodash,{addFilter:$}=wp.hooks,{PanelBody:q,TextControl:J,SelectControl:K}=wp.components,{Fragment:Q}=wp.element,{createHigherOrderComponent:X}=wp.compose,{InspectorControls:ee}=wp.editor;$("editor.BlockEdit","uncanny-toolkit-pro/lesson-topic-grid",X((t=>n=>"uncanny-toolkit-pro/lesson-topic-grid"==n.name&&n.isSelected?(0,e.createElement)(Q,null,(0,e.createElement)(t,n),(0,e.createElement)(ee,null,(0,e.createElement)(q,{title:Y("Grid Content","uncanny-pro-toolkit")},(0,e.createElement)(J,{label:Y("courseId","uncanny-pro-toolkit"),value:n.attributes.courseId,type:"text",onChange:e=>{n.setAttributes({courseId:e})}}),(0,e.createElement)(J,{label:Y("lessonId","uncanny-pro-toolkit"),value:n.attributes.lessonId,type:"text",onChange:e=>{n.setAttributes({lessonId:e})}}),(0,e.createElement)(J,{label:Y("category","uncanny-pro-toolkit"),value:n.attributes.category,type:"text",onChange:e=>{n.setAttributes({category:e})}}),(0,e.createElement)(J,{label:Y("tag","uncanny-pro-toolkit"),value:n.attributes.tag,type:"text",onChange:e=>{n.setAttributes({tag:e})}})),(0,e.createElement)(q,{title:Y("Grid Style","uncanny-pro-toolkit")},(0,e.createElement)(J,{label:Y("cols","uncanny-pro-toolkit"),value:n.attributes.cols,type:"text",onChange:e=>{n.setAttributes({cols:e})}}),(0,e.createElement)(J,{label:Y("showImage","uncanny-pro-toolkit"),value:n.attributes.showImage,type:"text",onChange:e=>{n.setAttributes({showImage:e})}}),(0,e.createElement)(J,{label:Y("borderHover","uncanny-pro-toolkit"),value:n.attributes.borderHover,type:"text",onChange:e=>{n.setAttributes({borderHover:e})}})))):(0,e.createElement)(t,n)),"addToolkitLessonTopicGridSettings"));const{__:te}=wp.i18n,{registerBlockType:ne}=wp.blocks;i("LessonTopicGrid")&&ne("uncanny-toolkit-pro/lesson-topic-grid",{title:te("Enhanced Lesson Topic Grid","uncanny-pro-toolkit"),description:te("Displays a highly customizable grid of LearnDash lessons/topics.","uncanny-pro-toolkit"),icon:c,category:"uncanny-learndash-toolkit",keywords:[te("Uncanny Owl","uncanny-pro-toolkit")],supports:{html:!1},attributes:{courseId:{type:"string",default:""},lessonId:{type:"string",default:""},category:{type:"string",default:"all"},tag:{type:"string",default:"all"},cols:{type:"string",default:"4"},showImage:{type:"string",default:"yes"},borderHover:{type:"string",default:""}},edit(t){let{className:n,attributes:o,setAttributes:r}=t;return(0,e.createElement)("div",{className:n},(0,e.createElement)(p,null,te("Enhanced Lesson Topic Grid","uncanny-pro-toolkit")))},save(e){let{className:t,attributes:n}=e;return null}});const{__:oe}=wp.i18n,{assign:re}=lodash,{addFilter:ae}=wp.hooks,{PanelBody:le,TextControl:se,SelectControl:ie,RadioControl:ue,ToggleControl:ce}=wp.components,{Fragment:pe}=wp.element,{createHigherOrderComponent:de}=wp.compose,{InspectorControls:ye}=wp.editor;ae("editor.BlockEdit","uncanny-toolkit-pro/learn-dash-my-courses",de((t=>n=>"uncanny-toolkit-pro/learn-dash-my-courses"==n.name&&n.isSelected?(0,e.createElement)(pe,null,(0,e.createElement)(t,n),(0,e.createElement)(ye,null,(0,e.createElement)(le,{title:oe("Filter Content","uncanny-pro-toolkit")},(0,e.createElement)(se,{label:oe("WordPress Category ID","uncanny-pro-toolkit"),value:n.attributes.category,type:"number",help:oe("Leave empty to show all courses","uncanny-pro-toolkit"),onChange:e=>{n.setAttributes({category:e})}}),(0,e.createElement)(se,{label:oe("LearnDash Category ID","uncanny-pro-toolkit"),value:n.attributes.ldCategory,type:"number",help:oe("Leave empty to show all courses","uncanny-pro-toolkit"),onChange:e=>{n.setAttributes({ldCategory:e})}}),(0,e.createElement)(ie,{label:oe("Course Status","uncanny-pro-toolkit"),value:n.attributes.show,options:[{value:"all",label:oe("All courses","uncanny-pro-toolkit")},{value:"enrolled",label:oe("Enrolled courses only","uncanny-pro-toolkit")},{value:"open",label:oe("Open courses only","uncanny-pro-toolkit")}],onChange:e=>{n.setAttributes({show:e})}})),(0,e.createElement)(le,{title:oe("Order","uncanny-pro-toolkit")},(0,e.createElement)(ie,{label:oe("Order By","uncanny-pro-toolkit"),value:n.attributes.orderby,options:[{value:"ID",label:oe("ID","uncanny-pro-toolkit")},{value:"title",label:oe("Title","uncanny-pro-toolkit")},{value:"date",label:oe("Date","uncanny-pro-toolkit")},{value:"menu_order",label:oe("Menu order","uncanny-pro-toolkit")}],onChange:e=>{n.setAttributes({orderby:e})}}),(0,e.createElement)(ue,{label:oe("Order Direction","uncanny-pro-toolkit"),selected:n.attributes.order,options:[{value:"asc",label:oe("Ascending","uncanny-pro-toolkit")},{value:"desc",label:oe("Descending","uncanny-pro-toolkit")}],onChange:e=>{n.setAttributes({order:e})}})),(0,e.createElement)(le,{title:oe("Element Visibility","uncanny-pro-toolkit")},(0,e.createElement)(ce,{label:oe("Show WordPress Category Selector","uncanny-pro-toolkit"),checked:n.attributes.categoryselector,onChange:e=>{n.setAttributes({categoryselector:!n.attributes.categoryselector})}}),(0,e.createElement)(ce,{label:oe("Show LearnDash Category Selector","uncanny-pro-toolkit"),checked:n.attributes.course_categoryselector,onChange:e=>{n.setAttributes({course_categoryselector:!n.attributes.course_categoryselector})}})),(0,e.createElement)(le,{title:oe("Dashboard Behavior","uncanny-pro-toolkit")},(0,e.createElement)(ue,{label:oe("Expand by Default","uncanny-pro-toolkit"),selected:n.attributes.expand_by_default,options:[{value:"yes",label:oe("Yes","uncanny-pro-toolkit")},{value:"no",label:oe("No","uncanny-pro-toolkit")}],onChange:e=>{n.setAttributes({expand_by_default:e})}}),(0,e.createElement)(se,{label:oe("No courses message","uncanny-pro-toolkit"),value:n.attributes.no_courses_message,type:"text",help:oe("","uncanny-pro-toolkit"),onChange:e=>{n.setAttributes({no_courses_message:e})}})))):(0,e.createElement)(t,n)),"addToolkitCourseDashboardSettings"));const{__:ge}=wp.i18n,{registerBlockType:me}=wp.blocks;i("learnDashMyCourses")&&me("uncanny-toolkit-pro/learn-dash-my-courses",{title:ge("Course Dashboard","uncanny-pro-toolkit"),description:ge("Displays a highly customizable grid of LearnDash courses.","uncanny-pro-toolkit"),icon:c,category:"uncanny-learndash-toolkit",keywords:[ge("Uncanny Owl","uncanny-pro-toolkit")],supports:{html:!1},attributes:{orderby:{type:"string",default:"ID"},order:{type:"string",default:"asc"},show:{type:"string",default:"enrolled"},ldCategory:{type:"string",default:"all"},category:{type:"string",default:"all"},categoryselector:{type:"boolean",default:!1},course_categoryselector:{type:"boolean",default:!1},expand_by_default:{type:"string",default:"no"},no_courses_message:{type:"string",default:""}},edit(t){let{className:n,attributes:o,setAttributes:r}=t;return(0,e.createElement)("div",{className:n},(0,e.createElement)(p,null,ge("Course Dashboard","uncanny-pro-toolkit")))},save(e){let{className:t,attributes:n}=e;return null}});const{__:be}=wp.i18n,{assign:he}=lodash,{addFilter:ke}=wp.hooks,{PanelBody:Ce,TextControl:Ee,SelectControl:we}=wp.components,{Fragment:ve}=wp.element,{createHigherOrderComponent:fe}=wp.compose,{InspectorControls:Ae}=wp.editor;ke("editor.BlockEdit","uncanny-toolkit-pro/reset-button",fe((t=>n=>"uncanny-toolkit-pro/reset-button"==n.name&&n.isSelected?(0,e.createElement)(ve,null,(0,e.createElement)(t,n),(0,e.createElement)(Ae,null,(0,e.createElement)(Ce,{title:be("Reset Button settings","uncanny-pro-toolkit")},(0,e.createElement)(Ee,{label:be("Course ID","uncanny-pro-toolkit"),value:n.attributes.courseId,help:be("When placed on a course page, you do not need to pass in the course ID attribute.","uncanny-pro-toolkit"),type:"string",onChange:e=>{n.setAttributes({courseId:e})}}),(0,e.createElement)(we,{label:be("Reset TinCanny data","uncanny-pro-toolkit"),value:n.attributes.resetTincanny,help:be('If the reset_tincanny parameter is set to "Yes", clicking the reset button will also delete all Tin Canny results records for that user in the target course. Note: Due to technical constraints, Tin Canny bookmark (resume) data will not be deleted.',"uncanny-pro-toolkit"),options:[{value:"no",label:be("No")},{value:"yes",label:be("Yes")}],onChange:e=>{n.setAttributes({resetTincanny:e})}}),(0,e.createElement)(Ee,{label:be("Redirect","uncanny-pro-toolkit"),value:n.attributes.redirect,help:be("Redirect to the specified URL when clicked.","uncanny-pro-toolkit"),type:"string",onChange:e=>{n.setAttributes({redirect:e})}})))):(0,e.createElement)(t,n)),"addToolkitResetButtonSettings"));const{__:Te}=wp.i18n,{registerBlockType:xe}=wp.blocks;i("LearnDashReset")&&xe("uncanny-toolkit-pro/reset-button",{title:Te("Reset Button","uncanny-pro-toolkit"),description:Te("Displays a button that enables a user to reset their progress in a course.","uncanny-pro-toolkit"),icon:c,category:"uncanny-learndash-toolkit",keywords:[Te("Uncanny Owl","uncanny-pro-toolkit")],supports:{html:!1},attributes:{courseId:{type:"string",default:""},resetTincanny:{type:"string",default:"no"},redirect:{type:"string",default:""}},edit(t){let{className:n,attributes:o,setAttributes:r}=t;return(0,e.createElement)("div",{className:n},(0,e.createElement)(p,null,Te("Reset Button","uncanny-pro-toolkit")))},save(e){let{className:t,attributes:n}=e;return null}});const{__:Ie}=wp.i18n,{assign:De}=lodash,{addFilter:_e}=wp.hooks,{PanelBody:Se,TextControl:Be}=wp.components,{Fragment:Ne}=wp.element,{createHigherOrderComponent:Le}=wp.compose,{InspectorControls:Oe}=wp.editor;_e("editor.BlockEdit","uncanny-toolkit-pro/learn-dash-transcript",Le((t=>n=>"uncanny-toolkit-pro/learn-dash-transcript"==n.name&&n.isSelected?(0,e.createElement)(Ne,null,(0,e.createElement)(t,n),(0,e.createElement)(Oe,null,(0,e.createElement)(Se,{title:Ie("Learner Transcript Settings")},(0,e.createElement)(Be,{label:Ie("Logo Url"),value:n.attributes.logoUrl,type:"string",onChange:e=>{n.setAttributes({logoUrl:e})}}),(0,e.createElement)(Be,{label:Ie("Date Format"),value:n.attributes.dateFormat,type:"string",onChange:e=>{n.setAttributes({dateFormat:e})}})))):(0,e.createElement)(t,n)),"addToolkitLearnDashTranscriptSettings"));const{__:Me}=wp.i18n,{registerBlockType:Ge}=wp.blocks;i("LearnDashTranscript")&&Ge("uncanny-toolkit-pro/learn-dash-transcript",{title:Me("Learner Transcript","uncanny-pro-toolkit"),description:Me("Add printable transcripts to the front end for your learners. This is a great way for learners to have a record of all course progress and overall standing.","uncanny-pro-toolkit"),icon:c,category:"uncanny-learndash-toolkit",keywords:[Me("Uncanny Owl","uncanny-pro-toolkit")],supports:{html:!1},attributes:{logoUrl:{type:"string",default:""},dateFormat:{type:"string",default:"F j, Y"}},edit(t){let{className:n,attributes:o,setAttributes:r}=t;return(0,e.createElement)("div",{className:n},(0,e.createElement)(p,null,Me("Learner Transcript","uncanny-pro-toolkit")))},save(e){let{className:t,attributes:n}=e;return null}});const{__:Fe}=wp.i18n,{assign:He}=lodash,{addFilter:Ue}=wp.hooks,{PanelBody:Pe,TextControl:ze}=wp.components,{Fragment:Ve}=wp.element,{createHigherOrderComponent:Re}=wp.compose,{InspectorControls:Ze}=wp.editor;Ue("editor.BlockEdit","uncanny-toolkit-pro/group-logo",Re((t=>n=>"uncanny-toolkit-pro/group-logo"==n.name&&n.isSelected?(0,e.createElement)(Ve,null,(0,e.createElement)(t,n),(0,e.createElement)(Ze,null,(0,e.createElement)(Pe,{title:Fe("Group Logo Settings")},(0,e.createElement)(ze,{label:Fe("Size"),value:n.attributes.size,type:"string",onChange:e=>{n.setAttributes({size:e})}})))):(0,e.createElement)(t,n)),"addToolkitGroupLogoSettings")),Ue("editor.BlockEdit","uncanny-toolkit-pro/group-list",Re((t=>n=>"uncanny-toolkit-pro/group-list"==n.name&&n.isSelected?(0,e.createElement)(Ve,null,(0,e.createElement)(t,n),(0,e.createElement)(Ze,null,(0,e.createElement)(Pe,{title:Fe("Group List Settings")},(0,e.createElement)(ze,{label:Fe("Separator"),value:n.attributes.separator,type:"string",onChange:e=>{n.setAttributes({separator:e})}})))):(0,e.createElement)(t,n)),"addToolkitGroupListSettings"));const{__:We}=wp.i18n,{registerBlockType:Ye}=wp.blocks;i("GroupLogoList")&&(Ye("uncanny-toolkit-pro/group-logo",{title:We("Group Logo","uncanny-pro-toolkit"),description:We("Displays the branding image associated with the current user's group. If the user is in more than one group with a branding logo, all logos will be displayed.","uncanny-pro-toolkit"),icon:c,category:"uncanny-learndash-toolkit",keywords:[We("Uncanny Owl")],supports:{html:!1},attributes:{size:{type:"string",default:"full"}},edit(t){let{className:n,attributes:o,setAttributes:r}=t;return(0,e.createElement)("div",{className:n},(0,e.createElement)(p,null,We("Group Logo","uncanny-pro-toolkit")))},save(e){let{className:t,attributes:n}=e;return null}}),Ye("uncanny-toolkit-pro/group-list",{title:We("Group List","uncanny-pro-toolkit"),description:We("Displays a list of the groups the current user is a member of.","uncanny-pro-toolkit"),icon:c,category:"uncanny-learndash-toolkit",keywords:[We("Uncanny Owl")],supports:{html:!1},attributes:{separator:{type:"string",default:", "}},edit(t){let{className:n,attributes:o,setAttributes:r}=t;return(0,e.createElement)("div",{className:n},(0,e.createElement)(p,null,We("Group List","uncanny-pro-toolkit")))},save(e){let{className:t,attributes:n}=e;return null}}));const{__:je}=wp.i18n,{assign:$e}=lodash,{addFilter:qe}=wp.hooks,{PanelBody:Je,TextControl:Ke}=wp.components,{Fragment:Qe}=wp.element,{createHigherOrderComponent:Xe}=wp.compose,{InspectorControls:et}=wp.editor;qe("editor.BlockEdit","uncanny-toolkit-pro/group-org-details",Xe((t=>n=>"uncanny-toolkit-pro/group-org-details"==n.name&&n.isSelected?(0,e.createElement)(Qe,null,(0,e.createElement)(t,n),(0,e.createElement)(et,null,(0,e.createElement)(Je,{title:je("Group Organization Settings")},(0,e.createElement)(Ke,{label:je("Group ID"),value:n.attributes.groupId,type:"string",onChange:e=>{n.setAttributes({groupId:e})}})))):(0,e.createElement)(t,n)),"addToolkitGroupOrgDetailsSettings"));const{__:tt}=wp.i18n,{registerBlockType:nt}=wp.blocks;i("LearnDashGroupSignUp")&&(nt("uncanny-toolkit-pro/group-status",{title:tt("Group Status","uncanny-pro-toolkit"),description:tt("Displays the Organization Details of all groups the current user is a member of.","uncanny-pro-toolkit"),icon:c,category:"uncanny-learndash-toolkit",keywords:[tt("Uncanny Owl")],supports:{html:!1},attributes:{},edit(t){let{className:n,attributes:o,setAttributes:r}=t;return(0,e.createElement)("div",{className:n},(0,e.createElement)(p,null,tt("Group Status","uncanny-pro-toolkit")))},save(e){let{className:t,attributes:n}=e;return null}}),nt("uncanny-toolkit-pro/group-org-details",{title:tt("Group Organization","uncanny-pro-toolkit"),description:tt("Displays the Organization Details of the group associated with the group registration page the shortcode is placed on. *Works only on group registration pages.*","uncanny-pro-toolkit"),icon:c,category:"uncanny-learndash-toolkit",keywords:[tt("Uncanny Owl")],supports:{html:!1},attributes:{groupId:{type:"string",default:", "}},edit(t){let{className:n,attributes:o,setAttributes:r}=t;return(0,e.createElement)("div",{className:n},(0,e.createElement)(p,null,tt("Group Organization","uncanny-pro-toolkit")))},save(e){let{className:t,attributes:n}=e;return null}}),nt("uncanny-toolkit-pro/group-login",{title:tt("Group Login Form","uncanny-pro-toolkit"),description:tt("When used on a group page, displays a login form. Any user that uses the form to log in is automatically added to the group.  *For use on group pages only.*","uncanny-pro-toolkit"),icon:c,category:"uncanny-learndash-toolkit",keywords:[tt("Uncanny Owl")],supports:{html:!1},attributes:{},edit(t){let{className:n,attributes:o,setAttributes:r}=t;return(0,e.createElement)("div",{className:n},(0,e.createElement)(p,null,tt("Group Login Form","uncanny-pro-toolkit")))},save(e){let{className:t,attributes:n}=e;return null}}))}();