@inobeta/ui 19.0.0 → 19.0.1-build.1746478503

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.
@@ -2821,22 +2821,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
2821
2821
  type: Input
2822
2822
  }] } });
2823
2823
 
2824
- class IbKaiRowGroupDirective {
2825
- templateRef;
2826
- constructor(templateRef) {
2827
- this.templateRef = templateRef;
2828
- }
2829
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbKaiRowGroupDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
2830
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.3", type: IbKaiRowGroupDirective, isStandalone: false, selector: "[ibKaiRowGroup]", ngImport: i0 });
2831
- }
2832
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbKaiRowGroupDirective, decorators: [{
2833
- type: Directive,
2834
- args: [{
2835
- selector: '[ibKaiRowGroup]',
2836
- standalone: false
2837
- }]
2838
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
2839
-
2840
2824
  var IbFilterOperator;
2841
2825
  (function (IbFilterOperator) {
2842
2826
  IbFilterOperator[IbFilterOperator["NONE"] = 0] = "NONE";
@@ -3516,6 +3500,279 @@ class IbTableRemoteDataSource extends IbTableDataSource {
3516
3500
  }
3517
3501
  }
3518
3502
 
3503
+ class IbKaiRowGroupDirective {
3504
+ templateRef;
3505
+ constructor(templateRef) {
3506
+ this.templateRef = templateRef;
3507
+ }
3508
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbKaiRowGroupDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3509
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.3", type: IbKaiRowGroupDirective, isStandalone: false, selector: "[ibKaiRowGroup]", ngImport: i0 });
3510
+ }
3511
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbKaiRowGroupDirective, decorators: [{
3512
+ type: Directive,
3513
+ args: [{
3514
+ selector: '[ibKaiRowGroup]',
3515
+ standalone: false
3516
+ }]
3517
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
3518
+
3519
+ const INITIAL = {
3520
+ tables: []
3521
+ };
3522
+ const urlStateReducer = createReducer(INITIAL, on(urlStateActions.setFilters, (stateIn, action) => {
3523
+ let state = structuredClone(stateIn);
3524
+ const table = getTable(action.tableName, state.tables);
3525
+ table.filters = action.params;
3526
+ return {
3527
+ ...state
3528
+ };
3529
+ }), on(urlStateActions.setPaginator, (stateIn, action) => {
3530
+ let state = structuredClone(stateIn);
3531
+ const table = getTable(action.tableName, state.tables);
3532
+ table.page = action.params.pageIndex;
3533
+ table.pageSize = action.params.pageSize;
3534
+ return {
3535
+ ...state
3536
+ };
3537
+ }), on(urlStateActions.setAggregatedColumns, (stateIn, action) => {
3538
+ let state = structuredClone(stateIn);
3539
+ const table = getTable(action.tableName, state.tables);
3540
+ table.aggregatedColumns = { ...action.params };
3541
+ return {
3542
+ ...state
3543
+ };
3544
+ }), on(urlStateActions.setSort, (stateIn, action) => {
3545
+ let state = structuredClone(stateIn);
3546
+ const table = getTable(action.tableName, state.tables);
3547
+ table.sort = { ...action.params };
3548
+ return {
3549
+ ...state
3550
+ };
3551
+ }), on(urlStateActions.handleViewChange, (stateIn, action) => {
3552
+ let state = structuredClone(stateIn);
3553
+ const table = getTable(action.tableName, state.tables);
3554
+ table.view = action.params.view;
3555
+ table.page = action.params.page;
3556
+ table.pageSize = action.params.pageSize;
3557
+ table.filters = action.params.filters;
3558
+ table.aggregatedColumns = action.params.aggregatedColumns;
3559
+ table.sort = action.params.sort;
3560
+ return {
3561
+ ...state
3562
+ };
3563
+ }));
3564
+ function getTable(tableName, state) {
3565
+ let table = state.find((table) => table.tableName === tableName);
3566
+ if (!table) {
3567
+ state.push({ tableName });
3568
+ table = state.find((table) => table.tableName === tableName);
3569
+ }
3570
+ return table;
3571
+ }
3572
+
3573
+ class IbTableUrlService {
3574
+ _emptyFilterSchema = {};
3575
+ get emptyFilterSchema() {
3576
+ return this._emptyFilterSchema;
3577
+ }
3578
+ set emptyFilterSchema(value) {
3579
+ this._emptyFilterSchema = value;
3580
+ }
3581
+ router = inject(Router);
3582
+ activatedRoute = inject(ActivatedRoute);
3583
+ constructor() { }
3584
+ getRawParams(tableName) {
3585
+ return JSON.parse(this.activatedRoute.snapshot.queryParams?.[tableName]
3586
+ ?? `{"ibfilter": ${JSON.stringify(this.emptyFilterSchema[tableName] ?? {})}, "ibview": "__ibTableView__all", "ibpage": 0, "ibpagesize": 10, "ibaggregatedcolumns": {}, "ibsort": {} }`) ?? {};
3587
+ }
3588
+ getFilters(tableName) {
3589
+ return this.getRawParams(tableName).ibfilter ?? {};
3590
+ }
3591
+ setFilters(tableName, params) {
3592
+ this.router.navigate([], {
3593
+ queryParams: {
3594
+ [tableName]: JSON.stringify({
3595
+ ...this.getRawParams(tableName),
3596
+ ibfilter: params
3597
+ })
3598
+ },
3599
+ queryParamsHandling: 'merge',
3600
+ });
3601
+ }
3602
+ getActiveView(tableName) {
3603
+ return this.getRawParams(tableName).ibview ?? '__ibTableView__all';
3604
+ }
3605
+ setPaginator(tableName, params) {
3606
+ this.router.navigate([], {
3607
+ queryParams: {
3608
+ [tableName]: JSON.stringify({
3609
+ ...this.getRawParams(tableName),
3610
+ ibpage: params.pageIndex,
3611
+ ibpagesize: params.pageSize,
3612
+ })
3613
+ },
3614
+ queryParamsHandling: 'merge',
3615
+ });
3616
+ }
3617
+ getPaginator(tableName) {
3618
+ return {
3619
+ pageIndex: this.getRawParams(tableName).ibpage ?? 0,
3620
+ pageSize: this.getRawParams(tableName).ibpagesize ?? 0,
3621
+ };
3622
+ }
3623
+ setAggregatedColumns(tableName, params) {
3624
+ this.router.navigate([], {
3625
+ queryParams: {
3626
+ [tableName]: JSON.stringify({
3627
+ ...this.getRawParams(tableName),
3628
+ ibaggregatedcolumns: params
3629
+ })
3630
+ },
3631
+ queryParamsHandling: 'merge',
3632
+ });
3633
+ }
3634
+ getAggregatedColumns(tableName) {
3635
+ return this.getRawParams(tableName).ibaggregatedcolumns ?? {};
3636
+ }
3637
+ setSort(tableName, params) {
3638
+ const ibsort = params.direction !== '' ? params : null;
3639
+ this.router.navigate([], {
3640
+ queryParams: {
3641
+ [tableName]: JSON.stringify({
3642
+ ...this.getRawParams(tableName),
3643
+ ibsort
3644
+ })
3645
+ },
3646
+ queryParamsHandling: 'merge',
3647
+ });
3648
+ }
3649
+ getSort(tableName) {
3650
+ return this.getRawParams(tableName).ibsort ?? { active: '', direction: '' };
3651
+ }
3652
+ handleViewChange(tableName, params) {
3653
+ this.router.navigate([], {
3654
+ queryParams: {
3655
+ [tableName]: JSON.stringify({
3656
+ ...this.getRawParams(tableName),
3657
+ ibview: params.view,
3658
+ ibpage: params.page,
3659
+ ibpagesize: params.pageSize,
3660
+ ibfilter: params.filters,
3661
+ ibaggregatedcolumns: params.aggregatedColumns,
3662
+ ibsort: params.sort,
3663
+ })
3664
+ },
3665
+ queryParamsHandling: 'merge',
3666
+ });
3667
+ }
3668
+ getViewState(tableName) {
3669
+ return {
3670
+ view: this.getActiveView(tableName),
3671
+ pageSize: this.getPaginator(tableName).pageSize,
3672
+ page: this.getPaginator(tableName).pageIndex,
3673
+ filters: this.getFilters(tableName),
3674
+ aggregatedColumns: this.getAggregatedColumns(tableName),
3675
+ sort: this.getSort(tableName)
3676
+ };
3677
+ }
3678
+ setFilterAndSort(tableName, ibfilter, sort) {
3679
+ const ibsort = sort.direction !== '' ? sort : null;
3680
+ this.router.navigate([], {
3681
+ queryParams: {
3682
+ [tableName]: JSON.stringify({
3683
+ ...this.getRawParams(tableName),
3684
+ ibfilter,
3685
+ ibsort
3686
+ })
3687
+ },
3688
+ queryParamsHandling: 'merge',
3689
+ });
3690
+ }
3691
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbTableUrlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3692
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbTableUrlService, providedIn: 'root' });
3693
+ }
3694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbTableUrlService, decorators: [{
3695
+ type: Injectable,
3696
+ args: [{ providedIn: 'root' }]
3697
+ }], ctorParameters: () => [] });
3698
+
3699
+ class UrlStateEffects {
3700
+ actions$ = inject(Actions);
3701
+ tableUrlService = inject(IbTableUrlService);
3702
+ setFilters$ = createEffect(() => {
3703
+ return this.actions$.pipe(ofType(urlStateActions.setFilters), tap((action) => this.tableUrlService.setFilters(action.tableName, action.params)));
3704
+ }, {
3705
+ dispatch: false
3706
+ });
3707
+ setPaginator$ = createEffect(() => {
3708
+ return this.actions$.pipe(ofType(urlStateActions.setPaginator), tap((action) => this.tableUrlService.setPaginator(action.tableName, action.params)));
3709
+ }, {
3710
+ dispatch: false
3711
+ });
3712
+ setAggregatedColumns$ = createEffect(() => {
3713
+ return this.actions$.pipe(ofType(urlStateActions.setAggregatedColumns), tap((action) => this.tableUrlService.setAggregatedColumns(action.tableName, action.params)));
3714
+ }, {
3715
+ dispatch: false
3716
+ });
3717
+ setSort$ = createEffect(() => {
3718
+ return this.actions$.pipe(ofType(urlStateActions.setSort), tap((action) => this.tableUrlService.setSort(action.tableName, action.params)));
3719
+ }, {
3720
+ dispatch: false
3721
+ });
3722
+ handleViewChange$ = createEffect(() => {
3723
+ return this.actions$.pipe(ofType(urlStateActions.handleViewChange), tap((action) => this.tableUrlService.handleViewChange(action.tableName, action.params)));
3724
+ }, {
3725
+ dispatch: false
3726
+ });
3727
+ setRemoteDatasourceParams$ = createEffect(() => {
3728
+ return this.actions$.pipe(ofType(urlStateActions.setRemoteDatasourceParams), tap((action) => this.tableUrlService.setFilterAndSort(action.tableName, action.filters, action.sort)));
3729
+ }, {
3730
+ dispatch: false
3731
+ });
3732
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: UrlStateEffects, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3733
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: UrlStateEffects, providedIn: "root" });
3734
+ }
3735
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: UrlStateEffects, decorators: [{
3736
+ type: Injectable,
3737
+ args: [{ providedIn: "root" }]
3738
+ }] });
3739
+
3740
+ const selectUrlState = (tableName) => (tables) => {
3741
+ return tables?.find((table) => table.tableName === tableName);
3742
+ };
3743
+ const selectLastQueryStringRaw = (state) => ({
3744
+ ibfilter: state?.filters,
3745
+ ibpage: state?.page,
3746
+ ibpagesize: state?.pageSize,
3747
+ ibaggregatedcolumns: state?.aggregatedColumns,
3748
+ ibsort: state?.sort,
3749
+ ibview: state?.view
3750
+ });
3751
+ const selectLastQueryString = (state) => JSON.stringify(state);
3752
+ const ibKaiTableExtraSelectors = ({ selectTables }) => {
3753
+ const ibTableSelectUrlState = (tableName) => createSelector(selectTables, selectUrlState(tableName));
3754
+ const ibTableSelectLastQueryStringRaw = (tableName) => createSelector(ibTableSelectUrlState(tableName), selectLastQueryStringRaw);
3755
+ const ibTableSelectLastQueryString = (tableName) => createSelector(ibTableSelectLastQueryStringRaw(tableName), selectLastQueryString);
3756
+ return {
3757
+ ibTableSelectUrlState,
3758
+ ibTableSelectLastQueryStringRaw,
3759
+ ibTableSelectLastQueryString
3760
+ };
3761
+ };
3762
+
3763
+ const kaiTableReducers = {
3764
+ urlState: urlStateReducer,
3765
+ };
3766
+ const kaiTableEffects = [
3767
+ UrlStateEffects,
3768
+ ];
3769
+ const ibKaiTableFeature = createFeature({
3770
+ name: 'ibKaiTable',
3771
+ reducer: urlStateReducer,
3772
+ extraSelectors: ibKaiTableExtraSelectors
3773
+ });
3774
+ const { selectTables, ibTableSelectUrlState, ibTableSelectLastQueryStringRaw, ibTableSelectLastQueryString } = ibKaiTableFeature;
3775
+
3519
3776
  class IbTableDataExportDialog {
3520
3777
  data = inject(MAT_DIALOG_DATA);
3521
3778
  _settings = new FormGroup({
@@ -6445,250 +6702,124 @@ class IbFilterModule {
6445
6702
  IbTagFilter,
6446
6703
  IbNumberFilter,
6447
6704
  IbDateFilter,
6448
- IbSearchBar,
6449
- IbBooleanFilter,
6450
- IbFilterActionGroup] });
6451
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbFilterModule, providers: [
6452
- {
6453
- provide: DateAdapter,
6454
- useClass: IbMatDateAdapter,
6455
- deps: [MAT_DATE_LOCALE, Platform],
6456
- },
6457
- {
6458
- provide: MAT_DATE_FORMATS,
6459
- deps: [TranslateService],
6460
- useFactory: ibMatDatepickerTranslate,
6461
- },
6462
- ], imports: [CommonModule,
6463
- PortalModule,
6464
- FormsModule,
6465
- ReactiveFormsModule,
6466
- MatInputModule,
6467
- MatButtonModule,
6468
- MatIconModule,
6469
- MatMenuModule,
6470
- MatSelectModule,
6471
- MatChipsModule,
6472
- MatFormFieldModule,
6473
- MatDividerModule,
6474
- MatListModule,
6475
- MatSliderModule,
6476
- MatRadioModule,
6477
- MatDatepickerModule,
6478
- IbTableActionModule,
6479
- MatTooltipModule,
6480
- TranslateModule.forChild({
6481
- extend: true,
6482
- }),
6483
- IbFilterButton,
6484
- IbBooleanFilter] });
6485
- }
6486
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbFilterModule, decorators: [{
6487
- type: NgModule,
6488
- args: [{
6489
- imports: [
6490
- CommonModule,
6491
- PortalModule,
6492
- FormsModule,
6493
- ReactiveFormsModule,
6494
- MatInputModule,
6495
- MatButtonModule,
6496
- MatIconModule,
6497
- MatMenuModule,
6498
- MatSelectModule,
6499
- MatChipsModule,
6500
- MatFormFieldModule,
6501
- MatDividerModule,
6502
- MatListModule,
6503
- MatSliderModule,
6504
- MatRadioModule,
6505
- MatDatepickerModule,
6506
- IbTableActionModule,
6507
- MatTooltipModule,
6508
- TranslateModule.forChild({
6509
- extend: true,
6510
- }),
6511
- IbFilterPipe,
6512
- IbFilterButton,
6513
- IbFilterActionGroup,
6514
- IbBooleanFilter,
6515
- ],
6516
- exports: [
6517
- IbFilter,
6518
- IbFilterBase,
6519
- IbFilterButton,
6520
- IbTextFilter,
6521
- IbTagFilter,
6522
- IbNumberFilter,
6523
- IbDateFilter,
6524
- IbSearchBar,
6525
- IbBooleanFilter,
6526
- IbFilterActionGroup,
6527
- ],
6528
- declarations: [
6529
- IbFilter,
6530
- IbFilterBase,
6531
- IbTextFilter,
6532
- IbTagFilter,
6533
- IbNumberFilter,
6534
- IbDateFilter,
6535
- IbSearchBar,
6536
- ],
6537
- providers: [
6538
- {
6539
- provide: DateAdapter,
6540
- useClass: IbMatDateAdapter,
6541
- deps: [MAT_DATE_LOCALE, Platform],
6542
- },
6543
- {
6544
- provide: MAT_DATE_FORMATS,
6545
- deps: [TranslateService],
6546
- useFactory: ibMatDatepickerTranslate,
6547
- },
6548
- ],
6549
- }]
6550
- }] });
6551
-
6552
- class IbDefaultTableView {
6553
- selected = false;
6554
- ibChangeView = new EventEmitter();
6555
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbDefaultTableView, deps: [], target: i0.ɵɵFactoryTarget.Component });
6556
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: IbDefaultTableView, isStandalone: false, selector: "ib-default-table-view", inputs: { selected: "selected" }, outputs: { ibChangeView: "ibChangeView" }, ngImport: i0, template: "<button *ngIf=\"!selected\" mat-button (click)=\"ibChangeView.emit()\">\n {{ \"shared.ibTableView.defaultView\" | translate }}\n</button>\n\n<button *ngIf=\"selected\" mat-flat-button color=\"primary\">\n {{ \"shared.ibTableView.defaultView\" | translate }}\n</button>\n", dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
6557
- }
6558
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbDefaultTableView, decorators: [{
6559
- type: Component,
6560
- args: [{ selector: "ib-default-table-view", standalone: false, template: "<button *ngIf=\"!selected\" mat-button (click)=\"ibChangeView.emit()\">\n {{ \"shared.ibTableView.defaultView\" | translate }}\n</button>\n\n<button *ngIf=\"selected\" mat-flat-button color=\"primary\">\n {{ \"shared.ibTableView.defaultView\" | translate }}\n</button>\n" }]
6561
- }], propDecorators: { selected: [{
6562
- type: Input
6563
- }], ibChangeView: [{
6564
- type: Output
6565
- }] } });
6566
-
6567
- class IbTableUrlService {
6568
- _emptyFilterSchema = {};
6569
- get emptyFilterSchema() {
6570
- return this._emptyFilterSchema;
6571
- }
6572
- set emptyFilterSchema(value) {
6573
- this._emptyFilterSchema = value;
6574
- }
6575
- router = inject(Router);
6576
- activatedRoute = inject(ActivatedRoute);
6577
- constructor() { }
6578
- getRawParams(tableName) {
6579
- return JSON.parse(this.activatedRoute.snapshot.queryParams?.[tableName]
6580
- ?? `{"ibfilter": ${JSON.stringify(this.emptyFilterSchema[tableName] ?? {})}, "ibview": "__ibTableView__all", "ibpage": 0, "ibpagesize": 10, "ibaggregatedcolumns": {}, "ibsort": {} }`) ?? {};
6581
- }
6582
- getFilters(tableName) {
6583
- return this.getRawParams(tableName).ibfilter ?? {};
6584
- }
6585
- setFilters(tableName, params) {
6586
- this.router.navigate([], {
6587
- queryParams: {
6588
- [tableName]: JSON.stringify({
6589
- ...this.getRawParams(tableName),
6590
- ibfilter: params
6591
- })
6592
- },
6593
- queryParamsHandling: 'merge',
6594
- });
6595
- }
6596
- getActiveView(tableName) {
6597
- return this.getRawParams(tableName).ibview ?? '__ibTableView__all';
6598
- }
6599
- setPaginator(tableName, params) {
6600
- this.router.navigate([], {
6601
- queryParams: {
6602
- [tableName]: JSON.stringify({
6603
- ...this.getRawParams(tableName),
6604
- ibpage: params.pageIndex,
6605
- ibpagesize: params.pageSize,
6606
- })
6607
- },
6608
- queryParamsHandling: 'merge',
6609
- });
6610
- }
6611
- getPaginator(tableName) {
6612
- return {
6613
- pageIndex: this.getRawParams(tableName).ibpage ?? 0,
6614
- pageSize: this.getRawParams(tableName).ibpagesize ?? 0,
6615
- };
6616
- }
6617
- setAggregatedColumns(tableName, params) {
6618
- this.router.navigate([], {
6619
- queryParams: {
6620
- [tableName]: JSON.stringify({
6621
- ...this.getRawParams(tableName),
6622
- ibaggregatedcolumns: params
6623
- })
6624
- },
6625
- queryParamsHandling: 'merge',
6626
- });
6627
- }
6628
- getAggregatedColumns(tableName) {
6629
- return this.getRawParams(tableName).ibaggregatedcolumns ?? {};
6630
- }
6631
- setSort(tableName, params) {
6632
- const ibsort = params.direction !== '' ? params : null;
6633
- this.router.navigate([], {
6634
- queryParams: {
6635
- [tableName]: JSON.stringify({
6636
- ...this.getRawParams(tableName),
6637
- ibsort
6638
- })
6639
- },
6640
- queryParamsHandling: 'merge',
6641
- });
6642
- }
6643
- getSort(tableName) {
6644
- return this.getRawParams(tableName).ibsort ?? { active: '', direction: '' };
6645
- }
6646
- handleViewChange(tableName, params) {
6647
- this.router.navigate([], {
6648
- queryParams: {
6649
- [tableName]: JSON.stringify({
6650
- ...this.getRawParams(tableName),
6651
- ibview: params.view,
6652
- ibpage: params.page,
6653
- ibpagesize: params.pageSize,
6654
- ibfilter: params.filters,
6655
- ibaggregatedcolumns: params.aggregatedColumns,
6656
- ibsort: params.sort,
6657
- })
6658
- },
6659
- queryParamsHandling: 'merge',
6660
- });
6661
- }
6662
- getViewState(tableName) {
6663
- return {
6664
- view: this.getActiveView(tableName),
6665
- pageSize: this.getPaginator(tableName).pageSize,
6666
- page: this.getPaginator(tableName).pageIndex,
6667
- filters: this.getFilters(tableName),
6668
- aggregatedColumns: this.getAggregatedColumns(tableName),
6669
- sort: this.getSort(tableName)
6670
- };
6671
- }
6672
- setFilterAndSort(tableName, ibfilter, sort) {
6673
- const ibsort = sort.direction !== '' ? sort : null;
6674
- this.router.navigate([], {
6675
- queryParams: {
6676
- [tableName]: JSON.stringify({
6677
- ...this.getRawParams(tableName),
6678
- ibfilter,
6679
- ibsort
6680
- })
6705
+ IbSearchBar,
6706
+ IbBooleanFilter,
6707
+ IbFilterActionGroup] });
6708
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbFilterModule, providers: [
6709
+ {
6710
+ provide: DateAdapter,
6711
+ useClass: IbMatDateAdapter,
6712
+ deps: [MAT_DATE_LOCALE, Platform],
6681
6713
  },
6682
- queryParamsHandling: 'merge',
6683
- });
6684
- }
6685
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbTableUrlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6686
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbTableUrlService, providedIn: 'root' });
6714
+ {
6715
+ provide: MAT_DATE_FORMATS,
6716
+ deps: [TranslateService],
6717
+ useFactory: ibMatDatepickerTranslate,
6718
+ },
6719
+ ], imports: [CommonModule,
6720
+ PortalModule,
6721
+ FormsModule,
6722
+ ReactiveFormsModule,
6723
+ MatInputModule,
6724
+ MatButtonModule,
6725
+ MatIconModule,
6726
+ MatMenuModule,
6727
+ MatSelectModule,
6728
+ MatChipsModule,
6729
+ MatFormFieldModule,
6730
+ MatDividerModule,
6731
+ MatListModule,
6732
+ MatSliderModule,
6733
+ MatRadioModule,
6734
+ MatDatepickerModule,
6735
+ IbTableActionModule,
6736
+ MatTooltipModule,
6737
+ TranslateModule.forChild({
6738
+ extend: true,
6739
+ }),
6740
+ IbFilterButton,
6741
+ IbBooleanFilter] });
6687
6742
  }
6688
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbTableUrlService, decorators: [{
6689
- type: Injectable,
6690
- args: [{ providedIn: 'root' }]
6691
- }], ctorParameters: () => [] });
6743
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbFilterModule, decorators: [{
6744
+ type: NgModule,
6745
+ args: [{
6746
+ imports: [
6747
+ CommonModule,
6748
+ PortalModule,
6749
+ FormsModule,
6750
+ ReactiveFormsModule,
6751
+ MatInputModule,
6752
+ MatButtonModule,
6753
+ MatIconModule,
6754
+ MatMenuModule,
6755
+ MatSelectModule,
6756
+ MatChipsModule,
6757
+ MatFormFieldModule,
6758
+ MatDividerModule,
6759
+ MatListModule,
6760
+ MatSliderModule,
6761
+ MatRadioModule,
6762
+ MatDatepickerModule,
6763
+ IbTableActionModule,
6764
+ MatTooltipModule,
6765
+ TranslateModule.forChild({
6766
+ extend: true,
6767
+ }),
6768
+ IbFilterPipe,
6769
+ IbFilterButton,
6770
+ IbFilterActionGroup,
6771
+ IbBooleanFilter,
6772
+ ],
6773
+ exports: [
6774
+ IbFilter,
6775
+ IbFilterBase,
6776
+ IbFilterButton,
6777
+ IbTextFilter,
6778
+ IbTagFilter,
6779
+ IbNumberFilter,
6780
+ IbDateFilter,
6781
+ IbSearchBar,
6782
+ IbBooleanFilter,
6783
+ IbFilterActionGroup,
6784
+ ],
6785
+ declarations: [
6786
+ IbFilter,
6787
+ IbFilterBase,
6788
+ IbTextFilter,
6789
+ IbTagFilter,
6790
+ IbNumberFilter,
6791
+ IbDateFilter,
6792
+ IbSearchBar,
6793
+ ],
6794
+ providers: [
6795
+ {
6796
+ provide: DateAdapter,
6797
+ useClass: IbMatDateAdapter,
6798
+ deps: [MAT_DATE_LOCALE, Platform],
6799
+ },
6800
+ {
6801
+ provide: MAT_DATE_FORMATS,
6802
+ deps: [TranslateService],
6803
+ useFactory: ibMatDatepickerTranslate,
6804
+ },
6805
+ ],
6806
+ }]
6807
+ }] });
6808
+
6809
+ class IbDefaultTableView {
6810
+ selected = false;
6811
+ ibChangeView = new EventEmitter();
6812
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbDefaultTableView, deps: [], target: i0.ɵɵFactoryTarget.Component });
6813
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: IbDefaultTableView, isStandalone: false, selector: "ib-default-table-view", inputs: { selected: "selected" }, outputs: { ibChangeView: "ibChangeView" }, ngImport: i0, template: "<button *ngIf=\"!selected\" mat-button (click)=\"ibChangeView.emit()\">\n {{ \"shared.ibTableView.defaultView\" | translate }}\n</button>\n\n<button *ngIf=\"selected\" mat-flat-button color=\"primary\">\n {{ \"shared.ibTableView.defaultView\" | translate }}\n</button>\n", dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
6814
+ }
6815
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: IbDefaultTableView, decorators: [{
6816
+ type: Component,
6817
+ args: [{ selector: "ib-default-table-view", standalone: false, template: "<button *ngIf=\"!selected\" mat-button (click)=\"ibChangeView.emit()\">\n {{ \"shared.ibTableView.defaultView\" | translate }}\n</button>\n\n<button *ngIf=\"selected\" mat-flat-button color=\"primary\">\n {{ \"shared.ibTableView.defaultView\" | translate }}\n</button>\n" }]
6818
+ }], propDecorators: { selected: [{
6819
+ type: Input
6820
+ }], ibChangeView: [{
6821
+ type: Output
6822
+ }] } });
6692
6823
 
6693
6824
  const TableViewActions = createActionGroup({
6694
6825
  source: "TableView",
@@ -7550,137 +7681,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
7550
7681
  args: [{ transform: booleanAttribute }]
7551
7682
  }] } });
7552
7683
 
7553
- const INITIAL = {
7554
- tables: []
7555
- };
7556
- const urlStateReducer = createReducer(INITIAL, on(urlStateActions.setFilters, (stateIn, action) => {
7557
- let state = structuredClone(stateIn);
7558
- const table = getTable(action.tableName, state.tables);
7559
- table.filters = action.params;
7560
- return {
7561
- ...state
7562
- };
7563
- }), on(urlStateActions.setPaginator, (stateIn, action) => {
7564
- let state = structuredClone(stateIn);
7565
- const table = getTable(action.tableName, state.tables);
7566
- table.page = action.params.pageIndex;
7567
- table.pageSize = action.params.pageSize;
7568
- return {
7569
- ...state
7570
- };
7571
- }), on(urlStateActions.setAggregatedColumns, (stateIn, action) => {
7572
- let state = structuredClone(stateIn);
7573
- const table = getTable(action.tableName, state.tables);
7574
- table.aggregatedColumns = { ...action.params };
7575
- return {
7576
- ...state
7577
- };
7578
- }), on(urlStateActions.setSort, (stateIn, action) => {
7579
- let state = structuredClone(stateIn);
7580
- const table = getTable(action.tableName, state.tables);
7581
- table.sort = { ...action.params };
7582
- return {
7583
- ...state
7584
- };
7585
- }), on(urlStateActions.handleViewChange, (stateIn, action) => {
7586
- let state = structuredClone(stateIn);
7587
- const table = getTable(action.tableName, state.tables);
7588
- table.view = action.params.view;
7589
- table.page = action.params.page;
7590
- table.pageSize = action.params.pageSize;
7591
- table.filters = action.params.filters;
7592
- table.aggregatedColumns = action.params.aggregatedColumns;
7593
- table.sort = action.params.sort;
7594
- return {
7595
- ...state
7596
- };
7597
- }));
7598
- function getTable(tableName, state) {
7599
- let table = state.find((table) => table.tableName === tableName);
7600
- if (!table) {
7601
- state.push({ tableName });
7602
- table = state.find((table) => table.tableName === tableName);
7603
- }
7604
- return table;
7605
- }
7606
-
7607
- class UrlStateEffects {
7608
- actions$ = inject(Actions);
7609
- tableUrlService = inject(IbTableUrlService);
7610
- setFilters$ = createEffect(() => {
7611
- return this.actions$.pipe(ofType(urlStateActions.setFilters), tap((action) => this.tableUrlService.setFilters(action.tableName, action.params)));
7612
- }, {
7613
- dispatch: false
7614
- });
7615
- setPaginator$ = createEffect(() => {
7616
- return this.actions$.pipe(ofType(urlStateActions.setPaginator), tap((action) => this.tableUrlService.setPaginator(action.tableName, action.params)));
7617
- }, {
7618
- dispatch: false
7619
- });
7620
- setAggregatedColumns$ = createEffect(() => {
7621
- return this.actions$.pipe(ofType(urlStateActions.setAggregatedColumns), tap((action) => this.tableUrlService.setAggregatedColumns(action.tableName, action.params)));
7622
- }, {
7623
- dispatch: false
7624
- });
7625
- setSort$ = createEffect(() => {
7626
- return this.actions$.pipe(ofType(urlStateActions.setSort), tap((action) => this.tableUrlService.setSort(action.tableName, action.params)));
7627
- }, {
7628
- dispatch: false
7629
- });
7630
- handleViewChange$ = createEffect(() => {
7631
- return this.actions$.pipe(ofType(urlStateActions.handleViewChange), tap((action) => this.tableUrlService.handleViewChange(action.tableName, action.params)));
7632
- }, {
7633
- dispatch: false
7634
- });
7635
- setRemoteDatasourceParams$ = createEffect(() => {
7636
- return this.actions$.pipe(ofType(urlStateActions.setRemoteDatasourceParams), tap((action) => this.tableUrlService.setFilterAndSort(action.tableName, action.filters, action.sort)));
7637
- }, {
7638
- dispatch: false
7639
- });
7640
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: UrlStateEffects, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7641
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: UrlStateEffects, providedIn: "root" });
7642
- }
7643
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: UrlStateEffects, decorators: [{
7644
- type: Injectable,
7645
- args: [{ providedIn: "root" }]
7646
- }] });
7647
-
7648
- const selectUrlState = (tableName) => (tables) => {
7649
- return tables?.find((table) => table.tableName === tableName);
7650
- };
7651
- const selectLastQueryStringRaw = (state) => ({
7652
- ibfilter: state?.filters,
7653
- ibpage: state?.page,
7654
- ibpagesize: state?.pageSize,
7655
- ibaggregatedcolumns: state?.aggregatedColumns,
7656
- ibsort: state?.sort,
7657
- ibview: state?.view
7658
- });
7659
- const selectLastQueryString = (state) => JSON.stringify(state);
7660
- const ibKaiTableExtraSelectors = ({ selectTables }) => {
7661
- const ibTableSelectUrlState = (tableName) => createSelector(selectTables, selectUrlState(tableName));
7662
- const ibTableSelectLastQueryStringRaw = (tableName) => createSelector(ibTableSelectUrlState(tableName), selectLastQueryStringRaw);
7663
- const ibTableSelectLastQueryString = (tableName) => createSelector(ibTableSelectLastQueryStringRaw(tableName), selectLastQueryString);
7664
- return {
7665
- ibTableSelectUrlState,
7666
- ibTableSelectLastQueryStringRaw,
7667
- ibTableSelectLastQueryString
7668
- };
7669
- };
7670
-
7671
- const kaiTableReducers = {
7672
- urlState: urlStateReducer,
7673
- };
7674
- const kaiTableEffects = [
7675
- UrlStateEffects,
7676
- ];
7677
- const ibKaiTableFeature = createFeature({
7678
- name: 'ibKaiTable',
7679
- reducer: urlStateReducer,
7680
- extraSelectors: ibKaiTableExtraSelectors
7681
- });
7682
- const { selectTables, ibTableSelectUrlState, ibTableSelectLastQueryStringRaw, ibTableSelectLastQueryString } = ibKaiTableFeature;
7683
-
7684
7684
  class IbTablePaginatorIntl {
7685
7685
  translate;
7686
7686
  changes = new Subject();
@@ -8872,5 +8872,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
8872
8872
  * Generated bundle index. Do not edit.
8873
8873
  */
8874
8874
 
8875
- export { IB_DATA_JSPDF_AUTOTABLE_USER_OPTIONS, IB_DATA_JSPDF_OPTIONS, IB_TRANSLATE_ASSETS_PATH, IbActionColumn, IbAggregate, IbAggregateCell, IbAuthGuard, IbAuthTypes, IbAverageAggregateProvider, IbBooleanFilter, IbBreadcrumbComponent, IbBreadcrumbModule, IbCSVExportProvider, IbCSVExportService, IbCellDef, IbCheckbox, IbColumn, IbDataExportModule, IbDataExportProvider, IbDataExportService, IbDataTransformer, IbDateColumn, IbDateFilter, IbDateFilterCategory, IbDateFilterPeriod, IbDefaultTableView, IbDropdown, IbDynamicFormArrayComponent, IbDynamicFormComponent, IbDynamicFormControlComponent, IbDynamicFormsModule, IbFilter, IbFilterActionGroup, IbFilterBase, IbFilterButton, IbFilterModule, IbFilterOperator, IbFilterPipe, IbFormArray, IbFormControlBase, IbFormControlBaseComponent, IbFormControlDirective, IbFormControlErrors, IbFormControlService, IbHttpModule, IbHttpTestModule, IbKaiRowGroupDirective, IbKaiTableAction, IbKaiTableActionGroup, IbKaiTableModule, IbLoadingDirective, IbLoadingSkeletonContainerComponent, IbLoadingSkeletonRectComponent, IbLoadingStubDirective, IbLoginGuard, IbLoginService, IbMainMenuBarComponent, IbMainMenuBarStubComponent, IbMainMenuDialogComponent, IbMainMenuExpandedComponent, IbMainMenuHeaderFooterButtonsComponent, IbMainMenuModule, IbMainMenuTestModule, IbMatActionsPosition, IbMatAutocompleteComponent, IbMatAutocompleteControl, IbMatButtonComponent, IbMatButtonControl, IbMatCheckboxComponent, IbMatCheckboxControl, IbMatDatepickerComponent, IbMatDatepickerControl, IbMatDropdownComponent, IbMatDropdownControl, IbMatLabelComponent, IbMatLabelControl, IbMatPaddingComponent, IbMatPaddingControl, IbMatRadioComponent, IbMatRadioControl, IbMatSlideToggleComponent, IbMatSlideToggleControl, IbMatTextareaComponent, IbMatTextareaControl, IbMatTextboxComponent, IbMatTextboxControl, IbMaterialBreadcrumbComponent, IbMaterialFormArrayComponent, IbMaterialFormComponent, IbMaterialFormControlComponent, IbMaterialFormModule, IbMaterialFormStubComponent, IbMaterialFormTestModule, IbModalMessageComponent, IbModalMessageService, IbModalMessageServiceStub, IbModalModule, IbModalTestModule, IbNumberColumn, IbNumberFilter, IbPDFExportProvider, IbPDFExportService, IbPatchFormValue, IbRadio, IbRoleCheckDirective, IbRoleGuard, IbSearchBar, IbSelectionColumn, IbSession, IbSessionEffects, IbSortHeader, IbSpinnerLoadingComponent, IbStorageModule, IbStorageService, IbStorageTestModule, IbStorageTypes, IbSumAggregateProvider, IbTable, IbTableActionModule, IbTableDataExportAction, IbTableDataExportDialog, IbTableRemoteDataSource, IbTableUrlService, IbTableView, IbTableViewDialog, IbTableViewGroup, IbTagFilter, IbTextColumn, IbTextFilter, IbTextbox, IbToastModule, IbToastNotification, IbToastTestModule, IbTranslateModuleLoader, IbUploaderComponent, IbUploaderModule, IbUserLogin, IbView, IbViewList, IbViewModule, IbViewService, IbXLSXExportService, IbXLXSExportProvider, OVERRIDE_EXPORT_FORMATS, SpinnerLoadingStubComponent, TableViewActions, and, applyFilter, contains, dateRequiredValidator, endsWith, eq, evalOperation, gt, gte, ibAuthActions, ibCrudToast, ibHttpEffects, ibHttpReducers, ibKaiTableExtraSelectors, ibLoaderActions, ibLoaderExtraSelectors, ibLoaderFeature, ibLoaderReducerMain, ibMatDatepickerTranslate, ibSelectAccessTokenExp, ibSelectActiveSession, ibSelectDecodedData, ibSelectIsHttpLoading, ibSelectIsHttpUrlLoading, ibSessionFeature, ibSessionReducerMain, ibSetupHydration, ibViewsFeature, initialState, lt, lte, ncontains, neq, none, or, reducers, selectTableViews, selectViews, startsWith, toastServiceStub, urlStateActions, viewsReducer };
8875
+ export { IB_DATA_JSPDF_AUTOTABLE_USER_OPTIONS, IB_DATA_JSPDF_OPTIONS, IB_TRANSLATE_ASSETS_PATH, IbActionColumn, IbAggregate, IbAggregateCell, IbAuthGuard, IbAuthTypes, IbAverageAggregateProvider, IbBooleanFilter, IbBreadcrumbComponent, IbBreadcrumbModule, IbCSVExportProvider, IbCSVExportService, IbCellDef, IbCheckbox, IbColumn, IbDataExportModule, IbDataExportProvider, IbDataExportService, IbDataTransformer, IbDateColumn, IbDateFilter, IbDateFilterCategory, IbDateFilterPeriod, IbDefaultTableView, IbDropdown, IbDynamicFormArrayComponent, IbDynamicFormComponent, IbDynamicFormControlComponent, IbDynamicFormsModule, IbFilter, IbFilterActionGroup, IbFilterBase, IbFilterButton, IbFilterModule, IbFilterOperator, IbFilterPipe, IbFormArray, IbFormControlBase, IbFormControlBaseComponent, IbFormControlDirective, IbFormControlErrors, IbFormControlService, IbHttpModule, IbHttpTestModule, IbKaiRowGroupDirective, IbKaiTableAction, IbKaiTableActionGroup, IbKaiTableModule, IbLoadingDirective, IbLoadingSkeletonContainerComponent, IbLoadingSkeletonRectComponent, IbLoadingStubDirective, IbLoginGuard, IbLoginService, IbMainMenuBarComponent, IbMainMenuBarStubComponent, IbMainMenuDialogComponent, IbMainMenuExpandedComponent, IbMainMenuHeaderFooterButtonsComponent, IbMainMenuModule, IbMainMenuTestModule, IbMatActionsPosition, IbMatAutocompleteComponent, IbMatAutocompleteControl, IbMatButtonComponent, IbMatButtonControl, IbMatCheckboxComponent, IbMatCheckboxControl, IbMatDatepickerComponent, IbMatDatepickerControl, IbMatDropdownComponent, IbMatDropdownControl, IbMatLabelComponent, IbMatLabelControl, IbMatPaddingComponent, IbMatPaddingControl, IbMatRadioComponent, IbMatRadioControl, IbMatSlideToggleComponent, IbMatSlideToggleControl, IbMatTextareaComponent, IbMatTextareaControl, IbMatTextboxComponent, IbMatTextboxControl, IbMaterialBreadcrumbComponent, IbMaterialFormArrayComponent, IbMaterialFormComponent, IbMaterialFormControlComponent, IbMaterialFormModule, IbMaterialFormStubComponent, IbMaterialFormTestModule, IbModalMessageComponent, IbModalMessageService, IbModalMessageServiceStub, IbModalModule, IbModalTestModule, IbNumberColumn, IbNumberFilter, IbPDFExportProvider, IbPDFExportService, IbPatchFormValue, IbRadio, IbRoleCheckDirective, IbRoleGuard, IbSearchBar, IbSelectionColumn, IbSession, IbSessionEffects, IbSortHeader, IbSpinnerLoadingComponent, IbStorageModule, IbStorageService, IbStorageTestModule, IbStorageTypes, IbSumAggregateProvider, IbTable, IbTableActionModule, IbTableDataExportAction, IbTableDataExportDialog, IbTableRemoteDataSource, IbTableUrlService, IbTableView, IbTableViewDialog, IbTableViewGroup, IbTagFilter, IbTextColumn, IbTextFilter, IbTextbox, IbToastModule, IbToastNotification, IbToastTestModule, IbTranslateModuleLoader, IbUploaderComponent, IbUploaderModule, IbUserLogin, IbView, IbViewList, IbViewModule, IbViewService, IbXLSXExportService, IbXLXSExportProvider, OVERRIDE_EXPORT_FORMATS, SpinnerLoadingStubComponent, TableViewActions, and, applyFilter, contains, dateRequiredValidator, endsWith, eq, evalOperation, gt, gte, ibAuthActions, ibCrudToast, ibHttpEffects, ibHttpReducers, ibKaiTableExtraSelectors, ibLoaderActions, ibLoaderExtraSelectors, ibLoaderFeature, ibLoaderReducerMain, ibMatDatepickerTranslate, ibSelectAccessTokenExp, ibSelectActiveSession, ibSelectDecodedData, ibSelectIsHttpLoading, ibSelectIsHttpUrlLoading, ibSessionFeature, ibSessionReducerMain, ibSetupHydration, ibTableSelectLastQueryString, ibTableSelectLastQueryStringRaw, ibTableSelectUrlState, ibViewsFeature, initialState, lt, lte, ncontains, neq, none, or, reducers, selectTableViews, selectViews, startsWith, toastServiceStub, urlStateActions, viewsReducer };
8876
8876
  //# sourceMappingURL=inobeta-ui.mjs.map