@onecx/angular-accelerator 6.0.0-rc.14 → 6.0.0-rc.15

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.
@@ -1,7 +1,7 @@
1
- import { HAS_PERMISSION_CHECKER, SKIP_STYLE_SCOPING, getScopeIdentifier, dataStyleIdKey, dataNoPortalLayoutStylesKey, providePermissionChecker, TRANSLATION_PATH } from '@onecx/angular-utils';
1
+ import { HAS_PERMISSION_CHECKER, SKIP_STYLE_SCOPING, getScopeIdentifier, dataStyleIdKey, dataNoPortalLayoutStylesKey, providePermissionChecker, TRANSLATION_PATH, provideTranslationConnectionService } from '@onecx/angular-utils';
2
2
  export { AlwaysGrantPermissionChecker, HAS_PERMISSION_CHECKER } from '@onecx/angular-utils';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, ElementRef, Input, Directive, Renderer2, ViewContainerRef, TemplateRef, HostListener, EventEmitter, Output, Injectable, Injector, LOCALE_ID, Pipe, ContentChild, ViewEncapsulation, Component, ViewChild, ContentChildren, NgZone, ChangeDetectorRef, ViewChildren, QueryList, isDevMode, Type, NgModule, ENVIRONMENT_INITIALIZER, APP_INITIALIZER } from '@angular/core';
4
+ import { inject, ElementRef, Input, Directive, Renderer2, ViewContainerRef, TemplateRef, HostListener, EventEmitter, Output, Injectable, Injector, LOCALE_ID, Pipe, ContentChild, ViewEncapsulation, Component, ViewChild, ContentChildren, NgZone, ChangeDetectorRef, ViewChildren, QueryList, isDevMode, Type, NgModule, APP_INITIALIZER } from '@angular/core';
5
5
  import { UserService, AppStateService, ConfigurationService, CONFIG_KEY, ShellCapabilityService, Capability, AppConfigService } from '@onecx/angular-integration-interface';
6
6
  import { HttpClient } from '@angular/common/http';
7
7
  import * as i3 from '@angular/forms';
@@ -2894,7 +2894,9 @@ class DataTableComponent extends DataSortBase {
2894
2894
  .filter((filter) => filter.columnId === currentFilterColumn?.id &&
2895
2895
  (!currentFilterColumn.filterType || currentFilterColumn.filterType === FilterType.EQUALS))
2896
2896
  .map((filter) => filter.value);
2897
- const columnValues = rows.map((row) => row[currentFilterColumn?.id]);
2897
+ const columnValues = rows
2898
+ .map((row) => row[currentFilterColumn?.id])
2899
+ .filter((value) => value !== null && value !== undefined && value !== '');
2898
2900
  if (currentFilterColumn.columnType === ColumnType.DATE) {
2899
2901
  return of({
2900
2902
  options: columnValues.map((c) => ({
@@ -2911,7 +2913,7 @@ class DataTableComponent extends DataSortBase {
2911
2913
  return translateObservable.pipe(map((translatedValues) => {
2912
2914
  return Object.values(translatedValues)
2913
2915
  .concat(currentFilters)
2914
- .filter((value, index, self) => self.indexOf(value) === index && value != null)
2916
+ .filter((value, index, self) => self.indexOf(value) === index && value !== null && value !== '')
2915
2917
  .map((filterOption) => ({
2916
2918
  label: filterOption,
2917
2919
  value: filterOption,
@@ -5956,65 +5958,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
5956
5958
  type: Output
5957
5959
  }] } });
5958
5960
 
5959
- class PortalPageComponent {
5960
- constructor() {
5961
- this.appState = inject(AppStateService);
5962
- this.userService = inject(UserService);
5963
- this.hasPermissionChecker = inject(HAS_PERMISSION_CHECKER, { optional: true });
5964
- this.permission = '';
5965
- this.helpArticleId = '';
5966
- this.pageName = '';
5967
- this.applicationId = '';
5968
- this.collapsed = false;
5969
- }
5970
- hasAccess() {
5971
- if (this.cachedHasPermissionChecker$) {
5972
- return this.cachedHasPermissionChecker$;
5973
- }
5974
- if (this.cachedUserService$) {
5975
- return this.cachedUserService$;
5976
- }
5977
- if (this.hasPermissionChecker) {
5978
- const hasPermissionChecker$ = this.permission
5979
- ? from(this.hasPermissionChecker.hasPermission(this.permission))
5980
- : from(Promise.resolve(true));
5981
- this.cachedHasPermissionChecker$ = hasPermissionChecker$.pipe(shareReplay(1));
5982
- return this.cachedHasPermissionChecker$;
5983
- }
5984
- const userServiceHasPermission$ = this.permission
5985
- ? from(this.userService.hasPermission(this.permission))
5986
- : from(Promise.resolve(true));
5987
- this.cachedUserService$ = userServiceHasPermission$.pipe(shareReplay(1));
5988
- return this.cachedUserService$;
5989
- }
5990
- ngOnInit() {
5991
- if (!this.helpArticleId) {
5992
- console.warn(`ocx-portal-page on url ${location.pathname} does not have 'helpArticleId' set. Set to some unique string in order to support help management feature.`);
5993
- }
5994
- this.appState.currentPage$.publish({
5995
- path: document.location.pathname,
5996
- helpArticleId: this.helpArticleId,
5997
- permission: this.permission,
5998
- pageName: this.pageName,
5999
- applicationId: this.applicationId,
6000
- });
6001
- }
6002
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: PortalPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6003
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: PortalPageComponent, isStandalone: false, selector: "ocx-portal-page", inputs: { permission: "permission", helpArticleId: "helpArticleId", pageName: "pageName", applicationId: "applicationId" }, ngImport: i0, template: "<div class=\"content-wrapper\">\n @if (hasAccess() | async) {\n <ng-content></ng-content>\n } @else {\n <h3>{{'OCX_PORTAL_PAGE.UNAUTHORIZED_TITLE' | translate}}</h3>\n <p>\n {{'OCX_PORTAL_PAGE.UNAUTHORIZED_MESSAGE' | translate}}\n <span>{{'OCX_PORTAL_PAGE.MISSING_PERMISSION' | translate : {permission: permission} }}</span>\n </p>\n }\n</div>\n", styles: [":host{display:block;padding:var(--page-padding, 1rem)}@media (max-width: var(--mobile-break-point)){:host{padding:var(--page-padding-lg, 1rem);padding-top:var(--page-padding, 1rem)}}.content-wrapper{width:100%}\n"], dependencies: [{ kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.TranslatePipe, name: "translate" }] }); }
6004
- }
6005
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: PortalPageComponent, decorators: [{
6006
- type: Component,
6007
- args: [{ standalone: false, selector: 'ocx-portal-page', template: "<div class=\"content-wrapper\">\n @if (hasAccess() | async) {\n <ng-content></ng-content>\n } @else {\n <h3>{{'OCX_PORTAL_PAGE.UNAUTHORIZED_TITLE' | translate}}</h3>\n <p>\n {{'OCX_PORTAL_PAGE.UNAUTHORIZED_MESSAGE' | translate}}\n <span>{{'OCX_PORTAL_PAGE.MISSING_PERMISSION' | translate : {permission: permission} }}</span>\n </p>\n }\n</div>\n", styles: [":host{display:block;padding:var(--page-padding, 1rem)}@media (max-width: var(--mobile-break-point)){:host{padding:var(--page-padding-lg, 1rem);padding-top:var(--page-padding, 1rem)}}.content-wrapper{width:100%}\n"] }]
6008
- }], propDecorators: { permission: [{
6009
- type: Input
6010
- }], helpArticleId: [{
6011
- type: Input
6012
- }], pageName: [{
6013
- type: Input
6014
- }], applicationId: [{
6015
- type: Input
6016
- }] } });
6017
-
6018
5961
  class GlobalErrorComponent {
6019
5962
  constructor() {
6020
5963
  this.router = inject(Router);
@@ -6038,22 +5981,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
6038
5981
  type: Input
6039
5982
  }] } });
6040
5983
 
6041
- class TranslationConnectionService {
6042
- constructor() {
6043
- const userService = inject(UserService);
6044
- const translateService = inject(TranslateService);
6045
- this.languageSub = userService.lang$.subscribe((lang) => translateService.use(lang));
6046
- }
6047
- ngOnDestroy() {
6048
- this.languageSub.unsubscribe();
6049
- }
6050
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TranslationConnectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
6051
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TranslationConnectionService }); }
6052
- }
6053
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TranslationConnectionService, decorators: [{
6054
- type: Injectable
6055
- }], ctorParameters: () => [] });
6056
-
6057
5984
  // This topic is defined here and not in integration-interface, because
6058
5985
  // it is not used as framework independent integration but for improving
6059
5986
  // angular specific things
@@ -6618,19 +6545,6 @@ class DynamicLocaleId {
6618
6545
  }
6619
6546
  }
6620
6547
 
6621
- function provideTranslationConnectionService() {
6622
- return [
6623
- {
6624
- provide: ENVIRONMENT_INITIALIZER,
6625
- multi: true,
6626
- useFactory() {
6627
- return () => inject(TranslationConnectionService);
6628
- },
6629
- },
6630
- TranslationConnectionService,
6631
- ];
6632
- }
6633
-
6634
6548
  class AngularAcceleratorMissingTranslationHandler {
6635
6549
  handle(params) {
6636
6550
  console.log(`Missing translation for ${params.key}`, params);
@@ -6672,7 +6586,6 @@ class AngularAcceleratorModule {
6672
6586
  OcxContentDirective,
6673
6587
  OcxContentContainerDirective,
6674
6588
  GlobalErrorComponent,
6675
- PortalPageComponent,
6676
6589
  LoadingIndicatorComponent,
6677
6590
  LoadingIndicatorDirective,
6678
6591
  BasicDirective,
@@ -6713,7 +6626,6 @@ class AngularAcceleratorModule {
6713
6626
  OcxContentDirective,
6714
6627
  OcxContentContainerDirective,
6715
6628
  GlobalErrorComponent,
6716
- PortalPageComponent,
6717
6629
  LoadingIndicatorComponent,
6718
6630
  LoadingIndicatorDirective,
6719
6631
  BasicDirective,
@@ -6796,7 +6708,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
6796
6708
  OcxContentDirective,
6797
6709
  OcxContentContainerDirective,
6798
6710
  GlobalErrorComponent,
6799
- PortalPageComponent,
6800
6711
  LoadingIndicatorComponent,
6801
6712
  LoadingIndicatorDirective,
6802
6713
  BasicDirective,
@@ -6860,7 +6771,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
6860
6771
  OcxContentDirective,
6861
6772
  OcxContentContainerDirective,
6862
6773
  GlobalErrorComponent,
6863
- PortalPageComponent,
6864
6774
  LoadingIndicatorComponent,
6865
6775
  LoadingIndicatorDirective,
6866
6776
  BasicDirective,
@@ -7154,5 +7064,5 @@ class ImageLogoUrlUtils {
7154
7064
  * Generated bundle index. Do not edit.
7155
7065
  */
7156
7066
 
7157
- export { AdvancedDirective, AngularAcceleratorMissingTranslationHandler, AngularAcceleratorModule, AngularAcceleratorPrimeNgModule, AsyncTranslateLoader, BasicDirective, BreadcrumbService, ButtonDialogComponent, CachingTranslateLoader, ColorUtils, ColumnGroupSelectionComponent, ColumnType, CustomGroupColumnSelectorComponent, DataLayoutSelectionComponent, DataListGridComponent, DataListGridSortingComponent, DataLoadingErrorComponent, DataOperationStrategy, DataTableComponent, DataViewComponent, DateUtils, DiagramComponent, DialogContentComponent, DialogFooterComponent, DialogInlineComponent, DialogMessageContentComponent, DynamicPipe, ExportDataService, FilterType, FilterViewComponent, GlobalErrorComponent, GroupByCountDiagramComponent, IfBreakpointDirective, IfPermissionDirective, ImageLogoUrlUtils, InteractiveDataViewComponent, LifecycleComponent, LoadingIndicatorComponent, LoadingIndicatorDirective, ObjectUtils, OcxContentComponent, OcxContentContainerComponent, OcxContentContainerDirective, OcxContentDirective, OcxTimeAgoPipe, PageHeaderComponent, PortalDialogService, PortalPageComponent, RelativeDatePipe, SearchHeaderComponent, SrcDirective, TemplateDirective, TemplateType, TooltipOnOverflowDirective, TranslateCombinedLoader, TranslationCacheService, TranslationConnectionService, atLeastOneFieldFilledValidator, buildSearchCriteria, createRemoteComponentAndMfeTranslateLoader, createRemoteComponentTranslateLoader, createTranslateLoader, enumToDropdownOptions, findEntryWithKeyword, findTemplate, flattenObject, isValidDate, limit, providePortalDialogService, removeKeyword, searchPrefixWithSpecialChars };
7067
+ export { AdvancedDirective, AngularAcceleratorMissingTranslationHandler, AngularAcceleratorModule, AngularAcceleratorPrimeNgModule, AsyncTranslateLoader, BasicDirective, BreadcrumbService, ButtonDialogComponent, CachingTranslateLoader, ColorUtils, ColumnGroupSelectionComponent, ColumnType, CustomGroupColumnSelectorComponent, DataLayoutSelectionComponent, DataListGridComponent, DataListGridSortingComponent, DataLoadingErrorComponent, DataOperationStrategy, DataTableComponent, DataViewComponent, DateUtils, DiagramComponent, DialogContentComponent, DialogFooterComponent, DialogInlineComponent, DialogMessageContentComponent, DynamicPipe, ExportDataService, FilterType, FilterViewComponent, GlobalErrorComponent, GroupByCountDiagramComponent, IfBreakpointDirective, IfPermissionDirective, ImageLogoUrlUtils, InteractiveDataViewComponent, LifecycleComponent, LoadingIndicatorComponent, LoadingIndicatorDirective, ObjectUtils, OcxContentComponent, OcxContentContainerComponent, OcxContentContainerDirective, OcxContentDirective, OcxTimeAgoPipe, PageHeaderComponent, PortalDialogService, RelativeDatePipe, SearchHeaderComponent, SrcDirective, TemplateDirective, TemplateType, TooltipOnOverflowDirective, TranslateCombinedLoader, TranslationCacheService, atLeastOneFieldFilledValidator, buildSearchCriteria, createRemoteComponentAndMfeTranslateLoader, createRemoteComponentTranslateLoader, createTranslateLoader, enumToDropdownOptions, findEntryWithKeyword, findTemplate, flattenObject, isValidDate, limit, providePortalDialogService, removeKeyword, searchPrefixWithSpecialChars };
7158
7068
  //# sourceMappingURL=onecx-angular-accelerator.mjs.map