@ngx-smz/core 19.3.4 → 19.3.6

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.
@@ -183,13 +183,6 @@ function provideSmzCoreLogging(initializers) {
183
183
  return makeEnvironmentProviders([...providers, initializer]);
184
184
  }
185
185
 
186
- // Definição de scopes possíveis como enum
187
- var LoggingScope;
188
- (function (LoggingScope) {
189
- LoggingScope["None"] = "None";
190
- LoggingScope["Forms"] = "Forms";
191
- })(LoggingScope || (LoggingScope = {}));
192
-
193
186
  // logging.service.ts
194
187
  class LoggingService {
195
188
  configFn = inject(SMZ_CORE_LOGGING_CONFIG).logging;
@@ -221,7 +214,7 @@ class LoggingService {
221
214
  // respeita scopes se fornecido
222
215
  const scopes = cfg.restrictedScopes;
223
216
  if (scopes && scopes.length > 0 && owner) {
224
- if (!(scopes.includes(LoggingScope['*']) || scopes.includes(owner))) {
217
+ if (!(scopes.includes('*') || scopes.includes(owner))) {
225
218
  return false;
226
219
  }
227
220
  }
@@ -247,6 +240,16 @@ class LoggingService {
247
240
  return;
248
241
  console.debug(message, ...optionalParams);
249
242
  }
243
+ groupCollapsed(label) {
244
+ if (!this.enabled())
245
+ return;
246
+ console.groupCollapsed(label);
247
+ }
248
+ groupEnd() {
249
+ if (!this.enabled())
250
+ return;
251
+ console.groupEnd();
252
+ }
250
253
  /**
251
254
  * Retorna um logger com prefixo [owner] e restringe pelos scopes do config
252
255
  * owner agora é um LoggingScope
@@ -273,6 +276,16 @@ class LoggingService {
273
276
  if (!this.shouldLog('debug', owner))
274
277
  return;
275
278
  console.debug(prefix, msg, ...params);
279
+ },
280
+ groupCollapsed: (label) => {
281
+ if (!this.shouldLog('info', owner))
282
+ return;
283
+ console.groupCollapsed(prefix, label);
284
+ },
285
+ groupEnd: () => {
286
+ if (!this.shouldLog('info', owner))
287
+ return;
288
+ console.groupEnd();
276
289
  }
277
290
  };
278
291
  }
@@ -284,6 +297,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
284
297
  args: [{ providedIn: 'root' }]
285
298
  }] });
286
299
 
300
+ // Definição de scopes possíveis como enum
301
+ var LoggingScope;
302
+ (function (LoggingScope) {
303
+ LoggingScope["None"] = "None";
304
+ LoggingScope["Forms"] = "Forms";
305
+ })(LoggingScope || (LoggingScope = {}));
306
+
287
307
  var SmzControlType;
288
308
  (function (SmzControlType) {
289
309
  SmzControlType[SmzControlType["CALENDAR"] = 16] = "CALENDAR";