@controleonline/ui-common 1.2.127 → 1.2.129
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.
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.2.
|
|
2
|
+
"version": "1.2.129",
|
|
3
3
|
"rc": 1,
|
|
4
|
-
"branch": "rc/1.2.
|
|
5
|
-
"baseMaster": "
|
|
4
|
+
"branch": "rc/1.2.129-rc.1",
|
|
5
|
+
"baseMaster": "205e7aa21d2566dfbca23ae63874916cc50ac70c",
|
|
6
6
|
"tasks": [
|
|
7
|
-
|
|
8
|
-
145
|
|
7
|
+
150
|
|
9
8
|
],
|
|
10
9
|
"frozen": true,
|
|
11
10
|
"repositories": {
|
|
12
|
-
"ControleOnline/ui-common": "
|
|
11
|
+
"ControleOnline/ui-common": "7638afac3f534e9320b60eb6dda99e1a18edb790"
|
|
13
12
|
}
|
|
14
13
|
}
|
package/package.json
CHANGED
|
@@ -284,8 +284,24 @@ export default function IntegrationConfigPage({ route, embedded = false, fiscalT
|
|
|
284
284
|
}));
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
+
// Secrets (secureTextEntry) are always private: public configs are served without login by
|
|
288
|
+
// /people/company/default. The API enforces the same rule (api-platform-common#71).
|
|
289
|
+
const secretKeys = new Set(
|
|
290
|
+
(visibleFields || []).filter(field => field?.secureTextEntry).map(field => field.key),
|
|
291
|
+
);
|
|
292
|
+
const anySecret = secretKeys.size > 0;
|
|
293
|
+
const secretConfigs = bundleKey
|
|
294
|
+
? (anySecret ? configs : [])
|
|
295
|
+
: configs.filter(item => secretKeys.has(item.configKey));
|
|
296
|
+
const plainConfigs = configs.filter(item => !secretConfigs.includes(item));
|
|
297
|
+
|
|
287
298
|
try {
|
|
288
|
-
|
|
299
|
+
if (secretConfigs.length) {
|
|
300
|
+
await persistConfigs({ configs: secretConfigs, people: providerIri, module: 4, visibility: 'private' });
|
|
301
|
+
}
|
|
302
|
+
if (plainConfigs.length) {
|
|
303
|
+
await persistConfigs({ configs: plainConfigs, people: providerIri, module: 4, visibility: configVisibility });
|
|
304
|
+
}
|
|
289
305
|
showSuccess(`${activeTabDef?.label || providerConfig.label} salvo com sucesso.`);
|
|
290
306
|
await loadPageData({ showLoading: false });
|
|
291
307
|
} catch (error) { showError(error?.message || 'Nao foi possivel salvar a integracao.'); }
|
|
@@ -34,6 +34,7 @@ export const createWebsocketSharedRuntime = ({
|
|
|
34
34
|
leaderStaleMs = 6000,
|
|
35
35
|
reconnectBaseMs = 1500,
|
|
36
36
|
reconnectMaxMs = 12000,
|
|
37
|
+
connectTimeoutMs = 10000,
|
|
37
38
|
channelName = DEFAULT_CHANNEL_NAME,
|
|
38
39
|
} = {}) => {
|
|
39
40
|
const startedAt = now();
|
|
@@ -491,6 +492,20 @@ export const createWebsocketSharedRuntime = ({
|
|
|
491
492
|
const nextSocket = new WebSocketImpl(socketUrl);
|
|
492
493
|
socket = nextSocket;
|
|
493
494
|
|
|
495
|
+
// A socket can stay CONNECTING forever (seen in Chrome after the server closed the previous one):
|
|
496
|
+
// the leader then never reconnects and the screens only update with F5. Give up and retry.
|
|
497
|
+
setTimeoutImpl(() => {
|
|
498
|
+
if (
|
|
499
|
+
!destroyed &&
|
|
500
|
+
!manualClose &&
|
|
501
|
+
isCurrentSocket(nextSocket, generation) &&
|
|
502
|
+
nextSocket.readyState === WebSocketImpl.CONNECTING
|
|
503
|
+
) {
|
|
504
|
+
stopSocket();
|
|
505
|
+
scheduleReconnect();
|
|
506
|
+
}
|
|
507
|
+
}, connectTimeoutMs);
|
|
508
|
+
|
|
494
509
|
nextSocket.onopen = () => {
|
|
495
510
|
if (!isCurrentSocket(nextSocket, generation)) {
|
|
496
511
|
return;
|
|
@@ -37,7 +37,9 @@ test('embedded fiscal configuration keeps reads and writes on the company being
|
|
|
37
37
|
assert.match(page, /resolveProviderId\(\{ route, currentCompany, embedded \}\)/);
|
|
38
38
|
assert.match(page, /fetchPeopleConfigs/);
|
|
39
39
|
assert.match(page, /visibleFields/);
|
|
40
|
-
assert.match(page, /persistConfigs\(\{ configs, people: providerIri/);
|
|
40
|
+
assert.match(page, /persistConfigs\(\{ configs: plainConfigs, people: providerIri/);
|
|
41
|
+
// Secret fields are always saved private (api-platform-common#71).
|
|
42
|
+
assert.match(page, /persistConfigs\(\{ configs: secretConfigs, people: providerIri, module: 4, visibility: 'private' \}\)/);
|
|
41
43
|
});
|
|
42
44
|
|
|
43
45
|
test('fiscal tabs load all keys once; save only the current tab keys', () => {
|