@trismegisto/spine 2.0.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 (55) hide show
  1. package/LICENSE +56 -0
  2. package/README.md +207 -0
  3. package/fesm2022/trismegisto-spine-audit.mjs +1299 -0
  4. package/fesm2022/trismegisto-spine-audit.mjs.map +1 -0
  5. package/fesm2022/trismegisto-spine-auto-service-auto-service-audit.component-CCiz-q8o.mjs +37 -0
  6. package/fesm2022/trismegisto-spine-auto-service-auto-service-audit.component-CCiz-q8o.mjs.map +1 -0
  7. package/fesm2022/trismegisto-spine-auto-service-auto-service-client-picker.component-Z0wCANF6.mjs +51 -0
  8. package/fesm2022/trismegisto-spine-auto-service-auto-service-client-picker.component-Z0wCANF6.mjs.map +1 -0
  9. package/fesm2022/trismegisto-spine-auto-service-auto-service-client.component-BYkUOwWL.mjs +595 -0
  10. package/fesm2022/trismegisto-spine-auto-service-auto-service-client.component-BYkUOwWL.mjs.map +1 -0
  11. package/fesm2022/trismegisto-spine-auto-service-auto-service-groups.component-CqIVe2LU.mjs +357 -0
  12. package/fesm2022/trismegisto-spine-auto-service-auto-service-groups.component-CqIVe2LU.mjs.map +1 -0
  13. package/fesm2022/trismegisto-spine-auto-service-auto-service.component-B5tyJ2zY.mjs +477 -0
  14. package/fesm2022/trismegisto-spine-auto-service-auto-service.component-B5tyJ2zY.mjs.map +1 -0
  15. package/fesm2022/trismegisto-spine-auto-service-home.component-vl3BPFnk.mjs +238 -0
  16. package/fesm2022/trismegisto-spine-auto-service-home.component-vl3BPFnk.mjs.map +1 -0
  17. package/fesm2022/trismegisto-spine-auto-service.mjs +154 -0
  18. package/fesm2022/trismegisto-spine-auto-service.mjs.map +1 -0
  19. package/fesm2022/trismegisto-spine-graphql.mjs +347 -0
  20. package/fesm2022/trismegisto-spine-graphql.mjs.map +1 -0
  21. package/fesm2022/trismegisto-spine-layout.mjs +2848 -0
  22. package/fesm2022/trismegisto-spine-layout.mjs.map +1 -0
  23. package/fesm2022/trismegisto-spine-modal.mjs +141 -0
  24. package/fesm2022/trismegisto-spine-modal.mjs.map +1 -0
  25. package/fesm2022/trismegisto-spine-notification.mjs +122 -0
  26. package/fesm2022/trismegisto-spine-notification.mjs.map +1 -0
  27. package/fesm2022/trismegisto-spine-routing.mjs +398 -0
  28. package/fesm2022/trismegisto-spine-routing.mjs.map +1 -0
  29. package/fesm2022/trismegisto-spine-shell.mjs +409 -0
  30. package/fesm2022/trismegisto-spine-shell.mjs.map +1 -0
  31. package/fesm2022/trismegisto-spine-side-panel.mjs +142 -0
  32. package/fesm2022/trismegisto-spine-side-panel.mjs.map +1 -0
  33. package/fesm2022/trismegisto-spine.mjs +2574 -0
  34. package/fesm2022/trismegisto-spine.mjs.map +1 -0
  35. package/package.json +94 -0
  36. package/types/trismegisto-spine-audit.d.ts +948 -0
  37. package/types/trismegisto-spine-audit.d.ts.map +1 -0
  38. package/types/trismegisto-spine-auto-service.d.ts +110 -0
  39. package/types/trismegisto-spine-auto-service.d.ts.map +1 -0
  40. package/types/trismegisto-spine-graphql.d.ts +72 -0
  41. package/types/trismegisto-spine-graphql.d.ts.map +1 -0
  42. package/types/trismegisto-spine-layout.d.ts +1054 -0
  43. package/types/trismegisto-spine-layout.d.ts.map +1 -0
  44. package/types/trismegisto-spine-modal.d.ts +68 -0
  45. package/types/trismegisto-spine-modal.d.ts.map +1 -0
  46. package/types/trismegisto-spine-notification.d.ts +62 -0
  47. package/types/trismegisto-spine-notification.d.ts.map +1 -0
  48. package/types/trismegisto-spine-routing.d.ts +205 -0
  49. package/types/trismegisto-spine-routing.d.ts.map +1 -0
  50. package/types/trismegisto-spine-shell.d.ts +143 -0
  51. package/types/trismegisto-spine-shell.d.ts.map +1 -0
  52. package/types/trismegisto-spine-side-panel.d.ts +66 -0
  53. package/types/trismegisto-spine-side-panel.d.ts.map +1 -0
  54. package/types/trismegisto-spine.d.ts +1161 -0
  55. package/types/trismegisto-spine.d.ts.map +1 -0
@@ -0,0 +1,141 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, inject, ViewContainerRef, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { HermesLoadingState, HERMES_MESSAGES, ModalComponent as ModalComponent$1, ButtonComponent } from '@trismegisto/angular';
4
+ import { BehaviorSubject, Subject } from 'rxjs';
5
+ import { take } from 'rxjs/operators';
6
+ import * as i2 from '@angular/common';
7
+ import { CommonModule } from '@angular/common';
8
+
9
+ class ModalService {
10
+ constructor() {
11
+ this._visible = new BehaviorSubject(false);
12
+ this.visible$ = this._visible.asObservable();
13
+ this._state = new BehaviorSubject(HermesLoadingState.DEFAULT);
14
+ this.state$ = this._state.asObservable();
15
+ this._config = null;
16
+ this._result$ = null;
17
+ }
18
+ get config() {
19
+ return this._config;
20
+ }
21
+ open(config) {
22
+ // Abrir outro antes de responder o anterior cancela o anterior: quem o abriu recebe `null` (como no
23
+ // `close`) e o observable completa, em vez de ficar pendurado para sempre.
24
+ this._result$?.next(null);
25
+ this._result$?.complete();
26
+ this._config = config;
27
+ this._state.next(HermesLoadingState.DEFAULT);
28
+ this._result$ = new Subject();
29
+ this._visible.next(true);
30
+ return this._result$.asObservable().pipe(take(1));
31
+ }
32
+ confirm(result) {
33
+ this._result$?.next(result);
34
+ this._result$?.complete();
35
+ this.dismiss();
36
+ }
37
+ close() {
38
+ this._result$?.next(null);
39
+ this._result$?.complete();
40
+ this.dismiss();
41
+ }
42
+ setState(state) {
43
+ this._state.next(state);
44
+ }
45
+ dismiss() {
46
+ this._visible.next(false);
47
+ this._config = null;
48
+ this._result$ = null;
49
+ this._state.next(HermesLoadingState.DEFAULT); // evita vazar LOADING pro próximo modal
50
+ }
51
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
52
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: ModalService, providedIn: 'root' }); }
53
+ }
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: ModalService, decorators: [{
55
+ type: Injectable,
56
+ args: [{ providedIn: 'root' }]
57
+ }] });
58
+
59
+ /** `ModalConfig.size` manteve os valores do spine antigo (sm/md/lg/xl) por compatibilidade
60
+ * de API com quem já chama `modalService.open(...)`; o DS novo só tem 3 tamanhos. */
61
+ function toHermesSize(size) {
62
+ switch (size) {
63
+ case 'sm': return 'small';
64
+ case 'lg':
65
+ case 'xl': return 'large';
66
+ default: return 'medium';
67
+ }
68
+ }
69
+ class ModalComponent {
70
+ constructor(modalService, cdr) {
71
+ this.modalService = modalService;
72
+ this.cdr = cdr;
73
+ /** Rótulos dos botões padrão, do catálogo do Hermes (pt-BR/en/es). */
74
+ this.dialogText = inject(HERMES_MESSAGES).dialog;
75
+ this.visible = false;
76
+ this.config = null;
77
+ this.state = HermesLoadingState.DEFAULT;
78
+ this.HermesLoadingState = HermesLoadingState;
79
+ this.toHermesSize = toHermesSize;
80
+ this.contentRef = null;
81
+ }
82
+ ngOnInit() {
83
+ this.modalService.visible$.subscribe((visible) => {
84
+ this.visible = visible;
85
+ this.config = this.modalService.config;
86
+ if (visible) {
87
+ this.loadComponent();
88
+ }
89
+ else {
90
+ this.content?.clear();
91
+ this.contentRef = null;
92
+ }
93
+ this.cdr.markForCheck();
94
+ });
95
+ this.modalService.state$.subscribe((state) => {
96
+ this.state = state;
97
+ this.cdr.markForCheck();
98
+ });
99
+ }
100
+ get canConfirm() {
101
+ const instance = this.contentRef?.instance;
102
+ return !instance?.isValid || instance.isValid();
103
+ }
104
+ loadComponent() {
105
+ this.content.clear();
106
+ if (this.config?.component) {
107
+ this.contentRef = this.content.createComponent(this.config.component);
108
+ if (this.config.data !== undefined) {
109
+ this.contentRef.setInput('data', this.config.data);
110
+ }
111
+ }
112
+ }
113
+ confirm() {
114
+ if (!this.canConfirm)
115
+ return;
116
+ const result = this.contentRef?.instance?.getResult ? this.contentRef.instance.getResult() : true;
117
+ this.modalService.confirm(result);
118
+ }
119
+ dismiss() {
120
+ this.modalService.close();
121
+ }
122
+ onLoadingStateChange(state) {
123
+ this.modalService.setState(state);
124
+ }
125
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: ModalComponent, deps: [{ token: ModalService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
126
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: ModalComponent, isStandalone: true, selector: "spine-modal", viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<hm-modal\n [open]=\"visible\"\n [heading]=\"config?.title || ''\"\n [size]=\"toHermesSize(config?.size)\"\n [closable]=\"config?.closable ?? true\"\n (closed)=\"dismiss()\"\n>\n <ng-container #content />\n <div *ngIf=\"config?.text && !config?.component\">{{ config?.text }}</div>\n\n <ng-container footer *ngIf=\"config?.showActions !== false\">\n <hm-button emphasis=\"medium\" (clicked)=\"dismiss()\">{{ dialogText.cancel }}</hm-button>\n <hm-button\n intent=\"success\"\n [disabled]=\"!canConfirm\"\n [loadingState]=\"state\"\n (loadingStateChange)=\"onLoadingStateChange($event)\"\n (clicked)=\"confirm()\"\n >{{ dialogText.confirm }}</hm-button>\n </ng-container>\n</hm-modal>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ModalComponent$1, selector: "hm-modal", inputs: ["open", "heading", "size", "closeLabel", "closable", "beforeClose"], outputs: ["openChange", "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"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
127
+ }
128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: ModalComponent, decorators: [{
129
+ type: Component,
130
+ args: [{ selector: 'spine-modal', imports: [CommonModule, ModalComponent$1, ButtonComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-modal\n [open]=\"visible\"\n [heading]=\"config?.title || ''\"\n [size]=\"toHermesSize(config?.size)\"\n [closable]=\"config?.closable ?? true\"\n (closed)=\"dismiss()\"\n>\n <ng-container #content />\n <div *ngIf=\"config?.text && !config?.component\">{{ config?.text }}</div>\n\n <ng-container footer *ngIf=\"config?.showActions !== false\">\n <hm-button emphasis=\"medium\" (clicked)=\"dismiss()\">{{ dialogText.cancel }}</hm-button>\n <hm-button\n intent=\"success\"\n [disabled]=\"!canConfirm\"\n [loadingState]=\"state\"\n (loadingStateChange)=\"onLoadingStateChange($event)\"\n (clicked)=\"confirm()\"\n >{{ dialogText.confirm }}</hm-button>\n </ng-container>\n</hm-modal>\n" }]
131
+ }], ctorParameters: () => [{ type: ModalService }, { type: i0.ChangeDetectorRef }], propDecorators: { content: [{
132
+ type: ViewChild,
133
+ args: ['content', { read: ViewContainerRef }]
134
+ }] } });
135
+
136
+ /**
137
+ * Generated bundle index. Do not edit.
138
+ */
139
+
140
+ export { ModalComponent, ModalService };
141
+ //# sourceMappingURL=trismegisto-spine-modal.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trismegisto-spine-modal.mjs","sources":["../../../projects/ui/modal/src/modal.service.ts","../../../projects/ui/modal/src/modal.component.ts","../../../projects/ui/modal/src/modal.component.html","../../../projects/ui/modal/src/trismegisto-spine-modal.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { HermesLoadingState } from '@trismegisto/angular';\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { ModalConfig } from './modal.types';\n\n@Injectable({ providedIn: 'root' })\nexport class ModalService {\n private _visible = new BehaviorSubject<boolean>(false);\n public readonly visible$: Observable<boolean> = this._visible.asObservable();\n\n private _state = new BehaviorSubject<HermesLoadingState>(HermesLoadingState.DEFAULT);\n public readonly state$: Observable<HermesLoadingState> = this._state.asObservable();\n\n private _config: ModalConfig | null = null;\n public get config(): ModalConfig | null {\n return this._config;\n }\n\n private _result$: Subject<any> | null = null;\n\n open<TResult = any, TData = any>(config: ModalConfig<TData>): Observable<TResult | null> {\n // Abrir outro antes de responder o anterior cancela o anterior: quem o abriu recebe `null` (como no\n // `close`) e o observable completa, em vez de ficar pendurado para sempre.\n this._result$?.next(null);\n this._result$?.complete();\n this._config = config;\n this._state.next(HermesLoadingState.DEFAULT);\n this._result$ = new Subject<TResult | null>();\n this._visible.next(true);\n return this._result$.asObservable().pipe(take(1));\n }\n\n confirm(result: any): void {\n this._result$?.next(result);\n this._result$?.complete();\n this.dismiss();\n }\n\n close(): void {\n this._result$?.next(null);\n this._result$?.complete();\n this.dismiss();\n }\n\n setState(state: HermesLoadingState): void {\n this._state.next(state);\n }\n\n private dismiss(): void {\n this._visible.next(false);\n this._config = null;\n this._result$ = null;\n this._state.next(HermesLoadingState.DEFAULT); // evita vazar LOADING pro próximo modal\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectorRef, Component, ComponentRef, OnInit, ViewChild, ViewContainerRef, ChangeDetectionStrategy, inject } from '@angular/core';\nimport { ButtonComponent, HERMES_MESSAGES, HermesLoadingState, ModalComponent as HermesModalComponent, ModalSize } from '@trismegisto/angular';\nimport { ModalConfig, ModalContent } from './modal.types';\nimport { ModalService } from './modal.service';\n\n/** `ModalConfig.size` manteve os valores do spine antigo (sm/md/lg/xl) por compatibilidade\n * de API com quem já chama `modalService.open(...)`; o DS novo só tem 3 tamanhos. */\nfunction toHermesSize(size: ModalConfig['size']): ModalSize {\n switch (size) {\n case 'sm': return 'small';\n case 'lg':\n case 'xl': return 'large';\n default: return 'medium';\n }\n}\n\n@Component({\n selector: 'spine-modal',\n imports: [CommonModule, HermesModalComponent, ButtonComponent],\n changeDetection: ChangeDetectionStrategy.Eager,\n templateUrl: './modal.component.html',\n})\nexport class ModalComponent implements OnInit {\n /** Rótulos dos botões padrão, do catálogo do Hermes (pt-BR/en/es). */\n protected readonly dialogText = inject(HERMES_MESSAGES).dialog;\n\n @ViewChild('content', { read: ViewContainerRef }) private content!: ViewContainerRef;\n\n visible = false;\n config: ModalConfig | null = null;\n state: HermesLoadingState = HermesLoadingState.DEFAULT;\n\n protected readonly HermesLoadingState = HermesLoadingState;\n protected readonly toHermesSize = toHermesSize;\n\n private contentRef: ComponentRef<ModalContent> | null = null;\n\n constructor(private modalService: ModalService, private cdr: ChangeDetectorRef) {}\n\n ngOnInit(): void {\n this.modalService.visible$.subscribe((visible) => {\n this.visible = visible;\n this.config = this.modalService.config;\n if (visible) {\n this.loadComponent();\n } else {\n this.content?.clear();\n this.contentRef = null;\n }\n this.cdr.markForCheck();\n });\n\n this.modalService.state$.subscribe((state) => {\n this.state = state;\n this.cdr.markForCheck();\n });\n }\n\n get canConfirm(): boolean {\n const instance = this.contentRef?.instance;\n return !instance?.isValid || instance.isValid();\n }\n\n private loadComponent(): void {\n this.content.clear();\n if (this.config?.component) {\n this.contentRef = this.content.createComponent(this.config.component);\n if (this.config.data !== undefined) {\n this.contentRef.setInput('data', this.config.data);\n }\n }\n }\n\n confirm(): void {\n if (!this.canConfirm) return;\n const result = this.contentRef?.instance?.getResult ? this.contentRef.instance.getResult() : true;\n this.modalService.confirm(result);\n }\n\n dismiss(): void {\n this.modalService.close();\n }\n\n onLoadingStateChange(state: HermesLoadingState): void {\n this.modalService.setState(state);\n }\n}\n","<hm-modal\n [open]=\"visible\"\n [heading]=\"config?.title || ''\"\n [size]=\"toHermesSize(config?.size)\"\n [closable]=\"config?.closable ?? true\"\n (closed)=\"dismiss()\"\n>\n <ng-container #content />\n <div *ngIf=\"config?.text && !config?.component\">{{ config?.text }}</div>\n\n <ng-container footer *ngIf=\"config?.showActions !== false\">\n <hm-button emphasis=\"medium\" (clicked)=\"dismiss()\">{{ dialogText.cancel }}</hm-button>\n <hm-button\n intent=\"success\"\n [disabled]=\"!canConfirm\"\n [loadingState]=\"state\"\n (loadingStateChange)=\"onLoadingStateChange($event)\"\n (clicked)=\"confirm()\"\n >{{ dialogText.confirm }}</hm-button>\n </ng-container>\n</hm-modal>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ModalService","HermesModalComponent"],"mappings":";;;;;;;;MAOa,YAAY,CAAA;AADzB,IAAA,WAAA,GAAA;AAEU,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC;AACtC,QAAA,IAAA,CAAA,QAAQ,GAAwB,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE;QAEpE,IAAA,CAAA,MAAM,GAAG,IAAI,eAAe,CAAqB,kBAAkB,CAAC,OAAO,CAAC;AACpE,QAAA,IAAA,CAAA,MAAM,GAAmC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;QAE3E,IAAA,CAAA,OAAO,GAAuB,IAAI;QAKlC,IAAA,CAAA,QAAQ,GAAwB,IAAI;AAoC7C,IAAA;AAxCC,IAAA,IAAW,MAAM,GAAA;QACf,OAAO,IAAI,CAAC,OAAO;IACrB;AAIA,IAAA,IAAI,CAA6B,MAA0B,EAAA;;;AAGzD,QAAA,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC;AACzB,QAAA,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE;AACzB,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM;QACrB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC;AAC5C,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,OAAO,EAAkB;AAC7C,QAAA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lD,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,SAAS;+BACE,aAAa,EAAA,OAAA,EACd,CAAC,YAAY,EAAEA,gBAAoB,EAAE,eAAe,CAAC,EAAA,eAAA,EAC7C,uBAAuB,CAAC,KAAK,EAAA,QAAA,EAAA,0tBAAA,EAAA;;sBAO7C,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,SAAS,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;;;AE3BlD;;AAEG;;"}
@@ -0,0 +1,122 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, DestroyRef, Injectable, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { BehaviorSubject } from 'rxjs';
4
+ import { SPINE_MESSAGES } from '@trismegisto/spine';
5
+ import * as i2 from '@angular/common';
6
+ import { CommonModule } from '@angular/common';
7
+ import { AlertComponent } from '@trismegisto/angular';
8
+
9
+ var AlertType;
10
+ (function (AlertType) {
11
+ AlertType["INFO"] = "info";
12
+ AlertType["WARNING"] = "warning";
13
+ AlertType["SUCCESS"] = "success";
14
+ AlertType["DANGER"] = "danger";
15
+ })(AlertType || (AlertType = {}));
16
+
17
+ const JWT_RE = /eyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}/g;
18
+ const TOKEN_FLAG_RE = /(--token=|--password=|token=|password=)\S+/gi;
19
+ const BEARER_RE = /(bearer\s+)[A-Za-z0-9._-]+/gi;
20
+ function redactSecrets(text) {
21
+ return String(text ?? '')
22
+ .replace(JWT_RE, '***')
23
+ .replace(TOKEN_FLAG_RE, '$1***')
24
+ .replace(BEARER_RE, '$1***');
25
+ }
26
+
27
+ class NotificationService {
28
+ constructor() {
29
+ this.text = inject(SPINE_MESSAGES).notification;
30
+ this._notifications = new BehaviorSubject([]);
31
+ this.notifications$ = this._notifications.asObservable();
32
+ /** Relógio da expiração: só corre enquanto há notificação na tela (antes era um `setInterval` eterno,
33
+ * nunca limpo — acordava a página a cada segundo e sobrevivia ao injetor). */
34
+ this.timer = null;
35
+ inject(DestroyRef).onDestroy(() => this.stopClock());
36
+ }
37
+ /**
38
+ * O `status` do envelope `{ status, message, data }` dos GraphQL decide o tipo do toast — o mesmo
39
+ * contrato em todo app: 2xx sucesso, 3xx atenção (concluiu com ressalva), 4xx/5xx erro, o resto
40
+ * informação. Por faixa (antes era só 200/300/400/500 exatos — continuam dando o mesmo resultado).
41
+ */
42
+ resolveAlertType(status) {
43
+ if (status >= 200 && status < 300)
44
+ return AlertType.SUCCESS;
45
+ if (status >= 300 && status < 400)
46
+ return AlertType.WARNING;
47
+ if (status >= 400 && status < 600)
48
+ return AlertType.DANGER;
49
+ return AlertType.INFO;
50
+ }
51
+ addNotification(notification) {
52
+ const message = redactSecrets(notification.message);
53
+ const hermesAlertType = typeof notification.hermesAlertType === 'number'
54
+ ? this.resolveAlertType(notification.hermesAlertType)
55
+ : notification.hermesAlertType;
56
+ const expirer = Date.now() + notification.timer * 1000;
57
+ const next = { ...notification, message, hermesAlertType, expirer };
58
+ this._notifications.next([...this._notifications.value, next]);
59
+ this.timer ??= setInterval(() => this.expireNotifications(), 1000);
60
+ }
61
+ processErrorNotification() {
62
+ this.addNotification({
63
+ timer: 5,
64
+ hermesAlertType: AlertType.DANGER,
65
+ message: this.text.genericError,
66
+ hermesAlertClosable: false,
67
+ });
68
+ }
69
+ expireNotifications() {
70
+ const now = Date.now();
71
+ const remaining = this._notifications.value.filter((n) => (n.expirer ?? 0) >= now);
72
+ if (remaining.length !== this._notifications.value.length) {
73
+ this._notifications.next(remaining);
74
+ }
75
+ if (remaining.length === 0)
76
+ this.stopClock();
77
+ }
78
+ stopClock() {
79
+ if (this.timer !== null)
80
+ clearInterval(this.timer);
81
+ this.timer = null;
82
+ }
83
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
84
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: NotificationService, providedIn: 'root' }); }
85
+ }
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: NotificationService, decorators: [{
87
+ type: Injectable,
88
+ args: [{ providedIn: 'root' }]
89
+ }], ctorParameters: () => [] });
90
+
91
+ /** `AlertType.DANGER` (nome do spine antigo, preservado na API pública) mapeia pra `'error'`
92
+ * no `AlertVariant` do DS novo — os outros 3 valores já coincidem 1:1. */
93
+ function toAlertVariant(type) {
94
+ return type === AlertType.DANGER ? 'error' : type;
95
+ }
96
+ class NotificationComponent {
97
+ constructor(notificationService, cdr) {
98
+ this.notificationService = notificationService;
99
+ this.cdr = cdr;
100
+ this.notifications = [];
101
+ this.toAlertVariant = toAlertVariant;
102
+ }
103
+ ngOnInit() {
104
+ this.notificationService.notifications$.subscribe((notifications) => {
105
+ this.notifications = notifications;
106
+ this.cdr.markForCheck();
107
+ });
108
+ }
109
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: NotificationComponent, deps: [{ token: NotificationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
110
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.24", type: NotificationComponent, isStandalone: true, selector: "spine-notification", ngImport: i0, template: "<hm-alert *ngFor=\"let notification of notifications\" [variant]=\"toAlertVariant(notification.hermesAlertType)\" [closable]=\"notification.hermesAlertClosable ?? true\">\n <span class=\"alert-text\">{{ notification.message }}</span>\n</hm-alert>\n", styles: [":host{position:fixed;top:calc(var(--hm-header-height, 3rem) + 1rem);right:1rem;z-index:1030;display:flex;flex-direction:column;gap:.5rem;max-width:380px;pointer-events:none}:host ::ng-deep hm-alert{pointer-events:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: AlertComponent, selector: "hm-alert", inputs: ["variant", "appearance", "heading", "closable", "size", "showIcon", "link", "linkLabel", "linkTarget", "dismissKey", "duration"], outputs: ["closed"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
111
+ }
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: NotificationComponent, decorators: [{
113
+ type: Component,
114
+ args: [{ selector: 'spine-notification', imports: [CommonModule, AlertComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<hm-alert *ngFor=\"let notification of notifications\" [variant]=\"toAlertVariant(notification.hermesAlertType)\" [closable]=\"notification.hermesAlertClosable ?? true\">\n <span class=\"alert-text\">{{ notification.message }}</span>\n</hm-alert>\n", styles: [":host{position:fixed;top:calc(var(--hm-header-height, 3rem) + 1rem);right:1rem;z-index:1030;display:flex;flex-direction:column;gap:.5rem;max-width:380px;pointer-events:none}:host ::ng-deep hm-alert{pointer-events:auto}\n"] }]
115
+ }], ctorParameters: () => [{ type: NotificationService }, { type: i0.ChangeDetectorRef }] });
116
+
117
+ /**
118
+ * Generated bundle index. Do not edit.
119
+ */
120
+
121
+ export { AlertType, NotificationComponent, NotificationService };
122
+ //# sourceMappingURL=trismegisto-spine-notification.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trismegisto-spine-notification.mjs","sources":["../../../projects/ui/notification/src/notification.types.ts","../../../projects/ui/notification/src/redact-secrets.ts","../../../projects/ui/notification/src/notification.service.ts","../../../projects/ui/notification/src/notification.component.ts","../../../projects/ui/notification/src/notification.component.html","../../../projects/ui/notification/src/trismegisto-spine-notification.ts"],"sourcesContent":["export enum AlertType {\n INFO = 'info',\n WARNING = 'warning',\n SUCCESS = 'success',\n DANGER = 'danger',\n}\n\nexport interface Notification {\n timer: number;\n expirer?: number;\n hermesAlertType: AlertType;\n message: string;\n hermesAlertAppLevel?: boolean;\n hermesAlertClosable?: boolean;\n}\n","const JWT_RE = /eyJ[A-Za-z0-9_-]{6,}\\.[A-Za-z0-9_-]{6,}\\.[A-Za-z0-9_-]{6,}/g;\nconst TOKEN_FLAG_RE = /(--token=|--password=|token=|password=)\\S+/gi;\nconst BEARER_RE = /(bearer\\s+)[A-Za-z0-9._-]+/gi;\n\nexport function redactSecrets(text: unknown): string {\n return String(text ?? '')\n .replace(JWT_RE, '***')\n .replace(TOKEN_FLAG_RE, '$1***')\n .replace(BEARER_RE, '$1***');\n}\n","import { DestroyRef, Injectable, inject } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { redactSecrets } from './redact-secrets';\nimport { AlertType, Notification } from './notification.types';\nimport { SPINE_MESSAGES } from '@trismegisto/spine';\n\nexport type NotificationInput = Omit<Notification, 'hermesAlertType' | 'expirer'> & {\n hermesAlertType: AlertType | number;\n};\n\n@Injectable({ providedIn: 'root' })\nexport class NotificationService {\n private readonly text = inject(SPINE_MESSAGES).notification;\n private _notifications = new BehaviorSubject<Notification[]>([]);\n public readonly notifications$: Observable<Notification[]> = this._notifications.asObservable();\n\n /** Relógio da expiração: só corre enquanto há notificação na tela (antes era um `setInterval` eterno,\n * nunca limpo — acordava a página a cada segundo e sobrevivia ao injetor). */\n private timer: ReturnType<typeof setInterval> | null = null;\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.stopClock());\n }\n\n /**\n * O `status` do envelope `{ status, message, data }` dos GraphQL decide o tipo do toast — o mesmo\n * contrato em todo app: 2xx sucesso, 3xx atenção (concluiu com ressalva), 4xx/5xx erro, o resto\n * informação. Por faixa (antes era só 200/300/400/500 exatos — continuam dando o mesmo resultado).\n */\n resolveAlertType(status: number): AlertType {\n if (status >= 200 && status < 300) return AlertType.SUCCESS;\n if (status >= 300 && status < 400) return AlertType.WARNING;\n if (status >= 400 && status < 600) return AlertType.DANGER;\n return AlertType.INFO;\n }\n\n addNotification(notification: NotificationInput): void {\n const message = redactSecrets(notification.message);\n const hermesAlertType =\n typeof notification.hermesAlertType === 'number'\n ? this.resolveAlertType(notification.hermesAlertType)\n : notification.hermesAlertType;\n\n const expirer = Date.now() + notification.timer * 1000;\n const next: Notification = { ...notification, message, hermesAlertType, expirer };\n this._notifications.next([...this._notifications.value, next]);\n this.timer ??= setInterval(() => this.expireNotifications(), 1000);\n }\n\n processErrorNotification(): void {\n this.addNotification({\n timer: 5,\n hermesAlertType: AlertType.DANGER,\n message: this.text.genericError,\n hermesAlertClosable: false,\n });\n }\n\n private expireNotifications(): void {\n const now = Date.now();\n const remaining = this._notifications.value.filter((n) => (n.expirer ?? 0) >= now);\n if (remaining.length !== this._notifications.value.length) {\n this._notifications.next(remaining);\n }\n if (remaining.length === 0) this.stopClock();\n }\n\n private stopClock(): void {\n if (this.timer !== null) clearInterval(this.timer);\n this.timer = null;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectorRef, Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\nimport { AlertComponent, AlertVariant } from '@trismegisto/angular';\nimport { AlertType, Notification } from './notification.types';\nimport { NotificationService } from './notification.service';\n\n/** `AlertType.DANGER` (nome do spine antigo, preservado na API pública) mapeia pra `'error'`\n * no `AlertVariant` do DS novo — os outros 3 valores já coincidem 1:1. */\nfunction toAlertVariant(type: AlertType): AlertVariant {\n return type === AlertType.DANGER ? 'error' : type;\n}\n\n@Component({\n selector: 'spine-notification',\n imports: [CommonModule, AlertComponent],\n templateUrl: './notification.component.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n styleUrl: './notification.component.scss',\n})\nexport class NotificationComponent implements OnInit {\n notifications: Notification[] = [];\n\n protected readonly toAlertVariant = toAlertVariant;\n\n constructor(public notificationService: NotificationService, private cdr: ChangeDetectorRef) {}\n\n ngOnInit(): void {\n this.notificationService.notifications$.subscribe((notifications) => {\n this.notifications = notifications;\n this.cdr.markForCheck();\n });\n }\n}\n","<hm-alert *ngFor=\"let notification of notifications\" [variant]=\"toAlertVariant(notification.hermesAlertType)\" [closable]=\"notification.hermesAlertClosable ?? true\">\n <span class=\"alert-text\">{{ notification.message }}</span>\n</hm-alert>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NotificationService"],"mappings":";;;;;;;;IAAY;AAAZ,CAAA,UAAY,SAAS,EAAA;AACnB,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACnB,CAAC,EALW,SAAS,KAAT,SAAS,GAAA,EAAA,CAAA,CAAA;;ACArB,MAAM,MAAM,GAAG,6DAA6D;AAC5E,MAAM,aAAa,GAAG,8CAA8C;AACpE,MAAM,SAAS,GAAG,8BAA8B;AAE1C,SAAU,aAAa,CAAC,IAAa,EAAA;AACzC,IAAA,OAAO,MAAM,CAAC,IAAI,IAAI,EAAE;AACrB,SAAA,OAAO,CAAC,MAAM,EAAE,KAAK;AACrB,SAAA,OAAO,CAAC,aAAa,EAAE,OAAO;AAC9B,SAAA,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC;AAChC;;MCEa,mBAAmB,CAAA;AAS9B,IAAA,WAAA,GAAA;AARiB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,YAAY;AACnD,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,eAAe,CAAiB,EAAE,CAAC;AAChD,QAAA,IAAA,CAAA,cAAc,GAA+B,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE;AAE/F;AAC+E;QACvE,IAAA,CAAA,KAAK,GAA0C,IAAI;AAGzD,QAAA,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;IACtD;AAEA;;;;AAIG;AACH,IAAA,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