@clickview/lite 0.37.5 → 0.37.6

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/dist/bundles.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "appBundle": "bundle-abeb0f4eba.min.js",
2
+ "appBundle": "bundle-6a63a8b95a.min.js",
3
3
  "cssBundle": "lite-app-b3d2f810cc.css",
4
4
  "polyfillBundle": "polyfills-02090a38a6.min.js"
5
5
  }
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 7670-1684f253e1-lite.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[7670],{68293:(e,t,r)=>{r.d(t,{B:()=>f});var n=r(32735),a=["Teacher","Librarian / Teacher Librarian","Curriculum Coordinator","Digital Technology Coordinator","SSO / SLSO","IT","Head of Department","Head of Subject","Assistant Principal","Deputy Principal","Principal"],o=["Teacher","Librarian / Teacher Librarian","Head of Department","Instructional Technology Specialist","Curriculum Coordinator","School Leadership","District Leadership","Academic Coach","Principal","IT / IT Specialist"],i={au:a,nz:a,uk:["Teacher","Librarian / Teacher Librarian","IT/LRC","e-Learning/ICT Coordinator","Head of Key Stage","Head of Department","Subject Lead","Assistant Head Teacher","Deputy Head Teacher","Head Teacher"],us:o};function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var u="OTHER";function s(e,t){return t.includes(e)?e:e?u:""}function f(e){var t,r,a=e.error,l=e.onChange,f=(t=e.countryCode,r=null==t?void 0:t.toLowerCase(),i[r]||o),h=s(e.initialValue,f),d=c(n.useState(h),2),p=d[0],m=d[1],y=c(n.useState(h===u?e.initialValue:""),2),v=y[0],g=y[1];n.useEffect((function(){m(s(e.initialValue,f))}),[e.initialValue]);var b=p===u;return n.createElement(n.Fragment,null,n.createElement("div",{className:"mb-2"},n.createElement("select",{id:e.id,name:e.id,className:"form-select form-select-lg ".concat(p.length?"text-dark":"text-secondary"," ").concat(!!a&&"is-invalid"),value:p,placeholder:"Role",onChange:function(e){m(e.target.value),g(""),l(e.target.value===u?"":e.target.value)}},n.createElement("option",{value:"",disabled:!0,className:"text-muted"},e.placeholder?e.placeholder:n.createElement(n.Fragment,null,"What do you do?")),f.map((function(e,t){return n.createElement("option",{value:e,className:"text-dark",key:t},e)})),n.createElement("option",{value:u,className:"text-dark"},"Other")),!!a&&!b&&n.createElement("div",{className:"invalid-feedback"},a)),b&&n.createElement("div",{className:"mb-3"},n.createElement("input",{className:"form-control form-control-lg ".concat(!!a&&"is-invalid"),type:"text",value:v,placeholder:"What do you do?",autoFocus:!0,onChange:function(e){g(e.target.value),l(e.target.value)}}),!!a&&n.createElement("div",{className:"invalid-feedback"},a)))}},58329:(e,t,r)=>{r.r(t),r.d(t,{OnboardingSelectRoleView:()=>C});var n=r(32735),a=r(23481),o=r(20354),i=r(65858),c=r(50122),l=r(68293),u=r(60376),s=r(83914),f=r(83345),h=r(54610),d=r(31949),p=r(22902),m=r(67453),y=r(35223),v=r(99742),g=r(75359),b=r(40695),w=r(73190),E=r(90815);const x={customerLogo:"O0Fk5"};function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:N(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(_([])));x&&x!==r&&n.call(x,i)&&(w=x);var T=b.prototype=v.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==L(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function N(t,r,n){var a=h;return function(o,i){if(a===p)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=O(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=p;var u=f(t,r,n);if("normal"===u.type){if(a=n.done?m:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=m,n.method="throw",n.arg=u.arg)}}}function O(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function _(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(L(t)+" is not iterable")}return g.prototype=b,a(T,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(T),e},t.awrap=function(e){return{__await:e}},j(k.prototype),u(k.prototype,c,(function(){return this})),t.AsyncIterator=k,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new k(s(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(T),u(T,l,"Generator"),u(T,i,(function(){return this})),u(T,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=_,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;A(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:_(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var k=function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function c(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}l((n=n.apply(e,t||[])).next())}))},N=/\$+[\w\s]?/,O="onboarding.selectRole";function C(){var e,t,r,L=(0,w.Q)(),j=L.onClickBack,C=L.exitOnboarding,A=L.completeStepAsync,I=L.onSaveError,_=(0,E.H)().logEvent,P=o.a.useBasicFetch(d.N.currentUser()),F=o.a.useBasicFetch(P.data&&d.N.user(P.data.id)),G=o.a.useGetFetchAsync(),B=(0,p.T)().hasPermissions,H=T(n.useState(""),2),R=H[0],V=H[1],D=T(n.useState(""),2),z=D[0],U=D[1];return n.createElement(b.z,{namespace:O},n.createElement(b.z.Left,{className:"bg-dark-blue d-flex align-items-center"},n.createElement("div",{className:"px-5 pt-4"},n.createElement("img",{className:"img-fluid",src:v.W.OnboardingV2.SelectRole.BACKGROUND}))),n.createElement(b.z.Right,{hasCustomButtons:!1,onClickNext:function(){return k(this,void 0,void 0,S().mark((function e(){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R){e.next=2;break}return e.abrupt("return");case 2:return _(i.Vw.Click,i.Ix.Next,{jobTitle:R},{jobTitleOverride:R}),e.prev=3,e.next=6,G(d.N.updateJobTitle(P.data.id,P.data.customerId,R));case 6:return e.next=8,A({jobTitleOverride:R});case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(3),I(),e.abrupt("return",Promise.reject());case 14:case"end":return e.stop()}}),e,null,[[3,10]])})))},onClickBack:j,onClickComeBackLater:(null===(r=null===(t=null===(e=F.data)||void 0===e?void 0:e.userProfile)||void 0===t?void 0:t.metadata)||void 0===r?void 0:r.jobTitle)||!c.m.hasNonBdmTrial(B)?C:null,disableNext:!!z||!R},n.createElement(g.W,null,n.createElement(f.x,{phrase:"heading"})),n.createElement("div",{className:"d-flex align-items-center pt-2 pb-3"},n.createElement("div",{className:"".concat(x.customerLogo," me-2")},n.createElement(u.f,{imageUrl:m.j.createUrl(P.data.customerLogo,{size:h.h2.Small}),svgName:y.vn.GraduationCap,variant:"green",svgSize:s.S.Large})),n.createElement("p",{className:"mb-0"},n.createElement(f.x,{phrase:"whatIsYourRole",options:{schoolName:P.data.customerName}}))),n.createElement(l.B,{id:"onboarding-job-title",onChange:function(e){V(e),_(i.Vw.Select,i.Ix.SelectJobTitle,{jobTitle:R}),N.test(e)?U("Please enter a valid job title."):e.length>255?U("Job title cannot exceed max length of 255 characters."):z&&U("")},countryCode:P.data.countryCode,placeholder:a.T.getPhrase(O,"rolePlaceholder"),initialValue:R,error:z})))}}}]);