cps-ui-kit 0.140.0 → 0.141.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.
- package/esm2020/lib/components/cps-autocomplete/cps-autocomplete.component.mjs +137 -4
- package/esm2020/lib/components/cps-button/cps-button.component.mjs +55 -2
- package/esm2020/lib/components/cps-button-toggle/cps-button-toggle.component.mjs +63 -2
- package/esm2020/lib/components/cps-checkbox/cps-checkbox.component.mjs +50 -1
- package/esm2020/lib/components/cps-chip/cps-chip.component.mjs +34 -1
- package/esm2020/lib/components/cps-datepicker/cps-datepicker.component.mjs +78 -1
- package/esm2020/lib/components/cps-expansion-panel/cps-expansion-panel.component.mjs +51 -1
- package/esm2020/lib/components/cps-icon/cps-icon.component.mjs +17 -1
- package/esm2020/lib/components/cps-info-circle/cps-info-circle.component.mjs +29 -1
- package/esm2020/lib/components/cps-input/cps-input.component.mjs +131 -1
- package/esm2020/lib/components/cps-loader/cps-loader.component.mjs +21 -1
- package/esm2020/lib/components/cps-menu/cps-menu.component.mjs +58 -2
- package/esm2020/lib/components/cps-paginator/cps-paginator.component.mjs +38 -1
- package/esm2020/lib/components/cps-paginator/pipes/cps-paginate.pipe.mjs +5 -1
- package/esm2020/lib/components/cps-progress-circular/cps-progress-circular.component.mjs +17 -1
- package/esm2020/lib/components/cps-progress-linear/cps-progress-linear.component.mjs +29 -1
- package/esm2020/lib/components/cps-radio-group/cps-radio/cps-radio.component.mjs +5 -1
- package/esm2020/lib/components/cps-radio-group/cps-radio-button/cps-radio-button.component.mjs +18 -1
- package/esm2020/lib/components/cps-radio-group/cps-radio-group.component.mjs +50 -1
- package/esm2020/lib/components/cps-select/cps-select.component.mjs +137 -4
- package/esm2020/lib/components/cps-sidebar-menu/cps-sidebar-menu.component.mjs +21 -1
- package/esm2020/lib/components/cps-tab-group/cps-tab/cps-tab.component.mjs +41 -1
- package/esm2020/lib/components/cps-tab-group/cps-tab-group.component.mjs +32 -2
- package/esm2020/lib/components/cps-table/components/internal/table-column-filter/table-column-filter.component.mjs +67 -3
- package/esm2020/lib/components/cps-table/components/internal/table-column-filter-constraint/table-column-filter-constraint.component.mjs +31 -3
- package/esm2020/lib/components/cps-table/components/internal/table-row-menu/table-row-menu.component.mjs +51 -0
- package/esm2020/lib/components/cps-table/cps-table.component.mjs +312 -8
- package/esm2020/lib/components/cps-table/directives/cps-table-column-filter.directive.mjs +67 -3
- package/esm2020/lib/components/cps-table/directives/cps-table-column-sortable.directive.mjs +9 -1
- package/esm2020/lib/components/cps-table/directives/cps-table-header-selectable.directive.mjs +5 -1
- package/esm2020/lib/components/cps-table/directives/cps-table-row-selectable.directive.mjs +5 -1
- package/esm2020/lib/components/cps-tag/cps-tag.component.mjs +35 -2
- package/esm2020/lib/components/cps-textarea/cps-textarea.component.mjs +101 -1
- package/esm2020/lib/components/cps-tree-autocomplete/cps-tree-autocomplete.component.mjs +17 -1
- package/esm2020/lib/components/cps-tree-select/cps-tree-select.component.mjs +13 -1
- package/esm2020/lib/components/cps-tree-table/cps-tree-table.component.mjs +314 -7
- package/esm2020/lib/components/cps-tree-table/directives/cps-tree-table-column-filter.directive.mjs +63 -3
- package/esm2020/lib/components/cps-tree-table/directives/cps-tree-table-column-sortable.directive.mjs +9 -1
- package/esm2020/lib/components/cps-tree-table/directives/cps-tree-table-header-selectable.directive.mjs +5 -1
- package/esm2020/lib/components/cps-tree-table/directives/cps-tree-table-row-selectable.directive.mjs +5 -1
- package/esm2020/lib/components/cps-tree-table/directives/cps-tree-table-row-toggler.directive.mjs +5 -1
- package/esm2020/lib/components/internal/cps-base-tree-dropdown/cps-base-tree-dropdown.component.mjs +118 -1
- package/esm2020/lib/directives/cps-tooltip.directive.mjs +37 -1
- package/esm2020/lib/services/cps-dialog/cps-dialog.service.mjs +2 -2
- package/fesm2015/cps-ui-kit.mjs +2312 -37
- package/fesm2015/cps-ui-kit.mjs.map +1 -1
- package/fesm2020/cps-ui-kit.mjs +2312 -37
- package/fesm2020/cps-ui-kit.mjs.map +1 -1
- package/lib/components/cps-autocomplete/cps-autocomplete.component.d.ts +133 -0
- package/lib/components/cps-button/cps-button.component.d.ts +53 -0
- package/lib/components/cps-button-toggle/cps-button-toggle.component.d.ts +61 -0
- package/lib/components/cps-checkbox/cps-checkbox.component.d.ts +49 -0
- package/lib/components/cps-chip/cps-chip.component.d.ts +33 -0
- package/lib/components/cps-datepicker/cps-datepicker.component.d.ts +85 -0
- package/lib/components/cps-expansion-panel/cps-expansion-panel.component.d.ts +50 -0
- package/lib/components/cps-icon/cps-icon.component.d.ts +16 -0
- package/lib/components/cps-info-circle/cps-info-circle.component.d.ts +28 -0
- package/lib/components/cps-input/cps-input.component.d.ts +130 -0
- package/lib/components/cps-loader/cps-loader.component.d.ts +20 -0
- package/lib/components/cps-menu/cps-menu.component.d.ts +56 -0
- package/lib/components/cps-paginator/cps-paginator.component.d.ts +37 -0
- package/lib/components/cps-paginator/pipes/cps-paginate.pipe.d.ts +4 -0
- package/lib/components/cps-progress-circular/cps-progress-circular.component.d.ts +16 -0
- package/lib/components/cps-progress-linear/cps-progress-linear.component.d.ts +28 -0
- package/lib/components/cps-radio-group/cps-radio/cps-radio.component.d.ts +8 -0
- package/lib/components/cps-radio-group/cps-radio-button/cps-radio-button.component.d.ts +21 -0
- package/lib/components/cps-radio-group/cps-radio-group.component.d.ts +49 -0
- package/lib/components/cps-select/cps-select.component.d.ts +133 -0
- package/lib/components/cps-sidebar-menu/cps-sidebar-menu.component.d.ts +21 -1
- package/lib/components/cps-tab-group/cps-tab/cps-tab.component.d.ts +40 -0
- package/lib/components/cps-tab-group/cps-tab-group.component.d.ts +30 -0
- package/lib/components/cps-table/components/internal/table-column-filter/table-column-filter.component.d.ts +68 -0
- package/lib/components/cps-table/components/internal/table-column-filter-constraint/table-column-filter-constraint.component.d.ts +36 -0
- package/lib/components/cps-table/{table-row-menu → components/internal/table-row-menu}/table-row-menu.component.d.ts +15 -1
- package/lib/components/cps-table/cps-table.component.d.ts +304 -0
- package/lib/components/cps-table/directives/cps-table-column-filter.directive.d.ts +68 -0
- package/lib/components/cps-table/directives/cps-table-column-sortable.directive.d.ts +8 -0
- package/lib/components/cps-table/directives/cps-table-header-selectable.directive.d.ts +4 -0
- package/lib/components/cps-table/directives/cps-table-row-selectable.directive.d.ts +8 -0
- package/lib/components/cps-tag/cps-tag.component.d.ts +33 -0
- package/lib/components/cps-textarea/cps-textarea.component.d.ts +100 -0
- package/lib/components/cps-tree-autocomplete/cps-tree-autocomplete.component.d.ts +16 -0
- package/lib/components/cps-tree-select/cps-tree-select.component.d.ts +12 -0
- package/lib/components/cps-tree-table/cps-tree-table.component.d.ts +307 -0
- package/lib/components/cps-tree-table/directives/cps-tree-table-column-filter.directive.d.ts +64 -0
- package/lib/components/cps-tree-table/directives/cps-tree-table-column-sortable.directive.d.ts +8 -0
- package/lib/components/cps-tree-table/directives/cps-tree-table-header-selectable.directive.d.ts +4 -0
- package/lib/components/cps-tree-table/directives/cps-tree-table-row-selectable.directive.d.ts +8 -0
- package/lib/components/cps-tree-table/directives/cps-tree-table-row-toggler.directive.d.ts +8 -0
- package/lib/components/internal/cps-base-tree-dropdown/cps-base-tree-dropdown.component.d.ts +117 -0
- package/lib/directives/cps-tooltip.directive.d.ts +40 -0
- package/lib/services/cps-dialog/cps-dialog.service.d.ts +1 -1
- package/package.json +1 -1
- package/esm2020/lib/components/cps-table/table-row-menu/table-row-menu.component.mjs +0 -37
package/fesm2020/cps-ui-kit.mjs
CHANGED
|
@@ -225,10 +225,26 @@ const iconNames = [
|
|
|
225
225
|
'widget-button-icon',
|
|
226
226
|
'xls'
|
|
227
227
|
];
|
|
228
|
+
/**
|
|
229
|
+
* CpsIconComponent is a component that is used for icons.
|
|
230
|
+
* @group Components
|
|
231
|
+
*/
|
|
228
232
|
class CpsIconComponent {
|
|
229
233
|
constructor() {
|
|
234
|
+
/**
|
|
235
|
+
* Name of the icon.
|
|
236
|
+
* @group Props
|
|
237
|
+
*/
|
|
230
238
|
this.icon = '';
|
|
239
|
+
/**
|
|
240
|
+
* Size of the icon, it can be of type number denoting pixels, string or 'fill', 'xsmall', 'small', 'normal' or 'large'.
|
|
241
|
+
* @group Props
|
|
242
|
+
*/
|
|
231
243
|
this.size = 'small';
|
|
244
|
+
/**
|
|
245
|
+
* Color of the icon.
|
|
246
|
+
* @group Props
|
|
247
|
+
*/
|
|
232
248
|
this.color = 'currentColor';
|
|
233
249
|
this.iconColor = 'currentColor';
|
|
234
250
|
this.url = '../../../../assets/';
|
|
@@ -280,13 +296,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
280
296
|
type: Input
|
|
281
297
|
}] } });
|
|
282
298
|
|
|
299
|
+
/**
|
|
300
|
+
* CpsProgressLinearComponent is a process status indicator of a rectangular form.
|
|
301
|
+
* @group Components
|
|
302
|
+
*/
|
|
283
303
|
class CpsProgressLinearComponent {
|
|
284
304
|
constructor() {
|
|
305
|
+
/**
|
|
306
|
+
* Width of the progress bar, of type number denoting pixels or string.
|
|
307
|
+
* @group Props
|
|
308
|
+
*/
|
|
285
309
|
this.width = '100%';
|
|
310
|
+
/**
|
|
311
|
+
* Height of the progress bar, of type number denoting pixels or string.
|
|
312
|
+
* @group Props
|
|
313
|
+
*/
|
|
286
314
|
this.height = '0.5rem';
|
|
315
|
+
/**
|
|
316
|
+
* Color of the progress bar.
|
|
317
|
+
* @group Props
|
|
318
|
+
*/
|
|
287
319
|
this.color = 'calm';
|
|
320
|
+
/**
|
|
321
|
+
* Background color of the progress bar.
|
|
322
|
+
* @group Props
|
|
323
|
+
*/
|
|
288
324
|
this.bgColor = 'white';
|
|
325
|
+
/**
|
|
326
|
+
* Option to control the transparency of the progress bar, of type number or string.
|
|
327
|
+
* @group Props
|
|
328
|
+
*/
|
|
289
329
|
this.opacity = 1;
|
|
330
|
+
/**
|
|
331
|
+
* Border radius of the progress bar, of type number or string.
|
|
332
|
+
* @group Props
|
|
333
|
+
*/
|
|
290
334
|
this.radius = 0;
|
|
291
335
|
}
|
|
292
336
|
ngOnInit() {
|
|
@@ -316,17 +360,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
316
360
|
type: Input
|
|
317
361
|
}] } });
|
|
318
362
|
|
|
363
|
+
/**
|
|
364
|
+
* CpsTooltipDirective provides advisory information for a target element.
|
|
365
|
+
* @group Directives
|
|
366
|
+
*/
|
|
319
367
|
class CpsTooltipDirective {
|
|
320
368
|
// eslint-disable-next-line no-useless-constructor
|
|
321
369
|
constructor(_elementRef) {
|
|
322
370
|
this._elementRef = _elementRef;
|
|
371
|
+
/**
|
|
372
|
+
* Delay to show the tooltip in milliseconds, it can be of type string or number.
|
|
373
|
+
* @group Props
|
|
374
|
+
*/
|
|
323
375
|
this.tooltipOpenDelay = 300;
|
|
376
|
+
/**
|
|
377
|
+
* Delay to hide the tooltip in milliseconds, it can be of type string or number.
|
|
378
|
+
* @group Props
|
|
379
|
+
*/
|
|
324
380
|
this.tooltipCloseDelay = 300;
|
|
381
|
+
/**
|
|
382
|
+
* Whether the tooltip should open on hover, click or focus.
|
|
383
|
+
* @group Props
|
|
384
|
+
*/
|
|
325
385
|
this.tooltipOpenOn = 'hover';
|
|
386
|
+
/**
|
|
387
|
+
* Position of the tooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
388
|
+
* @group Props
|
|
389
|
+
*/
|
|
326
390
|
this.tooltipPosition = 'top';
|
|
391
|
+
/**
|
|
392
|
+
* Whether the tooltip is persistent.
|
|
393
|
+
* @group Props
|
|
394
|
+
*/
|
|
327
395
|
this.tooltipPersistent = false;
|
|
396
|
+
/**
|
|
397
|
+
* When present, it specifies that the tooltip should be disabled.
|
|
398
|
+
* @group Props
|
|
399
|
+
*/
|
|
328
400
|
this.tooltipDisabled = false;
|
|
401
|
+
/**
|
|
402
|
+
* Max width of the tooltip of type number denoting pixels or string.
|
|
403
|
+
* @group Props
|
|
404
|
+
*/
|
|
329
405
|
this.tooltipMaxWidth = '100%';
|
|
406
|
+
/**
|
|
407
|
+
* Tooltip content class for styling.
|
|
408
|
+
* @group Props
|
|
409
|
+
*/
|
|
330
410
|
this.tooltipContentClass = 'cps-tooltip-content';
|
|
331
411
|
this._createTooltip = () => {
|
|
332
412
|
if (this._popup)
|
|
@@ -534,13 +614,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
534
614
|
args: ['window:resize', ['$event']]
|
|
535
615
|
}] } });
|
|
536
616
|
|
|
617
|
+
/**
|
|
618
|
+
* CpsInfoCircleComponent is a component that provides information by means of the info icon with the tooltip on hover.
|
|
619
|
+
* @group Components
|
|
620
|
+
*/
|
|
537
621
|
class CpsInfoCircleComponent {
|
|
538
622
|
constructor() {
|
|
623
|
+
/**
|
|
624
|
+
* Size of the icon, it can be of type number denoting pixels, string or 'fill', 'xsmall', 'small', 'normal' or 'large'.
|
|
625
|
+
* @group Props
|
|
626
|
+
*/
|
|
539
627
|
this.size = 'small';
|
|
628
|
+
/**
|
|
629
|
+
* Tooltip text to provide more info.
|
|
630
|
+
* @group Props
|
|
631
|
+
*/
|
|
540
632
|
this.tooltipText = '';
|
|
633
|
+
/**
|
|
634
|
+
* Position of the tooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
635
|
+
* @group Props
|
|
636
|
+
*/
|
|
541
637
|
this.tooltipPosition = 'top';
|
|
638
|
+
/**
|
|
639
|
+
* Info tooltip class for styling.
|
|
640
|
+
* @group Props
|
|
641
|
+
*/
|
|
542
642
|
this.tooltipContentClass = 'cps-tooltip-content';
|
|
643
|
+
/**
|
|
644
|
+
* Max width of the tooltip of type number denoting pixels or string.
|
|
645
|
+
* @group Props
|
|
646
|
+
*/
|
|
543
647
|
this.tooltipMaxWidth = '100%';
|
|
648
|
+
/**
|
|
649
|
+
* Whether the tooltip is persistent.
|
|
650
|
+
* @group Props
|
|
651
|
+
*/
|
|
544
652
|
this.tooltipPersistent = false;
|
|
545
653
|
}
|
|
546
654
|
}
|
|
@@ -563,7 +671,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
563
671
|
type: Input
|
|
564
672
|
}] } });
|
|
565
673
|
|
|
674
|
+
/**
|
|
675
|
+
* CpsInputComponent is used to enter values in a certain formats such as numeric, text or password.
|
|
676
|
+
* @group Components
|
|
677
|
+
*/
|
|
566
678
|
class CpsInputComponent {
|
|
679
|
+
/**
|
|
680
|
+
* Value of the input.
|
|
681
|
+
* @group Props
|
|
682
|
+
*/
|
|
567
683
|
set value(value) {
|
|
568
684
|
if (!value)
|
|
569
685
|
value = '';
|
|
@@ -577,34 +693,156 @@ class CpsInputComponent {
|
|
|
577
693
|
this._control = _control;
|
|
578
694
|
this.elementRef = elementRef;
|
|
579
695
|
this.cdRef = cdRef;
|
|
696
|
+
/**
|
|
697
|
+
* Label of the input element.
|
|
698
|
+
* @group Props
|
|
699
|
+
*/
|
|
580
700
|
this.label = '';
|
|
701
|
+
/**
|
|
702
|
+
* Bottom hint text for the input field.
|
|
703
|
+
* @group Props
|
|
704
|
+
*/
|
|
581
705
|
this.hint = '';
|
|
706
|
+
/**
|
|
707
|
+
* Placeholder text for the input field.
|
|
708
|
+
* @group Props
|
|
709
|
+
*/
|
|
582
710
|
this.placeholder = 'Please enter';
|
|
711
|
+
/**
|
|
712
|
+
* Whether input is disabled.
|
|
713
|
+
* @group Props
|
|
714
|
+
*/
|
|
583
715
|
this.disabled = false;
|
|
716
|
+
/**
|
|
717
|
+
* Whether input is readonly.
|
|
718
|
+
* @group Props
|
|
719
|
+
*/
|
|
584
720
|
this.readonly = false;
|
|
721
|
+
/**
|
|
722
|
+
* Width of the input field, of type number denoting pixels or string.
|
|
723
|
+
* @group Props
|
|
724
|
+
*/
|
|
585
725
|
this.width = '100%';
|
|
726
|
+
/**
|
|
727
|
+
* Type of the input of type 'text', 'number' or 'password'.
|
|
728
|
+
* @group Props
|
|
729
|
+
*/
|
|
586
730
|
this.type = 'text';
|
|
731
|
+
/**
|
|
732
|
+
* When enabled, a loading bar is displayed.
|
|
733
|
+
* @group Props
|
|
734
|
+
*/
|
|
587
735
|
this.loading = false;
|
|
736
|
+
/**
|
|
737
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
738
|
+
* @group Props
|
|
739
|
+
*/
|
|
588
740
|
this.clearable = false;
|
|
741
|
+
/**
|
|
742
|
+
* Icon before input value.
|
|
743
|
+
* @group Props
|
|
744
|
+
*/
|
|
589
745
|
this.prefixIcon = '';
|
|
746
|
+
/**
|
|
747
|
+
* When enabled, prefixIcon is clickable.
|
|
748
|
+
* @group Props
|
|
749
|
+
*/
|
|
590
750
|
this.prefixIconClickable = false;
|
|
751
|
+
/**
|
|
752
|
+
* Size of icon before input value, of type number or string or it can be a value 'fill', 'xsmall', 'small', 'normal' or 'large'.
|
|
753
|
+
* @group Props
|
|
754
|
+
*/
|
|
591
755
|
this.prefixIconSize = '18px';
|
|
756
|
+
/**
|
|
757
|
+
* Text before input value.
|
|
758
|
+
* @group Props
|
|
759
|
+
*/
|
|
592
760
|
this.prefixText = '';
|
|
761
|
+
/**
|
|
762
|
+
* Hides hint and validation errors.
|
|
763
|
+
* @group Props
|
|
764
|
+
*/
|
|
593
765
|
this.hideDetails = false;
|
|
766
|
+
/**
|
|
767
|
+
* Whether the component should have persistent clear icon.
|
|
768
|
+
* @group Props
|
|
769
|
+
*/
|
|
594
770
|
this.persistentClear = false;
|
|
771
|
+
/**
|
|
772
|
+
* Error message.
|
|
773
|
+
* @group Props
|
|
774
|
+
*/
|
|
595
775
|
this.error = '';
|
|
776
|
+
/**
|
|
777
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
778
|
+
* @group Props
|
|
779
|
+
*/
|
|
596
780
|
this.infoTooltip = '';
|
|
781
|
+
/**
|
|
782
|
+
* InfoTooltip class for styling.
|
|
783
|
+
* @group Props
|
|
784
|
+
*/
|
|
597
785
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
786
|
+
/**
|
|
787
|
+
* Max width of infoTooltip, of type number denoting pixels or string.
|
|
788
|
+
* @group Props
|
|
789
|
+
*/
|
|
598
790
|
this.infoTooltipMaxWidth = '100%';
|
|
791
|
+
/**
|
|
792
|
+
* Whether the infoTooltip is persistent.
|
|
793
|
+
* @group Props
|
|
794
|
+
*/
|
|
599
795
|
this.infoTooltipPersistent = false;
|
|
796
|
+
/**
|
|
797
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
798
|
+
* @group Props
|
|
799
|
+
*/
|
|
600
800
|
this.infoTooltipPosition = 'top';
|
|
801
|
+
/**
|
|
802
|
+
* Styling appearance of input field, it can be "outlined" or "underlined" or "borderless".
|
|
803
|
+
* @group Props
|
|
804
|
+
*/
|
|
601
805
|
this.appearance = 'outlined';
|
|
806
|
+
/**
|
|
807
|
+
* Readonly value to display inside of input field.
|
|
808
|
+
* @group Props
|
|
809
|
+
*/
|
|
602
810
|
this.valueToDisplay = '';
|
|
811
|
+
/**
|
|
812
|
+
* Callback to invoke on value change.
|
|
813
|
+
* @param {string} string - value changed.
|
|
814
|
+
* @group Emits
|
|
815
|
+
*/
|
|
603
816
|
this.valueChanged = new EventEmitter();
|
|
817
|
+
/**
|
|
818
|
+
* Callback to invoke when the component receives focus.
|
|
819
|
+
* @param {any}
|
|
820
|
+
* @group Emits
|
|
821
|
+
*/
|
|
604
822
|
this.focused = new EventEmitter();
|
|
823
|
+
/**
|
|
824
|
+
* Callback to invoke when the prefix icon is clicked.
|
|
825
|
+
* @param {any}
|
|
826
|
+
* @group Emits
|
|
827
|
+
*/
|
|
605
828
|
this.prefixIconClicked = new EventEmitter();
|
|
829
|
+
/**
|
|
830
|
+
* Callback to invoke when the component loses focus.
|
|
831
|
+
* @param {any}
|
|
832
|
+
* @group Emits
|
|
833
|
+
*/
|
|
606
834
|
this.blurred = new EventEmitter();
|
|
835
|
+
/**
|
|
836
|
+
* Callback to invoke when x icon is clicked.
|
|
837
|
+
* @param {any}
|
|
838
|
+
* @group Emits
|
|
839
|
+
*/
|
|
607
840
|
this.cleared = new EventEmitter();
|
|
841
|
+
/**
|
|
842
|
+
* Callback to invoke when enter is clicked.
|
|
843
|
+
* @param {any}
|
|
844
|
+
* @group Emits
|
|
845
|
+
*/
|
|
608
846
|
this.enterClicked = new EventEmitter();
|
|
609
847
|
this.currentType = '';
|
|
610
848
|
this.prefixWidth = '';
|
|
@@ -809,14 +1047,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
809
1047
|
args: ['prefixTextSpan']
|
|
810
1048
|
}] } });
|
|
811
1049
|
|
|
1050
|
+
/**
|
|
1051
|
+
* CpsChipComponent represents a chip element.
|
|
1052
|
+
* @group Components
|
|
1053
|
+
*/
|
|
812
1054
|
class CpsChipComponent {
|
|
813
1055
|
constructor() {
|
|
1056
|
+
/**
|
|
1057
|
+
* Label of the chip element.
|
|
1058
|
+
* @group Props
|
|
1059
|
+
*/
|
|
814
1060
|
this.label = '';
|
|
1061
|
+
/**
|
|
1062
|
+
* Name of the icon.
|
|
1063
|
+
* @group Props
|
|
1064
|
+
*/
|
|
815
1065
|
this.icon = '';
|
|
1066
|
+
/**
|
|
1067
|
+
* Color of the icon.
|
|
1068
|
+
* @group Props
|
|
1069
|
+
*/
|
|
816
1070
|
this.iconColor = 'text-darkest';
|
|
1071
|
+
/**
|
|
1072
|
+
* Position of the icon, it can be 'before' or 'after'. Defaults to 'before'.
|
|
1073
|
+
* @group Props
|
|
1074
|
+
*/
|
|
817
1075
|
this.iconPosition = 'before';
|
|
1076
|
+
/**
|
|
1077
|
+
* Option for closing a chip element.
|
|
1078
|
+
* @group Props
|
|
1079
|
+
*/
|
|
818
1080
|
this.closable = false;
|
|
1081
|
+
/**
|
|
1082
|
+
* Whether chip is disabled.
|
|
1083
|
+
* @group Props
|
|
1084
|
+
*/
|
|
819
1085
|
this.disabled = false;
|
|
1086
|
+
/**
|
|
1087
|
+
* Callback to invoke on chip close.
|
|
1088
|
+
* @param {string} string - Chip closed.
|
|
1089
|
+
* @group Emits
|
|
1090
|
+
*/
|
|
820
1091
|
this.closed = new EventEmitter();
|
|
821
1092
|
this.classesList = ['cps-chip'];
|
|
822
1093
|
}
|
|
@@ -921,6 +1192,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
921
1192
|
args: [{ standalone: true, name: 'checkOptionSelected' }]
|
|
922
1193
|
}] });
|
|
923
1194
|
|
|
1195
|
+
/**
|
|
1196
|
+
* CpsMenuComponent is a popup element, that contains menu items or arbitrary content.
|
|
1197
|
+
* @group Components
|
|
1198
|
+
*/
|
|
924
1199
|
class CpsMenuComponent {
|
|
925
1200
|
// eslint-disable-next-line no-useless-constructor
|
|
926
1201
|
constructor(document, platformId, el, renderer, cd, zone, config, overlayService) {
|
|
@@ -932,18 +1207,70 @@ class CpsMenuComponent {
|
|
|
932
1207
|
this.zone = zone;
|
|
933
1208
|
this.config = config;
|
|
934
1209
|
this.overlayService = overlayService;
|
|
1210
|
+
/**
|
|
1211
|
+
* Header title of the menu.
|
|
1212
|
+
* @group Props
|
|
1213
|
+
*/
|
|
935
1214
|
this.header = '';
|
|
1215
|
+
/**
|
|
1216
|
+
* An array of menu items.
|
|
1217
|
+
* @group Props
|
|
1218
|
+
*/
|
|
936
1219
|
this.items = [];
|
|
1220
|
+
/**
|
|
1221
|
+
* Whether to include top pointing arrow on the menu.
|
|
1222
|
+
* @group Props
|
|
1223
|
+
*/
|
|
937
1224
|
this.withArrow = true;
|
|
938
|
-
|
|
1225
|
+
/**
|
|
1226
|
+
* Menu with prepared-colored items, without header and items description.
|
|
1227
|
+
* @group Props
|
|
1228
|
+
*/
|
|
1229
|
+
this.compressed = false;
|
|
1230
|
+
/**
|
|
1231
|
+
* Whether the menu should show on target element focus.
|
|
1232
|
+
* @group Props
|
|
1233
|
+
*/
|
|
939
1234
|
this.focusOnShow = true;
|
|
1235
|
+
/**
|
|
1236
|
+
* Whether the menu should be persistent.
|
|
1237
|
+
* @group Props
|
|
1238
|
+
*/
|
|
940
1239
|
this.persistent = false;
|
|
1240
|
+
/**
|
|
1241
|
+
* Styling class of the menu container.
|
|
1242
|
+
* @group Props
|
|
1243
|
+
*/
|
|
941
1244
|
this.containerClass = '';
|
|
1245
|
+
/**
|
|
1246
|
+
* Transition options of the show animation.
|
|
1247
|
+
* @group Props
|
|
1248
|
+
*/
|
|
942
1249
|
this.showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
|
|
1250
|
+
/**
|
|
1251
|
+
* Transition options of the hide animation.
|
|
1252
|
+
* @group Props
|
|
1253
|
+
*/
|
|
943
1254
|
this.hideTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
|
|
1255
|
+
/**
|
|
1256
|
+
* Callback to invoke when menu is shown.
|
|
1257
|
+
* @group Emits
|
|
1258
|
+
*/
|
|
944
1259
|
this.menuShown = new EventEmitter();
|
|
1260
|
+
/**
|
|
1261
|
+
* Callback to invoke when menu is hidden.
|
|
1262
|
+
* @group Emits
|
|
1263
|
+
*/
|
|
945
1264
|
this.menuHidden = new EventEmitter();
|
|
1265
|
+
/**
|
|
1266
|
+
* Callback to invoke before menu is hidden.
|
|
1267
|
+
* @group Emits
|
|
1268
|
+
*/
|
|
946
1269
|
this.beforeMenuHidden = new EventEmitter();
|
|
1270
|
+
/**
|
|
1271
|
+
* Callback to invoke when content is clicked.
|
|
1272
|
+
* @group Emits
|
|
1273
|
+
*/
|
|
947
1274
|
this.contentClicked = new EventEmitter();
|
|
948
1275
|
this.withIcons = true;
|
|
949
1276
|
this.autoZIndex = true;
|
|
@@ -1396,6 +1723,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1396
1723
|
type: Output
|
|
1397
1724
|
}] } });
|
|
1398
1725
|
|
|
1726
|
+
/**
|
|
1727
|
+
* CpsSelectComponent is used to select items from a collection.
|
|
1728
|
+
* @group Components
|
|
1729
|
+
*/
|
|
1399
1730
|
class CpsSelectComponent {
|
|
1400
1731
|
set value(value) {
|
|
1401
1732
|
this._value = value;
|
|
@@ -1406,37 +1737,166 @@ class CpsSelectComponent {
|
|
|
1406
1737
|
}
|
|
1407
1738
|
constructor(_control) {
|
|
1408
1739
|
this._control = _control;
|
|
1740
|
+
/**
|
|
1741
|
+
* The label of the select component.
|
|
1742
|
+
* @group Props
|
|
1743
|
+
*/
|
|
1409
1744
|
this.label = '';
|
|
1745
|
+
/**
|
|
1746
|
+
* Placeholder text for the select component.
|
|
1747
|
+
* @group Props
|
|
1748
|
+
*/
|
|
1410
1749
|
this.placeholder = 'Please select';
|
|
1750
|
+
/**
|
|
1751
|
+
* Bottom hint text for the select component.
|
|
1752
|
+
* @group Props
|
|
1753
|
+
*/
|
|
1411
1754
|
this.hint = '';
|
|
1412
|
-
|
|
1755
|
+
/**
|
|
1756
|
+
* Returns the object directly rather than the value specified with optionValue.
|
|
1757
|
+
* @group Props
|
|
1758
|
+
*/
|
|
1759
|
+
this.returnObject = true;
|
|
1760
|
+
/**
|
|
1761
|
+
* Specifies if multiple values can be selected.
|
|
1762
|
+
* @group Props
|
|
1763
|
+
*/
|
|
1413
1764
|
this.multiple = false;
|
|
1765
|
+
/**
|
|
1766
|
+
* Specifies whether the component is disabled.
|
|
1767
|
+
* @group Props
|
|
1768
|
+
*/
|
|
1414
1769
|
this.disabled = false;
|
|
1770
|
+
/**
|
|
1771
|
+
* Width of the select component, of type number denoting pixels or string.
|
|
1772
|
+
* @group Props
|
|
1773
|
+
*/
|
|
1415
1774
|
this.width = '100%';
|
|
1416
|
-
|
|
1417
|
-
|
|
1775
|
+
/**
|
|
1776
|
+
* Option for selecting all elements. Doesn't work with virtual scroll.
|
|
1777
|
+
* @group Props
|
|
1778
|
+
*/
|
|
1779
|
+
this.selectAll = true;
|
|
1780
|
+
/**
|
|
1781
|
+
* When selecting elements, they will appear in a form of a chip.
|
|
1782
|
+
* @group Props
|
|
1783
|
+
*/
|
|
1784
|
+
this.chips = true;
|
|
1785
|
+
/**
|
|
1786
|
+
* Whether the chips can be directly removed.
|
|
1787
|
+
* @group Props
|
|
1788
|
+
*/
|
|
1418
1789
|
this.closableChips = true;
|
|
1790
|
+
/**
|
|
1791
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
1792
|
+
* @group Props
|
|
1793
|
+
*/
|
|
1419
1794
|
this.clearable = false;
|
|
1795
|
+
/**
|
|
1796
|
+
* Whether the dropdown list should open on clear.
|
|
1797
|
+
* @group Props
|
|
1798
|
+
*/
|
|
1420
1799
|
this.openOnClear = true;
|
|
1800
|
+
/**
|
|
1801
|
+
* An array of options.
|
|
1802
|
+
* @group Props
|
|
1803
|
+
*/
|
|
1421
1804
|
this.options = [];
|
|
1805
|
+
/**
|
|
1806
|
+
* Name of the label field of an option.
|
|
1807
|
+
* @group Props
|
|
1808
|
+
*/
|
|
1422
1809
|
this.optionLabel = 'label';
|
|
1423
|
-
|
|
1810
|
+
/**
|
|
1811
|
+
* Name of the value field of an option. Needed only if returnObject prop is false.
|
|
1812
|
+
* @group Props
|
|
1813
|
+
*/
|
|
1814
|
+
this.optionValue = 'value';
|
|
1815
|
+
/**
|
|
1816
|
+
* Name of the info field of an option, shows the additional information text.
|
|
1817
|
+
* @group Props
|
|
1818
|
+
*/
|
|
1424
1819
|
this.optionInfo = 'info';
|
|
1820
|
+
/**
|
|
1821
|
+
* Hides hint and validation errors.
|
|
1822
|
+
* @group Props
|
|
1823
|
+
*/
|
|
1425
1824
|
this.hideDetails = false;
|
|
1825
|
+
/**
|
|
1826
|
+
* Whether the component should have persistent clear icon.
|
|
1827
|
+
* @group Props
|
|
1828
|
+
*/
|
|
1426
1829
|
this.persistentClear = false;
|
|
1830
|
+
/**
|
|
1831
|
+
* Icon before input value.
|
|
1832
|
+
* @group Props
|
|
1833
|
+
*/
|
|
1427
1834
|
this.prefixIcon = '';
|
|
1835
|
+
/**
|
|
1836
|
+
* Size of icon before input value, of type number or string or value 'fill', 'xsmall', 'small', 'normal' or 'large'.
|
|
1837
|
+
* @group Props
|
|
1838
|
+
*/
|
|
1428
1839
|
this.prefixIconSize = '18px';
|
|
1840
|
+
/**
|
|
1841
|
+
* When enabled, a loading bar is displayed.
|
|
1842
|
+
* @group Props
|
|
1843
|
+
*/
|
|
1429
1844
|
this.loading = false;
|
|
1845
|
+
/**
|
|
1846
|
+
* Whether only the elements within scrollable area should be added into the DOM.
|
|
1847
|
+
* @group Props
|
|
1848
|
+
*/
|
|
1430
1849
|
this.virtualScroll = false;
|
|
1850
|
+
/**
|
|
1851
|
+
* Determines how many additional elements to add to the DOM outside of the view.
|
|
1852
|
+
* @group Props
|
|
1853
|
+
*/
|
|
1431
1854
|
this.numToleratedItems = 10;
|
|
1855
|
+
/**
|
|
1856
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
1857
|
+
* @group Props
|
|
1858
|
+
*/
|
|
1432
1859
|
this.infoTooltip = '';
|
|
1860
|
+
/**
|
|
1861
|
+
* InfoTooltip class for styling.
|
|
1862
|
+
* @group Props
|
|
1863
|
+
*/
|
|
1433
1864
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
1865
|
+
/**
|
|
1866
|
+
* Max width of infoTooltip of type number denoting pixels or string.
|
|
1867
|
+
* @group Props
|
|
1868
|
+
*/
|
|
1434
1869
|
this.infoTooltipMaxWidth = '100%';
|
|
1870
|
+
/**
|
|
1871
|
+
* Whether the infoTooltip is persistent.
|
|
1872
|
+
* @group Props
|
|
1873
|
+
*/
|
|
1435
1874
|
this.infoTooltipPersistent = false;
|
|
1875
|
+
/**
|
|
1876
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
1877
|
+
* @group Props
|
|
1878
|
+
*/
|
|
1436
1879
|
this.infoTooltipPosition = 'top';
|
|
1880
|
+
/**
|
|
1881
|
+
* Class for additional styling of the dropdown list.
|
|
1882
|
+
* @group Props
|
|
1883
|
+
*/
|
|
1437
1884
|
this.optionsClass = '';
|
|
1885
|
+
/**
|
|
1886
|
+
* Styling appearance of select input, it can be 'outlined', 'underlined' or 'borderless'.
|
|
1887
|
+
* @group Props
|
|
1888
|
+
*/
|
|
1438
1889
|
this.appearance = 'outlined';
|
|
1890
|
+
/**
|
|
1891
|
+
* Value of the select component.
|
|
1892
|
+
* @group Props
|
|
1893
|
+
*/
|
|
1439
1894
|
this._value = undefined;
|
|
1895
|
+
/**
|
|
1896
|
+
* Callback to invoke on value change.
|
|
1897
|
+
* @param {any} any - value changed.
|
|
1898
|
+
* @group Emits
|
|
1899
|
+
*/
|
|
1440
1900
|
this.valueChanged = new EventEmitter();
|
|
1441
1901
|
this._statusChangesSubscription = new Subscription();
|
|
1442
1902
|
this.error = '';
|
|
@@ -1831,7 +2291,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1831
2291
|
args: ['optionsList']
|
|
1832
2292
|
}] } });
|
|
1833
2293
|
|
|
2294
|
+
/**
|
|
2295
|
+
* BaseTreeDropdownComponent is an internal base component to support hierarchical data dropdown.
|
|
2296
|
+
* @group Components
|
|
2297
|
+
*/
|
|
1834
2298
|
class CpsBaseTreeDropdownComponent {
|
|
2299
|
+
/**
|
|
2300
|
+
* An array of objects to display as the available options.
|
|
2301
|
+
* @group Props
|
|
2302
|
+
*/
|
|
1835
2303
|
set options(options) {
|
|
1836
2304
|
if (options?.some((o) => o.inner)) {
|
|
1837
2305
|
this._options = options;
|
|
@@ -1852,32 +2320,141 @@ class CpsBaseTreeDropdownComponent {
|
|
|
1852
2320
|
constructor(control, cdRef) {
|
|
1853
2321
|
this.control = control;
|
|
1854
2322
|
this.cdRef = cdRef;
|
|
2323
|
+
/**
|
|
2324
|
+
* Label of the component.
|
|
2325
|
+
* @group Props
|
|
2326
|
+
*/
|
|
1855
2327
|
this.label = '';
|
|
2328
|
+
/**
|
|
2329
|
+
* Bottom hint text.
|
|
2330
|
+
* @group Props
|
|
2331
|
+
*/
|
|
1856
2332
|
this.hint = '';
|
|
2333
|
+
/**
|
|
2334
|
+
* Specifies if multiple values can be selected.
|
|
2335
|
+
* @group Props
|
|
2336
|
+
*/
|
|
1857
2337
|
this.multiple = false;
|
|
2338
|
+
/**
|
|
2339
|
+
* Whether the component is disabled.
|
|
2340
|
+
* @group Props
|
|
2341
|
+
*/
|
|
1858
2342
|
this.disabled = false;
|
|
2343
|
+
/**
|
|
2344
|
+
* Width of the component, of type number denoting pixels or string.
|
|
2345
|
+
* @group Props
|
|
2346
|
+
*/
|
|
1859
2347
|
this.width = '100%';
|
|
2348
|
+
/**
|
|
2349
|
+
* When selecting an element, it will appear in a form of a chip.
|
|
2350
|
+
* @group Props
|
|
2351
|
+
*/
|
|
1860
2352
|
this.chips = true;
|
|
2353
|
+
/**
|
|
2354
|
+
* Whether the chips can be directly removed.
|
|
2355
|
+
* @group Props
|
|
2356
|
+
*/
|
|
1861
2357
|
this.closableChips = true;
|
|
2358
|
+
/**
|
|
2359
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
2360
|
+
* @group Props
|
|
2361
|
+
*/
|
|
1862
2362
|
this.clearable = false;
|
|
2363
|
+
/**
|
|
2364
|
+
* Whether the dropdown should open on clear.
|
|
2365
|
+
* @group Props
|
|
2366
|
+
*/
|
|
1863
2367
|
this.openOnClear = true;
|
|
2368
|
+
/**
|
|
2369
|
+
* Name of the label field of an option.
|
|
2370
|
+
* @group Props
|
|
2371
|
+
*/
|
|
1864
2372
|
this.optionLabel = 'label';
|
|
2373
|
+
/**
|
|
2374
|
+
* Name of the info field of an option, shows the additional information text.
|
|
2375
|
+
* @group Props
|
|
2376
|
+
*/
|
|
1865
2377
|
this.optionInfo = 'info';
|
|
2378
|
+
/**
|
|
2379
|
+
* Options for hiding details.
|
|
2380
|
+
* @group Props
|
|
2381
|
+
*/
|
|
1866
2382
|
this.hideDetails = false;
|
|
2383
|
+
/**
|
|
2384
|
+
* Whether the component should have persistent clear icon.
|
|
2385
|
+
* @group Props
|
|
2386
|
+
*/
|
|
1867
2387
|
this.persistentClear = false;
|
|
2388
|
+
/**
|
|
2389
|
+
* Icon before input value.
|
|
2390
|
+
* @group Props
|
|
2391
|
+
*/
|
|
1868
2392
|
this.prefixIcon = '';
|
|
2393
|
+
/**
|
|
2394
|
+
* Size of icon before input value, of type number, string, 'fill', 'xsmall', 'small', 'normal' or 'large'.
|
|
2395
|
+
* @group Props
|
|
2396
|
+
*/
|
|
1869
2397
|
this.prefixIconSize = '18px';
|
|
2398
|
+
/**
|
|
2399
|
+
* When enabled, a loading bar is displayed.
|
|
2400
|
+
* @group Props
|
|
2401
|
+
*/
|
|
1870
2402
|
this.loading = false;
|
|
2403
|
+
/**
|
|
2404
|
+
* Whether only the elements within scrollable area should be added into the DOM.
|
|
2405
|
+
* @group Props
|
|
2406
|
+
*/
|
|
1871
2407
|
this.virtualScroll = false;
|
|
2408
|
+
/**
|
|
2409
|
+
* Determines how many additional elements to add to the DOM outside of the view.
|
|
2410
|
+
* @group Props
|
|
2411
|
+
*/
|
|
1872
2412
|
this.numToleratedItems = 10;
|
|
2413
|
+
/**
|
|
2414
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
2415
|
+
* @group Props
|
|
2416
|
+
*/
|
|
1873
2417
|
this.infoTooltip = '';
|
|
2418
|
+
/**
|
|
2419
|
+
* Info tooltip class for styling.
|
|
2420
|
+
* @group Props
|
|
2421
|
+
*/
|
|
1874
2422
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
2423
|
+
/**
|
|
2424
|
+
* Max width of infoTooltip of type number denoting pixels or string.
|
|
2425
|
+
* @group Props
|
|
2426
|
+
*/
|
|
1875
2427
|
this.infoTooltipMaxWidth = '100%';
|
|
2428
|
+
/**
|
|
2429
|
+
* Whether the infoTooltip is persistent.
|
|
2430
|
+
* @group Props
|
|
2431
|
+
*/
|
|
1876
2432
|
this.infoTooltipPersistent = false;
|
|
2433
|
+
/**
|
|
2434
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
2435
|
+
* @group Props
|
|
2436
|
+
*/
|
|
1877
2437
|
this.infoTooltipPosition = 'top';
|
|
2438
|
+
/**
|
|
2439
|
+
* When set, it expands all directiories initially.
|
|
2440
|
+
* @group Props
|
|
2441
|
+
*/
|
|
1878
2442
|
this.initialExpandDirectories = false;
|
|
2443
|
+
/**
|
|
2444
|
+
* When set, it expands all options initially.
|
|
2445
|
+
* @group Props
|
|
2446
|
+
*/
|
|
1879
2447
|
this.initialExpandAll = false;
|
|
2448
|
+
/**
|
|
2449
|
+
* Value of the component.
|
|
2450
|
+
* @group Props
|
|
2451
|
+
*/
|
|
1880
2452
|
this._value = undefined;
|
|
2453
|
+
/**
|
|
2454
|
+
* Callback to invoke on value change.
|
|
2455
|
+
* @param {any} any - value changed.
|
|
2456
|
+
* @group Emits
|
|
2457
|
+
*/
|
|
1881
2458
|
this.valueChanged = new EventEmitter();
|
|
1882
2459
|
this._statusChangesSubscription = new Subscription();
|
|
1883
2460
|
this._options = [];
|
|
@@ -2324,12 +2901,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2324
2901
|
args: ['boxEl']
|
|
2325
2902
|
}] } });
|
|
2326
2903
|
|
|
2904
|
+
/**
|
|
2905
|
+
* CpsTreeSelectComponent allows to select items from hierarchical data dropdown.
|
|
2906
|
+
* @group Components
|
|
2907
|
+
*/
|
|
2327
2908
|
class CpsTreeSelectComponent extends CpsBaseTreeDropdownComponent {
|
|
2328
2909
|
constructor(control, cdRef) {
|
|
2329
2910
|
super(control, cdRef);
|
|
2330
2911
|
this.control = control;
|
|
2331
2912
|
this.cdRef = cdRef;
|
|
2913
|
+
/**
|
|
2914
|
+
* Styling appearance of tree select, it can be "outlined", "underlined" or "borderless".
|
|
2915
|
+
* @group Props
|
|
2916
|
+
*/
|
|
2332
2917
|
this.appearance = 'outlined';
|
|
2918
|
+
/**
|
|
2919
|
+
* Placeholder text.
|
|
2920
|
+
* @group Props
|
|
2921
|
+
*/
|
|
2333
2922
|
this.placeholder = 'Please select';
|
|
2334
2923
|
}
|
|
2335
2924
|
ngOnInit() {
|
|
@@ -2383,6 +2972,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2383
2972
|
type: Input
|
|
2384
2973
|
}] } });
|
|
2385
2974
|
|
|
2975
|
+
/**
|
|
2976
|
+
* CpsAutocompleteComponent is an input component that provides real-time suggestions when being typed.
|
|
2977
|
+
* @group Components
|
|
2978
|
+
*/
|
|
2386
2979
|
class CpsAutocompleteComponent {
|
|
2387
2980
|
get value() {
|
|
2388
2981
|
return this._value;
|
|
@@ -2394,37 +2987,166 @@ class CpsAutocompleteComponent {
|
|
|
2394
2987
|
constructor(_control, _labelByValue) {
|
|
2395
2988
|
this._control = _control;
|
|
2396
2989
|
this._labelByValue = _labelByValue;
|
|
2990
|
+
/**
|
|
2991
|
+
* Label of the input element.
|
|
2992
|
+
* @group Props
|
|
2993
|
+
*/
|
|
2397
2994
|
this.label = '';
|
|
2995
|
+
/**
|
|
2996
|
+
* Placeholder text.
|
|
2997
|
+
* @group Props
|
|
2998
|
+
*/
|
|
2398
2999
|
this.placeholder = 'Please enter';
|
|
3000
|
+
/**
|
|
3001
|
+
* Bottom hint text.
|
|
3002
|
+
* @group Props
|
|
3003
|
+
*/
|
|
2399
3004
|
this.hint = '';
|
|
2400
|
-
|
|
3005
|
+
/**
|
|
3006
|
+
* Returns the object directly rather than the value specified with optionValue.
|
|
3007
|
+
* @group Props
|
|
3008
|
+
*/
|
|
3009
|
+
this.returnObject = true;
|
|
3010
|
+
/**
|
|
3011
|
+
* Specifies if multiple values can be selected.
|
|
3012
|
+
* @group Props
|
|
3013
|
+
*/
|
|
2401
3014
|
this.multiple = false;
|
|
3015
|
+
/**
|
|
3016
|
+
* Whether autocomplete is disabled.
|
|
3017
|
+
* @group Props
|
|
3018
|
+
*/
|
|
2402
3019
|
this.disabled = false;
|
|
3020
|
+
/**
|
|
3021
|
+
* Width of the input field, a number denoting pixels or a string.
|
|
3022
|
+
* @group Props
|
|
3023
|
+
*/
|
|
2403
3024
|
this.width = '100%';
|
|
2404
|
-
|
|
3025
|
+
/**
|
|
3026
|
+
* Option for selecting all elements. Doesn't work with virtual scroll.
|
|
3027
|
+
* @group Props
|
|
3028
|
+
*/
|
|
3029
|
+
this.selectAll = true;
|
|
3030
|
+
/**
|
|
3031
|
+
* When selecting elements, they will appear in a form of a chip.
|
|
3032
|
+
* @group Props
|
|
3033
|
+
*/
|
|
2405
3034
|
this.chips = true;
|
|
3035
|
+
/**
|
|
3036
|
+
* Whether the chips can be directly removed.
|
|
3037
|
+
* @group Props
|
|
3038
|
+
*/
|
|
2406
3039
|
this.closableChips = true;
|
|
3040
|
+
/**
|
|
3041
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
3042
|
+
* @group Props
|
|
3043
|
+
*/
|
|
2407
3044
|
this.clearable = false;
|
|
3045
|
+
/**
|
|
3046
|
+
* Whether the dropdown list should open on clear.
|
|
3047
|
+
* @group Props
|
|
3048
|
+
*/
|
|
2408
3049
|
this.openOnClear = true;
|
|
3050
|
+
/**
|
|
3051
|
+
* An array of options.
|
|
3052
|
+
* @group Props
|
|
3053
|
+
*/
|
|
2409
3054
|
this.options = [];
|
|
3055
|
+
/**
|
|
3056
|
+
* Name of the label field of an option.
|
|
3057
|
+
* @group Props
|
|
3058
|
+
*/
|
|
2410
3059
|
this.optionLabel = 'label';
|
|
2411
|
-
|
|
3060
|
+
/**
|
|
3061
|
+
* Name of the value field of an option. Needed only if returnObject prop is false.
|
|
3062
|
+
* @group Props
|
|
3063
|
+
*/
|
|
3064
|
+
this.optionValue = 'value';
|
|
3065
|
+
/**
|
|
3066
|
+
* Name of the info field of an option, shows the additional information text.
|
|
3067
|
+
* @group Props
|
|
3068
|
+
*/
|
|
2412
3069
|
this.optionInfo = 'info';
|
|
3070
|
+
/**
|
|
3071
|
+
* Hides hint and validation errors.
|
|
3072
|
+
* @group Props
|
|
3073
|
+
*/
|
|
2413
3074
|
this.hideDetails = false;
|
|
3075
|
+
/**
|
|
3076
|
+
* Whether the component should have persistent clear icon.
|
|
3077
|
+
* @group Props
|
|
3078
|
+
*/
|
|
2414
3079
|
this.persistentClear = false;
|
|
3080
|
+
/**
|
|
3081
|
+
* Icon before input value.
|
|
3082
|
+
* @group Props
|
|
3083
|
+
*/
|
|
2415
3084
|
this.prefixIcon = '';
|
|
3085
|
+
/**
|
|
3086
|
+
* Size of icon before input value, of type number or string or 'fill' or 'xsmall' or 'small' or 'normal' or 'large'.
|
|
3087
|
+
* @group Props
|
|
3088
|
+
*/
|
|
2416
3089
|
this.prefixIconSize = '18px';
|
|
3090
|
+
/**
|
|
3091
|
+
* When enabled, a loading bar is displayed.
|
|
3092
|
+
* @group Props
|
|
3093
|
+
*/
|
|
2417
3094
|
this.loading = false;
|
|
3095
|
+
/**
|
|
3096
|
+
* Text to display when there is no data. Defaults to 'No results found'.
|
|
3097
|
+
* @group Props
|
|
3098
|
+
*/
|
|
2418
3099
|
this.emptyMessage = 'No results found';
|
|
3100
|
+
/**
|
|
3101
|
+
* Whether only the elements within scrollable area should be added into the DOM.
|
|
3102
|
+
* @group Props
|
|
3103
|
+
*/
|
|
2419
3104
|
this.virtualScroll = false;
|
|
3105
|
+
/**
|
|
3106
|
+
* Determines how many additional elements to add to the DOM outside of the view.
|
|
3107
|
+
* @group Props
|
|
3108
|
+
*/
|
|
2420
3109
|
this.numToleratedItems = 10;
|
|
3110
|
+
/**
|
|
3111
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
3112
|
+
* @group Props
|
|
3113
|
+
*/
|
|
2421
3114
|
this.infoTooltip = '';
|
|
3115
|
+
/**
|
|
3116
|
+
* Info tooltip class for styling.
|
|
3117
|
+
* @group Props
|
|
3118
|
+
*/
|
|
2422
3119
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
3120
|
+
/**
|
|
3121
|
+
* Max width of infoTooltip of type number denoting pixels or string.
|
|
3122
|
+
* @group Props
|
|
3123
|
+
*/
|
|
2423
3124
|
this.infoTooltipMaxWidth = '100%';
|
|
3125
|
+
/**
|
|
3126
|
+
* Whether the infoTooltip is persistent.
|
|
3127
|
+
* @group Props
|
|
3128
|
+
*/
|
|
2424
3129
|
this.infoTooltipPersistent = false;
|
|
2425
|
-
|
|
3130
|
+
/**
|
|
3131
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
3132
|
+
* @group Props
|
|
3133
|
+
*/
|
|
3134
|
+
this.infoTooltipPosition = 'top';
|
|
3135
|
+
/**
|
|
3136
|
+
* Styling appearance of autocomplete input, it could be 'outlined', 'underlined' or 'borderless'.
|
|
3137
|
+
* @group Props
|
|
3138
|
+
*/
|
|
2426
3139
|
this.appearance = 'outlined';
|
|
3140
|
+
/**
|
|
3141
|
+
* Value of the autocomplete.
|
|
3142
|
+
* @group Props
|
|
3143
|
+
*/
|
|
2427
3144
|
this._value = undefined;
|
|
3145
|
+
/**
|
|
3146
|
+
* Callback to invoke on value change.
|
|
3147
|
+
* @param {any} any - value changed.
|
|
3148
|
+
* @group Emits
|
|
3149
|
+
*/
|
|
2428
3150
|
this.valueChanged = new EventEmitter();
|
|
2429
3151
|
this._statusChangesSubscription = new Subscription();
|
|
2430
3152
|
this.error = '';
|
|
@@ -2949,13 +3671,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2949
3671
|
args: ['optionsList']
|
|
2950
3672
|
}] } });
|
|
2951
3673
|
|
|
3674
|
+
/**
|
|
3675
|
+
* CpsTreeAutocompleteComponent allows to choose items from hierarchical data dropdown and provides real-time suggestions when being typed.
|
|
3676
|
+
* @group Components
|
|
3677
|
+
*/
|
|
2952
3678
|
class CpsTreeAutocompleteComponent extends CpsBaseTreeDropdownComponent {
|
|
2953
3679
|
constructor(control, cdRef) {
|
|
2954
3680
|
super(control, cdRef);
|
|
2955
3681
|
this.control = control;
|
|
2956
3682
|
this.cdRef = cdRef;
|
|
3683
|
+
/**
|
|
3684
|
+
* Message if array of items is empty.
|
|
3685
|
+
* @group Props
|
|
3686
|
+
*/
|
|
2957
3687
|
this.emptyMessage = 'No results found';
|
|
3688
|
+
/**
|
|
3689
|
+
* Styling appearance of tree autocomplete, it can be 'outlined', 'underlined' or 'borderless'.
|
|
3690
|
+
* @group Props
|
|
3691
|
+
*/
|
|
2958
3692
|
this.appearance = 'outlined';
|
|
3693
|
+
/**
|
|
3694
|
+
* Placeholder text.
|
|
3695
|
+
* @group Props
|
|
3696
|
+
*/
|
|
2959
3697
|
this.placeholder = 'Please enter';
|
|
2960
3698
|
this.inputText = '';
|
|
2961
3699
|
this.backspaceClickedOnce = false;
|
|
@@ -3167,10 +3905,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3167
3905
|
type: Input
|
|
3168
3906
|
}] } });
|
|
3169
3907
|
|
|
3908
|
+
/**
|
|
3909
|
+
* CpsProgressCircularComponent is a process status indicator in a form of a spinner.
|
|
3910
|
+
* @group Components
|
|
3911
|
+
*/
|
|
3170
3912
|
class CpsProgressCircularComponent {
|
|
3171
3913
|
constructor() {
|
|
3914
|
+
/**
|
|
3915
|
+
* Diameter of the progress bar, of type number denoting pixels or string.
|
|
3916
|
+
* @group Props
|
|
3917
|
+
*/
|
|
3172
3918
|
this.diameter = 40;
|
|
3919
|
+
/**
|
|
3920
|
+
* Thickness of the progress bar, of type number denoting pixels or string.
|
|
3921
|
+
* @group Props
|
|
3922
|
+
*/
|
|
3173
3923
|
this.strokeWidth = 4;
|
|
3924
|
+
/**
|
|
3925
|
+
* Color of the progress bar.
|
|
3926
|
+
* @group Props
|
|
3927
|
+
*/
|
|
3174
3928
|
this.color = 'calm';
|
|
3175
3929
|
}
|
|
3176
3930
|
ngOnInit() {
|
|
@@ -3192,19 +3946,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3192
3946
|
type: Input
|
|
3193
3947
|
}] } });
|
|
3194
3948
|
|
|
3949
|
+
/**
|
|
3950
|
+
* CpsButtonComponent is a button element.
|
|
3951
|
+
* @group Components
|
|
3952
|
+
*/
|
|
3195
3953
|
class CpsButtonComponent {
|
|
3196
3954
|
constructor() {
|
|
3955
|
+
/**
|
|
3956
|
+
* Color of the button.
|
|
3957
|
+
* @group Props
|
|
3958
|
+
*/
|
|
3197
3959
|
this.color = 'calm';
|
|
3198
|
-
|
|
3960
|
+
/**
|
|
3961
|
+
* Color of content on the button. Works only with 'solid' type.
|
|
3962
|
+
* @group Props
|
|
3963
|
+
*/
|
|
3964
|
+
this.contentColor = 'white';
|
|
3965
|
+
/**
|
|
3966
|
+
* Type of the button in terms of appearance, it can be 'solid' or 'outlined' or 'borderless'.
|
|
3967
|
+
* @group Props
|
|
3968
|
+
*/
|
|
3199
3969
|
this.type = 'solid';
|
|
3970
|
+
/**
|
|
3971
|
+
* Label or text on the button.
|
|
3972
|
+
* @group Props
|
|
3973
|
+
*/
|
|
3200
3974
|
this.label = '';
|
|
3975
|
+
/**
|
|
3976
|
+
* Name of the icon on the button.
|
|
3977
|
+
* @group Props
|
|
3978
|
+
*/
|
|
3201
3979
|
this.icon = '';
|
|
3980
|
+
/**
|
|
3981
|
+
* Position of the icon on the button, it can be 'before' or 'after'.
|
|
3982
|
+
* @group Props
|
|
3983
|
+
*/
|
|
3202
3984
|
this.iconPosition = 'before';
|
|
3985
|
+
/**
|
|
3986
|
+
* Size on the button, it can be 'xsmall', 'small', 'normal' or 'large'.
|
|
3987
|
+
* @group Props
|
|
3988
|
+
*/
|
|
3203
3989
|
this.size = 'normal';
|
|
3990
|
+
/**
|
|
3991
|
+
* Width on the button, of type number denoting pixels or string.
|
|
3992
|
+
* @group Props
|
|
3993
|
+
*/
|
|
3204
3994
|
this.width = 0;
|
|
3995
|
+
/**
|
|
3996
|
+
* Height on the button, of type number denoting pixels or string.
|
|
3997
|
+
* @group Props
|
|
3998
|
+
*/
|
|
3205
3999
|
this.height = 0;
|
|
4000
|
+
/**
|
|
4001
|
+
* When present, it specifies that the component should be disabled.
|
|
4002
|
+
* @group Props
|
|
4003
|
+
*/
|
|
3206
4004
|
this.disabled = false;
|
|
4005
|
+
/**
|
|
4006
|
+
* When enabled, a cps-progress-circular bar is displayed.
|
|
4007
|
+
* @group Props
|
|
4008
|
+
*/
|
|
3207
4009
|
this.loading = false;
|
|
4010
|
+
/**
|
|
4011
|
+
* Callback to execute when button is clicked.
|
|
4012
|
+
* @param {any} any - button clicked.
|
|
4013
|
+
* @group Emits
|
|
4014
|
+
*/
|
|
3208
4015
|
this.clicked = new EventEmitter();
|
|
3209
4016
|
this.buttonColor = '';
|
|
3210
4017
|
this.textColor = '';
|
|
@@ -3321,7 +4128,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3321
4128
|
args: ['style.width']
|
|
3322
4129
|
}] } });
|
|
3323
4130
|
|
|
4131
|
+
/**
|
|
4132
|
+
* CpsCheckboxComponent is a checkbox element.
|
|
4133
|
+
* @group Components
|
|
4134
|
+
*/
|
|
3324
4135
|
class CpsCheckboxComponent {
|
|
4136
|
+
/**
|
|
4137
|
+
* Value of the checkbox.
|
|
4138
|
+
* @group Props
|
|
4139
|
+
*/
|
|
3325
4140
|
set value(value) {
|
|
3326
4141
|
this._value = value;
|
|
3327
4142
|
this.onChange(value);
|
|
@@ -3332,15 +4147,56 @@ class CpsCheckboxComponent {
|
|
|
3332
4147
|
constructor(_control, _elementRef) {
|
|
3333
4148
|
this._control = _control;
|
|
3334
4149
|
this._elementRef = _elementRef;
|
|
4150
|
+
/**
|
|
4151
|
+
* Label of the checkbox.
|
|
4152
|
+
* @group Props
|
|
4153
|
+
*/
|
|
3335
4154
|
this.label = '';
|
|
4155
|
+
/**
|
|
4156
|
+
* Whether checkbox is disabled.
|
|
4157
|
+
* @group Props
|
|
4158
|
+
*/
|
|
3336
4159
|
this.disabled = false;
|
|
4160
|
+
/**
|
|
4161
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
4162
|
+
* @group Props
|
|
4163
|
+
*/
|
|
3337
4164
|
this.infoTooltip = '';
|
|
4165
|
+
/**
|
|
4166
|
+
* InfoTooltip class for styling.
|
|
4167
|
+
* @group Props
|
|
4168
|
+
*/
|
|
3338
4169
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
4170
|
+
/**
|
|
4171
|
+
* Size of infoTooltip, of type number denoting pixels or string.
|
|
4172
|
+
* @group Props
|
|
4173
|
+
*/
|
|
3339
4174
|
this.infoTooltipMaxWidth = '100%';
|
|
4175
|
+
/**
|
|
4176
|
+
* Whether the infoTooltip is persistent.
|
|
4177
|
+
* @group Props
|
|
4178
|
+
*/
|
|
3340
4179
|
this.infoTooltipPersistent = false;
|
|
4180
|
+
/**
|
|
4181
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
4182
|
+
* @group Props
|
|
4183
|
+
*/
|
|
3341
4184
|
this.infoTooltipPosition = 'top';
|
|
4185
|
+
/**
|
|
4186
|
+
* Name of the icon.
|
|
4187
|
+
* @group Props
|
|
4188
|
+
*/
|
|
3342
4189
|
this.icon = '';
|
|
4190
|
+
/**
|
|
4191
|
+
* Color of the icon.
|
|
4192
|
+
* @group Props
|
|
4193
|
+
*/
|
|
3343
4194
|
this.iconColor = 'text-dark';
|
|
4195
|
+
/**
|
|
4196
|
+
* Callback to invoke on value change.
|
|
4197
|
+
* @param {boolean} boolean - value changed.
|
|
4198
|
+
* @group Emits
|
|
4199
|
+
*/
|
|
3344
4200
|
this.valueChanged = new EventEmitter();
|
|
3345
4201
|
this._value = false;
|
|
3346
4202
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -3414,11 +4270,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3414
4270
|
}] } });
|
|
3415
4271
|
|
|
3416
4272
|
let nextUniqueId = 0;
|
|
4273
|
+
/**
|
|
4274
|
+
* CpsRadioButtonComponent is an internal radio button component.
|
|
4275
|
+
* @group Components
|
|
4276
|
+
*/
|
|
3417
4277
|
class CpsRadioButtonComponent {
|
|
3418
4278
|
constructor() {
|
|
3419
4279
|
this._uniqueId = `cps-radio-button-${++nextUniqueId}`;
|
|
4280
|
+
/**
|
|
4281
|
+
* Whether the radio button is checked.
|
|
4282
|
+
* @group Props
|
|
4283
|
+
*/
|
|
3420
4284
|
this.checked = false;
|
|
4285
|
+
/**
|
|
4286
|
+
* Whether the radio button is disabled.
|
|
4287
|
+
* @group Props
|
|
4288
|
+
*/
|
|
3421
4289
|
this.groupDisabled = false;
|
|
4290
|
+
/**
|
|
4291
|
+
* Callback to invoke on value update.
|
|
4292
|
+
* @param {Event} event - Custom update value event.
|
|
4293
|
+
* @group Emits
|
|
4294
|
+
*/
|
|
3422
4295
|
this.updateValueEvent = new EventEmitter();
|
|
3423
4296
|
}
|
|
3424
4297
|
get inputId() {
|
|
@@ -3448,7 +4321,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3448
4321
|
|
|
3449
4322
|
/* eslint-disable no-use-before-define */
|
|
3450
4323
|
const CPS_RADIO_GROUP = new InjectionToken('CpsRadioGroupComponent');
|
|
4324
|
+
/**
|
|
4325
|
+
* CpsRadioGroupComponent is a radio buttons group.
|
|
4326
|
+
* @group Components
|
|
4327
|
+
*/
|
|
3451
4328
|
class CpsRadioGroupComponent {
|
|
4329
|
+
/**
|
|
4330
|
+
* Value of the radio group.
|
|
4331
|
+
* @group Props
|
|
4332
|
+
*/
|
|
3452
4333
|
set value(value) {
|
|
3453
4334
|
this._value = value;
|
|
3454
4335
|
this.onChange(value);
|
|
@@ -3458,15 +4339,56 @@ class CpsRadioGroupComponent {
|
|
|
3458
4339
|
}
|
|
3459
4340
|
constructor(_control) {
|
|
3460
4341
|
this._control = _control;
|
|
4342
|
+
/**
|
|
4343
|
+
* An array of options.
|
|
4344
|
+
* @group Props
|
|
4345
|
+
*/
|
|
3461
4346
|
this.options = [];
|
|
4347
|
+
/**
|
|
4348
|
+
* Label of the radio group.
|
|
4349
|
+
* @group Props
|
|
4350
|
+
*/
|
|
3462
4351
|
this.groupLabel = '';
|
|
4352
|
+
/**
|
|
4353
|
+
* Whether the radio group should be vertical.
|
|
4354
|
+
* @group Props
|
|
4355
|
+
*/
|
|
3463
4356
|
this.vertical = false;
|
|
4357
|
+
/**
|
|
4358
|
+
* Whether the radio group is disabled.
|
|
4359
|
+
* @group Props
|
|
4360
|
+
*/
|
|
3464
4361
|
this.disabled = false;
|
|
4362
|
+
/**
|
|
4363
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
4364
|
+
* @group Props
|
|
4365
|
+
*/
|
|
3465
4366
|
this.infoTooltip = '';
|
|
4367
|
+
/**
|
|
4368
|
+
* InfoTooltip class for styling.
|
|
4369
|
+
* @group Props
|
|
4370
|
+
*/
|
|
3466
4371
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
4372
|
+
/**
|
|
4373
|
+
* Size of infoTooltip, of type number denoting pixels or string.
|
|
4374
|
+
* @group Props
|
|
4375
|
+
*/
|
|
3467
4376
|
this.infoTooltipMaxWidth = '100%';
|
|
4377
|
+
/**
|
|
4378
|
+
* Whether the infoTooltip is persistent.
|
|
4379
|
+
* @group Props
|
|
4380
|
+
*/
|
|
3468
4381
|
this.infoTooltipPersistent = false;
|
|
4382
|
+
/**
|
|
4383
|
+
* Position of infoTooltip, it can be "top", "bottom", "left" or "right".
|
|
4384
|
+
* @group Props
|
|
4385
|
+
*/
|
|
3469
4386
|
this.infoTooltipPosition = 'top';
|
|
4387
|
+
/**
|
|
4388
|
+
* Callback to invoke on value change.
|
|
4389
|
+
* @param {boolean} boolean - value changed.
|
|
4390
|
+
* @group Emits
|
|
4391
|
+
*/
|
|
3470
4392
|
this.valueChanged = new EventEmitter();
|
|
3471
4393
|
this._value = undefined;
|
|
3472
4394
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -3547,6 +4469,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3547
4469
|
type: Output
|
|
3548
4470
|
}] } });
|
|
3549
4471
|
|
|
4472
|
+
/**
|
|
4473
|
+
* CpsRadioComponent is a radio button with arbitrary content.
|
|
4474
|
+
* @group Components
|
|
4475
|
+
*/
|
|
3550
4476
|
class CpsRadioComponent {
|
|
3551
4477
|
constructor(radioGroup) {
|
|
3552
4478
|
this.groupDisabled = false;
|
|
@@ -3578,11 +4504,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3578
4504
|
type: Input
|
|
3579
4505
|
}] } });
|
|
3580
4506
|
|
|
4507
|
+
/**
|
|
4508
|
+
* CpsLoaderComponent is a fetch data indicator.
|
|
4509
|
+
* @group Components
|
|
4510
|
+
*/
|
|
3581
4511
|
class CpsLoaderComponent {
|
|
3582
4512
|
constructor() {
|
|
4513
|
+
/**
|
|
4514
|
+
* Option for loader component to take up the whole screen.
|
|
4515
|
+
* @group Props
|
|
4516
|
+
*/
|
|
3583
4517
|
this.fullScreen = false;
|
|
4518
|
+
/**
|
|
4519
|
+
* Option to control the transparency of the loader component, of type number or string.
|
|
4520
|
+
* @group Props
|
|
4521
|
+
*/
|
|
3584
4522
|
this.opacity = 0.1;
|
|
4523
|
+
/**
|
|
4524
|
+
* Color of the label.
|
|
4525
|
+
* @group Props
|
|
4526
|
+
*/
|
|
3585
4527
|
this.labelColor = 'depth';
|
|
4528
|
+
/**
|
|
4529
|
+
* Whether to show 'Loading...' label.
|
|
4530
|
+
* @group Props
|
|
4531
|
+
*/
|
|
3586
4532
|
this.showLabel = true;
|
|
3587
4533
|
this.backgroundColor = 'rgba(0, 0, 0, 0.1)';
|
|
3588
4534
|
}
|
|
@@ -3606,9 +4552,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3606
4552
|
type: Input
|
|
3607
4553
|
}] } });
|
|
3608
4554
|
|
|
4555
|
+
/**
|
|
4556
|
+
* TableRowMenuComponent is an internal component which applies the menu to each row.
|
|
4557
|
+
* @group Components
|
|
4558
|
+
*/
|
|
3609
4559
|
class TableRowMenuComponent {
|
|
3610
4560
|
constructor() {
|
|
4561
|
+
/**
|
|
4562
|
+
* Callback to invoke when edit-row button is clicked.
|
|
4563
|
+
* @param {any} any - button clicked.
|
|
4564
|
+
* @group Emits
|
|
4565
|
+
*/
|
|
3611
4566
|
this.editRowBtnClicked = new EventEmitter();
|
|
4567
|
+
/**
|
|
4568
|
+
* Callback to invoke when remove-row button is clicked.
|
|
4569
|
+
* @param {any} any - button clicked.
|
|
4570
|
+
* @group Emits
|
|
4571
|
+
*/
|
|
3612
4572
|
this.removeRowBtnClicked = new EventEmitter();
|
|
3613
4573
|
this.items = [
|
|
3614
4574
|
{
|
|
@@ -3712,12 +4672,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3712
4672
|
type: Input
|
|
3713
4673
|
}] } });
|
|
3714
4674
|
|
|
4675
|
+
/**
|
|
4676
|
+
* CpsTableColumnSortableDirective is a sorting directive used to sort single or multiple columns in table.
|
|
4677
|
+
* @group Directives
|
|
4678
|
+
*/
|
|
3715
4679
|
class CpsTableColumnSortableDirective extends SortableColumn {
|
|
3716
4680
|
constructor(elementRef, viewContainerRef, dt) {
|
|
3717
4681
|
super(dt);
|
|
3718
4682
|
this.elementRef = elementRef;
|
|
3719
4683
|
this.viewContainerRef = viewContainerRef;
|
|
3720
4684
|
this.dt = dt;
|
|
4685
|
+
/**
|
|
4686
|
+
* Name of the column to be sorted.
|
|
4687
|
+
* @group Props
|
|
4688
|
+
*/
|
|
3721
4689
|
this.field = '';
|
|
3722
4690
|
this.sortIconRef =
|
|
3723
4691
|
this.viewContainerRef.createComponent(CpsSortIconComponent);
|
|
@@ -3833,81 +4801,385 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3833
4801
|
function tableFactory(tableComponent) {
|
|
3834
4802
|
return tableComponent.primengTable;
|
|
3835
4803
|
}
|
|
4804
|
+
/**
|
|
4805
|
+
* CpsTableComponent displays data in tabular format.
|
|
4806
|
+
* @group Components
|
|
4807
|
+
*/
|
|
3836
4808
|
class CpsTableComponent {
|
|
3837
4809
|
// eslint-disable-next-line no-useless-constructor
|
|
3838
4810
|
constructor(cdRef) {
|
|
3839
4811
|
this.cdRef = cdRef;
|
|
4812
|
+
/**
|
|
4813
|
+
* An array of objects to display.
|
|
4814
|
+
* @group Props
|
|
4815
|
+
*/
|
|
3840
4816
|
this.data = [];
|
|
4817
|
+
/**
|
|
4818
|
+
* An array of objects to represent dynamic columns.
|
|
4819
|
+
* @group Props
|
|
4820
|
+
*/
|
|
3841
4821
|
this.columns = [];
|
|
4822
|
+
/**
|
|
4823
|
+
* A key used to retrieve the header from columns.
|
|
4824
|
+
* @group Props
|
|
4825
|
+
*/
|
|
3842
4826
|
this.colHeaderName = 'header';
|
|
4827
|
+
/**
|
|
4828
|
+
* A key used to retrieve the field from columns.
|
|
4829
|
+
* @group Props
|
|
4830
|
+
*/
|
|
3843
4831
|
this.colFieldName = 'field';
|
|
4832
|
+
/**
|
|
4833
|
+
* Whether the table should have alternating stripes.
|
|
4834
|
+
* @group Props
|
|
4835
|
+
*/
|
|
3844
4836
|
this.striped = true;
|
|
4837
|
+
/**
|
|
4838
|
+
* Whether the table should have borders.
|
|
4839
|
+
* @group Props
|
|
4840
|
+
*/
|
|
3845
4841
|
this.bordered = true;
|
|
4842
|
+
/**
|
|
4843
|
+
* Size of table cells, it can be "small", "normal" or "large".
|
|
4844
|
+
* @group Props
|
|
4845
|
+
*/
|
|
3846
4846
|
this.size = 'normal';
|
|
4847
|
+
/**
|
|
4848
|
+
* Whether the table should have row selection.
|
|
4849
|
+
* @group Props
|
|
4850
|
+
*/
|
|
3847
4851
|
this.selectable = false;
|
|
4852
|
+
/**
|
|
4853
|
+
* Whether the table should have rows highlighting on hover.
|
|
4854
|
+
* @group Props
|
|
4855
|
+
*/
|
|
3848
4856
|
this.rowHover = true;
|
|
3849
|
-
|
|
4857
|
+
/**
|
|
4858
|
+
* Field, that uniquely identifies a record in data (needed for expandable rows).
|
|
4859
|
+
* @group Props
|
|
4860
|
+
*/
|
|
4861
|
+
this.dataKey = '';
|
|
4862
|
+
/**
|
|
4863
|
+
* Whether the table should show row menu.
|
|
4864
|
+
* @group Props
|
|
4865
|
+
*/
|
|
3850
4866
|
this.showRowMenu = false;
|
|
4867
|
+
/**
|
|
4868
|
+
* Whether the table should have re-orderable rows.
|
|
4869
|
+
* @group Props
|
|
4870
|
+
*/
|
|
3851
4871
|
this.reorderableRows = false;
|
|
4872
|
+
/**
|
|
4873
|
+
* When enabled, a loader component is displayed.
|
|
4874
|
+
* @group Props
|
|
4875
|
+
*/
|
|
3852
4876
|
this.loading = false;
|
|
4877
|
+
/**
|
|
4878
|
+
* Inline style of the table.
|
|
4879
|
+
* @group Props
|
|
4880
|
+
*/
|
|
3853
4881
|
this.tableStyle = undefined;
|
|
4882
|
+
/**
|
|
4883
|
+
* Style class of the table.
|
|
4884
|
+
* @group Props
|
|
4885
|
+
*/
|
|
3854
4886
|
this.tableStyleClass = '';
|
|
3855
|
-
|
|
4887
|
+
/**
|
|
4888
|
+
* Makes all columns sortable if columns prop is provided.
|
|
4889
|
+
* @group Props
|
|
4890
|
+
*/
|
|
4891
|
+
this.sortable = false;
|
|
4892
|
+
/**
|
|
4893
|
+
* Defines whether sorting works on single column or on multiple columns.
|
|
4894
|
+
* @group Props
|
|
4895
|
+
*/
|
|
3856
4896
|
this.sortMode = 'single';
|
|
4897
|
+
/**
|
|
4898
|
+
* Whether to use the default sorting or a custom one using sortFunction.
|
|
4899
|
+
* @group Props
|
|
4900
|
+
*/
|
|
3857
4901
|
this.customSort = false;
|
|
4902
|
+
/**
|
|
4903
|
+
* Whether the table has toolbar.
|
|
4904
|
+
* @group Props
|
|
4905
|
+
*/
|
|
3858
4906
|
this.hasToolbar = true;
|
|
4907
|
+
/**
|
|
4908
|
+
* Toolbar size, it can be "small" or "normal".
|
|
4909
|
+
* @group Props
|
|
4910
|
+
*/
|
|
3859
4911
|
this.toolbarSize = 'normal';
|
|
4912
|
+
/**
|
|
4913
|
+
* Toolbar title.
|
|
4914
|
+
* @group Props
|
|
4915
|
+
*/
|
|
3860
4916
|
this.toolbarTitle = '';
|
|
4917
|
+
/**
|
|
4918
|
+
* Toolbar icon name.
|
|
4919
|
+
* @group Props
|
|
4920
|
+
*/
|
|
3861
4921
|
this.toolbarIcon = '';
|
|
4922
|
+
/**
|
|
4923
|
+
* Toolbar icon color.
|
|
4924
|
+
* @group Props
|
|
4925
|
+
*/
|
|
3862
4926
|
this.toolbarIconColor = '';
|
|
4927
|
+
/**
|
|
4928
|
+
* Makes table scrollable.
|
|
4929
|
+
* @group Props
|
|
4930
|
+
*/
|
|
3863
4931
|
this.scrollable = true;
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
4932
|
+
/**
|
|
4933
|
+
* Height of the scroll viewport in fixed pixels or the "flex" keyword for a dynamic size.
|
|
4934
|
+
* @group Props
|
|
4935
|
+
*/
|
|
4936
|
+
this.scrollHeight = '';
|
|
4937
|
+
/**
|
|
4938
|
+
* Whether only the elements within scrollable area should be added into the DOM. Works only if scrollable prop is true.
|
|
4939
|
+
* @group Props
|
|
4940
|
+
*/
|
|
4941
|
+
this.virtualScroll = false;
|
|
4942
|
+
/**
|
|
4943
|
+
* Determines how many additional elements to add to the DOM outside of the view.
|
|
4944
|
+
* @group Props
|
|
4945
|
+
*/
|
|
4946
|
+
this.numToleratedItems = 10;
|
|
4947
|
+
/**
|
|
4948
|
+
* Whether the table should have paginator.
|
|
4949
|
+
* @group Props
|
|
4950
|
+
*/
|
|
3867
4951
|
this.paginator = false;
|
|
4952
|
+
/**
|
|
4953
|
+
* Whether to show paginator even if there is only one page.
|
|
4954
|
+
* @group Props
|
|
4955
|
+
*/
|
|
3868
4956
|
this.alwaysShowPaginator = true;
|
|
4957
|
+
/**
|
|
4958
|
+
* Array of integer values to display inside rows per page dropdown of paginator.
|
|
4959
|
+
* @group Props
|
|
4960
|
+
*/
|
|
3869
4961
|
this.rowsPerPageOptions = [];
|
|
4962
|
+
/**
|
|
4963
|
+
* Index of the first row to be displayed.
|
|
4964
|
+
* @group Props
|
|
4965
|
+
*/
|
|
3870
4966
|
this.first = 0;
|
|
4967
|
+
/**
|
|
4968
|
+
* Number of rows to display per page.
|
|
4969
|
+
* @group Props
|
|
4970
|
+
*/
|
|
3871
4971
|
this.rows = 0;
|
|
4972
|
+
/**
|
|
4973
|
+
* Whether to reset page on rows change.
|
|
4974
|
+
* @group Props
|
|
4975
|
+
*/
|
|
3872
4976
|
this.resetPageOnRowsChange = false;
|
|
4977
|
+
/**
|
|
4978
|
+
* Whether to reset page on table data sorting.
|
|
4979
|
+
* @group Props
|
|
4980
|
+
*/
|
|
3873
4981
|
this.resetPageOnSort = true;
|
|
4982
|
+
/**
|
|
4983
|
+
* Number of total records.
|
|
4984
|
+
* @group Props
|
|
4985
|
+
*/
|
|
3874
4986
|
this.totalRecords = 0;
|
|
4987
|
+
/**
|
|
4988
|
+
* Text to display when there is no data.
|
|
4989
|
+
* @group Props
|
|
4990
|
+
*/
|
|
3875
4991
|
this.emptyMessage = 'No data';
|
|
4992
|
+
/**
|
|
4993
|
+
* Height of table's body when there is no data, of type number denoting pixels or string.
|
|
4994
|
+
* @group Props
|
|
4995
|
+
*/
|
|
3876
4996
|
this.emptyBodyHeight = '';
|
|
4997
|
+
/**
|
|
4998
|
+
* Defines if data is loaded and interacted with in lazy manner.
|
|
4999
|
+
* @group Props
|
|
5000
|
+
*/
|
|
3877
5001
|
this.lazy = false;
|
|
5002
|
+
/**
|
|
5003
|
+
* Whether to call lazy loading on initialization.
|
|
5004
|
+
* @group Props
|
|
5005
|
+
*/
|
|
3878
5006
|
this.lazyLoadOnInit = true;
|
|
5007
|
+
/**
|
|
5008
|
+
* Whether to show global filter in the toolbar.
|
|
5009
|
+
* @group Props
|
|
5010
|
+
*/
|
|
3879
5011
|
this.showGlobalFilter = false;
|
|
5012
|
+
/**
|
|
5013
|
+
* Global filter placeholder.
|
|
5014
|
+
* @group Props
|
|
5015
|
+
*/
|
|
3880
5016
|
this.globalFilterPlaceholder = 'Search';
|
|
5017
|
+
/**
|
|
5018
|
+
* An array of fields to use in global filtering.
|
|
5019
|
+
* @group Props
|
|
5020
|
+
*/
|
|
3881
5021
|
this.globalFilterFields = [];
|
|
5022
|
+
/**
|
|
5023
|
+
* Whether to clear global filter on data loading.
|
|
5024
|
+
* @group Props
|
|
5025
|
+
*/
|
|
3882
5026
|
this.clearGlobalFilterOnLoading = false;
|
|
5027
|
+
/**
|
|
5028
|
+
* Whether to show remove button in the toolbar when rows are selected.
|
|
5029
|
+
* @group Props
|
|
5030
|
+
*/
|
|
3883
5031
|
this.showRemoveBtnOnSelect = true;
|
|
5032
|
+
/**
|
|
5033
|
+
* Whether removeBtnOnSelect is disabled.
|
|
5034
|
+
* @group Props
|
|
5035
|
+
*/
|
|
3884
5036
|
this.removeBtnOnSelectDisabled = false;
|
|
5037
|
+
/**
|
|
5038
|
+
* Whether to show additional button in the toolbar when rows are selected.
|
|
5039
|
+
* @group Props
|
|
5040
|
+
*/
|
|
3885
5041
|
this.showAdditionalBtnOnSelect = false;
|
|
5042
|
+
/**
|
|
5043
|
+
* AdditionalBtnOnSelect title.
|
|
5044
|
+
* @group Props
|
|
5045
|
+
*/
|
|
3886
5046
|
this.additionalBtnOnSelectTitle = 'Select action';
|
|
5047
|
+
/**
|
|
5048
|
+
* Whether additionalBtnOnSelect is disabled.
|
|
5049
|
+
* @group Props
|
|
5050
|
+
*/
|
|
3887
5051
|
this.additionalBtnOnSelectDisabled = false;
|
|
5052
|
+
/**
|
|
5053
|
+
* Whether to show action button in the toolbar.
|
|
5054
|
+
* @group Props
|
|
5055
|
+
*/
|
|
3888
5056
|
this.showActionBtn = false;
|
|
5057
|
+
/**
|
|
5058
|
+
* Action button title.
|
|
5059
|
+
* @group Props
|
|
5060
|
+
*/
|
|
3889
5061
|
this.actionBtnTitle = 'Action';
|
|
5062
|
+
/**
|
|
5063
|
+
* Whether actionBtn is disabled.
|
|
5064
|
+
* @group Props
|
|
5065
|
+
*/
|
|
3890
5066
|
this.actionBtnDisabled = false;
|
|
5067
|
+
/**
|
|
5068
|
+
* Whether to show export button in the toolbar.
|
|
5069
|
+
* @group Props
|
|
5070
|
+
*/
|
|
3891
5071
|
this.showExportBtn = false;
|
|
5072
|
+
/**
|
|
5073
|
+
* Whether exportBtn is disabled.
|
|
5074
|
+
* @group Props
|
|
5075
|
+
*/
|
|
3892
5076
|
this.exportBtnDisabled = false;
|
|
5077
|
+
/**
|
|
5078
|
+
* Name of the exported file.
|
|
5079
|
+
* @group Props
|
|
5080
|
+
*/
|
|
3893
5081
|
this.exportFilename = 'download';
|
|
5082
|
+
/**
|
|
5083
|
+
* Character to use as the csv separator.
|
|
5084
|
+
* @group Props
|
|
5085
|
+
*/
|
|
3894
5086
|
this.csvSeparator = ',';
|
|
5087
|
+
/**
|
|
5088
|
+
* Whether to show data reload button in the toolbar.
|
|
5089
|
+
* @group Props
|
|
5090
|
+
*/
|
|
3895
5091
|
this.showDataReloadBtn = false;
|
|
5092
|
+
/**
|
|
5093
|
+
* Whether dataReloadBtn is disabled.
|
|
5094
|
+
* @group Props
|
|
5095
|
+
*/
|
|
3896
5096
|
this.dataReloadBtnDisabled = false;
|
|
3897
|
-
|
|
5097
|
+
/**
|
|
5098
|
+
* 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.
|
|
5099
|
+
* @group Props
|
|
5100
|
+
*/
|
|
5101
|
+
this.showColumnsToggleBtn = false;
|
|
5102
|
+
/**
|
|
5103
|
+
* Whether columnsToggle button is disabled.
|
|
5104
|
+
* @group Props
|
|
5105
|
+
*/
|
|
3898
5106
|
this.columnsToggleBtnDisabled = false;
|
|
3899
|
-
|
|
5107
|
+
/**
|
|
5108
|
+
* Array of initial columns to show in the table. If not provided, all columns are initially visible.
|
|
5109
|
+
* @group Props
|
|
5110
|
+
*/
|
|
5111
|
+
this.initialColumns = [];
|
|
5112
|
+
/**
|
|
5113
|
+
* Callback to invoke on selection changed.
|
|
5114
|
+
* @param {any[]} value - selected data.
|
|
5115
|
+
* @group Emits
|
|
5116
|
+
*/
|
|
3900
5117
|
this.selectionChanged = new EventEmitter();
|
|
5118
|
+
/**
|
|
5119
|
+
* Callback to invoke when action button is clicked.
|
|
5120
|
+
* @param {void} void - button clicked.
|
|
5121
|
+
* @group Emits
|
|
5122
|
+
*/
|
|
3901
5123
|
this.actionBtnClicked = new EventEmitter();
|
|
5124
|
+
/**
|
|
5125
|
+
* Callback to invoke when edit-row button is clicked.
|
|
5126
|
+
* @param {any} any - button clicked.
|
|
5127
|
+
* @group Emits
|
|
5128
|
+
*/
|
|
3902
5129
|
this.editRowBtnClicked = new EventEmitter();
|
|
5130
|
+
/**
|
|
5131
|
+
* Callback to invoke on rows removal.
|
|
5132
|
+
* @param {any[]} any[] - array of rows removed.
|
|
5133
|
+
* @group Emits
|
|
5134
|
+
*/
|
|
3903
5135
|
this.rowsRemoved = new EventEmitter();
|
|
5136
|
+
/**
|
|
5137
|
+
* Callback to invoke on page changed.
|
|
5138
|
+
* @param {any} any - page changed.
|
|
5139
|
+
* @group Emits
|
|
5140
|
+
*/
|
|
3904
5141
|
this.pageChanged = new EventEmitter();
|
|
5142
|
+
/**
|
|
5143
|
+
* Callback to invoke when data is sorted.
|
|
5144
|
+
* @param {any} any - sort meta.
|
|
5145
|
+
* @group Emits
|
|
5146
|
+
*/
|
|
3905
5147
|
this.sorted = new EventEmitter();
|
|
5148
|
+
/**
|
|
5149
|
+
* Callback to invoke when data is filtered.
|
|
5150
|
+
* @param {any} any - custom filtering event.
|
|
5151
|
+
* @group Emits
|
|
5152
|
+
*/
|
|
3906
5153
|
this.filtered = new EventEmitter();
|
|
5154
|
+
/**
|
|
5155
|
+
* Callback to invoke when rows are reordered.
|
|
5156
|
+
* @param {any} any - rows reordered.
|
|
5157
|
+
* @group Emits
|
|
5158
|
+
*/
|
|
3907
5159
|
this.rowsReordered = new EventEmitter();
|
|
5160
|
+
/**
|
|
5161
|
+
* Callback to invoke on columns selection.
|
|
5162
|
+
* @param {object} object - selected column.
|
|
5163
|
+
* @group Emits
|
|
5164
|
+
*/
|
|
3908
5165
|
this.columnsSelected = new EventEmitter();
|
|
5166
|
+
/**
|
|
5167
|
+
* Callback to invoke when paging, sorting or filtering happens in lazy mode.
|
|
5168
|
+
* @param {any} any - custom lazy loading event.
|
|
5169
|
+
* @group Emits
|
|
5170
|
+
*/
|
|
3909
5171
|
this.lazyLoaded = new EventEmitter();
|
|
5172
|
+
/**
|
|
5173
|
+
* Callback to invoke when data-reload button is clicked.
|
|
5174
|
+
* @param {any} any - button clicked.
|
|
5175
|
+
* @group Emits
|
|
5176
|
+
*/
|
|
3910
5177
|
this.dataReloadBtnClicked = new EventEmitter();
|
|
5178
|
+
/**
|
|
5179
|
+
* Callback to invoke when additional button on select is clicked.
|
|
5180
|
+
* @param {any[]} any[] - selected data.
|
|
5181
|
+
* @group Emits
|
|
5182
|
+
*/
|
|
3911
5183
|
this.additionalBtnOnSelectClicked = new EventEmitter();
|
|
3912
5184
|
/**
|
|
3913
5185
|
* A function to implement custom sorting. customSort must be true.
|
|
@@ -4419,7 +5691,15 @@ var CpsColumnFilterMatchMode;
|
|
|
4419
5691
|
CpsColumnFilterMatchMode["DATE_AFTER"] = "dateAfter";
|
|
4420
5692
|
})(CpsColumnFilterMatchMode || (CpsColumnFilterMatchMode = {}));
|
|
4421
5693
|
|
|
5694
|
+
/**
|
|
5695
|
+
* CpsDatepickerComponent is an input component to provide date input.
|
|
5696
|
+
* @group Components
|
|
5697
|
+
*/
|
|
4422
5698
|
class CpsDatepickerComponent {
|
|
5699
|
+
/**
|
|
5700
|
+
* Value of the datepicker.
|
|
5701
|
+
* @group Props
|
|
5702
|
+
*/
|
|
4423
5703
|
set value(value) {
|
|
4424
5704
|
this._value = value;
|
|
4425
5705
|
this.stringDate = this._dateToString(value);
|
|
@@ -4430,22 +5710,91 @@ class CpsDatepickerComponent {
|
|
|
4430
5710
|
}
|
|
4431
5711
|
constructor(_control) {
|
|
4432
5712
|
this._control = _control;
|
|
5713
|
+
/**
|
|
5714
|
+
* Label of the datepicker element.
|
|
5715
|
+
* @group Props
|
|
5716
|
+
*/
|
|
4433
5717
|
this.label = '';
|
|
5718
|
+
/**
|
|
5719
|
+
* Whether datepicker is disabled.
|
|
5720
|
+
* @group Props
|
|
5721
|
+
*/
|
|
4434
5722
|
this.disabled = false;
|
|
5723
|
+
/**
|
|
5724
|
+
* Width of the datepicker of type number denoting pixels or string.
|
|
5725
|
+
* @group Props
|
|
5726
|
+
*/
|
|
4435
5727
|
this.width = '100%';
|
|
5728
|
+
/**
|
|
5729
|
+
* Placeholder text.
|
|
5730
|
+
* @group Props
|
|
5731
|
+
*/
|
|
4436
5732
|
this.placeholder = 'MM/DD/YYYY';
|
|
5733
|
+
/**
|
|
5734
|
+
* Bottom hint text for the input field.
|
|
5735
|
+
* @group Props
|
|
5736
|
+
*/
|
|
4437
5737
|
this.hint = '';
|
|
5738
|
+
/**
|
|
5739
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
5740
|
+
* @group Props
|
|
5741
|
+
*/
|
|
4438
5742
|
this.clearable = false;
|
|
5743
|
+
/**
|
|
5744
|
+
* Hides hint and validation errors.
|
|
5745
|
+
* @group Props
|
|
5746
|
+
*/
|
|
4439
5747
|
this.hideDetails = false;
|
|
5748
|
+
/**
|
|
5749
|
+
* Whether the component should have persistent clear icon.
|
|
5750
|
+
* @group Props
|
|
5751
|
+
*/
|
|
4440
5752
|
this.persistentClear = false;
|
|
5753
|
+
/**
|
|
5754
|
+
* Whether to show button to be able to select today's date.
|
|
5755
|
+
* @group Props
|
|
5756
|
+
*/
|
|
4441
5757
|
this.showTodayButton = true;
|
|
5758
|
+
/**
|
|
5759
|
+
* Whether the datepicker dropdown should open on input focus.
|
|
5760
|
+
* @group Props
|
|
5761
|
+
*/
|
|
4442
5762
|
this.openOnInputFocus = false;
|
|
5763
|
+
/**
|
|
5764
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
5765
|
+
* @group Props
|
|
5766
|
+
*/
|
|
4443
5767
|
this.infoTooltip = '';
|
|
5768
|
+
/**
|
|
5769
|
+
* InfoTooltip class for styling.
|
|
5770
|
+
* @group Props
|
|
5771
|
+
*/
|
|
4444
5772
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
5773
|
+
/**
|
|
5774
|
+
* Size of infoTooltip, of type number denoting pixels or string.
|
|
5775
|
+
* @group Props
|
|
5776
|
+
*/
|
|
4445
5777
|
this.infoTooltipMaxWidth = '100%';
|
|
5778
|
+
/**
|
|
5779
|
+
* Whether the infoTooltip is persistent.
|
|
5780
|
+
* @group Props
|
|
5781
|
+
*/
|
|
4446
5782
|
this.infoTooltipPersistent = false;
|
|
5783
|
+
/**
|
|
5784
|
+
* Position of infoTooltip, it can be "top", "bottom", "left" or "right".
|
|
5785
|
+
* @group Props
|
|
5786
|
+
*/
|
|
4447
5787
|
this.infoTooltipPosition = 'top';
|
|
5788
|
+
/**
|
|
5789
|
+
* Styling appearance of datepicker input, it can be 'outlined', 'underlined' or 'borderless.
|
|
5790
|
+
* @group Props
|
|
5791
|
+
*/
|
|
4448
5792
|
this.appearance = 'outlined';
|
|
5793
|
+
/**
|
|
5794
|
+
* Callback to invoke on value change.
|
|
5795
|
+
* @param {Date | null} value - value change.
|
|
5796
|
+
* @group Emits
|
|
5797
|
+
*/
|
|
4449
5798
|
this.valueChanged = new EventEmitter();
|
|
4450
5799
|
this.stringDate = '';
|
|
4451
5800
|
this.isOpened = false;
|
|
@@ -4712,6 +6061,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4712
6061
|
args: ['calendarMenu']
|
|
4713
6062
|
}] } });
|
|
4714
6063
|
|
|
6064
|
+
/**
|
|
6065
|
+
* CpsButtonToggleComponent is used to select values using buttons.
|
|
6066
|
+
* @group Components
|
|
6067
|
+
*/
|
|
4715
6068
|
class CpsButtonToggleComponent {
|
|
4716
6069
|
set value(value) {
|
|
4717
6070
|
this._value = value;
|
|
@@ -4723,19 +6076,76 @@ class CpsButtonToggleComponent {
|
|
|
4723
6076
|
constructor(_control, renderer) {
|
|
4724
6077
|
this._control = _control;
|
|
4725
6078
|
this.renderer = renderer;
|
|
6079
|
+
/**
|
|
6080
|
+
* Label of the toggle buttons.
|
|
6081
|
+
* @group Props
|
|
6082
|
+
*/
|
|
4726
6083
|
this.label = '';
|
|
6084
|
+
/**
|
|
6085
|
+
* An array of options.
|
|
6086
|
+
* @group Props
|
|
6087
|
+
*/
|
|
4727
6088
|
this.options = [];
|
|
6089
|
+
/**
|
|
6090
|
+
* Specifies if multiple values can be selected.
|
|
6091
|
+
* @group Props
|
|
6092
|
+
*/
|
|
4728
6093
|
this.multiple = false;
|
|
6094
|
+
/**
|
|
6095
|
+
* Specifies that the component should be disabled.
|
|
6096
|
+
* @group Props
|
|
6097
|
+
*/
|
|
4729
6098
|
this.disabled = false;
|
|
4730
|
-
|
|
6099
|
+
/**
|
|
6100
|
+
* Whether at least one of the options is mandatory.
|
|
6101
|
+
* @group Props
|
|
6102
|
+
*/
|
|
6103
|
+
this.mandatory = true;
|
|
6104
|
+
/**
|
|
6105
|
+
* Whether all buttons should have equal widths.
|
|
6106
|
+
* @group Props
|
|
6107
|
+
*/
|
|
4731
6108
|
this.equalWidths = true;
|
|
6109
|
+
/**
|
|
6110
|
+
* Position of the option tooltip, can be 'top', 'bottom', 'left' or 'right'.
|
|
6111
|
+
* @group Props
|
|
6112
|
+
*/
|
|
4732
6113
|
this.optionTooltipPosition = 'bottom';
|
|
6114
|
+
/**
|
|
6115
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
6116
|
+
* @group Props
|
|
6117
|
+
*/
|
|
4733
6118
|
this.infoTooltip = '';
|
|
6119
|
+
/**
|
|
6120
|
+
* Info tooltip class for styling.
|
|
6121
|
+
* @group Props
|
|
6122
|
+
*/
|
|
4734
6123
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
6124
|
+
/**
|
|
6125
|
+
* Size of infoTooltip, of type number or string.
|
|
6126
|
+
* @group Props
|
|
6127
|
+
*/
|
|
4735
6128
|
this.infoTooltipMaxWidth = '100%';
|
|
6129
|
+
/**
|
|
6130
|
+
* Whether the infoTooltip is persistent.
|
|
6131
|
+
* @group Props
|
|
6132
|
+
*/
|
|
4736
6133
|
this.infoTooltipPersistent = false;
|
|
6134
|
+
/**
|
|
6135
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
6136
|
+
* @group Props
|
|
6137
|
+
*/
|
|
4737
6138
|
this.infoTooltipPosition = 'top';
|
|
6139
|
+
/**
|
|
6140
|
+
* Value of the component.
|
|
6141
|
+
* @group Props
|
|
6142
|
+
*/
|
|
4738
6143
|
this._value = undefined;
|
|
6144
|
+
/**
|
|
6145
|
+
* Callback to invoke on value change.
|
|
6146
|
+
* @param {any} any - value changed.
|
|
6147
|
+
* @group Emits
|
|
6148
|
+
*/
|
|
4739
6149
|
this.valueChanged = new EventEmitter();
|
|
4740
6150
|
this.largestButtonWidth = 0;
|
|
4741
6151
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -4877,6 +6287,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4877
6287
|
type: Output
|
|
4878
6288
|
}] } });
|
|
4879
6289
|
|
|
6290
|
+
/**
|
|
6291
|
+
* TableColumnFilterConstraintComponent is an internal filtering constraint component in table and treetable.
|
|
6292
|
+
* @group Components
|
|
6293
|
+
*/
|
|
4880
6294
|
class TableColumnFilterConstraintComponent {
|
|
4881
6295
|
get isCategoryDropdownOpened() {
|
|
4882
6296
|
return this.categoryAutocompleteComponent?.isOpened || false;
|
|
@@ -4884,12 +6298,36 @@ class TableColumnFilterConstraintComponent {
|
|
|
4884
6298
|
constructor(dt, tt) {
|
|
4885
6299
|
this.dt = dt;
|
|
4886
6300
|
this.tt = tt;
|
|
6301
|
+
/**
|
|
6302
|
+
* Type of filter constraint.
|
|
6303
|
+
* @group Props
|
|
6304
|
+
*/
|
|
4887
6305
|
this.type = 'text';
|
|
6306
|
+
/**
|
|
6307
|
+
* An array of category options.
|
|
6308
|
+
* @group Props
|
|
6309
|
+
*/
|
|
4888
6310
|
this.categoryOptions = [];
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
6311
|
+
/**
|
|
6312
|
+
* Whether to show category filter as button toggles.
|
|
6313
|
+
* @group Props
|
|
6314
|
+
*/
|
|
6315
|
+
this.asButtonToggle = false;
|
|
6316
|
+
/**
|
|
6317
|
+
* Single selection for category filter.
|
|
6318
|
+
* @group Props
|
|
6319
|
+
*/
|
|
6320
|
+
this.singleSelection = false;
|
|
6321
|
+
/**
|
|
6322
|
+
* Placeholder for input field.
|
|
6323
|
+
* @group Props
|
|
6324
|
+
*/
|
|
6325
|
+
this.placeholder = '';
|
|
6326
|
+
/**
|
|
6327
|
+
* Whether the filter should have an apply button.
|
|
6328
|
+
* @group Props
|
|
6329
|
+
*/
|
|
6330
|
+
this.hasApplyButton = true;
|
|
4893
6331
|
this.booleanOptions = [
|
|
4894
6332
|
{ label: 'True', value: 'true' },
|
|
4895
6333
|
{ label: 'False', value: 'false' }
|
|
@@ -4985,6 +6423,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4985
6423
|
args: ['categoryAutocompleteComponent']
|
|
4986
6424
|
}] } });
|
|
4987
6425
|
|
|
6426
|
+
/**
|
|
6427
|
+
* TableColumnFilterComponent is an internal filter component in table and treetable.
|
|
6428
|
+
* @group Components
|
|
6429
|
+
*/
|
|
4988
6430
|
class TableColumnFilterComponent {
|
|
4989
6431
|
get isCategoryDropdownOpened() {
|
|
4990
6432
|
if (this.type !== 'category')
|
|
@@ -4995,20 +6437,80 @@ class TableColumnFilterComponent {
|
|
|
4995
6437
|
this.elementRef = elementRef;
|
|
4996
6438
|
this.dt = dt;
|
|
4997
6439
|
this.tt = tt;
|
|
6440
|
+
/**
|
|
6441
|
+
* Type of filter in table, it can be of type "number", "boolean", "text", "date" or "category".
|
|
6442
|
+
* @group Props
|
|
6443
|
+
*/
|
|
4998
6444
|
this.type = 'text';
|
|
6445
|
+
/**
|
|
6446
|
+
* Whether the filter menu should be persistent.
|
|
6447
|
+
* @group Props
|
|
6448
|
+
*/
|
|
4999
6449
|
this.persistent = false;
|
|
6450
|
+
/**
|
|
6451
|
+
* Whether the filter should have clear button.
|
|
6452
|
+
* @group Props
|
|
6453
|
+
*/
|
|
5000
6454
|
this.showClearButton = true;
|
|
6455
|
+
/**
|
|
6456
|
+
* Whether the filter should have apply button.
|
|
6457
|
+
* @group Props
|
|
6458
|
+
*/
|
|
5001
6459
|
this.showApplyButton = true;
|
|
6460
|
+
/**
|
|
6461
|
+
* Whether the filter should have close button.
|
|
6462
|
+
* @group Props
|
|
6463
|
+
*/
|
|
5002
6464
|
this.showCloseButton = false;
|
|
6465
|
+
/**
|
|
6466
|
+
* Whether the filter should have match modes.
|
|
6467
|
+
* @group Props
|
|
6468
|
+
*/
|
|
5003
6469
|
this.showMatchModes = true;
|
|
6470
|
+
/**
|
|
6471
|
+
* Match modes for filter.
|
|
6472
|
+
* @group Props
|
|
6473
|
+
*/
|
|
5004
6474
|
this.matchModes = [];
|
|
6475
|
+
/**
|
|
6476
|
+
* Whether the filter should have operator.
|
|
6477
|
+
* @group Props
|
|
6478
|
+
*/
|
|
5005
6479
|
this.showOperator = true;
|
|
6480
|
+
/**
|
|
6481
|
+
* Maximum number of constraints.
|
|
6482
|
+
* @group Props
|
|
6483
|
+
*/
|
|
5006
6484
|
this.maxConstraints = 2;
|
|
6485
|
+
/**
|
|
6486
|
+
* Title of the filter.
|
|
6487
|
+
* @group Props
|
|
6488
|
+
*/
|
|
5007
6489
|
this.headerTitle = '';
|
|
6490
|
+
/**
|
|
6491
|
+
* Whether the filter should hide on clear.
|
|
6492
|
+
* @group Props
|
|
6493
|
+
*/
|
|
5008
6494
|
this.hideOnClear = false;
|
|
6495
|
+
/**
|
|
6496
|
+
* Options for category filter.
|
|
6497
|
+
* @group Props
|
|
6498
|
+
*/
|
|
5009
6499
|
this.categoryOptions = [];
|
|
5010
|
-
|
|
5011
|
-
|
|
6500
|
+
/**
|
|
6501
|
+
* Whether to show category filter as button toggles.
|
|
6502
|
+
* @group Props
|
|
6503
|
+
*/
|
|
6504
|
+
this.asButtonToggle = false;
|
|
6505
|
+
/**
|
|
6506
|
+
* Single selection for category filter.
|
|
6507
|
+
* @group Props
|
|
6508
|
+
*/
|
|
6509
|
+
this.singleSelection = false;
|
|
6510
|
+
/**
|
|
6511
|
+
* Placeholder for filter constraints.
|
|
6512
|
+
* @group Props
|
|
6513
|
+
*/
|
|
5012
6514
|
this.placeholder = '';
|
|
5013
6515
|
this.operator = FilterOperator.AND;
|
|
5014
6516
|
this.operatorOptions = [
|
|
@@ -5313,24 +6815,88 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5313
6815
|
args: ['mouseleave']
|
|
5314
6816
|
}] } });
|
|
5315
6817
|
|
|
6818
|
+
/**
|
|
6819
|
+
* CpsTableColumnFilterDirective is a filtering directive used to filter single or multiple columns in table.
|
|
6820
|
+
* @group Directives
|
|
6821
|
+
*/
|
|
5316
6822
|
class CpsTableColumnFilterDirective {
|
|
5317
6823
|
constructor(elementRef, viewContainerRef) {
|
|
5318
6824
|
this.elementRef = elementRef;
|
|
5319
6825
|
this.viewContainerRef = viewContainerRef;
|
|
6826
|
+
/**
|
|
6827
|
+
* Type of a filter in table, it can be of type "number", "boolean", "text", "date" or "category".
|
|
6828
|
+
* @group Props
|
|
6829
|
+
*/
|
|
5320
6830
|
this.filterType = 'text';
|
|
6831
|
+
/**
|
|
6832
|
+
* Whether the filter menu should be persistent.
|
|
6833
|
+
* @group Props
|
|
6834
|
+
*/
|
|
5321
6835
|
this.filterPersistent = false;
|
|
6836
|
+
/**
|
|
6837
|
+
* Whether the filter should have clear button.
|
|
6838
|
+
* @group Props
|
|
6839
|
+
*/
|
|
5322
6840
|
this.filterShowClearButton = true;
|
|
6841
|
+
/**
|
|
6842
|
+
* Whether the filter should have apply button.
|
|
6843
|
+
* @group Props
|
|
6844
|
+
*/
|
|
5323
6845
|
this.filterShowApplyButton = true;
|
|
6846
|
+
/**
|
|
6847
|
+
* Whether the filter should have close button.
|
|
6848
|
+
* @group Props
|
|
6849
|
+
*/
|
|
5324
6850
|
this.filterShowCloseButton = false;
|
|
6851
|
+
/**
|
|
6852
|
+
* Whether the filter should have match modes.
|
|
6853
|
+
* @group Props
|
|
6854
|
+
*/
|
|
5325
6855
|
this.filterShowMatchModes = true;
|
|
6856
|
+
/**
|
|
6857
|
+
* Match modes for filter.
|
|
6858
|
+
* @group Props
|
|
6859
|
+
*/
|
|
5326
6860
|
this.filterMatchModes = [];
|
|
6861
|
+
/**
|
|
6862
|
+
* Whether the filter should have operator.
|
|
6863
|
+
* @group Props
|
|
6864
|
+
*/
|
|
5327
6865
|
this.filterShowOperator = true;
|
|
6866
|
+
/**
|
|
6867
|
+
* Maximum number of constraints.
|
|
6868
|
+
* @group Props
|
|
6869
|
+
*/
|
|
5328
6870
|
this.filterMaxConstraints = 2;
|
|
6871
|
+
/**
|
|
6872
|
+
* Title of the filter.
|
|
6873
|
+
* @group Props
|
|
6874
|
+
*/
|
|
5329
6875
|
this.filterHeaderTitle = '';
|
|
6876
|
+
/**
|
|
6877
|
+
* Whether the filter should hide on clear.
|
|
6878
|
+
* @group Props
|
|
6879
|
+
*/
|
|
5330
6880
|
this.filterHideOnClear = false;
|
|
6881
|
+
/**
|
|
6882
|
+
* Options for category filter.
|
|
6883
|
+
* @group Props
|
|
6884
|
+
*/
|
|
5331
6885
|
this.filterCategoryOptions = [];
|
|
5332
|
-
|
|
5333
|
-
|
|
6886
|
+
/**
|
|
6887
|
+
* Whether to show category filter as button toggles.
|
|
6888
|
+
* @group Props
|
|
6889
|
+
*/
|
|
6890
|
+
this.filterAsButtonToggle = false;
|
|
6891
|
+
/**
|
|
6892
|
+
* Single selection for category filter.
|
|
6893
|
+
* @group Props
|
|
6894
|
+
*/
|
|
6895
|
+
this.filterSingleSelection = false;
|
|
6896
|
+
/**
|
|
6897
|
+
* Placeholder for filter constraints.
|
|
6898
|
+
* @group Props
|
|
6899
|
+
*/
|
|
5334
6900
|
this.filterPlaceholder = '';
|
|
5335
6901
|
this.filterCompRef = this.viewContainerRef.createComponent(TableColumnFilterComponent);
|
|
5336
6902
|
}
|
|
@@ -5427,6 +6993,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5427
6993
|
type: Input
|
|
5428
6994
|
}] } });
|
|
5429
6995
|
|
|
6996
|
+
/**
|
|
6997
|
+
* CpsTableHeaderSelectableDirective is a directive used to apply a checkbox to a header cell.
|
|
6998
|
+
* @group Directives
|
|
6999
|
+
*/
|
|
5430
7000
|
class CpsTableHeaderSelectableDirective {
|
|
5431
7001
|
constructor(elementRef, viewContainerRef) {
|
|
5432
7002
|
this.elementRef = elementRef;
|
|
@@ -5452,6 +7022,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5452
7022
|
}]
|
|
5453
7023
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }]; } });
|
|
5454
7024
|
|
|
7025
|
+
/**
|
|
7026
|
+
* CpsTableRowSelectableDirective is a directive used to apply a checkbox to a body cell.
|
|
7027
|
+
* @group Directives
|
|
7028
|
+
*/
|
|
5455
7029
|
class CpsTableRowSelectableDirective {
|
|
5456
7030
|
constructor(elementRef, viewContainerRef) {
|
|
5457
7031
|
this.elementRef = elementRef;
|
|
@@ -5480,12 +7054,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5480
7054
|
args: ['cpsTRowSelectable']
|
|
5481
7055
|
}] } });
|
|
5482
7056
|
|
|
7057
|
+
/**
|
|
7058
|
+
* CpsTreeTableColumnSortableDirective is a sorting directive used to sort single or multiple columns in treetable.
|
|
7059
|
+
* @group Directives
|
|
7060
|
+
*/
|
|
5483
7061
|
class CpsTreeTableColumnSortableDirective extends TTSortableColumn {
|
|
5484
7062
|
constructor(elementRef, viewContainerRef, tt) {
|
|
5485
7063
|
super(tt);
|
|
5486
7064
|
this.elementRef = elementRef;
|
|
5487
7065
|
this.viewContainerRef = viewContainerRef;
|
|
5488
7066
|
this.tt = tt;
|
|
7067
|
+
/**
|
|
7068
|
+
* Name of the column to be sorted.
|
|
7069
|
+
* @group Props
|
|
7070
|
+
*/
|
|
5489
7071
|
this.field = '';
|
|
5490
7072
|
this.sortIconRef =
|
|
5491
7073
|
this.viewContainerRef.createComponent(CpsSortIconComponent);
|
|
@@ -5667,6 +7249,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5667
7249
|
type: Optional
|
|
5668
7250
|
}] }]; } });
|
|
5669
7251
|
|
|
7252
|
+
/**
|
|
7253
|
+
* CpsTreeTableHeaderSelectableDirective is a directive used to apply a checkbox to a header cell.
|
|
7254
|
+
* @group Directives
|
|
7255
|
+
*/
|
|
5670
7256
|
class CpsTreeTableHeaderSelectableDirective {
|
|
5671
7257
|
constructor(elementRef, viewContainerRef) {
|
|
5672
7258
|
this.elementRef = elementRef;
|
|
@@ -5693,6 +7279,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5693
7279
|
}]
|
|
5694
7280
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }]; } });
|
|
5695
7281
|
|
|
7282
|
+
/**
|
|
7283
|
+
* CpsTreeTableRowSelectableDirective is a directive used to apply a checkbox to a body cell.
|
|
7284
|
+
* @group Directives
|
|
7285
|
+
*/
|
|
5696
7286
|
class CpsTreeTableRowSelectableDirective {
|
|
5697
7287
|
constructor(elementRef, viewContainerRef) {
|
|
5698
7288
|
this.elementRef = elementRef;
|
|
@@ -5722,6 +7312,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5722
7312
|
args: ['cpsTTRowSelectable']
|
|
5723
7313
|
}] } });
|
|
5724
7314
|
|
|
7315
|
+
/**
|
|
7316
|
+
* CpsTreetableRowTogglerDirective is a directive used to apply a chevron toggler icon to a body cell.
|
|
7317
|
+
* @group Directives
|
|
7318
|
+
*/
|
|
5725
7319
|
class CpsTreetableRowTogglerDirective {
|
|
5726
7320
|
constructor(elementRef, viewContainerRef) {
|
|
5727
7321
|
this.elementRef = elementRef;
|
|
@@ -5761,88 +7355,395 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5761
7355
|
function treeTableFactory(tableComponent) {
|
|
5762
7356
|
return tableComponent.primengTreeTable;
|
|
5763
7357
|
}
|
|
7358
|
+
/**
|
|
7359
|
+
* CpsTreeTableComponent is used to display hierarchical data in tabular format.
|
|
7360
|
+
* @group Components
|
|
7361
|
+
*/
|
|
5764
7362
|
class CpsTreeTableComponent {
|
|
5765
7363
|
// eslint-disable-next-line no-useless-constructor
|
|
5766
7364
|
constructor(cdRef, renderer, ngZone) {
|
|
5767
7365
|
this.cdRef = cdRef;
|
|
5768
7366
|
this.renderer = renderer;
|
|
5769
7367
|
this.ngZone = ngZone;
|
|
7368
|
+
/**
|
|
7369
|
+
* An array of objects to display.
|
|
7370
|
+
* @group Props
|
|
7371
|
+
*/
|
|
5770
7372
|
this.data = [];
|
|
7373
|
+
/**
|
|
7374
|
+
* An array of objects to represent dynamic columns.
|
|
7375
|
+
* @group Props
|
|
7376
|
+
*/
|
|
5771
7377
|
this.columns = [];
|
|
7378
|
+
/**
|
|
7379
|
+
* A key used to retrieve the header from columns.
|
|
7380
|
+
* @group Props
|
|
7381
|
+
*/
|
|
5772
7382
|
this.colHeaderName = 'header';
|
|
7383
|
+
/**
|
|
7384
|
+
* A key used to retrieve the field from columns.
|
|
7385
|
+
* @group Props
|
|
7386
|
+
*/
|
|
5773
7387
|
this.colFieldName = 'field';
|
|
7388
|
+
/**
|
|
7389
|
+
* Treetable min width of type number denoting pixels or string.
|
|
7390
|
+
* @group Props
|
|
7391
|
+
*/
|
|
5774
7392
|
this.minWidth = '';
|
|
7393
|
+
/**
|
|
7394
|
+
* Whether minWidth prop is used for treetable body only, excluding toolbar and paginator.
|
|
7395
|
+
* @group Props
|
|
7396
|
+
*/
|
|
5775
7397
|
this.minWidthForBodyOnly = true;
|
|
5776
7398
|
/**
|
|
5777
7399
|
* Whether the cell widths scale according to their content or not.
|
|
5778
7400
|
* @group Props
|
|
5779
7401
|
*/
|
|
5780
7402
|
this.autoLayout = true;
|
|
7403
|
+
/**
|
|
7404
|
+
* Whether the treetable should have alternating stripes.
|
|
7405
|
+
* @group Props
|
|
7406
|
+
*/
|
|
5781
7407
|
this.striped = true;
|
|
7408
|
+
/**
|
|
7409
|
+
* Whether the treetable should have borders.
|
|
7410
|
+
* @group Props
|
|
7411
|
+
*/
|
|
5782
7412
|
this.bordered = true;
|
|
7413
|
+
/**
|
|
7414
|
+
* Size of treetable cells, it can be "small", "normal" or "large".
|
|
7415
|
+
* @group Props
|
|
7416
|
+
*/
|
|
5783
7417
|
this.size = 'normal';
|
|
7418
|
+
/**
|
|
7419
|
+
* Whether the treetable should have row selection.
|
|
7420
|
+
* @group Props
|
|
7421
|
+
*/
|
|
5784
7422
|
this.selectable = false;
|
|
7423
|
+
/**
|
|
7424
|
+
* Whether the treetable should have rows highlighting on hover.
|
|
7425
|
+
* @group Props
|
|
7426
|
+
*/
|
|
5785
7427
|
this.rowHover = true;
|
|
7428
|
+
/**
|
|
7429
|
+
* Whether the treetable should show row menu.
|
|
7430
|
+
* @group Props
|
|
7431
|
+
*/
|
|
5786
7432
|
this.showRowMenu = false;
|
|
7433
|
+
/**
|
|
7434
|
+
* When enabled, a loader component is displayed.
|
|
7435
|
+
* @group Props
|
|
7436
|
+
*/
|
|
5787
7437
|
this.loading = false;
|
|
7438
|
+
/**
|
|
7439
|
+
* Inline style of the treetable.
|
|
7440
|
+
* @group Props
|
|
7441
|
+
*/
|
|
5788
7442
|
this.tableStyle = undefined;
|
|
7443
|
+
/**
|
|
7444
|
+
* Style class of the treetable.
|
|
7445
|
+
* @group Props
|
|
7446
|
+
*/
|
|
5789
7447
|
this.tableStyleClass = '';
|
|
5790
|
-
|
|
7448
|
+
/**
|
|
7449
|
+
* Makes all columns sortable if columns prop is provided.
|
|
7450
|
+
* @group Props
|
|
7451
|
+
*/
|
|
7452
|
+
this.sortable = false;
|
|
7453
|
+
/**
|
|
7454
|
+
* Defines whether sorting works on single column or on multiple columns.
|
|
7455
|
+
* @group Props
|
|
7456
|
+
*/
|
|
5791
7457
|
this.sortMode = 'single';
|
|
7458
|
+
/**
|
|
7459
|
+
* Whether to use the default sorting or a custom one using sortFunction.
|
|
7460
|
+
* @group Props
|
|
7461
|
+
*/
|
|
5792
7462
|
this.customSort = false;
|
|
7463
|
+
/**
|
|
7464
|
+
* Whether the treetable has toolbar.
|
|
7465
|
+
* @group Props
|
|
7466
|
+
*/
|
|
5793
7467
|
this.hasToolbar = true;
|
|
7468
|
+
/**
|
|
7469
|
+
* Toolbar size, it can be "small" or "normal".
|
|
7470
|
+
* @group Props
|
|
7471
|
+
*/
|
|
5794
7472
|
this.toolbarSize = 'normal';
|
|
7473
|
+
/**
|
|
7474
|
+
* Toolbar title.
|
|
7475
|
+
* @group Props
|
|
7476
|
+
*/
|
|
5795
7477
|
this.toolbarTitle = '';
|
|
7478
|
+
/**
|
|
7479
|
+
* Toolbar icon name.
|
|
7480
|
+
* @group Props
|
|
7481
|
+
*/
|
|
5796
7482
|
this.toolbarIcon = '';
|
|
7483
|
+
/**
|
|
7484
|
+
* Toolbar icon color.
|
|
7485
|
+
* @group Props
|
|
7486
|
+
*/
|
|
5797
7487
|
this.toolbarIconColor = '';
|
|
7488
|
+
/**
|
|
7489
|
+
* Makes treetable scrollable.
|
|
7490
|
+
* @group Props
|
|
7491
|
+
*/
|
|
5798
7492
|
this.scrollable = true;
|
|
5799
|
-
|
|
5800
|
-
|
|
7493
|
+
/**
|
|
7494
|
+
* Height of the scroll viewport in fixed pixels or the "flex" keyword for a dynamic size.
|
|
7495
|
+
* @group Props
|
|
7496
|
+
*/
|
|
7497
|
+
this.scrollHeight = '';
|
|
7498
|
+
/**
|
|
7499
|
+
* Whether only the elements within scrollable area should be added into the DOM. Works only if scrollable prop is true.
|
|
7500
|
+
* @group Props
|
|
7501
|
+
*/
|
|
7502
|
+
this.virtualScroll = false;
|
|
7503
|
+
/**
|
|
7504
|
+
* Height of a virtual scroll item in fixed pixels.
|
|
7505
|
+
* @group Props
|
|
7506
|
+
*/
|
|
5801
7507
|
this.virtualScrollItemHeight = 0;
|
|
7508
|
+
/**
|
|
7509
|
+
* Determines how many additional elements to add to the DOM outside of the view.
|
|
7510
|
+
* @group Props
|
|
7511
|
+
*/
|
|
5802
7512
|
this.numToleratedItems = 10;
|
|
7513
|
+
/**
|
|
7514
|
+
* Whether the treetable should have paginator.
|
|
7515
|
+
* @group Props
|
|
7516
|
+
*/
|
|
5803
7517
|
this.paginator = false;
|
|
7518
|
+
/**
|
|
7519
|
+
* Whether to show paginator even there is only one page.
|
|
7520
|
+
* @group Props
|
|
7521
|
+
*/
|
|
5804
7522
|
this.alwaysShowPaginator = true;
|
|
7523
|
+
/**
|
|
7524
|
+
* Array of integer values to display inside rows per page dropdown of paginator.
|
|
7525
|
+
* @group Props
|
|
7526
|
+
*/
|
|
5805
7527
|
this.rowsPerPageOptions = [];
|
|
7528
|
+
/**
|
|
7529
|
+
* Index of the first row to be displayed.
|
|
7530
|
+
* @group Props
|
|
7531
|
+
*/
|
|
5806
7532
|
this.first = 0;
|
|
7533
|
+
/**
|
|
7534
|
+
* Number of rows to display per page.
|
|
7535
|
+
* @group Props
|
|
7536
|
+
*/
|
|
5807
7537
|
this.rows = 0;
|
|
7538
|
+
/**
|
|
7539
|
+
* Whether to reset page on rows change.
|
|
7540
|
+
* @group Props
|
|
7541
|
+
*/
|
|
5808
7542
|
this.resetPageOnRowsChange = false;
|
|
7543
|
+
/**
|
|
7544
|
+
* Whether to reset page on treetable data sorting.
|
|
7545
|
+
* @group Props
|
|
7546
|
+
*/
|
|
5809
7547
|
this.resetPageOnSort = true;
|
|
7548
|
+
/**
|
|
7549
|
+
* Number of total records.
|
|
7550
|
+
* @group Props
|
|
7551
|
+
*/
|
|
5810
7552
|
this.totalRecords = 0;
|
|
7553
|
+
/**
|
|
7554
|
+
* Text to display when there is no data.
|
|
7555
|
+
* @group Props
|
|
7556
|
+
*/
|
|
5811
7557
|
this.emptyMessage = 'No data';
|
|
7558
|
+
/**
|
|
7559
|
+
* Height of treetable's body when there is no data, of type number denoting pixels or string.
|
|
7560
|
+
* @group Props
|
|
7561
|
+
*/
|
|
5812
7562
|
this.emptyBodyHeight = '';
|
|
7563
|
+
/**
|
|
7564
|
+
* Defines if data is loaded and interacted with in lazy manner.
|
|
7565
|
+
* @group Props
|
|
7566
|
+
*/
|
|
5813
7567
|
this.lazy = false;
|
|
7568
|
+
/**
|
|
7569
|
+
* Whether to call lazy loading on initialization.
|
|
7570
|
+
* @group Props
|
|
7571
|
+
*/
|
|
5814
7572
|
this.lazyLoadOnInit = true;
|
|
7573
|
+
/**
|
|
7574
|
+
* Whether to show global filter in the toolbar.
|
|
7575
|
+
* @group Props
|
|
7576
|
+
*/
|
|
5815
7577
|
this.showGlobalFilter = false;
|
|
7578
|
+
/**
|
|
7579
|
+
* Global filter placeholder.
|
|
7580
|
+
* @group Props
|
|
7581
|
+
*/
|
|
5816
7582
|
this.globalFilterPlaceholder = 'Search';
|
|
7583
|
+
/**
|
|
7584
|
+
* An array of fields to use in global filtering.
|
|
7585
|
+
* @group Props
|
|
7586
|
+
*/
|
|
5817
7587
|
this.globalFilterFields = [];
|
|
5818
|
-
|
|
7588
|
+
/**
|
|
7589
|
+
* Whether to clear global filter on data loading.
|
|
7590
|
+
* @group Props
|
|
7591
|
+
*/
|
|
7592
|
+
this.clearGlobalFilterOnLoading = false;
|
|
7593
|
+
/**
|
|
7594
|
+
* Whether to show remove button in the toolbar when rows are selected.
|
|
7595
|
+
* @group Props
|
|
7596
|
+
*/
|
|
5819
7597
|
this.showRemoveBtnOnSelect = true;
|
|
7598
|
+
/**
|
|
7599
|
+
* Whether removeBtnOnSelect is disabled.
|
|
7600
|
+
* @group Props
|
|
7601
|
+
*/
|
|
5820
7602
|
this.removeBtnOnSelectDisabled = false;
|
|
7603
|
+
/**
|
|
7604
|
+
* Whether to show additional button in the toolbar when rows are selected.
|
|
7605
|
+
* @group Props
|
|
7606
|
+
*/
|
|
5821
7607
|
this.showAdditionalBtnOnSelect = false;
|
|
7608
|
+
/**
|
|
7609
|
+
* AdditionalBtnOnSelect title.
|
|
7610
|
+
* @group Props
|
|
7611
|
+
*/
|
|
5822
7612
|
this.additionalBtnOnSelectTitle = 'Select action';
|
|
7613
|
+
/**
|
|
7614
|
+
* Whether additionalBtnOnSelect is disabled.
|
|
7615
|
+
* @group Props
|
|
7616
|
+
*/
|
|
5823
7617
|
this.additionalBtnOnSelectDisabled = false;
|
|
7618
|
+
/**
|
|
7619
|
+
* Whether to show action button in the toolbar.
|
|
7620
|
+
* @group Props
|
|
7621
|
+
*/
|
|
5824
7622
|
this.showActionBtn = false;
|
|
7623
|
+
/**
|
|
7624
|
+
* Action button title.
|
|
7625
|
+
* @group Props
|
|
7626
|
+
*/
|
|
5825
7627
|
this.actionBtnTitle = 'Action';
|
|
7628
|
+
/**
|
|
7629
|
+
* Whether actionBtn is disabled.
|
|
7630
|
+
* @group Props
|
|
7631
|
+
*/
|
|
5826
7632
|
this.actionBtnDisabled = false;
|
|
7633
|
+
/**
|
|
7634
|
+
* Whether to show data reload button in the toolbar.
|
|
7635
|
+
* @group Props
|
|
7636
|
+
*/
|
|
5827
7637
|
this.showDataReloadBtn = false;
|
|
7638
|
+
/**
|
|
7639
|
+
* Whether dataReloadBtn is disabled.
|
|
7640
|
+
* @group Props
|
|
7641
|
+
*/
|
|
5828
7642
|
this.dataReloadBtnDisabled = false;
|
|
5829
|
-
|
|
7643
|
+
/**
|
|
7644
|
+
* Whether the treetable should show columnsToggle menu, where you can choose which columns to be displayed. If external body template is provided, use columnsSelected event emitter.
|
|
7645
|
+
* @group Props
|
|
7646
|
+
*/
|
|
7647
|
+
this.showColumnsToggleBtn = false;
|
|
7648
|
+
/**
|
|
7649
|
+
* Whether columnsToggle button is disabled.
|
|
7650
|
+
* @group Props
|
|
7651
|
+
*/
|
|
5830
7652
|
this.columnsToggleBtnDisabled = false;
|
|
5831
|
-
|
|
7653
|
+
/**
|
|
7654
|
+
* Array of initial columns to show in the treetable. If not provided, all columns are initially visible.
|
|
7655
|
+
* @group Props
|
|
7656
|
+
*/
|
|
7657
|
+
this.initialColumns = [];
|
|
7658
|
+
/**
|
|
7659
|
+
* Callback to invoke on selected node change.
|
|
7660
|
+
* @param {any[]} array - selection changed.
|
|
7661
|
+
* @group Emits
|
|
7662
|
+
*/
|
|
5832
7663
|
this.selectionChanged = new EventEmitter();
|
|
7664
|
+
/**
|
|
7665
|
+
* Callback to invoke when action button is clicked.
|
|
7666
|
+
* @param {void} void - action button clicked.
|
|
7667
|
+
* @group Emits
|
|
7668
|
+
*/
|
|
5833
7669
|
this.actionBtnClicked = new EventEmitter();
|
|
7670
|
+
/**
|
|
7671
|
+
* Callback to invoke when additional button on select is clicked.
|
|
7672
|
+
* @param {any[]} any[] - selected data.
|
|
7673
|
+
* @group Emits
|
|
7674
|
+
*/
|
|
5834
7675
|
this.additionalBtnOnSelectClicked = new EventEmitter();
|
|
7676
|
+
/**
|
|
7677
|
+
* Callback to invoke when edit-row button is clicked.
|
|
7678
|
+
* @param {any} any - button clicked.
|
|
7679
|
+
* @group Emits
|
|
7680
|
+
*/
|
|
5835
7681
|
this.editRowBtnClicked = new EventEmitter();
|
|
7682
|
+
/**
|
|
7683
|
+
* Callback to invoke when rows are removed.
|
|
7684
|
+
* @param {any} any - rows removed.
|
|
7685
|
+
* @group Emits
|
|
7686
|
+
*/
|
|
5836
7687
|
this.rowsRemoved = new EventEmitter();
|
|
7688
|
+
/**
|
|
7689
|
+
* Callback to invoke when page is changed.
|
|
7690
|
+
* @param {any} any - page changed.
|
|
7691
|
+
* @group Emits
|
|
7692
|
+
*/
|
|
5837
7693
|
this.pageChanged = new EventEmitter();
|
|
7694
|
+
/**
|
|
7695
|
+
* Callback to invoke when data is sorted.
|
|
7696
|
+
* @param {any} any - Sort data.
|
|
7697
|
+
* @group Emits
|
|
7698
|
+
*/
|
|
5838
7699
|
this.sorted = new EventEmitter();
|
|
7700
|
+
/**
|
|
7701
|
+
* Callback to invoke when data is filtered.
|
|
7702
|
+
* @param {any} any - Custom filter event.
|
|
7703
|
+
* @group Emits
|
|
7704
|
+
*/
|
|
5839
7705
|
this.filtered = new EventEmitter();
|
|
7706
|
+
/**
|
|
7707
|
+
* Callback to invoke on selected columns.
|
|
7708
|
+
* @param {any[]} object[] - selection changed.
|
|
7709
|
+
* @group Emits
|
|
7710
|
+
*/
|
|
5840
7711
|
this.columnsSelected = new EventEmitter();
|
|
7712
|
+
/**
|
|
7713
|
+
* Callback to invoke when paging, sorting or filtering happens in lazy mode.
|
|
7714
|
+
* @param {any} any - Custom lazy load event.
|
|
7715
|
+
* @group Emits
|
|
7716
|
+
*/
|
|
5841
7717
|
this.lazyLoaded = new EventEmitter();
|
|
7718
|
+
/**
|
|
7719
|
+
* Callback to invoke when data reload button is clicked.
|
|
7720
|
+
* @param {any} any - data reload button clicked.
|
|
7721
|
+
* @group Emits
|
|
7722
|
+
*/
|
|
5842
7723
|
this.dataReloadBtnClicked = new EventEmitter();
|
|
7724
|
+
/**
|
|
7725
|
+
* Callback to invoke when a node is expanded.
|
|
7726
|
+
* @param {any} any - Node instance.
|
|
7727
|
+
* @group Emits
|
|
7728
|
+
*/
|
|
5843
7729
|
this.nodeExpanded = new EventEmitter();
|
|
7730
|
+
/**
|
|
7731
|
+
* Callback to invoke when a node is collapsed.
|
|
7732
|
+
* @param {any} any - Node collapse event.
|
|
7733
|
+
* @group Emits
|
|
7734
|
+
*/
|
|
5844
7735
|
this.nodeCollapsed = new EventEmitter();
|
|
7736
|
+
/**
|
|
7737
|
+
* Callback to invoke when a node is selected.
|
|
7738
|
+
* @param {any} any - Node instance.
|
|
7739
|
+
* @group Emits
|
|
7740
|
+
*/
|
|
5845
7741
|
this.nodeSelected = new EventEmitter();
|
|
7742
|
+
/**
|
|
7743
|
+
* Callback to invoke when a node is unselected.
|
|
7744
|
+
* @param {any} any - Custom node unselect event.
|
|
7745
|
+
* @group Emits
|
|
7746
|
+
*/
|
|
5846
7747
|
this.nodeUnselected = new EventEmitter();
|
|
5847
7748
|
/**
|
|
5848
7749
|
* A function to implement custom sorting. customSort must be true.
|
|
@@ -6644,23 +8545,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
6644
8545
|
args: ['colToggleMenu']
|
|
6645
8546
|
}] } });
|
|
6646
8547
|
|
|
8548
|
+
/**
|
|
8549
|
+
* CpsTreeTableColumnFilterDirective is a filtering directive used to filter single or multiple columns in treetable.
|
|
8550
|
+
* @group Directives
|
|
8551
|
+
*/
|
|
6647
8552
|
class CpsTreeTableColumnFilterDirective {
|
|
6648
8553
|
constructor(elementRef, viewContainerRef) {
|
|
6649
8554
|
this.elementRef = elementRef;
|
|
6650
8555
|
this.viewContainerRef = viewContainerRef;
|
|
8556
|
+
/**
|
|
8557
|
+
* Type of filter in treetable, it can be of type "number", "boolean", "text", "date" or "category".
|
|
8558
|
+
* @group Props
|
|
8559
|
+
*/
|
|
6651
8560
|
this.filterType = 'text';
|
|
8561
|
+
/**
|
|
8562
|
+
* Whether the filter menu should be persistent.
|
|
8563
|
+
* @group Props
|
|
8564
|
+
*/
|
|
6652
8565
|
this.filterPersistent = false;
|
|
8566
|
+
/**
|
|
8567
|
+
* Whether the filter should have clear button.
|
|
8568
|
+
* @group Props
|
|
8569
|
+
*/
|
|
6653
8570
|
this.filterShowClearButton = true;
|
|
8571
|
+
/**
|
|
8572
|
+
* Whether the filter should have apply button.
|
|
8573
|
+
* @group Props
|
|
8574
|
+
*/
|
|
6654
8575
|
this.filterShowApplyButton = true;
|
|
8576
|
+
/**
|
|
8577
|
+
* Whether the filter should have close button.
|
|
8578
|
+
* @group Props
|
|
8579
|
+
*/
|
|
6655
8580
|
this.filterShowCloseButton = false;
|
|
8581
|
+
/**
|
|
8582
|
+
* Whether the filter should have match modes.
|
|
8583
|
+
* @group Props
|
|
8584
|
+
*/
|
|
6656
8585
|
this.filterShowMatchModes = true;
|
|
8586
|
+
/**
|
|
8587
|
+
* Match modes for filter.
|
|
8588
|
+
* @group Props
|
|
8589
|
+
*/
|
|
6657
8590
|
this.filterMatchModes = [];
|
|
8591
|
+
/**
|
|
8592
|
+
* Whether the filter should have operator.
|
|
8593
|
+
* @group Props
|
|
8594
|
+
*/
|
|
6658
8595
|
this.filterShowOperator = true;
|
|
8596
|
+
/**
|
|
8597
|
+
* Title of the filter.
|
|
8598
|
+
* @group Props
|
|
8599
|
+
*/
|
|
6659
8600
|
this.filterHeaderTitle = '';
|
|
8601
|
+
/**
|
|
8602
|
+
* Whether the filter should hide on clear.
|
|
8603
|
+
* @group Props
|
|
8604
|
+
*/
|
|
6660
8605
|
this.filterHideOnClear = false;
|
|
8606
|
+
/**
|
|
8607
|
+
* Options for category filter.
|
|
8608
|
+
* @group Props
|
|
8609
|
+
*/
|
|
6661
8610
|
this.filterCategoryOptions = [];
|
|
6662
|
-
|
|
6663
|
-
|
|
8611
|
+
/**
|
|
8612
|
+
* Whether to show category filter as button toggles.
|
|
8613
|
+
* @group Props
|
|
8614
|
+
*/
|
|
8615
|
+
this.filterAsButtonToggle = false;
|
|
8616
|
+
/**
|
|
8617
|
+
* Single selection for category filter.
|
|
8618
|
+
* @group Props
|
|
8619
|
+
*/
|
|
8620
|
+
this.filterSingleSelection = false;
|
|
8621
|
+
/**
|
|
8622
|
+
* Placeholder for filter constraints.
|
|
8623
|
+
* @group Props
|
|
8624
|
+
*/
|
|
6664
8625
|
this.filterPlaceholder = '';
|
|
6665
8626
|
this.filterCompRef = this.viewContainerRef.createComponent(TableColumnFilterComponent);
|
|
6666
8627
|
}
|
|
@@ -6755,7 +8716,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
6755
8716
|
type: Input
|
|
6756
8717
|
}] } });
|
|
6757
8718
|
|
|
8719
|
+
/**
|
|
8720
|
+
* CpsTagComponent is used to categorize content.
|
|
8721
|
+
* @group Components
|
|
8722
|
+
*/
|
|
6758
8723
|
class CpsTagComponent {
|
|
8724
|
+
/**
|
|
8725
|
+
* Tag value.
|
|
8726
|
+
* @group Props
|
|
8727
|
+
*/
|
|
6759
8728
|
set value(value) {
|
|
6760
8729
|
this._value = value;
|
|
6761
8730
|
this.onChange(value);
|
|
@@ -6765,11 +8734,36 @@ class CpsTagComponent {
|
|
|
6765
8734
|
}
|
|
6766
8735
|
constructor(_control) {
|
|
6767
8736
|
this._control = _control;
|
|
6768
|
-
|
|
8737
|
+
/**
|
|
8738
|
+
* Type of the tag. It can be security, classification or custom, has higher precedence over color.
|
|
8739
|
+
* @group Props
|
|
8740
|
+
*/
|
|
8741
|
+
this.type = 'custom';
|
|
8742
|
+
/**
|
|
8743
|
+
* Label of the tag.
|
|
8744
|
+
* @group Props
|
|
8745
|
+
*/
|
|
6769
8746
|
this.label = '';
|
|
8747
|
+
/**
|
|
8748
|
+
* Color of the tag.
|
|
8749
|
+
* @group Props
|
|
8750
|
+
*/
|
|
6770
8751
|
this.color = '';
|
|
8752
|
+
/**
|
|
8753
|
+
* Whether the tag should be disabled.
|
|
8754
|
+
* @group Props
|
|
8755
|
+
*/
|
|
6771
8756
|
this.disabled = false;
|
|
8757
|
+
/**
|
|
8758
|
+
* Whether the tag should be selectable.
|
|
8759
|
+
* @group Props
|
|
8760
|
+
*/
|
|
6772
8761
|
this.selectable = false;
|
|
8762
|
+
/**
|
|
8763
|
+
* Callback to invoke on value change.
|
|
8764
|
+
* @param {boolean} boolean - value change.
|
|
8765
|
+
* @group Emits
|
|
8766
|
+
*/
|
|
6773
8767
|
this.valueChanged = new EventEmitter();
|
|
6774
8768
|
this.classesList = [];
|
|
6775
8769
|
this.tagColor = '';
|
|
@@ -6852,15 +8846,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
6852
8846
|
type: Output
|
|
6853
8847
|
}] } });
|
|
6854
8848
|
|
|
8849
|
+
/**
|
|
8850
|
+
* CpsPaginatorComponent is a generic component to display content in paged format.
|
|
8851
|
+
* @group Components
|
|
8852
|
+
*/
|
|
6855
8853
|
class CpsPaginatorComponent {
|
|
6856
8854
|
constructor() {
|
|
8855
|
+
/**
|
|
8856
|
+
* Zero-relative number of the first row to be displayed.
|
|
8857
|
+
* @group Props
|
|
8858
|
+
*/
|
|
6857
8859
|
this.first = 0;
|
|
8860
|
+
/**
|
|
8861
|
+
* Rows count to display per page.
|
|
8862
|
+
* @group Props
|
|
8863
|
+
*/
|
|
6858
8864
|
this.rows = 0;
|
|
8865
|
+
/**
|
|
8866
|
+
* Number of total records.
|
|
8867
|
+
* @group Props
|
|
8868
|
+
*/
|
|
6859
8869
|
this.totalRecords = 0;
|
|
8870
|
+
/**
|
|
8871
|
+
* Array of integer values to display inside rows per page dropdown.
|
|
8872
|
+
* @group Props
|
|
8873
|
+
*/
|
|
6860
8874
|
this.rowsPerPageOptions = [];
|
|
8875
|
+
/**
|
|
8876
|
+
* Whether to show it even there is only one page.
|
|
8877
|
+
* @group Props
|
|
8878
|
+
*/
|
|
6861
8879
|
this.alwaysShow = true;
|
|
8880
|
+
/**
|
|
8881
|
+
* Color of paginator background.
|
|
8882
|
+
* @group Props
|
|
8883
|
+
*/
|
|
6862
8884
|
this.backgroundColor = 'transparent';
|
|
8885
|
+
/**
|
|
8886
|
+
* Whether to reset page index when the number of rows per page changes.
|
|
8887
|
+
* @group Props
|
|
8888
|
+
*/
|
|
6863
8889
|
this.resetPageOnRowsChange = false;
|
|
8890
|
+
/**
|
|
8891
|
+
* Callback to invoke when page changes, the event object contains information about the new state.
|
|
8892
|
+
* @param {any} any - page changed.
|
|
8893
|
+
* @group Emits
|
|
8894
|
+
*/
|
|
6864
8895
|
this.pageChanged = new EventEmitter();
|
|
6865
8896
|
this.rowOptions = [];
|
|
6866
8897
|
}
|
|
@@ -6920,6 +8951,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
6920
8951
|
args: ['paginator']
|
|
6921
8952
|
}] } });
|
|
6922
8953
|
|
|
8954
|
+
/**
|
|
8955
|
+
* The CpsPaginatePipe is a pipe designed to provide a set of items in batches, taking into account specified pagination parameters.
|
|
8956
|
+
* @group Pipes
|
|
8957
|
+
*/
|
|
6923
8958
|
class CpsPaginatePipe {
|
|
6924
8959
|
transform(items, config) {
|
|
6925
8960
|
if (!items) {
|
|
@@ -6944,18 +8979,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
6944
8979
|
}]
|
|
6945
8980
|
}] });
|
|
6946
8981
|
|
|
8982
|
+
/**
|
|
8983
|
+
* CpsExpansionPanelComponent is a component that provides content on expansion.
|
|
8984
|
+
* @group Components
|
|
8985
|
+
*/
|
|
6947
8986
|
class CpsExpansionPanelComponent {
|
|
6948
8987
|
constructor() {
|
|
8988
|
+
/**
|
|
8989
|
+
* Title of the expansionPanel element.
|
|
8990
|
+
* @group Props
|
|
8991
|
+
*/
|
|
6949
8992
|
this.headerTitle = '';
|
|
8993
|
+
/**
|
|
8994
|
+
* Background color of the expansion panel element.
|
|
8995
|
+
* @group Props
|
|
8996
|
+
*/
|
|
6950
8997
|
this.backgroundColor = 'transparent';
|
|
8998
|
+
/**
|
|
8999
|
+
* Whether to show the chevron icon.
|
|
9000
|
+
* @group Props
|
|
9001
|
+
*/
|
|
6951
9002
|
this.showChevron = true;
|
|
9003
|
+
/**
|
|
9004
|
+
* Indicates current expansion state.
|
|
9005
|
+
* @group Props
|
|
9006
|
+
*/
|
|
6952
9007
|
this.isExpanded = false;
|
|
9008
|
+
/**
|
|
9009
|
+
* Whether expansion panel is disabled.
|
|
9010
|
+
* @group Props
|
|
9011
|
+
*/
|
|
6953
9012
|
this.disabled = false;
|
|
9013
|
+
/**
|
|
9014
|
+
* If true, expansion panel element will have borders.
|
|
9015
|
+
* @group Props
|
|
9016
|
+
*/
|
|
6954
9017
|
this.bordered = true;
|
|
9018
|
+
/**
|
|
9019
|
+
* The border radius of the component.
|
|
9020
|
+
* @group Props
|
|
9021
|
+
*/
|
|
6955
9022
|
this.borderRadius = '4px';
|
|
9023
|
+
/**
|
|
9024
|
+
* The width of the expansion panel of type number denoting pixels or string.
|
|
9025
|
+
* @group Props
|
|
9026
|
+
*/
|
|
6956
9027
|
this.width = '100%';
|
|
9028
|
+
/**
|
|
9029
|
+
* Name of the icon in front of the title.
|
|
9030
|
+
* @group Props
|
|
9031
|
+
*/
|
|
6957
9032
|
this.prefixIcon = '';
|
|
9033
|
+
/**
|
|
9034
|
+
* Callback to invoke after a tab gets collapsed.
|
|
9035
|
+
* @param {void}
|
|
9036
|
+
* @group Emits
|
|
9037
|
+
*/
|
|
6958
9038
|
this.afterCollapse = new EventEmitter();
|
|
9039
|
+
/**
|
|
9040
|
+
* Callback to invoke after a tab gets expanded.
|
|
9041
|
+
* @param {void}
|
|
9042
|
+
* @group Emits
|
|
9043
|
+
*/
|
|
6959
9044
|
this.afterExpand = new EventEmitter();
|
|
6960
9045
|
}
|
|
6961
9046
|
ngOnInit() {
|
|
@@ -7056,13 +9141,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
7056
9141
|
type: Output
|
|
7057
9142
|
}] } });
|
|
7058
9143
|
|
|
9144
|
+
/**
|
|
9145
|
+
* CpsSidebarMenuComponent is a vertical menu panel component displayed at the edge of the screen.
|
|
9146
|
+
* @group Components
|
|
9147
|
+
*/
|
|
7059
9148
|
class CpsSidebarMenuComponent {
|
|
7060
9149
|
// eslint-disable-next-line no-useless-constructor
|
|
7061
9150
|
constructor(_router) {
|
|
7062
9151
|
this._router = _router;
|
|
9152
|
+
/**
|
|
9153
|
+
* An array of menu items.
|
|
9154
|
+
* @group Props
|
|
9155
|
+
*/
|
|
7063
9156
|
this.items = [];
|
|
9157
|
+
/**
|
|
9158
|
+
* Indicates current expansion state of the sidebar.
|
|
9159
|
+
* @group Props
|
|
9160
|
+
*/
|
|
7064
9161
|
this.isExpanded = true;
|
|
9162
|
+
/**
|
|
9163
|
+
* Whether the menu items should allow activating only exact links.
|
|
9164
|
+
* @group Props
|
|
9165
|
+
*/
|
|
7065
9166
|
this.exactRoutes = false;
|
|
9167
|
+
/**
|
|
9168
|
+
* Height of the sidebar, of type number denoting pixels or string.
|
|
9169
|
+
* @group Props
|
|
9170
|
+
*/
|
|
7066
9171
|
this.height = '100%';
|
|
7067
9172
|
}
|
|
7068
9173
|
ngOnInit() {
|
|
@@ -7136,7 +9241,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
7136
9241
|
args: ['popupMenu']
|
|
7137
9242
|
}] } });
|
|
7138
9243
|
|
|
9244
|
+
/**
|
|
9245
|
+
* CpsTextareaComponent is a textarea component.
|
|
9246
|
+
* @group Components
|
|
9247
|
+
*/
|
|
7139
9248
|
class CpsTextareaComponent {
|
|
9249
|
+
/**
|
|
9250
|
+
* Value of the textarea.
|
|
9251
|
+
* @group Props
|
|
9252
|
+
*/
|
|
7140
9253
|
set value(value) {
|
|
7141
9254
|
if (!value)
|
|
7142
9255
|
value = '';
|
|
@@ -7149,27 +9262,119 @@ class CpsTextareaComponent {
|
|
|
7149
9262
|
constructor(_control, _elementRef) {
|
|
7150
9263
|
this._control = _control;
|
|
7151
9264
|
this._elementRef = _elementRef;
|
|
9265
|
+
/**
|
|
9266
|
+
* Label of the textarea.
|
|
9267
|
+
* @group Props
|
|
9268
|
+
*/
|
|
7152
9269
|
this.label = '';
|
|
9270
|
+
/**
|
|
9271
|
+
* Placeholder text for the textarea.
|
|
9272
|
+
* @group Props
|
|
9273
|
+
*/
|
|
7153
9274
|
this.placeholder = 'Please enter';
|
|
9275
|
+
/**
|
|
9276
|
+
* Number of rows in the textarea.
|
|
9277
|
+
* @group Props
|
|
9278
|
+
*/
|
|
7154
9279
|
this.rows = 5;
|
|
9280
|
+
/**
|
|
9281
|
+
* The cols attribute specifies the visible width of a textarea.
|
|
9282
|
+
* @group Props
|
|
9283
|
+
*/
|
|
7155
9284
|
this.cols = 20;
|
|
9285
|
+
/**
|
|
9286
|
+
* Whether the textarea can auto focus.
|
|
9287
|
+
* @group Props
|
|
9288
|
+
*/
|
|
7156
9289
|
this.autofocus = false;
|
|
9290
|
+
/**
|
|
9291
|
+
* Bottom hint text for the textarea.
|
|
9292
|
+
* @group Props
|
|
9293
|
+
*/
|
|
7157
9294
|
this.hint = '';
|
|
9295
|
+
/**
|
|
9296
|
+
* Whether the textarea is disabled.
|
|
9297
|
+
* @group Props
|
|
9298
|
+
*/
|
|
7158
9299
|
this.disabled = false;
|
|
9300
|
+
/**
|
|
9301
|
+
* Width of the textarea, it can be of type number denoting pixels or string.
|
|
9302
|
+
* @group Props
|
|
9303
|
+
*/
|
|
7159
9304
|
this.width = '100%';
|
|
9305
|
+
/**
|
|
9306
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
9307
|
+
* @group Props
|
|
9308
|
+
*/
|
|
7160
9309
|
this.clearable = false;
|
|
9310
|
+
/**
|
|
9311
|
+
* Hides hint and validation errors.
|
|
9312
|
+
* @group Props
|
|
9313
|
+
*/
|
|
7161
9314
|
this.hideDetails = false;
|
|
9315
|
+
/**
|
|
9316
|
+
* Whether the textarea should have persistent clear icon.
|
|
9317
|
+
* @group Props
|
|
9318
|
+
*/
|
|
7162
9319
|
this.persistentClear = false;
|
|
9320
|
+
/**
|
|
9321
|
+
* Error message.
|
|
9322
|
+
* @group Props
|
|
9323
|
+
*/
|
|
7163
9324
|
this.error = '';
|
|
9325
|
+
/**
|
|
9326
|
+
* Whether the component can be resized vertically or not.
|
|
9327
|
+
* @group Props
|
|
9328
|
+
*/
|
|
7164
9329
|
this.resizable = 'vertical';
|
|
9330
|
+
/**
|
|
9331
|
+
* When it is not an empty string, an info icon is displayed to show text for more info.
|
|
9332
|
+
* @group Props
|
|
9333
|
+
*/
|
|
7165
9334
|
this.infoTooltip = '';
|
|
9335
|
+
/**
|
|
9336
|
+
* Info tooltip class for styling.
|
|
9337
|
+
* @group Props
|
|
9338
|
+
*/
|
|
7166
9339
|
this.infoTooltipClass = 'cps-tooltip-content';
|
|
9340
|
+
/**
|
|
9341
|
+
* Max width of infoTooltip, of type number denoting pixels or string.
|
|
9342
|
+
* @group Props
|
|
9343
|
+
*/
|
|
7167
9344
|
this.infoTooltipMaxWidth = '100%';
|
|
9345
|
+
/**
|
|
9346
|
+
* Whether the infoTooltip is persistent.
|
|
9347
|
+
* @group Props
|
|
9348
|
+
*/
|
|
7168
9349
|
this.infoTooltipPersistent = false;
|
|
9350
|
+
/**
|
|
9351
|
+
* Position of infoTooltip, it can be 'top', 'bottom', 'left' or 'right'.
|
|
9352
|
+
* @group Props
|
|
9353
|
+
*/
|
|
7169
9354
|
this.infoTooltipPosition = 'top';
|
|
9355
|
+
/**
|
|
9356
|
+
* Callback to invoke on value change.
|
|
9357
|
+
* @param {string} string - value changed.
|
|
9358
|
+
* @group Emits
|
|
9359
|
+
*/
|
|
7170
9360
|
this.valueChanged = new EventEmitter();
|
|
9361
|
+
/**
|
|
9362
|
+
* Callback to invoke when the component receives focus.
|
|
9363
|
+
* @param {any}
|
|
9364
|
+
* @group Emits
|
|
9365
|
+
*/
|
|
7171
9366
|
this.focused = new EventEmitter();
|
|
9367
|
+
/**
|
|
9368
|
+
* Callback to invoke when the prefixIcon is clicked.
|
|
9369
|
+
* @param {any}
|
|
9370
|
+
* @group Emits
|
|
9371
|
+
*/
|
|
7172
9372
|
this.prefixIconClicked = new EventEmitter();
|
|
9373
|
+
/**
|
|
9374
|
+
* Callback to invoke when the component loses focus.
|
|
9375
|
+
* @param {any}
|
|
9376
|
+
* @group Emits
|
|
9377
|
+
*/
|
|
7173
9378
|
this.blurred = new EventEmitter();
|
|
7174
9379
|
this._statusChangesSubscription = new Subscription();
|
|
7175
9380
|
this._value = '';
|
|
@@ -7318,16 +9523,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
7318
9523
|
type: Output
|
|
7319
9524
|
}] } });
|
|
7320
9525
|
|
|
9526
|
+
/**
|
|
9527
|
+
* CpsTabComponent is a tab within a tab-group.
|
|
9528
|
+
* @group Components
|
|
9529
|
+
*/
|
|
7321
9530
|
class CpsTabComponent {
|
|
7322
9531
|
constructor() {
|
|
9532
|
+
/**
|
|
9533
|
+
* Label of the tab.
|
|
9534
|
+
* @group Props
|
|
9535
|
+
*/
|
|
7323
9536
|
this.label = '';
|
|
9537
|
+
/**
|
|
9538
|
+
* Icon before the label.
|
|
9539
|
+
* @group Props
|
|
9540
|
+
*/
|
|
7324
9541
|
this.icon = '';
|
|
9542
|
+
/**
|
|
9543
|
+
* Whether tab is disabled.
|
|
9544
|
+
* @group Props
|
|
9545
|
+
*/
|
|
7325
9546
|
this.disabled = false;
|
|
9547
|
+
/**
|
|
9548
|
+
* Whether to show the tooltip on tab hover.
|
|
9549
|
+
* @group Props
|
|
9550
|
+
*/
|
|
7326
9551
|
this.tooltipText = '';
|
|
9552
|
+
/**
|
|
9553
|
+
* Class for styling the tab tooltip.
|
|
9554
|
+
* @group Props
|
|
9555
|
+
*/
|
|
7327
9556
|
this.tooltipContentClass = 'cps-tooltip-content';
|
|
9557
|
+
/**
|
|
9558
|
+
* Max width of the tooltip, of type number denoting pixels or string.
|
|
9559
|
+
* @group Props
|
|
9560
|
+
*/
|
|
7328
9561
|
this.tooltipMaxWidth = '100%';
|
|
9562
|
+
/**
|
|
9563
|
+
* Whether the tooltip should have persistent info.
|
|
9564
|
+
* @group Props
|
|
9565
|
+
*/
|
|
7329
9566
|
this.tooltipPersistent = false;
|
|
9567
|
+
/**
|
|
9568
|
+
* Badge value to show on the tab after the label in a form of a circle.
|
|
9569
|
+
* @group Props
|
|
9570
|
+
*/
|
|
7330
9571
|
this.badgeValue = '';
|
|
9572
|
+
/**
|
|
9573
|
+
* Tooltip text to show on badge hover.
|
|
9574
|
+
* @group Props
|
|
9575
|
+
*/
|
|
7331
9576
|
this.badgeTooltip = '';
|
|
7332
9577
|
this.active = false;
|
|
7333
9578
|
}
|
|
@@ -7360,15 +9605,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
7360
9605
|
args: [TemplateRef]
|
|
7361
9606
|
}] } });
|
|
7362
9607
|
|
|
9608
|
+
/**
|
|
9609
|
+
* CpsTabGroupComponent is a navigation component that displays items as tab headers.
|
|
9610
|
+
* @group Components
|
|
9611
|
+
*/
|
|
7363
9612
|
class CpsTabGroupComponent {
|
|
7364
9613
|
// eslint-disable-next-line no-useless-constructor
|
|
7365
9614
|
constructor(cdRef) {
|
|
7366
9615
|
this.cdRef = cdRef;
|
|
9616
|
+
/**
|
|
9617
|
+
* Index of the selected tab.
|
|
9618
|
+
* @group Props
|
|
9619
|
+
*/
|
|
7367
9620
|
this.selectedIndex = 0;
|
|
7368
|
-
|
|
9621
|
+
/**
|
|
9622
|
+
* Whether to apply an alternative 'subtabs' styling.
|
|
9623
|
+
* @group Props
|
|
9624
|
+
*/
|
|
9625
|
+
this.isSubTabs = false;
|
|
9626
|
+
/**
|
|
9627
|
+
* Transition options of how content appears, it can be "slide" or "fade".
|
|
9628
|
+
* @group Props
|
|
9629
|
+
*/
|
|
7369
9630
|
this.animationType = 'slide';
|
|
9631
|
+
/**
|
|
9632
|
+
* Background styling of tabs.
|
|
9633
|
+
* @group Props
|
|
9634
|
+
*/
|
|
7370
9635
|
this.tabsBackground = 'inherit';
|
|
9636
|
+
/**
|
|
9637
|
+
* Callback to invoke before tab change.
|
|
9638
|
+
* @param {TabChangeEvent} any - tab changed.
|
|
9639
|
+
* @group Emits
|
|
9640
|
+
*/
|
|
7371
9641
|
this.beforeTabChanged = new EventEmitter();
|
|
9642
|
+
/**
|
|
9643
|
+
* Callback to invoke after tab change.
|
|
9644
|
+
* @param {TabChangeEvent} any - tab changed.
|
|
9645
|
+
* @group Emits
|
|
9646
|
+
*/
|
|
7372
9647
|
this.afterTabChanged = new EventEmitter();
|
|
7373
9648
|
this.backBtnVisible = false;
|
|
7374
9649
|
this.forwardBtnVisible = false;
|
|
@@ -8174,7 +10449,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
8174
10449
|
|
|
8175
10450
|
/**
|
|
8176
10451
|
* Service for showing CpsDialog.
|
|
8177
|
-
* @group
|
|
10452
|
+
* @group Services
|
|
8178
10453
|
*/
|
|
8179
10454
|
class CpsDialogService {
|
|
8180
10455
|
// eslint-disable-next-line no-useless-constructor
|