@trismegisto/spine 3.0.0 → 3.0.2
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/fesm2022/{trismegisto-spine-auto-service-apps.technical-BAKdkVdz.mjs → trismegisto-spine-auto-service-apps.technical-D3W2Vwic.mjs} +26 -15
- package/fesm2022/trismegisto-spine-auto-service-apps.technical-D3W2Vwic.mjs.map +1 -0
- package/fesm2022/{trismegisto-spine-auto-service-apps.usage-CAXMP5r8.mjs → trismegisto-spine-auto-service-apps.usage-DeLfYMeO.mjs} +19 -13
- package/fesm2022/trismegisto-spine-auto-service-apps.usage-DeLfYMeO.mjs.map +1 -0
- package/fesm2022/trismegisto-spine-auto-service-auto-service-audit.component-BNtNWfiu.mjs +37 -0
- package/fesm2022/{trismegisto-spine-auto-service-auto-service-audit.component-BIL8tH1I.mjs.map → trismegisto-spine-auto-service-auto-service-audit.component-BNtNWfiu.mjs.map} +1 -1
- package/fesm2022/{trismegisto-spine-auto-service-auto-service-client-picker.component-CBt_0Uli.mjs → trismegisto-spine-auto-service-auto-service-client-picker.component-DdtDk_xl.mjs} +3 -3
- package/fesm2022/{trismegisto-spine-auto-service-auto-service-client-picker.component-CBt_0Uli.mjs.map → trismegisto-spine-auto-service-auto-service-client-picker.component-DdtDk_xl.mjs.map} +1 -1
- package/fesm2022/{trismegisto-spine-auto-service-auto-service-client.component-DAxhZC-a.mjs → trismegisto-spine-auto-service-auto-service-client.component-DXl1y6Sx.mjs} +15 -15
- package/fesm2022/{trismegisto-spine-auto-service-auto-service-client.component-DAxhZC-a.mjs.map → trismegisto-spine-auto-service-auto-service-client.component-DXl1y6Sx.mjs.map} +1 -1
- package/fesm2022/{trismegisto-spine-auto-service-auto-service-delete-CoJYTtBU.mjs → trismegisto-spine-auto-service-auto-service-delete-B1tXgMvi.mjs} +2 -1
- package/fesm2022/trismegisto-spine-auto-service-auto-service-delete-B1tXgMvi.mjs.map +1 -0
- package/fesm2022/{trismegisto-spine-auto-service-auto-service-groups.component-UVMGF7-B.mjs → trismegisto-spine-auto-service-auto-service-groups.component-C4iQ2GPX.mjs} +92 -37
- package/fesm2022/trismegisto-spine-auto-service-auto-service-groups.component-C4iQ2GPX.mjs.map +1 -0
- package/fesm2022/trismegisto-spine-auto-service-auto-service-login-attempts.component-B87vibNB.mjs +37 -0
- package/fesm2022/{trismegisto-spine-auto-service-auto-service-login-attempts.component-Boi-kG0G.mjs.map → trismegisto-spine-auto-service-auto-service-login-attempts.component-B87vibNB.mjs.map} +1 -1
- package/fesm2022/{trismegisto-spine-auto-service-auto-service.component-DmLafUkX.mjs → trismegisto-spine-auto-service-auto-service.component-DAXv__zg.mjs} +238 -100
- package/fesm2022/trismegisto-spine-auto-service-auto-service.component-DAXv__zg.mjs.map +1 -0
- package/fesm2022/{trismegisto-spine-auto-service-groups.technical-BlktCM70.mjs → trismegisto-spine-auto-service-groups.technical-D05838rU.mjs} +11 -7
- package/fesm2022/trismegisto-spine-auto-service-groups.technical-D05838rU.mjs.map +1 -0
- package/fesm2022/{trismegisto-spine-auto-service-groups.usage-Cz5sCKgn.mjs → trismegisto-spine-auto-service-groups.usage-ChGMgYU3.mjs} +11 -12
- package/fesm2022/trismegisto-spine-auto-service-groups.usage-ChGMgYU3.mjs.map +1 -0
- package/fesm2022/trismegisto-spine-auto-service.mjs +9 -9
- package/fesm2022/trismegisto-spine.mjs +60 -6
- package/fesm2022/trismegisto-spine.mjs.map +1 -1
- package/package.json +6 -6
- package/types/trismegisto-spine.d.ts +34 -7
- package/types/trismegisto-spine.d.ts.map +1 -1
- package/fesm2022/trismegisto-spine-auto-service-apps.technical-BAKdkVdz.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-apps.usage-CAXMP5r8.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-auto-service-audit.component-BIL8tH1I.mjs +0 -37
- package/fesm2022/trismegisto-spine-auto-service-auto-service-delete-CoJYTtBU.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-auto-service-groups.component-UVMGF7-B.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-auto-service-login-attempts.component-Boi-kG0G.mjs +0 -37
- package/fesm2022/trismegisto-spine-auto-service-auto-service.component-DmLafUkX.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-groups.technical-BlktCM70.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-groups.usage-Cz5sCKgn.mjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, computed } from '@angular/core';
|
|
2
|
+
import { inject, ChangeDetectorRef, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, signal, computed } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { A as AutoServiceClientPickerComponent } from './trismegisto-spine-auto-service-auto-service-client-picker.component-
|
|
5
|
+
import { A as AutoServiceClientPickerComponent } from './trismegisto-spine-auto-service-auto-service-client-picker.component-DdtDk_xl.mjs';
|
|
6
6
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
7
|
-
import { ButtonComponent, CheckboxComponent, InputComponent, ModalComponent, ComboboxComponent, HermesToastService, DrawerComponent, IconComponent, TagComponent, DataGridComponent, DataGridCellDirective, AlertComponent, CopyButtonComponent, DatePickerComponent, TextareaComponent, HermesDialogService, CardComponent, TabsComponent, TabComponent, TabContentDirective } from '@trismegisto/angular';
|
|
7
|
+
import { ButtonComponent, CheckboxComponent, InputComponent, ModalComponent, ComboboxComponent, HermesToastService, DrawerComponent, IconComponent, TagComponent, TreeComponent, TreeNodeTemplateDirective, DataGridComponent, DataGridCellDirective, AlertComponent, CopyButtonComponent, DatePickerComponent, TextareaComponent, HermesDialogService, CardComponent, TabsComponent, TabComponent, TabContentDirective } from '@trismegisto/angular';
|
|
8
8
|
import { formatMessage, pluralMessage } from '@trismegisto/primitives';
|
|
9
9
|
import { SPINE_MESSAGES } from '@trismegisto/spine';
|
|
10
|
-
import { a as autoServiceErrorText, A as AutoServiceDeleteFeedback } from './trismegisto-spine-auto-service-auto-service-delete-
|
|
10
|
+
import { a as autoServiceErrorText, A as AutoServiceDeleteFeedback } from './trismegisto-spine-auto-service-auto-service-delete-B1tXgMvi.mjs';
|
|
11
11
|
import { AutoServiceService } from './trismegisto-spine-auto-service.mjs';
|
|
12
12
|
import * as i3 from '@angular/forms';
|
|
13
13
|
import { FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
@@ -140,24 +140,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImpo
|
|
|
140
140
|
type: Output
|
|
141
141
|
}] } });
|
|
142
142
|
|
|
143
|
-
/**
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
*/
|
|
148
|
-
function requiresPermission(level) {
|
|
143
|
+
/** A operação depende de permissão para esse modo (a caixa fica escolhível). */
|
|
144
|
+
function requiresPermission(level, mode = 'group') {
|
|
145
|
+
if (mode === 'token')
|
|
146
|
+
return level !== 'public';
|
|
149
147
|
return level === 'protected';
|
|
150
148
|
}
|
|
151
|
-
/** Por que a operação não precisa de permissão (no idioma ativo); vazio
|
|
152
|
-
function freeAccessText(level, text) {
|
|
153
|
-
if (requiresPermission(level))
|
|
149
|
+
/** Por que a operação não precisa de permissão (no idioma ativo); vazio quando precisa. */
|
|
150
|
+
function freeAccessText(level, text, mode = 'group') {
|
|
151
|
+
if (requiresPermission(level, mode))
|
|
154
152
|
return '';
|
|
153
|
+
if (mode === 'token')
|
|
154
|
+
return text.publicNoToken;
|
|
155
155
|
if (level === 'private')
|
|
156
156
|
return text.freeForAuthenticated;
|
|
157
157
|
if (level === 'public' || level === 'optional')
|
|
158
158
|
return text.freeForAll;
|
|
159
159
|
return text.freeNoPermission;
|
|
160
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* Estado inicial da caixa de uma operação que NÃO depende de permissão: no grupo vem marcada (já vale para ele); no token
|
|
163
|
+
* vem desmarcada (pública não passa pelo token). Nos dois casos desabilitada.
|
|
164
|
+
*/
|
|
165
|
+
function freeChecked(mode) {
|
|
166
|
+
return mode === 'group';
|
|
167
|
+
}
|
|
161
168
|
/** Cor do selo de nível, a mesma da aba Operações: pública em verde, protegida em amarelo; o resto neutro. */
|
|
162
169
|
function levelTagColor(level) {
|
|
163
170
|
if (level === 'public')
|
|
@@ -167,23 +174,108 @@ function levelTagColor(level) {
|
|
|
167
174
|
return 'neutral';
|
|
168
175
|
}
|
|
169
176
|
|
|
177
|
+
/**
|
|
178
|
+
* "Gerenciar operações" de um consumer da aplicação: árvore (`hm-tree`) das operações agrupadas pelo identificador, e a
|
|
179
|
+
* diferença gravada ao confirmar. `mode` diz de quem é o consumer: `group` (aba Acessos; public/private/optional já valem
|
|
180
|
+
* e vêm marcadas e travadas) ou `token` (aba Tokens; nada vem marcado, private/optional/protected são escolhíveis e
|
|
181
|
+
* public fica travada e desmarcada).
|
|
182
|
+
*/
|
|
170
183
|
class AutoServiceConsumerPermissionsComponent {
|
|
184
|
+
set mode(value) { this.modeSig.set(value); }
|
|
185
|
+
get mode() { return this.modeSig(); }
|
|
171
186
|
constructor(service) {
|
|
172
187
|
this.service = service;
|
|
173
|
-
this.
|
|
188
|
+
this.messages = inject(SPINE_MESSAGES);
|
|
189
|
+
this.text = this.messages.autoService;
|
|
174
190
|
/** Telas com estado em campo comum, preenchido depois de `await`: marca a view ao terminar (app sem zone.js). */
|
|
175
191
|
this.cdr = inject(ChangeDetectorRef);
|
|
176
192
|
this.fmt = formatMessage;
|
|
177
|
-
this.levelTagColor = levelTagColor;
|
|
178
193
|
this.toast = inject(HermesToastService);
|
|
179
194
|
this.clientId = '';
|
|
180
195
|
this.appId = '';
|
|
181
196
|
this.consumer = null;
|
|
182
197
|
this.open = false;
|
|
183
198
|
this.openChange = new EventEmitter();
|
|
184
|
-
this.rows = [];
|
|
185
199
|
this.loading = false;
|
|
186
200
|
this.saving = false;
|
|
201
|
+
this.modeSig = signal('group', ...(ngDevMode ? [{ debugName: "modeSig" }] : /* istanbul ignore next */ []));
|
|
202
|
+
this.tree = signal([], ...(ngDevMode ? [{ debugName: "tree" }] : /* istanbul ignore next */ []));
|
|
203
|
+
/** Só operações escolhíveis (não travadas): é o que o consumer pode ganhar ou perder. */
|
|
204
|
+
this.selectedIds = signal(new Set(), ...(ngDevMode ? [{ debugName: "selectedIds" }] : /* istanbul ignore next */ []));
|
|
205
|
+
this.expandedIds = signal(new Set(), ...(ngDevMode ? [{ debugName: "expandedIds" }] : /* istanbul ignore next */ []));
|
|
206
|
+
this.originalSelectedIds = new Set();
|
|
207
|
+
/** Todos os nós (pastas e folhas) por chave. */
|
|
208
|
+
this.nodesByKey = computed(() => {
|
|
209
|
+
const map = new Map();
|
|
210
|
+
const walk = (nodes) => { for (const n of nodes) {
|
|
211
|
+
map.set(n.key, n);
|
|
212
|
+
walk(n.children);
|
|
213
|
+
} };
|
|
214
|
+
walk(this.tree());
|
|
215
|
+
return map;
|
|
216
|
+
}, ...(ngDevMode ? [{ debugName: "nodesByKey" }] : /* istanbul ignore next */ []));
|
|
217
|
+
this.leaves = computed(() => this.tree().flatMap(n => collectLeaves(n)), ...(ngDevMode ? [{ debugName: "leaves" }] : /* istanbul ignore next */ []));
|
|
218
|
+
this.lockedIds = computed(() => new Set(this.leaves().filter(l => l.locked).map(l => l.key)), ...(ngDevMode ? [{ debugName: "lockedIds" }] : /* istanbul ignore next */ []));
|
|
219
|
+
/** Marcação mostrada na árvore: as escolhidas e, no GRUPO, as travadas (já valem para ele). No token as travadas
|
|
220
|
+
* (public) aparecem desmarcadas. */
|
|
221
|
+
this.treeSelected = computed(() => this.modeSig() === 'token' ? this.selectedIds() : new Set([...this.selectedIds(), ...this.lockedIds()]), ...(ngDevMode ? [{ debugName: "treeSelected" }] : /* istanbul ignore next */ []));
|
|
222
|
+
/** Linha de resumo no topo: quantas escolhíveis estão liberadas e quantas não dependem de permissão. */
|
|
223
|
+
this.summary = computed(() => {
|
|
224
|
+
const total = this.leaves().filter(l => !l.locked).length;
|
|
225
|
+
const marked = this.selectedIds().size;
|
|
226
|
+
return formatMessage(this.modeSig() === 'token' ? this.text.permissionsSummaryToken : this.text.permissionsSummaryGroup, { marked, total });
|
|
227
|
+
}, ...(ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []));
|
|
228
|
+
this.freeSummary = computed(() => {
|
|
229
|
+
const n = this.lockedIds().size;
|
|
230
|
+
if (!n)
|
|
231
|
+
return '';
|
|
232
|
+
return pluralMessage(this.modeSig() === 'token' ? this.text.permissionsFreeToken : this.text.permissionsFreeGroup, n, this.messages.meta.locale);
|
|
233
|
+
}, ...(ngDevMode ? [{ debugName: "freeSummary" }] : /* istanbul ignore next */ []));
|
|
234
|
+
/** hm-tree é lista achatada com estado só em `selected`/`expanded`. O label leva o texto completo (nome, método,
|
|
235
|
+
* nível, descrição e por que está travada, para leitor de tela); o que aparece vem do modelo `hmTreeNode`. */
|
|
236
|
+
this.treeNodes = computed(() => this.tree().map(n => this.toTreeNode(n)), ...(ngDevMode ? [{ debugName: "treeNodes" }] : /* istanbul ignore next */ []));
|
|
237
|
+
this.nodeInfo = computed(() => {
|
|
238
|
+
const selected = this.selectedIds();
|
|
239
|
+
const map = new Map();
|
|
240
|
+
const walk = (nodes) => {
|
|
241
|
+
for (const n of nodes) {
|
|
242
|
+
if (n.isFolder) {
|
|
243
|
+
const open = collectLeaves(n).filter(l => !l.locked);
|
|
244
|
+
const marked = open.filter(l => selected.has(l.key)).length;
|
|
245
|
+
map.set(n.key, {
|
|
246
|
+
name: n.name, isFolder: true,
|
|
247
|
+
count: open.length ? formatMessage(this.text.permissionsFolderCount, { marked, total: open.length }) : '',
|
|
248
|
+
});
|
|
249
|
+
walk(n.children);
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
map.set(n.key, {
|
|
253
|
+
name: n.name, isFolder: false, method: n.method, level: n.level, levelColor: levelTagColor(n.level),
|
|
254
|
+
description: n.description,
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
walk(this.tree());
|
|
260
|
+
return map;
|
|
261
|
+
}, ...(ngDevMode ? [{ debugName: "nodeInfo" }] : /* istanbul ignore next */ []));
|
|
262
|
+
}
|
|
263
|
+
info(node) {
|
|
264
|
+
return this.nodeInfo().get(node.id) ?? { name: node.label, isFolder: !node.leaf };
|
|
265
|
+
}
|
|
266
|
+
toTreeNode(node) {
|
|
267
|
+
if (node.isFolder) {
|
|
268
|
+
const leaves = collectLeaves(node);
|
|
269
|
+
return {
|
|
270
|
+
id: node.key, label: node.name, leaf: false,
|
|
271
|
+
// Pasta só com operações travadas: nada a marcar dentro dela.
|
|
272
|
+
disabled: leaves.length > 0 && leaves.every(l => l.locked),
|
|
273
|
+
children: node.children.map(c => this.toTreeNode(c)),
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
const free = node.locked ? freeAccessText(node.level, this.text, this.modeSig()) : '';
|
|
277
|
+
const label = `${node.name} — ${node.method} · ${node.level}${node.description ? ' · ' + node.description : ''}${free ? ' · ' + free : ''}`;
|
|
278
|
+
return { id: node.key, label, leaf: true, disabled: !!node.locked };
|
|
187
279
|
}
|
|
188
280
|
ngOnChanges(changes) { if (changes['open'] && this.open) {
|
|
189
281
|
this.reset();
|
|
@@ -198,40 +290,95 @@ class AutoServiceConsumerPermissionsComponent {
|
|
|
198
290
|
]);
|
|
199
291
|
const operations = opsRes.operations ?? [];
|
|
200
292
|
const permissions = permsRes.permissions ?? [];
|
|
201
|
-
|
|
293
|
+
const root = [];
|
|
294
|
+
const sorted = [...operations].sort((a, b) => String(a.identifier).localeCompare(String(b.identifier)));
|
|
295
|
+
for (const op of sorted) {
|
|
202
296
|
const perm = permissions.find((p) => p.operation_id === op.operation_id);
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
:
|
|
212
|
-
|
|
213
|
-
|
|
297
|
+
const segments = String(op.identifier).split(':');
|
|
298
|
+
const leafName = segments.pop();
|
|
299
|
+
let level = root;
|
|
300
|
+
let path = '';
|
|
301
|
+
for (const segment of segments) {
|
|
302
|
+
path = path ? `${path}:${segment}` : segment;
|
|
303
|
+
let folder = level.find(n => n.isFolder && n.name === segment);
|
|
304
|
+
if (!folder) {
|
|
305
|
+
// Chave da pasta termina em ':' para não colidir com uma operação de mesmo identifier ("orders" e "orders:list").
|
|
306
|
+
folder = { key: `${path}:`, name: segment, isFolder: true, children: [] };
|
|
307
|
+
level.push(folder);
|
|
308
|
+
}
|
|
309
|
+
level = folder.children;
|
|
310
|
+
}
|
|
311
|
+
level.push({
|
|
312
|
+
key: op.identifier, name: leafName, isFolder: false, children: [], identifier: op.identifier,
|
|
313
|
+
operation_id: op.operation_id, method: op.method, level: op.level, description: op.description,
|
|
314
|
+
permissionId: perm?.permission_id,
|
|
315
|
+
locked: !perm && !requiresPermission(op.level, this.mode),
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
this.tree.set(root);
|
|
319
|
+
const original = new Set(collectAll(root).filter(l => !l.locked && l.permissionId).map(l => l.key));
|
|
320
|
+
this.originalSelectedIds = original;
|
|
321
|
+
this.selectedIds.set(new Set(original));
|
|
322
|
+
this.expandedIds.set(new Set());
|
|
214
323
|
}
|
|
215
324
|
finally {
|
|
216
325
|
this.loading = false;
|
|
217
326
|
this.cdr.markForCheck();
|
|
218
327
|
}
|
|
219
328
|
}
|
|
220
|
-
|
|
329
|
+
/**
|
|
330
|
+
* Mudança do hm-tree: com caixas ele emite só folhas habilitadas (ou o id da pasta sem folhas). Pasta vira as folhas
|
|
331
|
+
* escolhíveis dela; folha travada e chave desconhecida são ignoradas.
|
|
332
|
+
*/
|
|
333
|
+
onTreeChanged(changes) {
|
|
334
|
+
this.selectedIds.update(current => {
|
|
335
|
+
const next = new Set(current);
|
|
336
|
+
for (const change of changes) {
|
|
337
|
+
const node = this.nodesByKey().get(change.id);
|
|
338
|
+
if (!node)
|
|
339
|
+
continue;
|
|
340
|
+
for (const leaf of collectLeaves(node)) {
|
|
341
|
+
if (leaf.locked)
|
|
342
|
+
continue;
|
|
343
|
+
if (change.selected)
|
|
344
|
+
next.add(leaf.key);
|
|
345
|
+
else
|
|
346
|
+
next.delete(leaf.key);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
return next;
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
get hasChanges() {
|
|
353
|
+
const selected = this.selectedIds();
|
|
354
|
+
if (selected.size !== this.originalSelectedIds.size)
|
|
355
|
+
return true;
|
|
356
|
+
for (const id of selected)
|
|
357
|
+
if (!this.originalSelectedIds.has(id))
|
|
358
|
+
return true;
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
/** Folha escolhível pela chave; `undefined` para pasta, operação travada ou chave desconhecida. */
|
|
362
|
+
leafByKey(key) {
|
|
363
|
+
const node = this.nodesByKey().get(key);
|
|
364
|
+
return node && !node.isFolder && !node.locked ? node : undefined;
|
|
365
|
+
}
|
|
221
366
|
async confirm() {
|
|
222
|
-
const
|
|
223
|
-
const
|
|
367
|
+
const selected = this.selectedIds();
|
|
368
|
+
const isLeaf = (l) => !!l;
|
|
369
|
+
const toAdd = [...selected].filter(id => !this.originalSelectedIds.has(id)).map(id => this.leafByKey(id)).filter(isLeaf);
|
|
370
|
+
const toRemove = [...this.originalSelectedIds].filter(id => !selected.has(id)).map(id => this.leafByKey(id)).filter(isLeaf);
|
|
224
371
|
if (toAdd.length === 0 && toRemove.length === 0) {
|
|
225
372
|
this.close();
|
|
226
373
|
return;
|
|
227
374
|
}
|
|
228
375
|
this.saving = true;
|
|
229
376
|
try {
|
|
230
|
-
for (const
|
|
231
|
-
await this.service.addAppPermission(this.clientId, this.consumer.consumer_id,
|
|
377
|
+
for (const l of toAdd) {
|
|
378
|
+
await this.service.addAppPermission(this.clientId, this.consumer.consumer_id, l.operation_id);
|
|
232
379
|
}
|
|
233
|
-
for (const
|
|
234
|
-
await this.service.removeAppPermission(this.clientId, this.consumer.consumer_id,
|
|
380
|
+
for (const l of toRemove) {
|
|
381
|
+
await this.service.removeAppPermission(this.clientId, this.consumer.consumer_id, l.permissionId);
|
|
235
382
|
}
|
|
236
383
|
this.close();
|
|
237
384
|
}
|
|
@@ -245,22 +392,30 @@ class AutoServiceConsumerPermissionsComponent {
|
|
|
245
392
|
}
|
|
246
393
|
}
|
|
247
394
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceConsumerPermissionsComponent, deps: [{ token: AutoServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
248
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
395
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: AutoServiceConsumerPermissionsComponent, isStandalone: true, selector: "spine-auto-service-consumer-permissions", inputs: { clientId: "clientId", appId: "appId", consumer: "consumer", mode: "mode", open: "open" }, outputs: { openChange: "openChange" }, usesOnChanges: true, ngImport: i0, template: "<hm-drawer [open]=\"open\" (openChange)=\"open = $event\" [heading]=\"fmt(text.operationsOf, { group: consumer?.group_name ?? '' })\" (closed)=\"close()\">\n <div *ngIf=\"loading\" class=\"loading-row\">{{ text.loading }}</div>\n\n <ng-container *ngIf=\"!loading && treeNodes().length\">\n <!-- Grupo: s\u00F3 protected depende de permiss\u00E3o; public/private/optional j\u00E1 valem e aparecem marcadas e desabilitadas.\n Token: private/optional/protected s\u00F3 valem liberadas; public aparece desabilitada e desmarcada. -->\n <p class=\"cp-summary\">{{ summary() }} {{ freeSummary() }}</p>\n\n <hm-tree\n [nodes]=\"treeNodes()\"\n [label]=\"text.permissionsTreeLabel\"\n [selected]=\"treeSelected()\"\n [(expanded)]=\"expandedIds\"\n (changed)=\"onTreeChanged($event)\"\n >\n <ng-template hmTreeNode let-node>\n @let item = info(node);\n <span class=\"cp-node\">\n <span class=\"cp-node__name\">{{ item.name }}</span>\n @if (item.isFolder) {\n @if (item.count) {\n <span class=\"cp-node__count\">{{ item.count }}</span>\n }\n } @else {\n <hm-tag [name]=\"item.method ?? ''\" color=\"neutral\" />\n <hm-tag [name]=\"item.level ?? ''\" [color]=\"item.levelColor ?? 'neutral'\" />\n @if (item.description) {\n <span class=\"cp-node__desc\">{{ item.description }}</span>\n }\n }\n </span>\n </ng-template>\n </hm-tree>\n </ng-container>\n\n <div class=\"empty-state\" *ngIf=\"!loading && treeNodes().length === 0\">\n <hm-icon shape=\"filter-grid\" size=\"xl\"></hm-icon>\n <p>{{ text.noOperations }}</p>\n </div>\n\n <ng-container footer>\n <hm-button emphasis=\"medium\" (clicked)=\"close()\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!hasChanges\" [loading]=\"saving\" (clicked)=\"confirm()\">{{ text.confirmChanges }}</hm-button>\n </ng-container>\n</hm-drawer>\n", styles: ["@charset \"UTF-8\";.as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row>hm-combobox{flex:1 1 16rem;min-inline-size:0}.as-summary{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-sm)}.as-summary__info{display:flex;flex:1 1 16rem;flex-direction:column;gap:var(--hm-space-micro);min-inline-size:0}.as-summary__title{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);margin:0;color:var(--hm-text);font-size:var(--hm-font-size-md);font-weight:var(--hm-font-weight-semibold)}.as-summary__detail{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.muted{color:var(--hm-muted)}.as-empty{margin:var(--hm-space-xs) 0 0;font-size:var(--hm-font-size-sm)}.as-secret{display:grid;gap:var(--hm-space-micro)}.as-secret__label{color:var(--hm-muted);font-size:var(--hm-font-size-xs)}.as-secret__row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.as-secret__value{flex:1 1 240px;min-width:0;border:var(--hm-border-hairline) solid var(--hm-divider);border-radius:var(--hm-radius-control);padding:var(--hm-space-xs) var(--hm-space-sm);background:var(--hm-surface);color:var(--hm-text);font-family:var(--hm-font-mono);font-size:var(--hm-font-size-sm);overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}.loading-row{display:flex;justify-content:center;padding:var(--hm-space-xl);color:var(--hm-muted)}.cp-summary{margin:0 0 var(--hm-space-sm);color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.cp-node{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xxxs) var(--hm-space-xs);min-width:0}.cp-node__count,.cp-node__desc{color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.empty-state{display:flex;flex-direction:column;align-items:center;gap:var(--hm-space-xs);padding:var(--hm-space-xl);color:var(--hm-muted);text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "hm-button", inputs: ["emphasis", "intent", "size", "type", "icon", "iconDirection", "iconEnd", "disabled", "loading", "busy", "loadingState", "block", "link", "newTab", "caret", "inMenu", "toggle", "pressed"], outputs: ["loadingStateChange", "pressedChange", "clicked"] }, { kind: "component", type: DrawerComponent, selector: "hm-drawer", inputs: ["open", "heading", "size", "position", "pinned", "closeLabel", "closable", "beforeClose"], outputs: ["openChange", "closed"] }, { kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "component", type: TagComponent, selector: "hm-tag", inputs: ["name", "color", "compact"] }, { kind: "component", type: TreeComponent, selector: "hm-tree", inputs: ["nodes", "label", "emptyMessage", "selectable", "selectionMode", "selection", "selected", "expanded", "activeId", "loadChildren", "draggable", "canDrop", "nodeActions"], outputs: ["selectionChange", "expandedChange", "activeIdChange", "changed", "activated", "moved", "nodeAction"] }, { kind: "directive", type: TreeNodeTemplateDirective, selector: "ng-template[hmTreeNode]" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
249
396
|
}
|
|
250
397
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceConsumerPermissionsComponent, decorators: [{
|
|
251
398
|
type: Component,
|
|
252
|
-
args: [{ selector: 'spine-auto-service-consumer-permissions', standalone: true, imports: [CommonModule,
|
|
399
|
+
args: [{ selector: 'spine-auto-service-consumer-permissions', standalone: true, imports: [CommonModule, ButtonComponent, DrawerComponent, IconComponent, TagComponent, TreeComponent, TreeNodeTemplateDirective], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-drawer [open]=\"open\" (openChange)=\"open = $event\" [heading]=\"fmt(text.operationsOf, { group: consumer?.group_name ?? '' })\" (closed)=\"close()\">\n <div *ngIf=\"loading\" class=\"loading-row\">{{ text.loading }}</div>\n\n <ng-container *ngIf=\"!loading && treeNodes().length\">\n <!-- Grupo: s\u00F3 protected depende de permiss\u00E3o; public/private/optional j\u00E1 valem e aparecem marcadas e desabilitadas.\n Token: private/optional/protected s\u00F3 valem liberadas; public aparece desabilitada e desmarcada. -->\n <p class=\"cp-summary\">{{ summary() }} {{ freeSummary() }}</p>\n\n <hm-tree\n [nodes]=\"treeNodes()\"\n [label]=\"text.permissionsTreeLabel\"\n [selected]=\"treeSelected()\"\n [(expanded)]=\"expandedIds\"\n (changed)=\"onTreeChanged($event)\"\n >\n <ng-template hmTreeNode let-node>\n @let item = info(node);\n <span class=\"cp-node\">\n <span class=\"cp-node__name\">{{ item.name }}</span>\n @if (item.isFolder) {\n @if (item.count) {\n <span class=\"cp-node__count\">{{ item.count }}</span>\n }\n } @else {\n <hm-tag [name]=\"item.method ?? ''\" color=\"neutral\" />\n <hm-tag [name]=\"item.level ?? ''\" [color]=\"item.levelColor ?? 'neutral'\" />\n @if (item.description) {\n <span class=\"cp-node__desc\">{{ item.description }}</span>\n }\n }\n </span>\n </ng-template>\n </hm-tree>\n </ng-container>\n\n <div class=\"empty-state\" *ngIf=\"!loading && treeNodes().length === 0\">\n <hm-icon shape=\"filter-grid\" size=\"xl\"></hm-icon>\n <p>{{ text.noOperations }}</p>\n </div>\n\n <ng-container footer>\n <hm-button emphasis=\"medium\" (clicked)=\"close()\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!hasChanges\" [loading]=\"saving\" (clicked)=\"confirm()\">{{ text.confirmChanges }}</hm-button>\n </ng-container>\n</hm-drawer>\n", styles: ["@charset \"UTF-8\";.as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row>hm-combobox{flex:1 1 16rem;min-inline-size:0}.as-summary{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-sm)}.as-summary__info{display:flex;flex:1 1 16rem;flex-direction:column;gap:var(--hm-space-micro);min-inline-size:0}.as-summary__title{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);margin:0;color:var(--hm-text);font-size:var(--hm-font-size-md);font-weight:var(--hm-font-weight-semibold)}.as-summary__detail{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.muted{color:var(--hm-muted)}.as-empty{margin:var(--hm-space-xs) 0 0;font-size:var(--hm-font-size-sm)}.as-secret{display:grid;gap:var(--hm-space-micro)}.as-secret__label{color:var(--hm-muted);font-size:var(--hm-font-size-xs)}.as-secret__row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.as-secret__value{flex:1 1 240px;min-width:0;border:var(--hm-border-hairline) solid var(--hm-divider);border-radius:var(--hm-radius-control);padding:var(--hm-space-xs) var(--hm-space-sm);background:var(--hm-surface);color:var(--hm-text);font-family:var(--hm-font-mono);font-size:var(--hm-font-size-sm);overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}.loading-row{display:flex;justify-content:center;padding:var(--hm-space-xl);color:var(--hm-muted)}.cp-summary{margin:0 0 var(--hm-space-sm);color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.cp-node{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xxxs) var(--hm-space-xs);min-width:0}.cp-node__count,.cp-node__desc{color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.empty-state{display:flex;flex-direction:column;align-items:center;gap:var(--hm-space-xs);padding:var(--hm-space-xl);color:var(--hm-muted);text-align:center}\n"] }]
|
|
253
400
|
}], ctorParameters: () => [{ type: AutoServiceService }], propDecorators: { clientId: [{
|
|
254
401
|
type: Input
|
|
255
402
|
}], appId: [{
|
|
256
403
|
type: Input
|
|
257
404
|
}], consumer: [{
|
|
258
405
|
type: Input
|
|
406
|
+
}], mode: [{
|
|
407
|
+
type: Input
|
|
259
408
|
}], open: [{
|
|
260
409
|
type: Input
|
|
261
410
|
}], openChange: [{
|
|
262
411
|
type: Output
|
|
263
412
|
}] } });
|
|
413
|
+
function collectLeaves(node) {
|
|
414
|
+
return node.isFolder ? node.children.flatMap(collectLeaves) : [node];
|
|
415
|
+
}
|
|
416
|
+
function collectAll(root) {
|
|
417
|
+
return root.flatMap(collectLeaves);
|
|
418
|
+
}
|
|
264
419
|
|
|
265
420
|
class AutoServiceAppAccessComponent {
|
|
266
421
|
constructor(service) {
|
|
@@ -337,11 +492,11 @@ class AutoServiceAppAccessComponent {
|
|
|
337
492
|
void this.deleteConsumer(e.row.consumer_id);
|
|
338
493
|
}
|
|
339
494
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceAppAccessComponent, deps: [{ token: AutoServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
340
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceAppAccessComponent, isStandalone: true, selector: "spine-auto-service-app-access", inputs: { clientId: "clientId", appId: "appId" }, usesOnChanges: true, ngImport: i0, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"entries\"\n [rowId]=\"rowId\"\n [caption]=\"text.appAccessCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noAppAccess\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreate()\">{{ text.newAccess }}</hm-button>\n</hm-data-grid>\n\n<spine-auto-service-consumer-create\n [clientId]=\"clientId\"\n [appId]=\"appId\"\n [availableGroups]=\"availableGroups\"\n [open]=\"showCreate\"\n (openChange)=\"showCreate = $event\"\n (created)=\"onCreated()\">\n</spine-auto-service-consumer-create>\n\n<spine-auto-service-consumer-permissions\n *ngIf=\"activeConsumer\"\n [clientId]=\"clientId\"\n [appId]=\"appId\"\n [consumer]=\"activeConsumer\"\n [open]=\"showPermissions\"\n (openChange)=\"showPermissions = $event\">\n</spine-auto-service-consumer-permissions>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row
|
|
495
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceAppAccessComponent, isStandalone: true, selector: "spine-auto-service-app-access", inputs: { clientId: "clientId", appId: "appId" }, usesOnChanges: true, ngImport: i0, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"entries\"\n [rowId]=\"rowId\"\n [caption]=\"text.appAccessCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noAppAccess\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreate()\">{{ text.newAccess }}</hm-button>\n</hm-data-grid>\n\n<spine-auto-service-consumer-create\n [clientId]=\"clientId\"\n [appId]=\"appId\"\n [availableGroups]=\"availableGroups\"\n [open]=\"showCreate\"\n (openChange)=\"showCreate = $event\"\n (created)=\"onCreated()\">\n</spine-auto-service-consumer-create>\n\n<spine-auto-service-consumer-permissions\n *ngIf=\"activeConsumer\"\n [clientId]=\"clientId\"\n [appId]=\"appId\"\n [consumer]=\"activeConsumer\"\n [open]=\"showPermissions\"\n (openChange)=\"showPermissions = $event\">\n</spine-auto-service-consumer-permissions>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row>hm-combobox{flex:1 1 16rem;min-inline-size:0}.as-summary{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-sm)}.as-summary__info{display:flex;flex:1 1 16rem;flex-direction:column;gap:var(--hm-space-micro);min-inline-size:0}.as-summary__title{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);margin:0;color:var(--hm-text);font-size:var(--hm-font-size-md);font-weight:var(--hm-font-weight-semibold)}.as-summary__detail{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.muted{color:var(--hm-muted)}.as-empty{margin:var(--hm-space-xs) 0 0;font-size:var(--hm-font-size-sm)}.as-secret{display:grid;gap:var(--hm-space-micro)}.as-secret__label{color:var(--hm-muted);font-size:var(--hm-font-size-xs)}.as-secret__row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.as-secret__value{flex:1 1 240px;min-width:0;border:var(--hm-border-hairline) solid var(--hm-divider);border-radius:var(--hm-radius-control);padding:var(--hm-space-xs) var(--hm-space-sm);background:var(--hm-surface);color:var(--hm-text);font-family:var(--hm-font-mono);font-size:var(--hm-font-size-sm);overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}:host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "hm-button", inputs: ["emphasis", "intent", "size", "type", "icon", "iconDirection", "iconEnd", "disabled", "loading", "busy", "loadingState", "block", "link", "newTab", "caret", "inMenu", "toggle", "pressed"], outputs: ["loadingStateChange", "pressedChange", "clicked"] }, { kind: "component", type: DataGridComponent, selector: "hm-data-grid", inputs: ["columns", "rows", "rowId", "caption", "rowActions", "loading", "error", "emptyMessage", "noResultsMessage", "filterable", "paginated", "pageState", "pagination", "totalItems", "sort", "selectable", "selectionMode", "selection", "rowSelectable", "rowSelectableReason", "rowDetailDisabled", "rowDetailHidden", "virtual", "rowHeight", "pinnedColumns", "columnState", "pageSizes", "fillHeight", "maxHeight", "bordered", "rowState", "rowClickable", "remoteSearch", "remoteSort", "itemsLabel", "pageSizeLabel", "exportable", "exportFileName", "groupBy", "aggregates", "aggregateFormatter", "persistKey", "persistStorage", "advancedFilter", "filterQuery", "columnManager", "columnOrder", "searchTerm"], outputs: ["pageStateChange", "sortChange", "selectionChange", "pinnedColumnsChange", "columnStateChange", "actionTriggered", "detailToggled", "rowClicked", "clearFiltersRequested", "filteredChange", "searchTermChanged", "groupByChange", "filterQueryChange", "columnOrderChange", "searchTermChange", "detailPaneToggled"] }, { kind: "component", type: AutoServiceConsumerCreateComponent, selector: "spine-auto-service-consumer-create", inputs: ["clientId", "appId", "availableGroups", "open"], outputs: ["openChange", "created"] }, { kind: "component", type: AutoServiceConsumerPermissionsComponent, selector: "spine-auto-service-consumer-permissions", inputs: ["clientId", "appId", "consumer", "mode", "open"], outputs: ["openChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
341
496
|
}
|
|
342
497
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceAppAccessComponent, decorators: [{
|
|
343
498
|
type: Component,
|
|
344
|
-
args: [{ selector: 'spine-auto-service-app-access', standalone: true, imports: [CommonModule, ButtonComponent, IconComponent, DataGridComponent, AutoServiceConsumerCreateComponent, AutoServiceConsumerPermissionsComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"entries\"\n [rowId]=\"rowId\"\n [caption]=\"text.appAccessCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noAppAccess\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreate()\">{{ text.newAccess }}</hm-button>\n</hm-data-grid>\n\n<spine-auto-service-consumer-create\n [clientId]=\"clientId\"\n [appId]=\"appId\"\n [availableGroups]=\"availableGroups\"\n [open]=\"showCreate\"\n (openChange)=\"showCreate = $event\"\n (created)=\"onCreated()\">\n</spine-auto-service-consumer-create>\n\n<spine-auto-service-consumer-permissions\n *ngIf=\"activeConsumer\"\n [clientId]=\"clientId\"\n [appId]=\"appId\"\n [consumer]=\"activeConsumer\"\n [open]=\"showPermissions\"\n (openChange)=\"showPermissions = $event\">\n</spine-auto-service-consumer-permissions>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row
|
|
499
|
+
args: [{ selector: 'spine-auto-service-app-access', standalone: true, imports: [CommonModule, ButtonComponent, IconComponent, DataGridComponent, AutoServiceConsumerCreateComponent, AutoServiceConsumerPermissionsComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"entries\"\n [rowId]=\"rowId\"\n [caption]=\"text.appAccessCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noAppAccess\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreate()\">{{ text.newAccess }}</hm-button>\n</hm-data-grid>\n\n<spine-auto-service-consumer-create\n [clientId]=\"clientId\"\n [appId]=\"appId\"\n [availableGroups]=\"availableGroups\"\n [open]=\"showCreate\"\n (openChange)=\"showCreate = $event\"\n (created)=\"onCreated()\">\n</spine-auto-service-consumer-create>\n\n<spine-auto-service-consumer-permissions\n *ngIf=\"activeConsumer\"\n [clientId]=\"clientId\"\n [appId]=\"appId\"\n [consumer]=\"activeConsumer\"\n [open]=\"showPermissions\"\n (openChange)=\"showPermissions = $event\">\n</spine-auto-service-consumer-permissions>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row>hm-combobox{flex:1 1 16rem;min-inline-size:0}.as-summary{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-sm)}.as-summary__info{display:flex;flex:1 1 16rem;flex-direction:column;gap:var(--hm-space-micro);min-inline-size:0}.as-summary__title{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);margin:0;color:var(--hm-text);font-size:var(--hm-font-size-md);font-weight:var(--hm-font-weight-semibold)}.as-summary__detail{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.muted{color:var(--hm-muted)}.as-empty{margin:var(--hm-space-xs) 0 0;font-size:var(--hm-font-size-sm)}.as-secret{display:grid;gap:var(--hm-space-micro)}.as-secret__label{color:var(--hm-muted);font-size:var(--hm-font-size-xs)}.as-secret__row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.as-secret__value{flex:1 1 240px;min-width:0;border:var(--hm-border-hairline) solid var(--hm-divider);border-radius:var(--hm-radius-control);padding:var(--hm-space-xs) var(--hm-space-sm);background:var(--hm-surface);color:var(--hm-text);font-family:var(--hm-font-mono);font-size:var(--hm-font-size-sm);overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}:host{display:block}\n"] }]
|
|
345
500
|
}], ctorParameters: () => [{ type: AutoServiceService }], propDecorators: { clientId: [{
|
|
346
501
|
type: Input
|
|
347
502
|
}], appId: [{
|
|
@@ -398,11 +553,11 @@ class AutoServiceAppOperationsComponent {
|
|
|
398
553
|
return 'neutral';
|
|
399
554
|
}
|
|
400
555
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceAppOperationsComponent, deps: [{ token: AutoServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
401
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceAppOperationsComponent, isStandalone: true, selector: "spine-auto-service-app-operations", inputs: { clientId: "clientId", appId: "appId" }, usesOnChanges: true, ngImport: i0, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"operations\"\n [rowId]=\"rowId\"\n [caption]=\"text.operationsCaption\"\n [loading]=\"loading\"\n [emptyMessage]=\"text.noOperations\"\n>\n <ng-template hmCell=\"identifier\" let-op>\n <code>{{ op.identifier }}</code>\n </ng-template>\n\n <ng-template hmCell=\"method\" let-op>\n <hm-tag [name]=\"op.method\" />\n </ng-template>\n\n <ng-template hmCell=\"level\" let-op>\n <hm-tag [name]=\"op.level\" [color]=\"levelTagColor(op.level)\" />\n </ng-template>\n</hm-data-grid>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row
|
|
556
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceAppOperationsComponent, isStandalone: true, selector: "spine-auto-service-app-operations", inputs: { clientId: "clientId", appId: "appId" }, usesOnChanges: true, ngImport: i0, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"operations\"\n [rowId]=\"rowId\"\n [caption]=\"text.operationsCaption\"\n [loading]=\"loading\"\n [emptyMessage]=\"text.noOperations\"\n>\n <ng-template hmCell=\"identifier\" let-op>\n <code>{{ op.identifier }}</code>\n </ng-template>\n\n <ng-template hmCell=\"method\" let-op>\n <hm-tag [name]=\"op.method\" />\n </ng-template>\n\n <ng-template hmCell=\"level\" let-op>\n <hm-tag [name]=\"op.level\" [color]=\"levelTagColor(op.level)\" />\n </ng-template>\n</hm-data-grid>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row>hm-combobox{flex:1 1 16rem;min-inline-size:0}.as-summary{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-sm)}.as-summary__info{display:flex;flex:1 1 16rem;flex-direction:column;gap:var(--hm-space-micro);min-inline-size:0}.as-summary__title{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);margin:0;color:var(--hm-text);font-size:var(--hm-font-size-md);font-weight:var(--hm-font-weight-semibold)}.as-summary__detail{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.muted{color:var(--hm-muted)}.as-empty{margin:var(--hm-space-xs) 0 0;font-size:var(--hm-font-size-sm)}.as-secret{display:grid;gap:var(--hm-space-micro)}.as-secret__label{color:var(--hm-muted);font-size:var(--hm-font-size-xs)}.as-secret__row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.as-secret__value{flex:1 1 240px;min-width:0;border:var(--hm-border-hairline) solid var(--hm-divider);border-radius:var(--hm-radius-control);padding:var(--hm-space-xs) var(--hm-space-sm);background:var(--hm-surface);color:var(--hm-text);font-family:var(--hm-font-mono);font-size:var(--hm-font-size-sm);overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}:host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DataGridComponent, selector: "hm-data-grid", inputs: ["columns", "rows", "rowId", "caption", "rowActions", "loading", "error", "emptyMessage", "noResultsMessage", "filterable", "paginated", "pageState", "pagination", "totalItems", "sort", "selectable", "selectionMode", "selection", "rowSelectable", "rowSelectableReason", "rowDetailDisabled", "rowDetailHidden", "virtual", "rowHeight", "pinnedColumns", "columnState", "pageSizes", "fillHeight", "maxHeight", "bordered", "rowState", "rowClickable", "remoteSearch", "remoteSort", "itemsLabel", "pageSizeLabel", "exportable", "exportFileName", "groupBy", "aggregates", "aggregateFormatter", "persistKey", "persistStorage", "advancedFilter", "filterQuery", "columnManager", "columnOrder", "searchTerm"], outputs: ["pageStateChange", "sortChange", "selectionChange", "pinnedColumnsChange", "columnStateChange", "actionTriggered", "detailToggled", "rowClicked", "clearFiltersRequested", "filteredChange", "searchTermChanged", "groupByChange", "filterQueryChange", "columnOrderChange", "searchTermChange", "detailPaneToggled"] }, { kind: "directive", type: DataGridCellDirective, selector: "ng-template[hmCell]", inputs: ["hmCell"] }, { kind: "component", type: TagComponent, selector: "hm-tag", inputs: ["name", "color", "compact"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
402
557
|
}
|
|
403
558
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceAppOperationsComponent, decorators: [{
|
|
404
559
|
type: Component,
|
|
405
|
-
args: [{ selector: 'spine-auto-service-app-operations', standalone: true, imports: [CommonModule, DataGridComponent, DataGridCellDirective, TagComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"operations\"\n [rowId]=\"rowId\"\n [caption]=\"text.operationsCaption\"\n [loading]=\"loading\"\n [emptyMessage]=\"text.noOperations\"\n>\n <ng-template hmCell=\"identifier\" let-op>\n <code>{{ op.identifier }}</code>\n </ng-template>\n\n <ng-template hmCell=\"method\" let-op>\n <hm-tag [name]=\"op.method\" />\n </ng-template>\n\n <ng-template hmCell=\"level\" let-op>\n <hm-tag [name]=\"op.level\" [color]=\"levelTagColor(op.level)\" />\n </ng-template>\n</hm-data-grid>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row
|
|
560
|
+
args: [{ selector: 'spine-auto-service-app-operations', standalone: true, imports: [CommonModule, DataGridComponent, DataGridCellDirective, TagComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"operations\"\n [rowId]=\"rowId\"\n [caption]=\"text.operationsCaption\"\n [loading]=\"loading\"\n [emptyMessage]=\"text.noOperations\"\n>\n <ng-template hmCell=\"identifier\" let-op>\n <code>{{ op.identifier }}</code>\n </ng-template>\n\n <ng-template hmCell=\"method\" let-op>\n <hm-tag [name]=\"op.method\" />\n </ng-template>\n\n <ng-template hmCell=\"level\" let-op>\n <hm-tag [name]=\"op.level\" [color]=\"levelTagColor(op.level)\" />\n </ng-template>\n</hm-data-grid>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row>hm-combobox{flex:1 1 16rem;min-inline-size:0}.as-summary{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-sm)}.as-summary__info{display:flex;flex:1 1 16rem;flex-direction:column;gap:var(--hm-space-micro);min-inline-size:0}.as-summary__title{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);margin:0;color:var(--hm-text);font-size:var(--hm-font-size-md);font-weight:var(--hm-font-weight-semibold)}.as-summary__detail{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.muted{color:var(--hm-muted)}.as-empty{margin:var(--hm-space-xs) 0 0;font-size:var(--hm-font-size-sm)}.as-secret{display:grid;gap:var(--hm-space-micro)}.as-secret__label{color:var(--hm-muted);font-size:var(--hm-font-size-xs)}.as-secret__row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.as-secret__value{flex:1 1 240px;min-width:0;border:var(--hm-border-hairline) solid var(--hm-divider);border-radius:var(--hm-radius-control);padding:var(--hm-space-xs) var(--hm-space-sm);background:var(--hm-surface);color:var(--hm-text);font-family:var(--hm-font-mono);font-size:var(--hm-font-size-sm);overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}:host{display:block}\n"] }]
|
|
406
561
|
}], ctorParameters: () => [{ type: AutoServiceService }], propDecorators: { clientId: [{
|
|
407
562
|
type: Input
|
|
408
563
|
}], appId: [{
|
|
@@ -452,8 +607,8 @@ function dateRangeValidator(min, max) {
|
|
|
452
607
|
}
|
|
453
608
|
/**
|
|
454
609
|
* "Novo token" de uma aplicação: nome, descrição, validade (de amanhã até 365 dias) e as operações liberadas ao token.
|
|
455
|
-
*
|
|
456
|
-
*
|
|
610
|
+
* Nada vem marcado: o token não tem login, então `protected` e `private` (e `optional`) só valem se marcadas aqui; as
|
|
611
|
+
* `public` aparecem desmarcadas e desabilitadas (não precisam de token) e nunca vão em `operation_ids`. Criado, o valor aparece uma única vez, com copiar; fechar o descarta.
|
|
457
612
|
* Mirror de admin/ui/.../apps/tabs/app-tokens/modals/token-create (argos-admin), escopado em `/auto-service/:clientId`.
|
|
458
613
|
*/
|
|
459
614
|
class AutoServiceTokenCreateComponent {
|
|
@@ -513,10 +668,10 @@ class AutoServiceTokenCreateComponent {
|
|
|
513
668
|
method: op.method,
|
|
514
669
|
level: op.level,
|
|
515
670
|
description: op.description,
|
|
516
|
-
free: freeAccessText(op.level, this.text),
|
|
517
|
-
control: requiresPermission(op.level)
|
|
671
|
+
free: freeAccessText(op.level, this.text, 'token'),
|
|
672
|
+
control: requiresPermission(op.level, 'token')
|
|
518
673
|
? new FormControl(false, { nonNullable: true })
|
|
519
|
-
: new FormControl({ value:
|
|
674
|
+
: new FormControl({ value: false, disabled: true }, { nonNullable: true }),
|
|
520
675
|
}));
|
|
521
676
|
}
|
|
522
677
|
catch (err) {
|
|
@@ -549,7 +704,7 @@ class AutoServiceTokenCreateComponent {
|
|
|
549
704
|
name,
|
|
550
705
|
...(description ? { description } : {}),
|
|
551
706
|
expires_at: localDayStartIso(this.expiresAt.value),
|
|
552
|
-
// Só as
|
|
707
|
+
// Só as escolhidas (protected/private): public não vira permissão (o servidor recusa com operation_public).
|
|
553
708
|
operation_ids: this.rows.filter((r) => !r.free && r.control.value).map((r) => r.operation_id),
|
|
554
709
|
});
|
|
555
710
|
this.createdToken = { name: res.name ?? name, token: res.token };
|
|
@@ -566,14 +721,14 @@ class AutoServiceTokenCreateComponent {
|
|
|
566
721
|
createdHeading(name) { return formatMessage(this.text.tokenCreatedHeading, { name }); }
|
|
567
722
|
valueLabel(name) { return formatMessage(this.text.tokenValueLabel, { name }); }
|
|
568
723
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceTokenCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
569
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceTokenCreateComponent, isStandalone: true, selector: "spine-auto-service-token-create", inputs: { clientId: "clientId", appId: "appId", open: "open" }, outputs: { openChange: "openChange", created: "created" }, usesOnChanges: true, ngImport: i0, template: "<!-- Depois de criar, o modal s\u00F3 mostra o valor (uma vez); fechar (Concluir, Esc ou \u2715) o descarta. -->\n<hm-modal [open]=\"open\" (openChange)=\"onModalOpenChange($event)\"\n [heading]=\"createdToken ? createdHeading(createdToken.name) : text.newToken\" size=\"large\" (closed)=\"close()\">\n <div class=\"form-stack\" *ngIf=\"createdToken as created; else formTpl\">\n <hm-alert variant=\"warning\" [heading]=\"text.tokenCreatedWarning\">{{ text.tokenCreatedNote }}</hm-alert>\n <div class=\"as-secret\">\n <span class=\"as-secret__label\" id=\"as-created-token-label\">{{ valueLabel(created.name) }}</span>\n <div class=\"as-secret__row\">\n <code class=\"as-secret__value\" aria-labelledby=\"as-created-token-label\">{{ created.token }}</code>\n <hm-copy-button variant=\"text\" [value]=\"created.token\" [label]=\"text.copyToken\" [copiedLabel]=\"text.tokenCopied\" />\n </div>\n </div>\n </div>\n\n <ng-template #formTpl>\n <div class=\"form-stack\">\n <hm-alert *ngIf=\"saveError\" variant=\"error\">{{ saveError }}</hm-alert>\n <hm-input [formControl]=\"name\" [label]=\"text.tokenName\" [maxLength]=\"nameMax\" />\n <hm-textarea [formControl]=\"description\" [label]=\"text.tokenDescription\" [rows]=\"2\" />\n <hm-date-picker [formControl]=\"expiresAt\" [label]=\"text.tokenExpiresAt\" [min]=\"minDate\" [max]=\"maxDate\"\n [hint]=\"text.tokenExpiresHint\" [messages]=\"dateMessages\" />\n\n <fieldset class=\"token-ops\">\n <legend class=\"token-ops__legend\">{{ text.tokenOperations }}</legend>\n <p class=\"token-ops__note muted\" *ngIf=\"hasFreeRows || rows.length\">{{ text.tokenOperationsNote }}</p>\n <p class=\"token-ops__empty muted\" *ngIf=\"loading\">{{ text.loading }}</p>\n <p class=\"token-ops__empty muted\" *ngIf=\"!loading && rows.length === 0\">{{ text.noOperations }}</p>\n <div class=\"token-ops__row\" *ngFor=\"let row of rows\">\n <hm-checkbox [formControl]=\"row.control\" [label]=\"row.identifier\" />\n <div class=\"token-ops__meta\">\n <hm-tag [name]=\"row.method\" />\n <hm-tag [name]=\"row.level\" [color]=\"levelTagColor(row.level)\" />\n <span class=\"token-ops__free\" *ngIf=\"row.free\">{{ row.free }}</span>\n <span class=\"token-ops__desc muted\" *ngIf=\"row.description\">{{ row.description }}</span>\n </div>\n </div>\n </fieldset>\n </div>\n </ng-template>\n\n <ng-container footer>\n <ng-container *ngIf=\"!createdToken\">\n <hm-button emphasis=\"medium\" (clicked)=\"close()\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!canSave\" [loading]=\"saving\" (clicked)=\"save()\">{{ text.createToken }}</hm-button>\n </ng-container>\n <hm-button *ngIf=\"createdToken\" (clicked)=\"close()\">{{ text.rotatedSecretDone }}</hm-button>\n </ng-container>\n</hm-modal>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row
|
|
724
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceTokenCreateComponent, isStandalone: true, selector: "spine-auto-service-token-create", inputs: { clientId: "clientId", appId: "appId", open: "open" }, outputs: { openChange: "openChange", created: "created" }, usesOnChanges: true, ngImport: i0, template: "<!-- Depois de criar, o modal s\u00F3 mostra o valor (uma vez); fechar (Concluir, Esc ou \u2715) o descarta. -->\n<hm-modal [open]=\"open\" (openChange)=\"onModalOpenChange($event)\"\n [heading]=\"createdToken ? createdHeading(createdToken.name) : text.newToken\" size=\"large\" (closed)=\"close()\">\n <div class=\"form-stack\" *ngIf=\"createdToken as created; else formTpl\">\n <hm-alert variant=\"warning\" [heading]=\"text.tokenCreatedWarning\">{{ text.tokenCreatedNote }}</hm-alert>\n <div class=\"as-secret\">\n <span class=\"as-secret__label\" id=\"as-created-token-label\">{{ valueLabel(created.name) }}</span>\n <div class=\"as-secret__row\">\n <code class=\"as-secret__value\" aria-labelledby=\"as-created-token-label\">{{ created.token }}</code>\n <hm-copy-button variant=\"text\" [value]=\"created.token\" [label]=\"text.copyToken\" [copiedLabel]=\"text.tokenCopied\" />\n </div>\n </div>\n </div>\n\n <ng-template #formTpl>\n <div class=\"form-stack\">\n <hm-alert *ngIf=\"saveError\" variant=\"error\">{{ saveError }}</hm-alert>\n <hm-input [formControl]=\"name\" [label]=\"text.tokenName\" [maxLength]=\"nameMax\" />\n <hm-textarea [formControl]=\"description\" [label]=\"text.tokenDescription\" [rows]=\"2\" />\n <hm-date-picker [formControl]=\"expiresAt\" [label]=\"text.tokenExpiresAt\" [min]=\"minDate\" [max]=\"maxDate\"\n [hint]=\"text.tokenExpiresHint\" [messages]=\"dateMessages\" />\n\n <fieldset class=\"token-ops\">\n <legend class=\"token-ops__legend\">{{ text.tokenOperations }}</legend>\n <p class=\"token-ops__note muted\" *ngIf=\"hasFreeRows || rows.length\">{{ text.tokenOperationsNote }}</p>\n <p class=\"token-ops__empty muted\" *ngIf=\"loading\">{{ text.loading }}</p>\n <p class=\"token-ops__empty muted\" *ngIf=\"!loading && rows.length === 0\">{{ text.noOperations }}</p>\n <div class=\"token-ops__row\" *ngFor=\"let row of rows\">\n <hm-checkbox [formControl]=\"row.control\" [label]=\"row.identifier\" />\n <div class=\"token-ops__meta\">\n <hm-tag [name]=\"row.method\" />\n <hm-tag [name]=\"row.level\" [color]=\"levelTagColor(row.level)\" />\n <span class=\"token-ops__free\" *ngIf=\"row.free\">{{ row.free }}</span>\n <span class=\"token-ops__desc muted\" *ngIf=\"row.description\">{{ row.description }}</span>\n </div>\n </div>\n </fieldset>\n </div>\n </ng-template>\n\n <ng-container footer>\n <ng-container *ngIf=\"!createdToken\">\n <hm-button emphasis=\"medium\" (clicked)=\"close()\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!canSave\" [loading]=\"saving\" (clicked)=\"save()\">{{ text.createToken }}</hm-button>\n </ng-container>\n <hm-button *ngIf=\"createdToken\" (clicked)=\"close()\">{{ text.rotatedSecretDone }}</hm-button>\n </ng-container>\n</hm-modal>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row>hm-combobox{flex:1 1 16rem;min-inline-size:0}.as-summary{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-sm)}.as-summary__info{display:flex;flex:1 1 16rem;flex-direction:column;gap:var(--hm-space-micro);min-inline-size:0}.as-summary__title{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);margin:0;color:var(--hm-text);font-size:var(--hm-font-size-md);font-weight:var(--hm-font-weight-semibold)}.as-summary__detail{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.muted{color:var(--hm-muted)}.as-empty{margin:var(--hm-space-xs) 0 0;font-size:var(--hm-font-size-sm)}.as-secret{display:grid;gap:var(--hm-space-micro)}.as-secret__label{color:var(--hm-muted);font-size:var(--hm-font-size-xs)}.as-secret__row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.as-secret__value{flex:1 1 240px;min-width:0;border:var(--hm-border-hairline) solid var(--hm-divider);border-radius:var(--hm-radius-control);padding:var(--hm-space-xs) var(--hm-space-sm);background:var(--hm-surface);color:var(--hm-text);font-family:var(--hm-font-mono);font-size:var(--hm-font-size-sm);overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}.form-stack{display:flex;flex-direction:column;gap:var(--hm-space-sm)}.token-ops{display:flex;flex-direction:column;gap:var(--hm-space-xs);min-inline-size:0;margin:0;padding:0;border:0}.token-ops__legend{margin-bottom:var(--hm-space-micro);padding:0;color:var(--hm-text);font-size:var(--hm-font-size-sm);font-weight:var(--hm-font-weight-semibold)}.token-ops__note,.token-ops__empty{margin:0;font-size:var(--hm-font-size-sm)}.token-ops__row{display:flex;flex-direction:column;gap:var(--hm-space-micro);padding-bottom:var(--hm-space-xs);border-bottom:var(--hm-border-hairline) solid var(--hm-divider)}.token-ops__row:last-child{border-bottom:0}.token-ops__meta{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);padding-inline-start:calc(var(--hm-check-size) + var(--hm-space-xs))}.token-ops__free{color:var(--hm-muted);font-size:var(--hm-font-size-xs);font-style:italic}.token-ops__desc{font-size:var(--hm-font-size-xs)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: AlertComponent, selector: "hm-alert", inputs: ["variant", "appearance", "heading", "closable", "size", "showIcon", "link", "linkLabel", "linkTarget", "dismissKey", "duration"], outputs: ["closed"] }, { kind: "component", type: ButtonComponent, selector: "hm-button", inputs: ["emphasis", "intent", "size", "type", "icon", "iconDirection", "iconEnd", "disabled", "loading", "busy", "loadingState", "block", "link", "newTab", "caret", "inMenu", "toggle", "pressed"], outputs: ["loadingStateChange", "pressedChange", "clicked"] }, { kind: "component", type: CheckboxComponent, selector: "hm-checkbox", inputs: ["label", "labelHidden", "checked", "indeterminate"], outputs: ["checkedChange"] }, { kind: "component", type: CopyButtonComponent, selector: "hm-copy-button", inputs: ["value", "label", "copiedLabel", "variant", "size", "disabled", "feedbackDuration"], outputs: ["copied", "copyFailed"] }, { kind: "component", type: DatePickerComponent, selector: "hm-date-picker", inputs: ["value", "label", "labelHidden", "hint", "placeholder", "min", "max", "valueFormat"], outputs: ["valueChange"] }, { kind: "component", type: InputComponent, selector: "hm-input", inputs: ["value", "label", "type", "placeholder", "icon", "labelHidden", "hint", "prefix", "suffix", "prefixIcon", "mask", "maskValue", "min", "max", "step", "stepButtons", "maxLength", "autocomplete", "inputMode"], outputs: ["valueChange"] }, { kind: "component", type: ModalComponent, selector: "hm-modal", inputs: ["open", "heading", "size", "closeLabel", "closable", "beforeClose"], outputs: ["openChange", "closed"] }, { kind: "component", type: TagComponent, selector: "hm-tag", inputs: ["name", "color", "compact"] }, { kind: "component", type: TextareaComponent, selector: "hm-textarea", inputs: ["value", "label", "hint", "help", "placeholder", "maxLength", "rows", "autoGrow", "labelHidden", "loading", "maxRows", "submitKey"], outputs: ["valueChange", "submitted"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
570
725
|
}
|
|
571
726
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceTokenCreateComponent, decorators: [{
|
|
572
727
|
type: Component,
|
|
573
728
|
args: [{ selector: 'spine-auto-service-token-create', standalone: true, imports: [
|
|
574
729
|
CommonModule, ReactiveFormsModule, AlertComponent, ButtonComponent, CheckboxComponent, CopyButtonComponent, DatePickerComponent,
|
|
575
730
|
InputComponent, ModalComponent, TagComponent, TextareaComponent,
|
|
576
|
-
], changeDetection: ChangeDetectionStrategy.Eager, template: "<!-- Depois de criar, o modal s\u00F3 mostra o valor (uma vez); fechar (Concluir, Esc ou \u2715) o descarta. -->\n<hm-modal [open]=\"open\" (openChange)=\"onModalOpenChange($event)\"\n [heading]=\"createdToken ? createdHeading(createdToken.name) : text.newToken\" size=\"large\" (closed)=\"close()\">\n <div class=\"form-stack\" *ngIf=\"createdToken as created; else formTpl\">\n <hm-alert variant=\"warning\" [heading]=\"text.tokenCreatedWarning\">{{ text.tokenCreatedNote }}</hm-alert>\n <div class=\"as-secret\">\n <span class=\"as-secret__label\" id=\"as-created-token-label\">{{ valueLabel(created.name) }}</span>\n <div class=\"as-secret__row\">\n <code class=\"as-secret__value\" aria-labelledby=\"as-created-token-label\">{{ created.token }}</code>\n <hm-copy-button variant=\"text\" [value]=\"created.token\" [label]=\"text.copyToken\" [copiedLabel]=\"text.tokenCopied\" />\n </div>\n </div>\n </div>\n\n <ng-template #formTpl>\n <div class=\"form-stack\">\n <hm-alert *ngIf=\"saveError\" variant=\"error\">{{ saveError }}</hm-alert>\n <hm-input [formControl]=\"name\" [label]=\"text.tokenName\" [maxLength]=\"nameMax\" />\n <hm-textarea [formControl]=\"description\" [label]=\"text.tokenDescription\" [rows]=\"2\" />\n <hm-date-picker [formControl]=\"expiresAt\" [label]=\"text.tokenExpiresAt\" [min]=\"minDate\" [max]=\"maxDate\"\n [hint]=\"text.tokenExpiresHint\" [messages]=\"dateMessages\" />\n\n <fieldset class=\"token-ops\">\n <legend class=\"token-ops__legend\">{{ text.tokenOperations }}</legend>\n <p class=\"token-ops__note muted\" *ngIf=\"hasFreeRows || rows.length\">{{ text.tokenOperationsNote }}</p>\n <p class=\"token-ops__empty muted\" *ngIf=\"loading\">{{ text.loading }}</p>\n <p class=\"token-ops__empty muted\" *ngIf=\"!loading && rows.length === 0\">{{ text.noOperations }}</p>\n <div class=\"token-ops__row\" *ngFor=\"let row of rows\">\n <hm-checkbox [formControl]=\"row.control\" [label]=\"row.identifier\" />\n <div class=\"token-ops__meta\">\n <hm-tag [name]=\"row.method\" />\n <hm-tag [name]=\"row.level\" [color]=\"levelTagColor(row.level)\" />\n <span class=\"token-ops__free\" *ngIf=\"row.free\">{{ row.free }}</span>\n <span class=\"token-ops__desc muted\" *ngIf=\"row.description\">{{ row.description }}</span>\n </div>\n </div>\n </fieldset>\n </div>\n </ng-template>\n\n <ng-container footer>\n <ng-container *ngIf=\"!createdToken\">\n <hm-button emphasis=\"medium\" (clicked)=\"close()\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!canSave\" [loading]=\"saving\" (clicked)=\"save()\">{{ text.createToken }}</hm-button>\n </ng-container>\n <hm-button *ngIf=\"createdToken\" (clicked)=\"close()\">{{ text.rotatedSecretDone }}</hm-button>\n </ng-container>\n</hm-modal>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row
|
|
731
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "<!-- Depois de criar, o modal s\u00F3 mostra o valor (uma vez); fechar (Concluir, Esc ou \u2715) o descarta. -->\n<hm-modal [open]=\"open\" (openChange)=\"onModalOpenChange($event)\"\n [heading]=\"createdToken ? createdHeading(createdToken.name) : text.newToken\" size=\"large\" (closed)=\"close()\">\n <div class=\"form-stack\" *ngIf=\"createdToken as created; else formTpl\">\n <hm-alert variant=\"warning\" [heading]=\"text.tokenCreatedWarning\">{{ text.tokenCreatedNote }}</hm-alert>\n <div class=\"as-secret\">\n <span class=\"as-secret__label\" id=\"as-created-token-label\">{{ valueLabel(created.name) }}</span>\n <div class=\"as-secret__row\">\n <code class=\"as-secret__value\" aria-labelledby=\"as-created-token-label\">{{ created.token }}</code>\n <hm-copy-button variant=\"text\" [value]=\"created.token\" [label]=\"text.copyToken\" [copiedLabel]=\"text.tokenCopied\" />\n </div>\n </div>\n </div>\n\n <ng-template #formTpl>\n <div class=\"form-stack\">\n <hm-alert *ngIf=\"saveError\" variant=\"error\">{{ saveError }}</hm-alert>\n <hm-input [formControl]=\"name\" [label]=\"text.tokenName\" [maxLength]=\"nameMax\" />\n <hm-textarea [formControl]=\"description\" [label]=\"text.tokenDescription\" [rows]=\"2\" />\n <hm-date-picker [formControl]=\"expiresAt\" [label]=\"text.tokenExpiresAt\" [min]=\"minDate\" [max]=\"maxDate\"\n [hint]=\"text.tokenExpiresHint\" [messages]=\"dateMessages\" />\n\n <fieldset class=\"token-ops\">\n <legend class=\"token-ops__legend\">{{ text.tokenOperations }}</legend>\n <p class=\"token-ops__note muted\" *ngIf=\"hasFreeRows || rows.length\">{{ text.tokenOperationsNote }}</p>\n <p class=\"token-ops__empty muted\" *ngIf=\"loading\">{{ text.loading }}</p>\n <p class=\"token-ops__empty muted\" *ngIf=\"!loading && rows.length === 0\">{{ text.noOperations }}</p>\n <div class=\"token-ops__row\" *ngFor=\"let row of rows\">\n <hm-checkbox [formControl]=\"row.control\" [label]=\"row.identifier\" />\n <div class=\"token-ops__meta\">\n <hm-tag [name]=\"row.method\" />\n <hm-tag [name]=\"row.level\" [color]=\"levelTagColor(row.level)\" />\n <span class=\"token-ops__free\" *ngIf=\"row.free\">{{ row.free }}</span>\n <span class=\"token-ops__desc muted\" *ngIf=\"row.description\">{{ row.description }}</span>\n </div>\n </div>\n </fieldset>\n </div>\n </ng-template>\n\n <ng-container footer>\n <ng-container *ngIf=\"!createdToken\">\n <hm-button emphasis=\"medium\" (clicked)=\"close()\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!canSave\" [loading]=\"saving\" (clicked)=\"save()\">{{ text.createToken }}</hm-button>\n </ng-container>\n <hm-button *ngIf=\"createdToken\" (clicked)=\"close()\">{{ text.rotatedSecretDone }}</hm-button>\n </ng-container>\n</hm-modal>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row>hm-combobox{flex:1 1 16rem;min-inline-size:0}.as-summary{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-sm)}.as-summary__info{display:flex;flex:1 1 16rem;flex-direction:column;gap:var(--hm-space-micro);min-inline-size:0}.as-summary__title{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);margin:0;color:var(--hm-text);font-size:var(--hm-font-size-md);font-weight:var(--hm-font-weight-semibold)}.as-summary__detail{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.muted{color:var(--hm-muted)}.as-empty{margin:var(--hm-space-xs) 0 0;font-size:var(--hm-font-size-sm)}.as-secret{display:grid;gap:var(--hm-space-micro)}.as-secret__label{color:var(--hm-muted);font-size:var(--hm-font-size-xs)}.as-secret__row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.as-secret__value{flex:1 1 240px;min-width:0;border:var(--hm-border-hairline) solid var(--hm-divider);border-radius:var(--hm-radius-control);padding:var(--hm-space-xs) var(--hm-space-sm);background:var(--hm-surface);color:var(--hm-text);font-family:var(--hm-font-mono);font-size:var(--hm-font-size-sm);overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}.form-stack{display:flex;flex-direction:column;gap:var(--hm-space-sm)}.token-ops{display:flex;flex-direction:column;gap:var(--hm-space-xs);min-inline-size:0;margin:0;padding:0;border:0}.token-ops__legend{margin-bottom:var(--hm-space-micro);padding:0;color:var(--hm-text);font-size:var(--hm-font-size-sm);font-weight:var(--hm-font-weight-semibold)}.token-ops__note,.token-ops__empty{margin:0;font-size:var(--hm-font-size-sm)}.token-ops__row{display:flex;flex-direction:column;gap:var(--hm-space-micro);padding-bottom:var(--hm-space-xs);border-bottom:var(--hm-border-hairline) solid var(--hm-divider)}.token-ops__row:last-child{border-bottom:0}.token-ops__meta{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);padding-inline-start:calc(var(--hm-check-size) + var(--hm-space-xs))}.token-ops__free{color:var(--hm-muted);font-size:var(--hm-font-size-xs);font-style:italic}.token-ops__desc{font-size:var(--hm-font-size-xs)}\n"] }]
|
|
577
732
|
}], propDecorators: { clientId: [{
|
|
578
733
|
type: Input
|
|
579
734
|
}], appId: [{
|
|
@@ -709,14 +864,14 @@ class AutoServiceAppTokensComponent {
|
|
|
709
864
|
void this.revoke(e.row);
|
|
710
865
|
}
|
|
711
866
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceAppTokensComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
712
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceAppTokensComponent, isStandalone: true, selector: "spine-auto-service-app-tokens", inputs: { clientId: "clientId", appId: "appId" }, usesOnChanges: true, ngImport: i0, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"tokens\"\n [rowId]=\"rowId\"\n [caption]=\"text.tokensCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n [emptyMessage]=\"text.noTokens\"\n (actionTriggered)=\"onAction($event)\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreate()\">{{ text.newToken }}</hm-button>\n <ng-template hmCell=\"prefix\" let-tk>\n <code *ngIf=\"tk.token_prefix; else noPrefix\">{{ tk.token_prefix }}\u2026</code>\n <ng-template #noPrefix>\u2014</ng-template>\n </ng-template>\n <ng-template hmCell=\"status\" let-tk>\n <hm-tag [name]=\"statusLabel(status(tk))\" [color]=\"statusColor(status(tk))\" />\n </ng-template>\n <ng-template hmCell=\"expires_at\" let-tk>{{ formatDate(tk.expires_at) || '\u2014' }}</ng-template>\n <ng-template hmCell=\"last_used_at\" let-tk>{{ tk.last_used_at ? formatDate(tk.last_used_at) : text.neverUsed }}</ng-template>\n</hm-data-grid>\n\n<spine-auto-service-token-create [clientId]=\"clientId\" [appId]=\"appId\" [open]=\"showCreate\"\n (openChange)=\"showCreate = $event\" (created)=\"load()\">\n</spine-auto-service-token-create>\n\n<spine-auto-service-consumer-permissions *ngIf=\"permissionsConsumer as consumer\" [clientId]=\"clientId\" [appId]=\"appId\"\n [consumer]=\"consumer\" [open]=\"showPermissions\" (openChange)=\"showPermissions = $event\">\n</spine-auto-service-consumer-permissions>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "hm-button", inputs: ["emphasis", "intent", "size", "type", "icon", "iconDirection", "iconEnd", "disabled", "loading", "busy", "loadingState", "block", "link", "newTab", "caret", "inMenu", "toggle", "pressed"], outputs: ["loadingStateChange", "pressedChange", "clicked"] }, { kind: "component", type: DataGridComponent, selector: "hm-data-grid", inputs: ["columns", "rows", "rowId", "caption", "rowActions", "loading", "error", "emptyMessage", "noResultsMessage", "filterable", "paginated", "pageState", "pagination", "totalItems", "sort", "selectable", "selectionMode", "selection", "rowSelectable", "rowSelectableReason", "rowDetailDisabled", "rowDetailHidden", "virtual", "rowHeight", "pinnedColumns", "columnState", "pageSizes", "fillHeight", "maxHeight", "bordered", "rowState", "rowClickable", "remoteSearch", "remoteSort", "itemsLabel", "pageSizeLabel", "exportable", "exportFileName", "groupBy", "aggregates", "aggregateFormatter", "persistKey", "persistStorage", "advancedFilter", "filterQuery", "columnManager", "columnOrder", "searchTerm"], outputs: ["pageStateChange", "sortChange", "selectionChange", "pinnedColumnsChange", "columnStateChange", "actionTriggered", "detailToggled", "rowClicked", "clearFiltersRequested", "filteredChange", "searchTermChanged", "groupByChange", "filterQueryChange", "columnOrderChange", "searchTermChange", "detailPaneToggled"] }, { kind: "directive", type: DataGridCellDirective, selector: "ng-template[hmCell]", inputs: ["hmCell"] }, { kind: "component", type: TagComponent, selector: "hm-tag", inputs: ["name", "color", "compact"] }, { kind: "component", type: AutoServiceTokenCreateComponent, selector: "spine-auto-service-token-create", inputs: ["clientId", "appId", "open"], outputs: ["openChange", "created"] }, { kind: "component", type: AutoServiceConsumerPermissionsComponent, selector: "spine-auto-service-consumer-permissions", inputs: ["clientId", "appId", "consumer", "open"], outputs: ["openChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
867
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceAppTokensComponent, isStandalone: true, selector: "spine-auto-service-app-tokens", inputs: { clientId: "clientId", appId: "appId" }, usesOnChanges: true, ngImport: i0, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"tokens\"\n [rowId]=\"rowId\"\n [caption]=\"text.tokensCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n [emptyMessage]=\"text.noTokens\"\n (actionTriggered)=\"onAction($event)\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreate()\">{{ text.newToken }}</hm-button>\n <ng-template hmCell=\"prefix\" let-tk>\n <code *ngIf=\"tk.token_prefix; else noPrefix\">{{ tk.token_prefix }}\u2026</code>\n <ng-template #noPrefix>\u2014</ng-template>\n </ng-template>\n <ng-template hmCell=\"status\" let-tk>\n <hm-tag [name]=\"statusLabel(status(tk))\" [color]=\"statusColor(status(tk))\" />\n </ng-template>\n <ng-template hmCell=\"expires_at\" let-tk>{{ formatDate(tk.expires_at) || '\u2014' }}</ng-template>\n <ng-template hmCell=\"last_used_at\" let-tk>{{ tk.last_used_at ? formatDate(tk.last_used_at) : text.neverUsed }}</ng-template>\n</hm-data-grid>\n\n<spine-auto-service-token-create [clientId]=\"clientId\" [appId]=\"appId\" [open]=\"showCreate\"\n (openChange)=\"showCreate = $event\" (created)=\"load()\">\n</spine-auto-service-token-create>\n\n<spine-auto-service-consumer-permissions *ngIf=\"permissionsConsumer as consumer\" [clientId]=\"clientId\" [appId]=\"appId\"\n [consumer]=\"consumer\" mode=\"token\" [open]=\"showPermissions\" (openChange)=\"showPermissions = $event\">\n</spine-auto-service-consumer-permissions>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "hm-button", inputs: ["emphasis", "intent", "size", "type", "icon", "iconDirection", "iconEnd", "disabled", "loading", "busy", "loadingState", "block", "link", "newTab", "caret", "inMenu", "toggle", "pressed"], outputs: ["loadingStateChange", "pressedChange", "clicked"] }, { kind: "component", type: DataGridComponent, selector: "hm-data-grid", inputs: ["columns", "rows", "rowId", "caption", "rowActions", "loading", "error", "emptyMessage", "noResultsMessage", "filterable", "paginated", "pageState", "pagination", "totalItems", "sort", "selectable", "selectionMode", "selection", "rowSelectable", "rowSelectableReason", "rowDetailDisabled", "rowDetailHidden", "virtual", "rowHeight", "pinnedColumns", "columnState", "pageSizes", "fillHeight", "maxHeight", "bordered", "rowState", "rowClickable", "remoteSearch", "remoteSort", "itemsLabel", "pageSizeLabel", "exportable", "exportFileName", "groupBy", "aggregates", "aggregateFormatter", "persistKey", "persistStorage", "advancedFilter", "filterQuery", "columnManager", "columnOrder", "searchTerm"], outputs: ["pageStateChange", "sortChange", "selectionChange", "pinnedColumnsChange", "columnStateChange", "actionTriggered", "detailToggled", "rowClicked", "clearFiltersRequested", "filteredChange", "searchTermChanged", "groupByChange", "filterQueryChange", "columnOrderChange", "searchTermChange", "detailPaneToggled"] }, { kind: "directive", type: DataGridCellDirective, selector: "ng-template[hmCell]", inputs: ["hmCell"] }, { kind: "component", type: TagComponent, selector: "hm-tag", inputs: ["name", "color", "compact"] }, { kind: "component", type: AutoServiceTokenCreateComponent, selector: "spine-auto-service-token-create", inputs: ["clientId", "appId", "open"], outputs: ["openChange", "created"] }, { kind: "component", type: AutoServiceConsumerPermissionsComponent, selector: "spine-auto-service-consumer-permissions", inputs: ["clientId", "appId", "consumer", "mode", "open"], outputs: ["openChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
713
868
|
}
|
|
714
869
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceAppTokensComponent, decorators: [{
|
|
715
870
|
type: Component,
|
|
716
871
|
args: [{ selector: 'spine-auto-service-app-tokens', standalone: true, imports: [
|
|
717
872
|
CommonModule, ButtonComponent, DataGridComponent, DataGridCellDirective, TagComponent,
|
|
718
873
|
AutoServiceTokenCreateComponent, AutoServiceConsumerPermissionsComponent,
|
|
719
|
-
], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"tokens\"\n [rowId]=\"rowId\"\n [caption]=\"text.tokensCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n [emptyMessage]=\"text.noTokens\"\n (actionTriggered)=\"onAction($event)\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreate()\">{{ text.newToken }}</hm-button>\n <ng-template hmCell=\"prefix\" let-tk>\n <code *ngIf=\"tk.token_prefix; else noPrefix\">{{ tk.token_prefix }}\u2026</code>\n <ng-template #noPrefix>\u2014</ng-template>\n </ng-template>\n <ng-template hmCell=\"status\" let-tk>\n <hm-tag [name]=\"statusLabel(status(tk))\" [color]=\"statusColor(status(tk))\" />\n </ng-template>\n <ng-template hmCell=\"expires_at\" let-tk>{{ formatDate(tk.expires_at) || '\u2014' }}</ng-template>\n <ng-template hmCell=\"last_used_at\" let-tk>{{ tk.last_used_at ? formatDate(tk.last_used_at) : text.neverUsed }}</ng-template>\n</hm-data-grid>\n\n<spine-auto-service-token-create [clientId]=\"clientId\" [appId]=\"appId\" [open]=\"showCreate\"\n (openChange)=\"showCreate = $event\" (created)=\"load()\">\n</spine-auto-service-token-create>\n\n<spine-auto-service-consumer-permissions *ngIf=\"permissionsConsumer as consumer\" [clientId]=\"clientId\" [appId]=\"appId\"\n [consumer]=\"consumer\" [open]=\"showPermissions\" (openChange)=\"showPermissions = $event\">\n</spine-auto-service-consumer-permissions>\n", styles: [":host{display:block}\n"] }]
|
|
874
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"tokens\"\n [rowId]=\"rowId\"\n [caption]=\"text.tokensCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n [emptyMessage]=\"text.noTokens\"\n (actionTriggered)=\"onAction($event)\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreate()\">{{ text.newToken }}</hm-button>\n <ng-template hmCell=\"prefix\" let-tk>\n <code *ngIf=\"tk.token_prefix; else noPrefix\">{{ tk.token_prefix }}\u2026</code>\n <ng-template #noPrefix>\u2014</ng-template>\n </ng-template>\n <ng-template hmCell=\"status\" let-tk>\n <hm-tag [name]=\"statusLabel(status(tk))\" [color]=\"statusColor(status(tk))\" />\n </ng-template>\n <ng-template hmCell=\"expires_at\" let-tk>{{ formatDate(tk.expires_at) || '\u2014' }}</ng-template>\n <ng-template hmCell=\"last_used_at\" let-tk>{{ tk.last_used_at ? formatDate(tk.last_used_at) : text.neverUsed }}</ng-template>\n</hm-data-grid>\n\n<spine-auto-service-token-create [clientId]=\"clientId\" [appId]=\"appId\" [open]=\"showCreate\"\n (openChange)=\"showCreate = $event\" (created)=\"load()\">\n</spine-auto-service-token-create>\n\n<spine-auto-service-consumer-permissions *ngIf=\"permissionsConsumer as consumer\" [clientId]=\"clientId\" [appId]=\"appId\"\n [consumer]=\"consumer\" mode=\"token\" [open]=\"showPermissions\" (openChange)=\"showPermissions = $event\">\n</spine-auto-service-consumer-permissions>\n", styles: [":host{display:block}\n"] }]
|
|
720
875
|
}], propDecorators: { clientId: [{
|
|
721
876
|
type: Input
|
|
722
877
|
}], appId: [{
|
|
@@ -724,9 +879,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImpo
|
|
|
724
879
|
}] } });
|
|
725
880
|
|
|
726
881
|
/**
|
|
727
|
-
* Aplicações (client_credentials) do projeto do client:
|
|
728
|
-
*
|
|
729
|
-
*
|
|
882
|
+
* Aplicações (client_credentials) do projeto do client: Cadastrar e um cartão com o seletor das aplicações e Consultar.
|
|
883
|
+
* A aplicação consultada abre embaixo: o resumo com Editar, Ativar/Desativar, Gerar novo segredo e Excluir, e as abas
|
|
884
|
+
* Operações, Acessos e Tokens. Mesmo molde da tela Grupos.
|
|
730
885
|
*/
|
|
731
886
|
class AutoServiceAppsComponent {
|
|
732
887
|
constructor() {
|
|
@@ -740,7 +895,9 @@ class AutoServiceAppsComponent {
|
|
|
740
895
|
this.clientId = '';
|
|
741
896
|
this.apps = [];
|
|
742
897
|
this.loading = false;
|
|
743
|
-
/** Aplicação
|
|
898
|
+
/** Aplicação escolhida no seletor (só abre ao Consultar). */
|
|
899
|
+
this.selectedAppId = '';
|
|
900
|
+
/** Aplicação aberta (resumo + abas embaixo do seletor). */
|
|
744
901
|
this.app = null;
|
|
745
902
|
this.modalApp = null;
|
|
746
903
|
this.showAppModal = false;
|
|
@@ -749,39 +906,26 @@ class AutoServiceAppsComponent {
|
|
|
749
906
|
/** Segredo gerado por "Gerar novo segredo", mostrado uma vez na janela até "Concluir". */
|
|
750
907
|
this.rotatedSecret = null;
|
|
751
908
|
this.rotatingSecret = false;
|
|
752
|
-
|
|
753
|
-
this.
|
|
754
|
-
{ key: 'name', title: this.text.colName, value: (a) => a.name, sortable: true, searchable: true },
|
|
755
|
-
{ key: 'grants', title: this.text.colGrants, value: (a) => this.grantsText(a) },
|
|
756
|
-
{ key: 'status', title: this.text.colStatus, value: (a) => (a.enabled ? this.text.active : this.text.inactive), sortable: true },
|
|
757
|
-
], ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
758
|
-
this.rowActions = computed(() => [
|
|
759
|
-
{ id: 'edit', icon: 'pencil', label: this.text.edit },
|
|
760
|
-
{ id: 'disable', icon: 'pause', label: this.text.disable, available: (a) => !!a.enabled },
|
|
761
|
-
{ id: 'enable', icon: 'play', label: this.text.enable, available: (a) => !a.enabled },
|
|
762
|
-
{ id: 'rotate', icon: 'key', label: this.text.rotateSecret },
|
|
763
|
-
{
|
|
764
|
-
id: 'delete', icon: 'trash', label: this.text.delete, danger: true, separatorAbove: true,
|
|
765
|
-
confirm: (a) => ({ heading: this.text.confirmDeleteAppHeading, message: formatMessage(this.text.confirmDeleteApp, { name: a.name ?? a.id }) }),
|
|
766
|
-
},
|
|
767
|
-
], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
|
|
909
|
+
/** Opções do seletor, recalculadas na carga (o `hm-combobox` recebe sempre o mesmo array). */
|
|
910
|
+
this.appComboOptions = [];
|
|
768
911
|
}
|
|
769
912
|
// Trocar de client fecha a aplicação aberta e esconde o segredo recém-criado: ele é de uma aplicação do client anterior.
|
|
770
913
|
ngOnChanges(changes) {
|
|
771
914
|
if (changes['clientId']) {
|
|
772
915
|
this.app = null;
|
|
916
|
+
this.selectedAppId = '';
|
|
773
917
|
this.apps = [];
|
|
918
|
+
this.appComboOptions = [];
|
|
774
919
|
this.newSecret = null;
|
|
775
920
|
this.rotatedSecret = null;
|
|
776
921
|
void this.load();
|
|
777
922
|
}
|
|
778
923
|
}
|
|
779
|
-
grantsText(a) { return a.allowed_grants?.length ? a.allowed_grants.join(', ') : '—'; }
|
|
780
|
-
openAppLabel(a) { return formatMessage(this.text.openApp, { name: a.name }); }
|
|
781
924
|
async load() {
|
|
782
925
|
const clientId = this.clientId;
|
|
783
926
|
if (!clientId) {
|
|
784
927
|
this.apps = [];
|
|
928
|
+
this.appComboOptions = [];
|
|
785
929
|
return;
|
|
786
930
|
}
|
|
787
931
|
this.loading = true;
|
|
@@ -791,20 +935,30 @@ class AutoServiceAppsComponent {
|
|
|
791
935
|
if (this.clientId !== clientId)
|
|
792
936
|
return;
|
|
793
937
|
this.apps = res.apps ?? [];
|
|
938
|
+
this.appComboOptions = this.apps.map((a) => ({ value: a.id, label: a.name ?? a.id }));
|
|
794
939
|
// A aplicação aberta acompanha o que o servidor devolveu (nome/situação novos) ou fecha se sumiu.
|
|
795
940
|
if (this.app)
|
|
796
941
|
this.app = this.apps.find((a) => a.id === this.app.id) ?? null;
|
|
942
|
+
if (this.selectedAppId && !this.apps.some((a) => a.id === this.selectedAppId))
|
|
943
|
+
this.selectedAppId = '';
|
|
797
944
|
}
|
|
798
945
|
finally {
|
|
799
946
|
this.loading = false;
|
|
800
947
|
this.cdr.markForCheck();
|
|
801
948
|
}
|
|
802
949
|
}
|
|
803
|
-
/**
|
|
950
|
+
/** Consultar: abre a aplicação escolhida no seletor. */
|
|
951
|
+
searchApp() {
|
|
952
|
+
const a = this.apps.find((x) => x.id === this.selectedAppId);
|
|
953
|
+
if (a)
|
|
954
|
+
this.openApp(a);
|
|
955
|
+
}
|
|
956
|
+
/** Abre a aplicação embaixo do seletor; outra aplicação volta para a aba Operações. */
|
|
804
957
|
openApp(a) {
|
|
805
958
|
if (this.app?.id !== a.id)
|
|
806
959
|
this.activeTab = 'operations';
|
|
807
960
|
this.app = a;
|
|
961
|
+
this.selectedAppId = a.id;
|
|
808
962
|
this.cdr.markForCheck();
|
|
809
963
|
}
|
|
810
964
|
setTab(tab) { this.activeTab = tab; }
|
|
@@ -869,7 +1023,7 @@ class AutoServiceAppsComponent {
|
|
|
869
1023
|
}
|
|
870
1024
|
return this.text.rotateSecretError;
|
|
871
1025
|
}
|
|
872
|
-
/** Botão Excluir do resumo: pede confirmação e só então exclui.
|
|
1026
|
+
/** Botão Excluir do resumo: pede confirmação e só então exclui. */
|
|
873
1027
|
async deleteApp(a = this.app) {
|
|
874
1028
|
if (!a)
|
|
875
1029
|
return;
|
|
@@ -886,38 +1040,22 @@ class AutoServiceAppsComponent {
|
|
|
886
1040
|
async removeApp(a) {
|
|
887
1041
|
if (!(await this.deletion.run(() => this.service.deleteApp(this.clientId, a.id))))
|
|
888
1042
|
return;
|
|
889
|
-
if (this.app?.id === a.id)
|
|
1043
|
+
if (this.app?.id === a.id) {
|
|
890
1044
|
this.app = null;
|
|
1045
|
+
this.selectedAppId = '';
|
|
1046
|
+
}
|
|
891
1047
|
this.newSecret = null;
|
|
892
1048
|
await this.load();
|
|
893
1049
|
}
|
|
894
|
-
onAction(e) {
|
|
895
|
-
switch (e.action) {
|
|
896
|
-
case 'edit':
|
|
897
|
-
this.openEdit(e.row);
|
|
898
|
-
break;
|
|
899
|
-
case 'enable':
|
|
900
|
-
case 'disable':
|
|
901
|
-
void this.toggleEnabled(e.row);
|
|
902
|
-
break;
|
|
903
|
-
case 'rotate':
|
|
904
|
-
void this.rotateSecret(e.row);
|
|
905
|
-
break;
|
|
906
|
-
case 'delete':
|
|
907
|
-
void this.removeApp(e.row);
|
|
908
|
-
break;
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
1050
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceAppsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
912
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceAppsComponent, isStandalone: true, selector: "spine-auto-service-apps", inputs: { clientId: "clientId" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"as-stack\">\n <hm-alert *ngIf=\"newSecret\" variant=\"success\" [closable]=\"true\" (closed)=\"newSecret = null\">\n {{ text.secretCreated }} <strong>{{ newSecret }}</strong>\n </hm-alert>\n\n <!-- Clicar na linha (ou no nome, pelo teclado) abre a aplica\u00E7\u00E3o embaixo da tabela. -->\n <hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"apps\"\n [rowId]=\"rowId\"\n [caption]=\"text.appsCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n [emptyMessage]=\"text.noApps\"\n rowClickable\n (rowClicked)=\"openApp($event)\"\n (actionTriggered)=\"onAction($event)\"\n >\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreate()\">{{ text.register }}</hm-button>\n <ng-template hmCell=\"name\" let-a>\n <button type=\"button\" class=\"name-cell__open\" [attr.aria-label]=\"openAppLabel(a)\"\n [attr.aria-current]=\"app?.id === a.id ? 'true' : null\" (click)=\"openApp(a)\">{{ a.name }}</button>\n </ng-template>\n <ng-template hmCell=\"grants\" let-a>\n <code *ngIf=\"a.allowed_grants?.length; else noGrants\">{{ grantsText(a) }}</code>\n <ng-template #noGrants>\u2014</ng-template>\n </ng-template>\n <ng-template hmCell=\"status\" let-a>\n <hm-tag [name]=\"a.enabled ? text.active : text.inactive\" [color]=\"a.enabled ? 'success' : 'danger'\" />\n </ng-template>\n </hm-data-grid>\n\n <ng-container *ngIf=\"app as a\">\n <hm-card>\n <div class=\"as-summary\">\n <div class=\"as-summary__info\">\n <p class=\"as-summary__title app-title\">\n {{ a.name }}\n <hm-tag [name]=\"a.enabled ? text.active : text.inactive\" [color]=\"a.enabled ? 'success' : 'danger'\" />\n </p>\n <p class=\"as-summary__detail\">{{ a.allowed_grants?.join(', ') }}</p>\n </div>\n <div class=\"as-actions\">\n <hm-button emphasis=\"medium\" icon=\"pencil\" (clicked)=\"openEdit(a)\">{{ text.edit }}</hm-button>\n <hm-button emphasis=\"medium\" (clicked)=\"toggleEnabled(a)\">{{ a.enabled ? text.disable : text.enable }}</hm-button>\n <hm-button emphasis=\"medium\" icon=\"key\" [loading]=\"rotatingSecret\" (clicked)=\"rotateSecret(a)\">{{ text.rotateSecret }}</hm-button>\n <hm-button intent=\"danger\" emphasis=\"medium\" icon=\"trash\" (clicked)=\"deleteApp(a)\">{{ text.delete }}</hm-button>\n </div>\n </div>\n </hm-card>\n\n <!-- Conte\u00FAdo de cada aba \u00E9 pregui\u00E7oso (*hmTabContent): s\u00F3 busca na API quando a aba \u00E9 aberta. -->\n <hm-tabs [label]=\"text.appSections\" [active]=\"activeTab\" (activeChange)=\"setTab($any($event))\">\n <hm-tab id=\"operations\" [label]=\"text.tabOperations\">\n <spine-auto-service-app-operations *hmTabContent [clientId]=\"clientId\" [appId]=\"a.id\"></spine-auto-service-app-operations>\n </hm-tab>\n <hm-tab id=\"access\" [label]=\"text.tabAccesses\">\n <spine-auto-service-app-access *hmTabContent [clientId]=\"clientId\" [appId]=\"a.id\"></spine-auto-service-app-access>\n </hm-tab>\n <hm-tab id=\"tokens\" [label]=\"text.tabTokens\">\n <spine-auto-service-app-tokens *hmTabContent [clientId]=\"clientId\" [appId]=\"a.id\"></spine-auto-service-app-tokens>\n </hm-tab>\n </hm-tabs>\n </ng-container>\n</div>\n\n<!-- Segredo novo (\"Gerar novo segredo\"): aparece uma vez; fechar (Concluir, Esc ou \u2715) o descarta. -->\n<hm-modal\n [open]=\"!!rotatedSecret\"\n (openChange)=\"$event || closeRotatedSecret()\"\n [heading]=\"rotatedSecret ? rotatedSecretHeading(rotatedSecret.name) : ''\"\n (closed)=\"closeRotatedSecret()\">\n <div class=\"as-stack\" *ngIf=\"rotatedSecret as rotated\">\n <hm-alert variant=\"warning\" [heading]=\"text.rotatedSecretWarning\">{{ text.rotatedSecretNote }}</hm-alert>\n <div class=\"as-secret\">\n <span class=\"as-secret__label\" id=\"as-rotated-secret-label\">{{ rotatedSecretLabel(rotated.name) }}</span>\n <div class=\"as-secret__row\">\n <code class=\"as-secret__value\" aria-labelledby=\"as-rotated-secret-label\">{{ rotated.secret }}</code>\n <hm-copy-button variant=\"text\" [value]=\"rotated.secret\" [label]=\"text.copySecret\" [copiedLabel]=\"text.secretCopied\" />\n </div>\n </div>\n </div>\n <ng-container footer>\n <hm-button (clicked)=\"closeRotatedSecret()\">{{ text.rotatedSecretDone }}</hm-button>\n </ng-container>\n</hm-modal>\n\n<spine-auto-service-apps-modal\n [app]=\"modalApp\"\n [clientId]=\"clientId\"\n [open]=\"showAppModal\"\n (openChange)=\"showAppModal = $event\"\n (saved)=\"onAppSaved($event)\">\n</spine-auto-service-apps-modal>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row>:first-child{flex:1 1 20rem;min-inline-size:0}.as-summary{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-sm)}.as-summary__info{display:flex;flex:1 1 16rem;flex-direction:column;gap:var(--hm-space-micro);min-inline-size:0}.as-summary__title{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);margin:0;color:var(--hm-text);font-size:var(--hm-font-size-md);font-weight:var(--hm-font-weight-semibold)}.as-summary__detail{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.muted{color:var(--hm-muted)}.as-secret{display:grid;gap:var(--hm-space-micro)}.as-secret__label{color:var(--hm-muted);font-size:var(--hm-font-size-xs)}.as-secret__row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.as-secret__value{flex:1 1 240px;min-width:0;border:var(--hm-border-hairline) solid var(--hm-divider);border-radius:var(--hm-radius-control);padding:var(--hm-space-xs) var(--hm-space-sm);background:var(--hm-surface);color:var(--hm-text);font-family:var(--hm-font-mono);font-size:var(--hm-font-size-sm);overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}:host{display:block}.name-cell__open{padding:0;border:0;background:none;color:inherit;font:inherit;font-weight:var(--hm-font-weight-semibold);text-align:start;cursor:pointer}.name-cell__open:hover,.name-cell__open[aria-current=true]{text-decoration:underline}.name-cell__open:focus-visible{border-radius:var(--hm-radius-micro);outline:var(--hm-border-thin) solid var(--hm-accent);outline-offset:var(--hm-space-micro)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AlertComponent, selector: "hm-alert", inputs: ["variant", "appearance", "heading", "closable", "size", "showIcon", "link", "linkLabel", "linkTarget", "dismissKey", "duration"], outputs: ["closed"] }, { kind: "component", type: ButtonComponent, selector: "hm-button", inputs: ["emphasis", "intent", "size", "type", "icon", "iconDirection", "iconEnd", "disabled", "loading", "busy", "loadingState", "block", "link", "newTab", "caret", "inMenu", "toggle", "pressed"], outputs: ["loadingStateChange", "pressedChange", "clicked"] }, { kind: "component", type: CardComponent, selector: "hm-card", inputs: ["heading", "icon", "selected", "fill", "media", "mediaAlt", "mediaDecorative", "mediaPosition"] }, { kind: "component", type: CopyButtonComponent, selector: "hm-copy-button", inputs: ["value", "label", "copiedLabel", "variant", "size", "disabled", "feedbackDuration"], outputs: ["copied", "copyFailed"] }, { kind: "component", type: DataGridComponent, selector: "hm-data-grid", inputs: ["columns", "rows", "rowId", "caption", "rowActions", "loading", "error", "emptyMessage", "noResultsMessage", "filterable", "paginated", "pageState", "pagination", "totalItems", "sort", "selectable", "selectionMode", "selection", "rowSelectable", "rowSelectableReason", "rowDetailDisabled", "rowDetailHidden", "virtual", "rowHeight", "pinnedColumns", "columnState", "pageSizes", "fillHeight", "maxHeight", "bordered", "rowState", "rowClickable", "remoteSearch", "remoteSort", "itemsLabel", "pageSizeLabel", "exportable", "exportFileName", "groupBy", "aggregates", "aggregateFormatter", "persistKey", "persistStorage", "advancedFilter", "filterQuery", "columnManager", "columnOrder", "searchTerm"], outputs: ["pageStateChange", "sortChange", "selectionChange", "pinnedColumnsChange", "columnStateChange", "actionTriggered", "detailToggled", "rowClicked", "clearFiltersRequested", "filteredChange", "searchTermChanged", "groupByChange", "filterQueryChange", "columnOrderChange", "searchTermChange", "detailPaneToggled"] }, { kind: "directive", type: DataGridCellDirective, selector: "ng-template[hmCell]", inputs: ["hmCell"] }, { kind: "component", type: ModalComponent, selector: "hm-modal", inputs: ["open", "heading", "size", "closeLabel", "closable", "beforeClose"], outputs: ["openChange", "closed"] }, { kind: "component", type: TabsComponent, selector: "hm-tabs", inputs: ["label", "active", "orientation", "mode", "overflow", "fillHeight", "noPanelGap"], outputs: ["activeChange"] }, { kind: "component", type: TabComponent, selector: "hm-tab", inputs: ["id", "label", "disabled", "count", "route", "exact", "destroyOnHide"] }, { kind: "directive", type: TabContentDirective, selector: "ng-template[hmTabContent]" }, { kind: "component", type: TagComponent, selector: "hm-tag", inputs: ["name", "color", "compact"] }, { kind: "component", type: AutoServiceAppsModalComponent, selector: "spine-auto-service-apps-modal", inputs: ["app", "clientId", "open"], outputs: ["openChange", "saved"] }, { kind: "component", type: AutoServiceAppOperationsComponent, selector: "spine-auto-service-app-operations", inputs: ["clientId", "appId"] }, { kind: "component", type: AutoServiceAppAccessComponent, selector: "spine-auto-service-app-access", inputs: ["clientId", "appId"] }, { kind: "component", type: AutoServiceAppTokensComponent, selector: "spine-auto-service-app-tokens", inputs: ["clientId", "appId"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
1051
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceAppsComponent, isStandalone: true, selector: "spine-auto-service-apps", inputs: { clientId: "clientId" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"as-stack\">\n <div class=\"as-actions\">\n <hm-button icon=\"plus\" (clicked)=\"openCreate()\">{{ text.register }}</hm-button>\n </div>\n\n <hm-alert *ngIf=\"newSecret\" variant=\"success\" [closable]=\"true\" (closed)=\"newSecret = null\">\n {{ text.secretCreated }} <strong>{{ newSecret }}</strong>\n </hm-alert>\n\n <!-- Escolher a aplica\u00E7\u00E3o no seletor e Consultar abre o resumo (com as a\u00E7\u00F5es) e as abas embaixo. -->\n <hm-card>\n <div class=\"as-field-row\">\n <hm-combobox [label]=\"text.pickApp\" [options]=\"appComboOptions\" [value]=\"selectedAppId\"\n (valueChange)=\"selectedAppId = $event\" [disabled]=\"loading\">\n </hm-combobox>\n <hm-button [disabled]=\"!selectedAppId\" (clicked)=\"searchApp()\" icon=\"search\">{{ text.search }}</hm-button>\n </div>\n <p class=\"as-empty muted\" *ngIf=\"!loading && apps.length === 0\">{{ text.noApps }}</p>\n </hm-card>\n\n <ng-container *ngIf=\"app as a\">\n <hm-card>\n <div class=\"as-summary\">\n <div class=\"as-summary__info\">\n <p class=\"as-summary__title app-title\">\n {{ a.name }}\n <hm-tag [name]=\"a.enabled ? text.active : text.inactive\" [color]=\"a.enabled ? 'success' : 'danger'\" />\n </p>\n <p class=\"as-summary__detail\">{{ a.allowed_grants?.join(', ') }}</p>\n </div>\n <div class=\"as-actions\">\n <hm-button emphasis=\"medium\" icon=\"pencil\" (clicked)=\"openEdit(a)\">{{ text.edit }}</hm-button>\n <hm-button emphasis=\"medium\" (clicked)=\"toggleEnabled(a)\">{{ a.enabled ? text.disable : text.enable }}</hm-button>\n <hm-button emphasis=\"medium\" icon=\"key\" [loading]=\"rotatingSecret\" (clicked)=\"rotateSecret(a)\">{{ text.rotateSecret }}</hm-button>\n <hm-button intent=\"danger\" emphasis=\"medium\" icon=\"trash\" (clicked)=\"deleteApp(a)\">{{ text.delete }}</hm-button>\n </div>\n </div>\n </hm-card>\n\n <!-- Conte\u00FAdo de cada aba \u00E9 pregui\u00E7oso (*hmTabContent): s\u00F3 busca na API quando a aba \u00E9 aberta. -->\n <hm-tabs [label]=\"text.appSections\" [active]=\"activeTab\" (activeChange)=\"setTab($any($event))\">\n <hm-tab id=\"operations\" [label]=\"text.tabOperations\">\n <spine-auto-service-app-operations *hmTabContent [clientId]=\"clientId\" [appId]=\"a.id\"></spine-auto-service-app-operations>\n </hm-tab>\n <hm-tab id=\"access\" [label]=\"text.tabAccesses\">\n <spine-auto-service-app-access *hmTabContent [clientId]=\"clientId\" [appId]=\"a.id\"></spine-auto-service-app-access>\n </hm-tab>\n <hm-tab id=\"tokens\" [label]=\"text.tabTokens\">\n <spine-auto-service-app-tokens *hmTabContent [clientId]=\"clientId\" [appId]=\"a.id\"></spine-auto-service-app-tokens>\n </hm-tab>\n </hm-tabs>\n </ng-container>\n</div>\n\n<!-- Segredo novo (\"Gerar novo segredo\"): aparece uma vez; fechar (Concluir, Esc ou \u2715) o descarta. -->\n<hm-modal\n [open]=\"!!rotatedSecret\"\n (openChange)=\"$event || closeRotatedSecret()\"\n [heading]=\"rotatedSecret ? rotatedSecretHeading(rotatedSecret.name) : ''\"\n (closed)=\"closeRotatedSecret()\">\n <div class=\"as-stack\" *ngIf=\"rotatedSecret as rotated\">\n <hm-alert variant=\"warning\" [heading]=\"text.rotatedSecretWarning\">{{ text.rotatedSecretNote }}</hm-alert>\n <div class=\"as-secret\">\n <span class=\"as-secret__label\" id=\"as-rotated-secret-label\">{{ rotatedSecretLabel(rotated.name) }}</span>\n <div class=\"as-secret__row\">\n <code class=\"as-secret__value\" aria-labelledby=\"as-rotated-secret-label\">{{ rotated.secret }}</code>\n <hm-copy-button variant=\"text\" [value]=\"rotated.secret\" [label]=\"text.copySecret\" [copiedLabel]=\"text.secretCopied\" />\n </div>\n </div>\n </div>\n <ng-container footer>\n <hm-button (clicked)=\"closeRotatedSecret()\">{{ text.rotatedSecretDone }}</hm-button>\n </ng-container>\n</hm-modal>\n\n<spine-auto-service-apps-modal\n [app]=\"modalApp\"\n [clientId]=\"clientId\"\n [open]=\"showAppModal\"\n (openChange)=\"showAppModal = $event\"\n (saved)=\"onAppSaved($event)\">\n</spine-auto-service-apps-modal>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row>hm-combobox{flex:1 1 16rem;min-inline-size:0}.as-summary{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-sm)}.as-summary__info{display:flex;flex:1 1 16rem;flex-direction:column;gap:var(--hm-space-micro);min-inline-size:0}.as-summary__title{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);margin:0;color:var(--hm-text);font-size:var(--hm-font-size-md);font-weight:var(--hm-font-weight-semibold)}.as-summary__detail{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.muted{color:var(--hm-muted)}.as-empty{margin:var(--hm-space-xs) 0 0;font-size:var(--hm-font-size-sm)}.as-secret{display:grid;gap:var(--hm-space-micro)}.as-secret__label{color:var(--hm-muted);font-size:var(--hm-font-size-xs)}.as-secret__row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.as-secret__value{flex:1 1 240px;min-width:0;border:var(--hm-border-hairline) solid var(--hm-divider);border-radius:var(--hm-radius-control);padding:var(--hm-space-xs) var(--hm-space-sm);background:var(--hm-surface);color:var(--hm-text);font-family:var(--hm-font-mono);font-size:var(--hm-font-size-sm);overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}:host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AlertComponent, selector: "hm-alert", inputs: ["variant", "appearance", "heading", "closable", "size", "showIcon", "link", "linkLabel", "linkTarget", "dismissKey", "duration"], outputs: ["closed"] }, { kind: "component", type: ButtonComponent, selector: "hm-button", inputs: ["emphasis", "intent", "size", "type", "icon", "iconDirection", "iconEnd", "disabled", "loading", "busy", "loadingState", "block", "link", "newTab", "caret", "inMenu", "toggle", "pressed"], outputs: ["loadingStateChange", "pressedChange", "clicked"] }, { kind: "component", type: CardComponent, selector: "hm-card", inputs: ["heading", "icon", "selected", "fill", "media", "mediaAlt", "mediaDecorative", "mediaPosition"] }, { kind: "component", type: ComboboxComponent, selector: "hm-combobox", inputs: ["label", "options", "value", "placeholder", "icon", "hint", "help", "size", "labelHidden", "clearable", "requiredManual", "loading", "allowCustomValue"], outputs: ["valueChange"] }, { kind: "component", type: CopyButtonComponent, selector: "hm-copy-button", inputs: ["value", "label", "copiedLabel", "variant", "size", "disabled", "feedbackDuration"], outputs: ["copied", "copyFailed"] }, { kind: "component", type: ModalComponent, selector: "hm-modal", inputs: ["open", "heading", "size", "closeLabel", "closable", "beforeClose"], outputs: ["openChange", "closed"] }, { kind: "component", type: TabsComponent, selector: "hm-tabs", inputs: ["label", "active", "orientation", "mode", "overflow", "fillHeight", "noPanelGap"], outputs: ["activeChange"] }, { kind: "component", type: TabComponent, selector: "hm-tab", inputs: ["id", "label", "disabled", "count", "route", "exact", "destroyOnHide"] }, { kind: "directive", type: TabContentDirective, selector: "ng-template[hmTabContent]" }, { kind: "component", type: TagComponent, selector: "hm-tag", inputs: ["name", "color", "compact"] }, { kind: "component", type: AutoServiceAppsModalComponent, selector: "spine-auto-service-apps-modal", inputs: ["app", "clientId", "open"], outputs: ["openChange", "saved"] }, { kind: "component", type: AutoServiceAppOperationsComponent, selector: "spine-auto-service-app-operations", inputs: ["clientId", "appId"] }, { kind: "component", type: AutoServiceAppAccessComponent, selector: "spine-auto-service-app-access", inputs: ["clientId", "appId"] }, { kind: "component", type: AutoServiceAppTokensComponent, selector: "spine-auto-service-app-tokens", inputs: ["clientId", "appId"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
913
1052
|
}
|
|
914
1053
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceAppsComponent, decorators: [{
|
|
915
1054
|
type: Component,
|
|
916
1055
|
args: [{ selector: 'spine-auto-service-apps', standalone: true, imports: [
|
|
917
|
-
CommonModule, AlertComponent, ButtonComponent, CardComponent, CopyButtonComponent,
|
|
918
|
-
ModalComponent, TabsComponent, TabComponent, TabContentDirective, TagComponent,
|
|
1056
|
+
CommonModule, AlertComponent, ButtonComponent, CardComponent, ComboboxComponent, CopyButtonComponent, ModalComponent, TabsComponent, TabComponent, TabContentDirective, TagComponent,
|
|
919
1057
|
AutoServiceAppsModalComponent, AutoServiceAppOperationsComponent, AutoServiceAppAccessComponent, AutoServiceAppTokensComponent,
|
|
920
|
-
], changeDetection: ChangeDetectionStrategy.Eager, template: "<div class=\"as-stack\">\n <hm-alert *ngIf=\"newSecret\" variant=\"success\" [closable]=\"true\" (closed)=\"newSecret = null\">\n {{ text.secretCreated }} <strong>{{ newSecret }}</strong>\n </hm-alert>\n\n <!--
|
|
1058
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "<div class=\"as-stack\">\n <div class=\"as-actions\">\n <hm-button icon=\"plus\" (clicked)=\"openCreate()\">{{ text.register }}</hm-button>\n </div>\n\n <hm-alert *ngIf=\"newSecret\" variant=\"success\" [closable]=\"true\" (closed)=\"newSecret = null\">\n {{ text.secretCreated }} <strong>{{ newSecret }}</strong>\n </hm-alert>\n\n <!-- Escolher a aplica\u00E7\u00E3o no seletor e Consultar abre o resumo (com as a\u00E7\u00F5es) e as abas embaixo. -->\n <hm-card>\n <div class=\"as-field-row\">\n <hm-combobox [label]=\"text.pickApp\" [options]=\"appComboOptions\" [value]=\"selectedAppId\"\n (valueChange)=\"selectedAppId = $event\" [disabled]=\"loading\">\n </hm-combobox>\n <hm-button [disabled]=\"!selectedAppId\" (clicked)=\"searchApp()\" icon=\"search\">{{ text.search }}</hm-button>\n </div>\n <p class=\"as-empty muted\" *ngIf=\"!loading && apps.length === 0\">{{ text.noApps }}</p>\n </hm-card>\n\n <ng-container *ngIf=\"app as a\">\n <hm-card>\n <div class=\"as-summary\">\n <div class=\"as-summary__info\">\n <p class=\"as-summary__title app-title\">\n {{ a.name }}\n <hm-tag [name]=\"a.enabled ? text.active : text.inactive\" [color]=\"a.enabled ? 'success' : 'danger'\" />\n </p>\n <p class=\"as-summary__detail\">{{ a.allowed_grants?.join(', ') }}</p>\n </div>\n <div class=\"as-actions\">\n <hm-button emphasis=\"medium\" icon=\"pencil\" (clicked)=\"openEdit(a)\">{{ text.edit }}</hm-button>\n <hm-button emphasis=\"medium\" (clicked)=\"toggleEnabled(a)\">{{ a.enabled ? text.disable : text.enable }}</hm-button>\n <hm-button emphasis=\"medium\" icon=\"key\" [loading]=\"rotatingSecret\" (clicked)=\"rotateSecret(a)\">{{ text.rotateSecret }}</hm-button>\n <hm-button intent=\"danger\" emphasis=\"medium\" icon=\"trash\" (clicked)=\"deleteApp(a)\">{{ text.delete }}</hm-button>\n </div>\n </div>\n </hm-card>\n\n <!-- Conte\u00FAdo de cada aba \u00E9 pregui\u00E7oso (*hmTabContent): s\u00F3 busca na API quando a aba \u00E9 aberta. -->\n <hm-tabs [label]=\"text.appSections\" [active]=\"activeTab\" (activeChange)=\"setTab($any($event))\">\n <hm-tab id=\"operations\" [label]=\"text.tabOperations\">\n <spine-auto-service-app-operations *hmTabContent [clientId]=\"clientId\" [appId]=\"a.id\"></spine-auto-service-app-operations>\n </hm-tab>\n <hm-tab id=\"access\" [label]=\"text.tabAccesses\">\n <spine-auto-service-app-access *hmTabContent [clientId]=\"clientId\" [appId]=\"a.id\"></spine-auto-service-app-access>\n </hm-tab>\n <hm-tab id=\"tokens\" [label]=\"text.tabTokens\">\n <spine-auto-service-app-tokens *hmTabContent [clientId]=\"clientId\" [appId]=\"a.id\"></spine-auto-service-app-tokens>\n </hm-tab>\n </hm-tabs>\n </ng-container>\n</div>\n\n<!-- Segredo novo (\"Gerar novo segredo\"): aparece uma vez; fechar (Concluir, Esc ou \u2715) o descarta. -->\n<hm-modal\n [open]=\"!!rotatedSecret\"\n (openChange)=\"$event || closeRotatedSecret()\"\n [heading]=\"rotatedSecret ? rotatedSecretHeading(rotatedSecret.name) : ''\"\n (closed)=\"closeRotatedSecret()\">\n <div class=\"as-stack\" *ngIf=\"rotatedSecret as rotated\">\n <hm-alert variant=\"warning\" [heading]=\"text.rotatedSecretWarning\">{{ text.rotatedSecretNote }}</hm-alert>\n <div class=\"as-secret\">\n <span class=\"as-secret__label\" id=\"as-rotated-secret-label\">{{ rotatedSecretLabel(rotated.name) }}</span>\n <div class=\"as-secret__row\">\n <code class=\"as-secret__value\" aria-labelledby=\"as-rotated-secret-label\">{{ rotated.secret }}</code>\n <hm-copy-button variant=\"text\" [value]=\"rotated.secret\" [label]=\"text.copySecret\" [copiedLabel]=\"text.secretCopied\" />\n </div>\n </div>\n </div>\n <ng-container footer>\n <hm-button (clicked)=\"closeRotatedSecret()\">{{ text.rotatedSecretDone }}</hm-button>\n </ng-container>\n</hm-modal>\n\n<spine-auto-service-apps-modal\n [app]=\"modalApp\"\n [clientId]=\"clientId\"\n [open]=\"showAppModal\"\n (openChange)=\"showAppModal = $event\"\n (saved)=\"onAppSaved($event)\">\n</spine-auto-service-apps-modal>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row>hm-combobox{flex:1 1 16rem;min-inline-size:0}.as-summary{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-sm)}.as-summary__info{display:flex;flex:1 1 16rem;flex-direction:column;gap:var(--hm-space-micro);min-inline-size:0}.as-summary__title{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);margin:0;color:var(--hm-text);font-size:var(--hm-font-size-md);font-weight:var(--hm-font-weight-semibold)}.as-summary__detail{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.muted{color:var(--hm-muted)}.as-empty{margin:var(--hm-space-xs) 0 0;font-size:var(--hm-font-size-sm)}.as-secret{display:grid;gap:var(--hm-space-micro)}.as-secret__label{color:var(--hm-muted);font-size:var(--hm-font-size-xs)}.as-secret__row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.as-secret__value{flex:1 1 240px;min-width:0;border:var(--hm-border-hairline) solid var(--hm-divider);border-radius:var(--hm-radius-control);padding:var(--hm-space-xs) var(--hm-space-sm);background:var(--hm-surface);color:var(--hm-text);font-family:var(--hm-font-mono);font-size:var(--hm-font-size-sm);overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}:host{display:block}\n"] }]
|
|
921
1059
|
}], propDecorators: { clientId: [{
|
|
922
1060
|
type: Input
|
|
923
1061
|
}] } });
|
|
@@ -932,12 +1070,12 @@ class AutoServiceComponent {
|
|
|
932
1070
|
}
|
|
933
1071
|
onClientChange(c) { this.client = c; }
|
|
934
1072
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
935
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceComponent, isStandalone: true, selector: "spine-auto-service", ngImport: i0, template: "<!-- T\u00EDtulo e descri\u00E7\u00E3o da tela v\u00EAm da barra da p\u00E1gina (nome + description do router). -->\n<div class=\"as-stack\">\n <spine-auto-service-client-picker (clientChange)=\"onClientChange($event)\"></spine-auto-service-client-picker>\n <spine-auto-service-apps *ngIf=\"client as c\" [clientId]=\"c.id\"></spine-auto-service-apps>\n</div>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row
|
|
1073
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceComponent, isStandalone: true, selector: "spine-auto-service", ngImport: i0, template: "<!-- T\u00EDtulo e descri\u00E7\u00E3o da tela v\u00EAm da barra da p\u00E1gina (nome + description do router). -->\n<div class=\"as-stack\">\n <spine-auto-service-client-picker (clientChange)=\"onClientChange($event)\"></spine-auto-service-client-picker>\n <spine-auto-service-apps *ngIf=\"client as c\" [clientId]=\"c.id\"></spine-auto-service-apps>\n</div>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row>hm-combobox{flex:1 1 16rem;min-inline-size:0}.as-summary{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-sm)}.as-summary__info{display:flex;flex:1 1 16rem;flex-direction:column;gap:var(--hm-space-micro);min-inline-size:0}.as-summary__title{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);margin:0;color:var(--hm-text);font-size:var(--hm-font-size-md);font-weight:var(--hm-font-weight-semibold)}.as-summary__detail{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.muted{color:var(--hm-muted)}.as-empty{margin:var(--hm-space-xs) 0 0;font-size:var(--hm-font-size-sm)}.as-secret{display:grid;gap:var(--hm-space-micro)}.as-secret__label{color:var(--hm-muted);font-size:var(--hm-font-size-xs)}.as-secret__row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.as-secret__value{flex:1 1 240px;min-width:0;border:var(--hm-border-hairline) solid var(--hm-divider);border-radius:var(--hm-radius-control);padding:var(--hm-space-xs) var(--hm-space-sm);background:var(--hm-surface);color:var(--hm-text);font-family:var(--hm-font-mono);font-size:var(--hm-font-size-sm);overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AutoServiceClientPickerComponent, selector: "spine-auto-service-client-picker", outputs: ["clientChange"] }, { kind: "component", type: AutoServiceAppsComponent, selector: "spine-auto-service-apps", inputs: ["clientId"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
936
1074
|
}
|
|
937
1075
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceComponent, decorators: [{
|
|
938
1076
|
type: Component,
|
|
939
|
-
args: [{ selector: 'spine-auto-service', standalone: true, imports: [CommonModule, AutoServiceClientPickerComponent, AutoServiceAppsComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<!-- T\u00EDtulo e descri\u00E7\u00E3o da tela v\u00EAm da barra da p\u00E1gina (nome + description do router). -->\n<div class=\"as-stack\">\n <spine-auto-service-client-picker (clientChange)=\"onClientChange($event)\"></spine-auto-service-client-picker>\n <spine-auto-service-apps *ngIf=\"client as c\" [clientId]=\"c.id\"></spine-auto-service-apps>\n</div>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row
|
|
1077
|
+
args: [{ selector: 'spine-auto-service', standalone: true, imports: [CommonModule, AutoServiceClientPickerComponent, AutoServiceAppsComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<!-- T\u00EDtulo e descri\u00E7\u00E3o da tela v\u00EAm da barra da p\u00E1gina (nome + description do router). -->\n<div class=\"as-stack\">\n <spine-auto-service-client-picker (clientChange)=\"onClientChange($event)\"></spine-auto-service-client-picker>\n <spine-auto-service-apps *ngIf=\"client as c\" [clientId]=\"c.id\"></spine-auto-service-apps>\n</div>\n", styles: [".as-stack{display:flex;flex-direction:column;gap:var(--hm-space-md);min-inline-size:0}.as-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hm-space-xs)}.as-field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--hm-space-sm)}.as-field-row>hm-combobox{flex:1 1 16rem;min-inline-size:0}.as-summary{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-sm)}.as-summary__info{display:flex;flex:1 1 16rem;flex-direction:column;gap:var(--hm-space-micro);min-inline-size:0}.as-summary__title{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs);margin:0;color:var(--hm-text);font-size:var(--hm-font-size-md);font-weight:var(--hm-font-weight-semibold)}.as-summary__detail{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.muted{color:var(--hm-muted)}.as-empty{margin:var(--hm-space-xs) 0 0;font-size:var(--hm-font-size-sm)}.as-secret{display:grid;gap:var(--hm-space-micro)}.as-secret__label{color:var(--hm-muted);font-size:var(--hm-font-size-xs)}.as-secret__row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.as-secret__value{flex:1 1 240px;min-width:0;border:var(--hm-border-hairline) solid var(--hm-divider);border-radius:var(--hm-radius-control);padding:var(--hm-space-xs) var(--hm-space-sm);background:var(--hm-surface);color:var(--hm-text);font-family:var(--hm-font-mono);font-size:var(--hm-font-size-sm);overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}\n"] }]
|
|
940
1078
|
}] });
|
|
941
1079
|
|
|
942
1080
|
export { AutoServiceComponent };
|
|
943
|
-
//# sourceMappingURL=trismegisto-spine-auto-service-auto-service.component-
|
|
1081
|
+
//# sourceMappingURL=trismegisto-spine-auto-service-auto-service.component-DAXv__zg.mjs.map
|