@trismegisto/spine 3.0.4 → 3.1.0

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.
Files changed (32) hide show
  1. package/README.md +36 -0
  2. package/fesm2022/{trismegisto-spine-auto-service-apps.usage-DeLfYMeO.mjs → trismegisto-spine-auto-service-apps.usage-po9Ds_SU.mjs} +21 -22
  3. package/fesm2022/trismegisto-spine-auto-service-apps.usage-po9Ds_SU.mjs.map +1 -0
  4. package/fesm2022/{trismegisto-spine-auto-service-auto-service-audit.component-BNtNWfiu.mjs → trismegisto-spine-auto-service-auto-service-audit.component-tfGcVR3i.mjs} +2 -2
  5. package/fesm2022/{trismegisto-spine-auto-service-auto-service-audit.component-BNtNWfiu.mjs.map → trismegisto-spine-auto-service-auto-service-audit.component-tfGcVR3i.mjs.map} +1 -1
  6. package/fesm2022/trismegisto-spine-auto-service-auto-service-client-picker.component-Cl7ahisu.mjs +65 -0
  7. package/fesm2022/trismegisto-spine-auto-service-auto-service-client-picker.component-Cl7ahisu.mjs.map +1 -0
  8. package/fesm2022/{trismegisto-spine-auto-service-auto-service-client.component-wu2tFGS7.mjs → trismegisto-spine-auto-service-auto-service-client.component-DzmlpLPu.mjs} +136 -87
  9. package/fesm2022/trismegisto-spine-auto-service-auto-service-client.component-DzmlpLPu.mjs.map +1 -0
  10. package/fesm2022/{trismegisto-spine-auto-service-auto-service-groups.component-DHhbEiL4.mjs → trismegisto-spine-auto-service-auto-service-groups.component-2xCG_wS9.mjs} +2 -2
  11. package/fesm2022/{trismegisto-spine-auto-service-auto-service-groups.component-DHhbEiL4.mjs.map → trismegisto-spine-auto-service-auto-service-groups.component-2xCG_wS9.mjs.map} +1 -1
  12. package/fesm2022/{trismegisto-spine-auto-service-auto-service-login-attempts.component-B87vibNB.mjs → trismegisto-spine-auto-service-auto-service-login-attempts.component-CRvxfSWD.mjs} +2 -2
  13. package/fesm2022/{trismegisto-spine-auto-service-auto-service-login-attempts.component-B87vibNB.mjs.map → trismegisto-spine-auto-service-auto-service-login-attempts.component-CRvxfSWD.mjs.map} +1 -1
  14. package/fesm2022/{trismegisto-spine-auto-service-auto-service.component-D-N-xXPN.mjs → trismegisto-spine-auto-service-auto-service.component-C4FBAefe.mjs} +89 -55
  15. package/fesm2022/trismegisto-spine-auto-service-auto-service.component-C4FBAefe.mjs.map +1 -0
  16. package/fesm2022/{trismegisto-spine-auto-service-client.usage-CcJANb20.mjs → trismegisto-spine-auto-service-client.usage-B16r3IHk.mjs} +16 -12
  17. package/fesm2022/trismegisto-spine-auto-service-client.usage-B16r3IHk.mjs.map +1 -0
  18. package/fesm2022/trismegisto-spine-auto-service.mjs +7 -7
  19. package/fesm2022/trismegisto-spine-graphql.mjs.map +1 -1
  20. package/fesm2022/trismegisto-spine.mjs +43 -5
  21. package/fesm2022/trismegisto-spine.mjs.map +1 -1
  22. package/package.json +6 -6
  23. package/types/trismegisto-spine-auto-service.d.ts.map +1 -1
  24. package/types/trismegisto-spine-graphql.d.ts +1 -1
  25. package/types/trismegisto-spine.d.ts +27 -3
  26. package/types/trismegisto-spine.d.ts.map +1 -1
  27. package/fesm2022/trismegisto-spine-auto-service-apps.usage-DeLfYMeO.mjs.map +0 -1
  28. package/fesm2022/trismegisto-spine-auto-service-auto-service-client-picker.component-DdtDk_xl.mjs +0 -51
  29. package/fesm2022/trismegisto-spine-auto-service-auto-service-client-picker.component-DdtDk_xl.mjs.map +0 -1
  30. package/fesm2022/trismegisto-spine-auto-service-auto-service-client.component-wu2tFGS7.mjs.map +0 -1
  31. package/fesm2022/trismegisto-spine-auto-service-auto-service.component-D-N-xXPN.mjs.map +0 -1
  32. package/fesm2022/trismegisto-spine-auto-service-client.usage-CcJANb20.mjs.map +0 -1
@@ -1,13 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ChangeDetectorRef, computed, Input, ChangeDetectionStrategy, Component, ElementRef, Injector, EventEmitter, afterNextRender, Output } from '@angular/core';
2
+ import { inject, ChangeDetectorRef, computed, Input, ChangeDetectionStrategy, Component, ElementRef, Injector, EventEmitter, afterNextRender, Output, signal } from '@angular/core';
3
3
  import * as i2 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import { ButtonComponent, CheckboxComponent, ComboboxComponent, IconComponent, InputComponent, TextareaComponent, ModalComponent, DataGridComponent, DataGridCellDirective, TagComponent, AlertComponent, IconButtonComponent, ReorderListComponent, ComboboxMultiComponent, DividerComponent, DrawerComponent, TabsComponent, TabComponent, TabContentDirective } from '@trismegisto/angular';
6
- import { A as AutoServiceClientPickerComponent } from './trismegisto-spine-auto-service-auto-service-client-picker.component-DdtDk_xl.mjs';
5
+ import { ButtonComponent, CheckboxComponent, ComboboxComponent, IconComponent, InputComponent, TextareaComponent, ModalComponent, DataGridComponent, DataGridCellDirective, TagComponent, CopyButtonComponent, AlertComponent, IconButtonComponent, ReorderListComponent, ComboboxMultiComponent, DividerComponent, DataGridActionBarComponent, DrawerComponent, TreeComponent, TabsComponent, TabComponent, TabContentDirective } from '@trismegisto/angular';
6
+ import { A as AutoServiceClientPickerComponent } from './trismegisto-spine-auto-service-auto-service-client-picker.component-Cl7ahisu.mjs';
7
7
  import * as i3 from '@angular/forms';
8
8
  import { FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
9
9
  import { HERMES_ICONS } from '@trismegisto/icons/catalog';
10
- import { formatMessage, pluralMessage, moveItem, formatMessageHtml } from '@trismegisto/primitives';
10
+ import { formatMessage, pluralMessage, moveItem } from '@trismegisto/primitives';
11
11
  import { A as AutoServiceDeleteFeedback, a as autoServiceErrorText } from './trismegisto-spine-auto-service-auto-service-delete-CV_t9vxm.mjs';
12
12
  import { SPINE_MESSAGES } from '@trismegisto/spine';
13
13
  import { o as optionalIdValidator, a as optionalIdBody } from './trismegisto-spine-auto-service-optional-id.validator-0JPeqhjm.mjs';
@@ -69,6 +69,7 @@ class AutoServiceRoutesComponent {
69
69
  key: 'excludable', title: this.text.colExcludable, sortable: true,
70
70
  value: (r) => (r.excludable ? this.text.excludableYes : this.text.excludableNo),
71
71
  },
72
+ { key: 'id', title: this.text.colId, value: (r) => r.id },
72
73
  ], ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
73
74
  // Rota de template não se edita nem se exclui aqui (403 no admin-server); excluir, além disso, só em rota
74
75
  // excluível (409). Linha sem ação nenhuma fica sem o kebab.
@@ -81,6 +82,10 @@ class AutoServiceRoutesComponent {
81
82
  },
82
83
  ], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
83
84
  }
85
+ /** Nome acessível do botão de copiar: diz de qual rota é o id. */
86
+ copyIdLabel(r) {
87
+ return formatMessage(this.text.copyRouteId, { name: r.display_name || r.name });
88
+ }
84
89
  ngOnChanges(changes) { if (changes['clientId'])
85
90
  this.load(); }
86
91
  async load() {
@@ -162,14 +167,14 @@ class AutoServiceRoutesComponent {
162
167
  void this.deleteRoute(e.row);
163
168
  }
164
169
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceRoutesComponent, deps: [{ token: AutoServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
165
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: AutoServiceRoutesComponent, isStandalone: true, selector: "spine-auto-service-routes", inputs: { clientId: "clientId" }, usesOnChanges: true, ngImport: i0, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"routes\"\n [rowId]=\"rowId\"\n [caption]=\"text.routesCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noRoutes\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreateRoute()\">{{ text.newRoute }}</hm-button>\n <ng-template hmCell=\"name\" let-r>\n <span class=\"name-cell\">\n {{ r.name }}\n <hm-tag *ngIf=\"r.templated\" [name]=\"text.templateTag\" color=\"info\" [title]=\"text.templateLocked\" />\n </span>\n </ng-template>\n <ng-template hmCell=\"icon\" let-r>\n <span class=\"icon-cell\">\n <hm-icon *ngIf=\"r.icon\" [shape]=\"r.icon\"></hm-icon>\n {{ r.icon || '\u2014' }}\n </span>\n </ng-template>\n <ng-template hmCell=\"path\" let-r>\n <code *ngIf=\"r.path\">{{ r.path }}</code>\n <ng-container *ngIf=\"!r.path\">\u2014</ng-container>\n </ng-template>\n</hm-data-grid>\n\n<!-- Modal: criar/editar rota -->\n<hm-modal [open]=\"showRouteModal\" (openChange)=\"showRouteModal = $event\" [heading]=\"editingRouteId ? text.editRoute : text.newRoute\" (closed)=\"showRouteModal = false\">\n <div class=\"form-stack\">\n @if (!editingRouteId) {\n <hm-input [formControl]=\"newId\" [label]=\"text.optionalId\" [placeholder]=\"text.optionalIdPlaceholder\" [hint]=\"text.optionalIdHint\" [messages]=\"idMessages()\" />\n }\n <hm-input [formControl]=\"name\" [label]=\"text.internalName\" />\n <hm-input [formControl]=\"displayName\" [label]=\"text.displayName\" />\n <hm-combobox [options]=\"iconOptions\" [formControl]=\"icon\" [label]=\"text.icon\" [placeholder]=\"text.iconPlaceholder\" />\n <hm-input [formControl]=\"path\" [label]=\"text.path\" [placeholder]=\"text.pathPlaceholder\" [hint]=\"text.pathHint\" [messages]=\"pathMessages()\" />\n <hm-textarea [formControl]=\"info\" [label]=\"text.info\" />\n <hm-checkbox [formControl]=\"excludable\" [label]=\"text.excludable\" />\n <p *ngIf=\"excludableLocked\" class=\"field-note\">{{ text.excludableLocked }}</p>\n </div>\n\n <ng-container footer>\n <hm-button emphasis=\"medium\" (clicked)=\"showRouteModal = false\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!name.value || path.invalid || (!editingRouteId && newId.invalid)\" (clicked)=\"saveRoute()\">\n {{ editingRouteId ? text.save : text.create }}\n </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}:host{display:block}.form-stack{display:flex;flex-direction:column;gap:var(--hm-space-sm)}.field-note{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.name-cell{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.icon-cell{display:inline-flex;align-items:center;gap:var(--hm-space-micro)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: 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: ComboboxComponent, selector: "hm-combobox", inputs: ["label", "options", "value", "placeholder", "icon", "hint", "help", "size", "labelHidden", "clearable", "requiredManual", "loading", "allowCustomValue"], outputs: ["valueChange"] }, { kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { 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: TextareaComponent, selector: "hm-textarea", inputs: ["value", "label", "hint", "help", "placeholder", "maxLength", "rows", "autoGrow", "labelHidden", "loading", "maxRows", "submitKey"], outputs: ["valueChange", "submitted"] }, { kind: "component", type: ModalComponent, selector: "hm-modal", inputs: ["open", "heading", "size", "closeLabel", "closable", "beforeClose"], outputs: ["openChange", "closed"] }, { 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 }); }
170
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: AutoServiceRoutesComponent, isStandalone: true, selector: "spine-auto-service-routes", inputs: { clientId: "clientId" }, usesOnChanges: true, ngImport: i0, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"routes\"\n [rowId]=\"rowId\"\n [caption]=\"text.routesCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noRoutes\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreateRoute()\">{{ text.newRoute }}</hm-button>\n <ng-template hmCell=\"name\" let-r>\n <span class=\"name-cell\">\n {{ r.name }}\n <hm-tag *ngIf=\"r.templated\" [name]=\"text.templateTag\" color=\"info\" [title]=\"text.templateLocked\" />\n </span>\n </ng-template>\n <ng-template hmCell=\"icon\" let-r>\n <span class=\"icon-cell\">\n <hm-icon *ngIf=\"r.icon\" [shape]=\"r.icon\"></hm-icon>\n {{ r.icon || '\u2014' }}\n </span>\n </ng-template>\n <!-- UUID da rota: s\u00F3 o bot\u00E3o de copiar (para criar a mesma rota com o mesmo id no outro ambiente). -->\n <ng-template hmCell=\"id\" let-r>\n <hm-copy-button [value]=\"r.id\" [label]=\"copyIdLabel(r)\" [copiedLabel]=\"text.idCopied\" />\n </ng-template>\n</hm-data-grid>\n\n<!-- Modal: criar/editar rota -->\n<hm-modal [open]=\"showRouteModal\" (openChange)=\"showRouteModal = $event\" [heading]=\"editingRouteId ? text.editRoute : text.newRoute\" (closed)=\"showRouteModal = false\">\n <div class=\"form-stack\">\n @if (!editingRouteId) {\n <hm-input [formControl]=\"newId\" [label]=\"text.optionalId\" [placeholder]=\"text.optionalIdPlaceholder\" [hint]=\"text.optionalIdHint\" [messages]=\"idMessages()\" />\n }\n <hm-input [formControl]=\"name\" [label]=\"text.internalName\" />\n <hm-input [formControl]=\"displayName\" [label]=\"text.displayName\" />\n <hm-combobox [options]=\"iconOptions\" [formControl]=\"icon\" [label]=\"text.icon\" [placeholder]=\"text.iconPlaceholder\" />\n <hm-input [formControl]=\"path\" [label]=\"text.path\" [placeholder]=\"text.pathPlaceholder\" [hint]=\"text.pathHint\" [messages]=\"pathMessages()\" />\n <hm-textarea [formControl]=\"info\" [label]=\"text.info\" />\n <hm-checkbox [formControl]=\"excludable\" [label]=\"text.excludable\" />\n <p *ngIf=\"excludableLocked\" class=\"field-note\">{{ text.excludableLocked }}</p>\n </div>\n\n <ng-container footer>\n <hm-button emphasis=\"medium\" (clicked)=\"showRouteModal = false\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!name.value || path.invalid || (!editingRouteId && newId.invalid)\" (clicked)=\"saveRoute()\">\n {{ editingRouteId ? text.save : text.create }}\n </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}:host{display:block}.form-stack{display:flex;flex-direction:column;gap:var(--hm-space-sm)}.field-note{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.name-cell{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.icon-cell{display:inline-flex;align-items:center;gap:var(--hm-space-micro)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: 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: ComboboxComponent, selector: "hm-combobox", inputs: ["label", "options", "value", "placeholder", "icon", "hint", "help", "size", "labelHidden", "clearable", "requiredManual", "loading", "allowCustomValue"], outputs: ["valueChange"] }, { kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { 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: TextareaComponent, selector: "hm-textarea", inputs: ["value", "label", "hint", "help", "placeholder", "maxLength", "rows", "autoGrow", "labelHidden", "loading", "maxRows", "submitKey"], outputs: ["valueChange", "submitted"] }, { kind: "component", type: ModalComponent, selector: "hm-modal", inputs: ["open", "heading", "size", "closeLabel", "closable", "beforeClose"], outputs: ["openChange", "closed"] }, { 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: CopyButtonComponent, selector: "hm-copy-button", inputs: ["value", "label", "copiedLabel", "variant", "size", "disabled", "feedbackDuration"], outputs: ["copied", "copyFailed"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
166
171
  }
167
172
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceRoutesComponent, decorators: [{
168
173
  type: Component,
169
174
  args: [{ selector: 'spine-auto-service-routes', standalone: true, imports: [
170
175
  CommonModule, ReactiveFormsModule, ButtonComponent, CheckboxComponent, ComboboxComponent, IconComponent, InputComponent,
171
- TextareaComponent, ModalComponent, DataGridComponent, DataGridCellDirective, TagComponent,
172
- ], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"routes\"\n [rowId]=\"rowId\"\n [caption]=\"text.routesCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noRoutes\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreateRoute()\">{{ text.newRoute }}</hm-button>\n <ng-template hmCell=\"name\" let-r>\n <span class=\"name-cell\">\n {{ r.name }}\n <hm-tag *ngIf=\"r.templated\" [name]=\"text.templateTag\" color=\"info\" [title]=\"text.templateLocked\" />\n </span>\n </ng-template>\n <ng-template hmCell=\"icon\" let-r>\n <span class=\"icon-cell\">\n <hm-icon *ngIf=\"r.icon\" [shape]=\"r.icon\"></hm-icon>\n {{ r.icon || '\u2014' }}\n </span>\n </ng-template>\n <ng-template hmCell=\"path\" let-r>\n <code *ngIf=\"r.path\">{{ r.path }}</code>\n <ng-container *ngIf=\"!r.path\">\u2014</ng-container>\n </ng-template>\n</hm-data-grid>\n\n<!-- Modal: criar/editar rota -->\n<hm-modal [open]=\"showRouteModal\" (openChange)=\"showRouteModal = $event\" [heading]=\"editingRouteId ? text.editRoute : text.newRoute\" (closed)=\"showRouteModal = false\">\n <div class=\"form-stack\">\n @if (!editingRouteId) {\n <hm-input [formControl]=\"newId\" [label]=\"text.optionalId\" [placeholder]=\"text.optionalIdPlaceholder\" [hint]=\"text.optionalIdHint\" [messages]=\"idMessages()\" />\n }\n <hm-input [formControl]=\"name\" [label]=\"text.internalName\" />\n <hm-input [formControl]=\"displayName\" [label]=\"text.displayName\" />\n <hm-combobox [options]=\"iconOptions\" [formControl]=\"icon\" [label]=\"text.icon\" [placeholder]=\"text.iconPlaceholder\" />\n <hm-input [formControl]=\"path\" [label]=\"text.path\" [placeholder]=\"text.pathPlaceholder\" [hint]=\"text.pathHint\" [messages]=\"pathMessages()\" />\n <hm-textarea [formControl]=\"info\" [label]=\"text.info\" />\n <hm-checkbox [formControl]=\"excludable\" [label]=\"text.excludable\" />\n <p *ngIf=\"excludableLocked\" class=\"field-note\">{{ text.excludableLocked }}</p>\n </div>\n\n <ng-container footer>\n <hm-button emphasis=\"medium\" (clicked)=\"showRouteModal = false\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!name.value || path.invalid || (!editingRouteId && newId.invalid)\" (clicked)=\"saveRoute()\">\n {{ editingRouteId ? text.save : text.create }}\n </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}:host{display:block}.form-stack{display:flex;flex-direction:column;gap:var(--hm-space-sm)}.field-note{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.name-cell{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.icon-cell{display:inline-flex;align-items:center;gap:var(--hm-space-micro)}\n"] }]
176
+ TextareaComponent, ModalComponent, DataGridComponent, DataGridCellDirective, TagComponent, CopyButtonComponent,
177
+ ], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"routes\"\n [rowId]=\"rowId\"\n [caption]=\"text.routesCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noRoutes\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreateRoute()\">{{ text.newRoute }}</hm-button>\n <ng-template hmCell=\"name\" let-r>\n <span class=\"name-cell\">\n {{ r.name }}\n <hm-tag *ngIf=\"r.templated\" [name]=\"text.templateTag\" color=\"info\" [title]=\"text.templateLocked\" />\n </span>\n </ng-template>\n <ng-template hmCell=\"icon\" let-r>\n <span class=\"icon-cell\">\n <hm-icon *ngIf=\"r.icon\" [shape]=\"r.icon\"></hm-icon>\n {{ r.icon || '\u2014' }}\n </span>\n </ng-template>\n <!-- UUID da rota: s\u00F3 o bot\u00E3o de copiar (para criar a mesma rota com o mesmo id no outro ambiente). -->\n <ng-template hmCell=\"id\" let-r>\n <hm-copy-button [value]=\"r.id\" [label]=\"copyIdLabel(r)\" [copiedLabel]=\"text.idCopied\" />\n </ng-template>\n</hm-data-grid>\n\n<!-- Modal: criar/editar rota -->\n<hm-modal [open]=\"showRouteModal\" (openChange)=\"showRouteModal = $event\" [heading]=\"editingRouteId ? text.editRoute : text.newRoute\" (closed)=\"showRouteModal = false\">\n <div class=\"form-stack\">\n @if (!editingRouteId) {\n <hm-input [formControl]=\"newId\" [label]=\"text.optionalId\" [placeholder]=\"text.optionalIdPlaceholder\" [hint]=\"text.optionalIdHint\" [messages]=\"idMessages()\" />\n }\n <hm-input [formControl]=\"name\" [label]=\"text.internalName\" />\n <hm-input [formControl]=\"displayName\" [label]=\"text.displayName\" />\n <hm-combobox [options]=\"iconOptions\" [formControl]=\"icon\" [label]=\"text.icon\" [placeholder]=\"text.iconPlaceholder\" />\n <hm-input [formControl]=\"path\" [label]=\"text.path\" [placeholder]=\"text.pathPlaceholder\" [hint]=\"text.pathHint\" [messages]=\"pathMessages()\" />\n <hm-textarea [formControl]=\"info\" [label]=\"text.info\" />\n <hm-checkbox [formControl]=\"excludable\" [label]=\"text.excludable\" />\n <p *ngIf=\"excludableLocked\" class=\"field-note\">{{ text.excludableLocked }}</p>\n </div>\n\n <ng-container footer>\n <hm-button emphasis=\"medium\" (clicked)=\"showRouteModal = false\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!name.value || path.invalid || (!editingRouteId && newId.invalid)\" (clicked)=\"saveRoute()\">\n {{ editingRouteId ? text.save : text.create }}\n </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}:host{display:block}.form-stack{display:flex;flex-direction:column;gap:var(--hm-space-sm)}.field-note{margin:0;color:var(--hm-muted);font-size:var(--hm-font-size-sm)}.name-cell{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.icon-cell{display:inline-flex;align-items:center;gap:var(--hm-space-micro)}\n"] }]
173
178
  }], ctorParameters: () => [{ type: AutoServiceService }], propDecorators: { clientId: [{
174
179
  type: Input
175
180
  }] } });
@@ -388,6 +393,7 @@ class AutoServiceRoutersComponent {
388
393
  { key: 'description', title: this.text.colDescription, value: (r) => r.description ?? '' },
389
394
  { key: 'is_private', title: this.text.colVisibility, value: (r) => (r.is_private ? this.text.private : this.text.public), sortable: true },
390
395
  { key: 'allowed_type_ids', title: this.text.colAllowedBadges, value: (r) => this.allowedTypeNames(r.allowed_type_ids).join(', ') || this.text.anyBadge },
396
+ { key: 'id', title: this.text.colId, value: (r) => r.id },
391
397
  ], ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
392
398
  // Router de template não se edita nem se exclui aqui (403 no admin-server): a linha fica sem o kebab.
393
399
  this.rowActions = computed(() => [
@@ -401,6 +407,10 @@ class AutoServiceRoutersComponent {
401
407
  /** Níveis da hierarquia, de cima para baixo (a página é a folha e fica fora: sempre obrigatória). */
402
408
  this.hierarchyLevels = HIERARCHY_LEVELS;
403
409
  }
410
+ /** Nome acessível do botão de copiar: diz de qual roteador é o id (o caminho montado identifica a tela). */
411
+ copyIdLabel(r) {
412
+ return formatMessage(this.text.copyRouterId, { name: r.built_path || this.routeName(r.page_id) });
413
+ }
404
414
  get routeOptions() {
405
415
  return this.routes.map((r) => ({ value: r.id, label: r.display_name || r.name }));
406
416
  }
@@ -545,14 +555,15 @@ class AutoServiceRoutersComponent {
545
555
  void this.deleteRouter(e.row.id);
546
556
  }
547
557
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceRoutersComponent, deps: [{ token: AutoServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
548
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: AutoServiceRoutersComponent, isStandalone: true, selector: "spine-auto-service-routers", inputs: { clientId: "clientId" }, usesOnChanges: true, ngImport: i0, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"routers\"\n [rowId]=\"rowId\"\n [caption]=\"text.routersCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noRouters\"\n>\n <hm-button dataGridActions emphasis=\"medium\" icon=\"sort-vertical\" [disabled]=\"!routers.length\" (clicked)=\"showReorder = true\">{{ text.reorder }}</hm-button>\n <hm-button dataGridActions icon=\"plus\" [disabled]=\"!routes.length\" (clicked)=\"openCreateRouter()\">{{ text.newRouter }}</hm-button>\n <ng-template hmCell=\"page\" let-r>\n <span class=\"name-cell\">\n {{ routeName(r.page_id) }}\n <hm-tag *ngIf=\"r.templated\" [name]=\"text.templateTag\" color=\"info\" [title]=\"text.templateLocked\" />\n </span>\n </ng-template>\n <ng-template hmCell=\"is_private\" let-r>\n <hm-tag [name]=\"r.is_private ? text.private : text.public\" [color]=\"r.is_private ? 'warning' : 'success'\" />\n </ng-template>\n <ng-template hmCell=\"allowed_type_ids\" let-r>\n <span *ngIf=\"!r.allowed_type_ids?.length; else badges\" class=\"muted\">{{ text.anyBadge }}</span>\n <ng-template #badges>\n <span class=\"name-cell\">\n <hm-tag *ngFor=\"let name of allowedTypeNames(r.allowed_type_ids)\" [name]=\"name\" color=\"info\" />\n </span>\n </ng-template>\n </ng-template>\n <ng-template hmCell=\"built_path\" let-r>\n <code>{{ r.built_path }}</code>\n </ng-template>\n</hm-data-grid>\n\n<!-- Modal: ordem dos itens no menu do app (vale tamb\u00E9m para roteadores de template) -->\n<spine-auto-service-routers-reorder [clientId]=\"clientId\" [open]=\"showReorder\" (openChange)=\"showReorder = $event\" (saved)=\"load()\" />\n\n<!-- Modal: criar/editar roteador -->\n<hm-modal [open]=\"showRouterModal\" (openChange)=\"showRouterModal = $event\" [heading]=\"editingRouterId ? text.editRouter : text.newRouter\" size=\"large\" (closed)=\"showRouterModal = false\">\n <div class=\"form-stack\">\n <hm-alert *ngIf=\"routerError\" variant=\"error\">{{ routerError }}</hm-alert>\n @if (!editingRouterId) {\n <hm-input [formControl]=\"newId\" [label]=\"text.optionalId\" [placeholder]=\"text.optionalIdPlaceholder\" [hint]=\"text.optionalIdHint\" [messages]=\"idMessages()\" />\n }\n <hm-combobox [label]=\"text.page\" [options]=\"routeOptions\" [value]=\"routerForm.page_id\" (valueChange)=\"routerForm.page_id = $event\"></hm-combobox>\n <hm-textarea [label]=\"text.routerDescription\" [rows]=\"2\" [hint]=\"text.routerDescriptionHint\" [(ngModel)]=\"routerForm.description\" />\n\n <hm-divider [label]=\"text.hierarchy\" />\n <p class=\"hierarchy-hint muted\">{{ text.hierarchyHint }}</p>\n\n <!-- De cima para baixo: cada n\u00EDvel s\u00F3 abre com o de cima escolhido; limpar um n\u00EDvel limpa os de baixo. -->\n <hm-combobox *ngFor=\"let level of hierarchyLevels\" [label]=\"levelLabel(level)\" [options]=\"routeOptions\" [clearable]=\"true\"\n [disabled]=\"levelLocked(level)\" [value]=\"routerForm[level]\" (valueChange)=\"setLevel(level, $event)\"></hm-combobox>\n <hm-alert *ngIf=\"hierarchyGap\" variant=\"warning\">{{ text.routerErrors.hierarchyGap }}</hm-alert>\n\n <hm-divider />\n <hm-checkbox [(ngModel)]=\"routerForm.is_private\" [label]=\"text.privateHint\" />\n <!-- Vazio = qualquer crach\u00E1 (mesma regra do modal de roteador do argos-admin). -->\n <hm-combobox-multi [label]=\"text.colAllowedBadges\" [options]=\"groupTypeOptions\" [placeholder]=\"text.anyBadge\"\n [hint]=\"text.allowedBadgesHint\" [visibleChipsLimit]=\"null\" [selected]=\"routerForm.allowed_type_ids\"\n (selectedChange)=\"routerForm.allowed_type_ids = [...$event]; routerError = null\" />\n </div>\n\n <ng-container footer>\n <hm-button emphasis=\"medium\" (clicked)=\"showRouterModal = false\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!routerForm.page_id || hierarchyGap || (!editingRouterId && newId.invalid)\" [loading]=\"savingRouter\" (clicked)=\"saveRouter()\">\n {{ editingRouterId ? text.save : text.create }}\n </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}:host{display:block}.name-cell{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.form-stack{display:flex;flex-direction:column;gap:var(--hm-space-sm)}.hierarchy-hint{margin:0;font-size:var(--hm-font-size-sm)}\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: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: ComboboxComponent, selector: "hm-combobox", inputs: ["label", "options", "value", "placeholder", "icon", "hint", "help", "size", "labelHidden", "clearable", "requiredManual", "loading", "allowCustomValue"], outputs: ["valueChange"] }, { kind: "component", type: ComboboxMultiComponent, selector: "hm-combobox-multi", inputs: ["label", "options", "selected", "extraOptions", "unknownLabel", "placeholder", "hint", "help", "max", "visibleChipsLimit"], outputs: ["selectedChange"] }, { kind: "component", type: DividerComponent, selector: "hm-divider", inputs: ["orientation", "label", "labelAlign", "emphasis", "thickness", "spacing", "decorative"] }, { 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: 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: TextareaComponent, selector: "hm-textarea", inputs: ["value", "label", "hint", "help", "placeholder", "maxLength", "rows", "autoGrow", "labelHidden", "loading", "maxRows", "submitKey"], outputs: ["valueChange", "submitted"] }, { kind: "component", type: AutoServiceRoutersReorderComponent, selector: "spine-auto-service-routers-reorder", inputs: ["clientId", "open"], outputs: ["openChange", "saved"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
558
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: AutoServiceRoutersComponent, isStandalone: true, selector: "spine-auto-service-routers", inputs: { clientId: "clientId" }, usesOnChanges: true, ngImport: i0, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"routers\"\n [rowId]=\"rowId\"\n [caption]=\"text.routersCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noRouters\"\n>\n <hm-button dataGridActions emphasis=\"medium\" icon=\"sort-vertical\" [disabled]=\"!routers.length\" (clicked)=\"showReorder = true\">{{ text.reorder }}</hm-button>\n <hm-button dataGridActions icon=\"plus\" [disabled]=\"!routes.length\" (clicked)=\"openCreateRouter()\">{{ text.newRouter }}</hm-button>\n <ng-template hmCell=\"page\" let-r>\n <span class=\"name-cell\">\n {{ routeName(r.page_id) }}\n <hm-tag *ngIf=\"r.templated\" [name]=\"text.templateTag\" color=\"info\" [title]=\"text.templateLocked\" />\n </span>\n </ng-template>\n <ng-template hmCell=\"is_private\" let-r>\n <hm-tag [name]=\"r.is_private ? text.private : text.public\" [color]=\"r.is_private ? 'warning' : 'success'\" />\n </ng-template>\n <ng-template hmCell=\"allowed_type_ids\" let-r>\n <span *ngIf=\"!r.allowed_type_ids?.length; else badges\" class=\"muted\">{{ text.anyBadge }}</span>\n <ng-template #badges>\n <span class=\"name-cell\">\n <hm-tag *ngFor=\"let name of allowedTypeNames(r.allowed_type_ids)\" [name]=\"name\" color=\"info\" />\n </span>\n </ng-template>\n </ng-template>\n <ng-template hmCell=\"built_path\" let-r>\n <code>{{ r.built_path }}</code>\n </ng-template>\n <!-- UUID do roteador: s\u00F3 o bot\u00E3o de copiar (para criar o mesmo roteador com o mesmo id no outro ambiente). -->\n <ng-template hmCell=\"id\" let-r>\n <hm-copy-button [value]=\"r.id\" [label]=\"copyIdLabel(r)\" [copiedLabel]=\"text.idCopied\" />\n </ng-template>\n</hm-data-grid>\n\n<!-- Modal: ordem dos itens no menu do app (vale tamb\u00E9m para roteadores de template) -->\n<spine-auto-service-routers-reorder [clientId]=\"clientId\" [open]=\"showReorder\" (openChange)=\"showReorder = $event\" (saved)=\"load()\" />\n\n<!-- Modal: criar/editar roteador -->\n<hm-modal [open]=\"showRouterModal\" (openChange)=\"showRouterModal = $event\" [heading]=\"editingRouterId ? text.editRouter : text.newRouter\" size=\"large\" (closed)=\"showRouterModal = false\">\n <div class=\"form-stack\">\n <hm-alert *ngIf=\"routerError\" variant=\"error\">{{ routerError }}</hm-alert>\n @if (!editingRouterId) {\n <hm-input [formControl]=\"newId\" [label]=\"text.optionalId\" [placeholder]=\"text.optionalIdPlaceholder\" [hint]=\"text.optionalIdHint\" [messages]=\"idMessages()\" />\n }\n <hm-combobox [label]=\"text.page\" [options]=\"routeOptions\" [value]=\"routerForm.page_id\" (valueChange)=\"routerForm.page_id = $event\"></hm-combobox>\n <hm-textarea [label]=\"text.routerDescription\" [rows]=\"2\" [hint]=\"text.routerDescriptionHint\" [(ngModel)]=\"routerForm.description\" />\n\n <hm-divider [label]=\"text.hierarchy\" />\n <p class=\"hierarchy-hint muted\">{{ text.hierarchyHint }}</p>\n\n <!-- De cima para baixo: cada n\u00EDvel s\u00F3 abre com o de cima escolhido; limpar um n\u00EDvel limpa os de baixo. -->\n <hm-combobox *ngFor=\"let level of hierarchyLevels\" [label]=\"levelLabel(level)\" [options]=\"routeOptions\" [clearable]=\"true\"\n [disabled]=\"levelLocked(level)\" [value]=\"routerForm[level]\" (valueChange)=\"setLevel(level, $event)\"></hm-combobox>\n <hm-alert *ngIf=\"hierarchyGap\" variant=\"warning\">{{ text.routerErrors.hierarchyGap }}</hm-alert>\n\n <hm-divider />\n <hm-checkbox [(ngModel)]=\"routerForm.is_private\" [label]=\"text.privateHint\" />\n <!-- Vazio = qualquer crach\u00E1 (mesma regra do modal de roteador do argos-admin). -->\n <hm-combobox-multi [label]=\"text.colAllowedBadges\" [options]=\"groupTypeOptions\" [placeholder]=\"text.anyBadge\"\n [hint]=\"text.allowedBadgesHint\" [visibleChipsLimit]=\"null\" [selected]=\"routerForm.allowed_type_ids\"\n (selectedChange)=\"routerForm.allowed_type_ids = [...$event]; routerError = null\" />\n </div>\n\n <ng-container footer>\n <hm-button emphasis=\"medium\" (clicked)=\"showRouterModal = false\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!routerForm.page_id || hierarchyGap || (!editingRouterId && newId.invalid)\" [loading]=\"savingRouter\" (clicked)=\"saveRouter()\">\n {{ editingRouterId ? text.save : text.create }}\n </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}:host{display:block}.name-cell{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.form-stack{display:flex;flex-direction:column;gap:var(--hm-space-sm)}.hierarchy-hint{margin:0;font-size:var(--hm-font-size-sm)}\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: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: ComboboxComponent, selector: "hm-combobox", inputs: ["label", "options", "value", "placeholder", "icon", "hint", "help", "size", "labelHidden", "clearable", "requiredManual", "loading", "allowCustomValue"], outputs: ["valueChange"] }, { kind: "component", type: ComboboxMultiComponent, selector: "hm-combobox-multi", inputs: ["label", "options", "selected", "extraOptions", "unknownLabel", "placeholder", "hint", "help", "max", "visibleChipsLimit"], outputs: ["selectedChange"] }, { kind: "component", type: DividerComponent, selector: "hm-divider", inputs: ["orientation", "label", "labelAlign", "emphasis", "thickness", "spacing", "decorative"] }, { 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: 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: TextareaComponent, selector: "hm-textarea", inputs: ["value", "label", "hint", "help", "placeholder", "maxLength", "rows", "autoGrow", "labelHidden", "loading", "maxRows", "submitKey"], outputs: ["valueChange", "submitted"] }, { kind: "component", type: AutoServiceRoutersReorderComponent, selector: "spine-auto-service-routers-reorder", inputs: ["clientId", "open"], outputs: ["openChange", "saved"] }, { kind: "component", type: CopyButtonComponent, selector: "hm-copy-button", inputs: ["value", "label", "copiedLabel", "variant", "size", "disabled", "feedbackDuration"], outputs: ["copied", "copyFailed"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
549
559
  }
550
560
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceRoutersComponent, decorators: [{
551
561
  type: Component,
552
562
  args: [{ selector: 'spine-auto-service-routers', standalone: true, imports: [
553
563
  CommonModule, FormsModule, ReactiveFormsModule, AlertComponent, ButtonComponent, CheckboxComponent, ComboboxComponent, ComboboxMultiComponent, DividerComponent,
554
564
  InputComponent, ModalComponent, DataGridComponent, DataGridCellDirective, TagComponent, TextareaComponent, AutoServiceRoutersReorderComponent,
555
- ], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"routers\"\n [rowId]=\"rowId\"\n [caption]=\"text.routersCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noRouters\"\n>\n <hm-button dataGridActions emphasis=\"medium\" icon=\"sort-vertical\" [disabled]=\"!routers.length\" (clicked)=\"showReorder = true\">{{ text.reorder }}</hm-button>\n <hm-button dataGridActions icon=\"plus\" [disabled]=\"!routes.length\" (clicked)=\"openCreateRouter()\">{{ text.newRouter }}</hm-button>\n <ng-template hmCell=\"page\" let-r>\n <span class=\"name-cell\">\n {{ routeName(r.page_id) }}\n <hm-tag *ngIf=\"r.templated\" [name]=\"text.templateTag\" color=\"info\" [title]=\"text.templateLocked\" />\n </span>\n </ng-template>\n <ng-template hmCell=\"is_private\" let-r>\n <hm-tag [name]=\"r.is_private ? text.private : text.public\" [color]=\"r.is_private ? 'warning' : 'success'\" />\n </ng-template>\n <ng-template hmCell=\"allowed_type_ids\" let-r>\n <span *ngIf=\"!r.allowed_type_ids?.length; else badges\" class=\"muted\">{{ text.anyBadge }}</span>\n <ng-template #badges>\n <span class=\"name-cell\">\n <hm-tag *ngFor=\"let name of allowedTypeNames(r.allowed_type_ids)\" [name]=\"name\" color=\"info\" />\n </span>\n </ng-template>\n </ng-template>\n <ng-template hmCell=\"built_path\" let-r>\n <code>{{ r.built_path }}</code>\n </ng-template>\n</hm-data-grid>\n\n<!-- Modal: ordem dos itens no menu do app (vale tamb\u00E9m para roteadores de template) -->\n<spine-auto-service-routers-reorder [clientId]=\"clientId\" [open]=\"showReorder\" (openChange)=\"showReorder = $event\" (saved)=\"load()\" />\n\n<!-- Modal: criar/editar roteador -->\n<hm-modal [open]=\"showRouterModal\" (openChange)=\"showRouterModal = $event\" [heading]=\"editingRouterId ? text.editRouter : text.newRouter\" size=\"large\" (closed)=\"showRouterModal = false\">\n <div class=\"form-stack\">\n <hm-alert *ngIf=\"routerError\" variant=\"error\">{{ routerError }}</hm-alert>\n @if (!editingRouterId) {\n <hm-input [formControl]=\"newId\" [label]=\"text.optionalId\" [placeholder]=\"text.optionalIdPlaceholder\" [hint]=\"text.optionalIdHint\" [messages]=\"idMessages()\" />\n }\n <hm-combobox [label]=\"text.page\" [options]=\"routeOptions\" [value]=\"routerForm.page_id\" (valueChange)=\"routerForm.page_id = $event\"></hm-combobox>\n <hm-textarea [label]=\"text.routerDescription\" [rows]=\"2\" [hint]=\"text.routerDescriptionHint\" [(ngModel)]=\"routerForm.description\" />\n\n <hm-divider [label]=\"text.hierarchy\" />\n <p class=\"hierarchy-hint muted\">{{ text.hierarchyHint }}</p>\n\n <!-- De cima para baixo: cada n\u00EDvel s\u00F3 abre com o de cima escolhido; limpar um n\u00EDvel limpa os de baixo. -->\n <hm-combobox *ngFor=\"let level of hierarchyLevels\" [label]=\"levelLabel(level)\" [options]=\"routeOptions\" [clearable]=\"true\"\n [disabled]=\"levelLocked(level)\" [value]=\"routerForm[level]\" (valueChange)=\"setLevel(level, $event)\"></hm-combobox>\n <hm-alert *ngIf=\"hierarchyGap\" variant=\"warning\">{{ text.routerErrors.hierarchyGap }}</hm-alert>\n\n <hm-divider />\n <hm-checkbox [(ngModel)]=\"routerForm.is_private\" [label]=\"text.privateHint\" />\n <!-- Vazio = qualquer crach\u00E1 (mesma regra do modal de roteador do argos-admin). -->\n <hm-combobox-multi [label]=\"text.colAllowedBadges\" [options]=\"groupTypeOptions\" [placeholder]=\"text.anyBadge\"\n [hint]=\"text.allowedBadgesHint\" [visibleChipsLimit]=\"null\" [selected]=\"routerForm.allowed_type_ids\"\n (selectedChange)=\"routerForm.allowed_type_ids = [...$event]; routerError = null\" />\n </div>\n\n <ng-container footer>\n <hm-button emphasis=\"medium\" (clicked)=\"showRouterModal = false\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!routerForm.page_id || hierarchyGap || (!editingRouterId && newId.invalid)\" [loading]=\"savingRouter\" (clicked)=\"saveRouter()\">\n {{ editingRouterId ? text.save : text.create }}\n </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}:host{display:block}.name-cell{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.form-stack{display:flex;flex-direction:column;gap:var(--hm-space-sm)}.hierarchy-hint{margin:0;font-size:var(--hm-font-size-sm)}\n"] }]
565
+ CopyButtonComponent,
566
+ ], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"routers\"\n [rowId]=\"rowId\"\n [caption]=\"text.routersCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noRouters\"\n>\n <hm-button dataGridActions emphasis=\"medium\" icon=\"sort-vertical\" [disabled]=\"!routers.length\" (clicked)=\"showReorder = true\">{{ text.reorder }}</hm-button>\n <hm-button dataGridActions icon=\"plus\" [disabled]=\"!routes.length\" (clicked)=\"openCreateRouter()\">{{ text.newRouter }}</hm-button>\n <ng-template hmCell=\"page\" let-r>\n <span class=\"name-cell\">\n {{ routeName(r.page_id) }}\n <hm-tag *ngIf=\"r.templated\" [name]=\"text.templateTag\" color=\"info\" [title]=\"text.templateLocked\" />\n </span>\n </ng-template>\n <ng-template hmCell=\"is_private\" let-r>\n <hm-tag [name]=\"r.is_private ? text.private : text.public\" [color]=\"r.is_private ? 'warning' : 'success'\" />\n </ng-template>\n <ng-template hmCell=\"allowed_type_ids\" let-r>\n <span *ngIf=\"!r.allowed_type_ids?.length; else badges\" class=\"muted\">{{ text.anyBadge }}</span>\n <ng-template #badges>\n <span class=\"name-cell\">\n <hm-tag *ngFor=\"let name of allowedTypeNames(r.allowed_type_ids)\" [name]=\"name\" color=\"info\" />\n </span>\n </ng-template>\n </ng-template>\n <ng-template hmCell=\"built_path\" let-r>\n <code>{{ r.built_path }}</code>\n </ng-template>\n <!-- UUID do roteador: s\u00F3 o bot\u00E3o de copiar (para criar o mesmo roteador com o mesmo id no outro ambiente). -->\n <ng-template hmCell=\"id\" let-r>\n <hm-copy-button [value]=\"r.id\" [label]=\"copyIdLabel(r)\" [copiedLabel]=\"text.idCopied\" />\n </ng-template>\n</hm-data-grid>\n\n<!-- Modal: ordem dos itens no menu do app (vale tamb\u00E9m para roteadores de template) -->\n<spine-auto-service-routers-reorder [clientId]=\"clientId\" [open]=\"showReorder\" (openChange)=\"showReorder = $event\" (saved)=\"load()\" />\n\n<!-- Modal: criar/editar roteador -->\n<hm-modal [open]=\"showRouterModal\" (openChange)=\"showRouterModal = $event\" [heading]=\"editingRouterId ? text.editRouter : text.newRouter\" size=\"large\" (closed)=\"showRouterModal = false\">\n <div class=\"form-stack\">\n <hm-alert *ngIf=\"routerError\" variant=\"error\">{{ routerError }}</hm-alert>\n @if (!editingRouterId) {\n <hm-input [formControl]=\"newId\" [label]=\"text.optionalId\" [placeholder]=\"text.optionalIdPlaceholder\" [hint]=\"text.optionalIdHint\" [messages]=\"idMessages()\" />\n }\n <hm-combobox [label]=\"text.page\" [options]=\"routeOptions\" [value]=\"routerForm.page_id\" (valueChange)=\"routerForm.page_id = $event\"></hm-combobox>\n <hm-textarea [label]=\"text.routerDescription\" [rows]=\"2\" [hint]=\"text.routerDescriptionHint\" [(ngModel)]=\"routerForm.description\" />\n\n <hm-divider [label]=\"text.hierarchy\" />\n <p class=\"hierarchy-hint muted\">{{ text.hierarchyHint }}</p>\n\n <!-- De cima para baixo: cada n\u00EDvel s\u00F3 abre com o de cima escolhido; limpar um n\u00EDvel limpa os de baixo. -->\n <hm-combobox *ngFor=\"let level of hierarchyLevels\" [label]=\"levelLabel(level)\" [options]=\"routeOptions\" [clearable]=\"true\"\n [disabled]=\"levelLocked(level)\" [value]=\"routerForm[level]\" (valueChange)=\"setLevel(level, $event)\"></hm-combobox>\n <hm-alert *ngIf=\"hierarchyGap\" variant=\"warning\">{{ text.routerErrors.hierarchyGap }}</hm-alert>\n\n <hm-divider />\n <hm-checkbox [(ngModel)]=\"routerForm.is_private\" [label]=\"text.privateHint\" />\n <!-- Vazio = qualquer crach\u00E1 (mesma regra do modal de roteador do argos-admin). -->\n <hm-combobox-multi [label]=\"text.colAllowedBadges\" [options]=\"groupTypeOptions\" [placeholder]=\"text.anyBadge\"\n [hint]=\"text.allowedBadgesHint\" [visibleChipsLimit]=\"null\" [selected]=\"routerForm.allowed_type_ids\"\n (selectedChange)=\"routerForm.allowed_type_ids = [...$event]; routerError = null\" />\n </div>\n\n <ng-container footer>\n <hm-button emphasis=\"medium\" (clicked)=\"showRouterModal = false\">{{ text.cancel }}</hm-button>\n <hm-button [disabled]=\"!routerForm.page_id || hierarchyGap || (!editingRouterId && newId.invalid)\" [loading]=\"savingRouter\" (clicked)=\"saveRouter()\">\n {{ editingRouterId ? text.save : text.create }}\n </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}:host{display:block}.name-cell{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--hm-space-xs)}.form-stack{display:flex;flex-direction:column;gap:var(--hm-space-sm)}.hierarchy-hint{margin:0;font-size:var(--hm-font-size-sm)}\n"] }]
556
567
  }], ctorParameters: () => [{ type: AutoServiceService }], propDecorators: { clientId: [{
557
568
  type: Input
558
569
  }] } });
@@ -612,62 +623,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImpo
612
623
  }] } });
613
624
 
614
625
  /**
615
- * Um nível da árvore de rotas — se referencia (`imports: [RouteTreeNodeComponent]`) pra
616
- * desenhar os filhos, já que não existe nenhum componente de árvore no DS novo (o antigo
617
- * usava `hermes-tree`/`*hermesRecursiveFor`, sem equivalente). Folha = checkbox (marca/
618
- * desmarca um guard); pasta = só rótulo, sem estado próprio.
626
+ * "Gerenciar rotas" de um acesso do client: as telas privadas que o grupo pode receber (roteadores sem restrição de
627
+ * crachá ou que aceitam o crachá do grupo), em `hm-tree` pelos níveis do menu, como no painel do Argos. No topo, só o
628
+ * filtro; a seleção guarda só folhas (páginas) e a diferença vira guard criado ou removido ao confirmar.
619
629
  */
620
- class RouteTreeNodeComponent {
621
- constructor() {
622
- this.selectedChange = new EventEmitter();
623
- }
624
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: RouteTreeNodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
625
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: RouteTreeNodeComponent, isStandalone: true, selector: "spine-route-tree-node", inputs: { node: "node" }, outputs: { selectedChange: "selectedChange" }, ngImport: i0, template: `
626
- <li class="tree-node" [class.tree-node--folder]="node.isFolder">
627
- <label *ngIf="!node.isFolder" class="tree-node__leaf">
628
- <input type="checkbox" class="hm-check" [(ngModel)]="node.selected" (ngModelChange)="selectedChange.emit()" />
629
- <hm-icon shape="router" class="tree-node__icon"></hm-icon>
630
- <span>{{ node.name }}</span>
631
- </label>
632
-
633
- <div *ngIf="node.isFolder" class="tree-node__folder">
634
- <hm-icon shape="filter-grid" class="tree-node__icon"></hm-icon>
635
- <span>{{ node.name }}</span>
636
- </div>
637
-
638
- <ul class="tree-node__children" *ngIf="node.children.length">
639
- <spine-route-tree-node *ngFor="let child of node.children" [node]="child" (selectedChange)="selectedChange.emit()"></spine-route-tree-node>
640
- </ul>
641
- </li>
642
- `, isInline: true, styles: [".tree-node{list-style:none}.tree-node__children{list-style:none;margin:0;padding-inline-start:var(--hm-space-lg)}.tree-node__leaf,.tree-node__folder{display:flex;align-items:center;gap:var(--hm-space-xs);padding:var(--hm-space-micro) 0;font-size:var(--hm-font-size-sm)}.tree-node__leaf{cursor:pointer}.tree-node__folder{font-weight:var(--hm-font-weight-semibold);color:var(--hm-muted)}.tree-node__icon{flex:0 0 auto;color:var(--hm-action)}\n"], dependencies: [{ kind: "component", type: RouteTreeNodeComponent, selector: "spine-route-tree-node", inputs: ["node"], outputs: ["selectedChange"] }, { 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: FormsModule }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
643
- }
644
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: RouteTreeNodeComponent, decorators: [{
645
- type: Component,
646
- args: [{ selector: 'spine-route-tree-node', standalone: true, imports: [CommonModule, FormsModule, IconComponent, RouteTreeNodeComponent], changeDetection: ChangeDetectionStrategy.Eager, template: `
647
- <li class="tree-node" [class.tree-node--folder]="node.isFolder">
648
- <label *ngIf="!node.isFolder" class="tree-node__leaf">
649
- <input type="checkbox" class="hm-check" [(ngModel)]="node.selected" (ngModelChange)="selectedChange.emit()" />
650
- <hm-icon shape="router" class="tree-node__icon"></hm-icon>
651
- <span>{{ node.name }}</span>
652
- </label>
653
-
654
- <div *ngIf="node.isFolder" class="tree-node__folder">
655
- <hm-icon shape="filter-grid" class="tree-node__icon"></hm-icon>
656
- <span>{{ node.name }}</span>
657
- </div>
658
-
659
- <ul class="tree-node__children" *ngIf="node.children.length">
660
- <spine-route-tree-node *ngFor="let child of node.children" [node]="child" (selectedChange)="selectedChange.emit()"></spine-route-tree-node>
661
- </ul>
662
- </li>
663
- `, styles: [".tree-node{list-style:none}.tree-node__children{list-style:none;margin:0;padding-inline-start:var(--hm-space-lg)}.tree-node__leaf,.tree-node__folder{display:flex;align-items:center;gap:var(--hm-space-xs);padding:var(--hm-space-micro) 0;font-size:var(--hm-font-size-sm)}.tree-node__leaf{cursor:pointer}.tree-node__folder{font-weight:var(--hm-font-weight-semibold);color:var(--hm-muted)}.tree-node__icon{flex:0 0 auto;color:var(--hm-action)}\n"] }]
664
- }], propDecorators: { node: [{
665
- type: Input,
666
- args: [{ required: true }]
667
- }], selectedChange: [{
668
- type: Output
669
- }] } });
670
-
671
630
  class AutoServiceAccessGuardsComponent {
672
631
  constructor(service) {
673
632
  this.service = service;
@@ -675,8 +634,6 @@ class AutoServiceAccessGuardsComponent {
675
634
  /** Telas com estado em campo comum, preenchido depois de `await`: marca a view ao terminar (app sem zone.js). */
676
635
  this.cdr = inject(ChangeDetectorRef);
677
636
  this.fmt = formatMessage;
678
- /** Para `[innerHTML]`: escapa os parâmetros (o tipo de grupo vem do servidor). */
679
- this.fmtHtml = formatMessageHtml;
680
637
  this.clientId = '';
681
638
  this.access = null;
682
639
  this.open = false;
@@ -685,9 +642,20 @@ class AutoServiceAccessGuardsComponent {
685
642
  this.availableRoutes = [];
686
643
  this.clientPrivateRouters = [];
687
644
  this.guards = [];
688
- this.tree = [];
689
645
  this.loading = false;
690
646
  this.saving = false;
647
+ this.tree = signal([], ...(ngDevMode ? [{ debugName: "tree" }] : /* istanbul ignore next */ []));
648
+ /** Termo do filtro no topo do drawer; a árvore mostrada é `visibleTree`. */
649
+ this.filter = signal('', ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
650
+ this.visibleTree = computed(() => filterRouteTree(this.tree(), this.filter()), ...(ngDevMode ? [{ debugName: "visibleTree" }] : /* istanbul ignore next */ []));
651
+ this.treeNodes = computed(() => this.visibleTree().map(n => toTreeNode(n)), ...(ngDevMode ? [{ debugName: "treeNodes" }] : /* istanbul ignore next */ []));
652
+ /** Só folhas (páginas): o que tem guard agora na árvore. */
653
+ this.selectedIds = signal(new Set(), ...(ngDevMode ? [{ debugName: "selectedIds" }] : /* istanbul ignore next */ []));
654
+ this.expandedIds = signal(new Set(), ...(ngDevMode ? [{ debugName: "expandedIds" }] : /* istanbul ignore next */ []));
655
+ this.originalSelectedIds = new Set();
656
+ this.nodesByKey = computed(() => indexByKey(this.tree()), ...(ngDevMode ? [{ debugName: "nodesByKey" }] : /* istanbul ignore next */ []));
657
+ /** Nós visíveis por chave: marcar uma pasta com o filtro ativo só mexe nas páginas que aparecem. */
658
+ this.visibleByKey = computed(() => indexByKey(this.visibleTree()), ...(ngDevMode ? [{ debugName: "visibleByKey" }] : /* istanbul ignore next */ []));
691
659
  this.levels = ['header_id', 'navigation_id', 'menu_id', 'item_id', 'submenu_id'];
692
660
  }
693
661
  ngOnChanges(changes) { if (changes['open'] && this.open) {
@@ -737,19 +705,57 @@ class AutoServiceAccessGuardsComponent {
737
705
  routerId: router.id, guardId: guard?.guard_id, selected: !!guard, children: [],
738
706
  });
739
707
  }
740
- this.tree = root;
708
+ this.tree.set(root);
709
+ const original = new Set(root.flatMap(collectLeaves).filter(l => l.selected).map(l => l.key));
710
+ this.originalSelectedIds = original;
711
+ this.selectedIds.set(new Set(original));
712
+ this.expandedIds.set(new Set());
713
+ this.filter.set('');
714
+ }
715
+ /** Filtrar abre as pastas que sobraram, para as telas encontradas aparecerem sem clique. */
716
+ onFilterChange(term) {
717
+ this.filter.set(term);
718
+ if (!term.trim())
719
+ return;
720
+ this.expandedIds.update(current => new Set([...current, ...folderKeys(this.visibleTree())]));
721
+ }
722
+ /** Com caixas o hm-tree emite folhas (ou a pasta sem folhas): pasta vira as páginas dela que estão à vista. */
723
+ onTreeChanged(changes) {
724
+ this.selectedIds.update(current => {
725
+ const next = new Set(current);
726
+ for (const change of changes) {
727
+ const node = this.visibleByKey().get(change.id);
728
+ if (!node)
729
+ continue;
730
+ for (const leaf of collectLeaves(node)) {
731
+ if (change.selected)
732
+ next.add(leaf.key);
733
+ else
734
+ next.delete(leaf.key);
735
+ }
736
+ }
737
+ return next;
738
+ });
739
+ }
740
+ get hasChanges() {
741
+ const selected = this.selectedIds();
742
+ if (selected.size !== this.originalSelectedIds.size)
743
+ return true;
744
+ for (const id of selected)
745
+ if (!this.originalSelectedIds.has(id))
746
+ return true;
747
+ return false;
741
748
  }
742
- collectLeaves(node) {
743
- if (!node.isFolder)
744
- return [node];
745
- return node.children.flatMap(child => this.collectLeaves(child));
749
+ /** Folha (página) pela chave; `undefined` para pasta ou chave desconhecida. */
750
+ leafByKey(key) {
751
+ const node = this.nodesByKey().get(key);
752
+ return node && !node.isFolder ? node : undefined;
746
753
  }
747
- get allLeaves() { return this.tree.flatMap(node => this.collectLeaves(node)); }
748
- get hasChanges() { return this.allLeaves.some(leaf => !!leaf.selected !== !!leaf.guardId); }
749
754
  async confirm() {
750
- const leaves = this.allLeaves;
751
- const toAdd = leaves.filter(l => l.selected && !l.guardId);
752
- const toRemove = leaves.filter(l => !l.selected && l.guardId);
755
+ const selected = this.selectedIds();
756
+ const isLeaf = (l) => !!l;
757
+ const toAdd = [...selected].filter(id => !this.originalSelectedIds.has(id)).map(id => this.leafByKey(id)).filter(isLeaf);
758
+ const toRemove = [...this.originalSelectedIds].filter(id => !selected.has(id)).map(id => this.leafByKey(id)).filter(isLeaf);
753
759
  if (toAdd.length === 0 && toRemove.length === 0) {
754
760
  this.close();
755
761
  return;
@@ -770,11 +776,11 @@ class AutoServiceAccessGuardsComponent {
770
776
  }
771
777
  }
772
778
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceAccessGuardsComponent, deps: [{ token: AutoServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
773
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceAccessGuardsComponent, isStandalone: true, selector: "spine-auto-service-access-guards", inputs: { clientId: "clientId", access: "access", open: "open" }, outputs: { openChange: "openChange" }, usesOnChanges: true, ngImport: i0, template: "<hm-drawer [open]=\"open\" (openChange)=\"open = $event\" [heading]=\"fmt(text.routesOf, { group: access?.group_name ?? '' })\" (closed)=\"close()\">\n <p class=\"muted\" *ngIf=\"!loading\" [innerHTML]=\"fmtHtml(text.guardsHint, { badge: access?.group_type_name ?? '' })\"></p>\n\n <div *ngIf=\"loading\" class=\"loading-row\">\n <span>{{ text.loading }}</span>\n </div>\n\n <ul class=\"route-tree\" *ngIf=\"!loading\">\n <spine-route-tree-node *ngFor=\"let node of tree\" [node]=\"node\"></spine-route-tree-node>\n </ul>\n\n <div class=\"empty-state\" *ngIf=\"!loading && tree.length === 0\">\n <hm-icon shape=\"filter-grid\" size=\"xl\"></hm-icon>\n <p>{{ text.noPrivateRoutes }}</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: [".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)}.route-tree{list-style:none;margin:0;padding:0}.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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "component", type: DrawerComponent, selector: "hm-drawer", inputs: ["open", "heading", "size", "position", "pinned", "closeLabel", "closable", "beforeClose"], outputs: ["openChange", "closed"] }, { kind: "component", type: RouteTreeNodeComponent, selector: "spine-route-tree-node", inputs: ["node"], outputs: ["selectedChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
779
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceAccessGuardsComponent, isStandalone: true, selector: "spine-auto-service-access-guards", inputs: { clientId: "clientId", access: "access", open: "open" }, outputs: { openChange: "openChange" }, usesOnChanges: true, ngImport: i0, template: "<hm-drawer [open]=\"open\" (openChange)=\"open = $event\" [heading]=\"fmt(text.routesOf, { group: access?.group_name ?? '' })\" (closed)=\"close()\">\n <div *ngIf=\"loading\" class=\"loading-row\">\n <span>{{ text.loading }}</span>\n </div>\n\n <!-- Topo sem mensagens: s\u00F3 o filtro, com o mesmo visual da busca das grades. -->\n <hm-data-grid-action-bar *ngIf=\"!loading && tree().length\"\n [search]=\"filter()\" (searchChange)=\"onFilterChange($event)\"\n [placeholder]=\"text.filterRoutes\" [label]=\"text.filterRoutes\" />\n\n <hm-tree\n *ngIf=\"!loading && treeNodes().length\"\n [nodes]=\"treeNodes()\"\n [label]=\"text.routesTreeLabel\"\n [selected]=\"selectedIds()\"\n [(expanded)]=\"expandedIds\"\n (changed)=\"onTreeChanged($event)\"\n />\n\n <div class=\"empty-state\" *ngIf=\"!loading && tree().length > 0 && treeNodes().length === 0\">\n <hm-icon shape=\"search\" size=\"xl\"></hm-icon>\n <p>{{ fmt(text.noFilterMatch, { term: filter() }) }}</p>\n </div>\n\n <div class=\"empty-state\" *ngIf=\"!loading && tree().length === 0\">\n <hm-icon shape=\"filter-grid\" size=\"xl\"></hm-icon>\n <p>{{ text.noPrivateRoutes }}</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: [".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)}.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: DataGridActionBarComponent, selector: "hm-data-grid-action-bar", inputs: ["search", "placeholder", "label"], outputs: ["searchChange"] }, { kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "component", type: DrawerComponent, selector: "hm-drawer", inputs: ["open", "heading", "size", "position", "pinned", "closeLabel", "closable", "beforeClose"], outputs: ["openChange", "closed"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
774
780
  }
775
781
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceAccessGuardsComponent, decorators: [{
776
782
  type: Component,
777
- args: [{ selector: 'spine-auto-service-access-guards', standalone: true, imports: [CommonModule, ButtonComponent, IconComponent, DrawerComponent, RouteTreeNodeComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-drawer [open]=\"open\" (openChange)=\"open = $event\" [heading]=\"fmt(text.routesOf, { group: access?.group_name ?? '' })\" (closed)=\"close()\">\n <p class=\"muted\" *ngIf=\"!loading\" [innerHTML]=\"fmtHtml(text.guardsHint, { badge: access?.group_type_name ?? '' })\"></p>\n\n <div *ngIf=\"loading\" class=\"loading-row\">\n <span>{{ text.loading }}</span>\n </div>\n\n <ul class=\"route-tree\" *ngIf=\"!loading\">\n <spine-route-tree-node *ngFor=\"let node of tree\" [node]=\"node\"></spine-route-tree-node>\n </ul>\n\n <div class=\"empty-state\" *ngIf=\"!loading && tree.length === 0\">\n <hm-icon shape=\"filter-grid\" size=\"xl\"></hm-icon>\n <p>{{ text.noPrivateRoutes }}</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: [".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)}.route-tree{list-style:none;margin:0;padding:0}.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"] }]
783
+ args: [{ selector: 'spine-auto-service-access-guards', standalone: true, imports: [CommonModule, ButtonComponent, DataGridActionBarComponent, IconComponent, DrawerComponent, TreeComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-drawer [open]=\"open\" (openChange)=\"open = $event\" [heading]=\"fmt(text.routesOf, { group: access?.group_name ?? '' })\" (closed)=\"close()\">\n <div *ngIf=\"loading\" class=\"loading-row\">\n <span>{{ text.loading }}</span>\n </div>\n\n <!-- Topo sem mensagens: s\u00F3 o filtro, com o mesmo visual da busca das grades. -->\n <hm-data-grid-action-bar *ngIf=\"!loading && tree().length\"\n [search]=\"filter()\" (searchChange)=\"onFilterChange($event)\"\n [placeholder]=\"text.filterRoutes\" [label]=\"text.filterRoutes\" />\n\n <hm-tree\n *ngIf=\"!loading && treeNodes().length\"\n [nodes]=\"treeNodes()\"\n [label]=\"text.routesTreeLabel\"\n [selected]=\"selectedIds()\"\n [(expanded)]=\"expandedIds\"\n (changed)=\"onTreeChanged($event)\"\n />\n\n <div class=\"empty-state\" *ngIf=\"!loading && tree().length > 0 && treeNodes().length === 0\">\n <hm-icon shape=\"search\" size=\"xl\"></hm-icon>\n <p>{{ fmt(text.noFilterMatch, { term: filter() }) }}</p>\n </div>\n\n <div class=\"empty-state\" *ngIf=\"!loading && tree().length === 0\">\n <hm-icon shape=\"filter-grid\" size=\"xl\"></hm-icon>\n <p>{{ text.noPrivateRoutes }}</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: [".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)}.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"] }]
778
784
  }], ctorParameters: () => [{ type: AutoServiceService }], propDecorators: { clientId: [{
779
785
  type: Input
780
786
  }], access: [{
@@ -784,6 +790,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImpo
784
790
  }], openChange: [{
785
791
  type: Output
786
792
  }] } });
793
+ function toTreeNode(node) {
794
+ return {
795
+ id: node.key, label: node.name, leaf: !node.isFolder,
796
+ children: node.isFolder ? node.children.map(toTreeNode) : undefined,
797
+ };
798
+ }
799
+ function collectLeaves(node) {
800
+ return node.isFolder ? node.children.flatMap(collectLeaves) : [node];
801
+ }
802
+ function indexByKey(root) {
803
+ const map = new Map();
804
+ const walk = (nodes) => { for (const n of nodes) {
805
+ map.set(n.key, n);
806
+ walk(n.children);
807
+ } };
808
+ walk(root);
809
+ return map;
810
+ }
811
+ function folderKeys(root) {
812
+ return [...indexByKey(root).values()].filter(n => n.isFolder).map(n => n.key);
813
+ }
814
+ /** Minúsculo e sem acento: "operacao" casa com "Operação". */
815
+ function normalize(value) {
816
+ return (value ?? '').normalize('NFD').replace(/[̀-ͯ]/g, '').toLowerCase();
817
+ }
818
+ /** A árvore só com as telas cujo nome casa com o termo; a pasta que casa pelo nome vem inteira. Termo vazio = tudo. */
819
+ function filterRouteTree(nodes, term) {
820
+ const needle = normalize(term.trim());
821
+ if (!needle)
822
+ return nodes;
823
+ const walk = (list) => list.flatMap((n) => {
824
+ if (n.isFolder) {
825
+ if (normalize(n.name).includes(needle))
826
+ return [n];
827
+ const children = walk(n.children);
828
+ return children.length ? [{ ...n, children }] : [];
829
+ }
830
+ return normalize(n.name).includes(needle) ? [n] : [];
831
+ });
832
+ return walk(nodes);
833
+ }
787
834
 
788
835
  class AutoServiceAccessComponent {
789
836
  constructor(service) {
@@ -802,12 +849,13 @@ class AutoServiceAccessComponent {
802
849
  this.rowId = (a) => a.access_id;
803
850
  this.columns = computed(() => [
804
851
  { key: 'group_name', title: this.text.colGroup, value: (a) => a.group_name, sortable: true },
805
- { key: 'group_type_name', title: this.text.colBadge, value: (a) => a.group_type_name, sortable: true },
852
+ { key: 'group_type_name', title: this.text.colType, value: (a) => a.group_type_name, sortable: true },
853
+ // Como no painel do Argos: "Gerenciar rotas" é um botão na linha, não um item do menu.
854
+ { key: 'guards', title: this.text.colGuards, value: () => '' },
806
855
  ], ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
807
856
  this.rowActions = computed(() => [
808
- { id: 'guards', icon: 'shield', label: this.text.manageRoutes },
809
857
  {
810
- id: 'delete', icon: 'trash', label: this.text.remove, danger: true, separatorAbove: true,
858
+ id: 'delete', icon: 'trash', label: this.text.remove, danger: true,
811
859
  confirm: (a) => ({ heading: this.text.confirmRemoveAccessHeading, message: formatMessage(this.text.confirmRemoveAccess, { group: a.group_name }) }),
812
860
  },
813
861
  ], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
@@ -851,17 +899,18 @@ class AutoServiceAccessComponent {
851
899
  }
852
900
  openGuards(access) { this.activeAccess = access; this.showGuards = true; }
853
901
  onAction(e) {
854
- if (e.action === 'guards')
855
- this.openGuards(e.row);
856
902
  if (e.action === 'delete')
857
903
  void this.deleteAccess(e.row.access_id);
858
904
  }
859
905
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceAccessComponent, deps: [{ token: AutoServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
860
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceAccessComponent, isStandalone: true, selector: "spine-auto-service-access", inputs: { clientId: "clientId" }, usesOnChanges: true, ngImport: i0, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"entries\"\n [rowId]=\"rowId\"\n [caption]=\"text.accessCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noAccess\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreate()\">{{ text.newAccess }}</hm-button>\n</hm-data-grid>\n\n<spine-auto-service-access-create\n [clientId]=\"clientId\"\n [availableGroups]=\"availableGroups\"\n [open]=\"showCreate\"\n (openChange)=\"showCreate = $event\"\n (created)=\"onCreated()\">\n</spine-auto-service-access-create>\n\n<spine-auto-service-access-guards\n *ngIf=\"activeAccess\"\n [clientId]=\"clientId\"\n [access]=\"activeAccess\"\n [open]=\"showGuards\"\n (openChange)=\"showGuards = $event\">\n</spine-auto-service-access-guards>\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: AutoServiceAccessCreateComponent, selector: "spine-auto-service-access-create", inputs: ["clientId", "availableGroups", "open"], outputs: ["openChange", "created"] }, { kind: "component", type: AutoServiceAccessGuardsComponent, selector: "spine-auto-service-access-guards", inputs: ["clientId", "access", "open"], outputs: ["openChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
906
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: AutoServiceAccessComponent, isStandalone: true, selector: "spine-auto-service-access", inputs: { clientId: "clientId" }, usesOnChanges: true, ngImport: i0, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"entries\"\n [rowId]=\"rowId\"\n [caption]=\"text.accessCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noAccess\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreate()\">{{ text.newAccess }}</hm-button>\n <ng-template hmCell=\"group_type_name\" let-a>\n <hm-tag [name]=\"a.group_type_name\" color=\"neutral\" />\n </ng-template>\n <ng-template hmCell=\"guards\" let-a>\n <hm-button emphasis=\"minimal\" icon=\"shield\" (clicked)=\"openGuards(a)\">{{ text.manageRoutes }}</hm-button>\n </ng-template>\n</hm-data-grid>\n\n<spine-auto-service-access-create\n [clientId]=\"clientId\"\n [availableGroups]=\"availableGroups\"\n [open]=\"showCreate\"\n (openChange)=\"showCreate = $event\"\n (created)=\"onCreated()\">\n</spine-auto-service-access-create>\n\n<spine-auto-service-access-guards\n *ngIf=\"activeAccess\"\n [clientId]=\"clientId\"\n [access]=\"activeAccess\"\n [open]=\"showGuards\"\n (openChange)=\"showGuards = $event\">\n</spine-auto-service-access-guards>\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: "directive", type: DataGridCellDirective, selector: "ng-template[hmCell]", inputs: ["hmCell"] }, { kind: "component", type: TagComponent, selector: "hm-tag", inputs: ["name", "color", "compact"] }, { kind: "component", type: AutoServiceAccessCreateComponent, selector: "spine-auto-service-access-create", inputs: ["clientId", "availableGroups", "open"], outputs: ["openChange", "created"] }, { kind: "component", type: AutoServiceAccessGuardsComponent, selector: "spine-auto-service-access-guards", inputs: ["clientId", "access", "open"], outputs: ["openChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
861
907
  }
862
908
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AutoServiceAccessComponent, decorators: [{
863
909
  type: Component,
864
- args: [{ selector: 'spine-auto-service-access', standalone: true, imports: [CommonModule, ButtonComponent, IconComponent, DataGridComponent, AutoServiceAccessCreateComponent, AutoServiceAccessGuardsComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"entries\"\n [rowId]=\"rowId\"\n [caption]=\"text.accessCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noAccess\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreate()\">{{ text.newAccess }}</hm-button>\n</hm-data-grid>\n\n<spine-auto-service-access-create\n [clientId]=\"clientId\"\n [availableGroups]=\"availableGroups\"\n [open]=\"showCreate\"\n (openChange)=\"showCreate = $event\"\n (created)=\"onCreated()\">\n</spine-auto-service-access-create>\n\n<spine-auto-service-access-guards\n *ngIf=\"activeAccess\"\n [clientId]=\"clientId\"\n [access]=\"activeAccess\"\n [open]=\"showGuards\"\n (openChange)=\"showGuards = $event\">\n</spine-auto-service-access-guards>\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"] }]
910
+ args: [{ selector: 'spine-auto-service-access', standalone: true, imports: [
911
+ CommonModule, ButtonComponent, IconComponent, DataGridComponent, DataGridCellDirective, TagComponent,
912
+ AutoServiceAccessCreateComponent, AutoServiceAccessGuardsComponent,
913
+ ], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-data-grid\n [columns]=\"columns()\"\n [rows]=\"entries\"\n [rowId]=\"rowId\"\n [caption]=\"text.accessCaption\"\n [loading]=\"loading\"\n [rowActions]=\"rowActions()\"\n (actionTriggered)=\"onAction($event)\"\n [emptyMessage]=\"text.noAccess\"\n>\n <hm-button dataGridActions icon=\"plus\" (clicked)=\"openCreate()\">{{ text.newAccess }}</hm-button>\n <ng-template hmCell=\"group_type_name\" let-a>\n <hm-tag [name]=\"a.group_type_name\" color=\"neutral\" />\n </ng-template>\n <ng-template hmCell=\"guards\" let-a>\n <hm-button emphasis=\"minimal\" icon=\"shield\" (clicked)=\"openGuards(a)\">{{ text.manageRoutes }}</hm-button>\n </ng-template>\n</hm-data-grid>\n\n<spine-auto-service-access-create\n [clientId]=\"clientId\"\n [availableGroups]=\"availableGroups\"\n [open]=\"showCreate\"\n (openChange)=\"showCreate = $event\"\n (created)=\"onCreated()\">\n</spine-auto-service-access-create>\n\n<spine-auto-service-access-guards\n *ngIf=\"activeAccess\"\n [clientId]=\"clientId\"\n [access]=\"activeAccess\"\n [open]=\"showGuards\"\n (openChange)=\"showGuards = $event\">\n</spine-auto-service-access-guards>\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"] }]
865
914
  }], ctorParameters: () => [{ type: AutoServiceService }], propDecorators: { clientId: [{
866
915
  type: Input
867
916
  }] } });
@@ -886,4 +935,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImpo
886
935
  }] });
887
936
 
888
937
  export { AutoServiceClientComponent };
889
- //# sourceMappingURL=trismegisto-spine-auto-service-auto-service-client.component-wu2tFGS7.mjs.map
938
+ //# sourceMappingURL=trismegisto-spine-auto-service-auto-service-client.component-DzmlpLPu.mjs.map