monkey-front-core 0.0.52 → 0.0.56

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.
@@ -5,7 +5,7 @@ import { MonkeyButtonModule, MonkeyIconModule, MonkeyInputModule, MonkeyModalMod
5
5
  import * as i2 from '@angular/common';
6
6
  import { formatNumber, CurrencyPipe, CommonModule } from '@angular/common';
7
7
  import * as i1$1 from '@ngx-translate/core';
8
- import { TranslateModule, TranslateService } from '@ngx-translate/core';
8
+ import { TranslateService, TranslateModule } from '@ngx-translate/core';
9
9
  import * as moment$2 from 'moment';
10
10
  import * as i1$2 from 'ngx-cookie-service';
11
11
  import * as i1$3 from '@angular/router';
@@ -569,6 +569,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
569
569
  }]
570
570
  }] });
571
571
 
572
+ class MonkeyEcxFormatDateGroupPipe {
573
+ constructor(injector) {
574
+ this.injector = injector;
575
+ this.lang = 'pt-BR';
576
+ const translateService = this.injector.get(TranslateService);
577
+ this.lang = translateService.getDefaultLang();
578
+ }
579
+ format(date) {
580
+ if (!MonkeyEcxUtils.persistNullEmptyUndefined(date))
581
+ return '';
582
+ let stillUtc = moment$2.utc(date).toDate();
583
+ if (date.toString()?.indexOf(':') <= -1) {
584
+ stillUtc = date;
585
+ }
586
+ const formatFrom = 'YYYY/MM/DD';
587
+ const fmt = moment$2(stillUtc, formatFrom).locale(this.lang);
588
+ const dayFormated = fmt.format('DD/');
589
+ const monthFormated = MonkeyEcxUtils.capitalize(fmt.format('MMMM'));
590
+ const yearFormated = fmt.format('YYYY');
591
+ return `${`${dayFormated}${monthFormated}`.substring(0, 6)}, ${yearFormated}`;
592
+ }
593
+ transform(obj) {
594
+ if (!obj || !obj?.start || !obj?.end)
595
+ return '';
596
+ const { start, end } = obj;
597
+ const formatedStart = this.format(start);
598
+ const formatedEnd = this.format(end);
599
+ return `${formatedStart} - ${formatedEnd}`;
600
+ }
601
+ }
602
+ MonkeyEcxFormatDateGroupPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDateGroupPipe, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Pipe });
603
+ MonkeyEcxFormatDateGroupPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDateGroupPipe, name: "monkeyecxFormatDateGroup" });
604
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDateGroupPipe, decorators: [{
605
+ type: Pipe,
606
+ args: [{
607
+ name: 'monkeyecxFormatDateGroup',
608
+ }]
609
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
610
+
572
611
  class MonkeyEcxPipesModule {
573
612
  }
574
613
  MonkeyEcxPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -577,6 +616,7 @@ MonkeyEcxPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ve
577
616
  MonkeyEcxFormatCurrencyPipe,
578
617
  MonkeyEcxFormatDateTimelapsePipe,
579
618
  MonkeyEcxFormatDatePipe,
619
+ MonkeyEcxFormatDateGroupPipe,
580
620
  MonkeyEcxFormatDocumentPipe,
581
621
  MonkeyEcxFormatNumberPipe,
582
622
  MonkeyEcxFormatPhonePipe,
@@ -590,6 +630,7 @@ MonkeyEcxPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ve
590
630
  MonkeyEcxFormatCurrencyPipe,
591
631
  MonkeyEcxFormatDateTimelapsePipe,
592
632
  MonkeyEcxFormatDatePipe,
633
+ MonkeyEcxFormatDateGroupPipe,
593
634
  MonkeyEcxFormatDocumentPipe,
594
635
  MonkeyEcxFormatNumberPipe,
595
636
  MonkeyEcxFormatPhonePipe,
@@ -609,6 +650,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
609
650
  MonkeyEcxFormatCurrencyPipe,
610
651
  MonkeyEcxFormatDateTimelapsePipe,
611
652
  MonkeyEcxFormatDatePipe,
653
+ MonkeyEcxFormatDateGroupPipe,
612
654
  MonkeyEcxFormatDocumentPipe,
613
655
  MonkeyEcxFormatNumberPipe,
614
656
  MonkeyEcxFormatPhonePipe,
@@ -617,7 +659,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
617
659
  MonkeyEcxFormatValue,
618
660
  MonkeyEcxFormatZipCodePipe,
619
661
  MonkeyEcxTextTruncatePipe,
620
- MonkeyEcxTruncateQtdPipe
662
+ MonkeyEcxTruncateQtdPipe,
621
663
  ],
622
664
  exports: [
623
665
  MonkeyEcxDisplayFirstNamePipe,
@@ -625,6 +667,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
625
667
  MonkeyEcxFormatCurrencyPipe,
626
668
  MonkeyEcxFormatDateTimelapsePipe,
627
669
  MonkeyEcxFormatDatePipe,
670
+ MonkeyEcxFormatDateGroupPipe,
628
671
  MonkeyEcxFormatDocumentPipe,
629
672
  MonkeyEcxFormatNumberPipe,
630
673
  MonkeyEcxFormatPhonePipe,
@@ -633,9 +676,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
633
676
  MonkeyEcxFormatValue,
634
677
  MonkeyEcxFormatZipCodePipe,
635
678
  MonkeyEcxTextTruncatePipe,
636
- MonkeyEcxTruncateQtdPipe
679
+ MonkeyEcxTruncateQtdPipe,
637
680
  ],
638
- providers: [CurrencyPipe]
681
+ providers: [CurrencyPipe],
639
682
  }]
640
683
  }] });
641
684
 
@@ -2264,6 +2307,7 @@ class MonkeyEcxi18nConfigService extends MonkeyEcxCommonsService {
2264
2307
  apply(params, environment, change = false) {
2265
2308
  const { monkeyecxService, monkeyecxCookieStorageService, monkeyecxErrorConfigService } = this;
2266
2309
  let { i18n } = params;
2310
+ const externali18n = params?.externali18n?.[`${i18n?.lang || 'pt-BR'}`];
2267
2311
  const cookie = monkeyecxCookieStorageService.getCookie('monkey-app-locale');
2268
2312
  if (cookie && !change) {
2269
2313
  i18n = JSON.parse(atob(cookie));
@@ -2274,7 +2318,14 @@ class MonkeyEcxi18nConfigService extends MonkeyEcxCommonsService {
2274
2318
  change = true;
2275
2319
  }
2276
2320
  monkeyecxService?.get(`${environment.localAssets}/i18n/${i18n?.lang}.json`)?.subscribe((config) => {
2277
- const { lang, data } = config;
2321
+ const { lang } = config;
2322
+ let { data } = config;
2323
+ if (externali18n) {
2324
+ data = {
2325
+ ...data,
2326
+ EXTERNAL: externali18n,
2327
+ };
2328
+ }
2278
2329
  this.translateService.setTranslation(lang, data, true);
2279
2330
  this.translateService.use(lang);
2280
2331
  if (change)
@@ -2291,17 +2342,17 @@ MonkeyEcxi18nConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12
2291
2342
  __decorate([
2292
2343
  MonkeyEcxCoreService({
2293
2344
  httpResponse: {
2294
- httpCodeIgnore: [404]
2345
+ httpCodeIgnore: [404],
2295
2346
  },
2296
2347
  requestInProgress: {
2297
- showProgress: false
2298
- }
2348
+ showProgress: false,
2349
+ },
2299
2350
  })
2300
2351
  ], MonkeyEcxi18nConfigService.prototype, "apply", null);
2301
2352
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxi18nConfigService, decorators: [{
2302
2353
  type: Injectable,
2303
2354
  args: [{
2304
- providedIn: 'root'
2355
+ providedIn: 'root',
2305
2356
  }]
2306
2357
  }], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: i1$1.TranslateService }, { type: MonkeyEcxCookieStorageService }, { type: MonkeyEcxErrorConfigService }]; }, propDecorators: { apply: [] } });
2307
2358
 
@@ -2614,9 +2665,10 @@ class MonkeyEcxTokenStorageService {
2614
2665
  companyType: '',
2615
2666
  programAdmin: false,
2616
2667
  programType: '',
2668
+ accessType: '',
2617
2669
  role: '',
2618
2670
  _clearIgnore: {
2619
- ignore: ['username', 'program'],
2671
+ ignore: ['username', 'program', 'accessType'],
2620
2672
  },
2621
2673
  };
2622
2674
  this.token$ = new BehaviorSubject(null);
@@ -4234,5 +4286,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
4234
4286
  * Generated bundle index. Do not edit.
4235
4287
  */
4236
4288
 
4237
- export { ClosedToMaintenanceComponent, ClosedToMaintenanceModule, decoratorsUtils as DecoratorsUtils, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDatePipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPipesModule, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModuleModule, OpSearch, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
4289
+ export { ClosedToMaintenanceComponent, ClosedToMaintenanceModule, decoratorsUtils as DecoratorsUtils, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDatePipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPipesModule, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModuleModule, OpSearch, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
4238
4290
  //# sourceMappingURL=monkey-front-core.mjs.map