@planeasyinc/le-angular 0.0.23 → 0.0.24

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.
@@ -23,7 +23,7 @@ import { FeFieldHost } from '@planeasyinc/fe-angular';
23
23
  import * as i1 from '@angular/forms';
24
24
  import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
25
25
 
26
- const IS_LIBRARY_REQUEST = new HttpContextToken(() => false);
26
+ const LE_REQUEST_CONTEXT_TOKEN = new HttpContextToken(() => false);
27
27
 
28
28
  const defaultConfig = {
29
29
  apiUrl: '',
@@ -87,7 +87,7 @@ class LEApiService {
87
87
  const url = new UrlFragmentBuilder(this.apiUrl())
88
88
  .setFragment('api/contrib/frontend-config/dashboard/config')
89
89
  .build();
90
- return this.http.get(url, { context: new HttpContext().set(IS_LIBRARY_REQUEST, true) });
90
+ return this.http.get(url, { context: new HttpContext().set(LE_REQUEST_CONTEXT_TOKEN, true) });
91
91
  }
92
92
  getObject(className, query = '') {
93
93
  const url = new UrlFragmentBuilder(this.apiUrl())
@@ -97,7 +97,7 @@ class LEApiService {
97
97
  .setQuery(query)
98
98
  .build();
99
99
  return this.http.get(url, {
100
- context: new HttpContext().set(IS_LIBRARY_REQUEST, true),
100
+ context: new HttpContext().set(LE_REQUEST_CONTEXT_TOKEN, true),
101
101
  });
102
102
  }
103
103
  getObjectByAddress(address, params) {
@@ -106,7 +106,7 @@ class LEApiService {
106
106
  .setQuery(`all_versions=${params.includeVersions ?? false}&include_metadata=${params.includeMeta ?? false}&load_references=${params.loadReferences ?? false}&file_optimized=${params.fileOptimized ?? true}`)
107
107
  .build();
108
108
  return this.http.get(url, {
109
- context: new HttpContext().set(IS_LIBRARY_REQUEST, true),
109
+ context: new HttpContext().set(LE_REQUEST_CONTEXT_TOKEN, true),
110
110
  });
111
111
  }
112
112
  executeTransaction(name, body, query = '') {
@@ -115,20 +115,20 @@ class LEApiService {
115
115
  .setQuery(query)
116
116
  .build();
117
117
  return this.http.post(url, body ?? {}, {
118
- context: new HttpContext().set(IS_LIBRARY_REQUEST, true),
118
+ context: new HttpContext().set(LE_REQUEST_CONTEXT_TOKEN, true),
119
119
  });
120
120
  }
121
121
  request(method, path, body) {
122
122
  const url = new UrlFragmentBuilder(this.apiUrl()).setFragment(path).build();
123
123
  const request = new HttpRequest(method, url, body, {
124
124
  responseType: 'json',
125
- context: new HttpContext().set(IS_LIBRARY_REQUEST, true),
125
+ context: new HttpContext().set(LE_REQUEST_CONTEXT_TOKEN, true),
126
126
  });
127
127
  return this.http.request(request);
128
128
  }
129
129
  getBlob(path) {
130
130
  return this.http
131
- .get(path, { responseType: 'blob', context: new HttpContext().set(IS_LIBRARY_REQUEST, true) })
131
+ .get(path, { responseType: 'blob', context: new HttpContext().set(LE_REQUEST_CONTEXT_TOKEN, true) })
132
132
  .pipe(map((blob) => URL.createObjectURL(blob)));
133
133
  }
134
134
  normalizeApiUrl(url) {
@@ -257,7 +257,7 @@ class LEDataService {
257
257
  navigateByNodeId(id) {
258
258
  const node = this.getNodeById(id);
259
259
  if (node) {
260
- this._view.set(node);
260
+ this.setView(node);
261
261
  }
262
262
  }
263
263
  getNodeById(id, node = this._config()) {
@@ -2774,7 +2774,7 @@ const LEAuthInterceptor = (req, next) => {
2774
2774
  if (authService.isGuest()) {
2775
2775
  return next(req);
2776
2776
  }
2777
- if (req.context.get(IS_LIBRARY_REQUEST)) {
2777
+ if (req.context.get(LE_REQUEST_CONTEXT_TOKEN)) {
2778
2778
  try {
2779
2779
  authService.validateToken();
2780
2780
  return next(req.clone({ setHeaders: { Authorization: authService.token() } }));
@@ -2791,5 +2791,5 @@ const LEAuthInterceptor = (req, next) => {
2791
2791
  * Generated bundle index. Do not edit.
2792
2792
  */
2793
2793
 
2794
- export { CONFIG_TOKEN, LEAuthInterceptor, LEAuthService, LeContainerComponent, LeToastService, provideConfig };
2794
+ export { CONFIG_TOKEN, LEAuthInterceptor, LEAuthService, CONFIG_TOKEN as LE_CONFIG_TOKEN, LE_REQUEST_CONTEXT_TOKEN, LeContainerComponent, LeToastService, provideConfig };
2795
2795
  //# sourceMappingURL=planeasyinc-le-angular.mjs.map