monkey-front-core 0.0.140 → 0.0.143

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.
@@ -3153,6 +3153,10 @@ class MonkeyEcxAuthenticationService {
3153
3153
  console.error('isAuthorized needs to be declared!');
3154
3154
  return false;
3155
3155
  };
3156
+ this.isCompanyAuthorized = () => {
3157
+ console.error('isCompanyAuthorized needs to be declared!');
3158
+ return false;
3159
+ };
3156
3160
  this.getRequestWithHeaders = (request) => {
3157
3161
  console.error('getRequestWithHeaders needs to be declared!');
3158
3162
  return null;
@@ -3174,11 +3178,12 @@ class MonkeyEcxAuthenticationService {
3174
3178
  init(args) {
3175
3179
  this.hadAtLeastOneLogin = args?.hadAtLeastOneLogin || this.hadAtLeastOneLogin.bind(this);
3176
3180
  this.redirectApp = args?.redirectApp || this.redirectApp.bind(this);
3177
- this.redirectLoginWelcomeBack = args?.redirectLoginWelcomeBack ||
3178
- this.redirectLoginWelcomeBack.bind(this);
3181
+ this.redirectLoginWelcomeBack =
3182
+ args?.redirectLoginWelcomeBack || this.redirectLoginWelcomeBack.bind(this);
3179
3183
  this.isAuthorized = args?.isAuthorized || this.isAuthorized.bind(this);
3180
- this.getRequestWithHeaders = args?.getRequestWithHeaders ||
3181
- this.getRequestWithHeaders.bind(this);
3184
+ this.isCompanyAuthorized = args?.isCompanyAuthorized || this.isCompanyAuthorized.bind(this);
3185
+ this.getRequestWithHeaders =
3186
+ args?.getRequestWithHeaders || this.getRequestWithHeaders.bind(this);
3182
3187
  this.getRequestWithHeadersOb = args?.getRequestWithHeadersOb.bind(this);
3183
3188
  this.refreshShouldHappen = args?.refreshShouldHappen || this.refreshShouldHappen.bind(this);
3184
3189
  this.refreshToken = args?.refreshToken || this.refreshToken.bind(this);
@@ -3189,10 +3194,34 @@ MonkeyEcxAuthenticationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion:
3189
3194
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxAuthenticationService, decorators: [{
3190
3195
  type: Injectable,
3191
3196
  args: [{
3192
- providedIn: 'root'
3197
+ providedIn: 'root',
3193
3198
  }]
3194
3199
  }], ctorParameters: function () { return []; } });
3195
3200
 
3201
+ class MonkeyEcxAuthGuardCompany {
3202
+ constructor(monkeyecxAuthenticationService) {
3203
+ this.monkeyecxAuthenticationService = monkeyecxAuthenticationService;
3204
+ // not to do
3205
+ }
3206
+ canActivate() {
3207
+ const { monkeyecxAuthenticationService } = this;
3208
+ if (monkeyecxAuthenticationService.isAuthorized() &&
3209
+ monkeyecxAuthenticationService.isCompanyAuthorized()) {
3210
+ return true;
3211
+ }
3212
+ monkeyecxAuthenticationService.redirectLoginWelcomeBack();
3213
+ return false;
3214
+ }
3215
+ }
3216
+ MonkeyEcxAuthGuardCompany.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxAuthGuardCompany, deps: [{ token: MonkeyEcxAuthenticationService }], target: i0.ɵɵFactoryTarget.Injectable });
3217
+ MonkeyEcxAuthGuardCompany.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxAuthGuardCompany, providedIn: 'root' });
3218
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxAuthGuardCompany, decorators: [{
3219
+ type: Injectable,
3220
+ args: [{
3221
+ providedIn: 'root',
3222
+ }]
3223
+ }], ctorParameters: function () { return [{ type: MonkeyEcxAuthenticationService }]; } });
3224
+
3196
3225
  class MonkeyEcxAuthGuardLogin {
3197
3226
  constructor(monkeyecxAuthenticationService) {
3198
3227
  this.monkeyecxAuthenticationService = monkeyecxAuthenticationService;
@@ -4354,5 +4383,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
4354
4383
  * Generated bundle index. Do not edit.
4355
4384
  */
4356
4385
 
4357
- export { ClosedToMaintenanceComponent, ClosedToMaintenanceModule, decoratorsUtils as DecoratorsUtils, Link, 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, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatTaxPipe, 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 };
4386
+ export { ClosedToMaintenanceComponent, ClosedToMaintenanceModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardCompany, 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, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatTaxPipe, 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 };
4358
4387
  //# sourceMappingURL=monkey-front-core.mjs.map