cps-ui-kit 17.28.0 → 17.29.0

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
1
  import * as i2 from '@angular/common';
2
2
  import { DOCUMENT, CommonModule, isPlatformBrowser } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Component, Inject, Input, Directive, HostListener, EventEmitter, Self, Optional, Output, ViewChild, Pipe, PLATFORM_ID, ChangeDetectionStrategy, ViewEncapsulation, HostBinding, InjectionToken, Host, ContentChild, ViewChildren, RendererStyleFlags2, TemplateRef, ContentChildren, input, computed, createComponent, createEnvironmentInjector, Injectable, SkipSelf } from '@angular/core';
4
+ import { Component, Inject, Input, Directive, HostListener, EventEmitter, Self, Optional, Output, ViewChild, Pipe, PLATFORM_ID, ChangeDetectionStrategy, ViewEncapsulation, HostBinding, InjectionToken, Host, ViewChildren, ContentChild, RendererStyleFlags2, TemplateRef, ContentChildren, input, computed, createComponent, createEnvironmentInjector, Injectable, SkipSelf } from '@angular/core';
5
5
  import * as i1 from '@angular/forms';
6
6
  import { FormsModule, Validators, ReactiveFormsModule } from '@angular/forms';
7
7
  import { isEqual, cloneDeep } from 'lodash-es';
@@ -19,7 +19,7 @@ import * as i3$1 from 'primeng/tree';
19
19
  import { TreeModule } from 'primeng/tree';
20
20
  import { Subject, takeUntil, debounceTime, distinctUntilChanged, fromEvent, Subscription, take, catchError, of } from 'rxjs';
21
21
  import * as i1$3 from 'primeng/table';
22
- import { SortableColumn, TableService, Table, TableModule, TableHeaderCheckbox, TableCheckbox } from 'primeng/table';
22
+ import { SortableColumn, Table, TableService, TableModule, TableHeaderCheckbox, TableCheckbox } from 'primeng/table';
23
23
  import * as i2$1 from 'primeng/treetable';
24
24
  import { TTSortableColumn, TTHeaderCheckbox, TTCheckbox, TreeTableToggler, TreeTableService, TreeTable, TreeTableModule } from 'primeng/treetable';
25
25
  import * as i2$2 from 'primeng/calendar';
@@ -5456,2278 +5456,2343 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
5456
5456
  type: Optional
5457
5457
  }] }] });
5458
5458
 
5459
- // import jsPDF from 'jspdf';
5460
- // import 'jspdf-autotable';
5461
- function tableFactory(tableComponent) {
5462
- return tableComponent.primengTable;
5463
- }
5459
+ /* eslint-disable no-unused-vars */
5464
5460
  /**
5465
- * CpsTableComponent displays data in tabular format.
5461
+ * CpsColumnFilterMatchMode is used to define how the filter value should be matched.
5462
+ * @group Enums
5463
+ */
5464
+ var CpsColumnFilterMatchMode;
5465
+ (function (CpsColumnFilterMatchMode) {
5466
+ CpsColumnFilterMatchMode["STARTS_WITH"] = "startsWith";
5467
+ CpsColumnFilterMatchMode["CONTAINS"] = "contains";
5468
+ CpsColumnFilterMatchMode["NOT_CONTAINS"] = "notContains";
5469
+ CpsColumnFilterMatchMode["ENDS_WITH"] = "endsWith";
5470
+ CpsColumnFilterMatchMode["EQUALS"] = "equals";
5471
+ CpsColumnFilterMatchMode["NOT_EQUALS"] = "notEquals";
5472
+ CpsColumnFilterMatchMode["IN"] = "in";
5473
+ CpsColumnFilterMatchMode["LESS_THAN"] = "lt";
5474
+ CpsColumnFilterMatchMode["LESS_THAN_OR_EQUAL_TO"] = "lte";
5475
+ CpsColumnFilterMatchMode["GREATER_THAN"] = "gt";
5476
+ CpsColumnFilterMatchMode["GREATER_THAN_OR_EQUAL_TO"] = "gte";
5477
+ CpsColumnFilterMatchMode["BETWEEN"] = "between";
5478
+ CpsColumnFilterMatchMode["IS"] = "is";
5479
+ CpsColumnFilterMatchMode["IS_NOT"] = "isNot";
5480
+ CpsColumnFilterMatchMode["BEFORE"] = "before";
5481
+ CpsColumnFilterMatchMode["AFTER"] = "after";
5482
+ CpsColumnFilterMatchMode["DATE_IS"] = "dateIs";
5483
+ CpsColumnFilterMatchMode["DATE_IS_NOT"] = "dateIsNot";
5484
+ CpsColumnFilterMatchMode["DATE_BEFORE"] = "dateBefore";
5485
+ CpsColumnFilterMatchMode["DATE_AFTER"] = "dateAfter";
5486
+ })(CpsColumnFilterMatchMode || (CpsColumnFilterMatchMode = {}));
5487
+
5488
+ /**
5489
+ * CpsDatepickerComponent is an input component to provide date input.
5466
5490
  * @group Components
5467
5491
  */
5468
- class CpsTableComponent {
5492
+ class CpsDatepickerComponent {
5469
5493
  /**
5470
- * An array of objects to display.
5471
- * @default []
5494
+ * Value of the datepicker.
5495
+ * @default null
5472
5496
  * @group Props
5473
5497
  */
5474
- set data(value) {
5475
- this._data = [...value];
5498
+ set value(value) {
5499
+ this._value = value;
5500
+ this.stringDate = this._dateToString(value);
5501
+ this.onChange(value);
5476
5502
  }
5477
- get data() {
5478
- return this._data;
5503
+ get value() {
5504
+ return this._value;
5479
5505
  }
5480
- // eslint-disable-next-line no-useless-constructor
5481
- constructor(cdRef, document) {
5482
- this.cdRef = cdRef;
5483
- this.document = document;
5484
- /**
5485
- * An array of objects to represent dynamic columns.
5486
- * @group Props
5487
- */
5488
- this.columns = [];
5489
- /**
5490
- * A key used to retrieve the header from columns.
5491
- * @group Props
5492
- */
5493
- this.colHeaderName = 'header';
5494
- /**
5495
- * A key used to retrieve the field from columns.
5496
- * @group Props
5497
- */
5498
- this.colFieldName = 'field';
5499
- /**
5500
- * Determines whether the table should have alternating stripes.
5501
- * @group Props
5502
- */
5503
- this.striped = true;
5504
- /**
5505
- * Determines whether the table should have borders.
5506
- * @group Props
5507
- */
5508
- this.bordered = true;
5509
- /**
5510
- * Size of table cells, it can be "small", "normal" or "large".
5511
- * @group Props
5512
- */
5513
- this.size = 'normal';
5514
- /**
5515
- * Determines whether the table should have row selection.
5516
- * @group Props
5517
- */
5518
- this.selectable = false;
5519
- /**
5520
- * Determines whether the table should have rows highlighting on hover.
5521
- * @group Props
5522
- */
5523
- this.rowHover = true;
5524
- /**
5525
- * Field, that uniquely identifies a record in data (needed for expandable rows).
5526
- * @group Props
5527
- */
5528
- this.dataKey = '';
5529
- /**
5530
- * Determines whether the table should show row menus.
5531
- * @group Props
5532
- */
5533
- this.showRowMenu = false;
5534
- /**
5535
- * Determines whether the 'Remove' button should be displayed in the row menu.
5536
- * Note: This setting only takes effect if 'showRowMenu' is true.
5537
- * @group Props
5538
- */
5539
- this.showRowRemoveButton = true;
5540
- /**
5541
- * Determines whether the 'Edit' button should be displayed in the row menu.
5542
- * Note: This setting only takes effect if 'showRowMenu' is true.
5543
- * @group Props
5544
- */
5545
- this.showRowEditButton = true;
5546
- /**
5547
- * Determines whether the table should have re-orderable rows.
5548
- * @group Props
5549
- */
5550
- this.reorderableRows = false;
5551
- /**
5552
- * When enabled, a loader component is displayed.
5553
- * @group Props
5554
- */
5555
- this.loading = false;
5556
- /**
5557
- * Inline style of the table.
5558
- * @group Props
5559
- */
5560
- this.tableStyle = undefined;
5561
- /**
5562
- * Style class of the table.
5563
- * @group Props
5564
- */
5565
- this.tableStyleClass = '';
5566
- /**
5567
- * Makes all columns sortable if columns prop is provided.
5568
- * @group Props
5569
- */
5570
- this.sortable = false;
5571
- /**
5572
- * Determines whether sorting works on single column or on multiple columns.
5573
- * @group Props
5574
- */
5575
- this.sortMode = 'single';
5576
- /**
5577
- * Determines whether to use the default sorting or a custom one using sortFunction.
5578
- * @group Props
5579
- */
5580
- this.customSort = false;
5581
- /**
5582
- * Determines whether the table has a toolbar.
5583
- * @group Props
5584
- */
5585
- this.hasToolbar = true;
5586
- /**
5587
- * Toolbar size, it can be "small" or "normal".
5588
- * @group Props
5589
- */
5590
- this.toolbarSize = 'normal';
5591
- /**
5592
- * Toolbar title.
5593
- * @group Props
5594
- */
5595
- this.toolbarTitle = '';
5596
- /**
5597
- * Toolbar icon name.
5598
- * @group Props
5599
- */
5600
- this.toolbarIcon = '';
5601
- /**
5602
- * Toolbar icon color.
5603
- * @group Props
5604
- */
5605
- this.toolbarIconColor = '';
5606
- /**
5607
- * Makes table scrollable.
5608
- * @group Props
5609
- */
5610
- this.scrollable = true;
5506
+ constructor(_control) {
5507
+ this._control = _control;
5611
5508
  /**
5612
- * Height of the scroll viewport in fixed pixels or the "flex" keyword for a dynamic size.
5509
+ * Label of the datepicker element.
5613
5510
  * @group Props
5614
5511
  */
5615
- this.scrollHeight = '';
5512
+ this.label = '';
5616
5513
  /**
5617
- * Determines whether only the elements within scrollable area should be added into the DOM. Works only if scrollable prop is true.
5514
+ * Determines whether datepicker is disabled.
5618
5515
  * @group Props
5619
5516
  */
5620
- this.virtualScroll = false;
5517
+ this.disabled = false;
5621
5518
  /**
5622
- * Determines how many additional elements to add to the DOM outside of the view.
5519
+ * Width of the datepicker of type number denoting pixels or string.
5623
5520
  * @group Props
5624
5521
  */
5625
- this.numToleratedItems = 10;
5522
+ this.width = '100%';
5626
5523
  /**
5627
- * Determines whether the table should have paginator.
5524
+ * Placeholder text.
5628
5525
  * @group Props
5629
5526
  */
5630
- this.paginator = false;
5527
+ this.placeholder = 'MM/DD/YYYY';
5631
5528
  /**
5632
- * Determines whether to show paginator even if there is only one page.
5529
+ * Bottom hint text for the input field.
5633
5530
  * @group Props
5634
5531
  */
5635
- this.alwaysShowPaginator = true;
5532
+ this.hint = '';
5636
5533
  /**
5637
- * Array of integer values to display inside rows per page dropdown of paginator.
5534
+ * When enabled, a clear icon is displayed to clear the value.
5638
5535
  * @group Props
5639
5536
  */
5640
- this.rowsPerPageOptions = [];
5537
+ this.clearable = false;
5641
5538
  /**
5642
- * Index of the first row to be displayed.
5539
+ * Hides hint and validation errors.
5643
5540
  * @group Props
5644
5541
  */
5645
- this.first = 0;
5542
+ this.hideDetails = false;
5646
5543
  /**
5647
- * Number of rows to display per page.
5544
+ * Determines whether the component should have persistent clear icon.
5648
5545
  * @group Props
5649
5546
  */
5650
- this.rows = 0;
5547
+ this.persistentClear = false;
5651
5548
  /**
5652
- * Determines whether to reset page on rows change.
5549
+ * Determines whether to show button to be able to select today's date.
5653
5550
  * @group Props
5654
5551
  */
5655
- this.resetPageOnRowsChange = false;
5552
+ this.showTodayButton = true;
5656
5553
  /**
5657
- * Determines whether to reset page on table data sorting.
5554
+ * Determines whether the datepicker dropdown should open on input focus.
5658
5555
  * @group Props
5659
5556
  */
5660
- this.resetPageOnSort = true;
5557
+ this.openOnInputFocus = false;
5661
5558
  /**
5662
- * Number of total records.
5559
+ * When it is not an empty string, an info icon is displayed to show text for more info.
5663
5560
  * @group Props
5664
5561
  */
5665
- this.totalRecords = 0;
5562
+ this.infoTooltip = '';
5666
5563
  /**
5667
- * Text to display when there is no data.
5564
+ * InfoTooltip class for styling.
5668
5565
  * @group Props
5669
5566
  */
5670
- this.emptyMessage = 'No data';
5567
+ this.infoTooltipClass = 'cps-tooltip-content';
5671
5568
  /**
5672
- * Height of table's body when there is no data, of type number denoting pixels or string.
5569
+ * Size of infoTooltip, of type number denoting pixels or string.
5673
5570
  * @group Props
5674
5571
  */
5675
- this.emptyBodyHeight = '';
5572
+ this.infoTooltipMaxWidth = '100%';
5676
5573
  /**
5677
- * Defines if data is loaded and interacted with in lazy manner.
5574
+ * Determines whether the infoTooltip is persistent.
5678
5575
  * @group Props
5679
5576
  */
5680
- this.lazy = false;
5577
+ this.infoTooltipPersistent = false;
5681
5578
  /**
5682
- * Determines whether to call lazy loading on initialization.
5579
+ * Position of infoTooltip, it can be "top", "bottom", "left" or "right".
5683
5580
  * @group Props
5684
5581
  */
5685
- this.lazyLoadOnInit = true;
5582
+ this.infoTooltipPosition = 'top';
5686
5583
  /**
5687
- * Determines whether to show global filter in the toolbar.
5584
+ * Styling appearance of datepicker input, it can be 'outlined', 'underlined' or 'borderless.
5688
5585
  * @group Props
5689
5586
  */
5690
- this.showGlobalFilter = false;
5587
+ this.appearance = 'outlined';
5691
5588
  /**
5692
- * Global filter placeholder.
5693
- * @group Props
5589
+ * Callback to invoke on value change.
5590
+ * @param {Date | null} value - value change.
5591
+ * @group Emits
5694
5592
  */
5695
- this.globalFilterPlaceholder = 'Search';
5696
- /**
5697
- * An array of fields to use in global filtering.
5698
- * @group Props
5699
- */
5700
- this.globalFilterFields = [];
5701
- /**
5702
- * Determines whether to clear global filter on data loading.
5703
- * @group Props
5704
- */
5705
- this.clearGlobalFilterOnLoading = false;
5706
- /**
5707
- * Determines whether to show remove button in the toolbar when rows are selected.
5708
- * @group Props
5709
- */
5710
- this.showRemoveBtnOnSelect = true;
5711
- /**
5712
- * Determines whether removeBtnOnSelect is disabled.
5713
- * @group Props
5714
- */
5715
- this.removeBtnOnSelectDisabled = false;
5716
- /**
5717
- * Determines whether to show additional button in the toolbar when rows are selected.
5718
- * @group Props
5719
- */
5720
- this.showAdditionalBtnOnSelect = false;
5721
- /**
5722
- * AdditionalBtnOnSelect title.
5723
- * @group Props
5724
- */
5725
- this.additionalBtnOnSelectTitle = 'Select action';
5726
- /**
5727
- * AdditionalBtnOnSelect icon.
5728
- * @group Props
5729
- */
5730
- this.additionalBtnOnSelectIcon = '';
5731
- /**
5732
- * Determines whether additionalBtnOnSelect is disabled.
5733
- * @group Props
5734
- */
5735
- this.additionalBtnOnSelectDisabled = false;
5736
- /**
5737
- * Determines whether to show action button in the toolbar.
5738
- * @group Props
5739
- */
5740
- this.showActionBtn = false;
5741
- /**
5742
- * Action button title.
5743
- * @group Props
5744
- */
5745
- this.actionBtnTitle = 'Action';
5746
- /**
5747
- * Action button icon.
5748
- * @group Props
5749
- */
5750
- this.actionBtnIcon = '';
5751
- /**
5752
- * Determines whether actionBtn is disabled.
5753
- * @group Props
5754
- */
5755
- this.actionBtnDisabled = false;
5756
- /**
5757
- * Determines whether to show export button in the toolbar.
5758
- * @group Props
5759
- */
5760
- this.showExportBtn = false;
5761
- /**
5762
- * Determines whether exportBtn is disabled.
5763
- * @group Props
5764
- */
5765
- this.exportBtnDisabled = false;
5766
- /**
5767
- * Name of the exported file.
5768
- * @group Props
5769
- */
5770
- this.exportFilename = 'download';
5771
- /**
5772
- * Character to use as the csv separator.
5773
- * @group Props
5774
- */
5775
- this.csvSeparator = ',';
5776
- /**
5777
- * Determines whether to show data reload button in the toolbar.
5778
- * @group Props
5779
- */
5780
- this.showDataReloadBtn = false;
5781
- /**
5782
- * Determines whether dataReloadBtn is disabled.
5783
- * @group Props
5784
- */
5785
- this.dataReloadBtnDisabled = false;
5786
- /**
5787
- * Determines whether the table should show columnsToggle menu, where you can choose which columns to be displayed. If external body template is provided, use columnsSelected event emitter.
5788
- * @group Props
5789
- */
5790
- this.showColumnsToggleBtn = false;
5791
- /**
5792
- * Determines whether columnsToggle button is disabled.
5793
- * @group Props
5794
- */
5795
- this.columnsToggleBtnDisabled = false;
5796
- /**
5797
- * Array of initial columns to show in the table. If not provided, all columns are initially visible.
5798
- * @group Props
5799
- */
5800
- this.initialColumns = [];
5801
- /**
5802
- * Callback to invoke on selection changed. Returns selected rows.
5803
- * @param {any[]} any[] - selected rows.
5804
- * @group Emits
5805
- */
5806
- this.rowsSelected = new EventEmitter();
5807
- /**
5808
- * Callback to invoke on selection changed. Returns selected rows indexes.
5809
- * @param {number[]} number[] - selected rows indexes.
5810
- * @group Emits
5811
- */
5812
- this.selectedRowIndexes = new EventEmitter();
5813
- /**
5814
- * Callback to invoke when action button is clicked.
5815
- * @param {void} void - action button clicked.
5816
- * @group Emits
5817
- */
5818
- this.actionBtnClicked = new EventEmitter();
5819
- /**
5820
- * Callback to invoke when edit-row button is clicked.
5821
- * @param {{row: any, index: number}} {row: any, index: number} - edit-row button clicked.
5822
- * @group Emits
5823
- */
5824
- this.editRowBtnClicked = new EventEmitter();
5825
- /**
5826
- * Callback to invoke on rows removal. Returns rows.
5827
- * @param {any[]} any[] - array of rows to remove.
5828
- * @group Emits
5829
- */
5830
- this.rowsToRemove = new EventEmitter();
5831
- /**
5832
- * Callback to invoke on rows removal. Returns rows indexes.
5833
- * @param {number[]} number[] - array of indexes of rows to remove.
5834
- * @group Emits
5835
- */
5836
- this.rowIndexesToRemove = new EventEmitter();
5837
- /**
5838
- * Callback to invoke on page changed.
5839
- * @param {any} any - page changed.
5840
- * @group Emits
5841
- */
5842
- this.pageChanged = new EventEmitter();
5843
- /**
5844
- * Callback to invoke when data is sorted.
5845
- * @param {any} any - sort meta.
5846
- * @group Emits
5847
- */
5848
- this.sorted = new EventEmitter();
5849
- /**
5850
- * Callback to invoke when data is filtered.
5851
- * @param {any} any - custom filtering event.
5852
- * @group Emits
5853
- */
5854
- this.filtered = new EventEmitter();
5855
- /**
5856
- * Callback to invoke when rows are reordered.
5857
- * @param {any} any - rows reordered.
5858
- * @group Emits
5859
- */
5860
- this.rowsReordered = new EventEmitter();
5861
- /**
5862
- * Callback to invoke on columns selection.
5863
- * @param {object} object - selected column.
5864
- * @group Emits
5865
- */
5866
- this.columnsSelected = new EventEmitter();
5867
- /**
5868
- * Callback to invoke when paging, sorting or filtering happens in lazy mode.
5869
- * @param {any} any - custom lazy loading event.
5870
- * @group Emits
5871
- */
5872
- this.lazyLoaded = new EventEmitter();
5873
- /**
5874
- * Callback to invoke when data-reload button is clicked.
5875
- * @param {any} any - button clicked.
5876
- * @group Emits
5877
- */
5878
- this.dataReloadBtnClicked = new EventEmitter();
5879
- /**
5880
- * Callback to invoke when additional button on select is clicked.
5881
- * @param {any[]} any[] - selected data.
5882
- * @group Emits
5883
- */
5884
- this.additionalBtnOnSelectClicked = new EventEmitter();
5885
- /**
5886
- * A function to implement custom sorting. customSort must be true.
5887
- * @param {any} any - sort meta.
5888
- * @group Emits
5889
- */
5890
- this.customSortFunction = new EventEmitter();
5891
- this._data = [];
5892
- this.selectedRows = [];
5893
- this.virtualScrollItemSize = 0;
5894
- this.rowOptions = [];
5895
- this.selectedColumns = [];
5896
- this.exportMenuItems = [
5897
- {
5898
- title: 'CSV',
5899
- icon: 'csv',
5900
- action: () => {
5901
- this.exportTable('csv');
5902
- }
5903
- },
5904
- {
5905
- title: 'XLSX',
5906
- icon: 'xls',
5907
- action: () => {
5908
- this.exportTable('xlsx');
5909
- }
5910
- }
5911
- // {
5912
- // title: 'PDF',
5913
- // icon: 'pdf',
5914
- // action: () => {
5915
- // this.exportTable('pdf');
5916
- // }
5917
- // }
5918
- ];
5919
- }
5920
- ngOnInit() {
5921
- this.emptyBodyHeight = convertSize(this.emptyBodyHeight);
5922
- if (!this.scrollable)
5923
- this.virtualScroll = false;
5924
- if (this.showAdditionalBtnOnSelect)
5925
- this.showRemoveBtnOnSelect = false;
5926
- if (this.paginator) {
5927
- if (this.rowsPerPageOptions.length < 1)
5928
- this.rowsPerPageOptions = [5, 10, 25, 50];
5929
- if (!this.rows)
5930
- this.rows = this.rowsPerPageOptions[0];
5931
- else {
5932
- if (!this.rowsPerPageOptions.includes(this.rows)) {
5933
- throw new Error('rowsPerPageOptions must include rows');
5934
- }
5935
- }
5936
- this.rowOptions = this.rowsPerPageOptions.map((v) => ({
5937
- label: '' + v,
5938
- value: v
5939
- }));
5940
- }
5941
- if (this.showGlobalFilter &&
5942
- this.globalFilterFields?.length < 1 &&
5943
- this.data?.length > 0) {
5944
- this.globalFilterFields = Object.keys(this.data[0]);
5945
- }
5946
- this.selectedColumns =
5947
- this.initialColumns.length > 0 ? this.initialColumns : this.columns;
5948
- }
5949
- get styleClass() {
5950
- const classesList = [];
5951
- switch (this.size) {
5952
- case 'small':
5953
- classesList.push('p-datatable-sm');
5954
- break;
5955
- case 'large':
5956
- classesList.push('p-datatable-lg');
5957
- break;
5958
- }
5959
- if (this.hasToolbar) {
5960
- switch (this.toolbarSize) {
5961
- case 'small':
5962
- classesList.push('cps-tbar-small');
5963
- break;
5964
- case 'normal':
5965
- classesList.push('cps-tbar-normal');
5966
- break;
5967
- }
5968
- }
5969
- if (this.striped) {
5970
- classesList.push('p-datatable-striped');
5971
- }
5972
- if (this.bordered) {
5973
- classesList.push('p-datatable-gridlines');
5974
- }
5975
- return classesList.join(' ');
5976
- }
5977
- ngAfterViewChecked() {
5978
- if (!this.virtualScroll || this.virtualScrollItemSize)
5979
- return;
5980
- this.virtualScrollItemSize =
5981
- this.primengTable?.el?.nativeElement
5982
- ?.querySelector('.p-datatable-tbody')
5983
- ?.querySelector('tr')?.clientHeight || 0;
5984
- this.cdRef.detectChanges();
5985
- }
5986
- ngOnChanges(changes) {
5987
- if (this.loading) {
5988
- this.clearSelection();
5989
- if (this.clearGlobalFilterOnLoading)
5990
- this.clearGlobalFilter();
5991
- }
5992
- if (changes?.data) {
5993
- this.resetSortingState();
5994
- this.selectedRows = this.selectedRows.filter((sr) => this.data.includes(sr));
5593
+ this.valueChanged = new EventEmitter();
5594
+ this.stringDate = '';
5595
+ this.isOpened = false;
5596
+ this.error = '';
5597
+ this.cvtWidth = '';
5598
+ this._value = null;
5599
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
5600
+ this.onChange = (event) => { };
5601
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
5602
+ this.onTouched = () => { };
5603
+ if (this._control) {
5604
+ this._control.valueAccessor = this;
5995
5605
  }
5996
5606
  }
5997
- resetSortingState() {
5998
- this.tUnsortDirective?.resetDefaultSortOrder();
5999
- }
6000
- clearSelection() {
6001
- this.selectedRows = [];
6002
- }
6003
- clearGlobalFilter() {
6004
- this.globalFilterComp?.clear();
6005
- }
6006
- onSelectionChanged(selection) {
6007
- this.rowsSelected.emit(selection);
6008
- const indexes = this._getIndexes(selection);
6009
- this.selectedRowIndexes.emit(indexes);
6010
- }
6011
- onSortFunction(event) {
6012
- this.customSortFunction.emit(event);
6013
- }
6014
- onFilterGlobal(value) {
6015
- this.primengTable.filterGlobal(value, 'contains');
5607
+ ngOnInit() {
5608
+ this.cvtWidth = convertSize(this.width);
5609
+ this._statusChangesSubscription = this._control?.statusChanges?.subscribe(() => {
5610
+ this._checkErrors();
5611
+ });
6016
5612
  }
6017
- removeSelected() {
6018
- this.rowsToRemove.emit(this.selectedRows);
6019
- const indexes = this._getIndexes(this.selectedRows);
6020
- this.rowIndexesToRemove.emit(indexes);
5613
+ ngOnDestroy() {
5614
+ this._statusChangesSubscription?.unsubscribe();
6021
5615
  }
6022
- onClickAdditionalBtnOnSelect() {
6023
- this.additionalBtnOnSelectClicked.emit(this.selectedRows);
5616
+ registerOnChange(fn) {
5617
+ this.onChange = fn;
6024
5618
  }
6025
- onClickActionBtn() {
6026
- this.actionBtnClicked.emit();
5619
+ registerOnTouched(fn) {
5620
+ this.onTouched = fn;
6027
5621
  }
6028
- onRowsPerPageChanged() {
6029
- if (this.resetPageOnRowsChange) {
6030
- this.primengTable.first = 0;
5622
+ onInputValueChanged(val) {
5623
+ this.stringDate = val;
5624
+ if (!val) {
5625
+ this._updateValue(null);
5626
+ return;
6031
5627
  }
6032
- this.changePage(this.getPage());
5628
+ const dt = this._stringToDate(val);
5629
+ if (dt)
5630
+ this._updateValue(dt);
6033
5631
  }
6034
- getPageCount() {
6035
- return Math.ceil(this.primengTable.totalRecords / this.rows);
5632
+ writeValue(value) {
5633
+ this.value = value;
6036
5634
  }
6037
- getPage() {
6038
- return this.primengTable.first
6039
- ? Math.floor(this.primengTable.first / this.rows)
6040
- : 0;
5635
+ _updateValue(value) {
5636
+ if (this.value === value)
5637
+ return;
5638
+ this.writeValue(value);
5639
+ this.onChange(value);
5640
+ this.valueChanged.emit(value);
6041
5641
  }
6042
- changePage(p) {
6043
- const pc = Math.ceil(this.getPageCount());
6044
- if (p >= 0 && p < pc) {
6045
- this.first = this.rows * p;
6046
- this.primengTable.onPageChange({ first: this.first, rows: this.rows });
5642
+ _updateValueFromInputString() {
5643
+ if (!this.stringDate) {
5644
+ this._updateValue(null);
5645
+ }
5646
+ else {
5647
+ this._updateValue(this._stringToDate(this.stringDate));
6047
5648
  }
6048
5649
  }
6049
- onPageChange(event) {
6050
- this.first = event.first;
6051
- this.rows = event.rows;
6052
- const state = {
6053
- page: this.getPage(),
6054
- first: this.first,
6055
- rows: this.rows,
6056
- pageCount: Math.ceil(this.getPageCount())
6057
- };
6058
- this.pageChanged.emit(state);
6059
- }
6060
- toggleAllColumns() {
6061
- this.selectedColumns =
6062
- this.selectedColumns.length < this.columns.length ? this.columns : [];
6063
- this.columnsSelected.emit(this.selectedColumns);
6064
- }
6065
- isColumnSelected(col) {
6066
- return this.selectedColumns.some((item) => isEqual(item, col));
5650
+ _checkDateFormat(dateString) {
5651
+ if (!/^\d\d\/\d\d\/\d\d\d\d$/.test(dateString)) {
5652
+ return false;
5653
+ }
5654
+ const parts = dateString.split('/').map((p) => parseInt(p, 10));
5655
+ parts[0] -= 1;
5656
+ const d = new Date(parts[2], parts[0], parts[1]);
5657
+ return (d.getMonth() === parts[0] &&
5658
+ d.getDate() === parts[1] &&
5659
+ d.getFullYear() === parts[2]);
6067
5660
  }
6068
- onSelectColumn(col) {
6069
- let res = [];
6070
- if (this.isColumnSelected(col)) {
6071
- res = this.selectedColumns.filter((v) => !isEqual(v, col));
5661
+ _checkDateInRange(date, minDate, maxDate) {
5662
+ if (!minDate && !maxDate)
5663
+ return true;
5664
+ if (minDate && maxDate) {
5665
+ return (date.getTime() >= minDate.getTime() &&
5666
+ date.getTime() <= maxDate.getTime());
6072
5667
  }
6073
- else {
6074
- this.columns.forEach((o) => {
6075
- if (this.selectedColumns.some((v) => isEqual(v, o)) ||
6076
- isEqual(col, o)) {
6077
- res.push(o);
6078
- }
6079
- });
5668
+ if (minDate) {
5669
+ return date.getTime() >= minDate.getTime();
6080
5670
  }
6081
- this.selectedColumns = res;
6082
- this.columnsSelected.emit(this.selectedColumns);
6083
- }
6084
- onEditRowClicked(row) {
6085
- const [index] = this._getIndexes([row]);
6086
- this.editRowBtnClicked.emit({ row, index });
5671
+ return date.getTime() <= maxDate.getTime();
6087
5672
  }
6088
- onRemoveRowClicked(item) {
6089
- this.rowsToRemove.emit([item]);
6090
- const indexes = this._getIndexes([item]);
6091
- this.rowIndexesToRemove.emit(indexes);
5673
+ _dateToString(dateVal) {
5674
+ if (!dateVal)
5675
+ return '';
5676
+ let month = '' + (dateVal.getMonth() + 1);
5677
+ if (month.length < 2)
5678
+ month = '0' + month;
5679
+ let day = '' + dateVal.getDate();
5680
+ if (day.length < 2)
5681
+ day = '0' + day;
5682
+ const year = dateVal.getFullYear();
5683
+ return `${month}/${day}/${year}`;
6092
5684
  }
6093
- onSort(event) {
6094
- this.sorted.emit(event);
5685
+ _stringToDate(dateString) {
5686
+ if (!this._checkDateFormat(dateString))
5687
+ return null;
5688
+ const [month, day, year] = dateString.split('/');
5689
+ const dt = new Date(`${year}-${month}-${day}`);
5690
+ const inRange = this._checkDateInRange(dt, this.minDate, this.maxDate);
5691
+ return inRange ? dt : null;
6095
5692
  }
6096
- onFilter(event) {
6097
- this.filtered.emit(event);
5693
+ _checkErrors() {
5694
+ if (this.stringDate && !this._stringToDate(this.stringDate)) {
5695
+ this.error = 'Date is invalid';
5696
+ return;
5697
+ }
5698
+ const errors = this._control?.errors;
5699
+ if (!this._control?.control?.touched || !errors) {
5700
+ this.error = '';
5701
+ return;
5702
+ }
5703
+ if ('required' in errors) {
5704
+ this.error = 'Field is required';
5705
+ return;
5706
+ }
5707
+ const errArr = Object.values(errors);
5708
+ if (errArr.length < 1) {
5709
+ this.error = '';
5710
+ return;
5711
+ }
5712
+ const message = errArr.find((msg) => typeof msg === 'string');
5713
+ this.error = message || 'Unknown error';
6098
5714
  }
6099
- onRowReorder(event) {
6100
- this.rowsReordered.emit(event);
5715
+ onClearCalendarDate() {
5716
+ this.onSelectCalendarDate(null);
6101
5717
  }
6102
- onLazyLoaded(event) {
6103
- this.lazyLoaded.emit(event);
5718
+ onSelectCalendarDate(dateVal) {
5719
+ this.toggleCalendar(false);
5720
+ this.writeValue(dateVal);
5721
+ this.onChange(dateVal);
5722
+ this.valueChanged.emit(dateVal);
6104
5723
  }
6105
- onReloadData() {
6106
- if (this.dataReloadBtnDisabled)
5724
+ onInputBlur() {
5725
+ if (this.isOpened)
6107
5726
  return;
6108
- this.dataReloadBtnClicked.emit();
5727
+ this._updateValueFromInputString();
5728
+ this._checkErrors();
6109
5729
  }
6110
- onExportData(event) {
6111
- if (this.exportBtnDisabled)
6112
- return;
6113
- this.exportMenu?.toggle(event);
5730
+ onInputFocus() {
5731
+ this._control?.control?.markAsTouched();
5732
+ if (this.openOnInputFocus)
5733
+ this.toggleCalendar(true);
6114
5734
  }
6115
- onColumnsToggle(event) {
6116
- if (this.columnsToggleBtnDisabled)
5735
+ onInputEnterClicked() {
5736
+ if (!this.isOpened)
6117
5737
  return;
6118
- this.colToggleMenu?.toggle(event);
6119
- }
6120
- _getIndexes(rows) {
6121
- let indexes = rows.map((row) => this.primengTable.value.indexOf(row));
6122
- const indexesMap = this.tUnsortDirective?.sortIndices;
6123
- if (indexesMap && indexesMap.length > 0) {
6124
- indexes = indexes.map((i) => indexesMap.indexOf(i));
6125
- }
6126
- return indexes;
6127
- }
6128
- exportTable(format) {
6129
- if (this.columns.length < 1)
6130
- throw new Error('Columns must be defined!');
6131
- if (this.selectedColumns.length < 1)
6132
- throw new Error('Nothing to export!');
6133
- switch (format) {
6134
- case 'csv':
6135
- this.primengTable.exportCSV();
6136
- break;
6137
- case 'xlsx':
6138
- this.exportXLSX();
6139
- break;
6140
- // case 'pdf':
6141
- // this.exportPDF();
6142
- // break;
6143
- }
6144
- }
6145
- exportXLSX() {
6146
- import('xlsx').then((xlsx) => {
6147
- const sheetData = [
6148
- this.selectedColumns.map((c) => c[this.colHeaderName]),
6149
- ...this.primengTable.value.map((item) => this.selectedColumns.map((c) => item[c[this.colFieldName]]))
6150
- ];
6151
- const worksheet = xlsx.utils.json_to_sheet(sheetData, {
6152
- skipHeader: true
6153
- });
6154
- const workbook = {
6155
- Sheets: { [this.exportFilename]: worksheet },
6156
- SheetNames: [this.exportFilename]
6157
- };
6158
- const xlsxBuffer = xlsx.write(workbook, {
6159
- bookType: 'xlsx',
6160
- type: 'array'
6161
- });
6162
- const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
6163
- const blob = new Blob([xlsxBuffer], {
6164
- type: EXCEL_TYPE
6165
- });
6166
- const downloadLink = this.document.createElement('a');
6167
- downloadLink.href = URL.createObjectURL(blob);
6168
- downloadLink.download = `${this.exportFilename}.xlsx`;
6169
- downloadLink.click();
6170
- });
5738
+ this._control?.control?.markAsTouched();
5739
+ this._updateValueFromInputString();
5740
+ this._checkErrors();
5741
+ this.toggleCalendar(false);
6171
5742
  }
6172
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
6173
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: CpsTableComponent, isStandalone: true, selector: "cps-table", inputs: { columns: "columns", colHeaderName: "colHeaderName", colFieldName: "colFieldName", striped: "striped", bordered: "bordered", size: "size", selectable: "selectable", rowHover: "rowHover", dataKey: "dataKey", showRowMenu: "showRowMenu", showRowRemoveButton: "showRowRemoveButton", showRowEditButton: "showRowEditButton", reorderableRows: "reorderableRows", loading: "loading", tableStyle: "tableStyle", tableStyleClass: "tableStyleClass", sortable: "sortable", sortMode: "sortMode", customSort: "customSort", hasToolbar: "hasToolbar", toolbarSize: "toolbarSize", toolbarTitle: "toolbarTitle", toolbarIcon: "toolbarIcon", toolbarIconColor: "toolbarIconColor", scrollable: "scrollable", scrollHeight: "scrollHeight", virtualScroll: "virtualScroll", numToleratedItems: "numToleratedItems", paginator: "paginator", alwaysShowPaginator: "alwaysShowPaginator", rowsPerPageOptions: "rowsPerPageOptions", first: "first", rows: "rows", resetPageOnRowsChange: "resetPageOnRowsChange", resetPageOnSort: "resetPageOnSort", totalRecords: "totalRecords", emptyMessage: "emptyMessage", emptyBodyHeight: "emptyBodyHeight", lazy: "lazy", lazyLoadOnInit: "lazyLoadOnInit", showGlobalFilter: "showGlobalFilter", globalFilterPlaceholder: "globalFilterPlaceholder", globalFilterFields: "globalFilterFields", clearGlobalFilterOnLoading: "clearGlobalFilterOnLoading", showRemoveBtnOnSelect: "showRemoveBtnOnSelect", removeBtnOnSelectDisabled: "removeBtnOnSelectDisabled", showAdditionalBtnOnSelect: "showAdditionalBtnOnSelect", additionalBtnOnSelectTitle: "additionalBtnOnSelectTitle", additionalBtnOnSelectIcon: "additionalBtnOnSelectIcon", additionalBtnOnSelectDisabled: "additionalBtnOnSelectDisabled", showActionBtn: "showActionBtn", actionBtnTitle: "actionBtnTitle", actionBtnIcon: "actionBtnIcon", actionBtnDisabled: "actionBtnDisabled", showExportBtn: "showExportBtn", exportBtnDisabled: "exportBtnDisabled", exportFilename: "exportFilename", csvSeparator: "csvSeparator", showDataReloadBtn: "showDataReloadBtn", dataReloadBtnDisabled: "dataReloadBtnDisabled", showColumnsToggleBtn: "showColumnsToggleBtn", columnsToggleBtnDisabled: "columnsToggleBtnDisabled", initialColumns: "initialColumns", data: "data" }, outputs: { rowsSelected: "rowsSelected", selectedRowIndexes: "selectedRowIndexes", actionBtnClicked: "actionBtnClicked", editRowBtnClicked: "editRowBtnClicked", rowsToRemove: "rowsToRemove", rowIndexesToRemove: "rowIndexesToRemove", pageChanged: "pageChanged", sorted: "sorted", filtered: "filtered", rowsReordered: "rowsReordered", columnsSelected: "columnsSelected", lazyLoaded: "lazyLoaded", dataReloadBtnClicked: "dataReloadBtnClicked", additionalBtnOnSelectClicked: "additionalBtnOnSelectClicked", customSortFunction: "customSortFunction" }, providers: [
6174
- TableService,
6175
- {
6176
- provide: Table,
6177
- useFactory: tableFactory,
6178
- // eslint-disable-next-line no-use-before-define
6179
- deps: [CpsTableComponent]
6180
- }
6181
- ], queries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbar"], descendants: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true }, { propertyName: "nestedHeaderTemplate", first: true, predicate: ["nestedHeader"], descendants: true }, { propertyName: "bodyTemplate", first: true, predicate: ["body"], descendants: true }, { propertyName: "rowExpansionTemplate", first: true, predicate: ["rowexpansion"], descendants: true }], viewQueries: [{ propertyName: "primengTable", first: true, predicate: ["primengTable"], descendants: true, static: true }, { propertyName: "globalFilterComp", first: true, predicate: ["globalFilterComp"], descendants: true }, { propertyName: "exportMenu", first: true, predicate: ["exportMenu"], descendants: true }, { propertyName: "colToggleMenu", first: true, predicate: ["colToggleMenu"], descendants: true }, { propertyName: "tUnsortDirective", first: true, predicate: ["tUnsortDirective"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<p-table\n #primengTable\n #tUnsortDirective=\"tWithUnsort\"\n tWithUnsort\n [ngClass]=\"{ 'cps-table-loading': loading }\"\n [styleClass]=\"styleClass\"\n [tableStyle]=\"tableStyle\"\n [tableStyleClass]=\"tableStyleClass\"\n [value]=\"data\"\n [dataKey]=\"dataKey\"\n [columns]=\"selectedColumns\"\n (selectionChange)=\"onSelectionChanged($event)\"\n [globalFilterFields]=\"globalFilterFields\"\n [showInitialSortBadge]=\"false\"\n [loading]=\"loading\"\n [scrollable]=\"scrollable\"\n [scrollHeight]=\"scrollHeight\"\n [lazy]=\"lazy\"\n [lazyLoadOnInit]=\"lazyLoadOnInit\"\n [virtualScroll]=\"virtualScroll\"\n [virtualScrollItemSize]=\"virtualScrollItemSize\"\n [virtualScrollOptions]=\"{ numToleratedItems: numToleratedItems }\"\n [paginator]=\"paginator\"\n [showCurrentPageReport]=\"true\"\n [alwaysShowPaginator]=\"alwaysShowPaginator\"\n [rows]=\"rows\"\n [first]=\"first\"\n [totalRecords]=\"totalRecords\"\n [resetPageOnSort]=\"resetPageOnSort\"\n currentPageReportTemplate=\"{first} - {last} of {totalRecords}\"\n [(selection)]=\"selectedRows\"\n [metaKeySelection]=\"false\"\n [rowHover]=\"rowHover\"\n [customSort]=\"customSort\"\n [sortMode]=\"sortMode\"\n [exportFilename]=\"exportFilename\"\n [csvSeparator]=\"csvSeparator\"\n (onPage)=\"onPageChange($event)\"\n (onLazyLoad)=\"onLazyLoaded($event)\"\n (sortFunction)=\"onSortFunction($event)\"\n (onSort)=\"onSort($event)\"\n (onFilter)=\"onFilter($event)\"\n (onRowReorder)=\"onRowReorder($event)\">\n <ng-template pTemplate=\"caption\" *ngIf=\"hasToolbar\">\n <ng-container *ngIf=\"toolbarTemplate\">\n <ng-container *ngTemplateOutlet=\"toolbarTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!toolbarTemplate\">\n <div class=\"cps-table-tbar-left\">\n <div *ngIf=\"toolbarIcon\" class=\"cps-table-tbar-icon\">\n <cps-icon [icon]=\"toolbarIcon\" [color]=\"toolbarIconColor\"></cps-icon>\n </div>\n <div class=\"cps-table-tbar-title\">{{ toolbarTitle }}</div>\n <div *ngIf=\"showGlobalFilter\" class=\"cps-table-tbar-global-filter\">\n <cps-input\n #globalFilterComp\n prefixIcon=\"search\"\n [placeholder]=\"globalFilterPlaceholder\"\n (valueChanged)=\"onFilterGlobal($event)\"\n [clearable]=\"true\"\n [disabled]=\"loading\"\n [appearance]=\"toolbarSize === 'small' ? 'underlined' : 'outlined'\"\n [hideDetails]=\"true\">\n </cps-input>\n </div>\n </div>\n <div class=\"cps-table-tbar-right\">\n <div\n *ngIf=\"showRemoveBtnOnSelect && selectedRows.length > 0\"\n class=\"cps-table-tbar-btn-on-select\">\n <cps-button\n label=\"Remove\"\n [disabled]=\"removeBtnOnSelectDisabled\"\n color=\"prepared\"\n type=\"borderless\"\n icon=\"remove\"\n [size]=\"toolbarSize\"\n (clicked)=\"removeSelected()\">\n </cps-button>\n </div>\n <div\n *ngIf=\"showAdditionalBtnOnSelect && selectedRows.length > 0\"\n class=\"cps-table-tbar-btn-on-select\">\n <cps-button\n [label]=\"additionalBtnOnSelectTitle\"\n [disabled]=\"additionalBtnOnSelectDisabled\"\n color=\"prepared\"\n type=\"borderless\"\n [icon]=\"additionalBtnOnSelectIcon\"\n [size]=\"toolbarSize\"\n (clicked)=\"onClickAdditionalBtnOnSelect()\">\n </cps-button>\n </div>\n <div *ngIf=\"showActionBtn\" class=\"cps-table-tbar-action-btn\">\n <cps-button\n [label]=\"actionBtnTitle\"\n [disabled]=\"actionBtnDisabled\"\n color=\"prepared\"\n type=\"outlined\"\n [icon]=\"actionBtnIcon\"\n [size]=\"toolbarSize\"\n (clicked)=\"onClickActionBtn()\">\n </cps-button>\n </div>\n <div\n *ngIf=\"showColumnsToggleBtn && columns.length > 0\"\n class=\"cps-table-tbar-coltoggle-btn\"\n [ngClass]=\"{ 'btn-disabled': columnsToggleBtnDisabled }\">\n <cps-icon\n icon=\"columns\"\n size=\"normal\"\n [color]=\"\n columnsToggleBtnDisabled ? 'text-lightest' : 'prepared-lighten1'\n \"\n (click)=\"onColumnsToggle($event)\"></cps-icon>\n <cps-menu #colToggleMenu [withArrow]=\"false\">\n <div class=\"cps-table-coltoggle-menu\">\n <div\n class=\"cps-table-coltoggle-menu-item select-all-option\"\n [class.allselected]=\"selectedColumns.length === columns.length\"\n (click)=\"toggleAllColumns()\">\n <span class=\"cps-table-coltoggle-menu-item-left\">\n <span class=\"cps-table-coltoggle-menu-item-check\"> </span>\n <span class=\"cps-table-coltoggle-menu-item-label\"\n >Show all columns</span\n >\n </span>\n </div>\n <div\n *ngFor=\"let col of columns\"\n class=\"cps-table-coltoggle-menu-item\"\n (click)=\"onSelectColumn(col)\"\n [class.selected]=\"isColumnSelected(col)\">\n <span class=\"cps-table-coltoggle-menu-item-left\">\n <span class=\"cps-table-coltoggle-menu-item-check\"></span>\n <span class=\"cps-table-coltoggle-menu-item-label\">{{\n col[colHeaderName]\n }}</span>\n </span>\n </div>\n </div>\n </cps-menu>\n </div>\n <div\n *ngIf=\"showExportBtn\"\n class=\"cps-table-tbar-export-btn\"\n [ngClass]=\"{ 'btn-disabled': exportBtnDisabled }\">\n <cps-icon\n icon=\"export\"\n size=\"20\"\n [color]=\"exportBtnDisabled ? 'text-light' : 'prepared-lighten1'\"\n (click)=\"onExportData($event)\"></cps-icon>\n <cps-menu\n #exportMenu\n [items]=\"exportMenuItems\"\n [compressed]=\"true\"\n [withArrow]=\"false\">\n </cps-menu>\n </div>\n <div\n *ngIf=\"showDataReloadBtn\"\n class=\"cps-table-tbar-reload-btn\"\n [ngClass]=\"{ 'btn-disabled': dataReloadBtnDisabled }\">\n <cps-icon\n icon=\"refresh\"\n size=\"18\"\n [color]=\"dataReloadBtnDisabled ? 'text-light' : 'prepared-lighten1'\"\n (click)=\"onReloadData()\">\n </cps-icon>\n </div>\n </div>\n </ng-container>\n </ng-template>\n\n <ng-template pTemplate=\"header\" *ngIf=\"nestedHeaderTemplate\" let-columns>\n <ng-container\n *ngTemplateOutlet=\"\n nestedHeaderTemplate;\n context: {\n $implicit: columns\n }\n \"></ng-container>\n </ng-template>\n\n <ng-template pTemplate=\"header\" *ngIf=\"!nestedHeaderTemplate\" let-columns>\n <tr>\n <th style=\"width: 3rem\" *ngIf=\"rowExpansionTemplate\"></th>\n <th style=\"width: 3rem\" *ngIf=\"reorderableRows\"></th>\n <th style=\"width: 4rem\" *ngIf=\"selectable\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <ng-container *ngIf=\"headerTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n headerTemplate;\n context: {\n $implicit: columns\n }\n \"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!headerTemplate && columns.length > 0\">\n <ng-container *ngIf=\"sortable\">\n <th *ngFor=\"let col of columns\" [cpsTColSortable]=\"col[colFieldName]\">\n {{ col[colHeaderName] }}\n </th>\n </ng-container>\n <ng-container *ngIf=\"!sortable\">\n <th *ngFor=\"let col of columns\">\n {{ col[colHeaderName] }}\n </th>\n </ng-container>\n </ng-container>\n <th\n style=\"width: 2rem\"\n class=\"cps-table-row-menu-cell\"\n *ngIf=\"showRowMenu && (showRowRemoveButton || showRowEditButton)\"></th>\n </tr>\n </ng-template>\n\n <ng-template\n pTemplate=\"body\"\n let-rowData\n let-columns=\"columns\"\n let-item\n let-rowIndex=\"rowIndex\"\n let-expanded=\"expanded\">\n <tr\n [pReorderableRow]=\"rowIndex\"\n [ngClass]=\"{\n 'cps-table-row-selected': selectable && primengTable.isSelected(item)\n }\">\n <td *ngIf=\"rowExpansionTemplate\" class=\"cps-table-row-chevron-cell\">\n <div\n class=\"cps-table-row-chevron\"\n [ngClass]=\"{ 'cps-table-row-chevron-expanded': expanded }\">\n <cps-icon\n icon=\"chevron-down\"\n size=\"small\"\n color=\"text-dark\"\n [pRowToggler]=\"item\">\n </cps-icon>\n </div>\n </td>\n <td *ngIf=\"reorderableRows\" class=\"cps-table-row-drag-handle-cell\">\n <span class=\"cps-table-row-drag-handle\" pReorderableRowHandle>\u2630</span>\n </td>\n <td *ngIf=\"selectable\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <ng-container *ngIf=\"bodyTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n bodyTemplate;\n context: {\n $implicit: item,\n rowIndex: rowIndex,\n columns: columns,\n rowData: rowData\n }\n \">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!bodyTemplate\">\n <ng-container *ngIf=\"columns.length > 0\">\n <td *ngFor=\"let col of columns\">\n {{ rowData[col[colFieldName]] }}\n </td>\n </ng-container>\n </ng-container>\n <td\n *ngIf=\"showRowMenu && (showRowRemoveButton || showRowEditButton)\"\n class=\"cps-table-row-menu-cell\">\n <table-row-menu\n (editRowBtnClicked)=\"onEditRowClicked(item)\"\n (removeRowBtnClicked)=\"onRemoveRowClicked(item)\"\n [showRowRemoveButton]=\"showRowRemoveButton\"\n [showRowEditButton]=\"showRowEditButton\">\n </table-row-menu>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"rowexpansion\" *ngIf=\"rowExpansionTemplate\" let-item>\n <tr class=\"cps-table-row-expanded-content\">\n <td colspan=\"100\">\n <ng-container\n *ngTemplateOutlet=\"\n rowExpansionTemplate;\n context: {\n $implicit: item\n }\n \"></ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td\n colspan=\"100\"\n class=\"cps-table-empty-message-td\"\n [ngStyle]=\"{ height: emptyBodyHeight }\">\n {{ emptyMessage }}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"loadingicon\">\n <cps-loader [fullScreen]=\"false\" opacity=\"0\"></cps-loader>\n </ng-template>\n <ng-template pTemplate=\"paginatorleft\">\n <div class=\"cps-table-paginator-itms-per-page\">\n <span class=\"cps-table-paginator-items-per-page-title\"\n >Rows per page:\n </span>\n <cps-select\n [options]=\"rowOptions\"\n [hideDetails]=\"true\"\n [(ngModel)]=\"rows\"\n (valueChanged)=\"onRowsPerPageChanged()\"\n [returnObject]=\"false\"\n optionsClass=\"cps-paginator-page-options\">\n </cps-select>\n </div>\n </ng-template>\n</p-table>\n", styles: [":host ::ng-deep .p-component{font-family:Source Sans Pro,sans-serif;font-size:14px;font-weight:400}:host ::ng-deep .p-datatable-flex-scrollable{display:flex;flex-direction:column;height:100%}:host ::ng-deep .p-datatable{position:relative}:host ::ng-deep .p-datatable.p-datatable-gridlines .p-datatable-header{border-width:1px 1px 0 1px}:host ::ng-deep .p-datatable .p-datatable-header{font-weight:600;display:flex;justify-content:space-between;align-items:center;padding:0 10px;border:unset;background:unset;border-top:1px solid var(--cps-color-line-mid);border-right:1px solid var(--cps-color-line-mid);border-left:4px solid var(--cps-color-surprise)!important;border-radius:4px 4px 0 0;font-size:16px;line-height:150%;background-color:#fff;color:var(--cps-color-text-darkest);overflow:auto}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left{display:flex;align-items:center}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left .cps-table-tbar-global-filter{margin-left:12px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left .cps-table-tbar-icon{display:flex;margin-right:8px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left .cps-table-tbar-title{cursor:default}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right{display:flex;align-items:center}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-btn-on-select{margin-right:4px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-action-btn{margin-right:4px;margin-left:8px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn{display:contents}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn cps-icon{margin-left:12px;margin-right:4px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn:not(.btn-disabled) cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn:not(.btn-disabled) cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn:not(.btn-disabled) cps-icon{cursor:pointer}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn:not(.btn-disabled) cps-icon:hover .cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn:not(.btn-disabled) cps-icon:hover .cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn:not(.btn-disabled) cps-icon:hover .cps-icon{color:var(--cps-color-prepared)!important}:host ::ng-deep .cps-tbar-small.p-datatable .p-datatable-header{height:43px}:host ::ng-deep .cps-tbar-normal.p-datatable .p-datatable-header{height:72px}:host ::ng-deep .p-datatable-flex-scrollable>.p-datatable-wrapper{display:flex;flex-direction:column;flex:1;height:100%}:host ::ng-deep .p-datatable-scrollable>.p-datatable-wrapper{position:relative}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow:auto}:host ::ng-deep .p-datatable-table{border-spacing:0px;width:100%}:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-thead,:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-tfoot,:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-scroller-viewport>.p-scroller>.p-datatable-table>.p-datatable-thead,:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-scroller-viewport>.p-scroller>.p-datatable-table>.p-datatable-tfoot{background-color:#fff}:host ::ng-deep .p-datatable-scrollable-table>.p-datatable-thead{position:sticky;top:0;z-index:1}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{padding:.5rem}:host ::ng-deep .p-datatable.p-datatable-lg .p-datatable-thead>tr>th{padding:1.25rem}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{text-align:left;padding:1rem;border:1px solid var(--cps-color-line-mid);border-width:0 0 1px 1px;font-weight:400;color:var(--cps-color-text-mild);background:#fff;transition:box-shadow .2s}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-width:1px}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{border-width:1px 0 1px 1px}:host ::ng-deep .p-datatable .p-datatable-thead tr:not(:first-child) th{border-top:unset}:host ::ng-deep .p-datatable .p-sortable-column:not(.p-highlight):hover .cps-sortable-column-icon.sort-unsorted .sort-unsorted-arrow-up{border-bottom-color:var(--cps-color-text-mild)}:host ::ng-deep .p-datatable .p-sortable-column:not(.p-highlight):hover .cps-sortable-column-icon.sort-unsorted .sort-unsorted-arrow-down{border-top-color:var(--cps-color-text-mild)}:host ::ng-deep .p-icon{display:inline-block;width:1rem;height:1rem}:host ::ng-deep .p-datatable .p-sortable-column .cps-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center;font-size:12px;vertical-align:top;color:var(--cps-color-calm);margin-left:.25rem}:host ::ng-deep .p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:none;cursor:pointer;-webkit-user-select:none;user-select:none}:host ::ng-deep .p-datatable .p-sortable-column{cursor:pointer;-webkit-user-select:none;user-select:none}:host ::ng-deep .p-datatable .p-sortable-column:focus{box-shadow:none;outline:0 none}:host ::ng-deep .p-datatable.p-datatable-striped .p-datatable-tbody>tr:nth-child(odd){background:var(--cps-color-bg-light)}:host ::ng-deep .p-datatable.p-datatable-striped .p-datatable-tbody>tr:nth-child(2n){background:#fff}:host ::ng-deep .p-datatable.p-datatable-hoverable-rows .p-datatable-tbody>tr:not(.p-highlight):not(.cps-table-row-expanded-content):hover{background:var(--cps-color-highlight-hover)}:host ::ng-deep .p-datatable .p-datatable-tbody .cps-table-row-expanded-content td{border-left:4px solid var(--cps-color-surprise)!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr{background:#fff;color:var(--cps-color-text-dark);transition:box-shadow .2s}:host ::ng-deep .p-datatable .p-datatable-tbody>tr.cps-table-row-selected{background-color:var(--cps-color-highlight-active)!important}:host ::ng-deep .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody>tr>td:last-child{border-width:0 1px 1px 1px}:host ::ng-deep .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody>tr>td{border-width:0 0 1px 1px}:host ::ng-deep .p-datatable.p-datatable-gridlines .p-datatable-tbody>tr>td:last-child{border-width:1px 1px 0 1px}:host ::ng-deep .p-datatable.p-datatable-gridlines .p-datatable-tbody>tr>td{border-width:1px 0 0 1px}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{text-align:left;border:1px solid var(--cps-color-line-mid);border-width:0 0 1px 0;padding:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-width:0 0 1px 1px}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-width:0 1px 1px 0}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:only-child{border-width:0 1px 1px 1px}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{padding:.5rem}:host ::ng-deep .p-datatable.p-datatable-lg .p-datatable-tbody>tr>td{padding:1.25rem}:host ::ng-deep td:has(p-tablecheckbox){text-align:center!important}:host ::ng-deep th:has(p-tableheadercheckbox){text-align:center!important;width:3rem!important}:host ::ng-deep .p-checkbox{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom;position:relative;width:18px;height:18px}:host ::ng-deep .p-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}:host ::ng-deep .p-hidden-accessible input,:host ::ng-deep .p-hidden-accessible select{transform:scale(0)}:host ::ng-deep .p-checkbox .p-checkbox-box{background:#fff;width:18px;height:18px;color:var(--cps-color-text-dark);border:2px solid var(--cps-color-text-mild);border-radius:2px;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s}:host ::ng-deep .p-checkbox-box{display:flex;justify-content:center;align-items:center}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:var(--cps-color-calm);background:var(--cps-color-calm)}:host ::ng-deep .p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box.p-highlight:hover{border-color:var(--cps-color-calm);background:var(--cps-color-calm);color:#fff}:host ::ng-deep .p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box:hover{border-color:var(--cps-color-calm)}:host ::ng-deep .p-checkbox .p-checkbox-box .p-icon{width:14px;height:14px}:host ::ng-deep .p-checkbox .p-checkbox-box .p-checkbox-icon{transition-duration:.2s;color:#fff;font-size:14px}:host ::ng-deep .p-datatable-reorderablerow-handle,:host ::ng-deep [pReorderableColumn]{cursor:move;font-size:20px;line-height:1}:host ::ng-deep .p-datatable-reorderablerow-handle:hover,:host ::ng-deep [pReorderableColumn]:hover{color:var(--cps-color-calm)}:host ::ng-deep .p-datatable .p-datatable-tbody>tr.p-datatable-dragpoint-top>td{box-shadow:inset 0 2px 0 0 var(--cps-color-calm)}:host ::ng-deep .p-datatable .p-datatable-tbody>tr.p-datatable-dragpoint-bottom>td{box-shadow:inset 0 -2px 0 0 var(--cps-color-calm)}:host ::ng-deep .p-datatable .p-paginator-bottom{border-width:0 1px 1px 1px;border-radius:0}:host ::ng-deep .p-paginator{background:#fff;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;color:var(--cps-color-text-dark);padding:1rem;border:1px solid var(--cps-color-line-mid)}:host ::ng-deep .p-paginator-left-content{margin-right:auto}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page{display:inline-flex;align-items:center}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-table-paginator-items-per-page-title{font-family:Source Sans Pro,sans-serif;font-size:14px;margin-right:12px;cursor:default}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-select-box{min-height:32px!important;background:transparent!important}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-select-box .cps-select-box-items{font-size:14px!important}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-select-box .cps-select-box-chevron .cps-icon{width:14px;height:14px}:host ::ng-deep .p-paginator .p-paginator-current{background-color:transparent;border:0 none;color:var(--cps-color-text-dark);min-width:3rem;margin:.143rem;padding:0 .5rem;font-family:Source Sans Pro,sans-serif;font-size:14px;height:unset}:host ::ng-deep .p-paginator-page,:host ::ng-deep .p-paginator-next,:host ::ng-deep .p-paginator-last,:host ::ng-deep .p-paginator-first,:host ::ng-deep .p-paginator-prev,:host ::ng-deep .p-paginator-current{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;-webkit-user-select:none;user-select:none;overflow:hidden;position:relative}:host ::ng-deep .p-paginator-current{cursor:default}:host ::ng-deep .p-paginator .p-paginator-first:not(.p-disabled):not(.p-highlight):hover,:host ::ng-deep .p-paginator .p-paginator-prev:not(.p-disabled):not(.p-highlight):hover,:host ::ng-deep .p-paginator .p-paginator-next:not(.p-disabled):not(.p-highlight):hover,:host ::ng-deep .p-paginator .p-paginator-last:not(.p-disabled):not(.p-highlight):hover{background:var(--cps-color-highlight-hover);border-color:unset}:host ::ng-deep .p-paginator .p-paginator-first:not(.p-disabled):not(.p-highlight):active,:host ::ng-deep .p-paginator .p-paginator-prev:not(.p-disabled):not(.p-highlight):active,:host ::ng-deep .p-paginator .p-paginator-next:not(.p-disabled):not(.p-highlight):active,:host ::ng-deep .p-paginator .p-paginator-last:not(.p-disabled):not(.p-highlight):active{background:var(--cps-color-highlight-active)}:host ::ng-deep .p-paginator .p-paginator-first,:host ::ng-deep .p-paginator .p-paginator-prev,:host ::ng-deep .p-paginator .p-paginator-next,:host ::ng-deep .p-paginator .p-paginator-last{background-color:transparent;border:1px solid var(--cps-color-text-dark);border-radius:4px;color:var(--cps-color-text-dark);min-width:32px;height:32px;margin:.143rem;transition:box-shadow .2s}:host ::ng-deep .p-icon-wrapper{display:inline-flex}:host ::ng-deep .p-disabled,:host ::ng-deep .p-disabled *{cursor:default!important;pointer-events:none}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page.p-highlight{background:var(--cps-color-calm);border-color:var(--cps-color-calm);color:#fff}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page:not(.p-highlight):hover{background:var(--cps-color-highlight-hover);border-color:unset}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page:not(.p-highlight):active{background:var(--cps-color-highlight-active)}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page{background-color:transparent;border:1px solid var(--cps-color-text-dark);border-radius:4px;color:var(--cps-color-text-dark);min-width:32px;height:32px;margin:.143rem;transition:box-shadow .2s}:host ::ng-deep .p-paginator-element:focus{z-index:1;position:relative}:host ::ng-deep .p-link:focus{outline:0 none;outline-offset:0;box-shadow:unset}:host ::ng-deep .p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:none;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:14px;font-family:Source Sans Pro,sans-serif}:host ::ng-deep .p-disabled,:host ::ng-deep .p-component:disabled{opacity:.4}:host ::ng-deep .cps-table-empty-message-td{text-align:center!important;font-weight:600;background:#fff}:host ::ng-deep .cps-table-row-drag-handle-cell{text-align:center!important}:host ::ng-deep .cps-table-row-drag-handle-cell .cps-table-row-drag-handle{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host ::ng-deep .cps-table-row-chevron-cell{text-align:center!important}:host ::ng-deep .cps-table-row-chevron-cell .cps-table-row-chevron{transition-duration:.2s;cursor:pointer;display:inline-flex}:host ::ng-deep .cps-table-row-chevron-cell .cps-table-row-chevron:hover cps-icon .cps-icon{color:var(--cps-color-calm)!important}:host ::ng-deep .cps-table-row-chevron-cell .cps-table-row-chevron-expanded{transform:rotate(180deg)}:host ::ng-deep .cps-table-row-menu-cell{border-left:none!important}:host ::ng-deep .p-datatable .p-datatable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:1001;top:0;left:0;width:100%;height:100%;background-color:#fff;transition-duration:.2s;border:1px solid var(--cps-color-line-mid)}:host ::ng-deep .p-datatable.cps-tbar-small .p-datatable-loading-overlay{top:43px;height:calc(100% - 43px)}:host ::ng-deep .p-datatable.cps-tbar-normal .p-datatable-loading-overlay{top:72px;height:calc(100% - 72px)}:host ::ng-deep .cps-table-loading .p-datatable{min-height:200px}:host ::ng-deep .cps-table-loading .p-datatable.cps-tbar-normal{min-height:272px}:host ::ng-deep .cps-table-loading .p-datatable.cps-tbar-small{min-height:243px}:host ::ng-deep .cps-table-col-filter-menu-open .cps-table-col-filter-menu-button{color:var(--cps-color-text-dark)}.cps-table-coltoggle-menu{display:block;max-height:242px;overflow-x:hidden;background:#fff}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item{padding:12px;justify-content:space-between;display:flex;cursor:pointer}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item:hover{background:var(--cps-color-highlight-hover)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-label{color:var(--cps-color-text-dark)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-left{display:flex;align-items:center;margin-right:8px}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-check{background-color:transparent;border:0;width:16px;height:16px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1);margin-right:8px;opacity:0}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-check:after{color:var(--cps-color-calm);top:4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box;position:absolute;content:\"\";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected,.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.allselected{font-weight:600}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected .cps-table-coltoggle-menu-item-label,.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.allselected .cps-table-coltoggle-menu-item-label{color:var(--cps-color-calm)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected .cps-table-coltoggle-menu-item-check,.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.allselected .cps-table-coltoggle-menu-item-check{opacity:1}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected{background:var(--cps-color-highlight-selected)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.highlighten{background:var(--cps-color-highlight-active)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected.highlighten{background:var(--cps-color-highlight-selected-dark)}.cps-table-coltoggle-menu .select-all-option{border-bottom:1px solid lightgrey;font-weight:600}::ng-deep .cps-select-options-menu.cps-paginator-page-options .cps-select-options-option{font-size:14px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i1$3.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i1$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i1$3.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { kind: "component", type: i1$3.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i1$3.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i1$3.ReorderableRowHandle, selector: "[pReorderableRowHandle]" }, { kind: "directive", type: i1$3.ReorderableRow, selector: "[pReorderableRow]", inputs: ["pReorderableRow", "pReorderableRowDisabled"] }, { kind: "directive", type: TableUnsortDirective, selector: "[tWithUnsort]", exportAs: ["tWithUnsort"] }, { kind: "component", type: CpsInputComponent, selector: "cps-input", inputs: ["label", "hint", "placeholder", "disabled", "readonly", "width", "type", "loading", "clearable", "prefixIcon", "prefixIconClickable", "prefixIconSize", "prefixText", "hideDetails", "persistentClear", "error", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "appearance", "valueToDisplay", "value"], outputs: ["valueChanged", "focused", "prefixIconClicked", "blurred", "cleared", "enterClicked"] }, { kind: "component", type: CpsButtonComponent, selector: "cps-button", inputs: ["color", "contentColor", "borderRadius", "type", "label", "icon", "iconPosition", "size", "width", "height", "disabled", "loading"], outputs: ["clicked"] }, { kind: "component", type: CpsSelectComponent, selector: "cps-select", inputs: ["label", "placeholder", "hint", "returnObject", "multiple", "disabled", "width", "selectAll", "chips", "closableChips", "clearable", "openOnClear", "options", "keepInitialOrder", "optionLabel", "optionValue", "optionInfo", "hideDetails", "persistentClear", "prefixIcon", "prefixIconSize", "loading", "virtualScroll", "numToleratedItems", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "optionsClass", "appearance", "showChevron", "value"], outputs: ["valueChanged", "focused", "blurred"] }, { kind: "component", type: CpsIconComponent, selector: "cps-icon", inputs: ["icon", "size", "color"] }, { kind: "component", type: CpsMenuComponent, selector: "cps-menu", inputs: ["header", "items", "withArrow", "compressed", "focusOnShow", "persistent", "containerClass", "showTransitionOptions", "hideTransitionOptions"], outputs: ["menuShown", "menuHidden", "beforeMenuHidden", "contentClicked"] }, { kind: "component", type: CpsLoaderComponent, selector: "cps-loader", inputs: ["fullScreen", "opacity", "labelColor", "showLabel"] }, { kind: "component", type: TableRowMenuComponent, selector: "table-row-menu", inputs: ["showRowRemoveButton", "showRowEditButton"], outputs: ["editRowBtnClicked", "removeRowBtnClicked"] }, { kind: "directive", type: CpsTableColumnSortableDirective, selector: "[cpsTColSortable]", inputs: ["cpsTColSortable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6182
- }
6183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsTableComponent, decorators: [{
6184
- type: Component,
6185
- args: [{ selector: 'cps-table', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
6186
- FormsModule,
6187
- CommonModule,
6188
- TableModule,
6189
- TableUnsortDirective,
6190
- CpsInputComponent,
6191
- CpsButtonComponent,
6192
- CpsSelectComponent,
6193
- CpsIconComponent,
6194
- CpsMenuComponent,
6195
- CpsLoaderComponent,
6196
- TableRowMenuComponent,
6197
- CpsTableColumnSortableDirective
6198
- ], providers: [
6199
- TableService,
6200
- {
6201
- provide: Table,
6202
- useFactory: tableFactory,
6203
- // eslint-disable-next-line no-use-before-define
6204
- deps: [CpsTableComponent]
6205
- }
6206
- ], template: "<p-table\n #primengTable\n #tUnsortDirective=\"tWithUnsort\"\n tWithUnsort\n [ngClass]=\"{ 'cps-table-loading': loading }\"\n [styleClass]=\"styleClass\"\n [tableStyle]=\"tableStyle\"\n [tableStyleClass]=\"tableStyleClass\"\n [value]=\"data\"\n [dataKey]=\"dataKey\"\n [columns]=\"selectedColumns\"\n (selectionChange)=\"onSelectionChanged($event)\"\n [globalFilterFields]=\"globalFilterFields\"\n [showInitialSortBadge]=\"false\"\n [loading]=\"loading\"\n [scrollable]=\"scrollable\"\n [scrollHeight]=\"scrollHeight\"\n [lazy]=\"lazy\"\n [lazyLoadOnInit]=\"lazyLoadOnInit\"\n [virtualScroll]=\"virtualScroll\"\n [virtualScrollItemSize]=\"virtualScrollItemSize\"\n [virtualScrollOptions]=\"{ numToleratedItems: numToleratedItems }\"\n [paginator]=\"paginator\"\n [showCurrentPageReport]=\"true\"\n [alwaysShowPaginator]=\"alwaysShowPaginator\"\n [rows]=\"rows\"\n [first]=\"first\"\n [totalRecords]=\"totalRecords\"\n [resetPageOnSort]=\"resetPageOnSort\"\n currentPageReportTemplate=\"{first} - {last} of {totalRecords}\"\n [(selection)]=\"selectedRows\"\n [metaKeySelection]=\"false\"\n [rowHover]=\"rowHover\"\n [customSort]=\"customSort\"\n [sortMode]=\"sortMode\"\n [exportFilename]=\"exportFilename\"\n [csvSeparator]=\"csvSeparator\"\n (onPage)=\"onPageChange($event)\"\n (onLazyLoad)=\"onLazyLoaded($event)\"\n (sortFunction)=\"onSortFunction($event)\"\n (onSort)=\"onSort($event)\"\n (onFilter)=\"onFilter($event)\"\n (onRowReorder)=\"onRowReorder($event)\">\n <ng-template pTemplate=\"caption\" *ngIf=\"hasToolbar\">\n <ng-container *ngIf=\"toolbarTemplate\">\n <ng-container *ngTemplateOutlet=\"toolbarTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!toolbarTemplate\">\n <div class=\"cps-table-tbar-left\">\n <div *ngIf=\"toolbarIcon\" class=\"cps-table-tbar-icon\">\n <cps-icon [icon]=\"toolbarIcon\" [color]=\"toolbarIconColor\"></cps-icon>\n </div>\n <div class=\"cps-table-tbar-title\">{{ toolbarTitle }}</div>\n <div *ngIf=\"showGlobalFilter\" class=\"cps-table-tbar-global-filter\">\n <cps-input\n #globalFilterComp\n prefixIcon=\"search\"\n [placeholder]=\"globalFilterPlaceholder\"\n (valueChanged)=\"onFilterGlobal($event)\"\n [clearable]=\"true\"\n [disabled]=\"loading\"\n [appearance]=\"toolbarSize === 'small' ? 'underlined' : 'outlined'\"\n [hideDetails]=\"true\">\n </cps-input>\n </div>\n </div>\n <div class=\"cps-table-tbar-right\">\n <div\n *ngIf=\"showRemoveBtnOnSelect && selectedRows.length > 0\"\n class=\"cps-table-tbar-btn-on-select\">\n <cps-button\n label=\"Remove\"\n [disabled]=\"removeBtnOnSelectDisabled\"\n color=\"prepared\"\n type=\"borderless\"\n icon=\"remove\"\n [size]=\"toolbarSize\"\n (clicked)=\"removeSelected()\">\n </cps-button>\n </div>\n <div\n *ngIf=\"showAdditionalBtnOnSelect && selectedRows.length > 0\"\n class=\"cps-table-tbar-btn-on-select\">\n <cps-button\n [label]=\"additionalBtnOnSelectTitle\"\n [disabled]=\"additionalBtnOnSelectDisabled\"\n color=\"prepared\"\n type=\"borderless\"\n [icon]=\"additionalBtnOnSelectIcon\"\n [size]=\"toolbarSize\"\n (clicked)=\"onClickAdditionalBtnOnSelect()\">\n </cps-button>\n </div>\n <div *ngIf=\"showActionBtn\" class=\"cps-table-tbar-action-btn\">\n <cps-button\n [label]=\"actionBtnTitle\"\n [disabled]=\"actionBtnDisabled\"\n color=\"prepared\"\n type=\"outlined\"\n [icon]=\"actionBtnIcon\"\n [size]=\"toolbarSize\"\n (clicked)=\"onClickActionBtn()\">\n </cps-button>\n </div>\n <div\n *ngIf=\"showColumnsToggleBtn && columns.length > 0\"\n class=\"cps-table-tbar-coltoggle-btn\"\n [ngClass]=\"{ 'btn-disabled': columnsToggleBtnDisabled }\">\n <cps-icon\n icon=\"columns\"\n size=\"normal\"\n [color]=\"\n columnsToggleBtnDisabled ? 'text-lightest' : 'prepared-lighten1'\n \"\n (click)=\"onColumnsToggle($event)\"></cps-icon>\n <cps-menu #colToggleMenu [withArrow]=\"false\">\n <div class=\"cps-table-coltoggle-menu\">\n <div\n class=\"cps-table-coltoggle-menu-item select-all-option\"\n [class.allselected]=\"selectedColumns.length === columns.length\"\n (click)=\"toggleAllColumns()\">\n <span class=\"cps-table-coltoggle-menu-item-left\">\n <span class=\"cps-table-coltoggle-menu-item-check\"> </span>\n <span class=\"cps-table-coltoggle-menu-item-label\"\n >Show all columns</span\n >\n </span>\n </div>\n <div\n *ngFor=\"let col of columns\"\n class=\"cps-table-coltoggle-menu-item\"\n (click)=\"onSelectColumn(col)\"\n [class.selected]=\"isColumnSelected(col)\">\n <span class=\"cps-table-coltoggle-menu-item-left\">\n <span class=\"cps-table-coltoggle-menu-item-check\"></span>\n <span class=\"cps-table-coltoggle-menu-item-label\">{{\n col[colHeaderName]\n }}</span>\n </span>\n </div>\n </div>\n </cps-menu>\n </div>\n <div\n *ngIf=\"showExportBtn\"\n class=\"cps-table-tbar-export-btn\"\n [ngClass]=\"{ 'btn-disabled': exportBtnDisabled }\">\n <cps-icon\n icon=\"export\"\n size=\"20\"\n [color]=\"exportBtnDisabled ? 'text-light' : 'prepared-lighten1'\"\n (click)=\"onExportData($event)\"></cps-icon>\n <cps-menu\n #exportMenu\n [items]=\"exportMenuItems\"\n [compressed]=\"true\"\n [withArrow]=\"false\">\n </cps-menu>\n </div>\n <div\n *ngIf=\"showDataReloadBtn\"\n class=\"cps-table-tbar-reload-btn\"\n [ngClass]=\"{ 'btn-disabled': dataReloadBtnDisabled }\">\n <cps-icon\n icon=\"refresh\"\n size=\"18\"\n [color]=\"dataReloadBtnDisabled ? 'text-light' : 'prepared-lighten1'\"\n (click)=\"onReloadData()\">\n </cps-icon>\n </div>\n </div>\n </ng-container>\n </ng-template>\n\n <ng-template pTemplate=\"header\" *ngIf=\"nestedHeaderTemplate\" let-columns>\n <ng-container\n *ngTemplateOutlet=\"\n nestedHeaderTemplate;\n context: {\n $implicit: columns\n }\n \"></ng-container>\n </ng-template>\n\n <ng-template pTemplate=\"header\" *ngIf=\"!nestedHeaderTemplate\" let-columns>\n <tr>\n <th style=\"width: 3rem\" *ngIf=\"rowExpansionTemplate\"></th>\n <th style=\"width: 3rem\" *ngIf=\"reorderableRows\"></th>\n <th style=\"width: 4rem\" *ngIf=\"selectable\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <ng-container *ngIf=\"headerTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n headerTemplate;\n context: {\n $implicit: columns\n }\n \"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!headerTemplate && columns.length > 0\">\n <ng-container *ngIf=\"sortable\">\n <th *ngFor=\"let col of columns\" [cpsTColSortable]=\"col[colFieldName]\">\n {{ col[colHeaderName] }}\n </th>\n </ng-container>\n <ng-container *ngIf=\"!sortable\">\n <th *ngFor=\"let col of columns\">\n {{ col[colHeaderName] }}\n </th>\n </ng-container>\n </ng-container>\n <th\n style=\"width: 2rem\"\n class=\"cps-table-row-menu-cell\"\n *ngIf=\"showRowMenu && (showRowRemoveButton || showRowEditButton)\"></th>\n </tr>\n </ng-template>\n\n <ng-template\n pTemplate=\"body\"\n let-rowData\n let-columns=\"columns\"\n let-item\n let-rowIndex=\"rowIndex\"\n let-expanded=\"expanded\">\n <tr\n [pReorderableRow]=\"rowIndex\"\n [ngClass]=\"{\n 'cps-table-row-selected': selectable && primengTable.isSelected(item)\n }\">\n <td *ngIf=\"rowExpansionTemplate\" class=\"cps-table-row-chevron-cell\">\n <div\n class=\"cps-table-row-chevron\"\n [ngClass]=\"{ 'cps-table-row-chevron-expanded': expanded }\">\n <cps-icon\n icon=\"chevron-down\"\n size=\"small\"\n color=\"text-dark\"\n [pRowToggler]=\"item\">\n </cps-icon>\n </div>\n </td>\n <td *ngIf=\"reorderableRows\" class=\"cps-table-row-drag-handle-cell\">\n <span class=\"cps-table-row-drag-handle\" pReorderableRowHandle>\u2630</span>\n </td>\n <td *ngIf=\"selectable\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <ng-container *ngIf=\"bodyTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n bodyTemplate;\n context: {\n $implicit: item,\n rowIndex: rowIndex,\n columns: columns,\n rowData: rowData\n }\n \">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!bodyTemplate\">\n <ng-container *ngIf=\"columns.length > 0\">\n <td *ngFor=\"let col of columns\">\n {{ rowData[col[colFieldName]] }}\n </td>\n </ng-container>\n </ng-container>\n <td\n *ngIf=\"showRowMenu && (showRowRemoveButton || showRowEditButton)\"\n class=\"cps-table-row-menu-cell\">\n <table-row-menu\n (editRowBtnClicked)=\"onEditRowClicked(item)\"\n (removeRowBtnClicked)=\"onRemoveRowClicked(item)\"\n [showRowRemoveButton]=\"showRowRemoveButton\"\n [showRowEditButton]=\"showRowEditButton\">\n </table-row-menu>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"rowexpansion\" *ngIf=\"rowExpansionTemplate\" let-item>\n <tr class=\"cps-table-row-expanded-content\">\n <td colspan=\"100\">\n <ng-container\n *ngTemplateOutlet=\"\n rowExpansionTemplate;\n context: {\n $implicit: item\n }\n \"></ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td\n colspan=\"100\"\n class=\"cps-table-empty-message-td\"\n [ngStyle]=\"{ height: emptyBodyHeight }\">\n {{ emptyMessage }}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"loadingicon\">\n <cps-loader [fullScreen]=\"false\" opacity=\"0\"></cps-loader>\n </ng-template>\n <ng-template pTemplate=\"paginatorleft\">\n <div class=\"cps-table-paginator-itms-per-page\">\n <span class=\"cps-table-paginator-items-per-page-title\"\n >Rows per page:\n </span>\n <cps-select\n [options]=\"rowOptions\"\n [hideDetails]=\"true\"\n [(ngModel)]=\"rows\"\n (valueChanged)=\"onRowsPerPageChanged()\"\n [returnObject]=\"false\"\n optionsClass=\"cps-paginator-page-options\">\n </cps-select>\n </div>\n </ng-template>\n</p-table>\n", styles: [":host ::ng-deep .p-component{font-family:Source Sans Pro,sans-serif;font-size:14px;font-weight:400}:host ::ng-deep .p-datatable-flex-scrollable{display:flex;flex-direction:column;height:100%}:host ::ng-deep .p-datatable{position:relative}:host ::ng-deep .p-datatable.p-datatable-gridlines .p-datatable-header{border-width:1px 1px 0 1px}:host ::ng-deep .p-datatable .p-datatable-header{font-weight:600;display:flex;justify-content:space-between;align-items:center;padding:0 10px;border:unset;background:unset;border-top:1px solid var(--cps-color-line-mid);border-right:1px solid var(--cps-color-line-mid);border-left:4px solid var(--cps-color-surprise)!important;border-radius:4px 4px 0 0;font-size:16px;line-height:150%;background-color:#fff;color:var(--cps-color-text-darkest);overflow:auto}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left{display:flex;align-items:center}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left .cps-table-tbar-global-filter{margin-left:12px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left .cps-table-tbar-icon{display:flex;margin-right:8px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left .cps-table-tbar-title{cursor:default}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right{display:flex;align-items:center}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-btn-on-select{margin-right:4px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-action-btn{margin-right:4px;margin-left:8px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn{display:contents}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn cps-icon{margin-left:12px;margin-right:4px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn:not(.btn-disabled) cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn:not(.btn-disabled) cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn:not(.btn-disabled) cps-icon{cursor:pointer}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn:not(.btn-disabled) cps-icon:hover .cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn:not(.btn-disabled) cps-icon:hover .cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn:not(.btn-disabled) cps-icon:hover .cps-icon{color:var(--cps-color-prepared)!important}:host ::ng-deep .cps-tbar-small.p-datatable .p-datatable-header{height:43px}:host ::ng-deep .cps-tbar-normal.p-datatable .p-datatable-header{height:72px}:host ::ng-deep .p-datatable-flex-scrollable>.p-datatable-wrapper{display:flex;flex-direction:column;flex:1;height:100%}:host ::ng-deep .p-datatable-scrollable>.p-datatable-wrapper{position:relative}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow:auto}:host ::ng-deep .p-datatable-table{border-spacing:0px;width:100%}:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-thead,:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-tfoot,:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-scroller-viewport>.p-scroller>.p-datatable-table>.p-datatable-thead,:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-scroller-viewport>.p-scroller>.p-datatable-table>.p-datatable-tfoot{background-color:#fff}:host ::ng-deep .p-datatable-scrollable-table>.p-datatable-thead{position:sticky;top:0;z-index:1}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{padding:.5rem}:host ::ng-deep .p-datatable.p-datatable-lg .p-datatable-thead>tr>th{padding:1.25rem}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{text-align:left;padding:1rem;border:1px solid var(--cps-color-line-mid);border-width:0 0 1px 1px;font-weight:400;color:var(--cps-color-text-mild);background:#fff;transition:box-shadow .2s}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-width:1px}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{border-width:1px 0 1px 1px}:host ::ng-deep .p-datatable .p-datatable-thead tr:not(:first-child) th{border-top:unset}:host ::ng-deep .p-datatable .p-sortable-column:not(.p-highlight):hover .cps-sortable-column-icon.sort-unsorted .sort-unsorted-arrow-up{border-bottom-color:var(--cps-color-text-mild)}:host ::ng-deep .p-datatable .p-sortable-column:not(.p-highlight):hover .cps-sortable-column-icon.sort-unsorted .sort-unsorted-arrow-down{border-top-color:var(--cps-color-text-mild)}:host ::ng-deep .p-icon{display:inline-block;width:1rem;height:1rem}:host ::ng-deep .p-datatable .p-sortable-column .cps-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center;font-size:12px;vertical-align:top;color:var(--cps-color-calm);margin-left:.25rem}:host ::ng-deep .p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:none;cursor:pointer;-webkit-user-select:none;user-select:none}:host ::ng-deep .p-datatable .p-sortable-column{cursor:pointer;-webkit-user-select:none;user-select:none}:host ::ng-deep .p-datatable .p-sortable-column:focus{box-shadow:none;outline:0 none}:host ::ng-deep .p-datatable.p-datatable-striped .p-datatable-tbody>tr:nth-child(odd){background:var(--cps-color-bg-light)}:host ::ng-deep .p-datatable.p-datatable-striped .p-datatable-tbody>tr:nth-child(2n){background:#fff}:host ::ng-deep .p-datatable.p-datatable-hoverable-rows .p-datatable-tbody>tr:not(.p-highlight):not(.cps-table-row-expanded-content):hover{background:var(--cps-color-highlight-hover)}:host ::ng-deep .p-datatable .p-datatable-tbody .cps-table-row-expanded-content td{border-left:4px solid var(--cps-color-surprise)!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr{background:#fff;color:var(--cps-color-text-dark);transition:box-shadow .2s}:host ::ng-deep .p-datatable .p-datatable-tbody>tr.cps-table-row-selected{background-color:var(--cps-color-highlight-active)!important}:host ::ng-deep .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody>tr>td:last-child{border-width:0 1px 1px 1px}:host ::ng-deep .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody>tr>td{border-width:0 0 1px 1px}:host ::ng-deep .p-datatable.p-datatable-gridlines .p-datatable-tbody>tr>td:last-child{border-width:1px 1px 0 1px}:host ::ng-deep .p-datatable.p-datatable-gridlines .p-datatable-tbody>tr>td{border-width:1px 0 0 1px}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{text-align:left;border:1px solid var(--cps-color-line-mid);border-width:0 0 1px 0;padding:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-width:0 0 1px 1px}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-width:0 1px 1px 0}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:only-child{border-width:0 1px 1px 1px}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{padding:.5rem}:host ::ng-deep .p-datatable.p-datatable-lg .p-datatable-tbody>tr>td{padding:1.25rem}:host ::ng-deep td:has(p-tablecheckbox){text-align:center!important}:host ::ng-deep th:has(p-tableheadercheckbox){text-align:center!important;width:3rem!important}:host ::ng-deep .p-checkbox{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom;position:relative;width:18px;height:18px}:host ::ng-deep .p-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}:host ::ng-deep .p-hidden-accessible input,:host ::ng-deep .p-hidden-accessible select{transform:scale(0)}:host ::ng-deep .p-checkbox .p-checkbox-box{background:#fff;width:18px;height:18px;color:var(--cps-color-text-dark);border:2px solid var(--cps-color-text-mild);border-radius:2px;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s}:host ::ng-deep .p-checkbox-box{display:flex;justify-content:center;align-items:center}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:var(--cps-color-calm);background:var(--cps-color-calm)}:host ::ng-deep .p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box.p-highlight:hover{border-color:var(--cps-color-calm);background:var(--cps-color-calm);color:#fff}:host ::ng-deep .p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box:hover{border-color:var(--cps-color-calm)}:host ::ng-deep .p-checkbox .p-checkbox-box .p-icon{width:14px;height:14px}:host ::ng-deep .p-checkbox .p-checkbox-box .p-checkbox-icon{transition-duration:.2s;color:#fff;font-size:14px}:host ::ng-deep .p-datatable-reorderablerow-handle,:host ::ng-deep [pReorderableColumn]{cursor:move;font-size:20px;line-height:1}:host ::ng-deep .p-datatable-reorderablerow-handle:hover,:host ::ng-deep [pReorderableColumn]:hover{color:var(--cps-color-calm)}:host ::ng-deep .p-datatable .p-datatable-tbody>tr.p-datatable-dragpoint-top>td{box-shadow:inset 0 2px 0 0 var(--cps-color-calm)}:host ::ng-deep .p-datatable .p-datatable-tbody>tr.p-datatable-dragpoint-bottom>td{box-shadow:inset 0 -2px 0 0 var(--cps-color-calm)}:host ::ng-deep .p-datatable .p-paginator-bottom{border-width:0 1px 1px 1px;border-radius:0}:host ::ng-deep .p-paginator{background:#fff;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;color:var(--cps-color-text-dark);padding:1rem;border:1px solid var(--cps-color-line-mid)}:host ::ng-deep .p-paginator-left-content{margin-right:auto}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page{display:inline-flex;align-items:center}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-table-paginator-items-per-page-title{font-family:Source Sans Pro,sans-serif;font-size:14px;margin-right:12px;cursor:default}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-select-box{min-height:32px!important;background:transparent!important}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-select-box .cps-select-box-items{font-size:14px!important}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-select-box .cps-select-box-chevron .cps-icon{width:14px;height:14px}:host ::ng-deep .p-paginator .p-paginator-current{background-color:transparent;border:0 none;color:var(--cps-color-text-dark);min-width:3rem;margin:.143rem;padding:0 .5rem;font-family:Source Sans Pro,sans-serif;font-size:14px;height:unset}:host ::ng-deep .p-paginator-page,:host ::ng-deep .p-paginator-next,:host ::ng-deep .p-paginator-last,:host ::ng-deep .p-paginator-first,:host ::ng-deep .p-paginator-prev,:host ::ng-deep .p-paginator-current{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;-webkit-user-select:none;user-select:none;overflow:hidden;position:relative}:host ::ng-deep .p-paginator-current{cursor:default}:host ::ng-deep .p-paginator .p-paginator-first:not(.p-disabled):not(.p-highlight):hover,:host ::ng-deep .p-paginator .p-paginator-prev:not(.p-disabled):not(.p-highlight):hover,:host ::ng-deep .p-paginator .p-paginator-next:not(.p-disabled):not(.p-highlight):hover,:host ::ng-deep .p-paginator .p-paginator-last:not(.p-disabled):not(.p-highlight):hover{background:var(--cps-color-highlight-hover);border-color:unset}:host ::ng-deep .p-paginator .p-paginator-first:not(.p-disabled):not(.p-highlight):active,:host ::ng-deep .p-paginator .p-paginator-prev:not(.p-disabled):not(.p-highlight):active,:host ::ng-deep .p-paginator .p-paginator-next:not(.p-disabled):not(.p-highlight):active,:host ::ng-deep .p-paginator .p-paginator-last:not(.p-disabled):not(.p-highlight):active{background:var(--cps-color-highlight-active)}:host ::ng-deep .p-paginator .p-paginator-first,:host ::ng-deep .p-paginator .p-paginator-prev,:host ::ng-deep .p-paginator .p-paginator-next,:host ::ng-deep .p-paginator .p-paginator-last{background-color:transparent;border:1px solid var(--cps-color-text-dark);border-radius:4px;color:var(--cps-color-text-dark);min-width:32px;height:32px;margin:.143rem;transition:box-shadow .2s}:host ::ng-deep .p-icon-wrapper{display:inline-flex}:host ::ng-deep .p-disabled,:host ::ng-deep .p-disabled *{cursor:default!important;pointer-events:none}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page.p-highlight{background:var(--cps-color-calm);border-color:var(--cps-color-calm);color:#fff}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page:not(.p-highlight):hover{background:var(--cps-color-highlight-hover);border-color:unset}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page:not(.p-highlight):active{background:var(--cps-color-highlight-active)}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page{background-color:transparent;border:1px solid var(--cps-color-text-dark);border-radius:4px;color:var(--cps-color-text-dark);min-width:32px;height:32px;margin:.143rem;transition:box-shadow .2s}:host ::ng-deep .p-paginator-element:focus{z-index:1;position:relative}:host ::ng-deep .p-link:focus{outline:0 none;outline-offset:0;box-shadow:unset}:host ::ng-deep .p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:none;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:14px;font-family:Source Sans Pro,sans-serif}:host ::ng-deep .p-disabled,:host ::ng-deep .p-component:disabled{opacity:.4}:host ::ng-deep .cps-table-empty-message-td{text-align:center!important;font-weight:600;background:#fff}:host ::ng-deep .cps-table-row-drag-handle-cell{text-align:center!important}:host ::ng-deep .cps-table-row-drag-handle-cell .cps-table-row-drag-handle{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host ::ng-deep .cps-table-row-chevron-cell{text-align:center!important}:host ::ng-deep .cps-table-row-chevron-cell .cps-table-row-chevron{transition-duration:.2s;cursor:pointer;display:inline-flex}:host ::ng-deep .cps-table-row-chevron-cell .cps-table-row-chevron:hover cps-icon .cps-icon{color:var(--cps-color-calm)!important}:host ::ng-deep .cps-table-row-chevron-cell .cps-table-row-chevron-expanded{transform:rotate(180deg)}:host ::ng-deep .cps-table-row-menu-cell{border-left:none!important}:host ::ng-deep .p-datatable .p-datatable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:1001;top:0;left:0;width:100%;height:100%;background-color:#fff;transition-duration:.2s;border:1px solid var(--cps-color-line-mid)}:host ::ng-deep .p-datatable.cps-tbar-small .p-datatable-loading-overlay{top:43px;height:calc(100% - 43px)}:host ::ng-deep .p-datatable.cps-tbar-normal .p-datatable-loading-overlay{top:72px;height:calc(100% - 72px)}:host ::ng-deep .cps-table-loading .p-datatable{min-height:200px}:host ::ng-deep .cps-table-loading .p-datatable.cps-tbar-normal{min-height:272px}:host ::ng-deep .cps-table-loading .p-datatable.cps-tbar-small{min-height:243px}:host ::ng-deep .cps-table-col-filter-menu-open .cps-table-col-filter-menu-button{color:var(--cps-color-text-dark)}.cps-table-coltoggle-menu{display:block;max-height:242px;overflow-x:hidden;background:#fff}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item{padding:12px;justify-content:space-between;display:flex;cursor:pointer}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item:hover{background:var(--cps-color-highlight-hover)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-label{color:var(--cps-color-text-dark)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-left{display:flex;align-items:center;margin-right:8px}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-check{background-color:transparent;border:0;width:16px;height:16px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1);margin-right:8px;opacity:0}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-check:after{color:var(--cps-color-calm);top:4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box;position:absolute;content:\"\";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected,.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.allselected{font-weight:600}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected .cps-table-coltoggle-menu-item-label,.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.allselected .cps-table-coltoggle-menu-item-label{color:var(--cps-color-calm)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected .cps-table-coltoggle-menu-item-check,.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.allselected .cps-table-coltoggle-menu-item-check{opacity:1}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected{background:var(--cps-color-highlight-selected)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.highlighten{background:var(--cps-color-highlight-active)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected.highlighten{background:var(--cps-color-highlight-selected-dark)}.cps-table-coltoggle-menu .select-all-option{border-bottom:1px solid lightgrey;font-weight:600}::ng-deep .cps-select-options-menu.cps-paginator-page-options .cps-select-options-option{font-size:14px}\n"] }]
6207
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: Document, decorators: [{
6208
- type: Inject,
6209
- args: [DOCUMENT]
6210
- }] }], propDecorators: { columns: [{
6211
- type: Input
6212
- }], colHeaderName: [{
6213
- type: Input
6214
- }], colFieldName: [{
6215
- type: Input
6216
- }], striped: [{
6217
- type: Input
6218
- }], bordered: [{
6219
- type: Input
6220
- }], size: [{
6221
- type: Input
6222
- }], selectable: [{
6223
- type: Input
6224
- }], rowHover: [{
6225
- type: Input
6226
- }], dataKey: [{
6227
- type: Input
6228
- }], showRowMenu: [{
6229
- type: Input
6230
- }], showRowRemoveButton: [{
6231
- type: Input
6232
- }], showRowEditButton: [{
6233
- type: Input
6234
- }], reorderableRows: [{
6235
- type: Input
6236
- }], loading: [{
6237
- type: Input
6238
- }], tableStyle: [{
6239
- type: Input
6240
- }], tableStyleClass: [{
6241
- type: Input
6242
- }], sortable: [{
6243
- type: Input
6244
- }], sortMode: [{
6245
- type: Input
6246
- }], customSort: [{
6247
- type: Input
6248
- }], hasToolbar: [{
6249
- type: Input
6250
- }], toolbarSize: [{
6251
- type: Input
6252
- }], toolbarTitle: [{
6253
- type: Input
6254
- }], toolbarIcon: [{
6255
- type: Input
6256
- }], toolbarIconColor: [{
6257
- type: Input
6258
- }], scrollable: [{
6259
- type: Input
6260
- }], scrollHeight: [{
6261
- type: Input
6262
- }], virtualScroll: [{
6263
- type: Input
6264
- }], numToleratedItems: [{
6265
- type: Input
6266
- }], paginator: [{
6267
- type: Input
6268
- }], alwaysShowPaginator: [{
6269
- type: Input
6270
- }], rowsPerPageOptions: [{
6271
- type: Input
6272
- }], first: [{
6273
- type: Input
6274
- }], rows: [{
6275
- type: Input
6276
- }], resetPageOnRowsChange: [{
5743
+ onClickCalendarIcon() {
5744
+ if (this.disabled)
5745
+ return;
5746
+ if (this.isOpened)
5747
+ this._updateValueFromInputString();
5748
+ this.toggleCalendar();
5749
+ }
5750
+ onBeforeCalendarHidden() {
5751
+ if (this.disabled || !this.isOpened)
5752
+ return;
5753
+ this._updateValueFromInputString();
5754
+ this.toggleCalendar(false);
5755
+ }
5756
+ onInputClear() {
5757
+ if (this.isOpened)
5758
+ this.focusInput();
5759
+ }
5760
+ onCalendarContentClick() {
5761
+ if (this.isOpened)
5762
+ this.focusInput();
5763
+ }
5764
+ focusInput() {
5765
+ this.datepickerInput.focus();
5766
+ }
5767
+ toggleCalendar(show) {
5768
+ if (this.disabled || this.isOpened === show)
5769
+ return;
5770
+ const target = this.datepickerInput.elementRef.nativeElement.querySelector('.cps-input-wrap');
5771
+ if (typeof show === 'boolean') {
5772
+ if (show) {
5773
+ this.calendarMenu.show({
5774
+ target
5775
+ });
5776
+ }
5777
+ else {
5778
+ this.calendarMenu.hide();
5779
+ }
5780
+ }
5781
+ else {
5782
+ this.calendarMenu.toggle({
5783
+ target
5784
+ });
5785
+ }
5786
+ this.isOpened = this.calendarMenu.isVisible();
5787
+ if (!this.isOpened) {
5788
+ this._control?.control?.markAsTouched();
5789
+ this._checkErrors();
5790
+ }
5791
+ else {
5792
+ this.focusInput();
5793
+ }
5794
+ }
5795
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsDatepickerComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
5796
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: CpsDatepickerComponent, isStandalone: true, selector: "cps-datepicker", inputs: { label: "label", disabled: "disabled", width: "width", placeholder: "placeholder", hint: "hint", clearable: "clearable", hideDetails: "hideDetails", persistentClear: "persistentClear", showTodayButton: "showTodayButton", openOnInputFocus: "openOnInputFocus", infoTooltip: "infoTooltip", infoTooltipClass: "infoTooltipClass", infoTooltipMaxWidth: "infoTooltipMaxWidth", infoTooltipPersistent: "infoTooltipPersistent", infoTooltipPosition: "infoTooltipPosition", appearance: "appearance", minDate: "minDate", maxDate: "maxDate", value: "value" }, outputs: { valueChanged: "valueChanged" }, viewQueries: [{ propertyName: "datepickerInput", first: true, predicate: ["datepickerInput"], descendants: true }, { propertyName: "calendarMenu", first: true, predicate: ["calendarMenu"], descendants: true }], ngImport: i0, template: "<div\n class=\"cps-datepicker\"\n [ngStyle]=\"{ width: cvtWidth }\"\n [class.focused]=\"isOpened\">\n <cps-input\n #datepickerInput\n [disabled]=\"disabled\"\n [value]=\"stringDate\"\n [label]=\"label\"\n prefixIcon=\"datepicker\"\n [placeholder]=\"placeholder\"\n (prefixIconClicked)=\"onClickCalendarIcon()\"\n [prefixIconClickable]=\"true\"\n (focused)=\"onInputFocus()\"\n (valueChanged)=\"onInputValueChanged($event)\"\n [clearable]=\"clearable\"\n (blurred)=\"onInputBlur()\"\n (cleared)=\"onInputClear()\"\n (enterClicked)=\"onInputEnterClicked()\"\n [width]=\"width\"\n [hint]=\"hint\"\n [hideDetails]=\"hideDetails\"\n [infoTooltip]=\"infoTooltip\"\n [infoTooltipClass]=\"infoTooltipClass\"\n [infoTooltipMaxWidth]=\"infoTooltipMaxWidth\"\n [infoTooltipPersistent]=\"infoTooltipPersistent\"\n [persistentClear]=\"persistentClear\"\n [appearance]=\"appearance\"\n [error]=\"error\"></cps-input>\n <cps-menu\n #calendarMenu\n [withArrow]=\"false\"\n (beforeMenuHidden)=\"onBeforeCalendarHidden()\"\n (contentClicked)=\"onCalendarContentClick()\"\n [focusOnShow]=\"false\"\n hideTransitionOptions=\"0s linear\"\n containerClass=\"cps-datepicker-calendar-menu\">\n <div class=\"cps-datepicker-calendar\">\n <p-calendar\n [(ngModel)]=\"value\"\n [showIcon]=\"true\"\n [showButtonBar]=\"showTodayButton\"\n [inline]=\"true\"\n (onSelect)=\"onSelectCalendarDate($event)\"\n (onClearClick)=\"onClearCalendarDate()\"\n [showOtherMonths]=\"false\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\">\n </p-calendar>\n </div>\n </cps-menu>\n</div>\n", styles: [":host{display:flex}:host .cps-datepicker{position:relative;width:100%}:host .cps-datepicker.focused ::ng-deep input{border:1px solid var(--cps-color-calm)!important}:host .cps-datepicker.focused ::ng-deep .cps-input-prefix-icon{color:var(--cps-color-calm)!important}:host .cps-datepicker.focused ::ng-deep .clear-btn cps-icon{opacity:.5!important}.cps-datepicker-calendar{-webkit-user-select:none;-ms-user-select:none;user-select:none}.cps-datepicker-calendar ::ng-deep .p-datepicker{font-family:Source Sans Pro,sans-serif;width:auto!important;padding:.5rem;background:#fff;color:var(--cps-color-text-darkest);border:1px solid #ced4da}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header{padding:.5rem;color:var(--cps-color-text-darkest);background:#fff;font-weight:600;margin:0;border-bottom:1px solid #dee2e6;border-top-right-radius:6px;border-top-left-radius:6px}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-prev,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-next{width:2rem;height:2rem;color:var(--cps-color-calm);border:0 none;background:transparent;border-radius:50%;transition:background-color .2s,color .2s,box-shadow .2s}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-prev:enabled:hover,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-next:enabled:hover{color:var(--cps-color-calm);border-color:transparent;background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-prev:focus,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-next:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title{line-height:2rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-year,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month{color:var(--cps-color-text-darkest);transition:background-color .2s,color .2s,box-shadow .2s;font-weight:600;padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-year:enabled:hover,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month:enabled:hover{color:var(--cps-color-calm)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month{margin-right:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table{font-size:1rem;margin:.5rem 0}.cps-datepicker-calendar ::ng-deep .p-datepicker table th{padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table th>span{width:2.5rem;height:2.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table td{padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span{width:2.5rem;height:2.5rem;border-radius:50%;transition:box-shadow .2s;border:1px solid transparent}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span.p-disabled{color:var(--cps-color-text-lightest);cursor:default}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker table td.p-datepicker-today>span{border-color:var(--cps-color-calm);background:unset;color:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker table td.p-datepicker-today>span.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-buttonbar{padding:.5rem 0 0;border-top:1px solid #dee2e6}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-buttonbar .p-button{width:auto;color:var(--cps-color-prepared)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker{border-top:1px solid #dee2e6;padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button{width:2rem;height:2rem;color:var(--cps-color-calm);border:0 none;background:transparent;border-radius:50%;transition:background-color .2s,color .2s,box-shadow .2s}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button:enabled:hover{color:var(--cps-color-calm);border-color:transparent;background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button:last-child{margin-top:.2em}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker span{font-size:1.25rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker>div{padding:0 .5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-timeonly .p-timepicker{border-top:0 none}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-monthpicker{margin:.5rem 0}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-monthpicker .p-monthpicker-month{padding:.5rem;transition:box-shadow .2s;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-monthpicker .p-monthpicker-month.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-yearpicker{margin:.5rem 0}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-yearpicker .p-yearpicker-year{padding:.5rem;transition:box-shadow .2s;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-yearpicker .p-yearpicker-year.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-multiple-month .p-datepicker-group{border-left:1px solid #dee2e6;padding-right:.5rem;padding-left:.5rem;padding-top:0;padding-bottom:0}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-multiple-month .p-datepicker-group:first-child{padding-left:0;border-left:0 none}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-multiple-month .p-datepicker-group:last-child{padding-right:0}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):hover{background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-monthpicker .p-monthpicker-month:not(.p-disabled):not(.p-highlight):hover{background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-monthpicker .p-monthpicker-month:not(.p-disabled):focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-yearpicker .p-yearpicker-year:not(.p-disabled):not(.p-highlight):hover{background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-yearpicker .p-yearpicker-year:not(.p-disabled):focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep p-calendar.p-calendar-clearable .p-inputtext{padding-right:2.5rem}.cps-datepicker-calendar ::ng-deep p-calendar.p-calendar-clearable .p-calendar-clear-icon{color:var(--cps-color-calm);right:.75rem}.cps-datepicker-calendar ::ng-deep p-calendar.p-calendar-clearable.p-calendar-w-btn .p-calendar-clear-icon{color:var(--cps-color-calm);right:3.75rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table th,.cps-datepicker-calendar ::ng-deep .p-datepicker table td{padding:.125rem}.cps-datepicker-calendar ::ng-deep .p-datepicker-other-month{color:var(--cps-color-text-light)}.cps-datepicker-calendar ::ng-deep .p-link:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:none;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:1rem;font-family:Source Sans Pro,sans-serif;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-button{font-family:Source Sans Pro,sans-serif;background-color:transparent;color:var(--cps-color-calm);border-color:transparent;margin:0;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;vertical-align:bottom;text-align:center;overflow:hidden;position:relative;padding:.75rem 1.25rem;font-size:1rem;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-button:focus{box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-button:hover{background-color:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-button:active{background-color:var(--cps-color-highlight-selected)}.cps-datepicker-calendar ::ng-deep .p-button .p-button-label{font-weight:700}.cps-datepicker-calendar ::ng-deep .p-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}\n"], dependencies: [{ kind: "component", type: CpsInputComponent, selector: "cps-input", inputs: ["label", "hint", "placeholder", "disabled", "readonly", "width", "type", "loading", "clearable", "prefixIcon", "prefixIconClickable", "prefixIconSize", "prefixText", "hideDetails", "persistentClear", "error", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "appearance", "valueToDisplay", "value"], outputs: ["valueChanged", "focused", "prefixIconClicked", "blurred", "cleared", "enterClicked"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i2$2.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CpsMenuComponent, selector: "cps-menu", inputs: ["header", "items", "withArrow", "compressed", "focusOnShow", "persistent", "containerClass", "showTransitionOptions", "hideTransitionOptions"], outputs: ["menuShown", "menuHidden", "beforeMenuHidden", "contentClicked"] }] }); }
5797
+ }
5798
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsDatepickerComponent, decorators: [{
5799
+ type: Component,
5800
+ args: [{ standalone: true, imports: [
5801
+ CpsInputComponent,
5802
+ CalendarModule,
5803
+ CommonModule,
5804
+ FormsModule,
5805
+ CpsMenuComponent
5806
+ ], selector: 'cps-datepicker', template: "<div\n class=\"cps-datepicker\"\n [ngStyle]=\"{ width: cvtWidth }\"\n [class.focused]=\"isOpened\">\n <cps-input\n #datepickerInput\n [disabled]=\"disabled\"\n [value]=\"stringDate\"\n [label]=\"label\"\n prefixIcon=\"datepicker\"\n [placeholder]=\"placeholder\"\n (prefixIconClicked)=\"onClickCalendarIcon()\"\n [prefixIconClickable]=\"true\"\n (focused)=\"onInputFocus()\"\n (valueChanged)=\"onInputValueChanged($event)\"\n [clearable]=\"clearable\"\n (blurred)=\"onInputBlur()\"\n (cleared)=\"onInputClear()\"\n (enterClicked)=\"onInputEnterClicked()\"\n [width]=\"width\"\n [hint]=\"hint\"\n [hideDetails]=\"hideDetails\"\n [infoTooltip]=\"infoTooltip\"\n [infoTooltipClass]=\"infoTooltipClass\"\n [infoTooltipMaxWidth]=\"infoTooltipMaxWidth\"\n [infoTooltipPersistent]=\"infoTooltipPersistent\"\n [persistentClear]=\"persistentClear\"\n [appearance]=\"appearance\"\n [error]=\"error\"></cps-input>\n <cps-menu\n #calendarMenu\n [withArrow]=\"false\"\n (beforeMenuHidden)=\"onBeforeCalendarHidden()\"\n (contentClicked)=\"onCalendarContentClick()\"\n [focusOnShow]=\"false\"\n hideTransitionOptions=\"0s linear\"\n containerClass=\"cps-datepicker-calendar-menu\">\n <div class=\"cps-datepicker-calendar\">\n <p-calendar\n [(ngModel)]=\"value\"\n [showIcon]=\"true\"\n [showButtonBar]=\"showTodayButton\"\n [inline]=\"true\"\n (onSelect)=\"onSelectCalendarDate($event)\"\n (onClearClick)=\"onClearCalendarDate()\"\n [showOtherMonths]=\"false\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\">\n </p-calendar>\n </div>\n </cps-menu>\n</div>\n", styles: [":host{display:flex}:host .cps-datepicker{position:relative;width:100%}:host .cps-datepicker.focused ::ng-deep input{border:1px solid var(--cps-color-calm)!important}:host .cps-datepicker.focused ::ng-deep .cps-input-prefix-icon{color:var(--cps-color-calm)!important}:host .cps-datepicker.focused ::ng-deep .clear-btn cps-icon{opacity:.5!important}.cps-datepicker-calendar{-webkit-user-select:none;-ms-user-select:none;user-select:none}.cps-datepicker-calendar ::ng-deep .p-datepicker{font-family:Source Sans Pro,sans-serif;width:auto!important;padding:.5rem;background:#fff;color:var(--cps-color-text-darkest);border:1px solid #ced4da}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header{padding:.5rem;color:var(--cps-color-text-darkest);background:#fff;font-weight:600;margin:0;border-bottom:1px solid #dee2e6;border-top-right-radius:6px;border-top-left-radius:6px}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-prev,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-next{width:2rem;height:2rem;color:var(--cps-color-calm);border:0 none;background:transparent;border-radius:50%;transition:background-color .2s,color .2s,box-shadow .2s}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-prev:enabled:hover,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-next:enabled:hover{color:var(--cps-color-calm);border-color:transparent;background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-prev:focus,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-next:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title{line-height:2rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-year,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month{color:var(--cps-color-text-darkest);transition:background-color .2s,color .2s,box-shadow .2s;font-weight:600;padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-year:enabled:hover,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month:enabled:hover{color:var(--cps-color-calm)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month{margin-right:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table{font-size:1rem;margin:.5rem 0}.cps-datepicker-calendar ::ng-deep .p-datepicker table th{padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table th>span{width:2.5rem;height:2.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table td{padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span{width:2.5rem;height:2.5rem;border-radius:50%;transition:box-shadow .2s;border:1px solid transparent}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span.p-disabled{color:var(--cps-color-text-lightest);cursor:default}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker table td.p-datepicker-today>span{border-color:var(--cps-color-calm);background:unset;color:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker table td.p-datepicker-today>span.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-buttonbar{padding:.5rem 0 0;border-top:1px solid #dee2e6}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-buttonbar .p-button{width:auto;color:var(--cps-color-prepared)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker{border-top:1px solid #dee2e6;padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button{width:2rem;height:2rem;color:var(--cps-color-calm);border:0 none;background:transparent;border-radius:50%;transition:background-color .2s,color .2s,box-shadow .2s}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button:enabled:hover{color:var(--cps-color-calm);border-color:transparent;background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button:last-child{margin-top:.2em}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker span{font-size:1.25rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker>div{padding:0 .5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-timeonly .p-timepicker{border-top:0 none}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-monthpicker{margin:.5rem 0}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-monthpicker .p-monthpicker-month{padding:.5rem;transition:box-shadow .2s;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-monthpicker .p-monthpicker-month.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-yearpicker{margin:.5rem 0}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-yearpicker .p-yearpicker-year{padding:.5rem;transition:box-shadow .2s;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-yearpicker .p-yearpicker-year.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-multiple-month .p-datepicker-group{border-left:1px solid #dee2e6;padding-right:.5rem;padding-left:.5rem;padding-top:0;padding-bottom:0}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-multiple-month .p-datepicker-group:first-child{padding-left:0;border-left:0 none}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-multiple-month .p-datepicker-group:last-child{padding-right:0}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):hover{background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-monthpicker .p-monthpicker-month:not(.p-disabled):not(.p-highlight):hover{background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-monthpicker .p-monthpicker-month:not(.p-disabled):focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-yearpicker .p-yearpicker-year:not(.p-disabled):not(.p-highlight):hover{background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-yearpicker .p-yearpicker-year:not(.p-disabled):focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep p-calendar.p-calendar-clearable .p-inputtext{padding-right:2.5rem}.cps-datepicker-calendar ::ng-deep p-calendar.p-calendar-clearable .p-calendar-clear-icon{color:var(--cps-color-calm);right:.75rem}.cps-datepicker-calendar ::ng-deep p-calendar.p-calendar-clearable.p-calendar-w-btn .p-calendar-clear-icon{color:var(--cps-color-calm);right:3.75rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table th,.cps-datepicker-calendar ::ng-deep .p-datepicker table td{padding:.125rem}.cps-datepicker-calendar ::ng-deep .p-datepicker-other-month{color:var(--cps-color-text-light)}.cps-datepicker-calendar ::ng-deep .p-link:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:none;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:1rem;font-family:Source Sans Pro,sans-serif;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-button{font-family:Source Sans Pro,sans-serif;background-color:transparent;color:var(--cps-color-calm);border-color:transparent;margin:0;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;vertical-align:bottom;text-align:center;overflow:hidden;position:relative;padding:.75rem 1.25rem;font-size:1rem;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-button:focus{box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-button:hover{background-color:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-button:active{background-color:var(--cps-color-highlight-selected)}.cps-datepicker-calendar ::ng-deep .p-button .p-button-label{font-weight:700}.cps-datepicker-calendar ::ng-deep .p-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}\n"] }]
5807
+ }], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
5808
+ type: Self
5809
+ }, {
5810
+ type: Optional
5811
+ }] }], propDecorators: { label: [{
6277
5812
  type: Input
6278
- }], resetPageOnSort: [{
5813
+ }], disabled: [{
6279
5814
  type: Input
6280
- }], totalRecords: [{
5815
+ }], width: [{
6281
5816
  type: Input
6282
- }], emptyMessage: [{
5817
+ }], placeholder: [{
6283
5818
  type: Input
6284
- }], emptyBodyHeight: [{
5819
+ }], hint: [{
6285
5820
  type: Input
6286
- }], lazy: [{
5821
+ }], clearable: [{
6287
5822
  type: Input
6288
- }], lazyLoadOnInit: [{
5823
+ }], hideDetails: [{
6289
5824
  type: Input
6290
- }], showGlobalFilter: [{
5825
+ }], persistentClear: [{
6291
5826
  type: Input
6292
- }], globalFilterPlaceholder: [{
5827
+ }], showTodayButton: [{
6293
5828
  type: Input
6294
- }], globalFilterFields: [{
5829
+ }], openOnInputFocus: [{
6295
5830
  type: Input
6296
- }], clearGlobalFilterOnLoading: [{
5831
+ }], infoTooltip: [{
6297
5832
  type: Input
6298
- }], showRemoveBtnOnSelect: [{
5833
+ }], infoTooltipClass: [{
6299
5834
  type: Input
6300
- }], removeBtnOnSelectDisabled: [{
5835
+ }], infoTooltipMaxWidth: [{
6301
5836
  type: Input
6302
- }], showAdditionalBtnOnSelect: [{
5837
+ }], infoTooltipPersistent: [{
6303
5838
  type: Input
6304
- }], additionalBtnOnSelectTitle: [{
5839
+ }], infoTooltipPosition: [{
6305
5840
  type: Input
6306
- }], additionalBtnOnSelectIcon: [{
5841
+ }], appearance: [{
6307
5842
  type: Input
6308
- }], additionalBtnOnSelectDisabled: [{
5843
+ }], minDate: [{
6309
5844
  type: Input
6310
- }], showActionBtn: [{
5845
+ }], maxDate: [{
6311
5846
  type: Input
6312
- }], actionBtnTitle: [{
5847
+ }], value: [{
6313
5848
  type: Input
6314
- }], actionBtnIcon: [{
5849
+ }], valueChanged: [{
5850
+ type: Output
5851
+ }], datepickerInput: [{
5852
+ type: ViewChild,
5853
+ args: ['datepickerInput']
5854
+ }], calendarMenu: [{
5855
+ type: ViewChild,
5856
+ args: ['calendarMenu']
5857
+ }] } });
5858
+
5859
+ /**
5860
+ * CpsButtonToggleComponent is used to select values using buttons.
5861
+ * @group Components
5862
+ */
5863
+ class CpsButtonToggleComponent {
5864
+ set value(value) {
5865
+ this._value = value;
5866
+ this.onChange(value);
5867
+ }
5868
+ get value() {
5869
+ return this._value;
5870
+ }
5871
+ constructor(_control, document, renderer) {
5872
+ this._control = _control;
5873
+ this.document = document;
5874
+ this.renderer = renderer;
5875
+ /**
5876
+ * Label of the toggle buttons.
5877
+ * @group Props
5878
+ */
5879
+ this.label = '';
5880
+ /**
5881
+ * An array of options.
5882
+ * @group Props
5883
+ */
5884
+ this.options = [];
5885
+ /**
5886
+ * Specifies if multiple values can be selected.
5887
+ * @group Props
5888
+ */
5889
+ this.multiple = false;
5890
+ /**
5891
+ * Specifies that the component should be disabled.
5892
+ * @group Props
5893
+ */
5894
+ this.disabled = false;
5895
+ /**
5896
+ * Determines whether at least one of the options is mandatory.
5897
+ * @group Props
5898
+ */
5899
+ this.mandatory = true;
5900
+ /**
5901
+ * Determines whether all buttons should have equal widths.
5902
+ * @group Props
5903
+ */
5904
+ this.equalWidths = true;
5905
+ /**
5906
+ * Position of the option tooltip, can be 'top', 'bottom', 'left' or 'right'.
5907
+ * @group Props
5908
+ */
5909
+ this.optionTooltipPosition = 'bottom';
5910
+ /**
5911
+ * When it is not an empty string, an info icon is displayed to show text for more info.
5912
+ * @group Props
5913
+ */
5914
+ this.infoTooltip = '';
5915
+ /**
5916
+ * Info tooltip class for styling.
5917
+ * @group Props
5918
+ */
5919
+ this.infoTooltipClass = 'cps-tooltip-content';
5920
+ /**
5921
+ * Size of infoTooltip, of type number denoting pixels or string.
5922
+ * @group Props
5923
+ */
5924
+ this.infoTooltipMaxWidth = '100%';
5925
+ /**
5926
+ * Determines whether the infoTooltip is persistent.
5927
+ * @group Props
5928
+ */
5929
+ this.infoTooltipPersistent = false;
5930
+ /**
5931
+ * Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
5932
+ * @group Props
5933
+ */
5934
+ this.infoTooltipPosition = 'top';
5935
+ /**
5936
+ * Value of the component.
5937
+ * @group Props
5938
+ */
5939
+ this._value = undefined;
5940
+ /**
5941
+ * Callback to invoke on value change.
5942
+ * @param {any} any - value changed.
5943
+ * @group Emits
5944
+ */
5945
+ this.valueChanged = new EventEmitter();
5946
+ this.largestButtonWidth = 0;
5947
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
5948
+ this.onChange = (event) => { };
5949
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
5950
+ this.onTouched = () => { };
5951
+ if (this._control) {
5952
+ this._control.valueAccessor = this;
5953
+ }
5954
+ }
5955
+ ngOnInit() {
5956
+ if (this.multiple && !this._value) {
5957
+ this._value = [];
5958
+ }
5959
+ this._setEqualWidths();
5960
+ }
5961
+ registerOnChange(fn) {
5962
+ this.onChange = fn;
5963
+ }
5964
+ registerOnTouched(fn) {
5965
+ this.onTouched = fn;
5966
+ }
5967
+ writeValue(value) {
5968
+ this.value = value;
5969
+ }
5970
+ updateValueEvent(event, val) {
5971
+ if (this.disabled)
5972
+ return;
5973
+ const check = event?.target?.checked || false;
5974
+ if (this.mandatory && this.multiple && !check && this.value.length < 2) {
5975
+ event.target.checked = true;
5976
+ return;
5977
+ }
5978
+ if (this.multiple) {
5979
+ let res = [];
5980
+ if (!check) {
5981
+ res = this.value.filter((v) => !isEqual(v, val));
5982
+ }
5983
+ else {
5984
+ this.options.forEach((o) => {
5985
+ if (this.value.some((v) => isEqual(v, o.value)) ||
5986
+ isEqual(val, o.value)) {
5987
+ res.push(o.value);
5988
+ }
5989
+ });
5990
+ }
5991
+ this._updateValue(res);
5992
+ }
5993
+ else {
5994
+ if (this.mandatory) {
5995
+ this._updateValue(val); // radio
5996
+ }
5997
+ else {
5998
+ this._updateValue(check ? val : undefined);
5999
+ }
6000
+ }
6001
+ }
6002
+ _updateValue(value) {
6003
+ this.writeValue(value);
6004
+ this.onChange(value);
6005
+ this.valueChanged.emit(value);
6006
+ }
6007
+ _setEqualWidths() {
6008
+ if (!this.equalWidths)
6009
+ return;
6010
+ const hiddenSpan = this.renderer.createElement('span');
6011
+ this.renderer.setStyle(hiddenSpan, 'visibility', 'hidden');
6012
+ this.renderer.setStyle(hiddenSpan, 'position', 'absolute');
6013
+ this.renderer.setStyle(hiddenSpan, 'left', '-9999px');
6014
+ this.renderer.setStyle(hiddenSpan, 'font-size', '16px');
6015
+ this.renderer.setStyle(hiddenSpan, 'letter-spacing', '0.05em');
6016
+ this.renderer.setStyle(hiddenSpan, 'font-family', '"Source Sans Pro", sans-serif');
6017
+ this.renderer.appendChild(this.document.body, hiddenSpan);
6018
+ this.largestButtonWidth = 0;
6019
+ this.options.forEach((opt) => {
6020
+ const text = this.renderer.createText(opt.label || '');
6021
+ this.renderer.appendChild(hiddenSpan, text);
6022
+ let width = hiddenSpan.offsetWidth || 0;
6023
+ width += 26;
6024
+ if (opt.icon) {
6025
+ width += 16;
6026
+ if (opt.label)
6027
+ width += 8;
6028
+ }
6029
+ if (width > this.largestButtonWidth) {
6030
+ this.largestButtonWidth = width;
6031
+ }
6032
+ this.renderer.removeChild(hiddenSpan, text);
6033
+ });
6034
+ this.renderer.removeChild(this.document.body, hiddenSpan);
6035
+ }
6036
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
6037
+ setDisabledState(disabled) { }
6038
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsButtonToggleComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: DOCUMENT }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
6039
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: CpsButtonToggleComponent, isStandalone: true, selector: "cps-button-toggle", inputs: { label: "label", options: "options", multiple: "multiple", disabled: "disabled", mandatory: "mandatory", equalWidths: "equalWidths", optionTooltipPosition: "optionTooltipPosition", infoTooltip: "infoTooltip", infoTooltipClass: "infoTooltipClass", infoTooltipMaxWidth: "infoTooltipMaxWidth", infoTooltipPersistent: "infoTooltipPersistent", infoTooltipPosition: "infoTooltipPosition", _value: ["value", "_value"] }, outputs: { valueChanged: "valueChanged" }, providers: [CheckOptionSelectedPipe], ngImport: i0, template: "<div class=\"cps-btn-toggle\">\n <div class=\"cps-btn-toggle-label\" *ngIf=\"label\">\n <span>{{ label }}</span>\n <cps-info-circle\n *ngIf=\"infoTooltip\"\n class=\"cps-btn-toggle-label-info-circle\"\n size=\"xsmall\"\n [tooltipPosition]=\"infoTooltipPosition\"\n [tooltipContentClass]=\"infoTooltipClass\"\n [tooltipMaxWidth]=\"infoTooltipMaxWidth\"\n [tooltipPersistent]=\"infoTooltipPersistent\"\n [tooltipText]=\"infoTooltip\">\n </cps-info-circle>\n </div>\n <div class=\"cps-btn-toggle-content\">\n <ng-container *ngFor=\"let option of options\">\n <ng-container\n *ngTemplateOutlet=\"\n optionContainerTemplate;\n context: {\n option: option,\n tooltip: option.tooltip\n }\n \"></ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #optionContainerTemplate let-option=\"option\" let-tooltip=\"tooltip\">\n <label\n class=\"cps-btn-toggle-content-option\"\n *ngIf=\"tooltip\"\n [cpsTooltip]=\"option.tooltip\"\n tooltipCloseDelay=\"0\"\n [tooltipPosition]=\"optionTooltipPosition\">\n <ng-container\n *ngTemplateOutlet=\"\n optionRadioTemplate;\n context: {\n option: option\n }\n \"></ng-container>\n </label>\n <label class=\"cps-btn-toggle-content-option\" *ngIf=\"!tooltip\">\n <ng-container\n *ngTemplateOutlet=\"\n optionRadioTemplate;\n context: {\n option: option\n }\n \"></ng-container>\n </label>\n</ng-template>\n\n<ng-template #optionRadioTemplate let-option=\"option\">\n <input\n class=\"cps-btn-toggle-content-option-input\"\n [type]=\"!multiple && mandatory ? 'radio' : 'checkbox'\"\n [disabled]=\"option.disabled || disabled\"\n [value]=\"option.value\"\n [checked]=\"\n option.value | checkOptionSelected : value : multiple : true : ''\n \"\n (change)=\"updateValueEvent($event, option.value)\" />\n <span\n class=\"cps-btn-toggle-content-option-content\"\n [ngStyle]=\"{\n 'min-width': largestButtonWidth ? largestButtonWidth + 'px' : 'none'\n }\">\n <cps-icon\n *ngIf=\"option.icon\"\n [ngClass]=\"{ 'me-2': !!option.label }\"\n [icon]=\"option.icon\">\n </cps-icon>\n <span *ngIf=\"option.label\">{{ option.label }}</span>\n </span>\n</ng-template>\n", styles: [":host .cps-btn-toggle-label{color:var(--cps-color-text-dark);margin-bottom:.5rem;align-items:center;display:inline-flex;font-weight:700;font-size:16px;font-family:Source Sans Pro,sans-serif;cursor:default}:host .cps-btn-toggle-label .cps-btn-toggle-label-info-circle{margin-left:8px}:host .cps-btn-toggle-label .cps-btn-toggle-label-info-circle ::ng-deep cps-icon i{width:14px;height:14px}:host .cps-btn-toggle-content{display:flex}:host .cps-btn-toggle-content-option-input{clip:rect(0 0 0 0);clip-path:inset(100%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host .cps-btn-toggle-content-option-input:checked+.cps-btn-toggle-content-option-content{background-color:var(--cps-color-calm);z-index:1;color:#fff}:host .cps-btn-toggle-content-option-input:checked+.cps-btn-toggle-content-option-content:hover{background-image:linear-gradient(#ffffff1a 0 0)}:host .cps-btn-toggle-content-option-input:disabled+.cps-btn-toggle-content-option-content{pointer-events:none;background-color:#f7f7f7;color:var(--cps-color-text-light)}:host .cps-btn-toggle-content-option-input:disabled:checked+.cps-btn-toggle-content-option-content{background-color:var(--cps-color-line-mid);color:var(--cps-color-text-mild)}:host .cps-btn-toggle-content-option-content{height:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;background-color:#fff;padding:.375em .75em;position:relative;border:.0625em solid var(--cps-color-text-lightest);border-right:0;font-weight:400;font-size:16px;font-family:Source Sans Pro,sans-serif;letter-spacing:.05em;color:var(--cps-color-text-dark);text-align:center;transition:background-color .2s ease;-webkit-user-select:none;-ms-user-select:none;user-select:none}:host .cps-btn-toggle-content-option-content:hover{background:var(--cps-color-highlight-hover)}:host .cps-btn-toggle-content-option-content:active{background:var(--cps-color-highlight-active)}:host .cps-btn-toggle-content-option:first-child .cps-btn-toggle-content-option-content{border-radius:4px 0 0 4px}:host .cps-btn-toggle-content-option:last-child .cps-btn-toggle-content-option-content{border-radius:0 4px 4px 0;border-right:.0625em solid var(--cps-color-text-lightest)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: CheckOptionSelectedPipe, name: "checkOptionSelected" }, { kind: "component", type: CpsInfoCircleComponent, selector: "cps-info-circle", inputs: ["size", "tooltipText", "tooltipPosition", "tooltipContentClass", "tooltipMaxWidth", "tooltipPersistent"] }, { kind: "component", type: CpsIconComponent, selector: "cps-icon", inputs: ["icon", "size", "color"] }, { kind: "directive", type: CpsTooltipDirective, selector: "[cpsTooltip]", inputs: ["cpsTooltip", "tooltipOpenDelay", "tooltipCloseDelay", "tooltipOpenOn", "tooltipPosition", "tooltipPersistent", "tooltipDisabled", "tooltipMaxWidth", "tooltipContentClass"] }] }); }
6040
+ }
6041
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsButtonToggleComponent, decorators: [{
6042
+ type: Component,
6043
+ args: [{ standalone: true, imports: [
6044
+ CommonModule,
6045
+ CheckOptionSelectedPipe,
6046
+ CpsInfoCircleComponent,
6047
+ CpsIconComponent,
6048
+ CpsTooltipDirective
6049
+ ], providers: [CheckOptionSelectedPipe], selector: 'cps-button-toggle', template: "<div class=\"cps-btn-toggle\">\n <div class=\"cps-btn-toggle-label\" *ngIf=\"label\">\n <span>{{ label }}</span>\n <cps-info-circle\n *ngIf=\"infoTooltip\"\n class=\"cps-btn-toggle-label-info-circle\"\n size=\"xsmall\"\n [tooltipPosition]=\"infoTooltipPosition\"\n [tooltipContentClass]=\"infoTooltipClass\"\n [tooltipMaxWidth]=\"infoTooltipMaxWidth\"\n [tooltipPersistent]=\"infoTooltipPersistent\"\n [tooltipText]=\"infoTooltip\">\n </cps-info-circle>\n </div>\n <div class=\"cps-btn-toggle-content\">\n <ng-container *ngFor=\"let option of options\">\n <ng-container\n *ngTemplateOutlet=\"\n optionContainerTemplate;\n context: {\n option: option,\n tooltip: option.tooltip\n }\n \"></ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #optionContainerTemplate let-option=\"option\" let-tooltip=\"tooltip\">\n <label\n class=\"cps-btn-toggle-content-option\"\n *ngIf=\"tooltip\"\n [cpsTooltip]=\"option.tooltip\"\n tooltipCloseDelay=\"0\"\n [tooltipPosition]=\"optionTooltipPosition\">\n <ng-container\n *ngTemplateOutlet=\"\n optionRadioTemplate;\n context: {\n option: option\n }\n \"></ng-container>\n </label>\n <label class=\"cps-btn-toggle-content-option\" *ngIf=\"!tooltip\">\n <ng-container\n *ngTemplateOutlet=\"\n optionRadioTemplate;\n context: {\n option: option\n }\n \"></ng-container>\n </label>\n</ng-template>\n\n<ng-template #optionRadioTemplate let-option=\"option\">\n <input\n class=\"cps-btn-toggle-content-option-input\"\n [type]=\"!multiple && mandatory ? 'radio' : 'checkbox'\"\n [disabled]=\"option.disabled || disabled\"\n [value]=\"option.value\"\n [checked]=\"\n option.value | checkOptionSelected : value : multiple : true : ''\n \"\n (change)=\"updateValueEvent($event, option.value)\" />\n <span\n class=\"cps-btn-toggle-content-option-content\"\n [ngStyle]=\"{\n 'min-width': largestButtonWidth ? largestButtonWidth + 'px' : 'none'\n }\">\n <cps-icon\n *ngIf=\"option.icon\"\n [ngClass]=\"{ 'me-2': !!option.label }\"\n [icon]=\"option.icon\">\n </cps-icon>\n <span *ngIf=\"option.label\">{{ option.label }}</span>\n </span>\n</ng-template>\n", styles: [":host .cps-btn-toggle-label{color:var(--cps-color-text-dark);margin-bottom:.5rem;align-items:center;display:inline-flex;font-weight:700;font-size:16px;font-family:Source Sans Pro,sans-serif;cursor:default}:host .cps-btn-toggle-label .cps-btn-toggle-label-info-circle{margin-left:8px}:host .cps-btn-toggle-label .cps-btn-toggle-label-info-circle ::ng-deep cps-icon i{width:14px;height:14px}:host .cps-btn-toggle-content{display:flex}:host .cps-btn-toggle-content-option-input{clip:rect(0 0 0 0);clip-path:inset(100%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host .cps-btn-toggle-content-option-input:checked+.cps-btn-toggle-content-option-content{background-color:var(--cps-color-calm);z-index:1;color:#fff}:host .cps-btn-toggle-content-option-input:checked+.cps-btn-toggle-content-option-content:hover{background-image:linear-gradient(#ffffff1a 0 0)}:host .cps-btn-toggle-content-option-input:disabled+.cps-btn-toggle-content-option-content{pointer-events:none;background-color:#f7f7f7;color:var(--cps-color-text-light)}:host .cps-btn-toggle-content-option-input:disabled:checked+.cps-btn-toggle-content-option-content{background-color:var(--cps-color-line-mid);color:var(--cps-color-text-mild)}:host .cps-btn-toggle-content-option-content{height:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;background-color:#fff;padding:.375em .75em;position:relative;border:.0625em solid var(--cps-color-text-lightest);border-right:0;font-weight:400;font-size:16px;font-family:Source Sans Pro,sans-serif;letter-spacing:.05em;color:var(--cps-color-text-dark);text-align:center;transition:background-color .2s ease;-webkit-user-select:none;-ms-user-select:none;user-select:none}:host .cps-btn-toggle-content-option-content:hover{background:var(--cps-color-highlight-hover)}:host .cps-btn-toggle-content-option-content:active{background:var(--cps-color-highlight-active)}:host .cps-btn-toggle-content-option:first-child .cps-btn-toggle-content-option-content{border-radius:4px 0 0 4px}:host .cps-btn-toggle-content-option:last-child .cps-btn-toggle-content-option-content{border-radius:0 4px 4px 0;border-right:.0625em solid var(--cps-color-text-lightest)}\n"] }]
6050
+ }], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
6051
+ type: Self
6052
+ }, {
6053
+ type: Optional
6054
+ }] }, { type: Document, decorators: [{
6055
+ type: Inject,
6056
+ args: [DOCUMENT]
6057
+ }] }, { type: i0.Renderer2 }], propDecorators: { label: [{
6315
6058
  type: Input
6316
- }], actionBtnDisabled: [{
6059
+ }], options: [{
6317
6060
  type: Input
6318
- }], showExportBtn: [{
6061
+ }], multiple: [{
6319
6062
  type: Input
6320
- }], exportBtnDisabled: [{
6063
+ }], disabled: [{
6321
6064
  type: Input
6322
- }], exportFilename: [{
6065
+ }], mandatory: [{
6323
6066
  type: Input
6324
- }], csvSeparator: [{
6067
+ }], equalWidths: [{
6325
6068
  type: Input
6326
- }], showDataReloadBtn: [{
6069
+ }], optionTooltipPosition: [{
6327
6070
  type: Input
6328
- }], dataReloadBtnDisabled: [{
6071
+ }], infoTooltip: [{
6329
6072
  type: Input
6330
- }], showColumnsToggleBtn: [{
6073
+ }], infoTooltipClass: [{
6331
6074
  type: Input
6332
- }], columnsToggleBtnDisabled: [{
6075
+ }], infoTooltipMaxWidth: [{
6333
6076
  type: Input
6334
- }], initialColumns: [{
6077
+ }], infoTooltipPersistent: [{
6335
6078
  type: Input
6336
- }], data: [{
6079
+ }], infoTooltipPosition: [{
6337
6080
  type: Input
6338
- }], rowsSelected: [{
6339
- type: Output
6340
- }], selectedRowIndexes: [{
6341
- type: Output
6342
- }], actionBtnClicked: [{
6343
- type: Output
6344
- }], editRowBtnClicked: [{
6345
- type: Output
6346
- }], rowsToRemove: [{
6347
- type: Output
6348
- }], rowIndexesToRemove: [{
6349
- type: Output
6350
- }], pageChanged: [{
6351
- type: Output
6352
- }], sorted: [{
6353
- type: Output
6354
- }], filtered: [{
6355
- type: Output
6356
- }], rowsReordered: [{
6357
- type: Output
6358
- }], columnsSelected: [{
6359
- type: Output
6360
- }], lazyLoaded: [{
6361
- type: Output
6362
- }], dataReloadBtnClicked: [{
6363
- type: Output
6364
- }], additionalBtnOnSelectClicked: [{
6365
- type: Output
6366
- }], customSortFunction: [{
6081
+ }], _value: [{
6082
+ type: Input,
6083
+ args: ['value']
6084
+ }], valueChanged: [{
6367
6085
  type: Output
6368
- }], toolbarTemplate: [{
6369
- type: ContentChild,
6370
- args: ['toolbar', { static: false }]
6371
- }], headerTemplate: [{
6372
- type: ContentChild,
6373
- args: ['header', { static: false }]
6374
- }], nestedHeaderTemplate: [{
6375
- type: ContentChild,
6376
- args: ['nestedHeader', { static: false }]
6377
- }], bodyTemplate: [{
6378
- type: ContentChild,
6379
- args: ['body', { static: false }]
6380
- }], rowExpansionTemplate: [{
6381
- type: ContentChild,
6382
- args: ['rowexpansion', { static: false }]
6383
- }], primengTable: [{
6384
- type: ViewChild,
6385
- args: ['primengTable', { static: true }]
6386
- }], globalFilterComp: [{
6387
- type: ViewChild,
6388
- args: ['globalFilterComp']
6389
- }], exportMenu: [{
6390
- type: ViewChild,
6391
- args: ['exportMenu']
6392
- }], colToggleMenu: [{
6393
- type: ViewChild,
6394
- args: ['colToggleMenu']
6395
- }], tUnsortDirective: [{
6086
+ }] } });
6087
+
6088
+ /**
6089
+ * TableColumnFilterConstraintComponent is an internal filtering constraint component in table and treetable.
6090
+ */
6091
+ class TableColumnFilterConstraintComponent {
6092
+ get isCategoryDropdownOpened() {
6093
+ return this.categoryAutocompleteComponent?.isOpened || false;
6094
+ }
6095
+ constructor(dt, tt) {
6096
+ this.dt = dt;
6097
+ this.tt = tt;
6098
+ /**
6099
+ * Type of filter constraint.
6100
+ * @group Props
6101
+ */
6102
+ this.type = 'text';
6103
+ /**
6104
+ * An array of category options.
6105
+ * @group Props
6106
+ */
6107
+ this.categoryOptions = [];
6108
+ /**
6109
+ * Determines whether to show category filter as button toggles.
6110
+ * @group Props
6111
+ */
6112
+ this.asButtonToggle = false;
6113
+ /**
6114
+ * Single selection for category filter.
6115
+ * @group Props
6116
+ */
6117
+ this.singleSelection = false;
6118
+ /**
6119
+ * Placeholder for input field.
6120
+ * @group Props
6121
+ */
6122
+ this.placeholder = '';
6123
+ /**
6124
+ * Determines whether the filter should have an apply button.
6125
+ * @group Props
6126
+ */
6127
+ this.hasApplyButton = true;
6128
+ this.booleanOptions = [
6129
+ { label: 'True', value: 'true' },
6130
+ { label: 'False', value: 'false' }
6131
+ ];
6132
+ this.categories = [];
6133
+ this._tableInstance = dt || tt;
6134
+ }
6135
+ ngOnChanges() {
6136
+ this._updateCategories();
6137
+ }
6138
+ _updateCategories() {
6139
+ if (this.type !== 'category')
6140
+ return;
6141
+ if (this.categoryOptions.length > 0) {
6142
+ if (typeof this.categoryOptions[0] === 'string') {
6143
+ this.categories = this.categoryOptions.map((o) => ({
6144
+ label: o,
6145
+ value: o
6146
+ }));
6147
+ }
6148
+ else {
6149
+ this.categories = this
6150
+ .categoryOptions;
6151
+ }
6152
+ }
6153
+ else {
6154
+ let cats = [];
6155
+ if (this._tableInstance instanceof Table) {
6156
+ cats =
6157
+ this._tableInstance.value?.map((v) => v[this.field]) || [];
6158
+ }
6159
+ else {
6160
+ const fillCats = (nodes) => {
6161
+ nodes?.forEach((v) => {
6162
+ cats.push(v.data[this.field]);
6163
+ fillCats(v.children);
6164
+ });
6165
+ };
6166
+ fillCats(this._tableInstance.value);
6167
+ }
6168
+ this.categories =
6169
+ Array.from(new Set(cats))?.map((c) => ({
6170
+ label: c,
6171
+ value: c
6172
+ })) || [];
6173
+ }
6174
+ }
6175
+ onValueChange(value) {
6176
+ this.filterConstraint.value = value;
6177
+ if (this._tableInstance.isFilterBlank(value) || !this.hasApplyButton) {
6178
+ this._tableInstance._filter();
6179
+ }
6180
+ }
6181
+ onEnterKeyDown(event) {
6182
+ this._tableInstance._filter();
6183
+ event.preventDefault();
6184
+ }
6185
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TableColumnFilterConstraintComponent, deps: [{ token: i1$3.Table, optional: true }, { token: i2$1.TreeTable, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
6186
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: TableColumnFilterConstraintComponent, isStandalone: true, selector: "table-column-filter-constraint", inputs: { type: "type", field: "field", filterConstraint: "filterConstraint", categoryOptions: "categoryOptions", asButtonToggle: "asButtonToggle", singleSelection: "singleSelection", placeholder: "placeholder", hasApplyButton: "hasApplyButton" }, viewQueries: [{ propertyName: "categoryAutocompleteComponent", first: true, predicate: ["categoryAutocompleteComponent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"type\">\n <cps-input\n *ngSwitchCase=\"'text'\"\n [placeholder]=\"placeholder\"\n [hideDetails]=\"true\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n type=\"text\"></cps-input>\n\n <cps-input\n *ngSwitchCase=\"'number'\"\n [hideDetails]=\"true\"\n [placeholder]=\"placeholder\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n type=\"number\"></cps-input>\n\n <div\n class=\"cps-table-col-filter-constraint-btn-toggles\"\n *ngSwitchCase=\"'boolean'\">\n <cps-button-toggle\n [options]=\"booleanOptions\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n [mandatory]=\"false\">\n </cps-button-toggle>\n </div>\n\n <cps-datepicker\n *ngSwitchCase=\"'date'\"\n [openOnInputFocus]=\"true\"\n [hideDetails]=\"true\"\n [placeholder]=\"placeholder\"\n [value]=\"filterConstraint?.value\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n (valueChanged)=\"onValueChange($event)\">\n </cps-datepicker>\n\n <ng-container *ngSwitchCase=\"'category'\">\n <cps-autocomplete\n #categoryAutocompleteComponent\n *ngIf=\"!asButtonToggle\"\n class=\"cps-table-col-filter-category-autocomplete\"\n [placeholder]=\"placeholder\"\n [options]=\"categories\"\n [hideDetails]=\"true\"\n [clearable]=\"true\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n [returnObject]=\"false\"\n [multiple]=\"!singleSelection\">\n </cps-autocomplete>\n <div class=\"cps-table-col-filter-constraint-btn-toggles\">\n <cps-button-toggle\n *ngIf=\"asButtonToggle\"\n [options]=\"categories\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n [mandatory]=\"false\"\n [multiple]=\"!singleSelection\">\n </cps-button-toggle>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host .cps-table-col-filter-constraint-btn-toggles{display:flex;justify-content:center}:host .cps-table-col-filter-category-autocomplete{min-width:200px;max-width:400px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: CpsInputComponent, selector: "cps-input", inputs: ["label", "hint", "placeholder", "disabled", "readonly", "width", "type", "loading", "clearable", "prefixIcon", "prefixIconClickable", "prefixIconSize", "prefixText", "hideDetails", "persistentClear", "error", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "appearance", "valueToDisplay", "value"], outputs: ["valueChanged", "focused", "prefixIconClicked", "blurred", "cleared", "enterClicked"] }, { kind: "component", type: CpsDatepickerComponent, selector: "cps-datepicker", inputs: ["label", "disabled", "width", "placeholder", "hint", "clearable", "hideDetails", "persistentClear", "showTodayButton", "openOnInputFocus", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "appearance", "minDate", "maxDate", "value"], outputs: ["valueChanged"] }, { kind: "component", type: CpsButtonToggleComponent, selector: "cps-button-toggle", inputs: ["label", "options", "multiple", "disabled", "mandatory", "equalWidths", "optionTooltipPosition", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "value"], outputs: ["valueChanged"] }, { kind: "component", type: CpsAutocompleteComponent, selector: "cps-autocomplete", inputs: ["label", "placeholder", "hint", "returnObject", "multiple", "disabled", "width", "selectAll", "showChevron", "withOptionsAliases", "useOptionsAliasesWhenNoMatch", "optionAlias", "chips", "closableChips", "clearable", "openOnClear", "keepInitialOrder", "optionLabel", "optionValue", "optionInfo", "hideDetails", "persistentClear", "prefixIcon", "prefixIconSize", "loading", "loadingMessage", "showLoadingMessage", "emptyMessage", "showEmptyMessage", "virtualScroll", "numToleratedItems", "externalError", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "appearance", "emptyOptionIndex", "inputChangeDebounceTime", "value", "options"], outputs: ["valueChanged", "inputChanged", "focused", "blurred"] }] }); }
6187
+ }
6188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TableColumnFilterConstraintComponent, decorators: [{
6189
+ type: Component,
6190
+ args: [{ selector: 'table-column-filter-constraint', standalone: true, imports: [
6191
+ CommonModule,
6192
+ FormsModule,
6193
+ CpsInputComponent,
6194
+ CpsDatepickerComponent,
6195
+ CpsButtonToggleComponent,
6196
+ CpsAutocompleteComponent
6197
+ ], template: "<ng-container [ngSwitch]=\"type\">\n <cps-input\n *ngSwitchCase=\"'text'\"\n [placeholder]=\"placeholder\"\n [hideDetails]=\"true\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n type=\"text\"></cps-input>\n\n <cps-input\n *ngSwitchCase=\"'number'\"\n [hideDetails]=\"true\"\n [placeholder]=\"placeholder\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n type=\"number\"></cps-input>\n\n <div\n class=\"cps-table-col-filter-constraint-btn-toggles\"\n *ngSwitchCase=\"'boolean'\">\n <cps-button-toggle\n [options]=\"booleanOptions\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n [mandatory]=\"false\">\n </cps-button-toggle>\n </div>\n\n <cps-datepicker\n *ngSwitchCase=\"'date'\"\n [openOnInputFocus]=\"true\"\n [hideDetails]=\"true\"\n [placeholder]=\"placeholder\"\n [value]=\"filterConstraint?.value\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n (valueChanged)=\"onValueChange($event)\">\n </cps-datepicker>\n\n <ng-container *ngSwitchCase=\"'category'\">\n <cps-autocomplete\n #categoryAutocompleteComponent\n *ngIf=\"!asButtonToggle\"\n class=\"cps-table-col-filter-category-autocomplete\"\n [placeholder]=\"placeholder\"\n [options]=\"categories\"\n [hideDetails]=\"true\"\n [clearable]=\"true\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n [returnObject]=\"false\"\n [multiple]=\"!singleSelection\">\n </cps-autocomplete>\n <div class=\"cps-table-col-filter-constraint-btn-toggles\">\n <cps-button-toggle\n *ngIf=\"asButtonToggle\"\n [options]=\"categories\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n [mandatory]=\"false\"\n [multiple]=\"!singleSelection\">\n </cps-button-toggle>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host .cps-table-col-filter-constraint-btn-toggles{display:flex;justify-content:center}:host .cps-table-col-filter-category-autocomplete{min-width:200px;max-width:400px}\n"] }]
6198
+ }], ctorParameters: () => [{ type: i1$3.Table, decorators: [{
6199
+ type: Optional
6200
+ }] }, { type: i2$1.TreeTable, decorators: [{
6201
+ type: Optional
6202
+ }] }], propDecorators: { type: [{
6203
+ type: Input
6204
+ }], field: [{
6205
+ type: Input
6206
+ }], filterConstraint: [{
6207
+ type: Input
6208
+ }], categoryOptions: [{
6209
+ type: Input
6210
+ }], asButtonToggle: [{
6211
+ type: Input
6212
+ }], singleSelection: [{
6213
+ type: Input
6214
+ }], placeholder: [{
6215
+ type: Input
6216
+ }], hasApplyButton: [{
6217
+ type: Input
6218
+ }], categoryAutocompleteComponent: [{
6396
6219
  type: ViewChild,
6397
- args: ['tUnsortDirective']
6220
+ args: ['categoryAutocompleteComponent']
6398
6221
  }] } });
6399
6222
 
6400
- /* eslint-disable no-unused-vars */
6401
- /**
6402
- * CpsColumnFilterMatchMode is used to define how the filter value should be matched.
6403
- * @group Enums
6404
- */
6405
- var CpsColumnFilterMatchMode;
6406
- (function (CpsColumnFilterMatchMode) {
6407
- CpsColumnFilterMatchMode["STARTS_WITH"] = "startsWith";
6408
- CpsColumnFilterMatchMode["CONTAINS"] = "contains";
6409
- CpsColumnFilterMatchMode["NOT_CONTAINS"] = "notContains";
6410
- CpsColumnFilterMatchMode["ENDS_WITH"] = "endsWith";
6411
- CpsColumnFilterMatchMode["EQUALS"] = "equals";
6412
- CpsColumnFilterMatchMode["NOT_EQUALS"] = "notEquals";
6413
- CpsColumnFilterMatchMode["IN"] = "in";
6414
- CpsColumnFilterMatchMode["LESS_THAN"] = "lt";
6415
- CpsColumnFilterMatchMode["LESS_THAN_OR_EQUAL_TO"] = "lte";
6416
- CpsColumnFilterMatchMode["GREATER_THAN"] = "gt";
6417
- CpsColumnFilterMatchMode["GREATER_THAN_OR_EQUAL_TO"] = "gte";
6418
- CpsColumnFilterMatchMode["BETWEEN"] = "between";
6419
- CpsColumnFilterMatchMode["IS"] = "is";
6420
- CpsColumnFilterMatchMode["IS_NOT"] = "isNot";
6421
- CpsColumnFilterMatchMode["BEFORE"] = "before";
6422
- CpsColumnFilterMatchMode["AFTER"] = "after";
6423
- CpsColumnFilterMatchMode["DATE_IS"] = "dateIs";
6424
- CpsColumnFilterMatchMode["DATE_IS_NOT"] = "dateIsNot";
6425
- CpsColumnFilterMatchMode["DATE_BEFORE"] = "dateBefore";
6426
- CpsColumnFilterMatchMode["DATE_AFTER"] = "dateAfter";
6427
- })(CpsColumnFilterMatchMode || (CpsColumnFilterMatchMode = {}));
6428
-
6429
6223
  /**
6430
- * CpsDatepickerComponent is an input component to provide date input.
6431
- * @group Components
6224
+ * TableColumnFilterComponent is an internal filter component in table and treetable.
6432
6225
  */
6433
- class CpsDatepickerComponent {
6434
- /**
6435
- * Value of the datepicker.
6436
- * @default null
6437
- * @group Props
6438
- */
6439
- set value(value) {
6440
- this._value = value;
6441
- this.stringDate = this._dateToString(value);
6442
- this.onChange(value);
6443
- }
6444
- get value() {
6445
- return this._value;
6226
+ class TableColumnFilterComponent {
6227
+ get isCategoryDropdownOpened() {
6228
+ if (this.type !== 'category')
6229
+ return false;
6230
+ return this.constraintCompList?.first?.isCategoryDropdownOpened || false;
6446
6231
  }
6447
- constructor(_control) {
6448
- this._control = _control;
6449
- /**
6450
- * Label of the datepicker element.
6451
- * @group Props
6452
- */
6453
- this.label = '';
6232
+ constructor(elementRef, dt, tt) {
6233
+ this.elementRef = elementRef;
6234
+ this.dt = dt;
6235
+ this.tt = tt;
6454
6236
  /**
6455
- * Determines whether datepicker is disabled.
6237
+ * Type of filter in table, it can be of type "number", "boolean", "text", "date" or "category".
6456
6238
  * @group Props
6457
6239
  */
6458
- this.disabled = false;
6240
+ this.type = 'text';
6459
6241
  /**
6460
- * Width of the datepicker of type number denoting pixels or string.
6242
+ * Determines whether the filter menu should be persistent.
6461
6243
  * @group Props
6462
6244
  */
6463
- this.width = '100%';
6245
+ this.persistent = false;
6464
6246
  /**
6465
- * Placeholder text.
6247
+ * Determines whether the filter should have clear button.
6466
6248
  * @group Props
6467
6249
  */
6468
- this.placeholder = 'MM/DD/YYYY';
6250
+ this.showClearButton = true;
6469
6251
  /**
6470
- * Bottom hint text for the input field.
6252
+ * Determines whether the filter should have apply button.
6471
6253
  * @group Props
6472
6254
  */
6473
- this.hint = '';
6255
+ this.showApplyButton = true;
6474
6256
  /**
6475
- * When enabled, a clear icon is displayed to clear the value.
6257
+ * Determines whether the filter should have close button.
6476
6258
  * @group Props
6477
6259
  */
6478
- this.clearable = false;
6260
+ this.showCloseButton = false;
6479
6261
  /**
6480
- * Hides hint and validation errors.
6262
+ * Determines whether the filter should have match modes.
6481
6263
  * @group Props
6482
6264
  */
6483
- this.hideDetails = false;
6265
+ this.showMatchModes = true;
6484
6266
  /**
6485
- * Determines whether the component should have persistent clear icon.
6267
+ * Match modes for filter.
6486
6268
  * @group Props
6487
6269
  */
6488
- this.persistentClear = false;
6270
+ this.matchModes = [];
6489
6271
  /**
6490
- * Determines whether to show button to be able to select today's date.
6272
+ * Determines whether the filter should have operator.
6491
6273
  * @group Props
6492
6274
  */
6493
- this.showTodayButton = true;
6275
+ this.showOperator = true;
6494
6276
  /**
6495
- * Determines whether the datepicker dropdown should open on input focus.
6277
+ * Maximum number of constraints.
6496
6278
  * @group Props
6497
6279
  */
6498
- this.openOnInputFocus = false;
6280
+ this.maxConstraints = 2;
6499
6281
  /**
6500
- * When it is not an empty string, an info icon is displayed to show text for more info.
6282
+ * Title of the filter.
6501
6283
  * @group Props
6502
6284
  */
6503
- this.infoTooltip = '';
6285
+ this.headerTitle = '';
6504
6286
  /**
6505
- * InfoTooltip class for styling.
6287
+ * Determines whether the filter should hide on clear.
6506
6288
  * @group Props
6507
6289
  */
6508
- this.infoTooltipClass = 'cps-tooltip-content';
6290
+ this.hideOnClear = false;
6509
6291
  /**
6510
- * Size of infoTooltip, of type number denoting pixels or string.
6292
+ * Options for category filter.
6511
6293
  * @group Props
6512
6294
  */
6513
- this.infoTooltipMaxWidth = '100%';
6295
+ this.categoryOptions = [];
6514
6296
  /**
6515
- * Determines whether the infoTooltip is persistent.
6297
+ * Determines whether to show category filter as button toggles.
6516
6298
  * @group Props
6517
6299
  */
6518
- this.infoTooltipPersistent = false;
6300
+ this.asButtonToggle = false;
6519
6301
  /**
6520
- * Position of infoTooltip, it can be "top", "bottom", "left" or "right".
6302
+ * Single selection for category filter.
6521
6303
  * @group Props
6522
6304
  */
6523
- this.infoTooltipPosition = 'top';
6305
+ this.singleSelection = false;
6524
6306
  /**
6525
- * Styling appearance of datepicker input, it can be 'outlined', 'underlined' or 'borderless.
6307
+ * Placeholder for filter constraints.
6526
6308
  * @group Props
6527
6309
  */
6528
- this.appearance = 'outlined';
6529
- /**
6530
- * Callback to invoke on value change.
6531
- * @param {Date | null} value - value change.
6532
- * @group Emits
6533
- */
6534
- this.valueChanged = new EventEmitter();
6535
- this.stringDate = '';
6536
- this.isOpened = false;
6537
- this.error = '';
6538
- this.cvtWidth = '';
6539
- this._value = null;
6540
- // eslint-disable-next-line @typescript-eslint/no-empty-function
6541
- this.onChange = (event) => { };
6542
- // eslint-disable-next-line @typescript-eslint/no-empty-function
6543
- this.onTouched = () => { };
6544
- if (this._control) {
6545
- this._control.valueAccessor = this;
6546
- }
6310
+ this.placeholder = '';
6311
+ this.operator = FilterOperator.AND;
6312
+ this.operatorOptions = [
6313
+ { label: 'Match All', value: FilterOperator.AND, info: 'AND' },
6314
+ { label: 'Match Any', value: FilterOperator.OR, info: 'OR' }
6315
+ ];
6316
+ this.matchModeLabels = {
6317
+ startsWith: 'Starts with',
6318
+ contains: 'Contains',
6319
+ notContains: 'Does not contain',
6320
+ endsWith: 'Ends with',
6321
+ equals: 'Equals',
6322
+ notEquals: 'Does not equal',
6323
+ lt: 'Less than',
6324
+ lte: 'Less than or equal to',
6325
+ gt: 'Greater than',
6326
+ gte: 'Greater than or equal to',
6327
+ dateIs: 'Date is',
6328
+ dateIsNot: 'Date is not',
6329
+ dateBefore: 'Date is before',
6330
+ dateAfter: 'Date is after'
6331
+ };
6332
+ this.filterMatchModeOptions = {
6333
+ text: [
6334
+ CpsColumnFilterMatchMode.STARTS_WITH,
6335
+ CpsColumnFilterMatchMode.CONTAINS,
6336
+ CpsColumnFilterMatchMode.NOT_CONTAINS,
6337
+ CpsColumnFilterMatchMode.ENDS_WITH,
6338
+ CpsColumnFilterMatchMode.EQUALS,
6339
+ CpsColumnFilterMatchMode.NOT_EQUALS
6340
+ ],
6341
+ number: [
6342
+ CpsColumnFilterMatchMode.EQUALS,
6343
+ CpsColumnFilterMatchMode.NOT_EQUALS,
6344
+ CpsColumnFilterMatchMode.LESS_THAN,
6345
+ CpsColumnFilterMatchMode.LESS_THAN_OR_EQUAL_TO,
6346
+ CpsColumnFilterMatchMode.GREATER_THAN,
6347
+ CpsColumnFilterMatchMode.GREATER_THAN_OR_EQUAL_TO
6348
+ ],
6349
+ date: [
6350
+ CpsColumnFilterMatchMode.DATE_IS,
6351
+ CpsColumnFilterMatchMode.DATE_IS_NOT,
6352
+ CpsColumnFilterMatchMode.DATE_BEFORE,
6353
+ CpsColumnFilterMatchMode.DATE_AFTER
6354
+ ]
6355
+ };
6356
+ this.isFilterApplied = false;
6357
+ this._tableInstance = dt || tt;
6547
6358
  }
6548
6359
  ngOnInit() {
6549
- this.cvtWidth = convertSize(this.width);
6550
- this._statusChangesSubscription = this._control?.statusChanges?.subscribe(() => {
6551
- this._checkErrors();
6360
+ if (this.matchModes.length > 0) {
6361
+ this.filterMatchModeOptions[this.type] = this.matchModes;
6362
+ }
6363
+ this._onFilterSub = this._tableInstance?.onFilter?.subscribe((value) => this._updateFilterApplied(value));
6364
+ if (!this._tableInstance.filters[this.field]) {
6365
+ this._initFieldFilterConstraint();
6366
+ }
6367
+ if (this.maxConstraints > 1 && this.type !== 'category') {
6368
+ this.showApplyButton = true;
6369
+ }
6370
+ if (this.type === 'boolean') {
6371
+ this.showApplyButton = false;
6372
+ }
6373
+ this.currentMatchModes = this.filterMatchModeOptions[this.type]?.map((key) => {
6374
+ return { label: this.matchModeLabels[key], value: key };
6552
6375
  });
6553
6376
  }
6554
6377
  ngOnDestroy() {
6555
- this._statusChangesSubscription?.unsubscribe();
6556
- }
6557
- registerOnChange(fn) {
6558
- this.onChange = fn;
6559
- }
6560
- registerOnTouched(fn) {
6561
- this.onTouched = fn;
6562
- }
6563
- onInputValueChanged(val) {
6564
- this.stringDate = val;
6565
- if (!val) {
6566
- this._updateValue(null);
6567
- return;
6568
- }
6569
- const dt = this._stringToDate(val);
6570
- if (dt)
6571
- this._updateValue(dt);
6572
- }
6573
- writeValue(value) {
6574
- this.value = value;
6378
+ this._onFilterSub?.unsubscribe();
6575
6379
  }
6576
- _updateValue(value) {
6577
- if (this.value === value)
6578
- return;
6579
- this.writeValue(value);
6580
- this.onChange(value);
6581
- this.valueChanged.emit(value);
6380
+ _updateFilterApplied(value) {
6381
+ const fieldFilter = value.filters[this.field];
6382
+ if (fieldFilter) {
6383
+ if (Array.isArray(fieldFilter)) {
6384
+ this.isFilterApplied = fieldFilter.some((meta) => !this._tableInstance.isFilterBlank(meta.value));
6385
+ }
6386
+ else {
6387
+ this.isFilterApplied = !this._tableInstance.isFilterBlank(fieldFilter.value);
6388
+ }
6389
+ }
6390
+ else {
6391
+ this.isFilterApplied = false;
6392
+ }
6582
6393
  }
6583
- _updateValueFromInputString() {
6584
- if (!this.stringDate) {
6585
- this._updateValue(null);
6394
+ _initFieldFilterConstraint() {
6395
+ const defaultMatchMode = this._getDefaultMatchMode();
6396
+ if (this._tableInstance instanceof Table) {
6397
+ this._tableInstance.filters[this.field] = [
6398
+ {
6399
+ value: null,
6400
+ matchMode: defaultMatchMode,
6401
+ operator: this.operator
6402
+ }
6403
+ ];
6586
6404
  }
6587
6405
  else {
6588
- this._updateValue(this._stringToDate(this.stringDate));
6406
+ this._tableInstance.filters[this.field] = {
6407
+ value: null,
6408
+ matchMode: defaultMatchMode
6409
+ };
6589
6410
  }
6590
6411
  }
6591
- _checkDateFormat(dateString) {
6592
- if (!/^\d\d\/\d\d\/\d\d\d\d$/.test(dateString)) {
6593
- return false;
6412
+ _getDefaultMatchMode() {
6413
+ const getMatchMode = (val) => {
6414
+ if (this.type in this.filterMatchModeOptions) {
6415
+ return this.filterMatchModeOptions[this.type].includes(val)
6416
+ ? val
6417
+ : this.filterMatchModeOptions[this.type][0];
6418
+ }
6419
+ else {
6420
+ return val;
6421
+ }
6422
+ };
6423
+ switch (this.type) {
6424
+ case 'text':
6425
+ return getMatchMode(CpsColumnFilterMatchMode.STARTS_WITH);
6426
+ case 'number':
6427
+ return getMatchMode(CpsColumnFilterMatchMode.EQUALS);
6428
+ case 'date':
6429
+ return getMatchMode(CpsColumnFilterMatchMode.DATE_IS);
6430
+ case 'category':
6431
+ return this.singleSelection
6432
+ ? CpsColumnFilterMatchMode.IS
6433
+ : CpsColumnFilterMatchMode.IN;
6434
+ default:
6435
+ return getMatchMode(CpsColumnFilterMatchMode.CONTAINS);
6594
6436
  }
6595
- const parts = dateString.split('/').map((p) => parseInt(p, 10));
6596
- parts[0] -= 1;
6597
- const d = new Date(parts[2], parts[0], parts[1]);
6598
- return (d.getMonth() === parts[0] &&
6599
- d.getDate() === parts[1] &&
6600
- d.getFullYear() === parts[2]);
6601
6437
  }
6602
- _checkDateInRange(date, minDate, maxDate) {
6603
- if (!minDate && !maxDate)
6604
- return true;
6605
- if (minDate && maxDate) {
6606
- return (date.getTime() >= minDate.getTime() &&
6607
- date.getTime() <= maxDate.getTime());
6438
+ _getDefaultOperator() {
6439
+ return this._tableInstance.filters
6440
+ ? (this._tableInstance.filters[this.field])[0].operator
6441
+ : this.operator;
6442
+ }
6443
+ _updateSortIconColor(color) {
6444
+ const unsortedUp = this.elementRef?.nativeElement?.parentElement?.querySelector('.sort-unsorted-arrow-up');
6445
+ if (unsortedUp) {
6446
+ unsortedUp.style.borderBottomColor = color;
6608
6447
  }
6609
- if (minDate) {
6610
- return date.getTime() >= minDate.getTime();
6448
+ const unsortedDown = this.elementRef?.nativeElement?.parentElement?.querySelector('.sort-unsorted-arrow-down');
6449
+ if (unsortedDown) {
6450
+ unsortedDown.style.borderTopColor = color;
6611
6451
  }
6612
- return date.getTime() <= maxDate.getTime();
6613
- }
6614
- _dateToString(dateVal) {
6615
- if (!dateVal)
6616
- return '';
6617
- let month = '' + (dateVal.getMonth() + 1);
6618
- if (month.length < 2)
6619
- month = '0' + month;
6620
- let day = '' + dateVal.getDate();
6621
- if (day.length < 2)
6622
- day = '0' + day;
6623
- const year = dateVal.getFullYear();
6624
- return `${month}/${day}/${year}`;
6625
6452
  }
6626
- _stringToDate(dateString) {
6627
- if (!this._checkDateFormat(dateString))
6628
- return null;
6629
- const [month, day, year] = dateString.split('/');
6630
- const dt = new Date(`${year}-${month}-${day}`);
6631
- const inRange = this._checkDateInRange(dt, this.minDate, this.maxDate);
6632
- return inRange ? dt : null;
6453
+ onCloseClick() {
6454
+ this.hide();
6633
6455
  }
6634
- _checkErrors() {
6635
- if (this.stringDate && !this._stringToDate(this.stringDate)) {
6636
- this.error = 'Date is invalid';
6637
- return;
6456
+ onMenuMatchModeChange(value, filterMeta) {
6457
+ filterMeta.matchMode = value;
6458
+ if (!this.showApplyButton) {
6459
+ this._tableInstance._filter();
6638
6460
  }
6639
- const errors = this._control?.errors;
6640
- if (!this._control?.control?.touched || !errors) {
6641
- this.error = '';
6642
- return;
6461
+ }
6462
+ addConstraint() {
6463
+ this._tableInstance.filters[this.field].push({
6464
+ value: null,
6465
+ matchMode: this._getDefaultMatchMode(),
6466
+ operator: this._getDefaultOperator()
6467
+ });
6468
+ }
6469
+ removeConstraint(filterMeta) {
6470
+ this._tableInstance.filters[this.field] = (this._tableInstance.filters[this.field]).filter((meta) => meta !== filterMeta);
6471
+ this._tableInstance._filter();
6472
+ }
6473
+ onOperatorChange(value) {
6474
+ this._tableInstance.filters[this.field].forEach((filterMeta) => {
6475
+ filterMeta.operator = value;
6476
+ this.operator = value;
6477
+ });
6478
+ if (!this.showApplyButton) {
6479
+ this._tableInstance._filter();
6643
6480
  }
6644
- if ('required' in errors) {
6645
- this.error = 'Field is required';
6646
- return;
6481
+ }
6482
+ get fieldConstraints() {
6483
+ if (this._tableInstance instanceof Table) {
6484
+ return this._tableInstance.filters
6485
+ ? this._tableInstance.filters[this.field]
6486
+ : null;
6647
6487
  }
6648
- const errArr = Object.values(errors);
6649
- if (errArr.length < 1) {
6650
- this.error = '';
6651
- return;
6488
+ else {
6489
+ return this._tableInstance.filters
6490
+ ? [this._tableInstance.filters[this.field]]
6491
+ : null;
6652
6492
  }
6653
- const message = errArr.find((msg) => typeof msg === 'string');
6654
- this.error = message || 'Unknown error';
6655
6493
  }
6656
- onClearCalendarDate() {
6657
- this.onSelectCalendarDate(null);
6494
+ get showRemoveIcon() {
6495
+ return this.fieldConstraints ? this.fieldConstraints.length > 1 : false;
6658
6496
  }
6659
- onSelectCalendarDate(dateVal) {
6660
- this.toggleCalendar(false);
6661
- this.writeValue(dateVal);
6662
- this.onChange(dateVal);
6663
- this.valueChanged.emit(dateVal);
6497
+ get isShowOperator() {
6498
+ return (this.showOperator &&
6499
+ this.maxConstraints > 1 &&
6500
+ !['boolean', 'category'].includes(this.type));
6664
6501
  }
6665
- onInputBlur() {
6666
- if (this.isOpened)
6667
- return;
6668
- this._updateValueFromInputString();
6669
- this._checkErrors();
6502
+ get isShowAddConstraint() {
6503
+ return (!['boolean', 'category'].includes(this.type) &&
6504
+ this.fieldConstraints &&
6505
+ this.fieldConstraints.length < this.maxConstraints);
6670
6506
  }
6671
- onInputFocus() {
6672
- this._control?.control?.markAsTouched();
6673
- if (this.openOnInputFocus)
6674
- this.toggleCalendar(true);
6507
+ hide() {
6508
+ this.columnFilterMenu.hide();
6675
6509
  }
6676
- onInputEnterClicked() {
6677
- if (!this.isOpened)
6678
- return;
6679
- this._control?.control?.markAsTouched();
6680
- this._updateValueFromInputString();
6681
- this._checkErrors();
6682
- this.toggleCalendar(false);
6510
+ clearFilter() {
6511
+ this._initFieldFilterConstraint();
6512
+ this._tableInstance._filter();
6513
+ if (this.hideOnClear)
6514
+ this.hide();
6683
6515
  }
6684
- onClickCalendarIcon() {
6685
- if (this.disabled)
6686
- return;
6687
- if (this.isOpened)
6688
- this._updateValueFromInputString();
6689
- this.toggleCalendar();
6516
+ clearFilterValues() {
6517
+ this._initFieldFilterConstraint();
6518
+ this.isFilterApplied = false;
6690
6519
  }
6691
- onBeforeCalendarHidden() {
6692
- if (this.disabled || !this.isOpened)
6693
- return;
6694
- this._updateValueFromInputString();
6695
- this.toggleCalendar(false);
6520
+ applyFilter() {
6521
+ this._tableInstance._filter();
6522
+ this.hide();
6696
6523
  }
6697
- onInputClear() {
6698
- if (this.isOpened)
6699
- this.focusInput();
6524
+ onMenuShown() {
6525
+ const parent = this.elementRef?.nativeElement?.parentElement;
6526
+ const className = 'cps-table-col-filter-menu-open';
6527
+ parent.classList.add(className);
6700
6528
  }
6701
- onCalendarContentClick() {
6702
- if (this.isOpened)
6703
- this.focusInput();
6529
+ onBeforeMenuHidden() {
6530
+ if (!this.isFilterApplied)
6531
+ this._initFieldFilterConstraint();
6704
6532
  }
6705
- focusInput() {
6706
- this.datepickerInput.focus();
6533
+ onMenuHidden() {
6534
+ const parent = this.elementRef?.nativeElement?.parentElement;
6535
+ const className = 'cps-table-col-filter-menu-open';
6536
+ parent.classList.remove(className);
6707
6537
  }
6708
- toggleCalendar(show) {
6709
- if (this.disabled || this.isOpened === show)
6710
- return;
6711
- const target = this.datepickerInput.elementRef.nativeElement.querySelector('.cps-input-wrap');
6712
- if (typeof show === 'boolean') {
6713
- if (show) {
6714
- this.calendarMenu.show({
6715
- target
6716
- });
6717
- }
6718
- else {
6719
- this.calendarMenu.hide();
6720
- }
6721
- }
6722
- else {
6723
- this.calendarMenu.toggle({
6724
- target
6725
- });
6726
- }
6727
- this.isOpened = this.calendarMenu.isVisible();
6728
- if (!this.isOpened) {
6729
- this._control?.control?.markAsTouched();
6730
- this._checkErrors();
6731
- }
6732
- else {
6733
- this.focusInput();
6734
- }
6538
+ onClick(event) {
6539
+ event.stopPropagation();
6540
+ }
6541
+ onMouseOver() {
6542
+ this._updateSortIconColor('var(--cps-color-line-dark)');
6735
6543
  }
6736
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsDatepickerComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
6737
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: CpsDatepickerComponent, isStandalone: true, selector: "cps-datepicker", inputs: { label: "label", disabled: "disabled", width: "width", placeholder: "placeholder", hint: "hint", clearable: "clearable", hideDetails: "hideDetails", persistentClear: "persistentClear", showTodayButton: "showTodayButton", openOnInputFocus: "openOnInputFocus", infoTooltip: "infoTooltip", infoTooltipClass: "infoTooltipClass", infoTooltipMaxWidth: "infoTooltipMaxWidth", infoTooltipPersistent: "infoTooltipPersistent", infoTooltipPosition: "infoTooltipPosition", appearance: "appearance", minDate: "minDate", maxDate: "maxDate", value: "value" }, outputs: { valueChanged: "valueChanged" }, viewQueries: [{ propertyName: "datepickerInput", first: true, predicate: ["datepickerInput"], descendants: true }, { propertyName: "calendarMenu", first: true, predicate: ["calendarMenu"], descendants: true }], ngImport: i0, template: "<div\n class=\"cps-datepicker\"\n [ngStyle]=\"{ width: cvtWidth }\"\n [class.focused]=\"isOpened\">\n <cps-input\n #datepickerInput\n [disabled]=\"disabled\"\n [value]=\"stringDate\"\n [label]=\"label\"\n prefixIcon=\"datepicker\"\n [placeholder]=\"placeholder\"\n (prefixIconClicked)=\"onClickCalendarIcon()\"\n [prefixIconClickable]=\"true\"\n (focused)=\"onInputFocus()\"\n (valueChanged)=\"onInputValueChanged($event)\"\n [clearable]=\"clearable\"\n (blurred)=\"onInputBlur()\"\n (cleared)=\"onInputClear()\"\n (enterClicked)=\"onInputEnterClicked()\"\n [width]=\"width\"\n [hint]=\"hint\"\n [hideDetails]=\"hideDetails\"\n [infoTooltip]=\"infoTooltip\"\n [infoTooltipClass]=\"infoTooltipClass\"\n [infoTooltipMaxWidth]=\"infoTooltipMaxWidth\"\n [infoTooltipPersistent]=\"infoTooltipPersistent\"\n [persistentClear]=\"persistentClear\"\n [appearance]=\"appearance\"\n [error]=\"error\"></cps-input>\n <cps-menu\n #calendarMenu\n [withArrow]=\"false\"\n (beforeMenuHidden)=\"onBeforeCalendarHidden()\"\n (contentClicked)=\"onCalendarContentClick()\"\n [focusOnShow]=\"false\"\n hideTransitionOptions=\"0s linear\"\n containerClass=\"cps-datepicker-calendar-menu\">\n <div class=\"cps-datepicker-calendar\">\n <p-calendar\n [(ngModel)]=\"value\"\n [showIcon]=\"true\"\n [showButtonBar]=\"showTodayButton\"\n [inline]=\"true\"\n (onSelect)=\"onSelectCalendarDate($event)\"\n (onClearClick)=\"onClearCalendarDate()\"\n [showOtherMonths]=\"false\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\">\n </p-calendar>\n </div>\n </cps-menu>\n</div>\n", styles: [":host{display:flex}:host .cps-datepicker{position:relative;width:100%}:host .cps-datepicker.focused ::ng-deep input{border:1px solid var(--cps-color-calm)!important}:host .cps-datepicker.focused ::ng-deep .cps-input-prefix-icon{color:var(--cps-color-calm)!important}:host .cps-datepicker.focused ::ng-deep .clear-btn cps-icon{opacity:.5!important}.cps-datepicker-calendar{-webkit-user-select:none;-ms-user-select:none;user-select:none}.cps-datepicker-calendar ::ng-deep .p-datepicker{font-family:Source Sans Pro,sans-serif;width:auto!important;padding:.5rem;background:#fff;color:var(--cps-color-text-darkest);border:1px solid #ced4da}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header{padding:.5rem;color:var(--cps-color-text-darkest);background:#fff;font-weight:600;margin:0;border-bottom:1px solid #dee2e6;border-top-right-radius:6px;border-top-left-radius:6px}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-prev,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-next{width:2rem;height:2rem;color:var(--cps-color-calm);border:0 none;background:transparent;border-radius:50%;transition:background-color .2s,color .2s,box-shadow .2s}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-prev:enabled:hover,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-next:enabled:hover{color:var(--cps-color-calm);border-color:transparent;background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-prev:focus,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-next:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title{line-height:2rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-year,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month{color:var(--cps-color-text-darkest);transition:background-color .2s,color .2s,box-shadow .2s;font-weight:600;padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-year:enabled:hover,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month:enabled:hover{color:var(--cps-color-calm)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month{margin-right:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table{font-size:1rem;margin:.5rem 0}.cps-datepicker-calendar ::ng-deep .p-datepicker table th{padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table th>span{width:2.5rem;height:2.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table td{padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span{width:2.5rem;height:2.5rem;border-radius:50%;transition:box-shadow .2s;border:1px solid transparent}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span.p-disabled{color:var(--cps-color-text-lightest);cursor:default}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker table td.p-datepicker-today>span{border-color:var(--cps-color-calm);background:unset;color:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker table td.p-datepicker-today>span.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-buttonbar{padding:.5rem 0 0;border-top:1px solid #dee2e6}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-buttonbar .p-button{width:auto;color:var(--cps-color-prepared)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker{border-top:1px solid #dee2e6;padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button{width:2rem;height:2rem;color:var(--cps-color-calm);border:0 none;background:transparent;border-radius:50%;transition:background-color .2s,color .2s,box-shadow .2s}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button:enabled:hover{color:var(--cps-color-calm);border-color:transparent;background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button:last-child{margin-top:.2em}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker span{font-size:1.25rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker>div{padding:0 .5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-timeonly .p-timepicker{border-top:0 none}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-monthpicker{margin:.5rem 0}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-monthpicker .p-monthpicker-month{padding:.5rem;transition:box-shadow .2s;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-monthpicker .p-monthpicker-month.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-yearpicker{margin:.5rem 0}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-yearpicker .p-yearpicker-year{padding:.5rem;transition:box-shadow .2s;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-yearpicker .p-yearpicker-year.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-multiple-month .p-datepicker-group{border-left:1px solid #dee2e6;padding-right:.5rem;padding-left:.5rem;padding-top:0;padding-bottom:0}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-multiple-month .p-datepicker-group:first-child{padding-left:0;border-left:0 none}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-multiple-month .p-datepicker-group:last-child{padding-right:0}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):hover{background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-monthpicker .p-monthpicker-month:not(.p-disabled):not(.p-highlight):hover{background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-monthpicker .p-monthpicker-month:not(.p-disabled):focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-yearpicker .p-yearpicker-year:not(.p-disabled):not(.p-highlight):hover{background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-yearpicker .p-yearpicker-year:not(.p-disabled):focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep p-calendar.p-calendar-clearable .p-inputtext{padding-right:2.5rem}.cps-datepicker-calendar ::ng-deep p-calendar.p-calendar-clearable .p-calendar-clear-icon{color:var(--cps-color-calm);right:.75rem}.cps-datepicker-calendar ::ng-deep p-calendar.p-calendar-clearable.p-calendar-w-btn .p-calendar-clear-icon{color:var(--cps-color-calm);right:3.75rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table th,.cps-datepicker-calendar ::ng-deep .p-datepicker table td{padding:.125rem}.cps-datepicker-calendar ::ng-deep .p-datepicker-other-month{color:var(--cps-color-text-light)}.cps-datepicker-calendar ::ng-deep .p-link:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:none;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:1rem;font-family:Source Sans Pro,sans-serif;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-button{font-family:Source Sans Pro,sans-serif;background-color:transparent;color:var(--cps-color-calm);border-color:transparent;margin:0;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;vertical-align:bottom;text-align:center;overflow:hidden;position:relative;padding:.75rem 1.25rem;font-size:1rem;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-button:focus{box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-button:hover{background-color:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-button:active{background-color:var(--cps-color-highlight-selected)}.cps-datepicker-calendar ::ng-deep .p-button .p-button-label{font-weight:700}.cps-datepicker-calendar ::ng-deep .p-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}\n"], dependencies: [{ kind: "component", type: CpsInputComponent, selector: "cps-input", inputs: ["label", "hint", "placeholder", "disabled", "readonly", "width", "type", "loading", "clearable", "prefixIcon", "prefixIconClickable", "prefixIconSize", "prefixText", "hideDetails", "persistentClear", "error", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "appearance", "valueToDisplay", "value"], outputs: ["valueChanged", "focused", "prefixIconClicked", "blurred", "cleared", "enterClicked"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i2$2.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CpsMenuComponent, selector: "cps-menu", inputs: ["header", "items", "withArrow", "compressed", "focusOnShow", "persistent", "containerClass", "showTransitionOptions", "hideTransitionOptions"], outputs: ["menuShown", "menuHidden", "beforeMenuHidden", "contentClicked"] }] }); }
6544
+ onMouseLeave() {
6545
+ this._updateSortIconColor('');
6546
+ }
6547
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TableColumnFilterComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.Table, optional: true }, { token: i2$1.TreeTable, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
6548
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: TableColumnFilterComponent, isStandalone: true, selector: "table-column-filter", inputs: { field: "field", type: "type", persistent: "persistent", showClearButton: "showClearButton", showApplyButton: "showApplyButton", showCloseButton: "showCloseButton", showMatchModes: "showMatchModes", matchModes: "matchModes", showOperator: "showOperator", maxConstraints: "maxConstraints", headerTitle: "headerTitle", hideOnClear: "hideOnClear", categoryOptions: "categoryOptions", asButtonToggle: "asButtonToggle", singleSelection: "singleSelection", placeholder: "placeholder" }, host: { listeners: { "click": "onClick($event)", "mouseenter": "onMouseOver()", "mouseleave": "onMouseLeave()" } }, viewQueries: [{ propertyName: "columnFilterMenu", first: true, predicate: ["columnFilterMenu"], descendants: true }, { propertyName: "constraintCompList", predicate: ["constraintComponent"], descendants: true }], ngImport: i0, template: "<div class=\"cps-table-col-filter\">\n <cps-menu\n #columnFilterMenu\n [withArrow]=\"false\"\n hideTransitionOptions=\"0s linear\"\n [persistent]=\"persistent || (showApplyButton && isCategoryDropdownOpened)\"\n (menuShown)=\"onMenuShown()\"\n (menuHidden)=\"onMenuHidden()\"\n (beforeMenuHidden)=\"onBeforeMenuHidden()\">\n <div class=\"cps-table-col-filter-menu-content\">\n <div\n class=\"cps-table-col-filter-menu-content-header\"\n *ngIf=\"showCloseButton || headerTitle\">\n <span class=\"cps-table-col-filter-menu-content-header-title\">\n {{ headerTitle }}\n </span>\n <cps-icon\n *ngIf=\"showCloseButton\"\n icon=\"close-x\"\n (click)=\"onCloseClick()\"></cps-icon>\n </div>\n <div\n class=\"cps-table-col-filter-menu-content-operator\"\n *ngIf=\"isShowOperator\">\n <cps-select\n [hideDetails]=\"true\"\n [disabled]=\"!fieldConstraints || fieldConstraints.length < 2\"\n [returnObject]=\"false\"\n [options]=\"operatorOptions\"\n [ngModel]=\"operator\"\n (valueChanged)=\"onOperatorChange($event)\"></cps-select>\n </div>\n <div class=\"cps-table-col-filter-menu-content-constraints\">\n <div\n *ngFor=\"let fieldConstraint of fieldConstraints; let i = index\"\n class=\"cps-table-col-filter-menu-content-constraint\">\n <cps-select\n *ngIf=\"showMatchModes && currentMatchModes\"\n class=\"cps-table-col-filter-match-mode-select\"\n [hideDetails]=\"true\"\n [returnObject]=\"false\"\n [options]=\"currentMatchModes\"\n [ngModel]=\"fieldConstraint.matchMode\"\n (valueChanged)=\"\n onMenuMatchModeChange($event, fieldConstraint)\n \"></cps-select>\n <table-column-filter-constraint\n #constraintComponent\n [type]=\"type\"\n [field]=\"field\"\n [asButtonToggle]=\"asButtonToggle\"\n [singleSelection]=\"singleSelection\"\n [categoryOptions]=\"categoryOptions\"\n [filterConstraint]=\"fieldConstraint\"\n [hasApplyButton]=\"showApplyButton\"\n [placeholder]=\"placeholder\">\n </table-column-filter-constraint>\n <div\n class=\"cps-table-col-filter-remove-rule-btn\"\n *ngIf=\"showRemoveIcon\">\n <cps-button\n type=\"borderless\"\n width=\"100%\"\n size=\"small\"\n color=\"prepared\"\n icon=\"delete\"\n (clicked)=\"removeConstraint(fieldConstraint)\"\n label=\"Remove condition\">\n </cps-button>\n </div>\n </div>\n </div>\n <div\n class=\"cps-table-col-filter-add-rule-btn\"\n *ngIf=\"isShowAddConstraint\">\n <cps-button\n label=\"Add condition\"\n type=\"borderless\"\n width=\"100%\"\n size=\"small\"\n color=\"surprise\"\n icon=\"add\"\n (clicked)=\"addConstraint()\">\n </cps-button>\n </div>\n <div class=\"cps-table-col-filter-buttonbar\">\n <cps-button\n *ngIf=\"showClearButton\"\n (clicked)=\"clearFilter()\"\n type=\"borderless\"\n color=\"prepared\"\n size=\"small\"\n label=\"Clear\"></cps-button>\n <cps-button\n *ngIf=\"showApplyButton\"\n (clicked)=\"applyFilter()\"\n color=\"prepared\"\n size=\"small\"\n label=\"Apply\"></cps-button>\n </div>\n </div>\n </cps-menu>\n <cps-icon\n [icon]=\"isFilterApplied ? 'filter-funnel-filled' : 'filter-funnel'\"\n size=\"13\"\n (click)=\"columnFilterMenu.toggle($event)\"\n class=\"cps-table-col-filter-menu-button\"\n [ngClass]=\"{\n 'cps-table-col-filter-menu-button-active': isFilterApplied\n }\"\n >>\n </cps-icon>\n</div>\n", styles: [":host .cps-table-col-filter{display:inline-flex}:host .cps-table-col-filter .cps-table-col-filter-menu-button{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative;padding-left:8px;padding-right:4px}:host .cps-table-col-filter .cps-table-col-filter-menu-button:not(.cps-table-col-filter-menu-button-active):hover{color:var(--cps-color-text-dark)}:host .cps-table-col-filter .cps-table-col-filter-menu-button-active{color:var(--cps-color-calm-lighten1)}.cps-table-col-filter-menu-content{padding-bottom:12px;min-width:200px;max-height:500px;overflow:auto}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header{min-height:32px;padding:8px;border-bottom:1px solid var(--cps-color-line-mid);background:var(--cps-color-bg-light);display:flex;justify-content:space-between;align-items:center}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header-title{font-family:Source Sans Pro,sans-serif;color:var(--cps-color-text-darkest);max-width:390px;cursor:default}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header cps-icon{margin-left:8px;cursor:pointer}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header cps-icon:hover{color:var(--cps-color-calm)}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-operator{padding:12px;border-bottom:1px solid var(--cps-color-line-mid);background:var(--cps-color-bg-light)}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-menu-content-constraint{border-bottom:1px solid var(--cps-color-line-mid);padding:12px}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-menu-content-constraint .cps-table-col-filter-match-mode-select{margin-bottom:8px}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-menu-content-constraint:last-child{border-bottom:none}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-remove-rule-btn{padding-top:8px}.cps-table-col-filter-menu-content .cps-table-col-filter-add-rule-btn{padding:8px 12px}.cps-table-col-filter-menu-content .cps-table-col-filter-buttonbar{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CpsButtonComponent, selector: "cps-button", inputs: ["color", "contentColor", "borderRadius", "type", "label", "icon", "iconPosition", "size", "width", "height", "disabled", "loading"], outputs: ["clicked"] }, { kind: "component", type: CpsMenuComponent, selector: "cps-menu", inputs: ["header", "items", "withArrow", "compressed", "focusOnShow", "persistent", "containerClass", "showTransitionOptions", "hideTransitionOptions"], outputs: ["menuShown", "menuHidden", "beforeMenuHidden", "contentClicked"] }, { kind: "component", type: CpsIconComponent, selector: "cps-icon", inputs: ["icon", "size", "color"] }, { kind: "component", type: CpsSelectComponent, selector: "cps-select", inputs: ["label", "placeholder", "hint", "returnObject", "multiple", "disabled", "width", "selectAll", "chips", "closableChips", "clearable", "openOnClear", "options", "keepInitialOrder", "optionLabel", "optionValue", "optionInfo", "hideDetails", "persistentClear", "prefixIcon", "prefixIconSize", "loading", "virtualScroll", "numToleratedItems", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "optionsClass", "appearance", "showChevron", "value"], outputs: ["valueChanged", "focused", "blurred"] }, { kind: "component", type: TableColumnFilterConstraintComponent, selector: "table-column-filter-constraint", inputs: ["type", "field", "filterConstraint", "categoryOptions", "asButtonToggle", "singleSelection", "placeholder", "hasApplyButton"] }] }); }
6738
6549
  }
6739
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsDatepickerComponent, decorators: [{
6550
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TableColumnFilterComponent, decorators: [{
6740
6551
  type: Component,
6741
- args: [{ standalone: true, imports: [
6742
- CpsInputComponent,
6743
- CalendarModule,
6552
+ args: [{ selector: 'table-column-filter', standalone: true, imports: [
6744
6553
  CommonModule,
6745
6554
  FormsModule,
6746
- CpsMenuComponent
6747
- ], selector: 'cps-datepicker', template: "<div\n class=\"cps-datepicker\"\n [ngStyle]=\"{ width: cvtWidth }\"\n [class.focused]=\"isOpened\">\n <cps-input\n #datepickerInput\n [disabled]=\"disabled\"\n [value]=\"stringDate\"\n [label]=\"label\"\n prefixIcon=\"datepicker\"\n [placeholder]=\"placeholder\"\n (prefixIconClicked)=\"onClickCalendarIcon()\"\n [prefixIconClickable]=\"true\"\n (focused)=\"onInputFocus()\"\n (valueChanged)=\"onInputValueChanged($event)\"\n [clearable]=\"clearable\"\n (blurred)=\"onInputBlur()\"\n (cleared)=\"onInputClear()\"\n (enterClicked)=\"onInputEnterClicked()\"\n [width]=\"width\"\n [hint]=\"hint\"\n [hideDetails]=\"hideDetails\"\n [infoTooltip]=\"infoTooltip\"\n [infoTooltipClass]=\"infoTooltipClass\"\n [infoTooltipMaxWidth]=\"infoTooltipMaxWidth\"\n [infoTooltipPersistent]=\"infoTooltipPersistent\"\n [persistentClear]=\"persistentClear\"\n [appearance]=\"appearance\"\n [error]=\"error\"></cps-input>\n <cps-menu\n #calendarMenu\n [withArrow]=\"false\"\n (beforeMenuHidden)=\"onBeforeCalendarHidden()\"\n (contentClicked)=\"onCalendarContentClick()\"\n [focusOnShow]=\"false\"\n hideTransitionOptions=\"0s linear\"\n containerClass=\"cps-datepicker-calendar-menu\">\n <div class=\"cps-datepicker-calendar\">\n <p-calendar\n [(ngModel)]=\"value\"\n [showIcon]=\"true\"\n [showButtonBar]=\"showTodayButton\"\n [inline]=\"true\"\n (onSelect)=\"onSelectCalendarDate($event)\"\n (onClearClick)=\"onClearCalendarDate()\"\n [showOtherMonths]=\"false\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\">\n </p-calendar>\n </div>\n </cps-menu>\n</div>\n", styles: [":host{display:flex}:host .cps-datepicker{position:relative;width:100%}:host .cps-datepicker.focused ::ng-deep input{border:1px solid var(--cps-color-calm)!important}:host .cps-datepicker.focused ::ng-deep .cps-input-prefix-icon{color:var(--cps-color-calm)!important}:host .cps-datepicker.focused ::ng-deep .clear-btn cps-icon{opacity:.5!important}.cps-datepicker-calendar{-webkit-user-select:none;-ms-user-select:none;user-select:none}.cps-datepicker-calendar ::ng-deep .p-datepicker{font-family:Source Sans Pro,sans-serif;width:auto!important;padding:.5rem;background:#fff;color:var(--cps-color-text-darkest);border:1px solid #ced4da}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header{padding:.5rem;color:var(--cps-color-text-darkest);background:#fff;font-weight:600;margin:0;border-bottom:1px solid #dee2e6;border-top-right-radius:6px;border-top-left-radius:6px}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-prev,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-next{width:2rem;height:2rem;color:var(--cps-color-calm);border:0 none;background:transparent;border-radius:50%;transition:background-color .2s,color .2s,box-shadow .2s}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-prev:enabled:hover,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-next:enabled:hover{color:var(--cps-color-calm);border-color:transparent;background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-prev:focus,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-next:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title{line-height:2rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-year,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month{color:var(--cps-color-text-darkest);transition:background-color .2s,color .2s,box-shadow .2s;font-weight:600;padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-year:enabled:hover,.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month:enabled:hover{color:var(--cps-color-calm)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month{margin-right:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table{font-size:1rem;margin:.5rem 0}.cps-datepicker-calendar ::ng-deep .p-datepicker table th{padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table th>span{width:2.5rem;height:2.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table td{padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span{width:2.5rem;height:2.5rem;border-radius:50%;transition:box-shadow .2s;border:1px solid transparent}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span.p-disabled{color:var(--cps-color-text-lightest);cursor:default}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker table td>span:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker table td.p-datepicker-today>span{border-color:var(--cps-color-calm);background:unset;color:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker table td.p-datepicker-today>span.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-buttonbar{padding:.5rem 0 0;border-top:1px solid #dee2e6}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-datepicker-buttonbar .p-button{width:auto;color:var(--cps-color-prepared)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker{border-top:1px solid #dee2e6;padding:.5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button{width:2rem;height:2rem;color:var(--cps-color-calm);border:0 none;background:transparent;border-radius:50%;transition:background-color .2s,color .2s,box-shadow .2s}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button:enabled:hover{color:var(--cps-color-calm);border-color:transparent;background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker button:last-child{margin-top:.2em}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker span{font-size:1.25rem}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-timepicker>div{padding:0 .5rem}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-timeonly .p-timepicker{border-top:0 none}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-monthpicker{margin:.5rem 0}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-monthpicker .p-monthpicker-month{padding:.5rem;transition:box-shadow .2s;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-monthpicker .p-monthpicker-month.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-yearpicker{margin:.5rem 0}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-yearpicker .p-yearpicker-year{padding:.5rem;transition:box-shadow .2s;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-datepicker .p-yearpicker .p-yearpicker-year.p-highlight{color:var(--cps-color-calm);background:var(--cps-color-highlight-selected);font-weight:700}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-multiple-month .p-datepicker-group{border-left:1px solid #dee2e6;padding-right:.5rem;padding-left:.5rem;padding-top:0;padding-bottom:0}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-multiple-month .p-datepicker-group:first-child{padding-left:0;border-left:0 none}.cps-datepicker-calendar ::ng-deep .p-datepicker.p-datepicker-multiple-month .p-datepicker-group:last-child{padding-right:0}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):hover{background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-monthpicker .p-monthpicker-month:not(.p-disabled):not(.p-highlight):hover{background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-monthpicker .p-monthpicker-month:not(.p-disabled):focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-yearpicker .p-yearpicker-year:not(.p-disabled):not(.p-highlight):hover{background:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-datepicker:not(.p-disabled) .p-yearpicker .p-yearpicker-year:not(.p-disabled):focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep p-calendar.p-calendar-clearable .p-inputtext{padding-right:2.5rem}.cps-datepicker-calendar ::ng-deep p-calendar.p-calendar-clearable .p-calendar-clear-icon{color:var(--cps-color-calm);right:.75rem}.cps-datepicker-calendar ::ng-deep p-calendar.p-calendar-clearable.p-calendar-w-btn .p-calendar-clear-icon{color:var(--cps-color-calm);right:3.75rem}.cps-datepicker-calendar ::ng-deep .p-datepicker table th,.cps-datepicker-calendar ::ng-deep .p-datepicker table td{padding:.125rem}.cps-datepicker-calendar ::ng-deep .p-datepicker-other-month{color:var(--cps-color-text-light)}.cps-datepicker-calendar ::ng-deep .p-link:focus{outline:0 none;outline-offset:0;box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:none;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:1rem;font-family:Source Sans Pro,sans-serif;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-button{font-family:Source Sans Pro,sans-serif;background-color:transparent;color:var(--cps-color-calm);border-color:transparent;margin:0;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;vertical-align:bottom;text-align:center;overflow:hidden;position:relative;padding:.75rem 1.25rem;font-size:1rem;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;border-radius:6px}.cps-datepicker-calendar ::ng-deep .p-button:focus{box-shadow:unset}.cps-datepicker-calendar ::ng-deep .p-button:hover{background-color:var(--cps-color-highlight-hover)}.cps-datepicker-calendar ::ng-deep .p-button:active{background-color:var(--cps-color-highlight-selected)}.cps-datepicker-calendar ::ng-deep .p-button .p-button-label{font-weight:700}.cps-datepicker-calendar ::ng-deep .p-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}\n"] }]
6748
- }], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
6749
- type: Self
6750
- }, {
6555
+ CpsButtonComponent,
6556
+ CpsMenuComponent,
6557
+ CpsIconComponent,
6558
+ CpsSelectComponent,
6559
+ TableColumnFilterConstraintComponent
6560
+ ], template: "<div class=\"cps-table-col-filter\">\n <cps-menu\n #columnFilterMenu\n [withArrow]=\"false\"\n hideTransitionOptions=\"0s linear\"\n [persistent]=\"persistent || (showApplyButton && isCategoryDropdownOpened)\"\n (menuShown)=\"onMenuShown()\"\n (menuHidden)=\"onMenuHidden()\"\n (beforeMenuHidden)=\"onBeforeMenuHidden()\">\n <div class=\"cps-table-col-filter-menu-content\">\n <div\n class=\"cps-table-col-filter-menu-content-header\"\n *ngIf=\"showCloseButton || headerTitle\">\n <span class=\"cps-table-col-filter-menu-content-header-title\">\n {{ headerTitle }}\n </span>\n <cps-icon\n *ngIf=\"showCloseButton\"\n icon=\"close-x\"\n (click)=\"onCloseClick()\"></cps-icon>\n </div>\n <div\n class=\"cps-table-col-filter-menu-content-operator\"\n *ngIf=\"isShowOperator\">\n <cps-select\n [hideDetails]=\"true\"\n [disabled]=\"!fieldConstraints || fieldConstraints.length < 2\"\n [returnObject]=\"false\"\n [options]=\"operatorOptions\"\n [ngModel]=\"operator\"\n (valueChanged)=\"onOperatorChange($event)\"></cps-select>\n </div>\n <div class=\"cps-table-col-filter-menu-content-constraints\">\n <div\n *ngFor=\"let fieldConstraint of fieldConstraints; let i = index\"\n class=\"cps-table-col-filter-menu-content-constraint\">\n <cps-select\n *ngIf=\"showMatchModes && currentMatchModes\"\n class=\"cps-table-col-filter-match-mode-select\"\n [hideDetails]=\"true\"\n [returnObject]=\"false\"\n [options]=\"currentMatchModes\"\n [ngModel]=\"fieldConstraint.matchMode\"\n (valueChanged)=\"\n onMenuMatchModeChange($event, fieldConstraint)\n \"></cps-select>\n <table-column-filter-constraint\n #constraintComponent\n [type]=\"type\"\n [field]=\"field\"\n [asButtonToggle]=\"asButtonToggle\"\n [singleSelection]=\"singleSelection\"\n [categoryOptions]=\"categoryOptions\"\n [filterConstraint]=\"fieldConstraint\"\n [hasApplyButton]=\"showApplyButton\"\n [placeholder]=\"placeholder\">\n </table-column-filter-constraint>\n <div\n class=\"cps-table-col-filter-remove-rule-btn\"\n *ngIf=\"showRemoveIcon\">\n <cps-button\n type=\"borderless\"\n width=\"100%\"\n size=\"small\"\n color=\"prepared\"\n icon=\"delete\"\n (clicked)=\"removeConstraint(fieldConstraint)\"\n label=\"Remove condition\">\n </cps-button>\n </div>\n </div>\n </div>\n <div\n class=\"cps-table-col-filter-add-rule-btn\"\n *ngIf=\"isShowAddConstraint\">\n <cps-button\n label=\"Add condition\"\n type=\"borderless\"\n width=\"100%\"\n size=\"small\"\n color=\"surprise\"\n icon=\"add\"\n (clicked)=\"addConstraint()\">\n </cps-button>\n </div>\n <div class=\"cps-table-col-filter-buttonbar\">\n <cps-button\n *ngIf=\"showClearButton\"\n (clicked)=\"clearFilter()\"\n type=\"borderless\"\n color=\"prepared\"\n size=\"small\"\n label=\"Clear\"></cps-button>\n <cps-button\n *ngIf=\"showApplyButton\"\n (clicked)=\"applyFilter()\"\n color=\"prepared\"\n size=\"small\"\n label=\"Apply\"></cps-button>\n </div>\n </div>\n </cps-menu>\n <cps-icon\n [icon]=\"isFilterApplied ? 'filter-funnel-filled' : 'filter-funnel'\"\n size=\"13\"\n (click)=\"columnFilterMenu.toggle($event)\"\n class=\"cps-table-col-filter-menu-button\"\n [ngClass]=\"{\n 'cps-table-col-filter-menu-button-active': isFilterApplied\n }\"\n >>\n </cps-icon>\n</div>\n", styles: [":host .cps-table-col-filter{display:inline-flex}:host .cps-table-col-filter .cps-table-col-filter-menu-button{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative;padding-left:8px;padding-right:4px}:host .cps-table-col-filter .cps-table-col-filter-menu-button:not(.cps-table-col-filter-menu-button-active):hover{color:var(--cps-color-text-dark)}:host .cps-table-col-filter .cps-table-col-filter-menu-button-active{color:var(--cps-color-calm-lighten1)}.cps-table-col-filter-menu-content{padding-bottom:12px;min-width:200px;max-height:500px;overflow:auto}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header{min-height:32px;padding:8px;border-bottom:1px solid var(--cps-color-line-mid);background:var(--cps-color-bg-light);display:flex;justify-content:space-between;align-items:center}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header-title{font-family:Source Sans Pro,sans-serif;color:var(--cps-color-text-darkest);max-width:390px;cursor:default}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header cps-icon{margin-left:8px;cursor:pointer}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header cps-icon:hover{color:var(--cps-color-calm)}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-operator{padding:12px;border-bottom:1px solid var(--cps-color-line-mid);background:var(--cps-color-bg-light)}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-menu-content-constraint{border-bottom:1px solid var(--cps-color-line-mid);padding:12px}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-menu-content-constraint .cps-table-col-filter-match-mode-select{margin-bottom:8px}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-menu-content-constraint:last-child{border-bottom:none}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-remove-rule-btn{padding-top:8px}.cps-table-col-filter-menu-content .cps-table-col-filter-add-rule-btn{padding:8px 12px}.cps-table-col-filter-menu-content .cps-table-col-filter-buttonbar{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 0}\n"] }]
6561
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$3.Table, decorators: [{
6751
6562
  type: Optional
6752
- }] }], propDecorators: { label: [{
6563
+ }] }, { type: i2$1.TreeTable, decorators: [{
6564
+ type: Optional
6565
+ }] }], propDecorators: { field: [{
6753
6566
  type: Input
6754
- }], disabled: [{
6567
+ }], type: [{
6755
6568
  type: Input
6756
- }], width: [{
6569
+ }], persistent: [{
6757
6570
  type: Input
6758
- }], placeholder: [{
6571
+ }], showClearButton: [{
6759
6572
  type: Input
6760
- }], hint: [{
6573
+ }], showApplyButton: [{
6761
6574
  type: Input
6762
- }], clearable: [{
6575
+ }], showCloseButton: [{
6763
6576
  type: Input
6764
- }], hideDetails: [{
6577
+ }], showMatchModes: [{
6765
6578
  type: Input
6766
- }], persistentClear: [{
6579
+ }], matchModes: [{
6767
6580
  type: Input
6768
- }], showTodayButton: [{
6581
+ }], showOperator: [{
6769
6582
  type: Input
6770
- }], openOnInputFocus: [{
6583
+ }], maxConstraints: [{
6771
6584
  type: Input
6772
- }], infoTooltip: [{
6585
+ }], headerTitle: [{
6773
6586
  type: Input
6774
- }], infoTooltipClass: [{
6587
+ }], hideOnClear: [{
6775
6588
  type: Input
6776
- }], infoTooltipMaxWidth: [{
6589
+ }], categoryOptions: [{
6777
6590
  type: Input
6778
- }], infoTooltipPersistent: [{
6591
+ }], asButtonToggle: [{
6779
6592
  type: Input
6780
- }], infoTooltipPosition: [{
6593
+ }], singleSelection: [{
6781
6594
  type: Input
6782
- }], appearance: [{
6595
+ }], placeholder: [{
6783
6596
  type: Input
6784
- }], minDate: [{
6597
+ }], constraintCompList: [{
6598
+ type: ViewChildren,
6599
+ args: ['constraintComponent']
6600
+ }], columnFilterMenu: [{
6601
+ type: ViewChild,
6602
+ args: ['columnFilterMenu']
6603
+ }], onClick: [{
6604
+ type: HostListener,
6605
+ args: ['click', ['$event']]
6606
+ }], onMouseOver: [{
6607
+ type: HostListener,
6608
+ args: ['mouseenter']
6609
+ }], onMouseLeave: [{
6610
+ type: HostListener,
6611
+ args: ['mouseleave']
6612
+ }] } });
6613
+
6614
+ /**
6615
+ * CpsTableColumnFilterDirective is a filtering directive used to filter single or multiple columns in table.
6616
+ * @group Directives
6617
+ */
6618
+ class CpsTableColumnFilterDirective {
6619
+ constructor(elementRef, viewContainerRef) {
6620
+ this.elementRef = elementRef;
6621
+ this.viewContainerRef = viewContainerRef;
6622
+ /**
6623
+ * Type of a filter in table, it can be of type "number", "boolean", "text", "date" or "category".
6624
+ * @group Props
6625
+ */
6626
+ this.filterType = 'text';
6627
+ /**
6628
+ * Determines whether the filter menu should be persistent.
6629
+ * @group Props
6630
+ */
6631
+ this.filterPersistent = false;
6632
+ /**
6633
+ * Determines whether the filter should have clear button.
6634
+ * @group Props
6635
+ */
6636
+ this.filterShowClearButton = true;
6637
+ /**
6638
+ * Determines whether the filter should have apply button.
6639
+ * @group Props
6640
+ */
6641
+ this.filterShowApplyButton = true;
6642
+ /**
6643
+ * Determines whether the filter should have close button.
6644
+ * @group Props
6645
+ */
6646
+ this.filterShowCloseButton = false;
6647
+ /**
6648
+ * Determines whether the filter should have match modes.
6649
+ * @group Props
6650
+ */
6651
+ this.filterShowMatchModes = true;
6652
+ /**
6653
+ * Match modes for filter.
6654
+ * @group Props
6655
+ */
6656
+ this.filterMatchModes = [];
6657
+ /**
6658
+ * Determines whether the filter should have operator.
6659
+ * @group Props
6660
+ */
6661
+ this.filterShowOperator = true;
6662
+ /**
6663
+ * Maximum number of constraints.
6664
+ * @group Props
6665
+ */
6666
+ this.filterMaxConstraints = 2;
6667
+ /**
6668
+ * Title of the filter.
6669
+ * @group Props
6670
+ */
6671
+ this.filterHeaderTitle = '';
6672
+ /**
6673
+ * Determines whether the filter should hide on clear.
6674
+ * @group Props
6675
+ */
6676
+ this.filterHideOnClear = false;
6677
+ /**
6678
+ * Options for category filter.
6679
+ * @group Props
6680
+ */
6681
+ this.filterCategoryOptions = [];
6682
+ /**
6683
+ * Determines whether to show category filter as button toggles.
6684
+ * @group Props
6685
+ */
6686
+ this.filterAsButtonToggle = false;
6687
+ /**
6688
+ * Single selection for category filter.
6689
+ * @group Props
6690
+ */
6691
+ this.filterSingleSelection = false;
6692
+ /**
6693
+ * Placeholder for filter constraints.
6694
+ * @group Props
6695
+ */
6696
+ this.filterPlaceholder = '';
6697
+ this.filterCompRef = this.viewContainerRef.createComponent(TableColumnFilterComponent);
6698
+ }
6699
+ ngOnInit() {
6700
+ this.elementRef.nativeElement.firstChild.after(this.filterCompRef.location.nativeElement);
6701
+ }
6702
+ ngOnChanges() {
6703
+ this.filterCompRef.setInput('field', this.field);
6704
+ this.filterCompRef.setInput('type', this.filterType);
6705
+ this.filterCompRef.setInput('persistent', this.filterPersistent);
6706
+ this.filterCompRef.setInput('showClearButton', this.filterShowClearButton);
6707
+ this.filterCompRef.setInput('showApplyButton', this.filterShowApplyButton);
6708
+ this.filterCompRef.setInput('showCloseButton', this.filterShowCloseButton);
6709
+ this.filterCompRef.setInput('showMatchModes', this.filterShowMatchModes);
6710
+ this.filterCompRef.setInput('matchModes', this.filterMatchModes);
6711
+ this.filterCompRef.setInput('showOperator', this.filterShowOperator);
6712
+ this.filterCompRef.setInput('maxConstraints', this.filterMaxConstraints);
6713
+ this.filterCompRef.setInput('headerTitle', this.filterHeaderTitle);
6714
+ this.filterCompRef.setInput('hideOnClear', this.filterHideOnClear);
6715
+ this.filterCompRef.setInput('categoryOptions', this.filterCategoryOptions);
6716
+ this.filterCompRef.setInput('asButtonToggle', this.filterAsButtonToggle);
6717
+ this.filterCompRef.setInput('singleSelection', this.filterSingleSelection);
6718
+ this.filterCompRef.setInput('placeholder', this.filterPlaceholder || this._getDefaultPlaceholder());
6719
+ }
6720
+ _getDefaultPlaceholder() {
6721
+ switch (this.filterType) {
6722
+ case 'text':
6723
+ return 'Please enter';
6724
+ case 'number':
6725
+ return 'Enter value';
6726
+ case 'date':
6727
+ return 'Select date';
6728
+ case 'category':
6729
+ return 'Please select';
6730
+ default:
6731
+ return '';
6732
+ }
6733
+ }
6734
+ hideFilter() {
6735
+ this.filterCompRef?.instance?.hide();
6736
+ }
6737
+ clearFilter() {
6738
+ this.filterCompRef?.instance?.clearFilter();
6739
+ }
6740
+ clearFilterValues() {
6741
+ this.filterCompRef?.instance?.clearFilterValues();
6742
+ }
6743
+ ngOnDestroy() {
6744
+ this.filterCompRef.destroy();
6745
+ this.viewContainerRef.clear();
6746
+ }
6747
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsTableColumnFilterDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
6748
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.0", type: CpsTableColumnFilterDirective, isStandalone: true, selector: "[cpsTColFilter]", inputs: { field: ["cpsTColFilter", "field"], filterType: "filterType", filterPersistent: "filterPersistent", filterShowClearButton: "filterShowClearButton", filterShowApplyButton: "filterShowApplyButton", filterShowCloseButton: "filterShowCloseButton", filterShowMatchModes: "filterShowMatchModes", filterMatchModes: "filterMatchModes", filterShowOperator: "filterShowOperator", filterMaxConstraints: "filterMaxConstraints", filterHeaderTitle: "filterHeaderTitle", filterHideOnClear: "filterHideOnClear", filterCategoryOptions: "filterCategoryOptions", filterAsButtonToggle: "filterAsButtonToggle", filterSingleSelection: "filterSingleSelection", filterPlaceholder: "filterPlaceholder" }, exportAs: ["cpsTColFilter"], usesOnChanges: true, ngImport: i0 }); }
6749
+ }
6750
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsTableColumnFilterDirective, decorators: [{
6751
+ type: Directive,
6752
+ args: [{
6753
+ standalone: true,
6754
+ selector: '[cpsTColFilter]',
6755
+ exportAs: 'cpsTColFilter'
6756
+ }]
6757
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }], propDecorators: { field: [{
6758
+ type: Input,
6759
+ args: ['cpsTColFilter']
6760
+ }], filterType: [{
6785
6761
  type: Input
6786
- }], maxDate: [{
6762
+ }], filterPersistent: [{
6787
6763
  type: Input
6788
- }], value: [{
6764
+ }], filterShowClearButton: [{
6765
+ type: Input
6766
+ }], filterShowApplyButton: [{
6767
+ type: Input
6768
+ }], filterShowCloseButton: [{
6769
+ type: Input
6770
+ }], filterShowMatchModes: [{
6771
+ type: Input
6772
+ }], filterMatchModes: [{
6773
+ type: Input
6774
+ }], filterShowOperator: [{
6775
+ type: Input
6776
+ }], filterMaxConstraints: [{
6777
+ type: Input
6778
+ }], filterHeaderTitle: [{
6779
+ type: Input
6780
+ }], filterHideOnClear: [{
6781
+ type: Input
6782
+ }], filterCategoryOptions: [{
6783
+ type: Input
6784
+ }], filterAsButtonToggle: [{
6785
+ type: Input
6786
+ }], filterSingleSelection: [{
6787
+ type: Input
6788
+ }], filterPlaceholder: [{
6789
6789
  type: Input
6790
- }], valueChanged: [{
6791
- type: Output
6792
- }], datepickerInput: [{
6793
- type: ViewChild,
6794
- args: ['datepickerInput']
6795
- }], calendarMenu: [{
6796
- type: ViewChild,
6797
- args: ['calendarMenu']
6798
6790
  }] } });
6799
6791
 
6792
+ class CpsDetectFilterTypePipe {
6793
+ transform(data, column) {
6794
+ if (data.every((item) => typeof item[column] === 'boolean')) {
6795
+ return 'boolean';
6796
+ }
6797
+ else if (data.every((item) => typeof item[column] === 'number')) {
6798
+ return 'number';
6799
+ }
6800
+ else if (data.every((item) => item[column] instanceof Date)) {
6801
+ return 'date';
6802
+ }
6803
+ else if (data.reduce((acc, item) => acc.add(item[column]), new Set()).size < 6) {
6804
+ return 'category';
6805
+ }
6806
+ return 'text';
6807
+ }
6808
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsDetectFilterTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
6809
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.0", ngImport: i0, type: CpsDetectFilterTypePipe, isStandalone: true, name: "cpsDetectFilterType" }); }
6810
+ }
6811
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsDetectFilterTypePipe, decorators: [{
6812
+ type: Pipe,
6813
+ args: [{
6814
+ name: 'cpsDetectFilterType',
6815
+ standalone: true
6816
+ }]
6817
+ }] });
6818
+
6819
+ // import jsPDF from 'jspdf';
6820
+ // import 'jspdf-autotable';
6821
+ function tableFactory(tableComponent) {
6822
+ return tableComponent.primengTable;
6823
+ }
6800
6824
  /**
6801
- * CpsButtonToggleComponent is used to select values using buttons.
6825
+ * CpsTableComponent displays data in tabular format.
6802
6826
  * @group Components
6803
6827
  */
6804
- class CpsButtonToggleComponent {
6805
- set value(value) {
6806
- this._value = value;
6807
- this.onChange(value);
6828
+ class CpsTableComponent {
6829
+ /**
6830
+ * An array of objects to display.
6831
+ * @default []
6832
+ * @group Props
6833
+ */
6834
+ set data(value) {
6835
+ this._data = [...value];
6808
6836
  }
6809
- get value() {
6810
- return this._value;
6837
+ get data() {
6838
+ return this._data;
6811
6839
  }
6812
- constructor(_control, document, renderer) {
6813
- this._control = _control;
6840
+ // eslint-disable-next-line no-useless-constructor
6841
+ constructor(cdRef, document) {
6842
+ this.cdRef = cdRef;
6814
6843
  this.document = document;
6815
- this.renderer = renderer;
6816
6844
  /**
6817
- * Label of the toggle buttons.
6845
+ * An array of objects to represent dynamic columns.
6818
6846
  * @group Props
6819
6847
  */
6820
- this.label = '';
6848
+ this.columns = [];
6821
6849
  /**
6822
- * An array of options.
6850
+ * A key used to retrieve the header from columns.
6823
6851
  * @group Props
6824
6852
  */
6825
- this.options = [];
6853
+ this.colHeaderName = 'header';
6826
6854
  /**
6827
- * Specifies if multiple values can be selected.
6855
+ * A key used to retrieve the field from columns.
6828
6856
  * @group Props
6829
6857
  */
6830
- this.multiple = false;
6858
+ this.colFieldName = 'field';
6831
6859
  /**
6832
- * Specifies that the component should be disabled.
6860
+ * A key used to retrieve the filter type from columns.
6833
6861
  * @group Props
6834
6862
  */
6835
- this.disabled = false;
6863
+ this.colFilterTypeName = 'filterType';
6836
6864
  /**
6837
- * Determines whether at least one of the options is mandatory.
6865
+ * A key used to retrieve the date format from columns.
6838
6866
  * @group Props
6839
6867
  */
6840
- this.mandatory = true;
6868
+ this.colDateFormatName = 'dateFormat';
6841
6869
  /**
6842
- * Determines whether all buttons should have equal widths.
6870
+ * Determines whether the table should have alternating stripes.
6843
6871
  * @group Props
6844
6872
  */
6845
- this.equalWidths = true;
6873
+ this.striped = true;
6846
6874
  /**
6847
- * Position of the option tooltip, can be 'top', 'bottom', 'left' or 'right'.
6875
+ * Determines whether the table should have borders.
6848
6876
  * @group Props
6849
6877
  */
6850
- this.optionTooltipPosition = 'bottom';
6878
+ this.bordered = true;
6851
6879
  /**
6852
- * When it is not an empty string, an info icon is displayed to show text for more info.
6880
+ * Size of table cells, it can be "small", "normal" or "large".
6853
6881
  * @group Props
6854
6882
  */
6855
- this.infoTooltip = '';
6883
+ this.size = 'normal';
6856
6884
  /**
6857
- * Info tooltip class for styling.
6885
+ * Determines whether the table should have row selection.
6858
6886
  * @group Props
6859
6887
  */
6860
- this.infoTooltipClass = 'cps-tooltip-content';
6888
+ this.selectable = false;
6861
6889
  /**
6862
- * Size of infoTooltip, of type number denoting pixels or string.
6890
+ * Determines whether the table should have rows highlighting on hover.
6863
6891
  * @group Props
6864
6892
  */
6865
- this.infoTooltipMaxWidth = '100%';
6893
+ this.rowHover = true;
6866
6894
  /**
6867
- * Determines whether the infoTooltip is persistent.
6895
+ * Field, that uniquely identifies a record in data (needed for expandable rows).
6868
6896
  * @group Props
6869
6897
  */
6870
- this.infoTooltipPersistent = false;
6898
+ this.dataKey = '';
6871
6899
  /**
6872
- * Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
6900
+ * Determines whether the table should show row menus.
6873
6901
  * @group Props
6874
6902
  */
6875
- this.infoTooltipPosition = 'top';
6903
+ this.showRowMenu = false;
6876
6904
  /**
6877
- * Value of the component.
6905
+ * Determines whether the 'Remove' button should be displayed in the row menu.
6906
+ * Note: This setting only takes effect if 'showRowMenu' is true.
6878
6907
  * @group Props
6879
6908
  */
6880
- this._value = undefined;
6909
+ this.showRowRemoveButton = true;
6881
6910
  /**
6882
- * Callback to invoke on value change.
6883
- * @param {any} any - value changed.
6884
- * @group Emits
6911
+ * Determines whether the 'Edit' button should be displayed in the row menu.
6912
+ * Note: This setting only takes effect if 'showRowMenu' is true.
6913
+ * @group Props
6885
6914
  */
6886
- this.valueChanged = new EventEmitter();
6887
- this.largestButtonWidth = 0;
6888
- // eslint-disable-next-line @typescript-eslint/no-empty-function
6889
- this.onChange = (event) => { };
6890
- // eslint-disable-next-line @typescript-eslint/no-empty-function
6891
- this.onTouched = () => { };
6892
- if (this._control) {
6893
- this._control.valueAccessor = this;
6894
- }
6895
- }
6896
- ngOnInit() {
6897
- if (this.multiple && !this._value) {
6898
- this._value = [];
6899
- }
6900
- this._setEqualWidths();
6901
- }
6902
- registerOnChange(fn) {
6903
- this.onChange = fn;
6904
- }
6905
- registerOnTouched(fn) {
6906
- this.onTouched = fn;
6907
- }
6908
- writeValue(value) {
6909
- this.value = value;
6910
- }
6911
- updateValueEvent(event, val) {
6912
- if (this.disabled)
6913
- return;
6914
- const check = event?.target?.checked || false;
6915
- if (this.mandatory && this.multiple && !check && this.value.length < 2) {
6916
- event.target.checked = true;
6917
- return;
6918
- }
6919
- if (this.multiple) {
6920
- let res = [];
6921
- if (!check) {
6922
- res = this.value.filter((v) => !isEqual(v, val));
6923
- }
6924
- else {
6925
- this.options.forEach((o) => {
6926
- if (this.value.some((v) => isEqual(v, o.value)) ||
6927
- isEqual(val, o.value)) {
6928
- res.push(o.value);
6929
- }
6930
- });
6931
- }
6932
- this._updateValue(res);
6933
- }
6934
- else {
6935
- if (this.mandatory) {
6936
- this._updateValue(val); // radio
6937
- }
6938
- else {
6939
- this._updateValue(check ? val : undefined);
6940
- }
6941
- }
6942
- }
6943
- _updateValue(value) {
6944
- this.writeValue(value);
6945
- this.onChange(value);
6946
- this.valueChanged.emit(value);
6947
- }
6948
- _setEqualWidths() {
6949
- if (!this.equalWidths)
6950
- return;
6951
- const hiddenSpan = this.renderer.createElement('span');
6952
- this.renderer.setStyle(hiddenSpan, 'visibility', 'hidden');
6953
- this.renderer.setStyle(hiddenSpan, 'position', 'absolute');
6954
- this.renderer.setStyle(hiddenSpan, 'left', '-9999px');
6955
- this.renderer.setStyle(hiddenSpan, 'font-size', '16px');
6956
- this.renderer.setStyle(hiddenSpan, 'letter-spacing', '0.05em');
6957
- this.renderer.setStyle(hiddenSpan, 'font-family', '"Source Sans Pro", sans-serif');
6958
- this.renderer.appendChild(this.document.body, hiddenSpan);
6959
- this.largestButtonWidth = 0;
6960
- this.options.forEach((opt) => {
6961
- const text = this.renderer.createText(opt.label || '');
6962
- this.renderer.appendChild(hiddenSpan, text);
6963
- let width = hiddenSpan.offsetWidth || 0;
6964
- width += 26;
6965
- if (opt.icon) {
6966
- width += 16;
6967
- if (opt.label)
6968
- width += 8;
6969
- }
6970
- if (width > this.largestButtonWidth) {
6971
- this.largestButtonWidth = width;
6972
- }
6973
- this.renderer.removeChild(hiddenSpan, text);
6974
- });
6975
- this.renderer.removeChild(this.document.body, hiddenSpan);
6976
- }
6977
- // eslint-disable-next-line @typescript-eslint/no-empty-function
6978
- setDisabledState(disabled) { }
6979
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsButtonToggleComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: DOCUMENT }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
6980
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: CpsButtonToggleComponent, isStandalone: true, selector: "cps-button-toggle", inputs: { label: "label", options: "options", multiple: "multiple", disabled: "disabled", mandatory: "mandatory", equalWidths: "equalWidths", optionTooltipPosition: "optionTooltipPosition", infoTooltip: "infoTooltip", infoTooltipClass: "infoTooltipClass", infoTooltipMaxWidth: "infoTooltipMaxWidth", infoTooltipPersistent: "infoTooltipPersistent", infoTooltipPosition: "infoTooltipPosition", _value: ["value", "_value"] }, outputs: { valueChanged: "valueChanged" }, providers: [CheckOptionSelectedPipe], ngImport: i0, template: "<div class=\"cps-btn-toggle\">\n <div class=\"cps-btn-toggle-label\" *ngIf=\"label\">\n <span>{{ label }}</span>\n <cps-info-circle\n *ngIf=\"infoTooltip\"\n class=\"cps-btn-toggle-label-info-circle\"\n size=\"xsmall\"\n [tooltipPosition]=\"infoTooltipPosition\"\n [tooltipContentClass]=\"infoTooltipClass\"\n [tooltipMaxWidth]=\"infoTooltipMaxWidth\"\n [tooltipPersistent]=\"infoTooltipPersistent\"\n [tooltipText]=\"infoTooltip\">\n </cps-info-circle>\n </div>\n <div class=\"cps-btn-toggle-content\">\n <ng-container *ngFor=\"let option of options\">\n <ng-container\n *ngTemplateOutlet=\"\n optionContainerTemplate;\n context: {\n option: option,\n tooltip: option.tooltip\n }\n \"></ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #optionContainerTemplate let-option=\"option\" let-tooltip=\"tooltip\">\n <label\n class=\"cps-btn-toggle-content-option\"\n *ngIf=\"tooltip\"\n [cpsTooltip]=\"option.tooltip\"\n tooltipCloseDelay=\"0\"\n [tooltipPosition]=\"optionTooltipPosition\">\n <ng-container\n *ngTemplateOutlet=\"\n optionRadioTemplate;\n context: {\n option: option\n }\n \"></ng-container>\n </label>\n <label class=\"cps-btn-toggle-content-option\" *ngIf=\"!tooltip\">\n <ng-container\n *ngTemplateOutlet=\"\n optionRadioTemplate;\n context: {\n option: option\n }\n \"></ng-container>\n </label>\n</ng-template>\n\n<ng-template #optionRadioTemplate let-option=\"option\">\n <input\n class=\"cps-btn-toggle-content-option-input\"\n [type]=\"!multiple && mandatory ? 'radio' : 'checkbox'\"\n [disabled]=\"option.disabled || disabled\"\n [value]=\"option.value\"\n [checked]=\"\n option.value | checkOptionSelected : value : multiple : true : ''\n \"\n (change)=\"updateValueEvent($event, option.value)\" />\n <span\n class=\"cps-btn-toggle-content-option-content\"\n [ngStyle]=\"{\n 'min-width': largestButtonWidth ? largestButtonWidth + 'px' : 'none'\n }\">\n <cps-icon\n *ngIf=\"option.icon\"\n [ngClass]=\"{ 'me-2': !!option.label }\"\n [icon]=\"option.icon\">\n </cps-icon>\n <span *ngIf=\"option.label\">{{ option.label }}</span>\n </span>\n</ng-template>\n", styles: [":host .cps-btn-toggle-label{color:var(--cps-color-text-dark);margin-bottom:.5rem;align-items:center;display:inline-flex;font-weight:700;font-size:16px;font-family:Source Sans Pro,sans-serif;cursor:default}:host .cps-btn-toggle-label .cps-btn-toggle-label-info-circle{margin-left:8px}:host .cps-btn-toggle-label .cps-btn-toggle-label-info-circle ::ng-deep cps-icon i{width:14px;height:14px}:host .cps-btn-toggle-content{display:flex}:host .cps-btn-toggle-content-option-input{clip:rect(0 0 0 0);clip-path:inset(100%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host .cps-btn-toggle-content-option-input:checked+.cps-btn-toggle-content-option-content{background-color:var(--cps-color-calm);z-index:1;color:#fff}:host .cps-btn-toggle-content-option-input:checked+.cps-btn-toggle-content-option-content:hover{background-image:linear-gradient(#ffffff1a 0 0)}:host .cps-btn-toggle-content-option-input:disabled+.cps-btn-toggle-content-option-content{pointer-events:none;background-color:#f7f7f7;color:var(--cps-color-text-light)}:host .cps-btn-toggle-content-option-input:disabled:checked+.cps-btn-toggle-content-option-content{background-color:var(--cps-color-line-mid);color:var(--cps-color-text-mild)}:host .cps-btn-toggle-content-option-content{height:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;background-color:#fff;padding:.375em .75em;position:relative;border:.0625em solid var(--cps-color-text-lightest);border-right:0;font-weight:400;font-size:16px;font-family:Source Sans Pro,sans-serif;letter-spacing:.05em;color:var(--cps-color-text-dark);text-align:center;transition:background-color .2s ease;-webkit-user-select:none;-ms-user-select:none;user-select:none}:host .cps-btn-toggle-content-option-content:hover{background:var(--cps-color-highlight-hover)}:host .cps-btn-toggle-content-option-content:active{background:var(--cps-color-highlight-active)}:host .cps-btn-toggle-content-option:first-child .cps-btn-toggle-content-option-content{border-radius:4px 0 0 4px}:host .cps-btn-toggle-content-option:last-child .cps-btn-toggle-content-option-content{border-radius:0 4px 4px 0;border-right:.0625em solid var(--cps-color-text-lightest)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: CheckOptionSelectedPipe, name: "checkOptionSelected" }, { kind: "component", type: CpsInfoCircleComponent, selector: "cps-info-circle", inputs: ["size", "tooltipText", "tooltipPosition", "tooltipContentClass", "tooltipMaxWidth", "tooltipPersistent"] }, { kind: "component", type: CpsIconComponent, selector: "cps-icon", inputs: ["icon", "size", "color"] }, { kind: "directive", type: CpsTooltipDirective, selector: "[cpsTooltip]", inputs: ["cpsTooltip", "tooltipOpenDelay", "tooltipCloseDelay", "tooltipOpenOn", "tooltipPosition", "tooltipPersistent", "tooltipDisabled", "tooltipMaxWidth", "tooltipContentClass"] }] }); }
6981
- }
6982
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsButtonToggleComponent, decorators: [{
6983
- type: Component,
6984
- args: [{ standalone: true, imports: [
6985
- CommonModule,
6986
- CheckOptionSelectedPipe,
6987
- CpsInfoCircleComponent,
6988
- CpsIconComponent,
6989
- CpsTooltipDirective
6990
- ], providers: [CheckOptionSelectedPipe], selector: 'cps-button-toggle', template: "<div class=\"cps-btn-toggle\">\n <div class=\"cps-btn-toggle-label\" *ngIf=\"label\">\n <span>{{ label }}</span>\n <cps-info-circle\n *ngIf=\"infoTooltip\"\n class=\"cps-btn-toggle-label-info-circle\"\n size=\"xsmall\"\n [tooltipPosition]=\"infoTooltipPosition\"\n [tooltipContentClass]=\"infoTooltipClass\"\n [tooltipMaxWidth]=\"infoTooltipMaxWidth\"\n [tooltipPersistent]=\"infoTooltipPersistent\"\n [tooltipText]=\"infoTooltip\">\n </cps-info-circle>\n </div>\n <div class=\"cps-btn-toggle-content\">\n <ng-container *ngFor=\"let option of options\">\n <ng-container\n *ngTemplateOutlet=\"\n optionContainerTemplate;\n context: {\n option: option,\n tooltip: option.tooltip\n }\n \"></ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #optionContainerTemplate let-option=\"option\" let-tooltip=\"tooltip\">\n <label\n class=\"cps-btn-toggle-content-option\"\n *ngIf=\"tooltip\"\n [cpsTooltip]=\"option.tooltip\"\n tooltipCloseDelay=\"0\"\n [tooltipPosition]=\"optionTooltipPosition\">\n <ng-container\n *ngTemplateOutlet=\"\n optionRadioTemplate;\n context: {\n option: option\n }\n \"></ng-container>\n </label>\n <label class=\"cps-btn-toggle-content-option\" *ngIf=\"!tooltip\">\n <ng-container\n *ngTemplateOutlet=\"\n optionRadioTemplate;\n context: {\n option: option\n }\n \"></ng-container>\n </label>\n</ng-template>\n\n<ng-template #optionRadioTemplate let-option=\"option\">\n <input\n class=\"cps-btn-toggle-content-option-input\"\n [type]=\"!multiple && mandatory ? 'radio' : 'checkbox'\"\n [disabled]=\"option.disabled || disabled\"\n [value]=\"option.value\"\n [checked]=\"\n option.value | checkOptionSelected : value : multiple : true : ''\n \"\n (change)=\"updateValueEvent($event, option.value)\" />\n <span\n class=\"cps-btn-toggle-content-option-content\"\n [ngStyle]=\"{\n 'min-width': largestButtonWidth ? largestButtonWidth + 'px' : 'none'\n }\">\n <cps-icon\n *ngIf=\"option.icon\"\n [ngClass]=\"{ 'me-2': !!option.label }\"\n [icon]=\"option.icon\">\n </cps-icon>\n <span *ngIf=\"option.label\">{{ option.label }}</span>\n </span>\n</ng-template>\n", styles: [":host .cps-btn-toggle-label{color:var(--cps-color-text-dark);margin-bottom:.5rem;align-items:center;display:inline-flex;font-weight:700;font-size:16px;font-family:Source Sans Pro,sans-serif;cursor:default}:host .cps-btn-toggle-label .cps-btn-toggle-label-info-circle{margin-left:8px}:host .cps-btn-toggle-label .cps-btn-toggle-label-info-circle ::ng-deep cps-icon i{width:14px;height:14px}:host .cps-btn-toggle-content{display:flex}:host .cps-btn-toggle-content-option-input{clip:rect(0 0 0 0);clip-path:inset(100%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host .cps-btn-toggle-content-option-input:checked+.cps-btn-toggle-content-option-content{background-color:var(--cps-color-calm);z-index:1;color:#fff}:host .cps-btn-toggle-content-option-input:checked+.cps-btn-toggle-content-option-content:hover{background-image:linear-gradient(#ffffff1a 0 0)}:host .cps-btn-toggle-content-option-input:disabled+.cps-btn-toggle-content-option-content{pointer-events:none;background-color:#f7f7f7;color:var(--cps-color-text-light)}:host .cps-btn-toggle-content-option-input:disabled:checked+.cps-btn-toggle-content-option-content{background-color:var(--cps-color-line-mid);color:var(--cps-color-text-mild)}:host .cps-btn-toggle-content-option-content{height:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;background-color:#fff;padding:.375em .75em;position:relative;border:.0625em solid var(--cps-color-text-lightest);border-right:0;font-weight:400;font-size:16px;font-family:Source Sans Pro,sans-serif;letter-spacing:.05em;color:var(--cps-color-text-dark);text-align:center;transition:background-color .2s ease;-webkit-user-select:none;-ms-user-select:none;user-select:none}:host .cps-btn-toggle-content-option-content:hover{background:var(--cps-color-highlight-hover)}:host .cps-btn-toggle-content-option-content:active{background:var(--cps-color-highlight-active)}:host .cps-btn-toggle-content-option:first-child .cps-btn-toggle-content-option-content{border-radius:4px 0 0 4px}:host .cps-btn-toggle-content-option:last-child .cps-btn-toggle-content-option-content{border-radius:0 4px 4px 0;border-right:.0625em solid var(--cps-color-text-lightest)}\n"] }]
6991
- }], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
6992
- type: Self
6993
- }, {
6994
- type: Optional
6995
- }] }, { type: Document, decorators: [{
6996
- type: Inject,
6997
- args: [DOCUMENT]
6998
- }] }, { type: i0.Renderer2 }], propDecorators: { label: [{
6999
- type: Input
7000
- }], options: [{
7001
- type: Input
7002
- }], multiple: [{
7003
- type: Input
7004
- }], disabled: [{
7005
- type: Input
7006
- }], mandatory: [{
7007
- type: Input
7008
- }], equalWidths: [{
7009
- type: Input
7010
- }], optionTooltipPosition: [{
7011
- type: Input
7012
- }], infoTooltip: [{
7013
- type: Input
7014
- }], infoTooltipClass: [{
7015
- type: Input
7016
- }], infoTooltipMaxWidth: [{
7017
- type: Input
7018
- }], infoTooltipPersistent: [{
7019
- type: Input
7020
- }], infoTooltipPosition: [{
7021
- type: Input
7022
- }], _value: [{
7023
- type: Input,
7024
- args: ['value']
7025
- }], valueChanged: [{
7026
- type: Output
7027
- }] } });
7028
-
7029
- /**
7030
- * TableColumnFilterConstraintComponent is an internal filtering constraint component in table and treetable.
7031
- */
7032
- class TableColumnFilterConstraintComponent {
7033
- get isCategoryDropdownOpened() {
7034
- return this.categoryAutocompleteComponent?.isOpened || false;
7035
- }
7036
- constructor(dt, tt) {
7037
- this.dt = dt;
7038
- this.tt = tt;
6915
+ this.showRowEditButton = true;
7039
6916
  /**
7040
- * Type of filter constraint.
6917
+ * Determines whether the table should have re-orderable rows.
7041
6918
  * @group Props
7042
6919
  */
7043
- this.type = 'text';
6920
+ this.reorderableRows = false;
7044
6921
  /**
7045
- * An array of category options.
6922
+ * When enabled, a loader component is displayed.
7046
6923
  * @group Props
7047
6924
  */
7048
- this.categoryOptions = [];
6925
+ this.loading = false;
7049
6926
  /**
7050
- * Determines whether to show category filter as button toggles.
6927
+ * Inline style of the table.
7051
6928
  * @group Props
7052
6929
  */
7053
- this.asButtonToggle = false;
6930
+ this.tableStyle = undefined;
7054
6931
  /**
7055
- * Single selection for category filter.
6932
+ * Style class of the table.
7056
6933
  * @group Props
7057
6934
  */
7058
- this.singleSelection = false;
6935
+ this.tableStyleClass = '';
7059
6936
  /**
7060
- * Placeholder for input field.
6937
+ * Makes all columns sortable if columns prop is provided.
7061
6938
  * @group Props
7062
6939
  */
7063
- this.placeholder = '';
6940
+ this.sortable = false;
7064
6941
  /**
7065
- * Determines whether the filter should have an apply button.
6942
+ * Enable filtering on all columns.
7066
6943
  * @group Props
7067
6944
  */
7068
- this.hasApplyButton = true;
7069
- this.booleanOptions = [
7070
- { label: 'True', value: 'true' },
7071
- { label: 'False', value: 'false' }
7072
- ];
7073
- this.categories = [];
7074
- this._tableInstance = dt || tt;
7075
- }
7076
- ngOnChanges() {
7077
- this._updateCategories();
7078
- }
7079
- _updateCategories() {
7080
- if (this.type !== 'category')
7081
- return;
7082
- if (this.categoryOptions.length > 0) {
7083
- if (typeof this.categoryOptions[0] === 'string') {
7084
- this.categories = this.categoryOptions.map((o) => ({
7085
- label: o,
7086
- value: o
7087
- }));
7088
- }
7089
- else {
7090
- this.categories = this
7091
- .categoryOptions;
7092
- }
7093
- }
7094
- else {
7095
- let cats = [];
7096
- if (this._tableInstance instanceof Table) {
7097
- cats =
7098
- this._tableInstance.value?.map((v) => v[this.field]) || [];
7099
- }
7100
- else {
7101
- const fillCats = (nodes) => {
7102
- nodes?.forEach((v) => {
7103
- cats.push(v.data[this.field]);
7104
- fillCats(v.children);
7105
- });
7106
- };
7107
- fillCats(this._tableInstance.value);
7108
- }
7109
- this.categories =
7110
- Array.from(new Set(cats))?.map((c) => ({
7111
- label: c,
7112
- value: c
7113
- })) || [];
7114
- }
7115
- }
7116
- onValueChange(value) {
7117
- this.filterConstraint.value = value;
7118
- if (this._tableInstance.isFilterBlank(value) || !this.hasApplyButton) {
7119
- this._tableInstance._filter();
7120
- }
7121
- }
7122
- onEnterKeyDown(event) {
7123
- this._tableInstance._filter();
7124
- event.preventDefault();
7125
- }
7126
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TableColumnFilterConstraintComponent, deps: [{ token: i1$3.Table, optional: true }, { token: i2$1.TreeTable, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
7127
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: TableColumnFilterConstraintComponent, isStandalone: true, selector: "table-column-filter-constraint", inputs: { type: "type", field: "field", filterConstraint: "filterConstraint", categoryOptions: "categoryOptions", asButtonToggle: "asButtonToggle", singleSelection: "singleSelection", placeholder: "placeholder", hasApplyButton: "hasApplyButton" }, viewQueries: [{ propertyName: "categoryAutocompleteComponent", first: true, predicate: ["categoryAutocompleteComponent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"type\">\n <cps-input\n *ngSwitchCase=\"'text'\"\n [placeholder]=\"placeholder\"\n [hideDetails]=\"true\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n type=\"text\"></cps-input>\n\n <cps-input\n *ngSwitchCase=\"'number'\"\n [hideDetails]=\"true\"\n [placeholder]=\"placeholder\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n type=\"number\"></cps-input>\n\n <div\n class=\"cps-table-col-filter-constraint-btn-toggles\"\n *ngSwitchCase=\"'boolean'\">\n <cps-button-toggle\n [options]=\"booleanOptions\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n [mandatory]=\"false\">\n </cps-button-toggle>\n </div>\n\n <cps-datepicker\n *ngSwitchCase=\"'date'\"\n [openOnInputFocus]=\"true\"\n [hideDetails]=\"true\"\n [placeholder]=\"placeholder\"\n [value]=\"filterConstraint?.value\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n (valueChanged)=\"onValueChange($event)\">\n </cps-datepicker>\n\n <ng-container *ngSwitchCase=\"'category'\">\n <cps-autocomplete\n #categoryAutocompleteComponent\n *ngIf=\"!asButtonToggle\"\n class=\"cps-table-col-filter-category-autocomplete\"\n [placeholder]=\"placeholder\"\n [options]=\"categories\"\n [hideDetails]=\"true\"\n [clearable]=\"true\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n [returnObject]=\"false\"\n [multiple]=\"!singleSelection\">\n </cps-autocomplete>\n <div class=\"cps-table-col-filter-constraint-btn-toggles\">\n <cps-button-toggle\n *ngIf=\"asButtonToggle\"\n [options]=\"categories\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n [mandatory]=\"false\"\n [multiple]=\"!singleSelection\">\n </cps-button-toggle>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host .cps-table-col-filter-constraint-btn-toggles{display:flex;justify-content:center}:host .cps-table-col-filter-category-autocomplete{min-width:200px;max-width:400px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: CpsInputComponent, selector: "cps-input", inputs: ["label", "hint", "placeholder", "disabled", "readonly", "width", "type", "loading", "clearable", "prefixIcon", "prefixIconClickable", "prefixIconSize", "prefixText", "hideDetails", "persistentClear", "error", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "appearance", "valueToDisplay", "value"], outputs: ["valueChanged", "focused", "prefixIconClicked", "blurred", "cleared", "enterClicked"] }, { kind: "component", type: CpsDatepickerComponent, selector: "cps-datepicker", inputs: ["label", "disabled", "width", "placeholder", "hint", "clearable", "hideDetails", "persistentClear", "showTodayButton", "openOnInputFocus", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "appearance", "minDate", "maxDate", "value"], outputs: ["valueChanged"] }, { kind: "component", type: CpsButtonToggleComponent, selector: "cps-button-toggle", inputs: ["label", "options", "multiple", "disabled", "mandatory", "equalWidths", "optionTooltipPosition", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "value"], outputs: ["valueChanged"] }, { kind: "component", type: CpsAutocompleteComponent, selector: "cps-autocomplete", inputs: ["label", "placeholder", "hint", "returnObject", "multiple", "disabled", "width", "selectAll", "showChevron", "withOptionsAliases", "useOptionsAliasesWhenNoMatch", "optionAlias", "chips", "closableChips", "clearable", "openOnClear", "keepInitialOrder", "optionLabel", "optionValue", "optionInfo", "hideDetails", "persistentClear", "prefixIcon", "prefixIconSize", "loading", "loadingMessage", "showLoadingMessage", "emptyMessage", "showEmptyMessage", "virtualScroll", "numToleratedItems", "externalError", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "appearance", "emptyOptionIndex", "inputChangeDebounceTime", "value", "options"], outputs: ["valueChanged", "inputChanged", "focused", "blurred"] }] }); }
7128
- }
7129
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TableColumnFilterConstraintComponent, decorators: [{
7130
- type: Component,
7131
- args: [{ selector: 'table-column-filter-constraint', standalone: true, imports: [
7132
- CommonModule,
7133
- FormsModule,
7134
- CpsInputComponent,
7135
- CpsDatepickerComponent,
7136
- CpsButtonToggleComponent,
7137
- CpsAutocompleteComponent
7138
- ], template: "<ng-container [ngSwitch]=\"type\">\n <cps-input\n *ngSwitchCase=\"'text'\"\n [placeholder]=\"placeholder\"\n [hideDetails]=\"true\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n type=\"text\"></cps-input>\n\n <cps-input\n *ngSwitchCase=\"'number'\"\n [hideDetails]=\"true\"\n [placeholder]=\"placeholder\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n type=\"number\"></cps-input>\n\n <div\n class=\"cps-table-col-filter-constraint-btn-toggles\"\n *ngSwitchCase=\"'boolean'\">\n <cps-button-toggle\n [options]=\"booleanOptions\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n [mandatory]=\"false\">\n </cps-button-toggle>\n </div>\n\n <cps-datepicker\n *ngSwitchCase=\"'date'\"\n [openOnInputFocus]=\"true\"\n [hideDetails]=\"true\"\n [placeholder]=\"placeholder\"\n [value]=\"filterConstraint?.value\"\n (keydown.enter)=\"onEnterKeyDown($event)\"\n (valueChanged)=\"onValueChange($event)\">\n </cps-datepicker>\n\n <ng-container *ngSwitchCase=\"'category'\">\n <cps-autocomplete\n #categoryAutocompleteComponent\n *ngIf=\"!asButtonToggle\"\n class=\"cps-table-col-filter-category-autocomplete\"\n [placeholder]=\"placeholder\"\n [options]=\"categories\"\n [hideDetails]=\"true\"\n [clearable]=\"true\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n [returnObject]=\"false\"\n [multiple]=\"!singleSelection\">\n </cps-autocomplete>\n <div class=\"cps-table-col-filter-constraint-btn-toggles\">\n <cps-button-toggle\n *ngIf=\"asButtonToggle\"\n [options]=\"categories\"\n [value]=\"filterConstraint?.value\"\n (valueChanged)=\"onValueChange($event)\"\n [mandatory]=\"false\"\n [multiple]=\"!singleSelection\">\n </cps-button-toggle>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host .cps-table-col-filter-constraint-btn-toggles{display:flex;justify-content:center}:host .cps-table-col-filter-category-autocomplete{min-width:200px;max-width:400px}\n"] }]
7139
- }], ctorParameters: () => [{ type: i1$3.Table, decorators: [{
7140
- type: Optional
7141
- }] }, { type: i2$1.TreeTable, decorators: [{
7142
- type: Optional
7143
- }] }], propDecorators: { type: [{
7144
- type: Input
7145
- }], field: [{
7146
- type: Input
7147
- }], filterConstraint: [{
7148
- type: Input
7149
- }], categoryOptions: [{
7150
- type: Input
7151
- }], asButtonToggle: [{
7152
- type: Input
7153
- }], singleSelection: [{
7154
- type: Input
7155
- }], placeholder: [{
7156
- type: Input
7157
- }], hasApplyButton: [{
7158
- type: Input
7159
- }], categoryAutocompleteComponent: [{
7160
- type: ViewChild,
7161
- args: ['categoryAutocompleteComponent']
7162
- }] } });
7163
-
7164
- /**
7165
- * TableColumnFilterComponent is an internal filter component in table and treetable.
7166
- */
7167
- class TableColumnFilterComponent {
7168
- get isCategoryDropdownOpened() {
7169
- if (this.type !== 'category')
7170
- return false;
7171
- return this.constraintCompList?.first?.isCategoryDropdownOpened || false;
7172
- }
7173
- constructor(elementRef, dt, tt) {
7174
- this.elementRef = elementRef;
7175
- this.dt = dt;
7176
- this.tt = tt;
6945
+ this.filterableByColumns = false;
6946
+ /**
6947
+ * If true, automatically detects filter type based on values, otherwise sets 'text' filter type for all columns.
6948
+ * Note: This setting only takes effect if 'filterableByColumns' is true.
6949
+ * @group Props
6950
+ */
6951
+ this.autoColumnFilterType = true;
6952
+ /**
6953
+ * Determines whether sorting works on single column or on multiple columns.
6954
+ * @group Props
6955
+ */
6956
+ this.sortMode = 'single';
6957
+ /**
6958
+ * Determines whether to use the default sorting or a custom one using sortFunction.
6959
+ * @group Props
6960
+ */
6961
+ this.customSort = false;
6962
+ /**
6963
+ * Determines whether the table has a toolbar.
6964
+ * @group Props
6965
+ */
6966
+ this.hasToolbar = true;
6967
+ /**
6968
+ * Toolbar size, it can be "small" or "normal".
6969
+ * @group Props
6970
+ */
6971
+ this.toolbarSize = 'normal';
6972
+ /**
6973
+ * Toolbar title.
6974
+ * @group Props
6975
+ */
6976
+ this.toolbarTitle = '';
6977
+ /**
6978
+ * Toolbar icon name.
6979
+ * @group Props
6980
+ */
6981
+ this.toolbarIcon = '';
6982
+ /**
6983
+ * Toolbar icon color.
6984
+ * @group Props
6985
+ */
6986
+ this.toolbarIconColor = '';
6987
+ /**
6988
+ * Makes table scrollable.
6989
+ * @group Props
6990
+ */
6991
+ this.scrollable = true;
6992
+ /**
6993
+ * Height of the scroll viewport in fixed pixels or the "flex" keyword for a dynamic size.
6994
+ * @group Props
6995
+ */
6996
+ this.scrollHeight = '';
6997
+ /**
6998
+ * Determines whether only the elements within scrollable area should be added into the DOM. Works only if scrollable prop is true.
6999
+ * @group Props
7000
+ */
7001
+ this.virtualScroll = false;
7002
+ /**
7003
+ * Determines how many additional elements to add to the DOM outside of the view.
7004
+ * @group Props
7005
+ */
7006
+ this.numToleratedItems = 10;
7007
+ /**
7008
+ * Determines whether the table should have paginator.
7009
+ * @group Props
7010
+ */
7011
+ this.paginator = false;
7012
+ /**
7013
+ * Determines whether to show paginator even if there is only one page.
7014
+ * @group Props
7015
+ */
7016
+ this.alwaysShowPaginator = true;
7017
+ /**
7018
+ * Array of integer values to display inside rows per page dropdown of paginator.
7019
+ * @group Props
7020
+ */
7021
+ this.rowsPerPageOptions = [];
7022
+ /**
7023
+ * Index of the first row to be displayed.
7024
+ * @group Props
7025
+ */
7026
+ this.first = 0;
7027
+ /**
7028
+ * Number of rows to display per page.
7029
+ * @group Props
7030
+ */
7031
+ this.rows = 0;
7032
+ /**
7033
+ * Determines whether to reset page on rows change.
7034
+ * @group Props
7035
+ */
7036
+ this.resetPageOnRowsChange = false;
7037
+ /**
7038
+ * Determines whether to reset page on table data sorting.
7039
+ * @group Props
7040
+ */
7041
+ this.resetPageOnSort = true;
7042
+ /**
7043
+ * Number of total records.
7044
+ * @group Props
7045
+ */
7046
+ this.totalRecords = 0;
7047
+ /**
7048
+ * Text to display when there is no data.
7049
+ * @group Props
7050
+ */
7051
+ this.emptyMessage = 'No data';
7052
+ /**
7053
+ * Height of table's body when there is no data, of type number denoting pixels or string.
7054
+ * @group Props
7055
+ */
7056
+ this.emptyBodyHeight = '';
7057
+ /**
7058
+ * Defines if data is loaded and interacted with in lazy manner.
7059
+ * @group Props
7060
+ */
7061
+ this.lazy = false;
7062
+ /**
7063
+ * Determines whether to call lazy loading on initialization.
7064
+ * @group Props
7065
+ */
7066
+ this.lazyLoadOnInit = true;
7067
+ /**
7068
+ * Determines whether to show global filter in the toolbar.
7069
+ * @group Props
7070
+ */
7071
+ this.showGlobalFilter = false;
7072
+ /**
7073
+ * Global filter placeholder.
7074
+ * @group Props
7075
+ */
7076
+ this.globalFilterPlaceholder = 'Search';
7177
7077
  /**
7178
- * Type of filter in table, it can be of type "number", "boolean", "text", "date" or "category".
7078
+ * An array of fields to use in global filtering.
7179
7079
  * @group Props
7180
7080
  */
7181
- this.type = 'text';
7081
+ this.globalFilterFields = [];
7182
7082
  /**
7183
- * Determines whether the filter menu should be persistent.
7083
+ * Determines whether to clear global filter on data loading.
7184
7084
  * @group Props
7185
7085
  */
7186
- this.persistent = false;
7086
+ this.clearGlobalFilterOnLoading = false;
7187
7087
  /**
7188
- * Determines whether the filter should have clear button.
7088
+ * Determines whether to show remove button in the toolbar when rows are selected.
7189
7089
  * @group Props
7190
7090
  */
7191
- this.showClearButton = true;
7091
+ this.showRemoveBtnOnSelect = true;
7192
7092
  /**
7193
- * Determines whether the filter should have apply button.
7093
+ * Determines whether removeBtnOnSelect is disabled.
7194
7094
  * @group Props
7195
7095
  */
7196
- this.showApplyButton = true;
7096
+ this.removeBtnOnSelectDisabled = false;
7197
7097
  /**
7198
- * Determines whether the filter should have close button.
7098
+ * Determines whether to show additional button in the toolbar when rows are selected.
7199
7099
  * @group Props
7200
7100
  */
7201
- this.showCloseButton = false;
7101
+ this.showAdditionalBtnOnSelect = false;
7202
7102
  /**
7203
- * Determines whether the filter should have match modes.
7103
+ * AdditionalBtnOnSelect title.
7204
7104
  * @group Props
7205
7105
  */
7206
- this.showMatchModes = true;
7106
+ this.additionalBtnOnSelectTitle = 'Select action';
7207
7107
  /**
7208
- * Match modes for filter.
7108
+ * AdditionalBtnOnSelect icon.
7209
7109
  * @group Props
7210
7110
  */
7211
- this.matchModes = [];
7111
+ this.additionalBtnOnSelectIcon = '';
7212
7112
  /**
7213
- * Determines whether the filter should have operator.
7113
+ * Determines whether additionalBtnOnSelect is disabled.
7214
7114
  * @group Props
7215
7115
  */
7216
- this.showOperator = true;
7116
+ this.additionalBtnOnSelectDisabled = false;
7217
7117
  /**
7218
- * Maximum number of constraints.
7118
+ * Determines whether to show action button in the toolbar.
7219
7119
  * @group Props
7220
7120
  */
7221
- this.maxConstraints = 2;
7121
+ this.showActionBtn = false;
7222
7122
  /**
7223
- * Title of the filter.
7123
+ * Action button title.
7224
7124
  * @group Props
7225
7125
  */
7226
- this.headerTitle = '';
7126
+ this.actionBtnTitle = 'Action';
7227
7127
  /**
7228
- * Determines whether the filter should hide on clear.
7128
+ * Action button icon.
7229
7129
  * @group Props
7230
7130
  */
7231
- this.hideOnClear = false;
7131
+ this.actionBtnIcon = '';
7232
7132
  /**
7233
- * Options for category filter.
7133
+ * Determines whether actionBtn is disabled.
7234
7134
  * @group Props
7235
7135
  */
7236
- this.categoryOptions = [];
7136
+ this.actionBtnDisabled = false;
7237
7137
  /**
7238
- * Determines whether to show category filter as button toggles.
7138
+ * Determines whether to show export button in the toolbar.
7239
7139
  * @group Props
7240
7140
  */
7241
- this.asButtonToggle = false;
7141
+ this.showExportBtn = false;
7242
7142
  /**
7243
- * Single selection for category filter.
7143
+ * Determines whether exportBtn is disabled.
7244
7144
  * @group Props
7245
7145
  */
7246
- this.singleSelection = false;
7146
+ this.exportBtnDisabled = false;
7247
7147
  /**
7248
- * Placeholder for filter constraints.
7148
+ * Name of the exported file.
7249
7149
  * @group Props
7250
7150
  */
7251
- this.placeholder = '';
7252
- this.operator = FilterOperator.AND;
7253
- this.operatorOptions = [
7254
- { label: 'Match All', value: FilterOperator.AND, info: 'AND' },
7255
- { label: 'Match Any', value: FilterOperator.OR, info: 'OR' }
7256
- ];
7257
- this.matchModeLabels = {
7258
- startsWith: 'Starts with',
7259
- contains: 'Contains',
7260
- notContains: 'Does not contain',
7261
- endsWith: 'Ends with',
7262
- equals: 'Equals',
7263
- notEquals: 'Does not equal',
7264
- lt: 'Less than',
7265
- lte: 'Less than or equal to',
7266
- gt: 'Greater than',
7267
- gte: 'Greater than or equal to',
7268
- dateIs: 'Date is',
7269
- dateIsNot: 'Date is not',
7270
- dateBefore: 'Date is before',
7271
- dateAfter: 'Date is after'
7272
- };
7273
- this.filterMatchModeOptions = {
7274
- text: [
7275
- CpsColumnFilterMatchMode.STARTS_WITH,
7276
- CpsColumnFilterMatchMode.CONTAINS,
7277
- CpsColumnFilterMatchMode.NOT_CONTAINS,
7278
- CpsColumnFilterMatchMode.ENDS_WITH,
7279
- CpsColumnFilterMatchMode.EQUALS,
7280
- CpsColumnFilterMatchMode.NOT_EQUALS
7281
- ],
7282
- number: [
7283
- CpsColumnFilterMatchMode.EQUALS,
7284
- CpsColumnFilterMatchMode.NOT_EQUALS,
7285
- CpsColumnFilterMatchMode.LESS_THAN,
7286
- CpsColumnFilterMatchMode.LESS_THAN_OR_EQUAL_TO,
7287
- CpsColumnFilterMatchMode.GREATER_THAN,
7288
- CpsColumnFilterMatchMode.GREATER_THAN_OR_EQUAL_TO
7289
- ],
7290
- date: [
7291
- CpsColumnFilterMatchMode.DATE_IS,
7292
- CpsColumnFilterMatchMode.DATE_IS_NOT,
7293
- CpsColumnFilterMatchMode.DATE_BEFORE,
7294
- CpsColumnFilterMatchMode.DATE_AFTER
7295
- ]
7296
- };
7297
- this.isFilterApplied = false;
7298
- this._tableInstance = dt || tt;
7151
+ this.exportFilename = 'download';
7152
+ /**
7153
+ * Character to use as the csv separator.
7154
+ * @group Props
7155
+ */
7156
+ this.csvSeparator = ',';
7157
+ /**
7158
+ * Determines whether to show data reload button in the toolbar.
7159
+ * @group Props
7160
+ */
7161
+ this.showDataReloadBtn = false;
7162
+ /**
7163
+ * Determines whether dataReloadBtn is disabled.
7164
+ * @group Props
7165
+ */
7166
+ this.dataReloadBtnDisabled = false;
7167
+ /**
7168
+ * Determines whether the table should show columnsToggle menu, where you can choose which columns to be displayed. If external body template is provided, use columnsSelected event emitter.
7169
+ * @group Props
7170
+ */
7171
+ this.showColumnsToggleBtn = false;
7172
+ /**
7173
+ * Determines whether columnsToggle button is disabled.
7174
+ * @group Props
7175
+ */
7176
+ this.columnsToggleBtnDisabled = false;
7177
+ /**
7178
+ * Array of initial columns to show in the table. If not provided, all columns are initially visible.
7179
+ * @group Props
7180
+ */
7181
+ this.initialColumns = [];
7182
+ /**
7183
+ * If set to true, row data are rendered using innerHTML.
7184
+ * @group Props
7185
+ */
7186
+ this.renderDataAsHTML = false;
7187
+ /**
7188
+ * Callback to invoke on selection changed. Returns selected rows.
7189
+ * @param {any[]} any[] - selected rows.
7190
+ * @group Emits
7191
+ */
7192
+ this.rowsSelected = new EventEmitter();
7193
+ /**
7194
+ * Callback to invoke on selection changed. Returns selected rows indexes.
7195
+ * @param {number[]} number[] - selected rows indexes.
7196
+ * @group Emits
7197
+ */
7198
+ this.selectedRowIndexes = new EventEmitter();
7199
+ /**
7200
+ * Callback to invoke when action button is clicked.
7201
+ * @param {void} void - action button clicked.
7202
+ * @group Emits
7203
+ */
7204
+ this.actionBtnClicked = new EventEmitter();
7205
+ /**
7206
+ * Callback to invoke when edit-row button is clicked.
7207
+ * @param {{row: any, index: number}} {row: any, index: number} - edit-row button clicked.
7208
+ * @group Emits
7209
+ */
7210
+ this.editRowBtnClicked = new EventEmitter();
7211
+ /**
7212
+ * Callback to invoke on rows removal. Returns rows.
7213
+ * @param {any[]} any[] - array of rows to remove.
7214
+ * @group Emits
7215
+ */
7216
+ this.rowsToRemove = new EventEmitter();
7217
+ /**
7218
+ * Callback to invoke on rows removal. Returns rows indexes.
7219
+ * @param {number[]} number[] - array of indexes of rows to remove.
7220
+ * @group Emits
7221
+ */
7222
+ this.rowIndexesToRemove = new EventEmitter();
7223
+ /**
7224
+ * Callback to invoke on page changed.
7225
+ * @param {any} any - page changed.
7226
+ * @group Emits
7227
+ */
7228
+ this.pageChanged = new EventEmitter();
7229
+ /**
7230
+ * Callback to invoke when data is sorted.
7231
+ * @param {any} any - sort meta.
7232
+ * @group Emits
7233
+ */
7234
+ this.sorted = new EventEmitter();
7235
+ /**
7236
+ * Callback to invoke when data is filtered.
7237
+ * @param {any} any - custom filtering event.
7238
+ * @group Emits
7239
+ */
7240
+ this.filtered = new EventEmitter();
7241
+ /**
7242
+ * Callback to invoke when rows are reordered.
7243
+ * @param {any} any - rows reordered.
7244
+ * @group Emits
7245
+ */
7246
+ this.rowsReordered = new EventEmitter();
7247
+ /**
7248
+ * Callback to invoke on columns selection.
7249
+ * @param {object} object - selected column.
7250
+ * @group Emits
7251
+ */
7252
+ this.columnsSelected = new EventEmitter();
7253
+ /**
7254
+ * Callback to invoke when paging, sorting or filtering happens in lazy mode.
7255
+ * @param {any} any - custom lazy loading event.
7256
+ * @group Emits
7257
+ */
7258
+ this.lazyLoaded = new EventEmitter();
7259
+ /**
7260
+ * Callback to invoke when data-reload button is clicked.
7261
+ * @param {any} any - button clicked.
7262
+ * @group Emits
7263
+ */
7264
+ this.dataReloadBtnClicked = new EventEmitter();
7265
+ /**
7266
+ * Callback to invoke when additional button on select is clicked.
7267
+ * @param {any[]} any[] - selected data.
7268
+ * @group Emits
7269
+ */
7270
+ this.additionalBtnOnSelectClicked = new EventEmitter();
7271
+ /**
7272
+ * A function to implement custom sorting. customSort must be true.
7273
+ * @param {any} any - sort meta.
7274
+ * @group Emits
7275
+ */
7276
+ this.customSortFunction = new EventEmitter();
7277
+ this._data = [];
7278
+ this.selectedRows = [];
7279
+ this.virtualScrollItemSize = 0;
7280
+ this.rowOptions = [];
7281
+ this.selectedColumns = [];
7282
+ this.exportMenuItems = [
7283
+ {
7284
+ title: 'CSV',
7285
+ icon: 'csv',
7286
+ action: () => {
7287
+ this.exportTable('csv');
7288
+ }
7289
+ },
7290
+ {
7291
+ title: 'XLSX',
7292
+ icon: 'xls',
7293
+ action: () => {
7294
+ this.exportTable('xlsx');
7295
+ }
7296
+ }
7297
+ // {
7298
+ // title: 'PDF',
7299
+ // icon: 'pdf',
7300
+ // action: () => {
7301
+ // this.exportTable('pdf');
7302
+ // }
7303
+ // }
7304
+ ];
7299
7305
  }
7300
7306
  ngOnInit() {
7301
- if (this.matchModes.length > 0) {
7302
- this.filterMatchModeOptions[this.type] = this.matchModes;
7303
- }
7304
- this._onFilterSub = this._tableInstance?.onFilter?.subscribe((value) => this._updateFilterApplied(value));
7305
- if (!this._tableInstance.filters[this.field]) {
7306
- this._initFieldFilterConstraint();
7307
- }
7308
- if (this.maxConstraints > 1 && this.type !== 'category') {
7309
- this.showApplyButton = true;
7310
- }
7311
- if (this.type === 'boolean') {
7312
- this.showApplyButton = false;
7313
- }
7314
- this.currentMatchModes = this.filterMatchModeOptions[this.type]?.map((key) => {
7315
- return { label: this.matchModeLabels[key], value: key };
7316
- });
7317
- }
7318
- ngOnDestroy() {
7319
- this._onFilterSub?.unsubscribe();
7320
- }
7321
- _updateFilterApplied(value) {
7322
- const fieldFilter = value.filters[this.field];
7323
- if (fieldFilter) {
7324
- if (Array.isArray(fieldFilter)) {
7325
- this.isFilterApplied = fieldFilter.some((meta) => !this._tableInstance.isFilterBlank(meta.value));
7326
- }
7307
+ this.emptyBodyHeight = convertSize(this.emptyBodyHeight);
7308
+ if (!this.scrollable)
7309
+ this.virtualScroll = false;
7310
+ if (this.showAdditionalBtnOnSelect)
7311
+ this.showRemoveBtnOnSelect = false;
7312
+ if (this.paginator) {
7313
+ if (this.rowsPerPageOptions.length < 1)
7314
+ this.rowsPerPageOptions = [5, 10, 25, 50];
7315
+ if (!this.rows)
7316
+ this.rows = this.rowsPerPageOptions[0];
7327
7317
  else {
7328
- this.isFilterApplied = !this._tableInstance.isFilterBlank(fieldFilter.value);
7318
+ if (!this.rowsPerPageOptions.includes(this.rows)) {
7319
+ throw new Error('rowsPerPageOptions must include rows');
7320
+ }
7329
7321
  }
7322
+ this.rowOptions = this.rowsPerPageOptions.map((v) => ({
7323
+ label: '' + v,
7324
+ value: v
7325
+ }));
7330
7326
  }
7331
- else {
7332
- this.isFilterApplied = false;
7327
+ if (this.showGlobalFilter &&
7328
+ this.globalFilterFields?.length < 1 &&
7329
+ this.data?.length > 0) {
7330
+ this.globalFilterFields = Object.keys(this.data[0]);
7333
7331
  }
7332
+ this.selectedColumns =
7333
+ this.initialColumns.length > 0 ? this.initialColumns : this.columns;
7334
7334
  }
7335
- _initFieldFilterConstraint() {
7336
- const defaultMatchMode = this._getDefaultMatchMode();
7337
- if (this._tableInstance instanceof Table) {
7338
- this._tableInstance.filters[this.field] = [
7339
- {
7340
- value: null,
7341
- matchMode: defaultMatchMode,
7342
- operator: this.operator
7343
- }
7344
- ];
7345
- }
7346
- else {
7347
- this._tableInstance.filters[this.field] = {
7348
- value: null,
7349
- matchMode: defaultMatchMode
7350
- };
7335
+ get styleClass() {
7336
+ const classesList = [];
7337
+ switch (this.size) {
7338
+ case 'small':
7339
+ classesList.push('p-datatable-sm');
7340
+ break;
7341
+ case 'large':
7342
+ classesList.push('p-datatable-lg');
7343
+ break;
7351
7344
  }
7352
- }
7353
- _getDefaultMatchMode() {
7354
- const getMatchMode = (val) => {
7355
- if (this.type in this.filterMatchModeOptions) {
7356
- return this.filterMatchModeOptions[this.type].includes(val)
7357
- ? val
7358
- : this.filterMatchModeOptions[this.type][0];
7359
- }
7360
- else {
7361
- return val;
7345
+ if (this.hasToolbar) {
7346
+ switch (this.toolbarSize) {
7347
+ case 'small':
7348
+ classesList.push('cps-tbar-small');
7349
+ break;
7350
+ case 'normal':
7351
+ classesList.push('cps-tbar-normal');
7352
+ break;
7362
7353
  }
7363
- };
7364
- switch (this.type) {
7365
- case 'text':
7366
- return getMatchMode(CpsColumnFilterMatchMode.STARTS_WITH);
7367
- case 'number':
7368
- return getMatchMode(CpsColumnFilterMatchMode.EQUALS);
7369
- case 'date':
7370
- return getMatchMode(CpsColumnFilterMatchMode.DATE_IS);
7371
- case 'category':
7372
- return this.singleSelection
7373
- ? CpsColumnFilterMatchMode.IS
7374
- : CpsColumnFilterMatchMode.IN;
7375
- default:
7376
- return getMatchMode(CpsColumnFilterMatchMode.CONTAINS);
7377
7354
  }
7355
+ if (this.striped) {
7356
+ classesList.push('p-datatable-striped');
7357
+ }
7358
+ if (this.bordered) {
7359
+ classesList.push('p-datatable-gridlines');
7360
+ }
7361
+ return classesList.join(' ');
7378
7362
  }
7379
- _getDefaultOperator() {
7380
- return this._tableInstance.filters
7381
- ? (this._tableInstance.filters[this.field])[0].operator
7382
- : this.operator;
7363
+ ngAfterViewChecked() {
7364
+ if (!this.virtualScroll || this.virtualScrollItemSize)
7365
+ return;
7366
+ this.virtualScrollItemSize =
7367
+ this.primengTable?.el?.nativeElement
7368
+ ?.querySelector('.p-datatable-tbody')
7369
+ ?.querySelector('tr')?.clientHeight || 0;
7370
+ this.cdRef.detectChanges();
7383
7371
  }
7384
- _updateSortIconColor(color) {
7385
- const unsortedUp = this.elementRef?.nativeElement?.parentElement?.querySelector('.sort-unsorted-arrow-up');
7386
- if (unsortedUp) {
7387
- unsortedUp.style.borderBottomColor = color;
7372
+ ngOnChanges(changes) {
7373
+ if (this.loading) {
7374
+ this.clearSelection();
7375
+ if (this.clearGlobalFilterOnLoading)
7376
+ this.clearGlobalFilter();
7388
7377
  }
7389
- const unsortedDown = this.elementRef?.nativeElement?.parentElement?.querySelector('.sort-unsorted-arrow-down');
7390
- if (unsortedDown) {
7391
- unsortedDown.style.borderTopColor = color;
7378
+ if (changes?.data) {
7379
+ this.resetSortingState();
7380
+ this.selectedRows = this.selectedRows.filter((sr) => this.data.includes(sr));
7392
7381
  }
7393
7382
  }
7394
- onCloseClick() {
7395
- this.hide();
7383
+ resetSortingState() {
7384
+ this.tUnsortDirective?.resetDefaultSortOrder();
7396
7385
  }
7397
- onMenuMatchModeChange(value, filterMeta) {
7398
- filterMeta.matchMode = value;
7399
- if (!this.showApplyButton) {
7400
- this._tableInstance._filter();
7386
+ clearSelection() {
7387
+ this.selectedRows = [];
7388
+ }
7389
+ clearGlobalFilter() {
7390
+ this.globalFilterComp?.clear();
7391
+ }
7392
+ onSelectionChanged(selection) {
7393
+ this.rowsSelected.emit(selection);
7394
+ const indexes = this._getIndexes(selection);
7395
+ this.selectedRowIndexes.emit(indexes);
7396
+ }
7397
+ onSortFunction(event) {
7398
+ this.customSortFunction.emit(event);
7399
+ }
7400
+ onFilterGlobal(value) {
7401
+ this.primengTable.filterGlobal(value, 'contains');
7402
+ }
7403
+ removeSelected() {
7404
+ this.rowsToRemove.emit(this.selectedRows);
7405
+ const indexes = this._getIndexes(this.selectedRows);
7406
+ this.rowIndexesToRemove.emit(indexes);
7407
+ }
7408
+ onClickAdditionalBtnOnSelect() {
7409
+ this.additionalBtnOnSelectClicked.emit(this.selectedRows);
7410
+ }
7411
+ onClickActionBtn() {
7412
+ this.actionBtnClicked.emit();
7413
+ }
7414
+ onRowsPerPageChanged() {
7415
+ if (this.resetPageOnRowsChange) {
7416
+ this.primengTable.first = 0;
7401
7417
  }
7418
+ this.changePage(this.getPage());
7402
7419
  }
7403
- addConstraint() {
7404
- this._tableInstance.filters[this.field].push({
7405
- value: null,
7406
- matchMode: this._getDefaultMatchMode(),
7407
- operator: this._getDefaultOperator()
7408
- });
7420
+ getPageCount() {
7421
+ return Math.ceil(this.primengTable.totalRecords / this.rows);
7409
7422
  }
7410
- removeConstraint(filterMeta) {
7411
- this._tableInstance.filters[this.field] = (this._tableInstance.filters[this.field]).filter((meta) => meta !== filterMeta);
7412
- this._tableInstance._filter();
7423
+ getPage() {
7424
+ return this.primengTable.first
7425
+ ? Math.floor(this.primengTable.first / this.rows)
7426
+ : 0;
7413
7427
  }
7414
- onOperatorChange(value) {
7415
- this._tableInstance.filters[this.field].forEach((filterMeta) => {
7416
- filterMeta.operator = value;
7417
- this.operator = value;
7418
- });
7419
- if (!this.showApplyButton) {
7420
- this._tableInstance._filter();
7428
+ changePage(p) {
7429
+ const pc = Math.ceil(this.getPageCount());
7430
+ if (p >= 0 && p < pc) {
7431
+ this.first = this.rows * p;
7432
+ this.primengTable.onPageChange({ first: this.first, rows: this.rows });
7421
7433
  }
7422
7434
  }
7423
- get fieldConstraints() {
7424
- if (this._tableInstance instanceof Table) {
7425
- return this._tableInstance.filters
7426
- ? this._tableInstance.filters[this.field]
7427
- : null;
7435
+ onPageChange(event) {
7436
+ this.first = event.first;
7437
+ this.rows = event.rows;
7438
+ const state = {
7439
+ page: this.getPage(),
7440
+ first: this.first,
7441
+ rows: this.rows,
7442
+ pageCount: Math.ceil(this.getPageCount())
7443
+ };
7444
+ this.pageChanged.emit(state);
7445
+ }
7446
+ toggleAllColumns() {
7447
+ this.selectedColumns =
7448
+ this.selectedColumns.length < this.columns.length ? this.columns : [];
7449
+ this.columnsSelected.emit(this.selectedColumns);
7450
+ }
7451
+ isColumnSelected(col) {
7452
+ return this.selectedColumns.some((item) => isEqual(item, col));
7453
+ }
7454
+ onSelectColumn(col) {
7455
+ let res = [];
7456
+ if (this.isColumnSelected(col)) {
7457
+ res = this.selectedColumns.filter((v) => !isEqual(v, col));
7428
7458
  }
7429
7459
  else {
7430
- return this._tableInstance.filters
7431
- ? [this._tableInstance.filters[this.field]]
7432
- : null;
7460
+ this.columns.forEach((o) => {
7461
+ if (this.selectedColumns.some((v) => isEqual(v, o)) ||
7462
+ isEqual(col, o)) {
7463
+ res.push(o);
7464
+ }
7465
+ });
7433
7466
  }
7467
+ this.selectedColumns = res;
7468
+ this.columnsSelected.emit(this.selectedColumns);
7434
7469
  }
7435
- get showRemoveIcon() {
7436
- return this.fieldConstraints ? this.fieldConstraints.length > 1 : false;
7437
- }
7438
- get isShowOperator() {
7439
- return (this.showOperator &&
7440
- this.maxConstraints > 1 &&
7441
- !['boolean', 'category'].includes(this.type));
7470
+ onEditRowClicked(row) {
7471
+ const [index] = this._getIndexes([row]);
7472
+ this.editRowBtnClicked.emit({ row, index });
7442
7473
  }
7443
- get isShowAddConstraint() {
7444
- return (!['boolean', 'category'].includes(this.type) &&
7445
- this.fieldConstraints &&
7446
- this.fieldConstraints.length < this.maxConstraints);
7474
+ onRemoveRowClicked(item) {
7475
+ this.rowsToRemove.emit([item]);
7476
+ const indexes = this._getIndexes([item]);
7477
+ this.rowIndexesToRemove.emit(indexes);
7447
7478
  }
7448
- hide() {
7449
- this.columnFilterMenu.hide();
7479
+ onSort(event) {
7480
+ this.sorted.emit(event);
7450
7481
  }
7451
- clearFilter() {
7452
- this._initFieldFilterConstraint();
7453
- this._tableInstance._filter();
7454
- if (this.hideOnClear)
7455
- this.hide();
7482
+ onFilter(event) {
7483
+ this.filtered.emit(event);
7456
7484
  }
7457
- clearFilterValues() {
7458
- this._initFieldFilterConstraint();
7459
- this.isFilterApplied = false;
7485
+ onRowReorder(event) {
7486
+ this.rowsReordered.emit(event);
7460
7487
  }
7461
- applyFilter() {
7462
- this._tableInstance._filter();
7463
- this.hide();
7488
+ onLazyLoaded(event) {
7489
+ this.lazyLoaded.emit(event);
7464
7490
  }
7465
- onMenuShown() {
7466
- const parent = this.elementRef?.nativeElement?.parentElement;
7467
- const className = 'cps-table-col-filter-menu-open';
7468
- parent.classList.add(className);
7491
+ onReloadData() {
7492
+ if (this.dataReloadBtnDisabled)
7493
+ return;
7494
+ this.dataReloadBtnClicked.emit();
7469
7495
  }
7470
- onBeforeMenuHidden() {
7471
- if (!this.isFilterApplied)
7472
- this._initFieldFilterConstraint();
7496
+ onExportData(event) {
7497
+ if (this.exportBtnDisabled)
7498
+ return;
7499
+ this.exportMenu?.toggle(event);
7473
7500
  }
7474
- onMenuHidden() {
7475
- const parent = this.elementRef?.nativeElement?.parentElement;
7476
- const className = 'cps-table-col-filter-menu-open';
7477
- parent.classList.remove(className);
7501
+ onColumnsToggle(event) {
7502
+ if (this.columnsToggleBtnDisabled)
7503
+ return;
7504
+ this.colToggleMenu?.toggle(event);
7478
7505
  }
7479
- onClick(event) {
7480
- event.stopPropagation();
7506
+ _getIndexes(rows) {
7507
+ let indexes = rows.map((row) => this.primengTable.value.indexOf(row));
7508
+ const indexesMap = this.tUnsortDirective?.sortIndices;
7509
+ if (indexesMap && indexesMap.length > 0) {
7510
+ indexes = indexes.map((i) => indexesMap.indexOf(i));
7511
+ }
7512
+ return indexes;
7481
7513
  }
7482
- onMouseOver() {
7483
- this._updateSortIconColor('var(--cps-color-line-dark)');
7514
+ exportTable(format) {
7515
+ if (this.columns.length < 1)
7516
+ throw new Error('Columns must be defined!');
7517
+ if (this.selectedColumns.length < 1)
7518
+ throw new Error('Nothing to export!');
7519
+ switch (format) {
7520
+ case 'csv':
7521
+ this.primengTable.exportCSV();
7522
+ break;
7523
+ case 'xlsx':
7524
+ this.exportXLSX();
7525
+ break;
7526
+ // case 'pdf':
7527
+ // this.exportPDF();
7528
+ // break;
7529
+ }
7484
7530
  }
7485
- onMouseLeave() {
7486
- this._updateSortIconColor('');
7531
+ exportXLSX() {
7532
+ import('xlsx').then((xlsx) => {
7533
+ const sheetData = [
7534
+ this.selectedColumns.map((c) => c[this.colHeaderName]),
7535
+ ...this.primengTable.value.map((item) => this.selectedColumns.map((c) => item[c[this.colFieldName]]))
7536
+ ];
7537
+ const worksheet = xlsx.utils.json_to_sheet(sheetData, {
7538
+ skipHeader: true
7539
+ });
7540
+ const workbook = {
7541
+ Sheets: { [this.exportFilename]: worksheet },
7542
+ SheetNames: [this.exportFilename]
7543
+ };
7544
+ const xlsxBuffer = xlsx.write(workbook, {
7545
+ bookType: 'xlsx',
7546
+ type: 'array'
7547
+ });
7548
+ const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
7549
+ const blob = new Blob([xlsxBuffer], {
7550
+ type: EXCEL_TYPE
7551
+ });
7552
+ const downloadLink = this.document.createElement('a');
7553
+ downloadLink.href = URL.createObjectURL(blob);
7554
+ downloadLink.download = `${this.exportFilename}.xlsx`;
7555
+ downloadLink.click();
7556
+ });
7487
7557
  }
7488
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TableColumnFilterComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.Table, optional: true }, { token: i2$1.TreeTable, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
7489
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: TableColumnFilterComponent, isStandalone: true, selector: "table-column-filter", inputs: { field: "field", type: "type", persistent: "persistent", showClearButton: "showClearButton", showApplyButton: "showApplyButton", showCloseButton: "showCloseButton", showMatchModes: "showMatchModes", matchModes: "matchModes", showOperator: "showOperator", maxConstraints: "maxConstraints", headerTitle: "headerTitle", hideOnClear: "hideOnClear", categoryOptions: "categoryOptions", asButtonToggle: "asButtonToggle", singleSelection: "singleSelection", placeholder: "placeholder" }, host: { listeners: { "click": "onClick($event)", "mouseenter": "onMouseOver()", "mouseleave": "onMouseLeave()" } }, viewQueries: [{ propertyName: "columnFilterMenu", first: true, predicate: ["columnFilterMenu"], descendants: true }, { propertyName: "constraintCompList", predicate: ["constraintComponent"], descendants: true }], ngImport: i0, template: "<div class=\"cps-table-col-filter\">\n <cps-menu\n #columnFilterMenu\n [withArrow]=\"false\"\n hideTransitionOptions=\"0s linear\"\n [persistent]=\"persistent || (showApplyButton && isCategoryDropdownOpened)\"\n (menuShown)=\"onMenuShown()\"\n (menuHidden)=\"onMenuHidden()\"\n (beforeMenuHidden)=\"onBeforeMenuHidden()\">\n <div class=\"cps-table-col-filter-menu-content\">\n <div\n class=\"cps-table-col-filter-menu-content-header\"\n *ngIf=\"showCloseButton || headerTitle\">\n <span class=\"cps-table-col-filter-menu-content-header-title\">\n {{ headerTitle }}\n </span>\n <cps-icon\n *ngIf=\"showCloseButton\"\n icon=\"close-x\"\n (click)=\"onCloseClick()\"></cps-icon>\n </div>\n <div\n class=\"cps-table-col-filter-menu-content-operator\"\n *ngIf=\"isShowOperator\">\n <cps-select\n [hideDetails]=\"true\"\n [disabled]=\"!fieldConstraints || fieldConstraints.length < 2\"\n [returnObject]=\"false\"\n [options]=\"operatorOptions\"\n [ngModel]=\"operator\"\n (valueChanged)=\"onOperatorChange($event)\"></cps-select>\n </div>\n <div class=\"cps-table-col-filter-menu-content-constraints\">\n <div\n *ngFor=\"let fieldConstraint of fieldConstraints; let i = index\"\n class=\"cps-table-col-filter-menu-content-constraint\">\n <cps-select\n *ngIf=\"showMatchModes && currentMatchModes\"\n class=\"cps-table-col-filter-match-mode-select\"\n [hideDetails]=\"true\"\n [returnObject]=\"false\"\n [options]=\"currentMatchModes\"\n [ngModel]=\"fieldConstraint.matchMode\"\n (valueChanged)=\"\n onMenuMatchModeChange($event, fieldConstraint)\n \"></cps-select>\n <table-column-filter-constraint\n #constraintComponent\n [type]=\"type\"\n [field]=\"field\"\n [asButtonToggle]=\"asButtonToggle\"\n [singleSelection]=\"singleSelection\"\n [categoryOptions]=\"categoryOptions\"\n [filterConstraint]=\"fieldConstraint\"\n [hasApplyButton]=\"showApplyButton\"\n [placeholder]=\"placeholder\">\n </table-column-filter-constraint>\n <div\n class=\"cps-table-col-filter-remove-rule-btn\"\n *ngIf=\"showRemoveIcon\">\n <cps-button\n type=\"borderless\"\n width=\"100%\"\n size=\"small\"\n color=\"prepared\"\n icon=\"delete\"\n (clicked)=\"removeConstraint(fieldConstraint)\"\n label=\"Remove condition\">\n </cps-button>\n </div>\n </div>\n </div>\n <div\n class=\"cps-table-col-filter-add-rule-btn\"\n *ngIf=\"isShowAddConstraint\">\n <cps-button\n label=\"Add condition\"\n type=\"borderless\"\n width=\"100%\"\n size=\"small\"\n color=\"surprise\"\n icon=\"add\"\n (clicked)=\"addConstraint()\">\n </cps-button>\n </div>\n <div class=\"cps-table-col-filter-buttonbar\">\n <cps-button\n *ngIf=\"showClearButton\"\n (clicked)=\"clearFilter()\"\n type=\"borderless\"\n color=\"prepared\"\n size=\"small\"\n label=\"Clear\"></cps-button>\n <cps-button\n *ngIf=\"showApplyButton\"\n (clicked)=\"applyFilter()\"\n color=\"prepared\"\n size=\"small\"\n label=\"Apply\"></cps-button>\n </div>\n </div>\n </cps-menu>\n <cps-icon\n [icon]=\"isFilterApplied ? 'filter-funnel-filled' : 'filter-funnel'\"\n size=\"13\"\n (click)=\"columnFilterMenu.toggle($event)\"\n class=\"cps-table-col-filter-menu-button\"\n [ngClass]=\"{\n 'cps-table-col-filter-menu-button-active': isFilterApplied\n }\"\n >>\n </cps-icon>\n</div>\n", styles: [":host .cps-table-col-filter{display:inline-flex}:host .cps-table-col-filter .cps-table-col-filter-menu-button{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative;padding-left:8px;padding-right:4px}:host .cps-table-col-filter .cps-table-col-filter-menu-button:not(.cps-table-col-filter-menu-button-active):hover{color:var(--cps-color-text-dark)}:host .cps-table-col-filter .cps-table-col-filter-menu-button-active{color:var(--cps-color-calm-lighten1)}.cps-table-col-filter-menu-content{padding-bottom:12px;min-width:200px;max-height:500px;overflow:auto}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header{min-height:32px;padding:8px;border-bottom:1px solid var(--cps-color-line-mid);background:var(--cps-color-bg-light);display:flex;justify-content:space-between;align-items:center}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header-title{font-family:Source Sans Pro,sans-serif;color:var(--cps-color-text-darkest);max-width:390px;cursor:default}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header cps-icon{margin-left:8px;cursor:pointer}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header cps-icon:hover{color:var(--cps-color-calm)}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-operator{padding:12px;border-bottom:1px solid var(--cps-color-line-mid);background:var(--cps-color-bg-light)}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-menu-content-constraint{border-bottom:1px solid var(--cps-color-line-mid);padding:12px}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-menu-content-constraint .cps-table-col-filter-match-mode-select{margin-bottom:8px}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-menu-content-constraint:last-child{border-bottom:none}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-remove-rule-btn{padding-top:8px}.cps-table-col-filter-menu-content .cps-table-col-filter-add-rule-btn{padding:8px 12px}.cps-table-col-filter-menu-content .cps-table-col-filter-buttonbar{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CpsButtonComponent, selector: "cps-button", inputs: ["color", "contentColor", "borderRadius", "type", "label", "icon", "iconPosition", "size", "width", "height", "disabled", "loading"], outputs: ["clicked"] }, { kind: "component", type: CpsMenuComponent, selector: "cps-menu", inputs: ["header", "items", "withArrow", "compressed", "focusOnShow", "persistent", "containerClass", "showTransitionOptions", "hideTransitionOptions"], outputs: ["menuShown", "menuHidden", "beforeMenuHidden", "contentClicked"] }, { kind: "component", type: CpsIconComponent, selector: "cps-icon", inputs: ["icon", "size", "color"] }, { kind: "component", type: CpsSelectComponent, selector: "cps-select", inputs: ["label", "placeholder", "hint", "returnObject", "multiple", "disabled", "width", "selectAll", "chips", "closableChips", "clearable", "openOnClear", "options", "keepInitialOrder", "optionLabel", "optionValue", "optionInfo", "hideDetails", "persistentClear", "prefixIcon", "prefixIconSize", "loading", "virtualScroll", "numToleratedItems", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "optionsClass", "appearance", "showChevron", "value"], outputs: ["valueChanged", "focused", "blurred"] }, { kind: "component", type: TableColumnFilterConstraintComponent, selector: "table-column-filter-constraint", inputs: ["type", "field", "filterConstraint", "categoryOptions", "asButtonToggle", "singleSelection", "placeholder", "hasApplyButton"] }] }); }
7558
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
7559
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: CpsTableComponent, isStandalone: true, selector: "cps-table", inputs: { columns: "columns", colHeaderName: "colHeaderName", colFieldName: "colFieldName", colFilterTypeName: "colFilterTypeName", colDateFormatName: "colDateFormatName", striped: "striped", bordered: "bordered", size: "size", selectable: "selectable", rowHover: "rowHover", dataKey: "dataKey", showRowMenu: "showRowMenu", showRowRemoveButton: "showRowRemoveButton", showRowEditButton: "showRowEditButton", reorderableRows: "reorderableRows", loading: "loading", tableStyle: "tableStyle", tableStyleClass: "tableStyleClass", sortable: "sortable", filterableByColumns: "filterableByColumns", autoColumnFilterType: "autoColumnFilterType", sortMode: "sortMode", customSort: "customSort", hasToolbar: "hasToolbar", toolbarSize: "toolbarSize", toolbarTitle: "toolbarTitle", toolbarIcon: "toolbarIcon", toolbarIconColor: "toolbarIconColor", scrollable: "scrollable", scrollHeight: "scrollHeight", virtualScroll: "virtualScroll", numToleratedItems: "numToleratedItems", paginator: "paginator", alwaysShowPaginator: "alwaysShowPaginator", rowsPerPageOptions: "rowsPerPageOptions", first: "first", rows: "rows", resetPageOnRowsChange: "resetPageOnRowsChange", resetPageOnSort: "resetPageOnSort", totalRecords: "totalRecords", emptyMessage: "emptyMessage", emptyBodyHeight: "emptyBodyHeight", lazy: "lazy", lazyLoadOnInit: "lazyLoadOnInit", showGlobalFilter: "showGlobalFilter", globalFilterPlaceholder: "globalFilterPlaceholder", globalFilterFields: "globalFilterFields", clearGlobalFilterOnLoading: "clearGlobalFilterOnLoading", showRemoveBtnOnSelect: "showRemoveBtnOnSelect", removeBtnOnSelectDisabled: "removeBtnOnSelectDisabled", showAdditionalBtnOnSelect: "showAdditionalBtnOnSelect", additionalBtnOnSelectTitle: "additionalBtnOnSelectTitle", additionalBtnOnSelectIcon: "additionalBtnOnSelectIcon", additionalBtnOnSelectDisabled: "additionalBtnOnSelectDisabled", showActionBtn: "showActionBtn", actionBtnTitle: "actionBtnTitle", actionBtnIcon: "actionBtnIcon", actionBtnDisabled: "actionBtnDisabled", showExportBtn: "showExportBtn", exportBtnDisabled: "exportBtnDisabled", exportFilename: "exportFilename", csvSeparator: "csvSeparator", showDataReloadBtn: "showDataReloadBtn", dataReloadBtnDisabled: "dataReloadBtnDisabled", showColumnsToggleBtn: "showColumnsToggleBtn", columnsToggleBtnDisabled: "columnsToggleBtnDisabled", initialColumns: "initialColumns", renderDataAsHTML: "renderDataAsHTML", data: "data" }, outputs: { rowsSelected: "rowsSelected", selectedRowIndexes: "selectedRowIndexes", actionBtnClicked: "actionBtnClicked", editRowBtnClicked: "editRowBtnClicked", rowsToRemove: "rowsToRemove", rowIndexesToRemove: "rowIndexesToRemove", pageChanged: "pageChanged", sorted: "sorted", filtered: "filtered", rowsReordered: "rowsReordered", columnsSelected: "columnsSelected", lazyLoaded: "lazyLoaded", dataReloadBtnClicked: "dataReloadBtnClicked", additionalBtnOnSelectClicked: "additionalBtnOnSelectClicked", customSortFunction: "customSortFunction" }, providers: [
7560
+ TableService,
7561
+ {
7562
+ provide: Table,
7563
+ useFactory: tableFactory,
7564
+ // eslint-disable-next-line no-use-before-define
7565
+ deps: [CpsTableComponent]
7566
+ }
7567
+ ], queries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbar"], descendants: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true }, { propertyName: "nestedHeaderTemplate", first: true, predicate: ["nestedHeader"], descendants: true }, { propertyName: "bodyTemplate", first: true, predicate: ["body"], descendants: true }, { propertyName: "rowExpansionTemplate", first: true, predicate: ["rowexpansion"], descendants: true }], viewQueries: [{ propertyName: "primengTable", first: true, predicate: ["primengTable"], descendants: true, static: true }, { propertyName: "globalFilterComp", first: true, predicate: ["globalFilterComp"], descendants: true }, { propertyName: "exportMenu", first: true, predicate: ["exportMenu"], descendants: true }, { propertyName: "colToggleMenu", first: true, predicate: ["colToggleMenu"], descendants: true }, { propertyName: "tUnsortDirective", first: true, predicate: ["tUnsortDirective"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<p-table\n #primengTable\n #tUnsortDirective=\"tWithUnsort\"\n tWithUnsort\n [ngClass]=\"{ 'cps-table-loading': loading }\"\n [styleClass]=\"styleClass\"\n [tableStyle]=\"tableStyle\"\n [tableStyleClass]=\"tableStyleClass\"\n [value]=\"data\"\n [dataKey]=\"dataKey\"\n [columns]=\"selectedColumns\"\n (selectionChange)=\"onSelectionChanged($event)\"\n [globalFilterFields]=\"globalFilterFields\"\n [showInitialSortBadge]=\"false\"\n [loading]=\"loading\"\n [scrollable]=\"scrollable\"\n [scrollHeight]=\"scrollHeight\"\n [lazy]=\"lazy\"\n [lazyLoadOnInit]=\"lazyLoadOnInit\"\n [virtualScroll]=\"virtualScroll\"\n [virtualScrollItemSize]=\"virtualScrollItemSize\"\n [virtualScrollOptions]=\"{ numToleratedItems: numToleratedItems }\"\n [paginator]=\"paginator\"\n [showCurrentPageReport]=\"true\"\n [alwaysShowPaginator]=\"alwaysShowPaginator\"\n [rows]=\"rows\"\n [first]=\"first\"\n [totalRecords]=\"totalRecords\"\n [resetPageOnSort]=\"resetPageOnSort\"\n currentPageReportTemplate=\"{first} - {last} of {totalRecords}\"\n [(selection)]=\"selectedRows\"\n [metaKeySelection]=\"false\"\n [rowHover]=\"rowHover\"\n [customSort]=\"customSort\"\n [sortMode]=\"sortMode\"\n [exportFilename]=\"exportFilename\"\n [csvSeparator]=\"csvSeparator\"\n (onPage)=\"onPageChange($event)\"\n (onLazyLoad)=\"onLazyLoaded($event)\"\n (sortFunction)=\"onSortFunction($event)\"\n (onSort)=\"onSort($event)\"\n (onFilter)=\"onFilter($event)\"\n (onRowReorder)=\"onRowReorder($event)\">\n <ng-template pTemplate=\"caption\" *ngIf=\"hasToolbar\">\n <ng-container *ngIf=\"toolbarTemplate\">\n <ng-container *ngTemplateOutlet=\"toolbarTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!toolbarTemplate\">\n <div class=\"cps-table-tbar-left\">\n <div *ngIf=\"toolbarIcon\" class=\"cps-table-tbar-icon\">\n <cps-icon [icon]=\"toolbarIcon\" [color]=\"toolbarIconColor\"></cps-icon>\n </div>\n <div class=\"cps-table-tbar-title\">{{ toolbarTitle }}</div>\n <div *ngIf=\"showGlobalFilter\" class=\"cps-table-tbar-global-filter\">\n <cps-input\n #globalFilterComp\n prefixIcon=\"search\"\n [placeholder]=\"globalFilterPlaceholder\"\n (valueChanged)=\"onFilterGlobal($event)\"\n [clearable]=\"true\"\n [disabled]=\"loading\"\n [appearance]=\"toolbarSize === 'small' ? 'underlined' : 'outlined'\"\n [hideDetails]=\"true\">\n </cps-input>\n </div>\n </div>\n <div class=\"cps-table-tbar-right\">\n <div\n *ngIf=\"showRemoveBtnOnSelect && selectedRows.length > 0\"\n class=\"cps-table-tbar-btn-on-select\">\n <cps-button\n label=\"Remove\"\n [disabled]=\"removeBtnOnSelectDisabled\"\n color=\"prepared\"\n type=\"borderless\"\n icon=\"remove\"\n [size]=\"toolbarSize\"\n (clicked)=\"removeSelected()\">\n </cps-button>\n </div>\n <div\n *ngIf=\"showAdditionalBtnOnSelect && selectedRows.length > 0\"\n class=\"cps-table-tbar-btn-on-select\">\n <cps-button\n [label]=\"additionalBtnOnSelectTitle\"\n [disabled]=\"additionalBtnOnSelectDisabled\"\n color=\"prepared\"\n type=\"borderless\"\n [icon]=\"additionalBtnOnSelectIcon\"\n [size]=\"toolbarSize\"\n (clicked)=\"onClickAdditionalBtnOnSelect()\">\n </cps-button>\n </div>\n <div *ngIf=\"showActionBtn\" class=\"cps-table-tbar-action-btn\">\n <cps-button\n [label]=\"actionBtnTitle\"\n [disabled]=\"actionBtnDisabled\"\n color=\"prepared\"\n type=\"outlined\"\n [icon]=\"actionBtnIcon\"\n [size]=\"toolbarSize\"\n (clicked)=\"onClickActionBtn()\">\n </cps-button>\n </div>\n <div\n *ngIf=\"showColumnsToggleBtn && columns.length > 0\"\n class=\"cps-table-tbar-coltoggle-btn\"\n [ngClass]=\"{ 'btn-disabled': columnsToggleBtnDisabled }\">\n <cps-icon\n icon=\"columns\"\n size=\"normal\"\n [color]=\"\n columnsToggleBtnDisabled ? 'text-lightest' : 'prepared-lighten1'\n \"\n (click)=\"onColumnsToggle($event)\"></cps-icon>\n <cps-menu #colToggleMenu [withArrow]=\"false\">\n <div class=\"cps-table-coltoggle-menu\">\n <div\n class=\"cps-table-coltoggle-menu-item select-all-option\"\n [class.allselected]=\"selectedColumns.length === columns.length\"\n (click)=\"toggleAllColumns()\">\n <span class=\"cps-table-coltoggle-menu-item-left\">\n <span class=\"cps-table-coltoggle-menu-item-check\"> </span>\n <span class=\"cps-table-coltoggle-menu-item-label\"\n >Show all columns</span\n >\n </span>\n </div>\n <div\n *ngFor=\"let col of columns\"\n class=\"cps-table-coltoggle-menu-item\"\n (click)=\"onSelectColumn(col)\"\n [class.selected]=\"isColumnSelected(col)\">\n <span class=\"cps-table-coltoggle-menu-item-left\">\n <span class=\"cps-table-coltoggle-menu-item-check\"></span>\n <span class=\"cps-table-coltoggle-menu-item-label\">{{\n col[colHeaderName]\n }}</span>\n </span>\n </div>\n </div>\n </cps-menu>\n </div>\n <div\n *ngIf=\"showExportBtn\"\n class=\"cps-table-tbar-export-btn\"\n [ngClass]=\"{ 'btn-disabled': exportBtnDisabled }\">\n <cps-icon\n icon=\"export\"\n size=\"20\"\n [color]=\"exportBtnDisabled ? 'text-light' : 'prepared-lighten1'\"\n (click)=\"onExportData($event)\"></cps-icon>\n <cps-menu\n #exportMenu\n [items]=\"exportMenuItems\"\n [compressed]=\"true\"\n [withArrow]=\"false\">\n </cps-menu>\n </div>\n <div\n *ngIf=\"showDataReloadBtn\"\n class=\"cps-table-tbar-reload-btn\"\n [ngClass]=\"{ 'btn-disabled': dataReloadBtnDisabled }\">\n <cps-icon\n icon=\"refresh\"\n size=\"18\"\n [color]=\"dataReloadBtnDisabled ? 'text-light' : 'prepared-lighten1'\"\n (click)=\"onReloadData()\">\n </cps-icon>\n </div>\n </div>\n </ng-container>\n </ng-template>\n\n <ng-template pTemplate=\"header\" *ngIf=\"nestedHeaderTemplate\" let-columns>\n <ng-container\n *ngTemplateOutlet=\"\n nestedHeaderTemplate;\n context: {\n $implicit: columns\n }\n \"></ng-container>\n </ng-template>\n\n <ng-template pTemplate=\"header\" *ngIf=\"!nestedHeaderTemplate\" let-columns>\n <tr>\n <th style=\"width: 3rem\" *ngIf=\"rowExpansionTemplate\"></th>\n <th style=\"width: 3rem\" *ngIf=\"reorderableRows\"></th>\n <th style=\"width: 4rem\" *ngIf=\"selectable\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <ng-container *ngIf=\"headerTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n headerTemplate;\n context: {\n $implicit: columns\n }\n \"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!headerTemplate && columns.length > 0\">\n <ng-container *ngIf=\"sortable\">\n @if (filterableByColumns) {\n <th\n *ngFor=\"let col of columns\"\n [cpsTColSortable]=\"col[colFieldName]\"\n [cpsTColFilter]=\"col[colFieldName]\"\n [filterType]=\"\n col[colFilterTypeName] ??\n (autoColumnFilterType\n ? (data | cpsDetectFilterType: col[colFieldName])\n : 'text')\n \">\n {{ col[colHeaderName] }}\n </th>\n } @else {\n <th\n *ngFor=\"let col of columns\"\n [cpsTColSortable]=\"col[colFieldName]\">\n {{ col[colHeaderName] }}\n </th>\n }\n </ng-container>\n <ng-container *ngIf=\"!sortable\">\n @if (filterableByColumns) {\n <th\n *ngFor=\"let col of columns\"\n [cpsTColFilter]=\"col[colFieldName]\"\n [filterType]=\"\n col[colFilterTypeName] ??\n (autoColumnFilterType\n ? (data | cpsDetectFilterType: col[colFieldName])\n : 'text')\n \">\n {{ col[colHeaderName] }}\n </th>\n } @else {\n <th *ngFor=\"let col of columns\">\n {{ col[colHeaderName] }}\n </th>\n }\n </ng-container>\n </ng-container>\n <th\n style=\"width: 2rem\"\n class=\"cps-table-row-menu-cell\"\n *ngIf=\"showRowMenu && (showRowRemoveButton || showRowEditButton)\"></th>\n </tr>\n </ng-template>\n\n <ng-template\n pTemplate=\"body\"\n let-rowData\n let-columns=\"columns\"\n let-item\n let-rowIndex=\"rowIndex\"\n let-expanded=\"expanded\">\n <tr\n [pReorderableRow]=\"rowIndex\"\n [ngClass]=\"{\n 'cps-table-row-selected': selectable && primengTable.isSelected(item)\n }\">\n <td *ngIf=\"rowExpansionTemplate\" class=\"cps-table-row-chevron-cell\">\n <div\n class=\"cps-table-row-chevron\"\n [ngClass]=\"{ 'cps-table-row-chevron-expanded': expanded }\">\n <cps-icon\n icon=\"chevron-down\"\n size=\"small\"\n color=\"text-dark\"\n [pRowToggler]=\"item\">\n </cps-icon>\n </div>\n </td>\n <td *ngIf=\"reorderableRows\" class=\"cps-table-row-drag-handle-cell\">\n <span class=\"cps-table-row-drag-handle\" pReorderableRowHandle>\u2630</span>\n </td>\n <td *ngIf=\"selectable\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <ng-container *ngIf=\"bodyTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n bodyTemplate;\n context: {\n $implicit: item,\n rowIndex: rowIndex,\n columns: columns,\n rowData: rowData\n }\n \">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!bodyTemplate\">\n <ng-container *ngIf=\"columns.length > 0\">\n @if (renderDataAsHTML) {\n <td\n *ngFor=\"let col of columns\"\n [innerHTML]=\"rowData[col[colFieldName]]\"></td>\n } @else {\n <td *ngFor=\"let col of columns\">\n {{\n col[colDateFormatName]\n ? (rowData[col[colFieldName]] | date: col[colDateFormatName])\n : rowData[col[colFieldName]]\n }}\n </td>\n }\n </ng-container>\n </ng-container>\n <td\n *ngIf=\"showRowMenu && (showRowRemoveButton || showRowEditButton)\"\n class=\"cps-table-row-menu-cell\">\n <table-row-menu\n (editRowBtnClicked)=\"onEditRowClicked(item)\"\n (removeRowBtnClicked)=\"onRemoveRowClicked(item)\"\n [showRowRemoveButton]=\"showRowRemoveButton\"\n [showRowEditButton]=\"showRowEditButton\">\n </table-row-menu>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"rowexpansion\" *ngIf=\"rowExpansionTemplate\" let-item>\n <tr class=\"cps-table-row-expanded-content\">\n <td colspan=\"100\">\n <ng-container\n *ngTemplateOutlet=\"\n rowExpansionTemplate;\n context: {\n $implicit: item\n }\n \"></ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td\n colspan=\"100\"\n class=\"cps-table-empty-message-td\"\n [ngStyle]=\"{ height: emptyBodyHeight }\">\n {{ emptyMessage }}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"loadingicon\">\n <cps-loader [fullScreen]=\"false\" opacity=\"0\"></cps-loader>\n </ng-template>\n <ng-template pTemplate=\"paginatorleft\">\n <div class=\"cps-table-paginator-itms-per-page\">\n <span class=\"cps-table-paginator-items-per-page-title\"\n >Rows per page:\n </span>\n <cps-select\n [options]=\"rowOptions\"\n [hideDetails]=\"true\"\n [(ngModel)]=\"rows\"\n (valueChanged)=\"onRowsPerPageChanged()\"\n [returnObject]=\"false\"\n optionsClass=\"cps-paginator-page-options\">\n </cps-select>\n </div>\n </ng-template>\n</p-table>\n", styles: [":host ::ng-deep .p-component{font-family:Source Sans Pro,sans-serif;font-size:14px;font-weight:400}:host ::ng-deep .p-datatable-flex-scrollable{display:flex;flex-direction:column;height:100%}:host ::ng-deep .p-datatable{position:relative}:host ::ng-deep .p-datatable.p-datatable-gridlines .p-datatable-header{border-width:1px 1px 0 1px}:host ::ng-deep .p-datatable .p-datatable-header{font-weight:600;display:flex;justify-content:space-between;align-items:center;padding:0 10px;border:unset;background:unset;border-top:1px solid var(--cps-color-line-mid);border-right:1px solid var(--cps-color-line-mid);border-left:4px solid var(--cps-color-surprise)!important;border-radius:4px 4px 0 0;font-size:16px;line-height:150%;background-color:#fff;color:var(--cps-color-text-darkest);overflow:auto}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left{display:flex;align-items:center}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left .cps-table-tbar-global-filter{margin-left:12px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left .cps-table-tbar-icon{display:flex;margin-right:8px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left .cps-table-tbar-title{cursor:default}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right{display:flex;align-items:center}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-btn-on-select{margin-right:4px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-action-btn{margin-right:4px;margin-left:8px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn{display:contents}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn cps-icon{margin-left:12px;margin-right:4px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn:not(.btn-disabled) cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn:not(.btn-disabled) cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn:not(.btn-disabled) cps-icon{cursor:pointer}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn:not(.btn-disabled) cps-icon:hover .cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn:not(.btn-disabled) cps-icon:hover .cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn:not(.btn-disabled) cps-icon:hover .cps-icon{color:var(--cps-color-prepared)!important}:host ::ng-deep .cps-tbar-small.p-datatable .p-datatable-header{height:43px}:host ::ng-deep .cps-tbar-normal.p-datatable .p-datatable-header{height:72px}:host ::ng-deep .p-datatable-flex-scrollable>.p-datatable-wrapper{display:flex;flex-direction:column;flex:1;height:100%}:host ::ng-deep .p-datatable-scrollable>.p-datatable-wrapper{position:relative}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow:auto}:host ::ng-deep .p-datatable-table{border-spacing:0px;width:100%}:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-thead,:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-tfoot,:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-scroller-viewport>.p-scroller>.p-datatable-table>.p-datatable-thead,:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-scroller-viewport>.p-scroller>.p-datatable-table>.p-datatable-tfoot{background-color:#fff}:host ::ng-deep .p-datatable-scrollable-table>.p-datatable-thead{position:sticky;top:0;z-index:1}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{padding:.5rem}:host ::ng-deep .p-datatable.p-datatable-lg .p-datatable-thead>tr>th{padding:1.25rem}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{text-align:left;padding:1rem;border:1px solid var(--cps-color-line-mid);border-width:0 0 1px 1px;font-weight:400;color:var(--cps-color-text-mild);background:#fff;transition:box-shadow .2s}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-width:1px}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{border-width:1px 0 1px 1px}:host ::ng-deep .p-datatable .p-datatable-thead tr:not(:first-child) th{border-top:unset}:host ::ng-deep .p-datatable .p-sortable-column:not(.p-highlight):hover .cps-sortable-column-icon.sort-unsorted .sort-unsorted-arrow-up{border-bottom-color:var(--cps-color-text-mild)}:host ::ng-deep .p-datatable .p-sortable-column:not(.p-highlight):hover .cps-sortable-column-icon.sort-unsorted .sort-unsorted-arrow-down{border-top-color:var(--cps-color-text-mild)}:host ::ng-deep .p-icon{display:inline-block;width:1rem;height:1rem}:host ::ng-deep .p-datatable .p-sortable-column .cps-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center;font-size:12px;vertical-align:top;color:var(--cps-color-calm);margin-left:.25rem}:host ::ng-deep .p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:none;cursor:pointer;-webkit-user-select:none;user-select:none}:host ::ng-deep .p-datatable .p-sortable-column{cursor:pointer;-webkit-user-select:none;user-select:none}:host ::ng-deep .p-datatable .p-sortable-column:focus{box-shadow:none;outline:0 none}:host ::ng-deep .p-datatable.p-datatable-striped .p-datatable-tbody>tr:nth-child(odd){background:var(--cps-color-bg-light)}:host ::ng-deep .p-datatable.p-datatable-striped .p-datatable-tbody>tr:nth-child(2n){background:#fff}:host ::ng-deep .p-datatable.p-datatable-hoverable-rows .p-datatable-tbody>tr:not(.p-highlight):not(.cps-table-row-expanded-content):hover{background:var(--cps-color-highlight-hover)}:host ::ng-deep .p-datatable .p-datatable-tbody .cps-table-row-expanded-content td{border-left:4px solid var(--cps-color-surprise)!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr{background:#fff;color:var(--cps-color-text-dark);transition:box-shadow .2s}:host ::ng-deep .p-datatable .p-datatable-tbody>tr.cps-table-row-selected{background-color:var(--cps-color-highlight-active)!important}:host ::ng-deep .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody>tr>td:last-child{border-width:0 1px 1px 1px}:host ::ng-deep .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody>tr>td{border-width:0 0 1px 1px}:host ::ng-deep .p-datatable.p-datatable-gridlines .p-datatable-tbody>tr>td:last-child{border-width:1px 1px 0 1px}:host ::ng-deep .p-datatable.p-datatable-gridlines .p-datatable-tbody>tr>td{border-width:1px 0 0 1px}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{text-align:left;border:1px solid var(--cps-color-line-mid);border-width:0 0 1px 0;padding:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-width:0 0 1px 1px}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-width:0 1px 1px 0}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:only-child{border-width:0 1px 1px 1px}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{padding:.5rem}:host ::ng-deep .p-datatable.p-datatable-lg .p-datatable-tbody>tr>td{padding:1.25rem}:host ::ng-deep td:has(p-tablecheckbox){text-align:center!important}:host ::ng-deep th:has(p-tableheadercheckbox){text-align:center!important;width:3rem!important}:host ::ng-deep .p-checkbox{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom;position:relative;width:18px;height:18px}:host ::ng-deep .p-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}:host ::ng-deep .p-hidden-accessible input,:host ::ng-deep .p-hidden-accessible select{transform:scale(0)}:host ::ng-deep .p-checkbox .p-checkbox-box{background:#fff;width:18px;height:18px;color:var(--cps-color-text-dark);border:2px solid var(--cps-color-text-mild);border-radius:2px;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s}:host ::ng-deep .p-checkbox-box{display:flex;justify-content:center;align-items:center}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:var(--cps-color-calm);background:var(--cps-color-calm)}:host ::ng-deep .p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box.p-highlight:hover{border-color:var(--cps-color-calm);background:var(--cps-color-calm);color:#fff}:host ::ng-deep .p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box:hover{border-color:var(--cps-color-calm)}:host ::ng-deep .p-checkbox .p-checkbox-box .p-icon{width:14px;height:14px}:host ::ng-deep .p-checkbox .p-checkbox-box .p-checkbox-icon{transition-duration:.2s;color:#fff;font-size:14px}:host ::ng-deep .p-datatable-reorderablerow-handle,:host ::ng-deep [pReorderableColumn]{cursor:move;font-size:20px;line-height:1}:host ::ng-deep .p-datatable-reorderablerow-handle:hover,:host ::ng-deep [pReorderableColumn]:hover{color:var(--cps-color-calm)}:host ::ng-deep .p-datatable .p-datatable-tbody>tr.p-datatable-dragpoint-top>td{box-shadow:inset 0 2px 0 0 var(--cps-color-calm)}:host ::ng-deep .p-datatable .p-datatable-tbody>tr.p-datatable-dragpoint-bottom>td{box-shadow:inset 0 -2px 0 0 var(--cps-color-calm)}:host ::ng-deep .p-datatable .p-paginator-bottom{border-width:0 1px 1px 1px;border-radius:0}:host ::ng-deep .p-paginator{background:#fff;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;color:var(--cps-color-text-dark);padding:1rem;border:1px solid var(--cps-color-line-mid)}:host ::ng-deep .p-paginator-left-content{margin-right:auto}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page{display:inline-flex;align-items:center}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-table-paginator-items-per-page-title{font-family:Source Sans Pro,sans-serif;font-size:14px;margin-right:12px;cursor:default}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-select-box{min-height:32px!important;background:transparent!important}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-select-box .cps-select-box-items{font-size:14px!important}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-select-box .cps-select-box-chevron .cps-icon{width:14px;height:14px}:host ::ng-deep .p-paginator .p-paginator-current{background-color:transparent;border:0 none;color:var(--cps-color-text-dark);min-width:3rem;margin:.143rem;padding:0 .5rem;font-family:Source Sans Pro,sans-serif;font-size:14px;height:unset}:host ::ng-deep .p-paginator-page,:host ::ng-deep .p-paginator-next,:host ::ng-deep .p-paginator-last,:host ::ng-deep .p-paginator-first,:host ::ng-deep .p-paginator-prev,:host ::ng-deep .p-paginator-current{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;-webkit-user-select:none;user-select:none;overflow:hidden;position:relative}:host ::ng-deep .p-paginator-current{cursor:default}:host ::ng-deep .p-paginator .p-paginator-first:not(.p-disabled):not(.p-highlight):hover,:host ::ng-deep .p-paginator .p-paginator-prev:not(.p-disabled):not(.p-highlight):hover,:host ::ng-deep .p-paginator .p-paginator-next:not(.p-disabled):not(.p-highlight):hover,:host ::ng-deep .p-paginator .p-paginator-last:not(.p-disabled):not(.p-highlight):hover{background:var(--cps-color-highlight-hover);border-color:unset}:host ::ng-deep .p-paginator .p-paginator-first:not(.p-disabled):not(.p-highlight):active,:host ::ng-deep .p-paginator .p-paginator-prev:not(.p-disabled):not(.p-highlight):active,:host ::ng-deep .p-paginator .p-paginator-next:not(.p-disabled):not(.p-highlight):active,:host ::ng-deep .p-paginator .p-paginator-last:not(.p-disabled):not(.p-highlight):active{background:var(--cps-color-highlight-active)}:host ::ng-deep .p-paginator .p-paginator-first,:host ::ng-deep .p-paginator .p-paginator-prev,:host ::ng-deep .p-paginator .p-paginator-next,:host ::ng-deep .p-paginator .p-paginator-last{background-color:transparent;border:1px solid var(--cps-color-text-dark);border-radius:4px;color:var(--cps-color-text-dark);min-width:32px;height:32px;margin:.143rem;transition:box-shadow .2s}:host ::ng-deep .p-icon-wrapper{display:inline-flex}:host ::ng-deep .p-disabled,:host ::ng-deep .p-disabled *{cursor:default!important;pointer-events:none}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page.p-highlight{background:var(--cps-color-calm);border-color:var(--cps-color-calm);color:#fff}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page:not(.p-highlight):hover{background:var(--cps-color-highlight-hover);border-color:unset}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page:not(.p-highlight):active{background:var(--cps-color-highlight-active)}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page{background-color:transparent;border:1px solid var(--cps-color-text-dark);border-radius:4px;color:var(--cps-color-text-dark);min-width:32px;height:32px;margin:.143rem;transition:box-shadow .2s}:host ::ng-deep .p-paginator-element:focus{z-index:1;position:relative}:host ::ng-deep .p-link:focus{outline:0 none;outline-offset:0;box-shadow:unset}:host ::ng-deep .p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:none;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:14px;font-family:Source Sans Pro,sans-serif}:host ::ng-deep .p-disabled,:host ::ng-deep .p-component:disabled{opacity:.4}:host ::ng-deep .cps-table-empty-message-td{text-align:center!important;font-weight:600;background:#fff}:host ::ng-deep .cps-table-row-drag-handle-cell{text-align:center!important}:host ::ng-deep .cps-table-row-drag-handle-cell .cps-table-row-drag-handle{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host ::ng-deep .cps-table-row-chevron-cell{text-align:center!important}:host ::ng-deep .cps-table-row-chevron-cell .cps-table-row-chevron{transition-duration:.2s;cursor:pointer;display:inline-flex}:host ::ng-deep .cps-table-row-chevron-cell .cps-table-row-chevron:hover cps-icon .cps-icon{color:var(--cps-color-calm)!important}:host ::ng-deep .cps-table-row-chevron-cell .cps-table-row-chevron-expanded{transform:rotate(180deg)}:host ::ng-deep .cps-table-row-menu-cell{border-left:none!important}:host ::ng-deep .p-datatable .p-datatable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:1001;top:0;left:0;width:100%;height:100%;background-color:#fff;transition-duration:.2s;border:1px solid var(--cps-color-line-mid)}:host ::ng-deep .p-datatable.cps-tbar-small .p-datatable-loading-overlay{top:43px;height:calc(100% - 43px)}:host ::ng-deep .p-datatable.cps-tbar-normal .p-datatable-loading-overlay{top:72px;height:calc(100% - 72px)}:host ::ng-deep .cps-table-loading .p-datatable{min-height:200px}:host ::ng-deep .cps-table-loading .p-datatable.cps-tbar-normal{min-height:272px}:host ::ng-deep .cps-table-loading .p-datatable.cps-tbar-small{min-height:243px}:host ::ng-deep .cps-table-col-filter-menu-open .cps-table-col-filter-menu-button{color:var(--cps-color-text-dark)}.cps-table-coltoggle-menu{display:block;max-height:242px;overflow-x:hidden;background:#fff}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item{padding:12px;justify-content:space-between;display:flex;cursor:pointer}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item:hover{background:var(--cps-color-highlight-hover)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-label{color:var(--cps-color-text-dark)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-left{display:flex;align-items:center;margin-right:8px}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-check{background-color:transparent;border:0;width:16px;height:16px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1);margin-right:8px;opacity:0}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-check:after{color:var(--cps-color-calm);top:4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box;position:absolute;content:\"\";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected,.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.allselected{font-weight:600}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected .cps-table-coltoggle-menu-item-label,.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.allselected .cps-table-coltoggle-menu-item-label{color:var(--cps-color-calm)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected .cps-table-coltoggle-menu-item-check,.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.allselected .cps-table-coltoggle-menu-item-check{opacity:1}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected{background:var(--cps-color-highlight-selected)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.highlighten{background:var(--cps-color-highlight-active)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected.highlighten{background:var(--cps-color-highlight-selected-dark)}.cps-table-coltoggle-menu .select-all-option{border-bottom:1px solid lightgrey;font-weight:600}::ng-deep .cps-select-options-menu.cps-paginator-page-options .cps-select-options-option{font-size:14px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i1$3.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i1$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i1$3.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { kind: "component", type: i1$3.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i1$3.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i1$3.ReorderableRowHandle, selector: "[pReorderableRowHandle]" }, { kind: "directive", type: i1$3.ReorderableRow, selector: "[pReorderableRow]", inputs: ["pReorderableRow", "pReorderableRowDisabled"] }, { kind: "directive", type: TableUnsortDirective, selector: "[tWithUnsort]", exportAs: ["tWithUnsort"] }, { kind: "component", type: CpsInputComponent, selector: "cps-input", inputs: ["label", "hint", "placeholder", "disabled", "readonly", "width", "type", "loading", "clearable", "prefixIcon", "prefixIconClickable", "prefixIconSize", "prefixText", "hideDetails", "persistentClear", "error", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "appearance", "valueToDisplay", "value"], outputs: ["valueChanged", "focused", "prefixIconClicked", "blurred", "cleared", "enterClicked"] }, { kind: "component", type: CpsButtonComponent, selector: "cps-button", inputs: ["color", "contentColor", "borderRadius", "type", "label", "icon", "iconPosition", "size", "width", "height", "disabled", "loading"], outputs: ["clicked"] }, { kind: "component", type: CpsSelectComponent, selector: "cps-select", inputs: ["label", "placeholder", "hint", "returnObject", "multiple", "disabled", "width", "selectAll", "chips", "closableChips", "clearable", "openOnClear", "options", "keepInitialOrder", "optionLabel", "optionValue", "optionInfo", "hideDetails", "persistentClear", "prefixIcon", "prefixIconSize", "loading", "virtualScroll", "numToleratedItems", "infoTooltip", "infoTooltipClass", "infoTooltipMaxWidth", "infoTooltipPersistent", "infoTooltipPosition", "optionsClass", "appearance", "showChevron", "value"], outputs: ["valueChanged", "focused", "blurred"] }, { kind: "component", type: CpsIconComponent, selector: "cps-icon", inputs: ["icon", "size", "color"] }, { kind: "component", type: CpsMenuComponent, selector: "cps-menu", inputs: ["header", "items", "withArrow", "compressed", "focusOnShow", "persistent", "containerClass", "showTransitionOptions", "hideTransitionOptions"], outputs: ["menuShown", "menuHidden", "beforeMenuHidden", "contentClicked"] }, { kind: "component", type: CpsLoaderComponent, selector: "cps-loader", inputs: ["fullScreen", "opacity", "labelColor", "showLabel"] }, { kind: "component", type: TableRowMenuComponent, selector: "table-row-menu", inputs: ["showRowRemoveButton", "showRowEditButton"], outputs: ["editRowBtnClicked", "removeRowBtnClicked"] }, { kind: "directive", type: CpsTableColumnSortableDirective, selector: "[cpsTColSortable]", inputs: ["cpsTColSortable"] }, { kind: "directive", type: CpsTableColumnFilterDirective, selector: "[cpsTColFilter]", inputs: ["cpsTColFilter", "filterType", "filterPersistent", "filterShowClearButton", "filterShowApplyButton", "filterShowCloseButton", "filterShowMatchModes", "filterMatchModes", "filterShowOperator", "filterMaxConstraints", "filterHeaderTitle", "filterHideOnClear", "filterCategoryOptions", "filterAsButtonToggle", "filterSingleSelection", "filterPlaceholder"], exportAs: ["cpsTColFilter"] }, { kind: "pipe", type: CpsDetectFilterTypePipe, name: "cpsDetectFilterType" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7490
7568
  }
7491
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TableColumnFilterComponent, decorators: [{
7569
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsTableComponent, decorators: [{
7492
7570
  type: Component,
7493
- args: [{ selector: 'table-column-filter', standalone: true, imports: [
7494
- CommonModule,
7571
+ args: [{ selector: 'cps-table', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
7495
7572
  FormsModule,
7573
+ CommonModule,
7574
+ TableModule,
7575
+ TableUnsortDirective,
7576
+ CpsInputComponent,
7496
7577
  CpsButtonComponent,
7497
- CpsMenuComponent,
7498
- CpsIconComponent,
7499
7578
  CpsSelectComponent,
7500
- TableColumnFilterConstraintComponent
7501
- ], template: "<div class=\"cps-table-col-filter\">\n <cps-menu\n #columnFilterMenu\n [withArrow]=\"false\"\n hideTransitionOptions=\"0s linear\"\n [persistent]=\"persistent || (showApplyButton && isCategoryDropdownOpened)\"\n (menuShown)=\"onMenuShown()\"\n (menuHidden)=\"onMenuHidden()\"\n (beforeMenuHidden)=\"onBeforeMenuHidden()\">\n <div class=\"cps-table-col-filter-menu-content\">\n <div\n class=\"cps-table-col-filter-menu-content-header\"\n *ngIf=\"showCloseButton || headerTitle\">\n <span class=\"cps-table-col-filter-menu-content-header-title\">\n {{ headerTitle }}\n </span>\n <cps-icon\n *ngIf=\"showCloseButton\"\n icon=\"close-x\"\n (click)=\"onCloseClick()\"></cps-icon>\n </div>\n <div\n class=\"cps-table-col-filter-menu-content-operator\"\n *ngIf=\"isShowOperator\">\n <cps-select\n [hideDetails]=\"true\"\n [disabled]=\"!fieldConstraints || fieldConstraints.length < 2\"\n [returnObject]=\"false\"\n [options]=\"operatorOptions\"\n [ngModel]=\"operator\"\n (valueChanged)=\"onOperatorChange($event)\"></cps-select>\n </div>\n <div class=\"cps-table-col-filter-menu-content-constraints\">\n <div\n *ngFor=\"let fieldConstraint of fieldConstraints; let i = index\"\n class=\"cps-table-col-filter-menu-content-constraint\">\n <cps-select\n *ngIf=\"showMatchModes && currentMatchModes\"\n class=\"cps-table-col-filter-match-mode-select\"\n [hideDetails]=\"true\"\n [returnObject]=\"false\"\n [options]=\"currentMatchModes\"\n [ngModel]=\"fieldConstraint.matchMode\"\n (valueChanged)=\"\n onMenuMatchModeChange($event, fieldConstraint)\n \"></cps-select>\n <table-column-filter-constraint\n #constraintComponent\n [type]=\"type\"\n [field]=\"field\"\n [asButtonToggle]=\"asButtonToggle\"\n [singleSelection]=\"singleSelection\"\n [categoryOptions]=\"categoryOptions\"\n [filterConstraint]=\"fieldConstraint\"\n [hasApplyButton]=\"showApplyButton\"\n [placeholder]=\"placeholder\">\n </table-column-filter-constraint>\n <div\n class=\"cps-table-col-filter-remove-rule-btn\"\n *ngIf=\"showRemoveIcon\">\n <cps-button\n type=\"borderless\"\n width=\"100%\"\n size=\"small\"\n color=\"prepared\"\n icon=\"delete\"\n (clicked)=\"removeConstraint(fieldConstraint)\"\n label=\"Remove condition\">\n </cps-button>\n </div>\n </div>\n </div>\n <div\n class=\"cps-table-col-filter-add-rule-btn\"\n *ngIf=\"isShowAddConstraint\">\n <cps-button\n label=\"Add condition\"\n type=\"borderless\"\n width=\"100%\"\n size=\"small\"\n color=\"surprise\"\n icon=\"add\"\n (clicked)=\"addConstraint()\">\n </cps-button>\n </div>\n <div class=\"cps-table-col-filter-buttonbar\">\n <cps-button\n *ngIf=\"showClearButton\"\n (clicked)=\"clearFilter()\"\n type=\"borderless\"\n color=\"prepared\"\n size=\"small\"\n label=\"Clear\"></cps-button>\n <cps-button\n *ngIf=\"showApplyButton\"\n (clicked)=\"applyFilter()\"\n color=\"prepared\"\n size=\"small\"\n label=\"Apply\"></cps-button>\n </div>\n </div>\n </cps-menu>\n <cps-icon\n [icon]=\"isFilterApplied ? 'filter-funnel-filled' : 'filter-funnel'\"\n size=\"13\"\n (click)=\"columnFilterMenu.toggle($event)\"\n class=\"cps-table-col-filter-menu-button\"\n [ngClass]=\"{\n 'cps-table-col-filter-menu-button-active': isFilterApplied\n }\"\n >>\n </cps-icon>\n</div>\n", styles: [":host .cps-table-col-filter{display:inline-flex}:host .cps-table-col-filter .cps-table-col-filter-menu-button{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative;padding-left:8px;padding-right:4px}:host .cps-table-col-filter .cps-table-col-filter-menu-button:not(.cps-table-col-filter-menu-button-active):hover{color:var(--cps-color-text-dark)}:host .cps-table-col-filter .cps-table-col-filter-menu-button-active{color:var(--cps-color-calm-lighten1)}.cps-table-col-filter-menu-content{padding-bottom:12px;min-width:200px;max-height:500px;overflow:auto}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header{min-height:32px;padding:8px;border-bottom:1px solid var(--cps-color-line-mid);background:var(--cps-color-bg-light);display:flex;justify-content:space-between;align-items:center}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header-title{font-family:Source Sans Pro,sans-serif;color:var(--cps-color-text-darkest);max-width:390px;cursor:default}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header cps-icon{margin-left:8px;cursor:pointer}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-header cps-icon:hover{color:var(--cps-color-calm)}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-operator{padding:12px;border-bottom:1px solid var(--cps-color-line-mid);background:var(--cps-color-bg-light)}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-menu-content-constraint{border-bottom:1px solid var(--cps-color-line-mid);padding:12px}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-menu-content-constraint .cps-table-col-filter-match-mode-select{margin-bottom:8px}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-menu-content-constraint:last-child{border-bottom:none}.cps-table-col-filter-menu-content .cps-table-col-filter-menu-content-constraints .cps-table-col-filter-remove-rule-btn{padding-top:8px}.cps-table-col-filter-menu-content .cps-table-col-filter-add-rule-btn{padding:8px 12px}.cps-table-col-filter-menu-content .cps-table-col-filter-buttonbar{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 0}\n"] }]
7502
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$3.Table, decorators: [{
7503
- type: Optional
7504
- }] }, { type: i2$1.TreeTable, decorators: [{
7505
- type: Optional
7506
- }] }], propDecorators: { field: [{
7579
+ CpsIconComponent,
7580
+ CpsMenuComponent,
7581
+ CpsLoaderComponent,
7582
+ TableRowMenuComponent,
7583
+ CpsTableColumnSortableDirective,
7584
+ CpsTableColumnFilterDirective,
7585
+ CpsDetectFilterTypePipe
7586
+ ], providers: [
7587
+ TableService,
7588
+ {
7589
+ provide: Table,
7590
+ useFactory: tableFactory,
7591
+ // eslint-disable-next-line no-use-before-define
7592
+ deps: [CpsTableComponent]
7593
+ }
7594
+ ], template: "<p-table\n #primengTable\n #tUnsortDirective=\"tWithUnsort\"\n tWithUnsort\n [ngClass]=\"{ 'cps-table-loading': loading }\"\n [styleClass]=\"styleClass\"\n [tableStyle]=\"tableStyle\"\n [tableStyleClass]=\"tableStyleClass\"\n [value]=\"data\"\n [dataKey]=\"dataKey\"\n [columns]=\"selectedColumns\"\n (selectionChange)=\"onSelectionChanged($event)\"\n [globalFilterFields]=\"globalFilterFields\"\n [showInitialSortBadge]=\"false\"\n [loading]=\"loading\"\n [scrollable]=\"scrollable\"\n [scrollHeight]=\"scrollHeight\"\n [lazy]=\"lazy\"\n [lazyLoadOnInit]=\"lazyLoadOnInit\"\n [virtualScroll]=\"virtualScroll\"\n [virtualScrollItemSize]=\"virtualScrollItemSize\"\n [virtualScrollOptions]=\"{ numToleratedItems: numToleratedItems }\"\n [paginator]=\"paginator\"\n [showCurrentPageReport]=\"true\"\n [alwaysShowPaginator]=\"alwaysShowPaginator\"\n [rows]=\"rows\"\n [first]=\"first\"\n [totalRecords]=\"totalRecords\"\n [resetPageOnSort]=\"resetPageOnSort\"\n currentPageReportTemplate=\"{first} - {last} of {totalRecords}\"\n [(selection)]=\"selectedRows\"\n [metaKeySelection]=\"false\"\n [rowHover]=\"rowHover\"\n [customSort]=\"customSort\"\n [sortMode]=\"sortMode\"\n [exportFilename]=\"exportFilename\"\n [csvSeparator]=\"csvSeparator\"\n (onPage)=\"onPageChange($event)\"\n (onLazyLoad)=\"onLazyLoaded($event)\"\n (sortFunction)=\"onSortFunction($event)\"\n (onSort)=\"onSort($event)\"\n (onFilter)=\"onFilter($event)\"\n (onRowReorder)=\"onRowReorder($event)\">\n <ng-template pTemplate=\"caption\" *ngIf=\"hasToolbar\">\n <ng-container *ngIf=\"toolbarTemplate\">\n <ng-container *ngTemplateOutlet=\"toolbarTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!toolbarTemplate\">\n <div class=\"cps-table-tbar-left\">\n <div *ngIf=\"toolbarIcon\" class=\"cps-table-tbar-icon\">\n <cps-icon [icon]=\"toolbarIcon\" [color]=\"toolbarIconColor\"></cps-icon>\n </div>\n <div class=\"cps-table-tbar-title\">{{ toolbarTitle }}</div>\n <div *ngIf=\"showGlobalFilter\" class=\"cps-table-tbar-global-filter\">\n <cps-input\n #globalFilterComp\n prefixIcon=\"search\"\n [placeholder]=\"globalFilterPlaceholder\"\n (valueChanged)=\"onFilterGlobal($event)\"\n [clearable]=\"true\"\n [disabled]=\"loading\"\n [appearance]=\"toolbarSize === 'small' ? 'underlined' : 'outlined'\"\n [hideDetails]=\"true\">\n </cps-input>\n </div>\n </div>\n <div class=\"cps-table-tbar-right\">\n <div\n *ngIf=\"showRemoveBtnOnSelect && selectedRows.length > 0\"\n class=\"cps-table-tbar-btn-on-select\">\n <cps-button\n label=\"Remove\"\n [disabled]=\"removeBtnOnSelectDisabled\"\n color=\"prepared\"\n type=\"borderless\"\n icon=\"remove\"\n [size]=\"toolbarSize\"\n (clicked)=\"removeSelected()\">\n </cps-button>\n </div>\n <div\n *ngIf=\"showAdditionalBtnOnSelect && selectedRows.length > 0\"\n class=\"cps-table-tbar-btn-on-select\">\n <cps-button\n [label]=\"additionalBtnOnSelectTitle\"\n [disabled]=\"additionalBtnOnSelectDisabled\"\n color=\"prepared\"\n type=\"borderless\"\n [icon]=\"additionalBtnOnSelectIcon\"\n [size]=\"toolbarSize\"\n (clicked)=\"onClickAdditionalBtnOnSelect()\">\n </cps-button>\n </div>\n <div *ngIf=\"showActionBtn\" class=\"cps-table-tbar-action-btn\">\n <cps-button\n [label]=\"actionBtnTitle\"\n [disabled]=\"actionBtnDisabled\"\n color=\"prepared\"\n type=\"outlined\"\n [icon]=\"actionBtnIcon\"\n [size]=\"toolbarSize\"\n (clicked)=\"onClickActionBtn()\">\n </cps-button>\n </div>\n <div\n *ngIf=\"showColumnsToggleBtn && columns.length > 0\"\n class=\"cps-table-tbar-coltoggle-btn\"\n [ngClass]=\"{ 'btn-disabled': columnsToggleBtnDisabled }\">\n <cps-icon\n icon=\"columns\"\n size=\"normal\"\n [color]=\"\n columnsToggleBtnDisabled ? 'text-lightest' : 'prepared-lighten1'\n \"\n (click)=\"onColumnsToggle($event)\"></cps-icon>\n <cps-menu #colToggleMenu [withArrow]=\"false\">\n <div class=\"cps-table-coltoggle-menu\">\n <div\n class=\"cps-table-coltoggle-menu-item select-all-option\"\n [class.allselected]=\"selectedColumns.length === columns.length\"\n (click)=\"toggleAllColumns()\">\n <span class=\"cps-table-coltoggle-menu-item-left\">\n <span class=\"cps-table-coltoggle-menu-item-check\"> </span>\n <span class=\"cps-table-coltoggle-menu-item-label\"\n >Show all columns</span\n >\n </span>\n </div>\n <div\n *ngFor=\"let col of columns\"\n class=\"cps-table-coltoggle-menu-item\"\n (click)=\"onSelectColumn(col)\"\n [class.selected]=\"isColumnSelected(col)\">\n <span class=\"cps-table-coltoggle-menu-item-left\">\n <span class=\"cps-table-coltoggle-menu-item-check\"></span>\n <span class=\"cps-table-coltoggle-menu-item-label\">{{\n col[colHeaderName]\n }}</span>\n </span>\n </div>\n </div>\n </cps-menu>\n </div>\n <div\n *ngIf=\"showExportBtn\"\n class=\"cps-table-tbar-export-btn\"\n [ngClass]=\"{ 'btn-disabled': exportBtnDisabled }\">\n <cps-icon\n icon=\"export\"\n size=\"20\"\n [color]=\"exportBtnDisabled ? 'text-light' : 'prepared-lighten1'\"\n (click)=\"onExportData($event)\"></cps-icon>\n <cps-menu\n #exportMenu\n [items]=\"exportMenuItems\"\n [compressed]=\"true\"\n [withArrow]=\"false\">\n </cps-menu>\n </div>\n <div\n *ngIf=\"showDataReloadBtn\"\n class=\"cps-table-tbar-reload-btn\"\n [ngClass]=\"{ 'btn-disabled': dataReloadBtnDisabled }\">\n <cps-icon\n icon=\"refresh\"\n size=\"18\"\n [color]=\"dataReloadBtnDisabled ? 'text-light' : 'prepared-lighten1'\"\n (click)=\"onReloadData()\">\n </cps-icon>\n </div>\n </div>\n </ng-container>\n </ng-template>\n\n <ng-template pTemplate=\"header\" *ngIf=\"nestedHeaderTemplate\" let-columns>\n <ng-container\n *ngTemplateOutlet=\"\n nestedHeaderTemplate;\n context: {\n $implicit: columns\n }\n \"></ng-container>\n </ng-template>\n\n <ng-template pTemplate=\"header\" *ngIf=\"!nestedHeaderTemplate\" let-columns>\n <tr>\n <th style=\"width: 3rem\" *ngIf=\"rowExpansionTemplate\"></th>\n <th style=\"width: 3rem\" *ngIf=\"reorderableRows\"></th>\n <th style=\"width: 4rem\" *ngIf=\"selectable\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <ng-container *ngIf=\"headerTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n headerTemplate;\n context: {\n $implicit: columns\n }\n \"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!headerTemplate && columns.length > 0\">\n <ng-container *ngIf=\"sortable\">\n @if (filterableByColumns) {\n <th\n *ngFor=\"let col of columns\"\n [cpsTColSortable]=\"col[colFieldName]\"\n [cpsTColFilter]=\"col[colFieldName]\"\n [filterType]=\"\n col[colFilterTypeName] ??\n (autoColumnFilterType\n ? (data | cpsDetectFilterType: col[colFieldName])\n : 'text')\n \">\n {{ col[colHeaderName] }}\n </th>\n } @else {\n <th\n *ngFor=\"let col of columns\"\n [cpsTColSortable]=\"col[colFieldName]\">\n {{ col[colHeaderName] }}\n </th>\n }\n </ng-container>\n <ng-container *ngIf=\"!sortable\">\n @if (filterableByColumns) {\n <th\n *ngFor=\"let col of columns\"\n [cpsTColFilter]=\"col[colFieldName]\"\n [filterType]=\"\n col[colFilterTypeName] ??\n (autoColumnFilterType\n ? (data | cpsDetectFilterType: col[colFieldName])\n : 'text')\n \">\n {{ col[colHeaderName] }}\n </th>\n } @else {\n <th *ngFor=\"let col of columns\">\n {{ col[colHeaderName] }}\n </th>\n }\n </ng-container>\n </ng-container>\n <th\n style=\"width: 2rem\"\n class=\"cps-table-row-menu-cell\"\n *ngIf=\"showRowMenu && (showRowRemoveButton || showRowEditButton)\"></th>\n </tr>\n </ng-template>\n\n <ng-template\n pTemplate=\"body\"\n let-rowData\n let-columns=\"columns\"\n let-item\n let-rowIndex=\"rowIndex\"\n let-expanded=\"expanded\">\n <tr\n [pReorderableRow]=\"rowIndex\"\n [ngClass]=\"{\n 'cps-table-row-selected': selectable && primengTable.isSelected(item)\n }\">\n <td *ngIf=\"rowExpansionTemplate\" class=\"cps-table-row-chevron-cell\">\n <div\n class=\"cps-table-row-chevron\"\n [ngClass]=\"{ 'cps-table-row-chevron-expanded': expanded }\">\n <cps-icon\n icon=\"chevron-down\"\n size=\"small\"\n color=\"text-dark\"\n [pRowToggler]=\"item\">\n </cps-icon>\n </div>\n </td>\n <td *ngIf=\"reorderableRows\" class=\"cps-table-row-drag-handle-cell\">\n <span class=\"cps-table-row-drag-handle\" pReorderableRowHandle>\u2630</span>\n </td>\n <td *ngIf=\"selectable\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <ng-container *ngIf=\"bodyTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n bodyTemplate;\n context: {\n $implicit: item,\n rowIndex: rowIndex,\n columns: columns,\n rowData: rowData\n }\n \">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!bodyTemplate\">\n <ng-container *ngIf=\"columns.length > 0\">\n @if (renderDataAsHTML) {\n <td\n *ngFor=\"let col of columns\"\n [innerHTML]=\"rowData[col[colFieldName]]\"></td>\n } @else {\n <td *ngFor=\"let col of columns\">\n {{\n col[colDateFormatName]\n ? (rowData[col[colFieldName]] | date: col[colDateFormatName])\n : rowData[col[colFieldName]]\n }}\n </td>\n }\n </ng-container>\n </ng-container>\n <td\n *ngIf=\"showRowMenu && (showRowRemoveButton || showRowEditButton)\"\n class=\"cps-table-row-menu-cell\">\n <table-row-menu\n (editRowBtnClicked)=\"onEditRowClicked(item)\"\n (removeRowBtnClicked)=\"onRemoveRowClicked(item)\"\n [showRowRemoveButton]=\"showRowRemoveButton\"\n [showRowEditButton]=\"showRowEditButton\">\n </table-row-menu>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"rowexpansion\" *ngIf=\"rowExpansionTemplate\" let-item>\n <tr class=\"cps-table-row-expanded-content\">\n <td colspan=\"100\">\n <ng-container\n *ngTemplateOutlet=\"\n rowExpansionTemplate;\n context: {\n $implicit: item\n }\n \"></ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td\n colspan=\"100\"\n class=\"cps-table-empty-message-td\"\n [ngStyle]=\"{ height: emptyBodyHeight }\">\n {{ emptyMessage }}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"loadingicon\">\n <cps-loader [fullScreen]=\"false\" opacity=\"0\"></cps-loader>\n </ng-template>\n <ng-template pTemplate=\"paginatorleft\">\n <div class=\"cps-table-paginator-itms-per-page\">\n <span class=\"cps-table-paginator-items-per-page-title\"\n >Rows per page:\n </span>\n <cps-select\n [options]=\"rowOptions\"\n [hideDetails]=\"true\"\n [(ngModel)]=\"rows\"\n (valueChanged)=\"onRowsPerPageChanged()\"\n [returnObject]=\"false\"\n optionsClass=\"cps-paginator-page-options\">\n </cps-select>\n </div>\n </ng-template>\n</p-table>\n", styles: [":host ::ng-deep .p-component{font-family:Source Sans Pro,sans-serif;font-size:14px;font-weight:400}:host ::ng-deep .p-datatable-flex-scrollable{display:flex;flex-direction:column;height:100%}:host ::ng-deep .p-datatable{position:relative}:host ::ng-deep .p-datatable.p-datatable-gridlines .p-datatable-header{border-width:1px 1px 0 1px}:host ::ng-deep .p-datatable .p-datatable-header{font-weight:600;display:flex;justify-content:space-between;align-items:center;padding:0 10px;border:unset;background:unset;border-top:1px solid var(--cps-color-line-mid);border-right:1px solid var(--cps-color-line-mid);border-left:4px solid var(--cps-color-surprise)!important;border-radius:4px 4px 0 0;font-size:16px;line-height:150%;background-color:#fff;color:var(--cps-color-text-darkest);overflow:auto}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left{display:flex;align-items:center}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left .cps-table-tbar-global-filter{margin-left:12px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left .cps-table-tbar-icon{display:flex;margin-right:8px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-left .cps-table-tbar-title{cursor:default}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right{display:flex;align-items:center}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-btn-on-select{margin-right:4px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-action-btn{margin-right:4px;margin-left:8px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn{display:contents}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn cps-icon{margin-left:12px;margin-right:4px}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn:not(.btn-disabled) cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn:not(.btn-disabled) cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn:not(.btn-disabled) cps-icon{cursor:pointer}:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-coltoggle-btn:not(.btn-disabled) cps-icon:hover .cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-export-btn:not(.btn-disabled) cps-icon:hover .cps-icon,:host ::ng-deep .p-datatable .p-datatable-header .cps-table-tbar-right .cps-table-tbar-reload-btn:not(.btn-disabled) cps-icon:hover .cps-icon{color:var(--cps-color-prepared)!important}:host ::ng-deep .cps-tbar-small.p-datatable .p-datatable-header{height:43px}:host ::ng-deep .cps-tbar-normal.p-datatable .p-datatable-header{height:72px}:host ::ng-deep .p-datatable-flex-scrollable>.p-datatable-wrapper{display:flex;flex-direction:column;flex:1;height:100%}:host ::ng-deep .p-datatable-scrollable>.p-datatable-wrapper{position:relative}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow:auto}:host ::ng-deep .p-datatable-table{border-spacing:0px;width:100%}:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-thead,:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-datatable-table>.p-datatable-tfoot,:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-scroller-viewport>.p-scroller>.p-datatable-table>.p-datatable-thead,:host ::ng-deep .p-datatable.p-datatable-scrollable>.p-datatable-wrapper>.p-scroller-viewport>.p-scroller>.p-datatable-table>.p-datatable-tfoot{background-color:#fff}:host ::ng-deep .p-datatable-scrollable-table>.p-datatable-thead{position:sticky;top:0;z-index:1}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{padding:.5rem}:host ::ng-deep .p-datatable.p-datatable-lg .p-datatable-thead>tr>th{padding:1.25rem}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{text-align:left;padding:1rem;border:1px solid var(--cps-color-line-mid);border-width:0 0 1px 1px;font-weight:400;color:var(--cps-color-text-mild);background:#fff;transition:box-shadow .2s}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-width:1px}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{border-width:1px 0 1px 1px}:host ::ng-deep .p-datatable .p-datatable-thead tr:not(:first-child) th{border-top:unset}:host ::ng-deep .p-datatable .p-sortable-column:not(.p-highlight):hover .cps-sortable-column-icon.sort-unsorted .sort-unsorted-arrow-up{border-bottom-color:var(--cps-color-text-mild)}:host ::ng-deep .p-datatable .p-sortable-column:not(.p-highlight):hover .cps-sortable-column-icon.sort-unsorted .sort-unsorted-arrow-down{border-top-color:var(--cps-color-text-mild)}:host ::ng-deep .p-icon{display:inline-block;width:1rem;height:1rem}:host ::ng-deep .p-datatable .p-sortable-column .cps-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center;font-size:12px;vertical-align:top;color:var(--cps-color-calm);margin-left:.25rem}:host ::ng-deep .p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:none;cursor:pointer;-webkit-user-select:none;user-select:none}:host ::ng-deep .p-datatable .p-sortable-column{cursor:pointer;-webkit-user-select:none;user-select:none}:host ::ng-deep .p-datatable .p-sortable-column:focus{box-shadow:none;outline:0 none}:host ::ng-deep .p-datatable.p-datatable-striped .p-datatable-tbody>tr:nth-child(odd){background:var(--cps-color-bg-light)}:host ::ng-deep .p-datatable.p-datatable-striped .p-datatable-tbody>tr:nth-child(2n){background:#fff}:host ::ng-deep .p-datatable.p-datatable-hoverable-rows .p-datatable-tbody>tr:not(.p-highlight):not(.cps-table-row-expanded-content):hover{background:var(--cps-color-highlight-hover)}:host ::ng-deep .p-datatable .p-datatable-tbody .cps-table-row-expanded-content td{border-left:4px solid var(--cps-color-surprise)!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr{background:#fff;color:var(--cps-color-text-dark);transition:box-shadow .2s}:host ::ng-deep .p-datatable .p-datatable-tbody>tr.cps-table-row-selected{background-color:var(--cps-color-highlight-active)!important}:host ::ng-deep .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody>tr>td:last-child{border-width:0 1px 1px 1px}:host ::ng-deep .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody>tr>td{border-width:0 0 1px 1px}:host ::ng-deep .p-datatable.p-datatable-gridlines .p-datatable-tbody>tr>td:last-child{border-width:1px 1px 0 1px}:host ::ng-deep .p-datatable.p-datatable-gridlines .p-datatable-tbody>tr>td{border-width:1px 0 0 1px}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{text-align:left;border:1px solid var(--cps-color-line-mid);border-width:0 0 1px 0;padding:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-width:0 0 1px 1px}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-width:0 1px 1px 0}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:only-child{border-width:0 1px 1px 1px}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{padding:.5rem}:host ::ng-deep .p-datatable.p-datatable-lg .p-datatable-tbody>tr>td{padding:1.25rem}:host ::ng-deep td:has(p-tablecheckbox){text-align:center!important}:host ::ng-deep th:has(p-tableheadercheckbox){text-align:center!important;width:3rem!important}:host ::ng-deep .p-checkbox{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom;position:relative;width:18px;height:18px}:host ::ng-deep .p-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}:host ::ng-deep .p-hidden-accessible input,:host ::ng-deep .p-hidden-accessible select{transform:scale(0)}:host ::ng-deep .p-checkbox .p-checkbox-box{background:#fff;width:18px;height:18px;color:var(--cps-color-text-dark);border:2px solid var(--cps-color-text-mild);border-radius:2px;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s}:host ::ng-deep .p-checkbox-box{display:flex;justify-content:center;align-items:center}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:var(--cps-color-calm);background:var(--cps-color-calm)}:host ::ng-deep .p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box.p-highlight:hover{border-color:var(--cps-color-calm);background:var(--cps-color-calm);color:#fff}:host ::ng-deep .p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box:hover{border-color:var(--cps-color-calm)}:host ::ng-deep .p-checkbox .p-checkbox-box .p-icon{width:14px;height:14px}:host ::ng-deep .p-checkbox .p-checkbox-box .p-checkbox-icon{transition-duration:.2s;color:#fff;font-size:14px}:host ::ng-deep .p-datatable-reorderablerow-handle,:host ::ng-deep [pReorderableColumn]{cursor:move;font-size:20px;line-height:1}:host ::ng-deep .p-datatable-reorderablerow-handle:hover,:host ::ng-deep [pReorderableColumn]:hover{color:var(--cps-color-calm)}:host ::ng-deep .p-datatable .p-datatable-tbody>tr.p-datatable-dragpoint-top>td{box-shadow:inset 0 2px 0 0 var(--cps-color-calm)}:host ::ng-deep .p-datatable .p-datatable-tbody>tr.p-datatable-dragpoint-bottom>td{box-shadow:inset 0 -2px 0 0 var(--cps-color-calm)}:host ::ng-deep .p-datatable .p-paginator-bottom{border-width:0 1px 1px 1px;border-radius:0}:host ::ng-deep .p-paginator{background:#fff;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;color:var(--cps-color-text-dark);padding:1rem;border:1px solid var(--cps-color-line-mid)}:host ::ng-deep .p-paginator-left-content{margin-right:auto}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page{display:inline-flex;align-items:center}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-table-paginator-items-per-page-title{font-family:Source Sans Pro,sans-serif;font-size:14px;margin-right:12px;cursor:default}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-select-box{min-height:32px!important;background:transparent!important}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-select-box .cps-select-box-items{font-size:14px!important}:host ::ng-deep .p-paginator-left-content .cps-table-paginator-itms-per-page .cps-select-box .cps-select-box-chevron .cps-icon{width:14px;height:14px}:host ::ng-deep .p-paginator .p-paginator-current{background-color:transparent;border:0 none;color:var(--cps-color-text-dark);min-width:3rem;margin:.143rem;padding:0 .5rem;font-family:Source Sans Pro,sans-serif;font-size:14px;height:unset}:host ::ng-deep .p-paginator-page,:host ::ng-deep .p-paginator-next,:host ::ng-deep .p-paginator-last,:host ::ng-deep .p-paginator-first,:host ::ng-deep .p-paginator-prev,:host ::ng-deep .p-paginator-current{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;-webkit-user-select:none;user-select:none;overflow:hidden;position:relative}:host ::ng-deep .p-paginator-current{cursor:default}:host ::ng-deep .p-paginator .p-paginator-first:not(.p-disabled):not(.p-highlight):hover,:host ::ng-deep .p-paginator .p-paginator-prev:not(.p-disabled):not(.p-highlight):hover,:host ::ng-deep .p-paginator .p-paginator-next:not(.p-disabled):not(.p-highlight):hover,:host ::ng-deep .p-paginator .p-paginator-last:not(.p-disabled):not(.p-highlight):hover{background:var(--cps-color-highlight-hover);border-color:unset}:host ::ng-deep .p-paginator .p-paginator-first:not(.p-disabled):not(.p-highlight):active,:host ::ng-deep .p-paginator .p-paginator-prev:not(.p-disabled):not(.p-highlight):active,:host ::ng-deep .p-paginator .p-paginator-next:not(.p-disabled):not(.p-highlight):active,:host ::ng-deep .p-paginator .p-paginator-last:not(.p-disabled):not(.p-highlight):active{background:var(--cps-color-highlight-active)}:host ::ng-deep .p-paginator .p-paginator-first,:host ::ng-deep .p-paginator .p-paginator-prev,:host ::ng-deep .p-paginator .p-paginator-next,:host ::ng-deep .p-paginator .p-paginator-last{background-color:transparent;border:1px solid var(--cps-color-text-dark);border-radius:4px;color:var(--cps-color-text-dark);min-width:32px;height:32px;margin:.143rem;transition:box-shadow .2s}:host ::ng-deep .p-icon-wrapper{display:inline-flex}:host ::ng-deep .p-disabled,:host ::ng-deep .p-disabled *{cursor:default!important;pointer-events:none}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page.p-highlight{background:var(--cps-color-calm);border-color:var(--cps-color-calm);color:#fff}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page:not(.p-highlight):hover{background:var(--cps-color-highlight-hover);border-color:unset}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page:not(.p-highlight):active{background:var(--cps-color-highlight-active)}:host ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page{background-color:transparent;border:1px solid var(--cps-color-text-dark);border-radius:4px;color:var(--cps-color-text-dark);min-width:32px;height:32px;margin:.143rem;transition:box-shadow .2s}:host ::ng-deep .p-paginator-element:focus{z-index:1;position:relative}:host ::ng-deep .p-link:focus{outline:0 none;outline-offset:0;box-shadow:unset}:host ::ng-deep .p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:none;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:14px;font-family:Source Sans Pro,sans-serif}:host ::ng-deep .p-disabled,:host ::ng-deep .p-component:disabled{opacity:.4}:host ::ng-deep .cps-table-empty-message-td{text-align:center!important;font-weight:600;background:#fff}:host ::ng-deep .cps-table-row-drag-handle-cell{text-align:center!important}:host ::ng-deep .cps-table-row-drag-handle-cell .cps-table-row-drag-handle{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host ::ng-deep .cps-table-row-chevron-cell{text-align:center!important}:host ::ng-deep .cps-table-row-chevron-cell .cps-table-row-chevron{transition-duration:.2s;cursor:pointer;display:inline-flex}:host ::ng-deep .cps-table-row-chevron-cell .cps-table-row-chevron:hover cps-icon .cps-icon{color:var(--cps-color-calm)!important}:host ::ng-deep .cps-table-row-chevron-cell .cps-table-row-chevron-expanded{transform:rotate(180deg)}:host ::ng-deep .cps-table-row-menu-cell{border-left:none!important}:host ::ng-deep .p-datatable .p-datatable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:1001;top:0;left:0;width:100%;height:100%;background-color:#fff;transition-duration:.2s;border:1px solid var(--cps-color-line-mid)}:host ::ng-deep .p-datatable.cps-tbar-small .p-datatable-loading-overlay{top:43px;height:calc(100% - 43px)}:host ::ng-deep .p-datatable.cps-tbar-normal .p-datatable-loading-overlay{top:72px;height:calc(100% - 72px)}:host ::ng-deep .cps-table-loading .p-datatable{min-height:200px}:host ::ng-deep .cps-table-loading .p-datatable.cps-tbar-normal{min-height:272px}:host ::ng-deep .cps-table-loading .p-datatable.cps-tbar-small{min-height:243px}:host ::ng-deep .cps-table-col-filter-menu-open .cps-table-col-filter-menu-button{color:var(--cps-color-text-dark)}.cps-table-coltoggle-menu{display:block;max-height:242px;overflow-x:hidden;background:#fff}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item{padding:12px;justify-content:space-between;display:flex;cursor:pointer}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item:hover{background:var(--cps-color-highlight-hover)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-label{color:var(--cps-color-text-dark)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-left{display:flex;align-items:center;margin-right:8px}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-check{background-color:transparent;border:0;width:16px;height:16px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1);margin-right:8px;opacity:0}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item-check:after{color:var(--cps-color-calm);top:4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box;position:absolute;content:\"\";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected,.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.allselected{font-weight:600}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected .cps-table-coltoggle-menu-item-label,.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.allselected .cps-table-coltoggle-menu-item-label{color:var(--cps-color-calm)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected .cps-table-coltoggle-menu-item-check,.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.allselected .cps-table-coltoggle-menu-item-check{opacity:1}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected{background:var(--cps-color-highlight-selected)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.highlighten{background:var(--cps-color-highlight-active)}.cps-table-coltoggle-menu .cps-table-coltoggle-menu-item.selected.highlighten{background:var(--cps-color-highlight-selected-dark)}.cps-table-coltoggle-menu .select-all-option{border-bottom:1px solid lightgrey;font-weight:600}::ng-deep .cps-select-options-menu.cps-paginator-page-options .cps-select-options-option{font-size:14px}\n"] }]
7595
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: Document, decorators: [{
7596
+ type: Inject,
7597
+ args: [DOCUMENT]
7598
+ }] }], propDecorators: { columns: [{
7507
7599
  type: Input
7508
- }], type: [{
7600
+ }], colHeaderName: [{
7509
7601
  type: Input
7510
- }], persistent: [{
7602
+ }], colFieldName: [{
7511
7603
  type: Input
7512
- }], showClearButton: [{
7604
+ }], colFilterTypeName: [{
7513
7605
  type: Input
7514
- }], showApplyButton: [{
7606
+ }], colDateFormatName: [{
7515
7607
  type: Input
7516
- }], showCloseButton: [{
7608
+ }], striped: [{
7517
7609
  type: Input
7518
- }], showMatchModes: [{
7610
+ }], bordered: [{
7519
7611
  type: Input
7520
- }], matchModes: [{
7612
+ }], size: [{
7521
7613
  type: Input
7522
- }], showOperator: [{
7614
+ }], selectable: [{
7523
7615
  type: Input
7524
- }], maxConstraints: [{
7616
+ }], rowHover: [{
7525
7617
  type: Input
7526
- }], headerTitle: [{
7618
+ }], dataKey: [{
7527
7619
  type: Input
7528
- }], hideOnClear: [{
7620
+ }], showRowMenu: [{
7529
7621
  type: Input
7530
- }], categoryOptions: [{
7622
+ }], showRowRemoveButton: [{
7531
7623
  type: Input
7532
- }], asButtonToggle: [{
7624
+ }], showRowEditButton: [{
7625
+ type: Input
7626
+ }], reorderableRows: [{
7627
+ type: Input
7628
+ }], loading: [{
7629
+ type: Input
7630
+ }], tableStyle: [{
7631
+ type: Input
7632
+ }], tableStyleClass: [{
7633
+ type: Input
7634
+ }], sortable: [{
7635
+ type: Input
7636
+ }], filterableByColumns: [{
7637
+ type: Input
7638
+ }], autoColumnFilterType: [{
7639
+ type: Input
7640
+ }], sortMode: [{
7641
+ type: Input
7642
+ }], customSort: [{
7643
+ type: Input
7644
+ }], hasToolbar: [{
7645
+ type: Input
7646
+ }], toolbarSize: [{
7647
+ type: Input
7648
+ }], toolbarTitle: [{
7649
+ type: Input
7650
+ }], toolbarIcon: [{
7651
+ type: Input
7652
+ }], toolbarIconColor: [{
7653
+ type: Input
7654
+ }], scrollable: [{
7655
+ type: Input
7656
+ }], scrollHeight: [{
7657
+ type: Input
7658
+ }], virtualScroll: [{
7659
+ type: Input
7660
+ }], numToleratedItems: [{
7661
+ type: Input
7662
+ }], paginator: [{
7663
+ type: Input
7664
+ }], alwaysShowPaginator: [{
7665
+ type: Input
7666
+ }], rowsPerPageOptions: [{
7667
+ type: Input
7668
+ }], first: [{
7669
+ type: Input
7670
+ }], rows: [{
7671
+ type: Input
7672
+ }], resetPageOnRowsChange: [{
7673
+ type: Input
7674
+ }], resetPageOnSort: [{
7675
+ type: Input
7676
+ }], totalRecords: [{
7677
+ type: Input
7678
+ }], emptyMessage: [{
7679
+ type: Input
7680
+ }], emptyBodyHeight: [{
7681
+ type: Input
7682
+ }], lazy: [{
7683
+ type: Input
7684
+ }], lazyLoadOnInit: [{
7685
+ type: Input
7686
+ }], showGlobalFilter: [{
7687
+ type: Input
7688
+ }], globalFilterPlaceholder: [{
7689
+ type: Input
7690
+ }], globalFilterFields: [{
7691
+ type: Input
7692
+ }], clearGlobalFilterOnLoading: [{
7693
+ type: Input
7694
+ }], showRemoveBtnOnSelect: [{
7695
+ type: Input
7696
+ }], removeBtnOnSelectDisabled: [{
7697
+ type: Input
7698
+ }], showAdditionalBtnOnSelect: [{
7699
+ type: Input
7700
+ }], additionalBtnOnSelectTitle: [{
7533
7701
  type: Input
7534
- }], singleSelection: [{
7702
+ }], additionalBtnOnSelectIcon: [{
7535
7703
  type: Input
7536
- }], placeholder: [{
7704
+ }], additionalBtnOnSelectDisabled: [{
7537
7705
  type: Input
7538
- }], constraintCompList: [{
7539
- type: ViewChildren,
7540
- args: ['constraintComponent']
7541
- }], columnFilterMenu: [{
7542
- type: ViewChild,
7543
- args: ['columnFilterMenu']
7544
- }], onClick: [{
7545
- type: HostListener,
7546
- args: ['click', ['$event']]
7547
- }], onMouseOver: [{
7548
- type: HostListener,
7549
- args: ['mouseenter']
7550
- }], onMouseLeave: [{
7551
- type: HostListener,
7552
- args: ['mouseleave']
7553
- }] } });
7554
-
7555
- /**
7556
- * CpsTableColumnFilterDirective is a filtering directive used to filter single or multiple columns in table.
7557
- * @group Directives
7558
- */
7559
- class CpsTableColumnFilterDirective {
7560
- constructor(elementRef, viewContainerRef) {
7561
- this.elementRef = elementRef;
7562
- this.viewContainerRef = viewContainerRef;
7563
- /**
7564
- * Type of a filter in table, it can be of type "number", "boolean", "text", "date" or "category".
7565
- * @group Props
7566
- */
7567
- this.filterType = 'text';
7568
- /**
7569
- * Determines whether the filter menu should be persistent.
7570
- * @group Props
7571
- */
7572
- this.filterPersistent = false;
7573
- /**
7574
- * Determines whether the filter should have clear button.
7575
- * @group Props
7576
- */
7577
- this.filterShowClearButton = true;
7578
- /**
7579
- * Determines whether the filter should have apply button.
7580
- * @group Props
7581
- */
7582
- this.filterShowApplyButton = true;
7583
- /**
7584
- * Determines whether the filter should have close button.
7585
- * @group Props
7586
- */
7587
- this.filterShowCloseButton = false;
7588
- /**
7589
- * Determines whether the filter should have match modes.
7590
- * @group Props
7591
- */
7592
- this.filterShowMatchModes = true;
7593
- /**
7594
- * Match modes for filter.
7595
- * @group Props
7596
- */
7597
- this.filterMatchModes = [];
7598
- /**
7599
- * Determines whether the filter should have operator.
7600
- * @group Props
7601
- */
7602
- this.filterShowOperator = true;
7603
- /**
7604
- * Maximum number of constraints.
7605
- * @group Props
7606
- */
7607
- this.filterMaxConstraints = 2;
7608
- /**
7609
- * Title of the filter.
7610
- * @group Props
7611
- */
7612
- this.filterHeaderTitle = '';
7613
- /**
7614
- * Determines whether the filter should hide on clear.
7615
- * @group Props
7616
- */
7617
- this.filterHideOnClear = false;
7618
- /**
7619
- * Options for category filter.
7620
- * @group Props
7621
- */
7622
- this.filterCategoryOptions = [];
7623
- /**
7624
- * Determines whether to show category filter as button toggles.
7625
- * @group Props
7626
- */
7627
- this.filterAsButtonToggle = false;
7628
- /**
7629
- * Single selection for category filter.
7630
- * @group Props
7631
- */
7632
- this.filterSingleSelection = false;
7633
- /**
7634
- * Placeholder for filter constraints.
7635
- * @group Props
7636
- */
7637
- this.filterPlaceholder = '';
7638
- this.filterCompRef = this.viewContainerRef.createComponent(TableColumnFilterComponent);
7639
- }
7640
- ngOnInit() {
7641
- this.elementRef.nativeElement.firstChild.after(this.filterCompRef.location.nativeElement);
7642
- }
7643
- ngOnChanges() {
7644
- this.filterCompRef.setInput('field', this.field);
7645
- this.filterCompRef.setInput('type', this.filterType);
7646
- this.filterCompRef.setInput('persistent', this.filterPersistent);
7647
- this.filterCompRef.setInput('showClearButton', this.filterShowClearButton);
7648
- this.filterCompRef.setInput('showApplyButton', this.filterShowApplyButton);
7649
- this.filterCompRef.setInput('showCloseButton', this.filterShowCloseButton);
7650
- this.filterCompRef.setInput('showMatchModes', this.filterShowMatchModes);
7651
- this.filterCompRef.setInput('matchModes', this.filterMatchModes);
7652
- this.filterCompRef.setInput('showOperator', this.filterShowOperator);
7653
- this.filterCompRef.setInput('maxConstraints', this.filterMaxConstraints);
7654
- this.filterCompRef.setInput('headerTitle', this.filterHeaderTitle);
7655
- this.filterCompRef.setInput('hideOnClear', this.filterHideOnClear);
7656
- this.filterCompRef.setInput('categoryOptions', this.filterCategoryOptions);
7657
- this.filterCompRef.setInput('asButtonToggle', this.filterAsButtonToggle);
7658
- this.filterCompRef.setInput('singleSelection', this.filterSingleSelection);
7659
- this.filterCompRef.setInput('placeholder', this.filterPlaceholder || this._getDefaultPlaceholder());
7660
- }
7661
- _getDefaultPlaceholder() {
7662
- switch (this.filterType) {
7663
- case 'text':
7664
- return 'Please enter';
7665
- case 'number':
7666
- return 'Enter value';
7667
- case 'date':
7668
- return 'Select date';
7669
- case 'category':
7670
- return 'Please select';
7671
- default:
7672
- return '';
7673
- }
7674
- }
7675
- hideFilter() {
7676
- this.filterCompRef?.instance?.hide();
7677
- }
7678
- clearFilter() {
7679
- this.filterCompRef?.instance?.clearFilter();
7680
- }
7681
- clearFilterValues() {
7682
- this.filterCompRef?.instance?.clearFilterValues();
7683
- }
7684
- ngOnDestroy() {
7685
- this.filterCompRef.destroy();
7686
- this.viewContainerRef.clear();
7687
- }
7688
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsTableColumnFilterDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
7689
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.0", type: CpsTableColumnFilterDirective, isStandalone: true, selector: "[cpsTColFilter]", inputs: { field: ["cpsTColFilter", "field"], filterType: "filterType", filterPersistent: "filterPersistent", filterShowClearButton: "filterShowClearButton", filterShowApplyButton: "filterShowApplyButton", filterShowCloseButton: "filterShowCloseButton", filterShowMatchModes: "filterShowMatchModes", filterMatchModes: "filterMatchModes", filterShowOperator: "filterShowOperator", filterMaxConstraints: "filterMaxConstraints", filterHeaderTitle: "filterHeaderTitle", filterHideOnClear: "filterHideOnClear", filterCategoryOptions: "filterCategoryOptions", filterAsButtonToggle: "filterAsButtonToggle", filterSingleSelection: "filterSingleSelection", filterPlaceholder: "filterPlaceholder" }, exportAs: ["cpsTColFilter"], usesOnChanges: true, ngImport: i0 }); }
7690
- }
7691
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: CpsTableColumnFilterDirective, decorators: [{
7692
- type: Directive,
7693
- args: [{
7694
- standalone: true,
7695
- selector: '[cpsTColFilter]',
7696
- exportAs: 'cpsTColFilter'
7697
- }]
7698
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }], propDecorators: { field: [{
7699
- type: Input,
7700
- args: ['cpsTColFilter']
7701
- }], filterType: [{
7706
+ }], showActionBtn: [{
7702
7707
  type: Input
7703
- }], filterPersistent: [{
7708
+ }], actionBtnTitle: [{
7704
7709
  type: Input
7705
- }], filterShowClearButton: [{
7710
+ }], actionBtnIcon: [{
7706
7711
  type: Input
7707
- }], filterShowApplyButton: [{
7712
+ }], actionBtnDisabled: [{
7708
7713
  type: Input
7709
- }], filterShowCloseButton: [{
7714
+ }], showExportBtn: [{
7710
7715
  type: Input
7711
- }], filterShowMatchModes: [{
7716
+ }], exportBtnDisabled: [{
7712
7717
  type: Input
7713
- }], filterMatchModes: [{
7718
+ }], exportFilename: [{
7714
7719
  type: Input
7715
- }], filterShowOperator: [{
7720
+ }], csvSeparator: [{
7716
7721
  type: Input
7717
- }], filterMaxConstraints: [{
7722
+ }], showDataReloadBtn: [{
7718
7723
  type: Input
7719
- }], filterHeaderTitle: [{
7724
+ }], dataReloadBtnDisabled: [{
7720
7725
  type: Input
7721
- }], filterHideOnClear: [{
7726
+ }], showColumnsToggleBtn: [{
7722
7727
  type: Input
7723
- }], filterCategoryOptions: [{
7728
+ }], columnsToggleBtnDisabled: [{
7724
7729
  type: Input
7725
- }], filterAsButtonToggle: [{
7730
+ }], initialColumns: [{
7726
7731
  type: Input
7727
- }], filterSingleSelection: [{
7732
+ }], renderDataAsHTML: [{
7728
7733
  type: Input
7729
- }], filterPlaceholder: [{
7734
+ }], data: [{
7730
7735
  type: Input
7736
+ }], rowsSelected: [{
7737
+ type: Output
7738
+ }], selectedRowIndexes: [{
7739
+ type: Output
7740
+ }], actionBtnClicked: [{
7741
+ type: Output
7742
+ }], editRowBtnClicked: [{
7743
+ type: Output
7744
+ }], rowsToRemove: [{
7745
+ type: Output
7746
+ }], rowIndexesToRemove: [{
7747
+ type: Output
7748
+ }], pageChanged: [{
7749
+ type: Output
7750
+ }], sorted: [{
7751
+ type: Output
7752
+ }], filtered: [{
7753
+ type: Output
7754
+ }], rowsReordered: [{
7755
+ type: Output
7756
+ }], columnsSelected: [{
7757
+ type: Output
7758
+ }], lazyLoaded: [{
7759
+ type: Output
7760
+ }], dataReloadBtnClicked: [{
7761
+ type: Output
7762
+ }], additionalBtnOnSelectClicked: [{
7763
+ type: Output
7764
+ }], customSortFunction: [{
7765
+ type: Output
7766
+ }], toolbarTemplate: [{
7767
+ type: ContentChild,
7768
+ args: ['toolbar', { static: false }]
7769
+ }], headerTemplate: [{
7770
+ type: ContentChild,
7771
+ args: ['header', { static: false }]
7772
+ }], nestedHeaderTemplate: [{
7773
+ type: ContentChild,
7774
+ args: ['nestedHeader', { static: false }]
7775
+ }], bodyTemplate: [{
7776
+ type: ContentChild,
7777
+ args: ['body', { static: false }]
7778
+ }], rowExpansionTemplate: [{
7779
+ type: ContentChild,
7780
+ args: ['rowexpansion', { static: false }]
7781
+ }], primengTable: [{
7782
+ type: ViewChild,
7783
+ args: ['primengTable', { static: true }]
7784
+ }], globalFilterComp: [{
7785
+ type: ViewChild,
7786
+ args: ['globalFilterComp']
7787
+ }], exportMenu: [{
7788
+ type: ViewChild,
7789
+ args: ['exportMenu']
7790
+ }], colToggleMenu: [{
7791
+ type: ViewChild,
7792
+ args: ['colToggleMenu']
7793
+ }], tUnsortDirective: [{
7794
+ type: ViewChild,
7795
+ args: ['tUnsortDirective']
7731
7796
  }] } });
7732
7797
 
7733
7798
  /**
@@ -13879,5 +13944,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
13879
13944
  * Generated bundle index. Do not edit.
13880
13945
  */
13881
13946
 
13882
- export { CPS_RADIO_GROUP, CpsAutocompleteComponent, CpsButtonComponent, CpsButtonToggleComponent, CpsCheckboxComponent, CpsChipComponent, CpsColumnFilterMatchMode, CpsDatepickerComponent, CpsDialogConfig, CpsDialogRef, CpsDialogService, CpsDividerComponent, CpsExpansionPanelComponent, CpsFileUploadComponent, CpsIconComponent, CpsInfoCircleComponent, CpsInputComponent, CpsLoaderComponent, CpsMenuComponent, CpsMenuHideReason, CpsNotificationAppearance, CpsNotificationPosition, CpsNotificationService, CpsPaginatePipe, CpsPaginatorComponent, CpsProgressCircularComponent, CpsProgressLinearComponent, CpsRadioComponent, CpsRadioGroupComponent, CpsSchedulerComponent, CpsSelectComponent, CpsSidebarMenuComponent, CpsSwitchComponent, CpsTabComponent, CpsTabGroupComponent, CpsTableColumnFilterDirective, CpsTableColumnSortableDirective, CpsTableComponent, CpsTableHeaderSelectableDirective, CpsTableRowSelectableDirective, CpsTagComponent, CpsTextareaComponent, CpsTimepickerComponent, CpsTooltipDirective, CpsTreeAutocompleteComponent, CpsTreeSelectComponent, CpsTreeTableColumnFilterDirective, CpsTreeTableColumnSortableDirective, CpsTreeTableComponent, CpsTreeTableHeaderSelectableDirective, CpsTreeTableRowSelectableDirective, CpsTreetableRowTogglerDirective, getCSSColor, getCpsColors, getTextColor, iconNames, tableFactory, treeTableFactory };
13947
+ export { CPS_RADIO_GROUP, CpsAutocompleteComponent, CpsButtonComponent, CpsButtonToggleComponent, CpsCheckboxComponent, CpsChipComponent, CpsColumnFilterMatchMode, CpsDatepickerComponent, CpsDetectFilterTypePipe, CpsDialogConfig, CpsDialogRef, CpsDialogService, CpsDividerComponent, CpsExpansionPanelComponent, CpsFileUploadComponent, CpsIconComponent, CpsInfoCircleComponent, CpsInputComponent, CpsLoaderComponent, CpsMenuComponent, CpsMenuHideReason, CpsNotificationAppearance, CpsNotificationPosition, CpsNotificationService, CpsPaginatePipe, CpsPaginatorComponent, CpsProgressCircularComponent, CpsProgressLinearComponent, CpsRadioComponent, CpsRadioGroupComponent, CpsSchedulerComponent, CpsSelectComponent, CpsSidebarMenuComponent, CpsSwitchComponent, CpsTabComponent, CpsTabGroupComponent, CpsTableColumnFilterDirective, CpsTableColumnSortableDirective, CpsTableComponent, CpsTableHeaderSelectableDirective, CpsTableRowSelectableDirective, CpsTagComponent, CpsTextareaComponent, CpsTimepickerComponent, CpsTooltipDirective, CpsTreeAutocompleteComponent, CpsTreeSelectComponent, CpsTreeTableColumnFilterDirective, CpsTreeTableColumnSortableDirective, CpsTreeTableComponent, CpsTreeTableHeaderSelectableDirective, CpsTreeTableRowSelectableDirective, CpsTreetableRowTogglerDirective, getCSSColor, getCpsColors, getTextColor, iconNames, tableFactory, treeTableFactory };
13883
13948
  //# sourceMappingURL=cps-ui-kit.mjs.map