teraprox-core-sdk 0.3.6 → 0.3.8
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/index.d.mts +16 -133
- package/dist/index.d.ts +16 -133
- package/dist/index.js +16 -23
- package/dist/index.mjs +16 -23
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CoreService, T as ToastService,
|
|
1
|
+
import { C as CoreService, T as ToastService, H as HttpController, I as IObservabilityPort, a as InteractionPayload, V as VitalsPayload, B as BreadcrumbPayload } from './federation-Bhx0XhSP.mjs';
|
|
2
2
|
export { D as DevAutoLogin, F as FederatedBridge, M as MatchingObjectSubscription, R as ReducersBundle, b as ReducersBundleConfig, c as RemoteManifest, d as RemoteMenuItem, e as RemoteMenuSection, S as StandaloneProvider, f as ToastOptions, g as createReducersBundle } from './federation-Bhx0XhSP.mjs';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Dispatch } from 'react';
|
|
@@ -80,8 +80,12 @@ declare class CoreServiceBuilder {
|
|
|
80
80
|
private _hostedByCore;
|
|
81
81
|
private _observability;
|
|
82
82
|
private _tracing;
|
|
83
|
+
private _gatewayHost?;
|
|
84
|
+
private _fallbackControllers;
|
|
83
85
|
withToast(toast: ToastService): this;
|
|
84
86
|
withHttpEndpoint(url: string): this;
|
|
87
|
+
withGatewayHost(host: string): this;
|
|
88
|
+
withFallbackController(context: string, controller: HttpController): this;
|
|
85
89
|
withRtdbConfig(config: any): this;
|
|
86
90
|
setHostedByCore(hosted: boolean): this;
|
|
87
91
|
withObservability(observability: IObservabilityPort): this;
|
|
@@ -102,138 +106,17 @@ declare class NullToastService implements ToastService {
|
|
|
102
106
|
}
|
|
103
107
|
declare class NullHttpController implements HttpController {
|
|
104
108
|
private logAndResolve;
|
|
105
|
-
get(path?: string): Promise<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}[]>;
|
|
117
|
-
post(path?: string): Promise<{
|
|
118
|
-
id: number;
|
|
119
|
-
nome: string;
|
|
120
|
-
branchLevel: {
|
|
121
|
-
level: number;
|
|
122
|
-
};
|
|
123
|
-
status: string;
|
|
124
|
-
}[]> | Promise<{
|
|
125
|
-
id: number;
|
|
126
|
-
level: number;
|
|
127
|
-
nome: string;
|
|
128
|
-
}[]>;
|
|
129
|
-
put(path?: string): Promise<{
|
|
130
|
-
id: number;
|
|
131
|
-
nome: string;
|
|
132
|
-
branchLevel: {
|
|
133
|
-
level: number;
|
|
134
|
-
};
|
|
135
|
-
status: string;
|
|
136
|
-
}[]> | Promise<{
|
|
137
|
-
id: number;
|
|
138
|
-
level: number;
|
|
139
|
-
nome: string;
|
|
140
|
-
}[]>;
|
|
141
|
-
patch(path?: string): Promise<{
|
|
142
|
-
id: number;
|
|
143
|
-
nome: string;
|
|
144
|
-
branchLevel: {
|
|
145
|
-
level: number;
|
|
146
|
-
};
|
|
147
|
-
status: string;
|
|
148
|
-
}[]> | Promise<{
|
|
149
|
-
id: number;
|
|
150
|
-
level: number;
|
|
151
|
-
nome: string;
|
|
152
|
-
}[]>;
|
|
153
|
-
delete(path?: string, id?: string | number): Promise<{
|
|
154
|
-
id: number;
|
|
155
|
-
nome: string;
|
|
156
|
-
branchLevel: {
|
|
157
|
-
level: number;
|
|
158
|
-
};
|
|
159
|
-
status: string;
|
|
160
|
-
}[]> | Promise<{
|
|
161
|
-
id: number;
|
|
162
|
-
level: number;
|
|
163
|
-
nome: string;
|
|
164
|
-
}[]>;
|
|
165
|
-
deleteSimple(path?: string): Promise<{
|
|
166
|
-
id: number;
|
|
167
|
-
nome: string;
|
|
168
|
-
branchLevel: {
|
|
169
|
-
level: number;
|
|
170
|
-
};
|
|
171
|
-
status: string;
|
|
172
|
-
}[]> | Promise<{
|
|
173
|
-
id: number;
|
|
174
|
-
level: number;
|
|
175
|
-
nome: string;
|
|
176
|
-
}[]>;
|
|
177
|
-
save(path?: string): Promise<{
|
|
178
|
-
id: number;
|
|
179
|
-
nome: string;
|
|
180
|
-
branchLevel: {
|
|
181
|
-
level: number;
|
|
182
|
-
};
|
|
183
|
-
status: string;
|
|
184
|
-
}[]> | Promise<{
|
|
185
|
-
id: number;
|
|
186
|
-
level: number;
|
|
187
|
-
nome: string;
|
|
188
|
-
}[]>;
|
|
189
|
-
read(path?: string, id?: string | number): Promise<{
|
|
190
|
-
id: number;
|
|
191
|
-
nome: string;
|
|
192
|
-
branchLevel: {
|
|
193
|
-
level: number;
|
|
194
|
-
};
|
|
195
|
-
status: string;
|
|
196
|
-
}[]> | Promise<{
|
|
197
|
-
id: number;
|
|
198
|
-
level: number;
|
|
199
|
-
nome: string;
|
|
200
|
-
}[]>;
|
|
201
|
-
readAll(path?: string): Promise<{
|
|
202
|
-
id: number;
|
|
203
|
-
nome: string;
|
|
204
|
-
branchLevel: {
|
|
205
|
-
level: number;
|
|
206
|
-
};
|
|
207
|
-
status: string;
|
|
208
|
-
}[]> | Promise<{
|
|
209
|
-
id: number;
|
|
210
|
-
level: number;
|
|
211
|
-
nome: string;
|
|
212
|
-
}[]>;
|
|
213
|
-
readAllwithPage(path?: string): Promise<{
|
|
214
|
-
id: number;
|
|
215
|
-
nome: string;
|
|
216
|
-
branchLevel: {
|
|
217
|
-
level: number;
|
|
218
|
-
};
|
|
219
|
-
status: string;
|
|
220
|
-
}[]> | Promise<{
|
|
221
|
-
id: number;
|
|
222
|
-
level: number;
|
|
223
|
-
nome: string;
|
|
224
|
-
}[]>;
|
|
225
|
-
bulkDelete(path?: string): Promise<{
|
|
226
|
-
id: number;
|
|
227
|
-
nome: string;
|
|
228
|
-
branchLevel: {
|
|
229
|
-
level: number;
|
|
230
|
-
};
|
|
231
|
-
status: string;
|
|
232
|
-
}[]> | Promise<{
|
|
233
|
-
id: number;
|
|
234
|
-
level: number;
|
|
235
|
-
nome: string;
|
|
236
|
-
}[]>;
|
|
109
|
+
get(path?: string): Promise<never[]>;
|
|
110
|
+
post(path?: string): Promise<never[]>;
|
|
111
|
+
put(path?: string): Promise<never[]>;
|
|
112
|
+
patch(path?: string): Promise<never[]>;
|
|
113
|
+
delete(path?: string, id?: string | number): Promise<never[]>;
|
|
114
|
+
deleteSimple(path?: string): Promise<never[]>;
|
|
115
|
+
save(path?: string): Promise<never[]>;
|
|
116
|
+
read(path?: string, id?: string | number): Promise<never[]>;
|
|
117
|
+
readAll(path?: string): Promise<never[]>;
|
|
118
|
+
readAllwithPage(path?: string): Promise<never[]>;
|
|
119
|
+
bulkDelete(path?: string): Promise<never[]>;
|
|
237
120
|
}
|
|
238
121
|
declare const NullCoreService: CoreService;
|
|
239
122
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CoreService, T as ToastService,
|
|
1
|
+
import { C as CoreService, T as ToastService, H as HttpController, I as IObservabilityPort, a as InteractionPayload, V as VitalsPayload, B as BreadcrumbPayload } from './federation-Bhx0XhSP.js';
|
|
2
2
|
export { D as DevAutoLogin, F as FederatedBridge, M as MatchingObjectSubscription, R as ReducersBundle, b as ReducersBundleConfig, c as RemoteManifest, d as RemoteMenuItem, e as RemoteMenuSection, S as StandaloneProvider, f as ToastOptions, g as createReducersBundle } from './federation-Bhx0XhSP.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Dispatch } from 'react';
|
|
@@ -80,8 +80,12 @@ declare class CoreServiceBuilder {
|
|
|
80
80
|
private _hostedByCore;
|
|
81
81
|
private _observability;
|
|
82
82
|
private _tracing;
|
|
83
|
+
private _gatewayHost?;
|
|
84
|
+
private _fallbackControllers;
|
|
83
85
|
withToast(toast: ToastService): this;
|
|
84
86
|
withHttpEndpoint(url: string): this;
|
|
87
|
+
withGatewayHost(host: string): this;
|
|
88
|
+
withFallbackController(context: string, controller: HttpController): this;
|
|
85
89
|
withRtdbConfig(config: any): this;
|
|
86
90
|
setHostedByCore(hosted: boolean): this;
|
|
87
91
|
withObservability(observability: IObservabilityPort): this;
|
|
@@ -102,138 +106,17 @@ declare class NullToastService implements ToastService {
|
|
|
102
106
|
}
|
|
103
107
|
declare class NullHttpController implements HttpController {
|
|
104
108
|
private logAndResolve;
|
|
105
|
-
get(path?: string): Promise<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}[]>;
|
|
117
|
-
post(path?: string): Promise<{
|
|
118
|
-
id: number;
|
|
119
|
-
nome: string;
|
|
120
|
-
branchLevel: {
|
|
121
|
-
level: number;
|
|
122
|
-
};
|
|
123
|
-
status: string;
|
|
124
|
-
}[]> | Promise<{
|
|
125
|
-
id: number;
|
|
126
|
-
level: number;
|
|
127
|
-
nome: string;
|
|
128
|
-
}[]>;
|
|
129
|
-
put(path?: string): Promise<{
|
|
130
|
-
id: number;
|
|
131
|
-
nome: string;
|
|
132
|
-
branchLevel: {
|
|
133
|
-
level: number;
|
|
134
|
-
};
|
|
135
|
-
status: string;
|
|
136
|
-
}[]> | Promise<{
|
|
137
|
-
id: number;
|
|
138
|
-
level: number;
|
|
139
|
-
nome: string;
|
|
140
|
-
}[]>;
|
|
141
|
-
patch(path?: string): Promise<{
|
|
142
|
-
id: number;
|
|
143
|
-
nome: string;
|
|
144
|
-
branchLevel: {
|
|
145
|
-
level: number;
|
|
146
|
-
};
|
|
147
|
-
status: string;
|
|
148
|
-
}[]> | Promise<{
|
|
149
|
-
id: number;
|
|
150
|
-
level: number;
|
|
151
|
-
nome: string;
|
|
152
|
-
}[]>;
|
|
153
|
-
delete(path?: string, id?: string | number): Promise<{
|
|
154
|
-
id: number;
|
|
155
|
-
nome: string;
|
|
156
|
-
branchLevel: {
|
|
157
|
-
level: number;
|
|
158
|
-
};
|
|
159
|
-
status: string;
|
|
160
|
-
}[]> | Promise<{
|
|
161
|
-
id: number;
|
|
162
|
-
level: number;
|
|
163
|
-
nome: string;
|
|
164
|
-
}[]>;
|
|
165
|
-
deleteSimple(path?: string): Promise<{
|
|
166
|
-
id: number;
|
|
167
|
-
nome: string;
|
|
168
|
-
branchLevel: {
|
|
169
|
-
level: number;
|
|
170
|
-
};
|
|
171
|
-
status: string;
|
|
172
|
-
}[]> | Promise<{
|
|
173
|
-
id: number;
|
|
174
|
-
level: number;
|
|
175
|
-
nome: string;
|
|
176
|
-
}[]>;
|
|
177
|
-
save(path?: string): Promise<{
|
|
178
|
-
id: number;
|
|
179
|
-
nome: string;
|
|
180
|
-
branchLevel: {
|
|
181
|
-
level: number;
|
|
182
|
-
};
|
|
183
|
-
status: string;
|
|
184
|
-
}[]> | Promise<{
|
|
185
|
-
id: number;
|
|
186
|
-
level: number;
|
|
187
|
-
nome: string;
|
|
188
|
-
}[]>;
|
|
189
|
-
read(path?: string, id?: string | number): Promise<{
|
|
190
|
-
id: number;
|
|
191
|
-
nome: string;
|
|
192
|
-
branchLevel: {
|
|
193
|
-
level: number;
|
|
194
|
-
};
|
|
195
|
-
status: string;
|
|
196
|
-
}[]> | Promise<{
|
|
197
|
-
id: number;
|
|
198
|
-
level: number;
|
|
199
|
-
nome: string;
|
|
200
|
-
}[]>;
|
|
201
|
-
readAll(path?: string): Promise<{
|
|
202
|
-
id: number;
|
|
203
|
-
nome: string;
|
|
204
|
-
branchLevel: {
|
|
205
|
-
level: number;
|
|
206
|
-
};
|
|
207
|
-
status: string;
|
|
208
|
-
}[]> | Promise<{
|
|
209
|
-
id: number;
|
|
210
|
-
level: number;
|
|
211
|
-
nome: string;
|
|
212
|
-
}[]>;
|
|
213
|
-
readAllwithPage(path?: string): Promise<{
|
|
214
|
-
id: number;
|
|
215
|
-
nome: string;
|
|
216
|
-
branchLevel: {
|
|
217
|
-
level: number;
|
|
218
|
-
};
|
|
219
|
-
status: string;
|
|
220
|
-
}[]> | Promise<{
|
|
221
|
-
id: number;
|
|
222
|
-
level: number;
|
|
223
|
-
nome: string;
|
|
224
|
-
}[]>;
|
|
225
|
-
bulkDelete(path?: string): Promise<{
|
|
226
|
-
id: number;
|
|
227
|
-
nome: string;
|
|
228
|
-
branchLevel: {
|
|
229
|
-
level: number;
|
|
230
|
-
};
|
|
231
|
-
status: string;
|
|
232
|
-
}[]> | Promise<{
|
|
233
|
-
id: number;
|
|
234
|
-
level: number;
|
|
235
|
-
nome: string;
|
|
236
|
-
}[]>;
|
|
109
|
+
get(path?: string): Promise<never[]>;
|
|
110
|
+
post(path?: string): Promise<never[]>;
|
|
111
|
+
put(path?: string): Promise<never[]>;
|
|
112
|
+
patch(path?: string): Promise<never[]>;
|
|
113
|
+
delete(path?: string, id?: string | number): Promise<never[]>;
|
|
114
|
+
deleteSimple(path?: string): Promise<never[]>;
|
|
115
|
+
save(path?: string): Promise<never[]>;
|
|
116
|
+
read(path?: string, id?: string | number): Promise<never[]>;
|
|
117
|
+
readAll(path?: string): Promise<never[]>;
|
|
118
|
+
readAllwithPage(path?: string): Promise<never[]>;
|
|
119
|
+
bulkDelete(path?: string): Promise<never[]>;
|
|
237
120
|
}
|
|
238
121
|
declare const NullCoreService: CoreService;
|
|
239
122
|
|
package/dist/index.js
CHANGED
|
@@ -130,26 +130,6 @@ var NullToastService = class {
|
|
|
130
130
|
var NullHttpController = class {
|
|
131
131
|
logAndResolve(method, path, context) {
|
|
132
132
|
console.warn(`[Http Fallback] MOCK ${method} requisitado para ${path} (Contexto: ${context})`);
|
|
133
|
-
if (process.env.NODE_ENV !== "production") {
|
|
134
|
-
if (context === "arvoreEstrutural" && path && path.includes("branchByBranchLevel")) {
|
|
135
|
-
return Promise.resolve([
|
|
136
|
-
{
|
|
137
|
-
id: 1,
|
|
138
|
-
nome: "Planta Industrial Mock",
|
|
139
|
-
branchLevel: { level: 1 },
|
|
140
|
-
status: "Ativo"
|
|
141
|
-
}
|
|
142
|
-
]);
|
|
143
|
-
}
|
|
144
|
-
if (context === "branchLevel" && method === "READ_ALL") {
|
|
145
|
-
return Promise.resolve([
|
|
146
|
-
{ id: 1, level: 1, nome: "Empresa" },
|
|
147
|
-
{ id: 2, level: 2, nome: "Unidade" },
|
|
148
|
-
{ id: 3, level: 3, nome: "\xC1rea" },
|
|
149
|
-
{ id: 4, level: 4, nome: "M\xE1quina" }
|
|
150
|
-
]);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
133
|
return Promise.resolve([]);
|
|
154
134
|
}
|
|
155
135
|
get(path) {
|
|
@@ -356,6 +336,7 @@ var CoreServiceBuilder = class {
|
|
|
356
336
|
this._hostedByCore = false;
|
|
357
337
|
this._observability = new NullObservabilityAdapter();
|
|
358
338
|
this._tracing = false;
|
|
339
|
+
this._fallbackControllers = {};
|
|
359
340
|
}
|
|
360
341
|
withToast(toast) {
|
|
361
342
|
this._toast = toast;
|
|
@@ -365,6 +346,14 @@ var CoreServiceBuilder = class {
|
|
|
365
346
|
this._httpEndpoint = url;
|
|
366
347
|
return this;
|
|
367
348
|
}
|
|
349
|
+
withGatewayHost(host) {
|
|
350
|
+
this._gatewayHost = host;
|
|
351
|
+
return this;
|
|
352
|
+
}
|
|
353
|
+
withFallbackController(context, controller) {
|
|
354
|
+
this._fallbackControllers[context] = controller;
|
|
355
|
+
return this;
|
|
356
|
+
}
|
|
368
357
|
withRtdbConfig(config) {
|
|
369
358
|
this._rtdbConfig = config;
|
|
370
359
|
return this;
|
|
@@ -390,6 +379,9 @@ var CoreServiceBuilder = class {
|
|
|
390
379
|
return {
|
|
391
380
|
toast: this._toast,
|
|
392
381
|
createController: (context, baseEndPoint) => {
|
|
382
|
+
if (this._fallbackControllers[context]) {
|
|
383
|
+
return this._fallbackControllers[context];
|
|
384
|
+
}
|
|
393
385
|
const endpoint = baseEndPoint != null ? baseEndPoint : this._httpEndpoint ? `${this._httpEndpoint}/${context}` : null;
|
|
394
386
|
if (!endpoint) {
|
|
395
387
|
console.warn(`[CoreServiceBuilder] HttpEndpoint nulo para "${context}". Usando NullHttpController.`);
|
|
@@ -397,8 +389,9 @@ var CoreServiceBuilder = class {
|
|
|
397
389
|
controller.context = context;
|
|
398
390
|
return controller;
|
|
399
391
|
}
|
|
400
|
-
const
|
|
401
|
-
const
|
|
392
|
+
const envHost = typeof process !== "undefined" && process.env ? process.env.REACT_APP_TERAPROX_GATEWAY_HOST || process.env.VITE_TERAPROX_GATEWAY_HOST : void 0;
|
|
393
|
+
const hostHeader = this._gatewayHost || envHost || context;
|
|
394
|
+
const extraHeaders = { "x-teraprox-host": hostHeader };
|
|
402
395
|
return this._tracing ? new TracingHttpAdapter(endpoint, extraHeaders) : new FetchHttpAdapter(endpoint, extraHeaders);
|
|
403
396
|
},
|
|
404
397
|
subscribe: (mo) => {
|
|
@@ -858,7 +851,7 @@ var BranchDropDisplay = ({
|
|
|
858
851
|
setMultiSelected([]);
|
|
859
852
|
};
|
|
860
853
|
const isLastBranchClicked = () => branches.length > 0 && branches[branches.length - 1].id === branch.id;
|
|
861
|
-
const visibleNodes = branch.branchNodes.filter(
|
|
854
|
+
const visibleNodes = (branch.branchNodes || []).filter(
|
|
862
855
|
(bn) => bn.recurso.nome.toLowerCase().includes(searchTerm.toLowerCase())
|
|
863
856
|
);
|
|
864
857
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
package/dist/index.mjs
CHANGED
|
@@ -25,26 +25,6 @@ var NullToastService = class {
|
|
|
25
25
|
var NullHttpController = class {
|
|
26
26
|
logAndResolve(method, path, context) {
|
|
27
27
|
console.warn(`[Http Fallback] MOCK ${method} requisitado para ${path} (Contexto: ${context})`);
|
|
28
|
-
if (process.env.NODE_ENV !== "production") {
|
|
29
|
-
if (context === "arvoreEstrutural" && path && path.includes("branchByBranchLevel")) {
|
|
30
|
-
return Promise.resolve([
|
|
31
|
-
{
|
|
32
|
-
id: 1,
|
|
33
|
-
nome: "Planta Industrial Mock",
|
|
34
|
-
branchLevel: { level: 1 },
|
|
35
|
-
status: "Ativo"
|
|
36
|
-
}
|
|
37
|
-
]);
|
|
38
|
-
}
|
|
39
|
-
if (context === "branchLevel" && method === "READ_ALL") {
|
|
40
|
-
return Promise.resolve([
|
|
41
|
-
{ id: 1, level: 1, nome: "Empresa" },
|
|
42
|
-
{ id: 2, level: 2, nome: "Unidade" },
|
|
43
|
-
{ id: 3, level: 3, nome: "\xC1rea" },
|
|
44
|
-
{ id: 4, level: 4, nome: "M\xE1quina" }
|
|
45
|
-
]);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
28
|
return Promise.resolve([]);
|
|
49
29
|
}
|
|
50
30
|
get(path) {
|
|
@@ -251,6 +231,7 @@ var CoreServiceBuilder = class {
|
|
|
251
231
|
this._hostedByCore = false;
|
|
252
232
|
this._observability = new NullObservabilityAdapter();
|
|
253
233
|
this._tracing = false;
|
|
234
|
+
this._fallbackControllers = {};
|
|
254
235
|
}
|
|
255
236
|
withToast(toast) {
|
|
256
237
|
this._toast = toast;
|
|
@@ -260,6 +241,14 @@ var CoreServiceBuilder = class {
|
|
|
260
241
|
this._httpEndpoint = url;
|
|
261
242
|
return this;
|
|
262
243
|
}
|
|
244
|
+
withGatewayHost(host) {
|
|
245
|
+
this._gatewayHost = host;
|
|
246
|
+
return this;
|
|
247
|
+
}
|
|
248
|
+
withFallbackController(context, controller) {
|
|
249
|
+
this._fallbackControllers[context] = controller;
|
|
250
|
+
return this;
|
|
251
|
+
}
|
|
263
252
|
withRtdbConfig(config) {
|
|
264
253
|
this._rtdbConfig = config;
|
|
265
254
|
return this;
|
|
@@ -285,6 +274,9 @@ var CoreServiceBuilder = class {
|
|
|
285
274
|
return {
|
|
286
275
|
toast: this._toast,
|
|
287
276
|
createController: (context, baseEndPoint) => {
|
|
277
|
+
if (this._fallbackControllers[context]) {
|
|
278
|
+
return this._fallbackControllers[context];
|
|
279
|
+
}
|
|
288
280
|
const endpoint = baseEndPoint != null ? baseEndPoint : this._httpEndpoint ? `${this._httpEndpoint}/${context}` : null;
|
|
289
281
|
if (!endpoint) {
|
|
290
282
|
console.warn(`[CoreServiceBuilder] HttpEndpoint nulo para "${context}". Usando NullHttpController.`);
|
|
@@ -292,8 +284,9 @@ var CoreServiceBuilder = class {
|
|
|
292
284
|
controller.context = context;
|
|
293
285
|
return controller;
|
|
294
286
|
}
|
|
295
|
-
const
|
|
296
|
-
const
|
|
287
|
+
const envHost = typeof process !== "undefined" && process.env ? process.env.REACT_APP_TERAPROX_GATEWAY_HOST || process.env.VITE_TERAPROX_GATEWAY_HOST : void 0;
|
|
288
|
+
const hostHeader = this._gatewayHost || envHost || context;
|
|
289
|
+
const extraHeaders = { "x-teraprox-host": hostHeader };
|
|
297
290
|
return this._tracing ? new TracingHttpAdapter(endpoint, extraHeaders) : new FetchHttpAdapter(endpoint, extraHeaders);
|
|
298
291
|
},
|
|
299
292
|
subscribe: (mo) => {
|
|
@@ -753,7 +746,7 @@ var BranchDropDisplay = ({
|
|
|
753
746
|
setMultiSelected([]);
|
|
754
747
|
};
|
|
755
748
|
const isLastBranchClicked = () => branches.length > 0 && branches[branches.length - 1].id === branch.id;
|
|
756
|
-
const visibleNodes = branch.branchNodes.filter(
|
|
749
|
+
const visibleNodes = (branch.branchNodes || []).filter(
|
|
757
750
|
(bn) => bn.recurso.nome.toLowerCase().includes(searchTerm.toLowerCase())
|
|
758
751
|
);
|
|
759
752
|
return /* @__PURE__ */ jsxs(
|
package/package.json
CHANGED