ngx-rendering-service-lib 0.0.66978 → 0.0.66979

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.
Files changed (21) hide show
  1. package/assets/pdf/main.js +152 -21
  2. package/assets/pdf/main.js.map +1 -1
  3. package/fesm2022/{ngx-rendering-service-lib-audio.component-CexwzvaZ.mjs → ngx-rendering-service-lib-audio.component-D5QoPTAj.mjs} +2 -2
  4. package/fesm2022/{ngx-rendering-service-lib-audio.component-CexwzvaZ.mjs.map → ngx-rendering-service-lib-audio.component-D5QoPTAj.mjs.map} +1 -1
  5. package/fesm2022/{ngx-rendering-service-lib-binder.component-DJCugXAE.mjs → ngx-rendering-service-lib-binder.component-BPTS3FaS.mjs} +2 -2
  6. package/fesm2022/{ngx-rendering-service-lib-binder.component-DJCugXAE.mjs.map → ngx-rendering-service-lib-binder.component-BPTS3FaS.mjs.map} +1 -1
  7. package/fesm2022/{ngx-rendering-service-lib-ddb.component-CzRzNFG-.mjs → ngx-rendering-service-lib-ddb.component-BoMA4Kvf.mjs} +2 -2
  8. package/fesm2022/{ngx-rendering-service-lib-ddb.component-CzRzNFG-.mjs.map → ngx-rendering-service-lib-ddb.component-BoMA4Kvf.mjs.map} +1 -1
  9. package/fesm2022/{ngx-rendering-service-lib-default.component-B8VXBNvM.mjs → ngx-rendering-service-lib-default.component-UaIA6Uzn.mjs} +2 -2
  10. package/fesm2022/{ngx-rendering-service-lib-default.component-B8VXBNvM.mjs.map → ngx-rendering-service-lib-default.component-UaIA6Uzn.mjs.map} +1 -1
  11. package/fesm2022/{ngx-rendering-service-lib-error.component-Ne_h9SFK.mjs → ngx-rendering-service-lib-error.component-CIWdzoZp.mjs} +2 -2
  12. package/fesm2022/{ngx-rendering-service-lib-error.component-Ne_h9SFK.mjs.map → ngx-rendering-service-lib-error.component-CIWdzoZp.mjs.map} +1 -1
  13. package/fesm2022/{ngx-rendering-service-lib-moodle.component-MFlXD5H0.mjs → ngx-rendering-service-lib-moodle.component-BD_M7j4A.mjs} +2 -2
  14. package/fesm2022/{ngx-rendering-service-lib-moodle.component-MFlXD5H0.mjs.map → ngx-rendering-service-lib-moodle.component-BD_M7j4A.mjs.map} +1 -1
  15. package/fesm2022/{ngx-rendering-service-lib-ngx-rendering-service-lib-C12aUxFs.mjs → ngx-rendering-service-lib-ngx-rendering-service-lib-BiJsr0wj.mjs} +44 -8
  16. package/fesm2022/ngx-rendering-service-lib-ngx-rendering-service-lib-BiJsr0wj.mjs.map +1 -0
  17. package/fesm2022/ngx-rendering-service-lib.mjs +1 -1
  18. package/lib/dto/FrontendModuleConfig.d.ts +2 -1
  19. package/lib/module/url/url.component.d.ts +2 -0
  20. package/package.json +1 -1
  21. package/fesm2022/ngx-rendering-service-lib-ngx-rendering-service-lib-C12aUxFs.mjs.map +0 -1
@@ -197,7 +197,7 @@ function getConfigProvider(params) {
197
197
 
198
198
  __webpack_require__.r(__webpack_exports__);
199
199
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
200
- /* harmony export */ AppModule: () => (/* binding */ AppModule),
200
+ /* harmony export */ API_INTERCEPTOR_PROVIDER: () => (/* binding */ API_INTERCEPTOR_PROVIDER),
201
201
  /* harmony export */ AssetControllerService: () => (/* binding */ AssetControllerService),
202
202
  /* harmony export */ EduTrackingControllerService: () => (/* binding */ EduTrackingControllerService),
203
203
  /* harmony export */ EduTrackingControllerWrapperService: () => (/* binding */ EduTrackingControllerWrapperService),
@@ -212,9 +212,9 @@ __webpack_require__.r(__webpack_exports__);
212
212
  /* harmony export */ trackObject: () => (/* binding */ trackObject)
213
213
  /* harmony export */ });
214
214
  /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 7580);
215
+ /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ 9648);
215
216
  /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ 1567);
216
217
  /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ 271);
217
- /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ 9648);
218
218
  /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ 6042);
219
219
  /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ 8764);
220
220
  /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ 6647);
@@ -301,6 +301,60 @@ function getConfigProvider(params) {
301
301
  useFactory: configParams => RenderingServiceApiConfiguration.create(configParams)
302
302
  }];
303
303
  }
304
+ class RenderingServiceApiInterceptor {
305
+ constructor(configuration) {
306
+ this.configuration = configuration;
307
+ }
308
+ /** Set to session key */
309
+ bearer(token) {
310
+ this.nextAuthHeader = 'Authorization';
311
+ this.nextAuthValue = 'Bearer ' + token;
312
+ }
313
+ /** Clear any authentication headers (to be called after logout) */
314
+ clear() {
315
+ this.nextAuthHeader = undefined;
316
+ this.nextAuthValue = undefined;
317
+ }
318
+ /** Apply the current authorization headers to the given request */
319
+ intercept(req, next) {
320
+ const headers = {};
321
+ // We filter for requests that actually target the API since this interceptor will be called
322
+ // on all HTTP requests by the application, not limited to this library. (See notes in
323
+ // `edu-sharing-api.module.ts`.)
324
+ const isApiRequest = req.url.startsWith(this.configuration.rootUrl);
325
+ if (isApiRequest) {
326
+ if (this.nextAuthHeader) {
327
+ headers[this.nextAuthHeader] = this.nextAuthValue;
328
+ }
329
+ } else {
330
+ return next.handle(req);
331
+ }
332
+ // Apply the headers to the request
333
+ return next.handle(req.clone({
334
+ setHeaders: headers,
335
+ // rs requires cookies
336
+ withCredentials: true
337
+ }));
338
+ }
339
+ static {
340
+ this.ɵfac = function RenderingServiceApiInterceptor_Factory(__ngFactoryType__) {
341
+ return new (__ngFactoryType__ || RenderingServiceApiInterceptor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](ApiConfiguration));
342
+ };
343
+ }
344
+ static {
345
+ this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
346
+ token: RenderingServiceApiInterceptor,
347
+ factory: RenderingServiceApiInterceptor.ɵfac
348
+ });
349
+ }
350
+ }
351
+ (() => {
352
+ (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](RenderingServiceApiInterceptor, [{
353
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable
354
+ }], () => [{
355
+ type: ApiConfiguration
356
+ }], null);
357
+ })();
304
358
 
305
359
  /* tslint:disable */
306
360
  /* eslint-disable */
@@ -814,6 +868,23 @@ function deleteRepository(http, rootUrl, params, context) {
814
868
  }
815
869
  deleteRepository.PATH = '/admin/repository/register';
816
870
 
871
+ /* tslint:disable */
872
+ /* eslint-disable */
873
+ function getCacheUsage(http, rootUrl, params, context) {
874
+ const rb = new RequestBuilder(rootUrl, getCacheUsage.PATH, 'get');
875
+ if (params) {
876
+ rb.query('repoId', params.repoId, {});
877
+ }
878
+ return http.request(rb.build({
879
+ responseType: 'blob',
880
+ accept: '*/*',
881
+ context
882
+ })).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.filter)(r => r instanceof _angular_common_http__WEBPACK_IMPORTED_MODULE_1__.HttpResponse), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.map)(r => {
883
+ return r;
884
+ }));
885
+ }
886
+ getCacheUsage.PATH = '/admin/cache/usage';
887
+
817
888
  /* tslint:disable */
818
889
  /* eslint-disable */
819
890
  function registeredRepos(http, rootUrl, params, context) {
@@ -846,6 +917,25 @@ function registerWithRepo(http, rootUrl, params, context) {
846
917
  }
847
918
  registerWithRepo.PATH = '/admin/repository/register';
848
919
 
920
+ /* tslint:disable */
921
+ /* eslint-disable */
922
+ function setCsp(http, rootUrl, params, context) {
923
+ const rb = new RequestBuilder(rootUrl, setCsp.PATH, 'put');
924
+ if (params) {
925
+ rb.body(params.body, 'application/json');
926
+ }
927
+ return http.request(rb.build({
928
+ responseType: 'text',
929
+ accept: '*/*',
930
+ context
931
+ })).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.filter)(r => r instanceof _angular_common_http__WEBPACK_IMPORTED_MODULE_1__.HttpResponse), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.map)(r => {
932
+ return r.clone({
933
+ body: undefined
934
+ });
935
+ }));
936
+ }
937
+ setCsp.PATH = '/admin/repository/modules/csp';
938
+
849
939
  /* tslint:disable */
850
940
  /* eslint-disable */
851
941
  function updateRepoRegistration(http, rootUrl, params, context) {
@@ -888,6 +978,28 @@ class AdminControllerService extends BaseService {
888
978
  deactivateOptionalModule(params, context) {
889
979
  return this.deactivateOptionalModule$Response(params, context).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.map)(r => r.body));
890
980
  }
981
+ /** Path part for operation `setCsp()` */
982
+ static {
983
+ this.SetCspPath = '/admin/repository/modules/csp';
984
+ }
985
+ /**
986
+ * This method provides access to the full `HttpResponse`, allowing access to response headers.
987
+ * To access only the response body, use `setCsp()` instead.
988
+ *
989
+ * This method sends `application/json` and handles request body of type `application/json`.
990
+ */
991
+ setCsp$Response(params, context) {
992
+ return setCsp(this.http, this.rootUrl, params, context);
993
+ }
994
+ /**
995
+ * This method provides access only to the response body.
996
+ * To access the full response (for headers, for example), `setCsp$Response()` instead.
997
+ *
998
+ * This method sends `application/json` and handles request body of type `application/json`.
999
+ */
1000
+ setCsp(params, context) {
1001
+ return this.setCsp$Response(params, context).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.map)(r => r.body));
1002
+ }
891
1003
  /** Path part for operation `activateOptionalModule()` */
892
1004
  static {
893
1005
  this.ActivateOptionalModulePath = '/admin/repository/modules/activate';
@@ -998,6 +1110,28 @@ class AdminControllerService extends BaseService {
998
1110
  updateRepoRegistration(params, context) {
999
1111
  return this.updateRepoRegistration$Response(params, context).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.map)(r => r.body));
1000
1112
  }
1113
+ /** Path part for operation `getCacheUsage()` */
1114
+ static {
1115
+ this.GetCacheUsagePath = '/admin/cache/usage';
1116
+ }
1117
+ /**
1118
+ * This method provides access to the full `HttpResponse`, allowing access to response headers.
1119
+ * To access only the response body, use `getCacheUsage()` instead.
1120
+ *
1121
+ * This method doesn't expect any request body.
1122
+ */
1123
+ getCacheUsage$Response(params, context) {
1124
+ return getCacheUsage(this.http, this.rootUrl, params, context);
1125
+ }
1126
+ /**
1127
+ * This method provides access only to the response body.
1128
+ * To access the full response (for headers, for example), `getCacheUsage$Response()` instead.
1129
+ *
1130
+ * This method doesn't expect any request body.
1131
+ */
1132
+ getCacheUsage(params, context) {
1133
+ return this.getCacheUsage$Response(params, context).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.map)(r => r.body));
1134
+ }
1001
1135
  /** Path part for operation `deleteObjectFromCache()` */
1002
1136
  static {
1003
1137
  this.DeleteObjectFromCachePath = '/admin/cache/remove';
@@ -1579,10 +1713,10 @@ class PingControllerService extends BaseService {
1579
1713
  /**
1580
1714
  * Module that provides all services and configuration.
1581
1715
  */
1582
- class ApiModule {
1716
+ class RenderingServiceModule {
1583
1717
  static forRoot(params) {
1584
1718
  return {
1585
- ngModule: ApiModule,
1719
+ ngModule: RenderingServiceModule,
1586
1720
  providers: [{
1587
1721
  provide: ApiConfiguration,
1588
1722
  useValue: params
@@ -1591,20 +1725,20 @@ class ApiModule {
1591
1725
  }
1592
1726
  constructor(parentModule, http) {
1593
1727
  if (parentModule) {
1594
- throw new Error('ApiModule is already loaded. Import in your base AppModule only.');
1728
+ throw new Error('RenderingServiceModule is already loaded. Import in your base AppModule only.');
1595
1729
  }
1596
1730
  if (!http) {
1597
1731
  throw new Error('You need to import the HttpClientModule in your AppModule! \n' + 'See also https://github.com/angular/angular/issues/20575');
1598
1732
  }
1599
1733
  }
1600
1734
  static {
1601
- this.ɵfac = function ApiModule_Factory(__ngFactoryType__) {
1602
- return new (__ngFactoryType__ || ApiModule)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](ApiModule, 12), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common_http__WEBPACK_IMPORTED_MODULE_1__.HttpClient, 8));
1735
+ this.ɵfac = function RenderingServiceModule_Factory(__ngFactoryType__) {
1736
+ return new (__ngFactoryType__ || RenderingServiceModule)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](RenderingServiceModule, 12), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common_http__WEBPACK_IMPORTED_MODULE_1__.HttpClient, 8));
1603
1737
  };
1604
1738
  }
1605
1739
  static {
1606
1740
  this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
1607
- type: ApiModule
1741
+ type: RenderingServiceModule
1608
1742
  });
1609
1743
  }
1610
1744
  static {
@@ -1614,7 +1748,7 @@ class ApiModule {
1614
1748
  }
1615
1749
  }
1616
1750
  (() => {
1617
- (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ApiModule, [{
1751
+ (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](RenderingServiceModule, [{
1618
1752
  type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule,
1619
1753
  args: [{
1620
1754
  imports: [],
@@ -1623,7 +1757,7 @@ class ApiModule {
1623
1757
  providers: [EduTrackingControllerService, AdminControllerService, RenderControllerService, ModuleInfoControllerService, JobInfoControllerService, LumiProxyControllerService, AssetControllerService, PingControllerService, ApiConfiguration]
1624
1758
  }]
1625
1759
  }], () => [{
1626
- type: ApiModule,
1760
+ type: RenderingServiceModule,
1627
1761
  decorators: [{
1628
1762
  type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional
1629
1763
  }, {
@@ -1636,19 +1770,16 @@ class ApiModule {
1636
1770
  }]
1637
1771
  }], null);
1638
1772
  })();
1639
- class AppModule {}
1773
+ const API_INTERCEPTOR_PROVIDER = {
1774
+ provide: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__.HTTP_INTERCEPTORS,
1775
+ useExisting: (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(() => RenderingServiceApiInterceptor),
1776
+ multi: true
1777
+ };
1640
1778
  class RenderingServiceApiModule {
1641
1779
  static forRoot(params) {
1642
1780
  return {
1643
1781
  ngModule: RenderingServiceApiModule,
1644
- providers: [
1645
- /*{
1646
- provide: HTTP_INTERCEPTORS,
1647
- useClass: RenderingServiceApiInterceptor,
1648
- multi: true
1649
- },
1650
- provideHttpClient(withInterceptorsFromDi()),*/
1651
- ...getConfigProvider(params)]
1782
+ providers: [RenderingServiceApiInterceptor, API_INTERCEPTOR_PROVIDER, ...getConfigProvider(params)]
1652
1783
  };
1653
1784
  }
1654
1785
  static {
@@ -1663,7 +1794,7 @@ class RenderingServiceApiModule {
1663
1794
  }
1664
1795
  static {
1665
1796
  this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
1666
- imports: [ApiModule.forRoot({})]
1797
+ imports: [RenderingServiceModule.forRoot({})]
1667
1798
  });
1668
1799
  }
1669
1800
  }
@@ -1672,7 +1803,7 @@ class RenderingServiceApiModule {
1672
1803
  type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule,
1673
1804
  args: [{
1674
1805
  declarations: [],
1675
- imports: [ApiModule.forRoot({})],
1806
+ imports: [RenderingServiceModule.forRoot({})],
1676
1807
  exports: []
1677
1808
  }]
1678
1809
  }], null, null);