PageSourceSearch

https://classroom.freckle.com/js/index-Baol2Nm_.js

js freckle.com collected 2026-09-24 10:32:48 UTC 16,054 bytes, 2 lines download raw bytes

1import{u as e,j as t,ap as a,T as s,L as r,ao as i,k as n,aN as c,aK as o,ab as l,ac as d,ag as m,X as u,cu as _,R as E,cB as T,r as p,G as A,c7 as S,B as h,cC as x,cD as j,cE as C,V as R,az as I,A as f,bE as N,N as O,b$ as v,at as g,W as P,au as L,ai as F,ak as y,aj as b,aw as B,E as D,am as M,ax as w,bh as Y,bs as H,cF as U,Z as k,aa as V}from"./index-B1wCbfWL.js";import{f as $,a as z}from"./index-Dtocw471.js";import{f as G,g as K,a as q,b as W,c as Q}from"./fact-practice-session-history-logic-weKr6ZNP.js";import{u as X}from"./use-current-course-id-ZGLulyTi.js";import{T as J,a as Z}from"./index-BrHelVUq.js";import{C as ee}from"./course-selector-handler-CrpwuhNG.js";import{F as te}from"./fact-practice-operation-4TQgWPl6.js";import{N as ae,n as se,r as re,a as ie}from"./no-data-notice-DxPqkeg6.js";import{P as ne,a as ce}from"./premium-popover-legacy-WZzGPmaP.js";import{h as oe}from"./time-helpers-CRGLZSSd.js";import{s as le}from"./size-BABDchGb.js";import{m as de}from"./index-D3wXpsxW.js";import{S as me}from"./sorting-BkMGmtMC.js";import{M as ue}from"./index-Baw9fUk7.js";import{S as _e}from"./session-history-menu-CG-fmkd5.js";import"/config.js";import"./math-fact-practice-operation-CZjREjmS.js";import"./operations-BMHhOBrd.js";import"./sum-D64j251S.js";import"./composite-store--JlJP4Zc.js";import"./index-uRh2wThu.js";import"./popover-context-Ccn6l7lW.js";import"./combobox-context-D4HMUCqA.js";import"./course-selector-9u2iN8uj.js";import"./index-CktT7jKP.js";import"./memoize-one.esm-o-udwBZD.js";import"./index-ALFUeIM9.js";import"./index-lO6aVWDV.js";import"./dropdown-Bxwjx4bb.js";import"./index-D89G-58e.js";import"./maybe-LfC_bdDy.js";import"./premium-popover-DUnraRpd.js";import"./session-history-C6UwsXQR.js";import"./session-history-access-DqDrR8LQ.js";import"./index-DTw-Ryrt.js";import"./index-M8JOUAVd.js";import"./partition-CA_7apTz.js";import"./_createAggregator-BXQG9Dfe.js";function Ee(o){const{t:l}=e(),d=t.jsxs(a,{id:"fact-practice-level-tooltip",children:[t.jsx(s,{style:"subtitle-2",children:o.children}),t.jsx(s,{style:"body-2",children:o.tooltipPrefix}),t.jsx(r,{target:"_blank",rel:"noopener",href:"https://renaissance.widen.net/view/pdf/isu7zrzo5m/FreckleFactPracticeLevels.pdf?t.download=true&u-zceria",reactRouter:!1,children:l("FACT_PRACTICE_LEVEL_LINK_SENTENCE_CASE")})]});return t.jsxs(t.Fragment,{children:[o.children,t.jsx(i,{trigger:["click"],placement:o.placement??"top",overlay:d,children:t.jsx(n,{icon:c,size:"1x",className:"_iconStyle_5ju73_73"})})]})}function Te(){const{t:a}=e();return t.jsx("div",{className:"row std-margin-top-xlg std-margin-bottom-md",children:t.jsx("div",{className:"col-12",children:t.jsxs(r,{target:"_blank",rel:"noopener",href:G,reactRouter:!1,className:"_factPracticeLink_14xd2_73",children:[t.jsx(n,{icon:o,size:"1x"})," ",a("FACT_PRACTICE_LEVEL_LINK")]})})})}function pe(a){const{mathFactPracticeCourseLevels:s,language:r,activeTab:i}=a,{t:c}=e();if("activity"===i)return t.jsx(t.Fragment,{});const o=te.operationsByType(i).map(e=>{const a=c("REPORT_FACT_PRACTICE_OPERATIONS_LABEL_V2",{operation:e}),s=c("FACT_MASTERY_SUMMARY_LEVEL_TOOLTIP_CONTENT_PREFIX",{operation:a,maxLevel:K(e)});return t.jsx("th",{children:t.jsx(Ee,{tooltipPrefix:s,children:t.jsx(t.Fragment,{children:a})})},e)}),u=l(a.students,d).map(e=>{var a;const n=(null==(a=s.find(t=>t.studentId===e.id))?void 0:a.levels)??[];return t.jsx(Ae,{student:e,mathFactPracticeCourseLevelsForStudent:n,teacherLanguage:r,activeTab:i},e.id)}),[_,E]=a.isPremium||u.length<=3?[u,null]:[u.slice(0,3),t.jsx(ne,{feature:ce.Math,featureDescription:"Fact Mastery Summary",premiumLicenses:a.premiumLicenses,children:t.jsx("div",{className:"row std-margin-top-sm",children:t.jsx("div",{className:"col-12",children:t.jsx("div",{className:"alert alert-info text-center bold",children:t.jsx("p",{className:"link-cursor",children:c("FACT_MASTERY_SUMMARY_SEE_ALL_STUDENTS")})})})})},"1")],T=t.jsxs("span",{children:[t.jsx(n,{icon:m})," ",c("FACT_MASTERY_SUMMARY_ASSIGN_PRACTICE")]}),p=t.jsx(ae,{subject:"math",imageName:"math/fact-practice/empty-mastery-report",onButtonClick:a.navigateFactPracticeAssign,noticeBarLeftElement:t.jsxs("div",{className:se,children:[t.jsx("span",{className:re,children:c("FACT_MASTERY_SUMMARY_NO_DATA_NOTICE_LABEL")}),t.jsx("span",{className:ie,children:c("FACT_MASTERY_SUMMARY_NO_DATA_NOTICE_DESCRIPTION")})]}),noticeBarRightButtonBody:T,textToOverlay:c("FACT_MASTERY_SUMMARY_TABLE_NO_DATA_OVERLAY_MESSAGE")});return 0===u.length?t.jsx("div",{className:"_alertNoDataStyle_xvzaf_73",children:p}):t.jsx("div",{className:"row",children:t.jsxs("div",{className:"col-12",children:[t.jsx(Te,{}),t.jsx("div",{className:"row fact-mastery-summary",children:t.jsx("div",{className:"col-12",children:t.jsxs("table",{className:"fact-mastery-summary-table",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{children:c("FACT_MASTERY_SUMMARY_TABLE_HEADER_STUDENT")},"student"),o,t.jsx("th",{children:c("FACT_MASTERY_SUMMARY_TABLE_HEADER_REPORT")})]})}),t.jsx("tbody",{children:_})]})})}),E]})})}function Ae(a){const{mathFactPracticeCourseLevelsForStudent:s,student:i,teacherLanguage:c,activeTab:o}=a,l=X(),{t:d}=e(),m=u(()=>
1$(l,i.id,i.grade,c),"fetchMathFactPracticeOperationsForStudent",[l,i.id,i.grade,c]).data??[],p=te.operationsByType(o).map(e=>{var a;const r=m.some(t=>t.operation===e),i=null==(a=s.find(t=>t.operation===e))?void 0:a.level,n=r&&void 0!==i?i:d("FACT_MASTERY_SUMMARY_TABLE_CELL_VALUE_NA");return t.jsxs("td",{children:[t.jsx("small",{children:d("FACT_MASTERY_SUMMARY_TABLE_CELL_LABEL_LEVEL")}),t.jsx("p",{children:n})]},e)});return t.jsxs("tr",{children:[t.jsx("td",{children:_(a.student)}),p,t.jsx("td",{className:"fact-mastery-summary-icon",children:t.jsx(r,{href:E.math.factPracticeReport({courseId:l,studentId:a.student.id,operation:te.operationsByType(o)[0]}),reactRouter:!0,children:t.jsx(n,{icon:T,size:"lg"})})})]})}function Se(e){return function(a,s){const r=void 0!==a.width?{width:a.width}:{};return t.jsx("th",{style:r,className:"link-cursor",children:e(a.label,a.sortBy)},`header-cell-${s}`)}}function he(e,a){return t.jsx("td",{children:e.value},`row-cell-${a}`)}function xe(e){const{isInitiallyExpanded:a,row:s,details:r,detailHeader:i,renderRow:c,addRowClassName:o,renderDetailRow:l}=e,[d,m]=p.useState(a),u=p.useRef(null);A.useSafeEffect(()=>{a&&null!==u.current&&de.animateScroll.scrollTo(u.current.offsetTop,{duration:1e3})},[a]),A.useSafeEffect(()=>{m(a)},[a]);const _=t.jsx("td",{onClick:()=>m(e=>!e),className:"expanding-table-icon text-center link-cursor",children:t.jsx(n,{icon:d?x:j,size:"2x"})}),E=c(s).map(he),T=o?o(s):"",S=t.jsxs("tr",{className:`expanding-table-row ${T}`,children:[E,_]}),h=r.map(e=>t.jsx("tr",{className:"expanding-table-details-row",children:l(e.detail).map(he)},`detail-${e.id}`)),C=d?t.jsx("tr",{children:t.jsx("td",{colSpan:E.length+1,children:t.jsx("div",{className:"expanding-table-details-container",children:t.jsxs("table",{className:"expanding-table-details-table",children:[t.jsx("thead",{children:i}),t.jsx("tbody",{children:h})]})})})}):null;return t.jsxs("tbody",{ref:e=>{u.current=e},children:[S,C]})}function je(a){const{t:s}=e(),{getData:r,sortValue:i,renderHeader:n,renderDetailHeader:c,renderRow:o,renderDetailRow:l,addRowClassName:d,sortBy:m,sortDir:u,filterBy:_,underSearchBar:E,children:T,studentIdOfRowToBeExpanded:x}=a,j=r(),[C,R]=p.useState(r()),[I,f]=p.useState(m),[N,O]=p.useState(u??me.ASC),[v,g]=p.useState(null),[P,L]=p.useState(me.sortOn(C,N,e=>i(m,e.row)));function F(e,t,a){const s=me.sortOn(C.filter(e=>null==a||void 0===_||_(e.row).toLowerCase().indexOf(a.toLowerCase())>=0),t,t=>i(e,t.row));f(e),O(t),g(a),L(s)}A.useSafeEffectExtraDeps(({propsSortBy:e,propsSortDir:t,getData:a,sortValue:s})=>{const r=a(),i=t??me.ASC,n=me.sortOn(r,i,t=>s(e,t.row));R(r),f(e),O(i),g(null),L(n)},[],{getData:{value:r,comparator:S.isEqual},dataValue:{value:j,comparator:S.isEqual},propsSortBy:{value:m,comparator:S.isEqual},propsSortDir:{value:u,comparator:S.isEqual},sortValue:{value:i,comparator:()=>!0}});const y=t.jsxs("tr",{className:"expanding-table-header",children:[n().map(Se(function(e,a){if(void 0!==a){const s=me.sortDirArrow(N);return t.jsxs(h,{style:"link",onClick:()=>function(e){const t=me.changeSortDirIf(I===e,N);F(I,t,v??null)}(a),children:[e," ",I===a?s:""]})}return t.jsx("span",{children:e})})),t.jsx("th",{className:"expanding-table-icon-width"})]},"et-table-header"),b=P.map(e=>{const a=parseInt(e.id,10)===x;return t.jsx(xe,{row:e.row,details:e.details,detailHeader:(s=e.id,t.jsx("tr",{className:"expanding-table-details-header",children:c().map(Se((e,a)=>t.jsx("span",{children:e})))},`${s}-detail-header`)),renderRow:o,addRowClassName:d,renderDetailRow:l,isInitiallyExpanded:a},`row-${e.id}`);var s}),B=0!==le(C)&&void 0!==E?t.jsx("div",{className:"col-12",children:E}):null,D=void 0!==_?t.jsx("div",{className:"col-12 std-margin-bottom-lg",children:t.jsx("input",{onChange:function(e){if(e.target instanceof HTMLInputElement){const t=e.target.value;F(I,N,t)}},className:"form-control input-md",placeholder:s("EXPANDING_TABLE_SEARCH_INPUT_PLACEHOLDER")})},"et-filter"):null;return 0===le(C)&&void 0!==T?T:t.jsxs("div",{className:"row",children:[D,B,t.jsx("div",{className:"col-12",children:t.jsxs("table",{className:"expanding-table",children:[t.jsx("thead",{children:y}),0===le(b)?t.jsx("tbody",{}):b]})})]})}function Ce({genericSessions:a,students:s,dateOption:r,from:i,to:c,isPremium:o,navigateFactPracticeAssign:l,initiallyExpandedRowStudentId:d,allMathFactPracticeOperations:u}){const{t:E}=e();const T=C.forDisplay(C.MathFactPractice),p=t.jsxs("span",{children:[t.jsx(n,{icon:m})," ",E("FACT_PRACTICE_SESSION_HISTORY_ASSIGN_FACT_PRACTICE")]}),A=t.jsx(je,{getData:()=>W(u,a,s),filterBy:e=>_(e.student),sortBy:"student",sortValue:(e,t)=>
1q(e,t),renderHeader:()=>function(e){const[t,a]=r===I.Today?[e("FACT_PRACTICE_SESSION_HISTORY_TABLE_HEADER_COINS_TODAY"),"coinsToday"]:[e("FACT_PRACTICE_SESSION_HISTORY_TABLE_HEADER_COINS_TOTAL"),"coinsTotal"];return[{label:e("FACT_PRACTICE_SESSION_HISTORY_TABLE_HEADER_NAME"),sortBy:"student"},{label:t,sortBy:a},{label:e("FACT_PRACTICE_SESSION_HISTORY_TABLE_HEADER_QUESTIONS"),sortBy:"questions"},{label:e("FACT_PRACTICE_SESSION_HISTORY_TABLE_HEADER_ACCURACY"),sortBy:"accuracy"},{label:e("FACT_PRACTICE_SESSION_HISTORY_TABLE_HEADER_TIME_SPENT"),sortBy:"timeSpent"}]}(E),renderRow:e=>function(e){const t=r===I.Today?e.coinsToday:e.coinsTotal;return[{value:_(e.student)},{value:t.toString()},{value:e.questions.toString()},{value:`${e.accuracy.toFixed(1)}%`},{value:(a=e.timeSpent,function(e,t){return e?t():"Available in Premium Edition"}(o,()=>oe(a)))}];var a}(e),renderDetailHeader:()=>function(e){return[{label:e("FACT_PRACTICE_SESSION_HISTORY_DETAIL_TABLE_HEADER_SESSION_END_TIME")},{label:e("FACT_PRACTICE_SESSION_HISTORY_DETAIL_TABLE_HEADER_OPERATION")},{label:Re(e)},{label:e("FACT_PRACTICE_SESSION_HISTORY_DETAIL_TABLE_HEADER_QUESTIONS")},{label:e("FACT_PRACTICE_SESSION_HISTORY_DETAIL_TABLE_HEADER_ACCURACY")}]}(E),renderDetailRow:(...e)=>function(e,t,a){return[{value:a.timeEnd.format(t("FACT_PRACTICE_SESSION_HISTORY_TABLE_SESSION_END_DATE_FORMAT"))},{value:R.maybe(()=>a.operation,e=>e.description,e.find(e=>e.operation===a.operation))},{value:a.level.toString()},{value:R.maybe(()=>t("FACT_PRACTICE_SESSION_HISTORY_TABLE_ROW_NA"),e=>e.toString(),a.questions)},{value:`${R.maybe(()=>t("FACT_PRACTICE_SESSION_HISTORY_TABLE_ROW_NA"),e=>e.toString(),a.accuracy)}%`}]}(u,E,...e),studentIdOfRowToBeExpanded:d,children:t.jsx(ae,{subject:"math",imageName:"math/fact-practice/empty-session-report",onButtonClick:l,noticeBarLeftElement:t.jsxs("div",{className:se,children:[t.jsx("span",{className:re,children:E("FACT_PRACTICE_SESSION_HISTORY_TABLE_NO_DATA_NOTICE_LABEL")}),t.jsx("span",{className:ie,children:E("FACT_PRACTICE_SESSION_HISTORY_NO_DATA_NOTICE_DESCRIPTION")})]}),noticeBarRightButtonBody:p,textToOverlay:E("FACT_PRACTICE_SESSION_HISTORY_TABLE_NO_DATA_OVERLAY_MESSAGE")})},`${T}-${r}`);return t.jsx("div",{className:"row no-margin-row",children:t.jsxs("div",{className:"col-12",children:[t.jsx(ue,{children:t.jsx(_e,{sessionType:C.MathFactPractice,isPremium:o,dateOption:r,from:i,to:c},`${T}-session-history-menu`)}),t.jsx("div",{className:"row std-margin-top-md",children:t.jsx("div",{className:"col-12",children:A})})]})})}function Re(e){return t.jsx(Ee,{children:t.jsx(t.Fragment,{children:e("FACT_PRACTICE_SESSION_HISTORY_DETAIL_TABLE_HEADER_LEVEL")})})}function Ie(e,t){return{...e,...t}}const fe=a=>{const{genericSessions:s,students:r,mathFactPracticeCourseLevels:i,isPremium:n,premiumLicenses:c,dateOption:o,from:l,to:d,initialStudentId:m,allMathFactPracticeOperations:u,language:_}=a,T=function(e){switch(e){case"basic-operations":case"integers-and-fractions":return e;default:return"activity"}}(f("tab")),[S,h]=function(e){const t={redirectToFactPracticeAssign:!1,key:e.activeTab};return p.useReducer(Ie,t)}({activeTab:T}),{redirectToFactPracticeAssign:x,key:j}=S,{t:C}=e(),R=N();A.useSafeEffectExtraDeps(({navigate:e})=>{const t=new URLSearchParams(window.location.search);t.set("tab",j),e({pathname:location.pathname,search:`?${t}`},{replace:!0})},[j],{navigate:{value:R,comparator:()=>!0}});const I=(P=h,()=>{P({redirectToFactPracticeAssign:!0})});var P;const L=function(e){return t=>{e({key:t})}}(h);if(x)return t.jsx(O,{to:E.math.assignFactPractice()});const F=t.jsx(ee,{withLabel:!0}),y={path:[{url:E.reportsOverview("math"),name:C("BREADCRUMB_REPORT_OVERVIEW_NAME")}],currentItemName:v(C("FACT_PRACTICE_REPORT_PAGE_TITLE"))};return t.jsx(g,{pageHeaderText:C("FACT_PRACTICE_REPORT_PAGE_TITLE"),breadcrumbsConfig:y,children:t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"row std-margin-bottom-md",children:t.jsx("div",{className:"col-3",children:F})}),t.jsxs(J,{id:"fact-practice-reports-tabs",activeKey:j,onSelect:e=>null!==e?L(e):null,expandTabs:!0,children:[t.jsx(Z,{eventKey:"activity",title:C("FACT_PRATICE_REPORT_TAB_ACTIVITY"),children:t.jsx(Ce,{students:r,genericSessions:s,dateOption:o,from:l,to:d,isPremium:n,navigateFactPracticeAssign:I,initiallyExpandedRowStudentId:m,allMathFactPracticeOperations:u})}),t.jsx(Z,{eventKey:"basic-operations",title:C("FACT_PRACTICE_REPORT_BASIC_OPERATIONS"),children:t.jsx(pe,{mathFactPracticeCourseLevels:i,students:r,isPremium:n,premiumLicenses:c,navigateFactPracticeAssign:I,language:_,activeTab:j})}),t.jsx(Z,{eventKey:"integers-and-fractions",title:C("FACT_PRACTICE_REPORT_INTEGERS_AND_FRACTIONS"),children:t.jsx(pe,{mathFactPracticeCourseLevels:i,students:r,isPremium:n,premiumLicenses:c,navigateFactPracticeAssign:I,language:_,activeTab:j})})]})]})})};function Ne(){const e=X(),a=P("student-id"),{from:s,to:r,dateOption:i}=L(),n=F(),c=y(),o=b(),l=B(),d=D(),m=u(()=>z(d),"fetchFactPracticeOperations",[d]),_=u(()=>Q(e),"fetchFactPracticeLevelsForCourse",[e]),E=M(({premiumLicenses:e})=>Promise.resolve(w(i,s,r,Y(e)?I.ThisMonth:I.ThisWeek)),"makeDateOptions",[i,s,r,l.data],{premiumLicenses:l}),T={data:R.mthen(E.data,({from:e,to:t})=>({gte:e,lt:t}))},p=M(({teacher:t,completedAt:a})=>U(e,[H.MathFactPractice],{mathStandardSetId:t.mathStandardSetId,elaStandardSetId:t.elaStandardSetId,completedAt:a}),"fetchClassroomGenericAssignmentSessions",[e,[H.MathFactPractice],R.mthen(n.data,e=>({mathStandardSetId:e.mathStandardSetId,elaStandardSetId:e.elaStandardSetId,completedAt:T}))],{teacher:n,completedAt:T});return t.jsx(k,{resources:{students:o,courseMemberships:c,premiumLicenses:l,teacher:n,allMathFactPracticeOperations:m,mathFactPracticeCourseLevels:_,genericSessions:p,dateOptions:E},render:({students:s,courseMemberships:r,premiumLicenses:i,allMathFactPracticeOperations:n,mathFactPracticeCourseLevels:c,genericSessions:o,dateOptions:{from:l,to:m,dateOption:u}})=>{const _=V(s,e,r),E=Y(i);return t.jsx(fe,{genericSessions:o,mathFactPracticeCourseLevels:c,students:_,initialStudentId:a,isPremium:E,premiumLicenses:i,dateOption:u,from:l,to:m,allMathFactPracticeOperations:n,language:d})}})}
1export{Ne as default};
2//# sourceMappingURL=index-Baol2Nm_.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.