@controleonline/ui-common 1.2.128 → 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,13 +1,13 @@
1
1
  {
2
- "version": "1.2.128",
2
+ "version": "1.2.129",
3
3
  "rc": 1,
4
- "branch": "rc/1.2.128-rc.1",
5
- "baseMaster": "6124d3024530bbb8ebdbccb86ccd7d4f36fd4229",
4
+ "branch": "rc/1.2.129-rc.1",
5
+ "baseMaster": "205e7aa21d2566dfbca23ae63874916cc50ac70c",
6
6
  "tasks": [
7
- 145
7
+ 150
8
8
  ],
9
9
  "frozen": true,
10
10
  "repositories": {
11
- "ControleOnline/ui-common": "5e974061a670257449936d0adae58d07791db502"
11
+ "ControleOnline/ui-common": "7638afac3f534e9320b60eb6dda99e1a18edb790"
12
12
  }
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@controleonline/ui-common",
3
- "version": "1.2.128",
3
+ "version": "1.2.129",
4
4
  "author": "ControleOnline",
5
5
  "description": "ControleOnline Common Quasar UI Component",
6
6
  "license": "MIT",
@@ -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
- await persistConfigs({ configs, people: providerIri, module: 4, visibility: configVisibility });
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.'); }
@@ -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', () => {