ode-ngjs-front 1.4.9-develop-integration.202503041707 → 1.4.9-develop-integration.202503172138

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/version.txt CHANGED
@@ -1 +1 @@
1
- ode-ngjs-front 04/03/2025 17:08:06
1
+ ode-ngjs-front 17/03/2025 21:39:18
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunkode_ngjs_front=self.webpackChunkode_ngjs_front||[]).push([[91],{4798:(e,t,n)=>{n.d(t,{Z:()=>r});const r='<div class="widget-dashboard"> <div class="widget-header" style="border:0"> <div class="subtitle"> <a class="seemore" href="#" ng-click="ctrl.onButtonClick(ctrl.generateLinkGar(), \'EDUMALIN_OPEN_GAR\')" style="display:flex"> <img src="/assets/widgets/cantine-widget/cantine.png" width="40" height="40" alt="edumalin"/> <span style="padding-left:20px"><i18n>cantine.title</i18n></span> </a> </div> </div> </div>'},8544:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.odeModuleName=void 0;var a=i(n(4202)),s=n(9419),c=i(n(381)),u=function(){function e(){this.data={},this.error=null,this.showLightbox=!1,this.urlGar="https://youtube.com"}return e.prototype.onButtonClick=function(e,t){t&&t.length>0&&this.trackEvent(t),window.open(e,"_blank")},Object.defineProperty(e.prototype,"isDataLoaded",{get:function(){return this.data.length>0},enumerable:!1,configurable:!0}),e.prototype.dateFormat=function(e){return(0,c.default)(e).format("L")},e.prototype.isTypeRDV=function(e){return"RDV"==e},e.prototype.isTypeWebinaire=function(e){return"Webinaire"==e},e.prototype.displayIcon=function(e){switch(e){case"RDV":return"fa-calendar-alt";case"Webinaire":return"fa-video";case"Annonce":return"fa-bullhorn";case"Actualité":return"fa-newspaper";case"Temoignage":return"fa-microphone-lines";case"Podcast":return"fa-headset";case"Replay":return"fa-rotate-left";case"Tutoriel":return"fa-wand-magic-sparkles";default:return"fa-info"}},e.prototype.displayIconColor=function(e){switch(e){case"RDV":return"#2a9cc8";case"Webinaire":return"#20c997";case"Annonce":return"#E13A3A";case"Actualité":return"#FF8D2E";case"Temoignage":return"#2029B6";case"Podcast":return"#823AA1";case"Replay":return"#46BFAF";case"Tutoriel":return"#ecbe30";default:return"#f59700"}},e.prototype.openLightBox=function(e,t){this.currentWidget=e,this.showLightbox=!0,t.currentTarget&&this.trackEvent("")},e.prototype.isURL=function(e){return!!(e&&e.length>0&&(e.startsWith("http://")||e.startsWith("https://")))},e.prototype.generateLinkGar=function(){if((0,s.session)().description&&(0,s.session)().description.schools&&(0,s.session)().description.schools.length>0){var e=(0,s.session)().description.schools[0],t=s.Base64.encode(null!=(null==e?void 0:e.UAI)?e.UAI:""),n=null!=e.exports?e.exports:[],r="";if(null!=n){for(var o=0;o<n.length;++o)if(n[o].startsWith("GAR-")){r=n[o].replace("GAR-","");break}""==r&&(r=n[0])}var i=s.Base64.encode(r);return this.urlGar.replace("ID_ETAB",t).replace("ID_ENT",i)}return"https://youtube.fr/"},e.prototype.trackEvent=function(e){if(e&&e.length>0){var t={"event-type":e,modal:"Timeline"};(0,s.http)().post("/infra/event/web/store",t).catch((function(e){console.debug("[TrackingInternal] failed to trackEvent: ",e)}))}},e.prototype.encodeUrlPicture=function(e){return encodeURI(e)},e}(),l=function(){function e(){this.restrict="E",this.template=n(4798).Z,this.scope={},this.bindToController=!0,this.controller=[u],this.controllerAs="ctrl",this.require=["odeCantineWidget"]}return e.prototype.link=function(e,t,n,i){return r(this,void 0,void 0,(function(){var t;return o(this,(function(n){switch(n.label){case 0:return(t=i?i[0]:null)?[4,(0,s.http)().get("/appregistry/cantine/widget").then((function(n){n.success?(t.data=n.data,e.$apply()):t.error=n.error}))]:[2];case 1:return n.sent(),[2]}}))}))},e}();(0,s.notif)().onLangReady().promise.then((function(e){(0,s.conf)().Platform.idiom.addKeys(n(4848))})),t.odeModuleName="odeCantineWidgetModule",a.default.module(t.odeModuleName,[]).directive("odeCantinWidget",(function(){return new l}))},4848:e=>{e.exports=JSON.parse('{"cantine.title":"Cantine"}')}}]);
1
+ "use strict";(self.webpackChunkode_ngjs_front=self.webpackChunkode_ngjs_front||[]).push([[91],{4798:(e,t,n)=>{n.d(t,{Z:()=>i});const i='<style>.menu-card{font-family:Roboto,sans-serif;color:#333;justify-content:center;align-items:center;padding:5%;border-radius:10px;box-shadow:0 0 10px rgba(0,0,0,.1)}.separator{border:none;height:1px;background-color:#ccc;margin:3% 0}.section{margin-bottom:3%}.section-title{font-weight:700;font-size:1.1em;display:flex;align-items:center}.item{margin-left:1%}.items-container{border-left:2px solid #ccc;margin-left:.8%;padding-left:3%}.dot{height:.6em;width:.6em;border-radius:50%;display:inline-block;margin-right:2%}.red{background-color:red}.green{background-color:green}.blue{background-color:#00f}.yellow{background-color:orange}</style> <div class="widget-dashboard"> <div class="menu-card"> <h2 style="color:#333"> <i18n>cantine.title</i18n> </h2> <div class="separator"></div> <i18n>cantine.date</i18n> <div class="section"> <div class="section-title"> <span class="dot red"></span> <i18n>cantine.petit-dejeuner</i18n> </div> <div class="items-container"> <div class="item">Salade de pommes de terres aux algues & échalotes</div> <div class="item">Salade verte bio</div> </div> </div> <div class="section"> <div class="section-title"> <span class="dot green"></span> <i18n>cantine.dejeuner</i18n> </div> <div class="items-container"> <div class="item">Colin meunière</div> </div> </div> <div class="section"> <div class="section-title"> <span class="dot blue"></span> <i18n>cantine.gouter</i18n> </div> <div class="items-container"> <div class="item">Haricots verts persillés</div> </div> </div> <div class="section"> <div class="section-title"> <span class="dot yellow"></span> <i18n>cantine.diner</i18n> </div> <div class="items-container"> <div class="item">Fromage à la coupe</div> </div> </div> <div class="section"> <div class="section-title"> <span class="dot red"></span>Dessert </div> <div class="item">Fruits de saison</div> </div> </div> </div>'},8544:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.odeModuleName=void 0;var a=o(n(4202)),s=n(9419),c=o(n(381)),l=function(){function e(){this.data={},this.error=null,this.showLightbox=!1,this.urlGar="https://youtube.com"}return e.prototype.onButtonClick=function(e,t){t&&t.length>0&&this.trackEvent(t),window.open(e,"_blank")},Object.defineProperty(e.prototype,"isDataLoaded",{get:function(){return this.data.length>0},enumerable:!1,configurable:!0}),e.prototype.dateFormat=function(e){return(0,c.default)(e).format("L")},e.prototype.isTypeRDV=function(e){return"RDV"==e},e.prototype.isTypeWebinaire=function(e){return"Webinaire"==e},e.prototype.displayIcon=function(e){switch(e){case"RDV":return"fa-calendar-alt";case"Webinaire":return"fa-video";case"Annonce":return"fa-bullhorn";case"Actualité":return"fa-newspaper";case"Temoignage":return"fa-microphone-lines";case"Podcast":return"fa-headset";case"Replay":return"fa-rotate-left";case"Tutoriel":return"fa-wand-magic-sparkles";default:return"fa-info"}},e.prototype.displayIconColor=function(e){switch(e){case"RDV":return"#2a9cc8";case"Webinaire":return"#20c997";case"Annonce":return"#E13A3A";case"Actualité":return"#FF8D2E";case"Temoignage":return"#2029B6";case"Podcast":return"#823AA1";case"Replay":return"#46BFAF";case"Tutoriel":return"#ecbe30";default:return"#f59700"}},e.prototype.openLightBox=function(e,t){this.currentWidget=e,this.showLightbox=!0,t.currentTarget&&this.trackEvent("")},e.prototype.isURL=function(e){return!!(e&&e.length>0&&(e.startsWith("http://")||e.startsWith("https://")))},e.prototype.generateLinkGar=function(){if((0,s.session)().description&&(0,s.session)().description.schools&&(0,s.session)().description.schools.length>0){var e=(0,s.session)().description.schools[0],t=s.Base64.encode(null!=(null==e?void 0:e.UAI)?e.UAI:""),n=null!=e.exports?e.exports:[],i="";if(null!=n){for(var r=0;r<n.length;++r)if(n[r].startsWith("GAR-")){i=n[r].replace("GAR-","");break}""==i&&(i=n[0])}var o=s.Base64.encode(i);return this.urlGar.replace("ID_ETAB",t).replace("ID_ENT",o)}return"https://youtube.fr/"},e.prototype.trackEvent=function(e){if(e&&e.length>0){var t={"event-type":e,modal:"Timeline"};(0,s.http)().post("/infra/event/web/store",t).catch((function(e){console.debug("[TrackingInternal] failed to trackEvent: ",e)}))}},e.prototype.encodeUrlPicture=function(e){return encodeURI(e)},e}(),d=function(){function e(){this.restrict="E",this.template=n(4798).Z,this.scope={},this.bindToController=!0,this.controller=[l],this.controllerAs="ctrl",this.require=["odeCantineWidget"]}return e.prototype.link=function(e,t,n,o){return i(this,void 0,void 0,(function(){var t;return r(this,(function(n){switch(n.label){case 0:return(t=o?o[0]:null)?[4,(0,s.http)().get("/appregistry/cantine/widget").then((function(n){n.success?(t.data=n.data,e.$apply()):t.error=n.error}))]:[2];case 1:return n.sent(),[2]}}))}))},e}();(0,s.notif)().onLangReady().promise.then((function(e){(0,s.conf)().Platform.idiom.addKeys(n(4848))})),t.odeModuleName="odeCantineWidgetModule",a.default.module(t.odeModuleName,[]).directive("odeCantinWidget",(function(){return new d}))},4848:e=>{e.exports=JSON.parse('{"cantine.title":"Cantine"}')}}]);
2
2
  //# sourceMappingURL=cantine-widget.widget.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"widgets/cantine-widget/cantine-widget.widget.js","mappings":"+HAGA,QAFW,6Z,8iDCDX,iBACA,UACA,YAEA,0BACE,KAAAA,KAAY,CAAC,EACb,KAAAC,MAAa,KAEN,KAAAC,cAAe,EAEtB,KAAAC,OAAgB,qBA+IlB,QA7IE,YAAAC,cAAA,SAAcC,EAAcC,GAEtBA,GAAaA,EAAUC,OAAS,GAClCC,KAAKC,WAAWH,GAGlBI,OAAOC,KAAKN,EAAM,SACpB,EAEA,sBAAc,2BAAY,C,IAA1B,WACE,OAAOG,KAAKR,KAAKO,OAAS,CAC5B,E,gCAEA,YAAAK,WAAA,SAAWC,GAET,OADW,aAAOA,GAAUC,OAAO,IAErC,EAEA,YAAAC,UAAA,SAAUC,GACR,MAAe,OAARA,CACT,EAEA,YAAAC,gBAAA,SAAgBD,GACd,MAAe,aAARA,CACT,EAEA,YAAAE,YAAA,SAAYF,GACV,OAAQA,GACN,IAAK,MACH,MAAO,kBACT,IAAK,YACH,MAAO,WACT,IAAK,UACH,MAAO,cACT,IAAK,YACH,MAAO,eACT,IAAK,aACH,MAAO,sBACT,IAAK,UACH,MAAO,aACT,IAAK,SACH,MAAO,iBACT,IAAK,WACH,MAAO,yBACT,QACE,MAAO,UAEb,EAEA,YAAAG,iBAAA,SAAiBH,GACf,OAAQA,GACN,IAAK,MACH,MAAO,UACT,IAAK,YACH,MAAO,UACT,IAAK,UACH,MAAO,UACT,IAAK,YACH,MAAO,UACT,IAAK,aACH,MAAO,UACT,IAAK,UACH,MAAO,UACT,IAAK,SACH,MAAO,UACT,IAAK,WACH,MAAO,UACT,QACE,MAAO,UAEb,EAEA,YAAAI,aAAA,SAAaC,EAAkBC,GAC7Bd,KAAKe,cAAgBF,EACrBb,KAAKN,cAAe,EAGhBoB,EAAEE,eACJhB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A0Bb,QAxBQ,YAAAtD,KAAN,SACEiD,EACAM,EACAC,EACAC,G,gGAKA,OAHMC,EAA0BD,EAC3BA,EAAY,GACb,MAKJ,IAAM,IAAAlB,QACHoB,IAAI,+BACJC,MAAK,SAACC,GACDA,EAASC,SACXJ,EAAK/D,KAAOkE,EAASlE,KACrBsD,EAAMc,UAENL,EAAK9D,MAAQiE,EAASjE,KAE1B,KAZA,I,cAGF,S,YAWJ,EAnCA,IA2CA,IAAAoE,SACGC,cACAC,QAAQN,MAAK,SAACO,IAGT,IAAAC,QAAOC,SAASC,MAAMC,QAAQ,EAAQ,MAG5C,IAIW,EAAAC,cAAgB,yBAC7B,UACGC,OAAO,EAAAD,cAAe,IACtBE,UAAU,mBApBb,WACE,OAAO,IAAIC,CACb,G","sources":["webpack://ode-ngjs-front/./src/ts/widgets/cantine-widget/cantine-widget.widget.html","webpack://ode-ngjs-front/./src/ts/widgets/cantine-widget/cantine-widget.widget.ts"],"sourcesContent":["// Module\nvar code = \"<div class=\\\"widget-dashboard\\\"> <div class=\\\"widget-header\\\" style=\\\"border:0\\\"> <div class=\\\"subtitle\\\"> <a class=\\\"seemore\\\" href=\\\"#\\\" ng-click=\\\"ctrl.onButtonClick(ctrl.generateLinkGar(), 'EDUMALIN_OPEN_GAR')\\\" style=\\\"display:flex\\\"> <img src=\\\"/assets/widgets/cantine-widget/cantine.png\\\" width=\\\"40\\\" height=\\\"40\\\" alt=\\\"edumalin\\\"/> <span style=\\\"padding-left:20px\\\"><i18n>cantine.title</i18n></span> </a> </div> </div> </div>\";\n// Exports\nexport default code;","import angular, { IAttributes, IController, IDirective, IScope } from \"angular\";\nimport { conf, notif, http, session, Base64 } from \"../../utils\";\nimport moment from \"moment\";\n\nclass Controller implements IController {\n data: any = {};\n error: any = null;\n public currentWidget: any;\n public showLightbox = false;\n\n urlGar: string =\"https://youtube.com\";\n\n onButtonClick(link: string, eventType: String) {\n // Track this event.\n if (eventType && eventType.length > 0) {\n this.trackEvent(eventType);\n }\n\n window.open(link, \"_blank\");\n }\n\n protected get isDataLoaded() {\n return this.data.length > 0;\n }\n\n dateFormat(dateTime: any) {\n let date = moment(dateTime).format(\"L\");\n return date;\n }\n\n isTypeRDV(type: any) {\n return type == \"RDV\";\n }\n\n isTypeWebinaire(type: any) {\n return type == \"Webinaire\";\n }\n\n displayIcon(type: any) {\n switch (type) {\n case \"RDV\":\n return \"fa-calendar-alt\";\n case \"Webinaire\":\n return \"fa-video\";\n case \"Annonce\":\n return \"fa-bullhorn\";\n case \"Actualité\":\n return \"fa-newspaper\";\n case \"Temoignage\":\n return \"fa-microphone-lines\";\n case \"Podcast\":\n return \"fa-headset\";\n case \"Replay\":\n return \"fa-rotate-left\";\n case \"Tutoriel\":\n return \"fa-wand-magic-sparkles\";\n default:\n return \"fa-info\";\n }\n }\n\n displayIconColor(type: any) {\n switch (type) {\n case \"RDV\":\n return \"#2a9cc8\";\n case \"Webinaire\":\n return \"#20c997\";\n case \"Annonce\":\n return \"#E13A3A\";\n case \"Actualité\":\n return \"#FF8D2E\";\n case \"Temoignage\":\n return \"#2029B6\";\n case \"Podcast\":\n return \"#823AA1\";\n case \"Replay\":\n return \"#46BFAF\";\n case \"Tutoriel\":\n return \"#ecbe30\";\n default:\n return \"#f59700\";\n }\n }\n\n openLightBox(contentType: any, e: Event) {\n this.currentWidget = contentType;\n this.showLightbox = true;\n\n // Track this event.\n if (e.currentTarget) {\n this.trackEvent(\"\");\n }\n }\n\n isURL(str: String) {\n if (\n str &&\n str.length > 0 &&\n (str.startsWith(\"http://\") || str.startsWith(\"https://\"))\n ) {\n return true;\n }\n return false;\n }\n\n generateLinkGar() {\n if (\n session().description &&\n session().description.schools &&\n session().description.schools.length > 0\n ) {\n let school = session().description.schools[0];\n let UAIb64: string = Base64.encode(school?.UAI != null ? school.UAI : \"\");\n let exports: string[] = school.exports != null ? school.exports : [];\n let codeGar = \"\";\n if (exports != null) {\n for (let i = 0; i < exports.length; ++i)\n if (exports[i].startsWith(\"GAR-\")) {\n codeGar = exports[i].replace(\"GAR-\", \"\");\n break;\n }\n if (codeGar == \"\") codeGar = exports[0];\n }\n let codeGARb64 = Base64.encode(codeGar);\n\n return this.urlGar\n .replace(\"ID_ETAB\", UAIb64)\n .replace(\"ID_ENT\", codeGARb64);\n }\n\n return \"https://youtube.fr/\";\n }\n\n // Give an opportunity to track some events from outside of this component.\n protected trackEvent(eventType: String) {\n // Track this event.\n if (eventType && eventType.length > 0) {\n const eventJson: any = {\n \"event-type\": eventType,\n modal: \"Timeline\",\n };\n\n http()\n .post(\"/infra/event/web/store\", eventJson)\n .catch((e) => {\n console.debug(\"[TrackingInternal] failed to trackEvent: \", e);\n });\n }\n }\n\n encodeUrlPicture(url: string) {\n return encodeURI(url);\n }\n}\n\n/* Directive */\nclass Directive\n implements IDirective<IScope, JQLite, IAttributes, IController[]>\n{\n restrict = \"E\";\n template = require(\"./cantine-widget.widget.html\").default;\n scope = {};\n bindToController = true;\n controller = [Controller];\n controllerAs = \"ctrl\";\n require = [\"odeCantineWidget\"];\n\n async link(\n scope: IScope,\n elem: JQLite,\n attrs: IAttributes,\n controllers?: IController[]\n ) {\n const ctrl: Controller | null = controllers\n ? (controllers[0] as Controller)\n : null;\n if (!ctrl) {\n return;\n }\n\n await http()\n .get(\"/appregistry/cantine/widget\")\n .then((response) => {\n if (response.success) {\n ctrl.data = response.data;\n scope.$apply();\n } else {\n ctrl.error = response.error;\n }\n });\n }\n}\n\n/** The cantine widget. */\nfunction DirectiveFactory() {\n return new Directive();\n}\n\n// Preload translations\nnotif()\n .onLangReady()\n .promise.then((lang) => {\n switch (lang) {\n default:\n conf().Platform.idiom.addKeys(require(\"./i18n/fr.json\"));\n break;\n }\n });\n\n// THIS ANGULAR MODULE WILL BE DYNAMICALLY ADDED TO THE APPLICATION.\n// RESPECT THE NAMING CONVENTION BY EXPORTING THE MODULE NAME :\nexport const odeModuleName = \"odeCantineWidgetModule\";\nangular\n .module(odeModuleName, [])\n .directive(\"odeCantinWidget\", DirectiveFactory);\n"],"names":["data","error","showLightbox","urlGar","onButtonClick","link","eventType","length","this","trackEvent","window","open","dateFormat","dateTime","format","isTypeRDV","type","isTypeWebinaire","displayIcon","displayIconColor","openLightBox","contentType","e","currentWidget","currentTarget","isURL","str","startsWith","generateLinkGar","session","description","schools","school","UAIb64","Base64","encode","UAI","exports","codeGar","i","replace","codeGARb64","eventJson","modal","http","post","catch","console","debug","encodeUrlPicture","url","encodeURI","restrict","template","scope","bindToController","controller","Controller","controllerAs","require","elem","attrs","controllers","ctrl","get","then","response","success","$apply","notif","onLangReady","promise","lang","conf","Platform","idiom","addKeys","odeModuleName","module","directive","Directive"],"sourceRoot":""}
1
+ {"version":3,"file":"widgets/cantine-widget/cantine-widget.widget.js","mappings":"+HAGA,QAFW,00D,8iDCDX,iBACA,UACA,YAEA,0BACE,KAAAA,KAAY,CAAC,EACb,KAAAC,MAAa,KAEN,KAAAC,cAAe,EAEtB,KAAAC,OAAgB,qBA+IlB,QA7IE,YAAAC,cAAA,SAAcC,EAAcC,GAEtBA,GAAaA,EAAUC,OAAS,GAClCC,KAAKC,WAAWH,GAGlBI,OAAOC,KAAKN,EAAM,SACpB,EAEA,sBAAc,2BAAY,C,IAA1B,WACE,OAAOG,KAAKR,KAAKO,OAAS,CAC5B,E,gCAEA,YAAAK,WAAA,SAAWC,GAET,OADW,aAAOA,GAAUC,OAAO,IAErC,EAEA,YAAAC,UAAA,SAAUC,GACR,MAAe,OAARA,CACT,EAEA,YAAAC,gBAAA,SAAgBD,GACd,MAAe,aAARA,CACT,EAEA,YAAAE,YAAA,SAAYF,GACV,OAAQA,GACN,IAAK,MACH,MAAO,kBACT,IAAK,YACH,MAAO,WACT,IAAK,UACH,MAAO,cACT,IAAK,YACH,MAAO,eACT,IAAK,aACH,MAAO,sBACT,IAAK,UACH,MAAO,aACT,IAAK,SACH,MAAO,iBACT,IAAK,WACH,MAAO,yBACT,QACE,MAAO,UAEb,EAEA,YAAAG,iBAAA,SAAiBH,GACf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,yBAA0BH,GAC/BI,OAAM,SAACxB,GACNyB,QAAQC,MAAM,4CAA6C1B,EAC7D,G,CAEN,EAEA,YAAA2B,iBAAA,SAAiBC,GACf,OAAOC,UAAUD,EACnB,EACF,EArJA,GAwJA,0BAGE,KAAAE,SAAW,IACX,KAAAC,SAAW,UACX,KAAAC,MAAQ,CAAC,EACT,KAAAC,kBAAmB,EACnB,KAAAC,WAAa,CAACC,GACd,KAAAC,aAAe,OACf,KAAAC,QAAU,CAAC,mBA0Bb,QAxBQ,YAAAtD,KAAN,SACEiD,EACAM,EACAC,EACAC,G,gGAKA,OAHMC,EAA0BD,EAC3BA,EAAY,GACb,MAKJ,IAAM,IAAAlB,QACHoB,IAAI,+BACJC,MAAK,SAACC,GACDA,EAASC,SACXJ,EAAK/D,KAAOkE,EAASlE,KACrBsD,EAAMc,UAENL,EAAK9D,MAAQiE,EAASjE,KAE1B,KAZA,I,cAGF,S,YAWJ,EAnCA,IA2CA,IAAAoE,SACGC,cACAC,QAAQN,MAAK,SAACO,IAGT,IAAAC,QAAOC,SAASC,MAAMC,QAAQ,EAAQ,MAG5C,IAIW,EAAAC,cAAgB,yBAC7B,UACGC,OAAO,EAAAD,cAAe,IACtBE,UAAU,mBApBb,WACE,OAAO,IAAIC,CACb,G","sources":["webpack://ode-ngjs-front/./src/ts/widgets/cantine-widget/cantine-widget.widget.html","webpack://ode-ngjs-front/./src/ts/widgets/cantine-widget/cantine-widget.widget.ts"],"sourcesContent":["// Module\nvar code = \"<style>.menu-card{font-family:Roboto,sans-serif;color:#333;justify-content:center;align-items:center;padding:5%;border-radius:10px;box-shadow:0 0 10px rgba(0,0,0,.1)}.separator{border:none;height:1px;background-color:#ccc;margin:3% 0}.section{margin-bottom:3%}.section-title{font-weight:700;font-size:1.1em;display:flex;align-items:center}.item{margin-left:1%}.items-container{border-left:2px solid #ccc;margin-left:.8%;padding-left:3%}.dot{height:.6em;width:.6em;border-radius:50%;display:inline-block;margin-right:2%}.red{background-color:red}.green{background-color:green}.blue{background-color:#00f}.yellow{background-color:orange}</style> <div class=\\\"widget-dashboard\\\"> <div class=\\\"menu-card\\\"> <h2 style=\\\"color:#333\\\"> <i18n>cantine.title</i18n> </h2> <div class=\\\"separator\\\"></div> <i18n>cantine.date</i18n> <div class=\\\"section\\\"> <div class=\\\"section-title\\\"> <span class=\\\"dot red\\\"></span> <i18n>cantine.petit-dejeuner</i18n> </div> <div class=\\\"items-container\\\"> <div class=\\\"item\\\">Salade de pommes de terres aux algues & échalotes</div> <div class=\\\"item\\\">Salade verte bio</div> </div> </div> <div class=\\\"section\\\"> <div class=\\\"section-title\\\"> <span class=\\\"dot green\\\"></span> <i18n>cantine.dejeuner</i18n> </div> <div class=\\\"items-container\\\"> <div class=\\\"item\\\">Colin meunière</div> </div> </div> <div class=\\\"section\\\"> <div class=\\\"section-title\\\"> <span class=\\\"dot blue\\\"></span> <i18n>cantine.gouter</i18n> </div> <div class=\\\"items-container\\\"> <div class=\\\"item\\\">Haricots verts persillés</div> </div> </div> <div class=\\\"section\\\"> <div class=\\\"section-title\\\"> <span class=\\\"dot yellow\\\"></span> <i18n>cantine.diner</i18n> </div> <div class=\\\"items-container\\\"> <div class=\\\"item\\\">Fromage à la coupe</div> </div> </div> <div class=\\\"section\\\"> <div class=\\\"section-title\\\"> <span class=\\\"dot red\\\"></span>Dessert </div> <div class=\\\"item\\\">Fruits de saison</div> </div> </div> </div>\";\n// Exports\nexport default code;","import angular, { IAttributes, IController, IDirective, IScope } from \"angular\";\nimport { conf, notif, http, session, Base64 } from \"../../utils\";\nimport moment from \"moment\";\n\nclass Controller implements IController {\n data: any = {};\n error: any = null;\n public currentWidget: any;\n public showLightbox = false;\n\n urlGar: string =\"https://youtube.com\";\n\n onButtonClick(link: string, eventType: String) {\n // Track this event.\n if (eventType && eventType.length > 0) {\n this.trackEvent(eventType);\n }\n\n window.open(link, \"_blank\");\n }\n\n protected get isDataLoaded() {\n return this.data.length > 0;\n }\n\n dateFormat(dateTime: any) {\n let date = moment(dateTime).format(\"L\");\n return date;\n }\n\n isTypeRDV(type: any) {\n return type == \"RDV\";\n }\n\n isTypeWebinaire(type: any) {\n return type == \"Webinaire\";\n }\n\n displayIcon(type: any) {\n switch (type) {\n case \"RDV\":\n return \"fa-calendar-alt\";\n case \"Webinaire\":\n return \"fa-video\";\n case \"Annonce\":\n return \"fa-bullhorn\";\n case \"Actualité\":\n return \"fa-newspaper\";\n case \"Temoignage\":\n return \"fa-microphone-lines\";\n case \"Podcast\":\n return \"fa-headset\";\n case \"Replay\":\n return \"fa-rotate-left\";\n case \"Tutoriel\":\n return \"fa-wand-magic-sparkles\";\n default:\n return \"fa-info\";\n }\n }\n\n displayIconColor(type: any) {\n switch (type) {\n case \"RDV\":\n return \"#2a9cc8\";\n case \"Webinaire\":\n return \"#20c997\";\n case \"Annonce\":\n return \"#E13A3A\";\n case \"Actualité\":\n return \"#FF8D2E\";\n case \"Temoignage\":\n return \"#2029B6\";\n case \"Podcast\":\n return \"#823AA1\";\n case \"Replay\":\n return \"#46BFAF\";\n case \"Tutoriel\":\n return \"#ecbe30\";\n default:\n return \"#f59700\";\n }\n }\n\n openLightBox(contentType: any, e: Event) {\n this.currentWidget = contentType;\n this.showLightbox = true;\n\n // Track this event.\n if (e.currentTarget) {\n this.trackEvent(\"\");\n }\n }\n\n isURL(str: String) {\n if (\n str &&\n str.length > 0 &&\n (str.startsWith(\"http://\") || str.startsWith(\"https://\"))\n ) {\n return true;\n }\n return false;\n }\n\n generateLinkGar() {\n if (\n session().description &&\n session().description.schools &&\n session().description.schools.length > 0\n ) {\n let school = session().description.schools[0];\n let UAIb64: string = Base64.encode(school?.UAI != null ? school.UAI : \"\");\n let exports: string[] = school.exports != null ? school.exports : [];\n let codeGar = \"\";\n if (exports != null) {\n for (let i = 0; i < exports.length; ++i)\n if (exports[i].startsWith(\"GAR-\")) {\n codeGar = exports[i].replace(\"GAR-\", \"\");\n break;\n }\n if (codeGar == \"\") codeGar = exports[0];\n }\n let codeGARb64 = Base64.encode(codeGar);\n\n return this.urlGar\n .replace(\"ID_ETAB\", UAIb64)\n .replace(\"ID_ENT\", codeGARb64);\n }\n\n return \"https://youtube.fr/\";\n }\n\n // Give an opportunity to track some events from outside of this component.\n protected trackEvent(eventType: String) {\n // Track this event.\n if (eventType && eventType.length > 0) {\n const eventJson: any = {\n \"event-type\": eventType,\n modal: \"Timeline\",\n };\n\n http()\n .post(\"/infra/event/web/store\", eventJson)\n .catch((e) => {\n console.debug(\"[TrackingInternal] failed to trackEvent: \", e);\n });\n }\n }\n\n encodeUrlPicture(url: string) {\n return encodeURI(url);\n }\n}\n\n/* Directive */\nclass Directive\n implements IDirective<IScope, JQLite, IAttributes, IController[]>\n{\n restrict = \"E\";\n template = require(\"./cantine-widget.widget.html\").default;\n scope = {};\n bindToController = true;\n controller = [Controller];\n controllerAs = \"ctrl\";\n require = [\"odeCantineWidget\"];\n\n async link(\n scope: IScope,\n elem: JQLite,\n attrs: IAttributes,\n controllers?: IController[]\n ) {\n const ctrl: Controller | null = controllers\n ? (controllers[0] as Controller)\n : null;\n if (!ctrl) {\n return;\n }\n\n await http()\n .get(\"/appregistry/cantine/widget\")\n .then((response) => {\n if (response.success) {\n ctrl.data = response.data;\n scope.$apply();\n } else {\n ctrl.error = response.error;\n }\n });\n }\n}\n\n/** The cantine widget. */\nfunction DirectiveFactory() {\n return new Directive();\n}\n\n// Preload translations\nnotif()\n .onLangReady()\n .promise.then((lang) => {\n switch (lang) {\n default:\n conf().Platform.idiom.addKeys(require(\"./i18n/fr.json\"));\n break;\n }\n });\n\n// THIS ANGULAR MODULE WILL BE DYNAMICALLY ADDED TO THE APPLICATION.\n// RESPECT THE NAMING CONVENTION BY EXPORTING THE MODULE NAME :\nexport const odeModuleName = \"odeCantineWidgetModule\";\nangular\n .module(odeModuleName, [])\n .directive(\"odeCantinWidget\", DirectiveFactory);\n"],"names":["data","error","showLightbox","urlGar","onButtonClick","link","eventType","length","this","trackEvent","window","open","dateFormat","dateTime","format","isTypeRDV","type","isTypeWebinaire","displayIcon","displayIconColor","openLightBox","contentType","e","currentWidget","currentTarget","isURL","str","startsWith","generateLinkGar","session","description","schools","school","UAIb64","Base64","encode","UAI","exports","codeGar","i","replace","codeGARb64","eventJson","modal","http","post","catch","console","debug","encodeUrlPicture","url","encodeURI","restrict","template","scope","bindToController","controller","Controller","controllerAs","require","elem","attrs","controllers","ctrl","get","then","response","success","$apply","notif","onLangReady","promise","lang","conf","Platform","idiom","addKeys","odeModuleName","module","directive","Directive"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ode-ngjs-front",
3
- "version": "1.4.9-develop-integration.202503041707",
3
+ "version": "1.4.9-develop-integration.202503172138",
4
4
  "description": "Open Digital Education Frontend Framework",
5
5
  "homepage": "https://github.com/opendigitaleducation/ode-ngjs-front#readme",
6
6
  "bugs": {