@clickview/lite 0.80.0-rc.0 → 0.80.0-rc.1
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 +1 -1
- package/dist/scripts/{3811-4ad1527ce5-lite.chunk.js → 3811-282392e8bf-lite.chunk.js} +3 -3
- package/dist/scripts/{3811-4ad1527ce5-lite.chunk.js.map → 3811-282392e8bf-lite.chunk.js.map} +1 -1
- package/dist/scripts/{bundle-5f2fe264ce.min.js → bundle-116a634469.min.js} +3 -3
- package/dist/scripts/{bundle-5f2fe264ce.min.js.map → bundle-116a634469.min.js.map} +1 -1
- package/package.json +1 -1
- /package/dist/scripts/{3811-4ad1527ce5-lite.chunk.js.LICENSE.txt → 3811-282392e8bf-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-5f2fe264ce.min.js.LICENSE.txt → bundle-116a634469.min.js.LICENSE.txt} +0 -0
package/dist/bundles.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see 3811-
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3811,3105],{51182:(e,t,n)=>{n.d(t,{l:()=>r.l});var r=n(72632)},29923:(e,t,n)=>{n.d(t,{F:()=>s});var r=n(32735),a=n(23481),i=n(89965),o=n(13876);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var c=a.T.encloseNamespace("sharev2.deleteShareContent");function s(e){var t,n,a,s=(n=r.useState(!1),a=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(n,a)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(n,a)||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.")}()),u=s[0],p=s[1];return r.createElement("div",{className:"d-flex flex-column gap-3"},r.createElement("p",{className:"m-0"},e.phrases.leadingSentence),r.createElement("ul",{className:"m-0"},e.phrases.bulletPoints.map(function(e,t){return r.createElement("li",{key:t},e)})),r.createElement(i.X,{id:"ack",checked:u,onChange:function(e){return p(e.target.checked)},label:e.phrases.acknowledgement}),r.createElement(o.u,null,e.onBack&&r.createElement(o.u.Cancel,{onClick:e.onBack,text:null!==(t=e.phrases.backButton)&&void 0!==t?t:c("backButton"),variant:"link"}),r.createElement(o.u.Submit,{onClick:function(){u&&!e.loading&&e.onDelete()},text:e.phrases.deleteButton,variant:"danger",disabled:!u||e.loading,showSpinner:e.loading})))}},25752:(e,t,n)=>{n.d(t,{q:()=>p});var r=n(32735),a=n(33518),i=n(8233),o=n(83914),l=n(35223),c=n(31138);const s={active:"NV2KW"};function u(e){var t=e.activePrivacy===e.sharePrivacy;return r.createElement("li",null,r.createElement("button",{className:"".concat(t?s.active:""," dropdown-item d-flex align-items-center justify-content-between py-2"),onClick:function(){t||e.onClick(e.sharePrivacy)}},r.createElement("div",{className:"me-4"},r.createElement("p",{className:"font-label mb-1"},e.title),r.createElement("p",{className:"font-size-sm mb-0"},e.description)),t&&r.createElement(o.x,{svgName:l.vn.Check})))}function p(e){var t=e.shareOverrideRestrictions&&!e.hasStudentExp,n=(0,c.f)({entity:e.entity,entityPrivacy:e.entityPrivacy,hasStudentExp:e.hasStudentExp,yearGroups:e.yearGroups,_showPasswordProtected:e.sharePrivacy===a.e.PasswordProtected}),l=i.R.getPrivateIconAndText({privacy:e.sharePrivacy,entityTypeId:e.entityTypeId,hasStudentExp:e.hasStudentExp,entity:e.entity,yearGroups:e.yearGroups}),s=l.icon,p=l.text;return t?r.createElement("div",{className:"btn-group"},r.createElement("button",{className:"btn border-0 info-link dropdown-toggle p-1 bg-light-blue-hover","data-bs-toggle":"dropdown"},r.createElement(o.x,{svgName:s,className:"svg-container me-1"}),r.createElement("span",{className:"me-1"},p)),r.createElement("ul",{className:"dropdown-menu cursor-pointer"},Object.values(a.e).map(function(t){var a=n[t],i=a.title,o=a.description;if((0,a.predicate)())return r.createElement(u,{key:t,sharePrivacy:t,activePrivacy:e.sharePrivacy,title:i,description:o,onClick:e.onClickSavePrivacy})}))):r.createElement("div",{className:"d-flex align-items-center"},r.createElement(o.x,{svgName:s,className:"svg-container me-1"}),r.createElement("span",null,p))}},31138:(e,t,n)=>{n.d(t,{B:()=>d,f:()=>p});var r=n(23481),a=n(75896),i=n(33518),o=n(8233);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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t,n){return(t=function(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=r.T.encloseNamespace("sharev2.getSharePrivacyConfig");function p(e){var t=o.R.getShareLinkAccessType(e.entityPrivacy),n=o.R.getRespectRatingText(e.entity,e.yearGroups,e.hasStudentExp);return s(s(s(s(s(s(s(s({},i.e.JustMySchool,{title:u("respectRatings"),description:n,predicate:function(){return"protected"!==t}}),i.e.Protected,{title:u("respectRatings"),description:n,predicate:function(){return"protected"===t}}),i.e.JustMySchoolOverrideRestriction,{title:u("justMySchool"),description:u("justMySchoolDescription"),predicate:function(){return"protected"!==t}}),i.e.ProtectedOverrideRestriction,{title:u("justMySchool"),description:u("clickViewOnly"),predicate:function(){return"protected"===t}}),i.e.Public,{title:u("public"),description:u("publicDescription"),predicate:function(){return"owner"===t}}),i.e.Direct,{title:"",description:"",predicate:function(){return!1}}),i.e.PasswordProtected,{title:u("passwordProtectedTitle"),description:u("passwordProtectedDescription"),predicate:function(){return e._showPasswordProtected}}),i.e.PinCode,{title:u("pinCode"),description:u("pinCodeDescription"),predicate:function(){return!1}})}function d(e){var t=p(e),n=Object.entries(t).filter(function(e){return(t=e,n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(t,n)||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.")}())[1].predicate();var t,n});if(n.length)return a.m.first(n)[0]}},89701:(e,t,n)=>{n.r(t),n.d(t,{DeleteShareLinkConfirmationView:()=>f});var r=n(32735),a=n(6044),i=n(23481),o=n(65858),l=n(29923),c=n(93563),s=n(87265),u=n(31121),p=n(9111),d=n(69883);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var m=i.T.encloseNamespace("sharev2.deleteShareLinkConfirmation");function f(e){var t,n,i=(0,d.Z)(),f=(t=r.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(t,n)||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.")}()),v=f[0],h=f[1],g=(0,s.s)({entityId:e.entityId,entityType:e.entityType}),b=g.share,S=g.entity,E=(0,c._)({entityId:e.entityId}).deleteShareLink,w=(0,u.j)({data:{entity:{id:e.entityId,type:e.entityType}},analyticsOptions:{location:o.LZ.Popup,eventVersion:o.eq.V3}}).log,k=!!b.data&&!!S.data;return r.createElement(p.G,{title:m("title"),closePopup:e.closePopup,showLoadingSpinner:!k||e.loading,animation:e.animate},r.createElement(l.F,{loading:v,phrases:{leadingSentence:m("intro"),bulletPoints:[m("loseAccessInfo"),m("loseAccessUsage")],acknowledgement:m("acknowledgement"),backButton:m("back"),deleteButton:m("delete")},onDelete:function(){var t;h(!0),E(null===(t=b.data)||void 0===t?void 0:t.shareId).then(function(){w({type:"delete-share-link",share:b.data}),h(!1),i.success(m("deleteSuccess")),e.closePopup(),e.previousAppLink&&a.C$.trigger(e.previousAppLink)}).catch(function(){i.error(m("deleteFailed",{name:S.data.name,escapeText:!0}))}).finally(function(){h(!1)})},onBack:e.goToSettingsStep?e.goToSettingsStep:void 0}))}},28161:(e,t,n)=>{n.d(t,{F:()=>h});var r=n(23481),a=n(20354),i=n(93563),o=n(87265),l=n(2267),c=n(16714),s=n(1666),u=n(69883),p=n(22902),d=n(37802);function y(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function i(n,r,a,i){var c=r&&r.prototype instanceof l?r:l,s=Object.create(c.prototype);return m(s,"_invoke",function(n,r,a){var i,l,c,s=0,u=a||[],p=!1,d={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,l=0,c=e,d.n=n,o}};function y(n,r){for(l=n,c=r,t=0;!p&&s&&!a&&t<u.length;t++){var a,i=u[t],y=d.p,m=i[2];n>3?(a=m===r)&&(c=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=y&&((a=n<2&&y<i[1])?(l=0,d.v=r,d.n=i[1]):y<m&&(a=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,d.n=m,l=0))}if(a||n>1)return o;throw p=!0,r}return function(a,u,m){if(s>1)throw TypeError("Generator is already running");for(p&&1===u&&y(u,m),l=u,c=m;(t=l<2?e:c)||!p;){i||(l?l<3?(l>1&&(d.n=-1),y(l,c)):d.n=c:d.v=c);try{if(s=2,i){if(l||(a="next"),t=i[a]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(c=TypeError("The iterator does not provide a '"+a+"' method"),l=1);i=e}else if((t=(p=d.n<0)?c:n.call(r,d))!==o)break}catch(t){i=e,l=1,c=t}finally{s=1}}return{value:t,done:p}}}(n,a,i),!0),s}var o={};function l(){}function c(){}function s(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(m(t={},r,function(){return this}),t),p=s.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,m(e,a,"GeneratorFunction")),e.prototype=Object.create(p),e}return c.prototype=s,m(p,"constructor",s),m(s,"constructor",c),c.displayName="GeneratorFunction",m(s,a,"GeneratorFunction"),m(p),m(p,a,"Generator"),m(p,r,function(){return this}),m(p,"toString",function(){return"[object Generator]"}),(y=function(){return{w:i,m:d}})()}function m(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}m=function(e,t,n,r){if(t)a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){m(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},m(e,t,n,r)}var f=function(e,t,n,r){return new(n||(n=Promise))(function(a,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function l(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,l)}c((r=r.apply(e,t||[])).next())})},v=r.T.encloseNamespace("sharev2.useMainShareData");function h(e){var t=(0,u.Z)(),n=(0,p.T)().hasPermissions,r=(0,d.r)(null),m=r.shareToGoogleClassroom,h=r.shareToMicrosoftTeams,g=r.isLoadingSettings,b=r.shareOverrideRestrictions,S=(0,o.s)({entityId:e.entityId,entityType:e.entityType}),E=S.currentUser,w=S.entity,k=S.privacy,T=S.share,I=S.config,C=(0,i._)({entityId:e.entityId}),P=C.loaded,x=C.updateShareLink,A=a.a.useBasicFetch(E.data&&s.h.yearGroups(E.data.customerId)),N=l.I.canEmbed(e.entityType),O=l.I.getEnabledIntegrations(m,h),j=n(c.C.ManageIntegrations),L=n(c.C.StudentExperience),G=n(c.C.ManageShareLinkSettings),F=T.data&&l.I.canAddPolicies(e.entityType),R=P&&!!T.data&&!!w.data&&!!k.data&&!!I.data&&!!E.data&&!!A&&!g;return{data:{share:T,loaded:R,entity:w,privacy:k,config:I,yearGroups:A,shareOverrideRestrictions:b,currentUser:E},canEmbed:N,integrations:O,hasStudentExp:L,canAccessSettings:F,hasManageShareLinkSettings:G,hasManageIntegrationsPermission:j,onClickSavePrivacy:function(n){return f(this,void 0,void 0,y().m(function r(){var a;return y().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,x(T.data.shareId,{privacy:n});case 1:a=r.v,e.log({type:"update-share-link",share:a}),t.success(v("privaciesSuccess",{name:w.data.name,escapeText:!0})),r.n=3;break;case 2:r.p=2,r.v,t.error(v("privaciesError",{name:w.data.name,escapeText:!0}));case 3:return r.a(2)}},r,null,[[0,2]])}))}}}},89067:(e,t,n)=>{n.d(t,{r:()=>i});var r=n(32735);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e){var t,n,i,o,l=(i=r.useState(null===(t=e.animate)||void 0===t||t),o=2,function(e){if(Array.isArray(e))return e}(i)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(i,o)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(i,o)||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.")}()),c=l[0],s=l[1],u=e.steps[e.step],p=void 0!==e.loading?{loading:e.loading}:{},d=Object.assign(Object.assign(Object.assign({},e.data),p),{animate:null!==(n=e.animate)&&void 0!==n?n:c,closePopup:function(){e.closePopup()},setStep:function(t){s(!1),e.setStep(t)}});if(!u)return r.createElement(r.Fragment,null);var y=u.view;return r.createElement(y,Object.assign({},d))}},57724:(e,t,n)=>{n.d(t,{g:()=>l});var r=n(32735),a=n(31453),i=n(83345),o="shared.newBadge";function l(e){return r.createElement("span",{className:(0,a.A)("badge badge-wrapper rounded-pill d-flex justify-content-center","fw-medium text-blue","sm"===e.size?"badge-sm":"badge-std",e.invert?"bg-white":"bg-light-blue",e.className)},e.text||r.createElement(i.x,{phrase:"new",namespace:o}))}},84728:(e,t,n)=>{n.r(t),n.d(t,{ShareView:()=>be});var r=n(32735),a=n(99706),i=n(87265),o=n(2267),l=n(23481),c=n(20354),s=n(65858),u=n(51182),p=n(18488),d=n(31121),y=n(9111),m=n(13876),f=l.T.encloseNamespace("sharev2.copyEmbed");function v(e){var t=c.a.useGetFetch(),n=(0,i.s)({entityId:e.entityId,entityType:e.entityType}),a=n.config,o=n.share,l=n.entity,v=(0,d.j)({data:{entity:{id:e.entityId,type:e.entityType}},analyticsOptions:{location:s.LZ.Popup,eventVersion:s.eq.V3}}).log,h=!!o.data&&!!a.data;return r.createElement(y.G,{title:f("title"),closePopup:e.closePopup,showLoadingSpinner:!h||e.loading,animation:e.animate},r.createElement("div",{className:"mb-3"},r.createElement(u.l,{analyticsOptions:{},entity:l.data,embedUrl:o.data.link.shortenedEmbedUrl,entityId:e.entityId,entityType:e.entityType,liteUrl:a.data.liteUrl,shareId:o.data.shareId,onCopy:function(n){v({type:"copy-embed-html",id:e.entityId,shareId:o.data.shareId,shareType:o.data.type,embedDetails:n}),t(p.o.updateDateShared(o.data.shareId))}})),r.createElement(m.u,null,r.createElement(m.u.Cancel,{variant:"link",onClick:e.goToShareLinkStep,text:f("back")})))}var h=n(93563),g=n(2102),b=n(83914),S=n(83345),E=n(69883);function w(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function i(n,r,a,i){var c=r&&r.prototype instanceof l?r:l,s=Object.create(c.prototype);return k(s,"_invoke",function(n,r,a){var i,l,c,s=0,u=a||[],p=!1,d={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,l=0,c=e,d.n=n,o}};function y(n,r){for(l=n,c=r,t=0;!p&&s&&!a&&t<u.length;t++){var a,i=u[t],y=d.p,m=i[2];n>3?(a=m===r)&&(c=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=y&&((a=n<2&&y<i[1])?(l=0,d.v=r,d.n=i[1]):y<m&&(a=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,d.n=m,l=0))}if(a||n>1)return o;throw p=!0,r}return function(a,u,m){if(s>1)throw TypeError("Generator is already running");for(p&&1===u&&y(u,m),l=u,c=m;(t=l<2?e:c)||!p;){i||(l?l<3?(l>1&&(d.n=-1),y(l,c)):d.n=c:d.v=c);try{if(s=2,i){if(l||(a="next"),t=i[a]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(c=TypeError("The iterator does not provide a '"+a+"' method"),l=1);i=e}else if((t=(p=d.n<0)?c:n.call(r,d))!==o)break}catch(t){i=e,l=1,c=t}finally{s=1}}return{value:t,done:p}}}(n,a,i),!0),s}var o={};function l(){}function c(){}function s(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(k(t={},r,function(){return this}),t),p=s.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,k(e,a,"GeneratorFunction")),e.prototype=Object.create(p),e}return c.prototype=s,k(p,"constructor",s),k(s,"constructor",c),c.displayName="GeneratorFunction",k(s,a,"GeneratorFunction"),k(p),k(p,a,"Generator"),k(p,r,function(){return this}),k(p,"toString",function(){return"[object Generator]"}),(w=function(){return{w:i,m:d}})()}function k(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}k=function(e,t,n,r){if(t)a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){k(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},k(e,t,n,r)}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var I=function(e,t,n,r){return new(n||(n=Promise))(function(a,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function l(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,l)}c((r=r.apply(e,t||[])).next())})};function C(){var e,t,n=this,a=(e=(0,r.useState)(null),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(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.")}()),i=a[0],o=a[1];return{copiedText:i,copyToClipboard:(0,r.useCallback)(function(e){return I(n,void 0,void 0,w().m(function t(){var n;return w().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,P(e);case 1:return o(e),t.a(2,!0);case 2:return t.p=2,n=t.v,console.warn("Copy failed",n),o(null),t.a(2,!1)}},t,null,[[0,2]])}))},[])}}function P(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);var t=document.createElement("span");t.textContent=e,t.style.whiteSpace="pre",document.body.appendChild(t);var n=window.getSelection();if(!n)return Promise.reject();var r=window.document.createRange();n.removeAllRanges(),r.selectNode(t),n.addRange(r);try{window.document.execCommand("copy")}catch(e){return Promise.reject()}return n.removeAllRanges(),window.document.body.removeChild(t),Promise.resolve()}var x=n(37802),A=n(80783),N=n(35223),O=n(31453),j=n(15611),L=n(57724);const G={assignPrompt:"R73Xv",badge:"urP15"};var F="sharev2.assignPrompt",R=l.T.encloseNamespace(F);function D(e){return r.createElement(j.F,{appLink:e.appLink,className:(0,O.A)("d-flex flex-row gap-3 p-3 justify-content-between rounded-3 bg-white hover-bg-light-blue",G.assignPrompt)},r.createElement("div",{className:"d-flex flex-row gap-2 align-items-center fw-medium"},r.createElement(S.x,{namespace:F,phrase:"title"}),r.createElement(L.g,{size:"sm",text:R("badgeText"),className:G.badge})),r.createElement("div",null,r.createElement(b.x,{svgName:N.vn.ChevronRight})))}const B={input:"mc17h"};function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var _="sharev2.createShare",M=l.T.encloseNamespace(_),V="https://clickv.ie/...";function Z(e){var t,n,a=(0,E.Z)(),o=(0,x.r)(null).hasClassrooms,l=C().copyToClipboard,c=(0,d.j)({data:{entity:{id:e.entityId,type:e.entityType}},analyticsOptions:{location:s.LZ.Popup,eventVersion:s.eq.V4}}).log,u=(t=r.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(e,t):void 0}}(t,n)||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.")}()),p=u[0],m=u[1],f=(0,i.s)({entityId:e.entityId,entityType:e.entityType}),v=f.entity,w=f.share,k=f.currentUser,T=(0,h._)({entityId:e.entityId}),I=T.loaded,P=T.createShareLink;function O(t){var n;c({type:"create-share-link",share:t}),l(null===(n=t.link)||void 0===n?void 0:n.shortenedUrl).then(function(n){n?(c({type:"copy-share-link",id:v.data.id,shareId:t.shareId,shareType:t.type}),e.setShowCopiedText(!0),setTimeout(function(){return e.setShowCopiedText(!1)},3e3)):a.success(M("createSuccess",{name:v.data.name,escapeText:!0}))}),e.goToShareLinkStep()}r.useEffect(function(){w.data&&e.goToShareLinkStep()},[w.data]);var j=!!v.data&&!!w.hasCompleted&&I,L=!A.z.hideAssignButton(k.data,o),G=L&&j?{popupContentClassName:"bg-transparent border-0",popupBodyClassName:"p-0",topContentClassName:"bg-white rounded-bottom-3 p-3 mb-3"}:null;return r.createElement(y.G,{title:M("title"),closePopup:e.closePopup,showLoadingSpinner:!j||e.loading,animation:e.animate,contentClassName:null==G?void 0:G.popupContentClassName,bodyClassName:null==G?void 0:G.popupBodyClassName},r.createElement("div",{className:null==G?void 0:G.topContentClassName},r.createElement("p",{className:"mb-2"},r.createElement(S.x,{namespace:_,phrase:"info"})),r.createElement("div",{className:"d-flex gap-2 position-relative w-100"},r.createElement("input",{type:"text",autoComplete:"off",className:"form-control ".concat(B.input),spellCheck:!1,placeholder:V,readOnly:!0}),r.createElement(g.m,{variant:"dark",showSpinner:p,className:"text-nowrap d-flex align-items-center gap-1",onClick:function(){m(!0),P().then(O).catch(function(){a.error(M("createError",{name:v.data.name,escapeText:!0}))}).finally(function(){m(!1)})},spinnerText:M("buttonLoading")},r.createElement(b.x,{svgName:N.vn.Link}),r.createElement(S.x,{namespace:_,phrase:"button"})))),L&&e.assignFlowSelectorAppLink&&r.createElement(D,{appLink:e.assignFlowSelectorAppLink}))}var $=n(89701),q=n(25752),z=n(66257);function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function H(e){var t,n,a=(t=r.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}(t,n)||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.")}()),i=a[0],o=a[1];return r.createElement("div",{className:"d-flex justify-content-start align-items-start flex-column gap-2"},r.createElement(q.q,{sharePrivacy:e.share.privacy,entityPrivacy:e.privacy,entityTypeId:e.entity.typeId,entity:e.entity,yearGroups:e.yearGroups,hasStudentExp:e.hasStudentExp,shareOverrideRestrictions:e.shareOverrideRestrictions,onClickSavePrivacy:e.onClickSavePrivacy}),r.createElement(z.k,{styling:"normal-v2",value:e.share.link.shortenedUrl,showCopiedText:e.showCopiedText,onCopy:function(){i||(o(!0),"function"==typeof e.onCopy&&e.onCopy())}}))}var J=n(41635),X=n(16862),Y=n(11607),K="sharev2.sharePermanentLinkDelete";function Q(e){return r.createElement("div",{className:"d-flex flex-row justify-content-between align-items-center"},r.createElement(Y.L,{onClick:e.onClick,className:"d-inline-block p-1 pe-2 rounded-1 hover-bg-light-blue"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"me-2"},r.createElement(b.x,{svgName:N.vn.Delete,size:b.S.Standard})),r.createElement(S.x,{namespace:K,phrase:"deleteLink"}))))}var ee="sharev2.sharePermanentLinkSetting";function te(e){return e.manageShareLinkSettings?r.createElement("div",{className:"d-flex flex-row justify-content-between align-items-center"},r.createElement(Y.L,{onClick:e.onClickEditSettings,className:"d-inline-block p-1 pe-2 rounded-1 hover-bg-light-blue"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"me-2"},r.createElement(b.x,{svgName:N.vn.Cog,size:b.S.Standard})),r.createElement(S.x,{namespace:ee,phrase:"editSettings"})))):null}function ne(e){return r.createElement("div",{className:"d-flex flex-row justify-content-between gap-2"},r.createElement("div",null,e.canEmbed&&r.createElement(J.R,{onClickGetEmbedCode:e.onClickGetEmbedCode,minimal:!0}),e.canAccessSettings?r.createElement(te,{manageShareLinkSettings:e.hasManageShareLinkSettings,onClickEditSettings:e.goToSettingsStep}):r.createElement(Q,{onClick:e.goToDeleteStep})),r.createElement("div",null,e.showIntegrations&&!!e.integrations.length&&r.createElement(X.T,{integrations:e.integrations,url:e.shareLink,closePopup:e.closePopup,hideLookingForIntegrations:!0})))}var re=n(10628),ae=n(28161),ie=l.T.encloseNamespace("sharev2.mainShareView");function oe(e){var t,n=c.a.useGetFetch(),a=(0,x.r)(null).hasClassrooms,i=(0,d.j)({data:{entity:{id:e.entityId,type:e.entityType}},analyticsOptions:{eventVersion:s.eq.V3,location:s.LZ.Popup}}).log,o=(0,ae.F)({entityId:e.entityId,entityType:e.entityType,log:i}),l=o.data,u=o.canEmbed,m=o.integrations,f=o.hasStudentExp,v=o.canAccessSettings,h=o.hasManageShareLinkSettings,g=o.hasManageIntegrationsPermission,b=o.onClickSavePrivacy,S=l.share,E=l.loaded,w=l.entity,k=l.privacy,T=l.yearGroups,I=l.shareOverrideRestrictions,C=l.currentUser,P=!A.z.hideAssignButton(C.data,a),N=P&&E?{popupContentClassName:"bg-transparent border-0",popupBodyClassName:"p-0",topContentClassName:"bg-white rounded-bottom-3 p-3 mb-3"}:null,j=g?e.integrationSettingAppLink:e.messagePopupAppLink;return r.createElement(y.G,{animation:e.animate,title:ie("title"),closePopup:e.closePopup,showLoadingSpinner:!E||e.loading,contentClassName:null==N?void 0:N.popupContentClassName,bodyClassName:null==N?void 0:N.popupBodyClassName},r.createElement("div",{className:(0,O.A)("d-flex flex-column gap-2",null==N?void 0:N.topContentClassName)},r.createElement(H,{share:S.data,entity:w.data,privacy:k.data,yearGroups:T.data,entityType:e.entityType,hasStudentExp:f,showCopiedText:e.showCopiedText,shareOverrideRestrictions:I,onCopy:function(){i({type:"copy-share-link",id:w.data.id,shareId:S.data.shareId,shareType:S.data.type}),n(p.o.updateDateShared(S.data.shareId))},onClickSavePrivacy:b}),r.createElement(ne,{canEmbed:u,integrations:m,canAccessSettings:v,shareLink:null===(t=S.data)||void 0===t?void 0:t.link.shortenedUrl,showIntegrations:e.enableIntegrationBanner,hasManageShareLinkSettings:h,closePopup:e.closePopup,goToDeleteStep:e.goToDeleteStep,goToSettingsStep:e.goToSettingsStep,onClickGetEmbedCode:e.goToCopyEmbedStep}),e.enableIntegrationBanner&&!m.length&&r.createElement(re.H,{normalText:!0,hideDismiss:!0,hideBackground:!0,appLink:j,closePopup:e.closePopup})),P&&e.assignFlowSelectorAppLink&&r.createElement(D,{appLink:e.assignFlowSelectorAppLink}))}var le=n(81192),ce=n(2867),se=l.T.encloseNamespace("sharev2.shareSettingsView");function ue(e){var t=(0,d.j)({data:{entity:{id:e.entityId,type:e.entityType}},analyticsOptions:{location:s.LZ.Popup,eventVersion:s.eq.V3}}).log,n=(0,ce.W)({entityId:e.entityId,entityType:e.entityType,log:t}),a=n.initialValues,i=n.onClickSaveLink,l=o.I.getEnabledSettingsField(e.entityType),c=l.showImmediateFeedbackField,u=l.showPreventScrubbingField;return r.createElement(y.G,{title:se("title"),showLoadingSpinner:e.loading,closePopup:e.closePopup,animation:e.animate},r.createElement(le.Z,{initialValues:a,onSubmit:function(e,t){i({options:{immediateFeedback:e.immediateFeedback,preventScrubbing:e.preventScrubbing}},t)},onClickDelete:e.goToDeleteStep,showImmediateFeedbackField:c,showPreventScrubbingField:u}),r.createElement(m.u,{className:"mt-3"},r.createElement(m.u.Cancel,{onClick:e.goToShareLinkStep,text:se("back"),variant:"link"})))}var pe=n(89067);function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ye(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(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 ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function me(e){var t=(0,i.s)({entityId:e.entityId,entityType:e.entityType}).share,n=de(r.useState(!0),2),a=n[0],l=n[1],c=de(r.useState(t.data?"share-link":"create-link"),2),s=c[0],u=c[1],p=de(r.useState(!1),2),d=p[0],y=p[1],m=o.I.canAddPolicies(e.entityType);function f(e){l(!1),u(e)}var h={entityId:e.entityId,entityType:e.entityType,showCopiedText:d,messagePopupAppLink:e.messagePopupAppLink,enableIntegrationBanner:e.enableIntegrationBanner,integrationSettingAppLink:e.integrationSettingAppLink,assignFlowSelectorAppLink:e.assignFlowSelectorAppLink,goToShareLinkStep:function(){return f("share-link")},goToDeleteStep:function(){return f("delete-confirmation")},goToCopyEmbedStep:function(){return f("copy-embed")},goToSettingsStep:function(){f(m?"link-settings":"share-link")},closePopup:e.closePopup,setShowCopiedText:y};return r.createElement(pe.r,{step:s,animate:a,setStep:f,loading:!t.hasCompleted,closePopup:e.closePopup,data:h,steps:{"create-link":{view:Z},"share-link":{view:oe},"link-settings":{view:ue},"copy-embed":{view:v},"delete-confirmation":{view:$.DeleteShareLinkConfirmationView}}})}var fe=n(99742),ve=n(14070),he=n(97291),ge=n(40254);function be(e){var t=(0,x.r)(null),n=t.hasShareFlowV2;if(t.isLoadingSettings)return r.createElement(r.Fragment,null);if(!n)return r.createElement(a.ShareView,{entityId:e.entityId,entityType:e.entityType,closePopup:e.closePopup,emptyStateImageUrl:fe.W.EmptyStates.TYPEAHEAD_RESULTS,errorStateImageUrl:fe.W.TYPEAHEAD_ERROR,messagePopupAppLink:{application:he.O.DEFAULT,action:ve.e.Default.INTEGRATIONS_INFO},integrationSettingAppLink:{application:he.O.SETTINGS,action:ve.e.Settings.INTEGRATIONS},enableIntegrationBanner:e.enableIntegrationBanner});var i="series"===e.entityType?ge.W.existingClassroom({entityType:"series",objectId:e.entityId}):ge.W.flowSelector({entityType:e.entityType,objectId:e.entityId});return r.createElement(me,{entityId:e.entityId,entityType:e.entityType,closePopup:e.closePopup,messagePopupAppLink:{application:he.O.DEFAULT,action:ve.e.Default.INTEGRATIONS_INFO},integrationSettingAppLink:{application:he.O.SETTINGS,action:ve.e.Settings.INTEGRATIONS},enableIntegrationBanner:e.enableIntegrationBanner,assignFlowSelectorAppLink:i})}}}]);
|
|
3
|
-
//# sourceMappingURL=3811-
|
|
1
|
+
/*! For license information please see 3811-282392e8bf-lite.chunk.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3811,3105],{51182:(e,t,n)=>{n.d(t,{l:()=>r.l});var r=n(72632)},29923:(e,t,n)=>{n.d(t,{F:()=>s});var r=n(32735),a=n(23481),i=n(89965),o=n(13876);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var c=a.T.encloseNamespace("sharev2.deleteShareContent");function s(e){var t,n,a,s=(n=r.useState(!1),a=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(n,a)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(n,a)||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.")}()),u=s[0],p=s[1];return r.createElement("div",{className:"d-flex flex-column gap-3"},r.createElement("p",{className:"m-0"},e.phrases.leadingSentence),r.createElement("ul",{className:"m-0"},e.phrases.bulletPoints.map(function(e,t){return r.createElement("li",{key:t},e)})),r.createElement(i.X,{id:"ack",checked:u,onChange:function(e){return p(e.target.checked)},label:e.phrases.acknowledgement}),r.createElement(o.u,null,e.onBack&&r.createElement(o.u.Cancel,{onClick:e.onBack,text:null!==(t=e.phrases.backButton)&&void 0!==t?t:c("backButton"),variant:"link"}),r.createElement(o.u.Submit,{onClick:function(){u&&!e.loading&&e.onDelete()},text:e.phrases.deleteButton,variant:"danger",disabled:!u||e.loading,showSpinner:e.loading})))}},25752:(e,t,n)=>{n.d(t,{q:()=>p});var r=n(32735),a=n(33518),i=n(8233),o=n(83914),l=n(35223),c=n(31138);const s={active:"NV2KW"};function u(e){var t=e.activePrivacy===e.sharePrivacy;return r.createElement("li",null,r.createElement("button",{className:"".concat(t?s.active:""," dropdown-item d-flex align-items-center justify-content-between py-2"),onClick:function(){t||e.onClick(e.sharePrivacy)}},r.createElement("div",{className:"me-4"},r.createElement("p",{className:"font-label mb-1"},e.title),r.createElement("p",{className:"font-size-sm mb-0"},e.description)),t&&r.createElement(o.x,{svgName:l.vn.Check})))}function p(e){var t=e.shareOverrideRestrictions&&!e.hasStudentExp,n=(0,c.f)({entity:e.entity,entityPrivacy:e.entityPrivacy,hasStudentExp:e.hasStudentExp,yearGroups:e.yearGroups,_showPasswordProtected:e.sharePrivacy===a.e.PasswordProtected}),l=i.R.getPrivateIconAndText({privacy:e.sharePrivacy,entityTypeId:e.entityTypeId,hasStudentExp:e.hasStudentExp,entity:e.entity,yearGroups:e.yearGroups}),s=l.icon,p=l.text;return t?r.createElement("div",{className:"btn-group"},r.createElement("button",{className:"btn border-0 info-link dropdown-toggle p-1 bg-light-blue-hover","data-bs-toggle":"dropdown"},r.createElement(o.x,{svgName:s,className:"svg-container me-1"}),r.createElement("span",{className:"me-1"},p)),r.createElement("ul",{className:"dropdown-menu cursor-pointer"},Object.values(a.e).map(function(t){var a=n[t],i=a.title,o=a.description;if((0,a.predicate)())return r.createElement(u,{key:t,sharePrivacy:t,activePrivacy:e.sharePrivacy,title:i,description:o,onClick:e.onClickSavePrivacy})}))):r.createElement("div",{className:"d-flex align-items-center"},r.createElement(o.x,{svgName:s,className:"svg-container me-1"}),r.createElement("span",null,p))}},31138:(e,t,n)=>{n.d(t,{B:()=>d,f:()=>p});var r=n(23481),a=n(75896),i=n(33518),o=n(8233);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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t,n){return(t=function(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=r.T.encloseNamespace("sharev2.getSharePrivacyConfig");function p(e){var t=o.R.getShareLinkAccessType(e.entityPrivacy),n=o.R.getRespectRatingText(e.entity,e.yearGroups,e.hasStudentExp);return s(s(s(s(s(s(s(s({},i.e.JustMySchool,{title:u("respectRatings"),description:n,predicate:function(){return"protected"!==t}}),i.e.Protected,{title:u("respectRatings"),description:n,predicate:function(){return"protected"===t}}),i.e.JustMySchoolOverrideRestriction,{title:u("justMySchool"),description:u("justMySchoolDescription"),predicate:function(){return"protected"!==t}}),i.e.ProtectedOverrideRestriction,{title:u("justMySchool"),description:u("clickViewOnly"),predicate:function(){return"protected"===t}}),i.e.Public,{title:u("public"),description:u("publicDescription"),predicate:function(){return"owner"===t}}),i.e.Direct,{title:"",description:"",predicate:function(){return!1}}),i.e.PasswordProtected,{title:u("passwordProtectedTitle"),description:u("passwordProtectedDescription"),predicate:function(){return e._showPasswordProtected}}),i.e.PinCode,{title:u("pinCode"),description:u("pinCodeDescription"),predicate:function(){return!1}})}function d(e){var t=p(e),n=Object.entries(t).filter(function(e){return(t=e,n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(t,n)||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.")}())[1].predicate();var t,n});if(n.length)return a.m.first(n)[0]}},89701:(e,t,n)=>{n.r(t),n.d(t,{DeleteShareLinkConfirmationView:()=>f});var r=n(32735),a=n(6044),i=n(23481),o=n(65858),l=n(29923),c=n(93563),s=n(87265),u=n(31121),p=n(9111),d=n(69883);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var m=i.T.encloseNamespace("sharev2.deleteShareLinkConfirmation");function f(e){var t,n,i=(0,d.Z)(),f=(t=r.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(t,n)||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.")}()),v=f[0],h=f[1],g=(0,s.s)({entityId:e.entityId,entityType:e.entityType}),b=g.share,S=g.entity,E=(0,c._)({entityId:e.entityId}).deleteShareLink,w=(0,u.j)({data:{entity:{id:e.entityId,type:e.entityType}},analyticsOptions:{location:o.LZ.Popup,eventVersion:o.eq.V3}}).log,k=!!b.data&&!!S.data;return r.createElement(p.G,{title:m("title"),closePopup:e.closePopup,showLoadingSpinner:!k||e.loading,animation:e.animate},r.createElement(l.F,{loading:v,phrases:{leadingSentence:m("intro"),bulletPoints:[m("loseAccessInfo"),m("loseAccessUsage")],acknowledgement:m("acknowledgement"),backButton:m("back"),deleteButton:m("delete")},onDelete:function(){var t;h(!0),E(null===(t=b.data)||void 0===t?void 0:t.shareId).then(function(){w({type:"delete-share-link",share:b.data}),h(!1),i.success(m("deleteSuccess")),e.closePopup(),e.previousAppLink&&a.C$.trigger(e.previousAppLink)}).catch(function(){i.error(m("deleteFailed",{name:S.data.name,escapeText:!0}))}).finally(function(){h(!1)})},onBack:e.goToSettingsStep?e.goToSettingsStep:void 0}))}},28161:(e,t,n)=>{n.d(t,{F:()=>h});var r=n(23481),a=n(20354),i=n(93563),o=n(87265),l=n(2267),c=n(16714),s=n(1666),u=n(69883),p=n(22902),d=n(37802);function y(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function i(n,r,a,i){var c=r&&r.prototype instanceof l?r:l,s=Object.create(c.prototype);return m(s,"_invoke",function(n,r,a){var i,l,c,s=0,u=a||[],p=!1,d={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,l=0,c=e,d.n=n,o}};function y(n,r){for(l=n,c=r,t=0;!p&&s&&!a&&t<u.length;t++){var a,i=u[t],y=d.p,m=i[2];n>3?(a=m===r)&&(c=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=y&&((a=n<2&&y<i[1])?(l=0,d.v=r,d.n=i[1]):y<m&&(a=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,d.n=m,l=0))}if(a||n>1)return o;throw p=!0,r}return function(a,u,m){if(s>1)throw TypeError("Generator is already running");for(p&&1===u&&y(u,m),l=u,c=m;(t=l<2?e:c)||!p;){i||(l?l<3?(l>1&&(d.n=-1),y(l,c)):d.n=c:d.v=c);try{if(s=2,i){if(l||(a="next"),t=i[a]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(c=TypeError("The iterator does not provide a '"+a+"' method"),l=1);i=e}else if((t=(p=d.n<0)?c:n.call(r,d))!==o)break}catch(t){i=e,l=1,c=t}finally{s=1}}return{value:t,done:p}}}(n,a,i),!0),s}var o={};function l(){}function c(){}function s(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(m(t={},r,function(){return this}),t),p=s.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,m(e,a,"GeneratorFunction")),e.prototype=Object.create(p),e}return c.prototype=s,m(p,"constructor",s),m(s,"constructor",c),c.displayName="GeneratorFunction",m(s,a,"GeneratorFunction"),m(p),m(p,a,"Generator"),m(p,r,function(){return this}),m(p,"toString",function(){return"[object Generator]"}),(y=function(){return{w:i,m:d}})()}function m(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}m=function(e,t,n,r){if(t)a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){m(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},m(e,t,n,r)}var f=function(e,t,n,r){return new(n||(n=Promise))(function(a,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function l(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,l)}c((r=r.apply(e,t||[])).next())})},v=r.T.encloseNamespace("sharev2.useMainShareData");function h(e){var t=(0,u.Z)(),n=(0,p.T)().hasPermissions,r=(0,d.r)(null),m=r.shareToGoogleClassroom,h=r.shareToMicrosoftTeams,g=r.isLoadingSettings,b=r.shareOverrideRestrictions,S=(0,o.s)({entityId:e.entityId,entityType:e.entityType}),E=S.currentUser,w=S.entity,k=S.privacy,T=S.share,I=S.config,C=(0,i._)({entityId:e.entityId}),P=C.loaded,x=C.updateShareLink,A=a.a.useBasicFetch(E.data&&s.h.yearGroups(E.data.customerId)),N=l.I.canEmbed(e.entityType),O=l.I.getEnabledIntegrations(m,h),j=n(c.C.ManageIntegrations),L=n(c.C.StudentExperience),G=n(c.C.ManageShareLinkSettings),F=T.data&&l.I.canAddPolicies(e.entityType),R=P&&!!T.data&&!!w.data&&!!k.data&&!!I.data&&!!E.data&&!!A&&!g;return{data:{share:T,loaded:R,entity:w,privacy:k,config:I,yearGroups:A,shareOverrideRestrictions:b,currentUser:E},canEmbed:N,integrations:O,hasStudentExp:L,canAccessSettings:F,hasManageShareLinkSettings:G,hasManageIntegrationsPermission:j,onClickSavePrivacy:function(n){return f(this,void 0,void 0,y().m(function r(){var a;return y().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,x(T.data.shareId,{privacy:n});case 1:a=r.v,e.log({type:"update-share-link",share:a}),t.success(v("privaciesSuccess",{name:w.data.name,escapeText:!0})),r.n=3;break;case 2:r.p=2,r.v,t.error(v("privaciesError",{name:w.data.name,escapeText:!0}));case 3:return r.a(2)}},r,null,[[0,2]])}))}}}},89067:(e,t,n)=>{n.d(t,{r:()=>i});var r=n(32735);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e){var t,n,i,o,l=(i=r.useState(null===(t=e.animate)||void 0===t||t),o=2,function(e){if(Array.isArray(e))return e}(i)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(i,o)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(i,o)||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.")}()),c=l[0],s=l[1],u=e.steps[e.step],p=void 0!==e.loading?{loading:e.loading}:{},d=Object.assign(Object.assign(Object.assign({},e.data),p),{animate:null!==(n=e.animate)&&void 0!==n?n:c,closePopup:function(){e.closePopup()},setStep:function(t){s(!1),e.setStep(t)}});if(!u)return r.createElement(r.Fragment,null);var y=u.view;return r.createElement(y,Object.assign({},d))}},57724:(e,t,n)=>{n.d(t,{g:()=>l});var r=n(32735),a=n(31453),i=n(83345),o="shared.newBadge";function l(e){return r.createElement("span",{className:(0,a.A)("badge badge-wrapper rounded-pill d-flex justify-content-center","fw-medium text-blue","sm"===e.size?"badge-sm":"badge-std",e.invert?"bg-white":"bg-light-blue",e.className)},e.text||r.createElement(i.x,{phrase:"new",namespace:o}))}},84728:(e,t,n)=>{n.r(t),n.d(t,{ShareView:()=>be});var r=n(32735),a=n(99706),i=n(87265),o=n(2267),l=n(23481),c=n(20354),s=n(65858),u=n(51182),p=n(18488),d=n(31121),y=n(9111),m=n(13876),f=l.T.encloseNamespace("sharev2.copyEmbed");function v(e){var t=c.a.useGetFetch(),n=(0,i.s)({entityId:e.entityId,entityType:e.entityType}),a=n.config,o=n.share,l=n.entity,v=(0,d.j)({data:{entity:{id:e.entityId,type:e.entityType}},analyticsOptions:{location:s.LZ.Popup,eventVersion:s.eq.V3}}).log,h=!!o.data&&!!a.data;return r.createElement(y.G,{title:f("title"),closePopup:e.closePopup,showLoadingSpinner:!h||e.loading,animation:e.animate},r.createElement("div",{className:"mb-3"},r.createElement(u.l,{analyticsOptions:{},entity:l.data,embedUrl:o.data.link.shortenedEmbedUrl,entityId:e.entityId,entityType:e.entityType,liteUrl:a.data.liteUrl,shareId:o.data.shareId,onCopy:function(n){v({type:"copy-embed-html",id:e.entityId,shareId:o.data.shareId,shareType:o.data.type,embedDetails:n}),t(p.o.updateDateShared(o.data.shareId))}})),r.createElement(m.u,null,r.createElement(m.u.Cancel,{variant:"link",onClick:e.goToShareLinkStep,text:f("back")})))}var h=n(93563),g=n(2102),b=n(83914),S=n(83345),E=n(69883);function w(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function i(n,r,a,i){var c=r&&r.prototype instanceof l?r:l,s=Object.create(c.prototype);return k(s,"_invoke",function(n,r,a){var i,l,c,s=0,u=a||[],p=!1,d={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return i=t,l=0,c=e,d.n=n,o}};function y(n,r){for(l=n,c=r,t=0;!p&&s&&!a&&t<u.length;t++){var a,i=u[t],y=d.p,m=i[2];n>3?(a=m===r)&&(c=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=y&&((a=n<2&&y<i[1])?(l=0,d.v=r,d.n=i[1]):y<m&&(a=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,d.n=m,l=0))}if(a||n>1)return o;throw p=!0,r}return function(a,u,m){if(s>1)throw TypeError("Generator is already running");for(p&&1===u&&y(u,m),l=u,c=m;(t=l<2?e:c)||!p;){i||(l?l<3?(l>1&&(d.n=-1),y(l,c)):d.n=c:d.v=c);try{if(s=2,i){if(l||(a="next"),t=i[a]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(c=TypeError("The iterator does not provide a '"+a+"' method"),l=1);i=e}else if((t=(p=d.n<0)?c:n.call(r,d))!==o)break}catch(t){i=e,l=1,c=t}finally{s=1}}return{value:t,done:p}}}(n,a,i),!0),s}var o={};function l(){}function c(){}function s(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(k(t={},r,function(){return this}),t),p=s.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,k(e,a,"GeneratorFunction")),e.prototype=Object.create(p),e}return c.prototype=s,k(p,"constructor",s),k(s,"constructor",c),c.displayName="GeneratorFunction",k(s,a,"GeneratorFunction"),k(p),k(p,a,"Generator"),k(p,r,function(){return this}),k(p,"toString",function(){return"[object Generator]"}),(w=function(){return{w:i,m:d}})()}function k(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}k=function(e,t,n,r){if(t)a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){k(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},k(e,t,n,r)}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var I=function(e,t,n,r){return new(n||(n=Promise))(function(a,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function l(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,l)}c((r=r.apply(e,t||[])).next())})};function C(){var e,t,n=this,a=(e=(0,r.useState)(null),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(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.")}()),i=a[0],o=a[1];return{copiedText:i,copyToClipboard:(0,r.useCallback)(function(e){return I(n,void 0,void 0,w().m(function t(){var n;return w().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,P(e);case 1:return o(e),t.a(2,!0);case 2:return t.p=2,n=t.v,console.warn("Copy failed",n),o(null),t.a(2,!1)}},t,null,[[0,2]])}))},[])}}function P(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);var t=document.createElement("span");t.textContent=e,t.style.whiteSpace="pre",document.body.appendChild(t);var n=window.getSelection();if(!n)return Promise.reject();var r=window.document.createRange();n.removeAllRanges(),r.selectNode(t),n.addRange(r);try{window.document.execCommand("copy")}catch(e){return Promise.reject()}return n.removeAllRanges(),window.document.body.removeChild(t),Promise.resolve()}var x=n(37802),A=n(80783),N=n(35223),O=n(31453),j=n(15611),L=n(57724);const G={assignPrompt:"R73Xv",badge:"urP15"};var F="sharev2.assignPrompt",R=l.T.encloseNamespace(F);function D(e){return r.createElement(j.F,{appLink:e.appLink,className:(0,O.A)("d-flex flex-row gap-3 p-3 justify-content-between rounded-3 bg-white hover-bg-light-blue",G.assignPrompt)},r.createElement("div",{className:"d-flex flex-row gap-2 align-items-center fw-medium"},r.createElement(S.x,{namespace:F,phrase:"title"}),r.createElement(L.g,{size:"sm",text:R("badgeText"),className:G.badge})),r.createElement("div",null,r.createElement(b.x,{svgName:N.vn.ChevronRight})))}const B={input:"mc17h"};function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var _="sharev2.createShare",M=l.T.encloseNamespace(_),V="https://clickv.ie/...";function Z(e){var t,n,a=(0,E.Z)(),o=(0,x.r)(null).hasClassrooms,l=C().copyToClipboard,c=(0,d.j)({data:{entity:{id:e.entityId,type:e.entityType}},analyticsOptions:{location:s.LZ.Popup,eventVersion:s.eq.V4}}).log,u=(t=r.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(e,t):void 0}}(t,n)||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.")}()),p=u[0],m=u[1],f=(0,i.s)({entityId:e.entityId,entityType:e.entityType}),v=f.entity,w=f.share,k=f.currentUser,T=(0,h._)({entityId:e.entityId}),I=T.loaded,P=T.createShareLink;function O(t){var n;c({type:"create-share-link",share:t}),l(null===(n=t.link)||void 0===n?void 0:n.shortenedUrl).then(function(n){n?(c({type:"copy-share-link",id:v.data.id,shareId:t.shareId,shareType:t.type}),e.setShowCopiedText(!0),setTimeout(function(){return e.setShowCopiedText(!1)},3e3)):a.success(M("createSuccess",{name:v.data.name,escapeText:!0}))}),e.goToShareLinkStep()}r.useEffect(function(){w.data&&e.goToShareLinkStep()},[w.data]);var j=!!v.data&&!!w.hasCompleted&&I,L=A.z.hideAssignButton(k.data,o),G=L&&j?{popupContentClassName:"bg-transparent border-0",popupBodyClassName:"p-0",topContentClassName:"bg-white rounded-bottom-3 p-3 mb-3"}:null;return r.createElement(y.G,{title:M("title"),closePopup:e.closePopup,showLoadingSpinner:!j||e.loading,animation:e.animate,contentClassName:null==G?void 0:G.popupContentClassName,bodyClassName:null==G?void 0:G.popupBodyClassName},r.createElement("div",{className:null==G?void 0:G.topContentClassName},r.createElement("p",{className:"mb-2"},r.createElement(S.x,{namespace:_,phrase:"info"})),r.createElement("div",{className:"d-flex gap-2 position-relative w-100"},r.createElement("input",{type:"text",autoComplete:"off",className:"form-control ".concat(B.input),spellCheck:!1,placeholder:V,readOnly:!0}),r.createElement(g.m,{variant:"dark",showSpinner:p,className:"text-nowrap d-flex align-items-center gap-1",onClick:function(){m(!0),P().then(O).catch(function(){a.error(M("createError",{name:v.data.name,escapeText:!0}))}).finally(function(){m(!1)})},spinnerText:M("buttonLoading")},r.createElement(b.x,{svgName:N.vn.Link}),r.createElement(S.x,{namespace:_,phrase:"button"})))),L&&e.assignFlowSelectorAppLink&&r.createElement(D,{appLink:e.assignFlowSelectorAppLink}))}var $=n(89701),q=n(25752),z=n(66257);function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function H(e){var t,n,a=(t=r.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}(t,n)||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.")}()),i=a[0],o=a[1];return r.createElement("div",{className:"d-flex justify-content-start align-items-start flex-column gap-2"},r.createElement(q.q,{sharePrivacy:e.share.privacy,entityPrivacy:e.privacy,entityTypeId:e.entity.typeId,entity:e.entity,yearGroups:e.yearGroups,hasStudentExp:e.hasStudentExp,shareOverrideRestrictions:e.shareOverrideRestrictions,onClickSavePrivacy:e.onClickSavePrivacy}),r.createElement(z.k,{styling:"normal-v2",value:e.share.link.shortenedUrl,showCopiedText:e.showCopiedText,onCopy:function(){i||(o(!0),"function"==typeof e.onCopy&&e.onCopy())}}))}var J=n(41635),X=n(16862),Y=n(11607),K="sharev2.sharePermanentLinkDelete";function Q(e){return r.createElement("div",{className:"d-flex flex-row justify-content-between align-items-center"},r.createElement(Y.L,{onClick:e.onClick,className:"d-inline-block p-1 pe-2 rounded-1 hover-bg-light-blue"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"me-2"},r.createElement(b.x,{svgName:N.vn.Delete,size:b.S.Standard})),r.createElement(S.x,{namespace:K,phrase:"deleteLink"}))))}var ee="sharev2.sharePermanentLinkSetting";function te(e){return e.manageShareLinkSettings?r.createElement("div",{className:"d-flex flex-row justify-content-between align-items-center"},r.createElement(Y.L,{onClick:e.onClickEditSettings,className:"d-inline-block p-1 pe-2 rounded-1 hover-bg-light-blue"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"me-2"},r.createElement(b.x,{svgName:N.vn.Cog,size:b.S.Standard})),r.createElement(S.x,{namespace:ee,phrase:"editSettings"})))):null}function ne(e){return r.createElement("div",{className:"d-flex flex-row justify-content-between gap-2"},r.createElement("div",null,e.canEmbed&&r.createElement(J.R,{onClickGetEmbedCode:e.onClickGetEmbedCode,minimal:!0}),e.canAccessSettings?r.createElement(te,{manageShareLinkSettings:e.hasManageShareLinkSettings,onClickEditSettings:e.goToSettingsStep}):r.createElement(Q,{onClick:e.goToDeleteStep})),r.createElement("div",null,e.showIntegrations&&!!e.integrations.length&&r.createElement(X.T,{integrations:e.integrations,url:e.shareLink,closePopup:e.closePopup,hideLookingForIntegrations:!0})))}var re=n(10628),ae=n(28161),ie=l.T.encloseNamespace("sharev2.mainShareView");function oe(e){var t,n=c.a.useGetFetch(),a=(0,x.r)(null).hasClassrooms,i=(0,d.j)({data:{entity:{id:e.entityId,type:e.entityType}},analyticsOptions:{eventVersion:s.eq.V3,location:s.LZ.Popup}}).log,o=(0,ae.F)({entityId:e.entityId,entityType:e.entityType,log:i}),l=o.data,u=o.canEmbed,m=o.integrations,f=o.hasStudentExp,v=o.canAccessSettings,h=o.hasManageShareLinkSettings,g=o.hasManageIntegrationsPermission,b=o.onClickSavePrivacy,S=l.share,E=l.loaded,w=l.entity,k=l.privacy,T=l.yearGroups,I=l.shareOverrideRestrictions,C=l.currentUser,P=A.z.hideAssignButton(C.data,a),N=P&&E?{popupContentClassName:"bg-transparent border-0",popupBodyClassName:"p-0",topContentClassName:"bg-white rounded-bottom-3 p-3 mb-3"}:null,j=g?e.integrationSettingAppLink:e.messagePopupAppLink;return r.createElement(y.G,{animation:e.animate,title:ie("title"),closePopup:e.closePopup,showLoadingSpinner:!E||e.loading,contentClassName:null==N?void 0:N.popupContentClassName,bodyClassName:null==N?void 0:N.popupBodyClassName},r.createElement("div",{className:(0,O.A)("d-flex flex-column gap-2",null==N?void 0:N.topContentClassName)},r.createElement(H,{share:S.data,entity:w.data,privacy:k.data,yearGroups:T.data,entityType:e.entityType,hasStudentExp:f,showCopiedText:e.showCopiedText,shareOverrideRestrictions:I,onCopy:function(){i({type:"copy-share-link",id:w.data.id,shareId:S.data.shareId,shareType:S.data.type}),n(p.o.updateDateShared(S.data.shareId))},onClickSavePrivacy:b}),r.createElement(ne,{canEmbed:u,integrations:m,canAccessSettings:v,shareLink:null===(t=S.data)||void 0===t?void 0:t.link.shortenedUrl,showIntegrations:e.enableIntegrationBanner,hasManageShareLinkSettings:h,closePopup:e.closePopup,goToDeleteStep:e.goToDeleteStep,goToSettingsStep:e.goToSettingsStep,onClickGetEmbedCode:e.goToCopyEmbedStep}),e.enableIntegrationBanner&&!m.length&&r.createElement(re.H,{normalText:!0,hideDismiss:!0,hideBackground:!0,appLink:j,closePopup:e.closePopup})),P&&e.assignFlowSelectorAppLink&&r.createElement(D,{appLink:e.assignFlowSelectorAppLink}))}var le=n(81192),ce=n(2867),se=l.T.encloseNamespace("sharev2.shareSettingsView");function ue(e){var t=(0,d.j)({data:{entity:{id:e.entityId,type:e.entityType}},analyticsOptions:{location:s.LZ.Popup,eventVersion:s.eq.V3}}).log,n=(0,ce.W)({entityId:e.entityId,entityType:e.entityType,log:t}),a=n.initialValues,i=n.onClickSaveLink,l=o.I.getEnabledSettingsField(e.entityType),c=l.showImmediateFeedbackField,u=l.showPreventScrubbingField;return r.createElement(y.G,{title:se("title"),showLoadingSpinner:e.loading,closePopup:e.closePopup,animation:e.animate},r.createElement(le.Z,{initialValues:a,onSubmit:function(e,t){i({options:{immediateFeedback:e.immediateFeedback,preventScrubbing:e.preventScrubbing}},t)},onClickDelete:e.goToDeleteStep,showImmediateFeedbackField:c,showPreventScrubbingField:u}),r.createElement(m.u,{className:"mt-3"},r.createElement(m.u.Cancel,{onClick:e.goToShareLinkStep,text:se("back"),variant:"link"})))}var pe=n(89067);function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ye(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(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 ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function me(e){var t=(0,i.s)({entityId:e.entityId,entityType:e.entityType}).share,n=de(r.useState(!0),2),a=n[0],l=n[1],c=de(r.useState(t.data?"share-link":"create-link"),2),s=c[0],u=c[1],p=de(r.useState(!1),2),d=p[0],y=p[1],m=o.I.canAddPolicies(e.entityType);function f(e){l(!1),u(e)}var h={entityId:e.entityId,entityType:e.entityType,showCopiedText:d,messagePopupAppLink:e.messagePopupAppLink,enableIntegrationBanner:e.enableIntegrationBanner,integrationSettingAppLink:e.integrationSettingAppLink,assignFlowSelectorAppLink:e.assignFlowSelectorAppLink,goToShareLinkStep:function(){return f("share-link")},goToDeleteStep:function(){return f("delete-confirmation")},goToCopyEmbedStep:function(){return f("copy-embed")},goToSettingsStep:function(){f(m?"link-settings":"share-link")},closePopup:e.closePopup,setShowCopiedText:y};return r.createElement(pe.r,{step:s,animate:a,setStep:f,loading:!t.hasCompleted,closePopup:e.closePopup,data:h,steps:{"create-link":{view:Z},"share-link":{view:oe},"link-settings":{view:ue},"copy-embed":{view:v},"delete-confirmation":{view:$.DeleteShareLinkConfirmationView}}})}var fe=n(99742),ve=n(14070),he=n(97291),ge=n(40254);function be(e){var t=(0,x.r)(null),n=t.hasShareFlowV2;if(t.isLoadingSettings)return r.createElement(r.Fragment,null);if(!n)return r.createElement(a.ShareView,{entityId:e.entityId,entityType:e.entityType,closePopup:e.closePopup,emptyStateImageUrl:fe.W.EmptyStates.TYPEAHEAD_RESULTS,errorStateImageUrl:fe.W.TYPEAHEAD_ERROR,messagePopupAppLink:{application:he.O.DEFAULT,action:ve.e.Default.INTEGRATIONS_INFO},integrationSettingAppLink:{application:he.O.SETTINGS,action:ve.e.Settings.INTEGRATIONS},enableIntegrationBanner:e.enableIntegrationBanner});var i="series"===e.entityType?ge.W.existingClassroom({entityType:"series",objectId:e.entityId}):ge.W.flowSelector({entityType:e.entityType,objectId:e.entityId});return r.createElement(me,{entityId:e.entityId,entityType:e.entityType,closePopup:e.closePopup,messagePopupAppLink:{application:he.O.DEFAULT,action:ve.e.Default.INTEGRATIONS_INFO},integrationSettingAppLink:{application:he.O.SETTINGS,action:ve.e.Settings.INTEGRATIONS},enableIntegrationBanner:e.enableIntegrationBanner,assignFlowSelectorAppLink:i})}}}]);
|
|
3
|
+
//# sourceMappingURL=3811-282392e8bf-lite.chunk.js.map
|