ode-ngjs-front 1.4.8 → 1.4.9-develop-integration.202503041707
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/ode-ngjs-front.js +2 -2
- package/dist/ode-ngjs-front.js.map +1 -1
- package/dist/ts/modules/widgets.module.d.ts +2 -1
- package/dist/ts/modules/widgets.module.d.ts.map +1 -1
- package/dist/ts/services/theme-helper.service.d.ts.map +1 -1
- package/dist/ts/utils/recorder-video.d.ts.map +1 -1
- package/dist/ts/widgets/cantine-widget/cantine-widget.widget.d.ts +2 -0
- package/dist/ts/widgets/cantine-widget/cantine-widget.widget.d.ts.map +1 -0
- package/dist/version.txt +1 -1
- package/dist/widgets/cantine-widget/cantine-widget.widget.js +2 -0
- package/dist/widgets/cantine-widget/cantine-widget.widget.js.map +1 -0
- package/package.json +2 -2
|
@@ -16,7 +16,8 @@ export declare enum KnownWidget {
|
|
|
16
16
|
briefme = "briefme-widget",
|
|
17
17
|
lastInfos = "last-infos-widget",
|
|
18
18
|
edumalin = "edumalin-widget",
|
|
19
|
-
mediacentre = "mediacentre-widget"
|
|
19
|
+
mediacentre = "mediacentre-widget",
|
|
20
|
+
cantine = "cantine-widget"
|
|
20
21
|
}
|
|
21
22
|
export declare type WidgetLoader = (widgetName: String) => Promise<void>;
|
|
22
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgets.module.d.ts","sourceRoot":"","sources":["../../../src/ts/modules/widgets.module.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAQ,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"widgets.module.d.ts","sourceRoot":"","sources":["../../../src/ts/modules/widgets.module.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAQ,OAAO,EAAE,MAAM,SAAS,CAAC;AA0CjD,oBAAY,WAAW;IACnB,SAAS,qBAA2B;IACpC,MAAM,kBAA2B;IACjC,MAAM,kBAA2B;IACjC,QAAQ,cAAqB;IAC7B,MAAM,kBAA2B;IACjC,KAAK,UAAoB;IACzB,QAAQ,oBAA2B;IACnC,GAAG,eAA2B;IAC9B,MAAM,YAAqB;IAC3B,YAAY,mBAAsB;IAClC,YAAY,wBAA2B;IACvC,QAAQ,oBAA2B;IACnC,WAAW,uBAA2B;IACtC,OAAO,mBAA2B;IAClC,SAAS,sBAA4B;IACrC,QAAQ,oBAA2B;IACnC,WAAW,uBAA2B;IACtC,OAAO,mBAA2B;CAErC;AACD,oBAAY,YAAY,GAAG,CAAC,UAAU,EAAC,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAsX9D;;GAEG;AACH,wBAAgB,eAAe,IAAG,OAAO,CAExC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-helper.service.d.ts","sourceRoot":"","sources":["../../../src/ts/services/theme-helper.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAc,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD;;GAEG;AACH,qBAAa,kBAAkB;
|
|
1
|
+
{"version":3,"file":"theme-helper.service.d.ts","sourceRoot":"","sources":["../../../src/ts/services/theme-helper.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAc,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD;;GAEG;AACH,qBAAa,kBAAkB;IA6BvB,OAAO,CAAC,WAAW;IA5BvB,MAAM,CAAC,OAAO,WAAyB;IAEvC,OAAO,CAAC,YAAY,CAuBnB;gBAGW,WAAW,EAAC,eAAe;IAIvC,OAAO,KAAK,QAAQ,GAEnB;IAED,uCAAuC;IACvC,IAAI,GAAG,WAEN;IAED,8FAA8F;IACxF,qBAAqB,IAAG,OAAO,CAAC,MAAM,CAAC;IAW7C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C,gBAAgB;IAIxB,OAAO,CAAC,iBAAiB,CAIxB;IACD,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,SAAS;IAUjB,YAAY,CAAE,EAAE,EAAC,UAAU,GAAC,kBAAkB;IAa9C,IAAI;IAUJ,OAAO,CAAC,WAAW;IAiBnB,KAAK;IASL,OAAO,CAAC,aAAa;IAsBrB,OAAO,CAAC,aAAa;IAgBf,cAAc,CAAC,YAAY,CAAC,EAAE,MAAM,IAAI;IAwCvC,eAAe;IAYf,MAAM;IAIA,iBAAiB;IAI9B,OAAO,CAAC,yBAAyB;IAkB3B,OAAO;IAuBP,MAAM;IAgCL,aAAa,CAAC,WAAW,EAAE,OAAO,GAAE,OAAO,CAAC,IAAI,CAAC;IAejD,aAAa;IAUb,SAAS;IAIT,WAAW,CAAC,aAAa,EAAE,OAAO;CAI5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cantine-widget.widget.d.ts","sourceRoot":"","sources":["../../../../src/ts/widgets/cantine-widget/cantine-widget.widget.ts"],"names":[],"mappings":"AAmNA,eAAO,MAAM,aAAa,2BAA2B,CAAC"}
|
package/dist/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ode-ngjs-front
|
|
1
|
+
ode-ngjs-front 04/03/2025 17:08:06
|
|
@@ -0,0 +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"}')}}]);
|
|
2
|
+
//# sourceMappingURL=cantine-widget.widget.js.map
|
|
@@ -0,0 +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,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AAS,EAAG,CACrC,IAAMmC,EAAiB,CACrB,aAAcpC,EACdqC,MAAO,aAGT,IAAAC,QACGC,KAAK,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 = \"<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":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ode-ngjs-front",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.9-develop-integration.202503041707",
|
|
4
4
|
"description": "Open Digital Education Frontend Framework",
|
|
5
5
|
"homepage": "https://github.com/opendigitaleducation/ode-ngjs-front#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"karma-chrome-launcher": "3.1.0",
|
|
53
53
|
"karma-jasmine": "4.0.1",
|
|
54
54
|
"moment-locales-webpack-plugin": "~1.2.0",
|
|
55
|
-
"ode-ts-client": "
|
|
55
|
+
"ode-ts-client": "develop-integration",
|
|
56
56
|
"terser-webpack-plugin": "5.1.4",
|
|
57
57
|
"ts-loader": "8.0.18",
|
|
58
58
|
"typescript": "4.6.4",
|