ngx-vector-components 6.27.0 → 6.28.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [6.28.0] (11/09/2026)
|
|
4
|
+
|
|
5
|
+
### Feat
|
|
6
|
+
|
|
7
|
+
- Added `AnalyticsService` (`services/analytics.service.ts`), moved from logtech: single point of contact with the GTM `dataLayer` and Microsoft Clarity. Public API: `pageView(url)`, `userAction(action, extra)`, `appEvent(action, extra)`; exported types `AnalyticsEvent`, `AnalyticsPage`, `AnalyticsUser`. Reads `ENVIRONMENT`, `APP_NAME` and `MENU_OPTIONS` (all optional) to fill `env`, `app`, `page_name` and `page_module`. Each app must call `pageView` on `NavigationEnd` in its `AppComponent`.
|
|
8
|
+
- Added optional `environmentLabel` to the `Environment` interface (`injections/index.ts`), used by `AnalyticsService` for the `env` field (`local`, `tst`, `hml`; `production` when `production` is `true`). No breaking change: apps that do not provide it fall back to `non-production`.
|
|
9
|
+
|
|
3
10
|
## [6.27.0] (08/09/2026)
|
|
4
11
|
|
|
5
12
|
### Feat
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Input, Component, Pipe, NgModule, InjectionToken, Injectable, Inject, EventEmitter, Output, ViewChild, signal, ViewEncapsulation, HostBinding, inject, HostListener, input, output
|
|
2
|
+
import { Input, Component, Pipe, NgModule, InjectionToken, Injectable, Inject, EventEmitter, Output, Optional, ViewChild, signal, ViewEncapsulation, HostBinding, inject, HostListener, input, output } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i2 from 'primeng/tooltip';
|
|
@@ -1999,6 +1999,329 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1999
1999
|
}]
|
|
2000
2000
|
}] });
|
|
2001
2001
|
|
|
2002
|
+
class StorageService {
|
|
2003
|
+
clear() {
|
|
2004
|
+
sessionStorage.clear();
|
|
2005
|
+
localStorage.clear();
|
|
2006
|
+
}
|
|
2007
|
+
clearSession() {
|
|
2008
|
+
sessionStorage.clear();
|
|
2009
|
+
}
|
|
2010
|
+
get(key) {
|
|
2011
|
+
const storageItem = localStorage.getItem(key);
|
|
2012
|
+
try {
|
|
2013
|
+
return storageItem ? JSON.parse(storageItem) : '';
|
|
2014
|
+
}
|
|
2015
|
+
catch (e) {
|
|
2016
|
+
return storageItem;
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
set(key, value) {
|
|
2020
|
+
localStorage.setItem(key, typeof value === 'string' ? value : JSON.stringify(value));
|
|
2021
|
+
}
|
|
2022
|
+
remove(key) {
|
|
2023
|
+
localStorage.removeItem(key);
|
|
2024
|
+
}
|
|
2025
|
+
getSession(key) {
|
|
2026
|
+
const storageItem = sessionStorage.getItem(key);
|
|
2027
|
+
try {
|
|
2028
|
+
return storageItem ? JSON.parse(storageItem) : '';
|
|
2029
|
+
}
|
|
2030
|
+
catch (e) {
|
|
2031
|
+
return storageItem;
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
setSession(key, value) {
|
|
2035
|
+
sessionStorage.setItem(key, typeof value === 'string' ? value : JSON.stringify(value));
|
|
2036
|
+
}
|
|
2037
|
+
removeSession(key) {
|
|
2038
|
+
sessionStorage.removeItem(key);
|
|
2039
|
+
}
|
|
2040
|
+
getToken() {
|
|
2041
|
+
return localStorage.getItem('token') || '';
|
|
2042
|
+
}
|
|
2043
|
+
setToken(token) {
|
|
2044
|
+
localStorage.setItem('token', token);
|
|
2045
|
+
}
|
|
2046
|
+
removeToken() {
|
|
2047
|
+
localStorage.removeItem('token');
|
|
2048
|
+
}
|
|
2049
|
+
getRefreshToken() {
|
|
2050
|
+
return sessionStorage.getItem('refreshToken') || '';
|
|
2051
|
+
}
|
|
2052
|
+
setRefreshToken(refreshToken) {
|
|
2053
|
+
sessionStorage.setItem('refreshToken', refreshToken);
|
|
2054
|
+
}
|
|
2055
|
+
removeRefreshToken() {
|
|
2056
|
+
sessionStorage.removeItem('refreshToken');
|
|
2057
|
+
}
|
|
2058
|
+
getUsername() {
|
|
2059
|
+
return sessionStorage.getItem('username') || '';
|
|
2060
|
+
}
|
|
2061
|
+
setUsername(username) {
|
|
2062
|
+
sessionStorage.setItem('username', username);
|
|
2063
|
+
}
|
|
2064
|
+
removeUsername() {
|
|
2065
|
+
sessionStorage.removeItem('username');
|
|
2066
|
+
}
|
|
2067
|
+
getUserId() {
|
|
2068
|
+
const userId = sessionStorage.getItem('userId');
|
|
2069
|
+
return userId ? +atob(userId) : 0;
|
|
2070
|
+
}
|
|
2071
|
+
setUserId(userId) {
|
|
2072
|
+
sessionStorage.setItem('userId', btoa(`${userId}`));
|
|
2073
|
+
}
|
|
2074
|
+
clearUserId() {
|
|
2075
|
+
sessionStorage.removeItem('userId');
|
|
2076
|
+
}
|
|
2077
|
+
getRole() {
|
|
2078
|
+
return atob(sessionStorage.getItem('role') || '');
|
|
2079
|
+
}
|
|
2080
|
+
setRole(role) {
|
|
2081
|
+
sessionStorage.setItem('role', role || '');
|
|
2082
|
+
}
|
|
2083
|
+
clearRole() {
|
|
2084
|
+
sessionStorage.removeItem('role');
|
|
2085
|
+
}
|
|
2086
|
+
getProfile() {
|
|
2087
|
+
const data = sessionStorage.getItem('profile') || '';
|
|
2088
|
+
return data ? JSON.parse(data) : data;
|
|
2089
|
+
}
|
|
2090
|
+
setProfile(profiles) {
|
|
2091
|
+
sessionStorage.setItem('profile', JSON.stringify(profiles || ''));
|
|
2092
|
+
}
|
|
2093
|
+
removeProfile() {
|
|
2094
|
+
sessionStorage.removeItem('profile');
|
|
2095
|
+
}
|
|
2096
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: StorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2097
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: StorageService, providedIn: 'root' }); }
|
|
2098
|
+
}
|
|
2099
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: StorageService, decorators: [{
|
|
2100
|
+
type: Injectable,
|
|
2101
|
+
args: [{ providedIn: 'root' }]
|
|
2102
|
+
}] });
|
|
2103
|
+
|
|
2104
|
+
class AnalyticsService {
|
|
2105
|
+
static { this.ID_SEGMENT = /^(\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i; }
|
|
2106
|
+
static { this.MAX_LABEL_LENGTH = 60; }
|
|
2107
|
+
constructor(storageService, appName = null, menuOptions = null, environment = null) {
|
|
2108
|
+
this.storageService = storageService;
|
|
2109
|
+
this.appName = appName;
|
|
2110
|
+
this.menuOptions = menuOptions;
|
|
2111
|
+
this.environment = environment;
|
|
2112
|
+
this.currentPage = { page_path: '', page_name: '', page_module: '' };
|
|
2113
|
+
if (!this.isProduction) {
|
|
2114
|
+
window.__analytics = this;
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
/**
|
|
2118
|
+
* Registra a troca de tela. Chamado apenas pelo AppComponent, no NavigationEnd.
|
|
2119
|
+
* Alem do `page_view`, sincroniza a identificacao do usuario no Clarity --
|
|
2120
|
+
* que precisa ser reenviada a cada rota por se tratar de uma SPA.
|
|
2121
|
+
*/
|
|
2122
|
+
pageView(url) {
|
|
2123
|
+
this.safely(() => {
|
|
2124
|
+
this.currentPage = this.resolvePage(url);
|
|
2125
|
+
const user = this.getUser();
|
|
2126
|
+
this.push({ event: 'page_view' }, user);
|
|
2127
|
+
this.syncClarity(this.currentPage, user);
|
|
2128
|
+
});
|
|
2129
|
+
}
|
|
2130
|
+
/**
|
|
2131
|
+
* INTERATIVO -- o usuario fez algo deliberado: clicou, buscou, exportou, salvou.
|
|
2132
|
+
* Chamado a mao pelo componente, no inicio do handler.
|
|
2133
|
+
*
|
|
2134
|
+
* @param action nome no formato `objeto_verbo`, sem repetir a tela (`page_name` ja vai junto)
|
|
2135
|
+
* @param extra `label` para o identificador do alvo, `context` para detalhe livre
|
|
2136
|
+
*
|
|
2137
|
+
* @example this.analyticsService.userAction('heat_map_search', { context: { uf: 'SP' } });
|
|
2138
|
+
*/
|
|
2139
|
+
userAction(action, extra = {}) {
|
|
2140
|
+
this.safely(() => {
|
|
2141
|
+
this.push({ event: 'user_action', action, interaction: true, ...extra });
|
|
2142
|
+
this.sendClarityEvent(action, extra['label']);
|
|
2143
|
+
});
|
|
2144
|
+
}
|
|
2145
|
+
/**
|
|
2146
|
+
* NAO INTERATIVO -- o sistema respondeu ou exibiu algo: resultado carregado,
|
|
2147
|
+
* lista vazia, erro de negocio, modal automatico.
|
|
2148
|
+
*
|
|
2149
|
+
* @example this.analyticsService.appEvent('heat_map_empty', { context: { points: 0 } });
|
|
2150
|
+
*/
|
|
2151
|
+
appEvent(action, extra = {}) {
|
|
2152
|
+
this.safely(() => this.push({ event: 'app_event', action, interaction: false, ...extra }));
|
|
2153
|
+
}
|
|
2154
|
+
push(payload, user = this.getUser()) {
|
|
2155
|
+
if (!this.isProduction) {
|
|
2156
|
+
console.debug('[analytics]', payload['event'], payload['action'] ?? this.currentPage.page_path);
|
|
2157
|
+
}
|
|
2158
|
+
this.dataLayer.push({
|
|
2159
|
+
app: this.appName ?? 'UNKNOWN',
|
|
2160
|
+
env: this.env,
|
|
2161
|
+
is_iframe: window.parent !== window,
|
|
2162
|
+
...this.currentPage,
|
|
2163
|
+
...user,
|
|
2164
|
+
...payload,
|
|
2165
|
+
});
|
|
2166
|
+
}
|
|
2167
|
+
get dataLayer() {
|
|
2168
|
+
const target = window;
|
|
2169
|
+
target.dataLayer = target.dataLayer || [];
|
|
2170
|
+
return target.dataLayer;
|
|
2171
|
+
}
|
|
2172
|
+
get isProduction() {
|
|
2173
|
+
return !!this.environment?.production;
|
|
2174
|
+
}
|
|
2175
|
+
get env() {
|
|
2176
|
+
if (this.isProduction) {
|
|
2177
|
+
return 'production';
|
|
2178
|
+
}
|
|
2179
|
+
return this.environment?.environmentLabel?.toLowerCase() || 'non-production';
|
|
2180
|
+
}
|
|
2181
|
+
getUser() {
|
|
2182
|
+
const info = this.storageService.getSession('userInfo') || {};
|
|
2183
|
+
return {
|
|
2184
|
+
user_id: this.storageService.getUserId() || undefined,
|
|
2185
|
+
profile_name: info.profileName,
|
|
2186
|
+
profile_type_id: info.profileTypeId,
|
|
2187
|
+
shipper_id: this.realId(info.shipper),
|
|
2188
|
+
carrier_id: this.realId(info.carrierId),
|
|
2189
|
+
is_etcd: !!info.isEtcd,
|
|
2190
|
+
};
|
|
2191
|
+
}
|
|
2192
|
+
realId(value) {
|
|
2193
|
+
return typeof value === 'number' && value > 0 ? value : undefined;
|
|
2194
|
+
}
|
|
2195
|
+
get clarity() {
|
|
2196
|
+
const candidate = window.clarity;
|
|
2197
|
+
return typeof candidate === 'function' ? candidate : undefined;
|
|
2198
|
+
}
|
|
2199
|
+
sendClarityEvent(action, label) {
|
|
2200
|
+
const clarity = this.clarity;
|
|
2201
|
+
if (!clarity) {
|
|
2202
|
+
return;
|
|
2203
|
+
}
|
|
2204
|
+
const name = [action, this.slug(String(label ?? ''))]
|
|
2205
|
+
.filter(Boolean)
|
|
2206
|
+
.join('_')
|
|
2207
|
+
.slice(0, AnalyticsService.MAX_LABEL_LENGTH);
|
|
2208
|
+
if (name) {
|
|
2209
|
+
clarity('event', name);
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
slug(value) {
|
|
2213
|
+
return value
|
|
2214
|
+
.normalize('NFD')
|
|
2215
|
+
.replace(/[̀-ͯ]/g, '')
|
|
2216
|
+
.toLowerCase()
|
|
2217
|
+
.replace(/[^a-z0-9]+/g, '_')
|
|
2218
|
+
.replace(/^_+|_+$/g, '');
|
|
2219
|
+
}
|
|
2220
|
+
syncClarity(page, user) {
|
|
2221
|
+
const clarity = this.clarity;
|
|
2222
|
+
if (!clarity) {
|
|
2223
|
+
return;
|
|
2224
|
+
}
|
|
2225
|
+
if (user.user_id) {
|
|
2226
|
+
// O proprio Clarity faz o hash do id no cliente antes de enviar.
|
|
2227
|
+
clarity('identify', String(user.user_id), undefined, page.page_path);
|
|
2228
|
+
}
|
|
2229
|
+
this.setClarityTag(clarity, 'app', this.appName);
|
|
2230
|
+
this.setClarityTag(clarity, 'env', this.env);
|
|
2231
|
+
this.setClarityTag(clarity, 'page_name', page.page_name);
|
|
2232
|
+
this.setClarityTag(clarity, 'profile_name', user.profile_name);
|
|
2233
|
+
this.setClarityTag(clarity, 'profile_type_id', user.profile_type_id);
|
|
2234
|
+
this.setClarityTag(clarity, 'shipper_id', user.shipper_id);
|
|
2235
|
+
}
|
|
2236
|
+
setClarityTag(clarity, key, value) {
|
|
2237
|
+
if (value === undefined || value === null || value === '') {
|
|
2238
|
+
return;
|
|
2239
|
+
}
|
|
2240
|
+
clarity('set', key, String(value));
|
|
2241
|
+
}
|
|
2242
|
+
resolvePage(url) {
|
|
2243
|
+
const path = this.normalizePath(url);
|
|
2244
|
+
const menu = this.findMenu(path);
|
|
2245
|
+
return {
|
|
2246
|
+
page_path: path,
|
|
2247
|
+
page_name: menu?.name || path,
|
|
2248
|
+
page_module: menu?.module || '',
|
|
2249
|
+
};
|
|
2250
|
+
}
|
|
2251
|
+
normalizePath(url) {
|
|
2252
|
+
const path = url.split('?')[0].split('#')[0];
|
|
2253
|
+
return path
|
|
2254
|
+
.split('/')
|
|
2255
|
+
.map((segment) => (AnalyticsService.ID_SEGMENT.test(segment) ? ':id' : segment))
|
|
2256
|
+
.join('/');
|
|
2257
|
+
}
|
|
2258
|
+
findMenu(path) {
|
|
2259
|
+
const index = this.getMenuIndex();
|
|
2260
|
+
const segments = path.split('/').filter(Boolean);
|
|
2261
|
+
for (let size = segments.length; size > 0; size--) {
|
|
2262
|
+
const candidate = `/${segments.slice(0, size).join('/')}`;
|
|
2263
|
+
const found = index.get(candidate);
|
|
2264
|
+
if (found) {
|
|
2265
|
+
return found;
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
return undefined;
|
|
2269
|
+
}
|
|
2270
|
+
getMenuIndex() {
|
|
2271
|
+
if (!this.menuIndex) {
|
|
2272
|
+
this.menuIndex = new Map();
|
|
2273
|
+
this.indexMenu(this.menuOptions || [], '');
|
|
2274
|
+
}
|
|
2275
|
+
return this.menuIndex;
|
|
2276
|
+
}
|
|
2277
|
+
/** Achata o menuOptions em `rota -> { nome da tela, modulo }`. */
|
|
2278
|
+
indexMenu(items, moduleLabel) {
|
|
2279
|
+
items.forEach((item) => {
|
|
2280
|
+
const currentModule = moduleLabel || item.label;
|
|
2281
|
+
if (item.route) {
|
|
2282
|
+
const key = this.normalizePath(`/${item.route}`);
|
|
2283
|
+
if (!this.menuIndex?.has(key)) {
|
|
2284
|
+
this.menuIndex?.set(key, { name: item.label, module: currentModule });
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
if (item.children?.length) {
|
|
2288
|
+
this.indexMenu(item.children, currentModule);
|
|
2289
|
+
}
|
|
2290
|
+
});
|
|
2291
|
+
}
|
|
2292
|
+
safely(operation) {
|
|
2293
|
+
try {
|
|
2294
|
+
operation();
|
|
2295
|
+
}
|
|
2296
|
+
catch (error) {
|
|
2297
|
+
if (!this.isProduction) {
|
|
2298
|
+
console.warn('[analytics] evento ignorado', error);
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AnalyticsService, deps: [{ token: StorageService }, { token: APP_NAME, optional: true }, { token: MENU_OPTIONS, optional: true }, { token: ENVIRONMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2303
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AnalyticsService, providedIn: 'root' }); }
|
|
2304
|
+
}
|
|
2305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AnalyticsService, decorators: [{
|
|
2306
|
+
type: Injectable,
|
|
2307
|
+
args: [{ providedIn: 'root' }]
|
|
2308
|
+
}], ctorParameters: () => [{ type: StorageService }, { type: AppName, decorators: [{
|
|
2309
|
+
type: Optional
|
|
2310
|
+
}, {
|
|
2311
|
+
type: Inject,
|
|
2312
|
+
args: [APP_NAME]
|
|
2313
|
+
}] }, { type: undefined, decorators: [{
|
|
2314
|
+
type: Optional
|
|
2315
|
+
}, {
|
|
2316
|
+
type: Inject,
|
|
2317
|
+
args: [MENU_OPTIONS]
|
|
2318
|
+
}] }, { type: undefined, decorators: [{
|
|
2319
|
+
type: Optional
|
|
2320
|
+
}, {
|
|
2321
|
+
type: Inject,
|
|
2322
|
+
args: [ENVIRONMENT]
|
|
2323
|
+
}] }] });
|
|
2324
|
+
|
|
2002
2325
|
class AuthService {
|
|
2003
2326
|
constructor(environment, http, storageService, profileService, activatedRoute) {
|
|
2004
2327
|
this.environment = environment;
|
|
@@ -2164,108 +2487,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2164
2487
|
args: [{ providedIn: 'root' }]
|
|
2165
2488
|
}] });
|
|
2166
2489
|
|
|
2167
|
-
class StorageService {
|
|
2168
|
-
clear() {
|
|
2169
|
-
sessionStorage.clear();
|
|
2170
|
-
localStorage.clear();
|
|
2171
|
-
}
|
|
2172
|
-
clearSession() {
|
|
2173
|
-
sessionStorage.clear();
|
|
2174
|
-
}
|
|
2175
|
-
get(key) {
|
|
2176
|
-
const storageItem = localStorage.getItem(key);
|
|
2177
|
-
try {
|
|
2178
|
-
return storageItem ? JSON.parse(storageItem) : '';
|
|
2179
|
-
}
|
|
2180
|
-
catch (e) {
|
|
2181
|
-
return storageItem;
|
|
2182
|
-
}
|
|
2183
|
-
}
|
|
2184
|
-
set(key, value) {
|
|
2185
|
-
localStorage.setItem(key, typeof value === 'string' ? value : JSON.stringify(value));
|
|
2186
|
-
}
|
|
2187
|
-
remove(key) {
|
|
2188
|
-
localStorage.removeItem(key);
|
|
2189
|
-
}
|
|
2190
|
-
getSession(key) {
|
|
2191
|
-
const storageItem = sessionStorage.getItem(key);
|
|
2192
|
-
try {
|
|
2193
|
-
return storageItem ? JSON.parse(storageItem) : '';
|
|
2194
|
-
}
|
|
2195
|
-
catch (e) {
|
|
2196
|
-
return storageItem;
|
|
2197
|
-
}
|
|
2198
|
-
}
|
|
2199
|
-
setSession(key, value) {
|
|
2200
|
-
sessionStorage.setItem(key, typeof value === 'string' ? value : JSON.stringify(value));
|
|
2201
|
-
}
|
|
2202
|
-
removeSession(key) {
|
|
2203
|
-
sessionStorage.removeItem(key);
|
|
2204
|
-
}
|
|
2205
|
-
getToken() {
|
|
2206
|
-
return localStorage.getItem('token') || '';
|
|
2207
|
-
}
|
|
2208
|
-
setToken(token) {
|
|
2209
|
-
localStorage.setItem('token', token);
|
|
2210
|
-
}
|
|
2211
|
-
removeToken() {
|
|
2212
|
-
localStorage.removeItem('token');
|
|
2213
|
-
}
|
|
2214
|
-
getRefreshToken() {
|
|
2215
|
-
return sessionStorage.getItem('refreshToken') || '';
|
|
2216
|
-
}
|
|
2217
|
-
setRefreshToken(refreshToken) {
|
|
2218
|
-
sessionStorage.setItem('refreshToken', refreshToken);
|
|
2219
|
-
}
|
|
2220
|
-
removeRefreshToken() {
|
|
2221
|
-
sessionStorage.removeItem('refreshToken');
|
|
2222
|
-
}
|
|
2223
|
-
getUsername() {
|
|
2224
|
-
return sessionStorage.getItem('username') || '';
|
|
2225
|
-
}
|
|
2226
|
-
setUsername(username) {
|
|
2227
|
-
sessionStorage.setItem('username', username);
|
|
2228
|
-
}
|
|
2229
|
-
removeUsername() {
|
|
2230
|
-
sessionStorage.removeItem('username');
|
|
2231
|
-
}
|
|
2232
|
-
getUserId() {
|
|
2233
|
-
const userId = sessionStorage.getItem('userId');
|
|
2234
|
-
return userId ? +atob(userId) : 0;
|
|
2235
|
-
}
|
|
2236
|
-
setUserId(userId) {
|
|
2237
|
-
sessionStorage.setItem('userId', btoa(`${userId}`));
|
|
2238
|
-
}
|
|
2239
|
-
clearUserId() {
|
|
2240
|
-
sessionStorage.removeItem('userId');
|
|
2241
|
-
}
|
|
2242
|
-
getRole() {
|
|
2243
|
-
return atob(sessionStorage.getItem('role') || '');
|
|
2244
|
-
}
|
|
2245
|
-
setRole(role) {
|
|
2246
|
-
sessionStorage.setItem('role', role || '');
|
|
2247
|
-
}
|
|
2248
|
-
clearRole() {
|
|
2249
|
-
sessionStorage.removeItem('role');
|
|
2250
|
-
}
|
|
2251
|
-
getProfile() {
|
|
2252
|
-
const data = sessionStorage.getItem('profile') || '';
|
|
2253
|
-
return data ? JSON.parse(data) : data;
|
|
2254
|
-
}
|
|
2255
|
-
setProfile(profiles) {
|
|
2256
|
-
sessionStorage.setItem('profile', JSON.stringify(profiles || ''));
|
|
2257
|
-
}
|
|
2258
|
-
removeProfile() {
|
|
2259
|
-
sessionStorage.removeItem('profile');
|
|
2260
|
-
}
|
|
2261
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: StorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2262
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: StorageService, providedIn: 'root' }); }
|
|
2263
|
-
}
|
|
2264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: StorageService, decorators: [{
|
|
2265
|
-
type: Injectable,
|
|
2266
|
-
args: [{ providedIn: 'root' }]
|
|
2267
|
-
}] });
|
|
2268
|
-
|
|
2269
2490
|
class ProfileService {
|
|
2270
2491
|
constructor(http, storageService) {
|
|
2271
2492
|
this.http = http;
|
|
@@ -6899,5 +7120,5 @@ const getSelectedCrudItemResolver = (routeSnapshot) => {
|
|
|
6899
7120
|
* Generated bundle index. Do not edit.
|
|
6900
7121
|
*/
|
|
6901
7122
|
|
|
6902
|
-
export { APP_NAME, AppName, AuthService, BadgeComponent, BadgeModule, BooleanType, BreadcrumbComponent, BreadcrumbModule, BreadcrumbService, ButtonComponent, CalendarComponent, CheckboxFieldComponent, CpfCnpjValidator, CrudBaseComponent, CrudBaseService, CrudFooterComponent, CrudHeaderComponent, CrudHeaderModule, CrudHistory, CrudHistoryComponent, CrudHistoryModule, CrudMode, CurrencyBrlPipe, CurrencyFieldComponent, DataTableComponent, DocumentType, DrawerComponent, DrawerModule, DropdownFieldComponent, ENVIRONMENT, EnumService, ErrorMessageService, FieldErrorMessageComponent, FieldType, FieldsModule, FileUtil, FiltersComponent, FooterModule, FormatDocumentPipe, GenericErrorModalComponent, GenericErrorModalModule, GenericModalComponent, GenericModalModule, GeolocationService, HttpInterceptorProvider, INPUT_FILE_ACCEPT_EXTENSIONS, InputFileComponent, InputNumberFieldComponent, InputOtpComponent, InputSwitchFieldComponent, LoadingService, MENU_OPTIONS, MaskPipe, MaskUtil, MenuComponent, MenuModule, MenuService, MessageStatus, ModalService, MultiselectFieldComponent, NotHiddenPipe, NotificationsService, ObjectUtil, OnlyActivePipe, PanelComponent, PanelModule, PercentageFieldComponent, PipesModule, ProfileModuleActionType, ProfileModuleType, ProfileService, ProfileTypeEnum, RadioButtonFieldComponent, RangeValueComponent, RemoveLastChildPipe, Role, ScoreComponent, ScoreModule, SearchFieldComponent, SelectButtonFieldComponent, SelectionType, SnackbarComponent, SnackbarModule, Status, StepperComponent, StepperModule, StorageService, StringUtil, SubMenusListComponent, TableColumnType, TextFieldComponent, TextareaFieldComponent, TopBarComponent, TopBarModule, UnreadNotificationsPipe, ValidationUtil, VectorPreset, View, WindowUtil, createUploadMultipleForm, createUploadSingleForm, crudListHasItemsGuard, getSelectedCrudItemResolver, getTokenByGuidGuard, hasPermissionGuard, provideVectorPrimeNG, roleGuard, tokenIsPresentGuard };
|
|
7123
|
+
export { APP_NAME, AnalyticsService, AppName, AuthService, BadgeComponent, BadgeModule, BooleanType, BreadcrumbComponent, BreadcrumbModule, BreadcrumbService, ButtonComponent, CalendarComponent, CheckboxFieldComponent, CpfCnpjValidator, CrudBaseComponent, CrudBaseService, CrudFooterComponent, CrudHeaderComponent, CrudHeaderModule, CrudHistory, CrudHistoryComponent, CrudHistoryModule, CrudMode, CurrencyBrlPipe, CurrencyFieldComponent, DataTableComponent, DocumentType, DrawerComponent, DrawerModule, DropdownFieldComponent, ENVIRONMENT, EnumService, ErrorMessageService, FieldErrorMessageComponent, FieldType, FieldsModule, FileUtil, FiltersComponent, FooterModule, FormatDocumentPipe, GenericErrorModalComponent, GenericErrorModalModule, GenericModalComponent, GenericModalModule, GeolocationService, HttpInterceptorProvider, INPUT_FILE_ACCEPT_EXTENSIONS, InputFileComponent, InputNumberFieldComponent, InputOtpComponent, InputSwitchFieldComponent, LoadingService, MENU_OPTIONS, MaskPipe, MaskUtil, MenuComponent, MenuModule, MenuService, MessageStatus, ModalService, MultiselectFieldComponent, NotHiddenPipe, NotificationsService, ObjectUtil, OnlyActivePipe, PanelComponent, PanelModule, PercentageFieldComponent, PipesModule, ProfileModuleActionType, ProfileModuleType, ProfileService, ProfileTypeEnum, RadioButtonFieldComponent, RangeValueComponent, RemoveLastChildPipe, Role, ScoreComponent, ScoreModule, SearchFieldComponent, SelectButtonFieldComponent, SelectionType, SnackbarComponent, SnackbarModule, Status, StepperComponent, StepperModule, StorageService, StringUtil, SubMenusListComponent, TableColumnType, TextFieldComponent, TextareaFieldComponent, TopBarComponent, TopBarModule, UnreadNotificationsPipe, ValidationUtil, VectorPreset, View, WindowUtil, createUploadMultipleForm, createUploadSingleForm, crudListHasItemsGuard, getSelectedCrudItemResolver, getTokenByGuidGuard, hasPermissionGuard, provideVectorPrimeNG, roleGuard, tokenIsPresentGuard };
|
|
6903
7124
|
//# sourceMappingURL=ngx-vector-components.mjs.map
|